From c0e62c84175215782fe0ebc238b7d92fc393ae59 Mon Sep 17 00:00:00 2001 From: silag Date: Mon, 29 Jan 2024 17:26:43 +0200 Subject: [PATCH 01/24] fix: added some logs. changed uuidv4 version . bump image version. --- pom.xml | 2 +- webprotege-gwt-ui-client/pom.xml | 2 +- .../place/WebProtegeActivityMapper.java | 6 +++ .../ProjectManagerPresenter.java | 2 + .../ProjectManagerViewImpl.java | 4 +- .../src/main/module-dev.gwt.xml | 8 ++- webprotege-gwt-ui-server-core/pom.xml | 2 +- webprotege-gwt-ui-server/Dockerfile | 2 + webprotege-gwt-ui-server/logging.properties | 51 +++++++++++++++++++ webprotege-gwt-ui-server/pom.xml | 6 +-- .../src/main/webapp/WEB-INF/web.xml | 9 ++++ .../src/main/webapp/WebProtege.jsp | 2 +- webprotege-gwt-ui-shared-core/pom.xml | 2 +- webprotege-gwt-ui-shared/pom.xml | 2 +- 14 files changed, 88 insertions(+), 12 deletions(-) create mode 100644 webprotege-gwt-ui-server/logging.properties diff --git a/pom.xml b/pom.xml index 5db9eb2a9d..b203733d0b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT pom diff --git a/webprotege-gwt-ui-client/pom.xml b/webprotege-gwt-ui-client/pom.xml index 011436514b..ab44dbf7f9 100644 --- a/webprotege-gwt-ui-client/pom.xml +++ b/webprotege-gwt-ui-client/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT webprotege-gwt-ui-client diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/place/WebProtegeActivityMapper.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/place/WebProtegeActivityMapper.java index 682aaf5347..9af091a426 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/place/WebProtegeActivityMapper.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/place/WebProtegeActivityMapper.java @@ -36,6 +36,7 @@ import javax.annotation.Nonnull; import javax.inject.Inject; import java.util.Optional; +import java.util.logging.Logger; /** * Matthew Horridge @@ -43,6 +44,7 @@ * 12/02/16 */ public class WebProtegeActivityMapper implements ActivityMapper { + Logger logger = Logger.getLogger("WebProtegeActivityMapper"); private final ClientApplicationComponent applicationComponent; @@ -132,6 +134,7 @@ public Activity getActivity(final Place place) { GWT.log("[WebProtegeActivityMapper] Map place: " + place); if (shouldRedirectToLogin(place)) { GWT.log("[WebProtegeActivityMapper] User is not logged in. Redirecting to login."); + logger.info("[WebProtegeActivityMapper] User is not logged in. Redirecting to login."); loginPresenter.setNextPlace(place); Scheduler.get().scheduleFinally(() -> placeController.goTo(new LoginPlace(place))); return new LoginActivity(loginPresenter); @@ -165,6 +168,8 @@ public Activity getActivity(final Place place) { } if (place instanceof LoginPlace) { if (!loggedInUserProvider.getCurrentUserId().isGuest()) { + logger.info("[WebProtegeActivityMapper] Schedule to project list after login."); + Scheduler.get().scheduleFinally(() -> placeController.goTo(new ProjectListPlace())); } else { @@ -188,6 +193,7 @@ public Activity getActivity(final Place place) { } if (place instanceof ProjectListPlace) { + logger.info("[WebProtegeActivityMapper] Route to project list activity"); return new ProjectListActivity(projectManagerPresenter); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerPresenter.java index 1c98f60f53..a98cb72976 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerPresenter.java @@ -22,6 +22,7 @@ import javax.annotation.Nonnull; import javax.inject.Inject; import java.util.*; +import java.util.logging.Logger; import static edu.stanford.bmir.protege.web.client.events.UserLoggedInEvent.ON_USER_LOGGED_IN; import static edu.stanford.bmir.protege.web.client.events.UserLoggedOutEvent.ON_USER_LOGGED_OUT; @@ -43,6 +44,7 @@ */ @ApplicationSingleton public class ProjectManagerPresenter implements Presenter { + Logger logger = Logger.getLogger("ProjectManagerPresenter"); private final DispatchServiceManager dispatchServiceManager; diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerViewImpl.java index 4ce36c8b3b..9caaa4e947 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/projectmanager/ProjectManagerViewImpl.java @@ -53,9 +53,9 @@ interface ProjectListViewImplBinder extends UiBinder {}; + private CreateProjectRequestHandler createProjectRequestHandler = () -> {throw new RuntimeException("Not implemented");}; - private ViewFilterChangedHandler viewFilterChangedHandler = () -> {}; + private ViewFilterChangedHandler viewFilterChangedHandler = () -> {throw new RuntimeException("Not implemented");}; @Inject public ProjectManagerViewImpl(AvailableProjectsListViewImpl projectListView) { diff --git a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml index 1a36537a31..8e43615d7c 100644 --- a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml @@ -23,6 +23,8 @@ + + @@ -43,7 +45,11 @@ --> - + + + + + diff --git a/webprotege-gwt-ui-server-core/pom.xml b/webprotege-gwt-ui-server-core/pom.xml index cbe33c3c8d..d102135419 100644 --- a/webprotege-gwt-ui-server-core/pom.xml +++ b/webprotege-gwt-ui-server-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-server/Dockerfile b/webprotege-gwt-ui-server/Dockerfile index 2189547212..7af62ade2c 100644 --- a/webprotege-gwt-ui-server/Dockerfile +++ b/webprotege-gwt-ui-server/Dockerfile @@ -9,5 +9,7 @@ RUN curl --location "${keycloakAdapterUrl}" -o /usr/local/tomcat/lib/kk.zip \ && rm /usr/local/tomcat/lib/kk.zip COPY ./target/webprotege-gwt-ui-server-*.war /usr/local/tomcat/webapps/webprotege.war +COPY logging.properties $CATALINA_HOME/conf/logging.properties + EXPOSE 8080 \ No newline at end of file diff --git a/webprotege-gwt-ui-server/logging.properties b/webprotege-gwt-ui-server/logging.properties new file mode 100644 index 0000000000..5a8429bd9c --- /dev/null +++ b/webprotege-gwt-ui-server/logging.properties @@ -0,0 +1,51 @@ +handlers = 1catalina.org.apache.juli.FileHandler, \ + 2localhost.org.apache.juli.FileHandler, \ + 3manager.org.apache.juli.FileHandler, \ + java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.FileHandler.level = FINE +1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.FileHandler.prefix = catalina. +1catalina.org.apache.juli.FileHandler.maxDays = 90 +1catalina.org.apache.juli.FileHandler.encoding = UTF-8 + +2localhost.org.apache.juli.FileHandler.level = FINE +2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.FileHandler.prefix = localhost. +2localhost.org.apache.juli.FileHandler.maxDays = 90 +2localhost.org.apache.juli.FileHandler.encoding = UTF-8 + +3manager.org.apache.juli.FileHandler.level = FINE +3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.FileHandler.prefix = manager. +3manager.org.apache.juli.FileHandler.bufferSize = 16384 +3manager.org.apache.juli.FileHandler.maxDays = 90 +3manager.org.apache.juli.FileHandler.encoding = UTF-8 + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter +java.util.logging.ConsoleHandler.encoding = UTF-8 + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = \ + 2localhost.org.apache.juli.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = \ + 3manager.org.apache.juli.FileHandler + +# For example, set the org.apache.catalina.util.LifecycleBase logger to log +# each component that extends LifecycleBase changing state: +org.apache.catalina.util.LifecycleBase.level = FINE \ No newline at end of file diff --git a/webprotege-gwt-ui-server/pom.xml b/webprotege-gwt-ui-server/pom.xml index 0bd83c3268..88cc26267c 100644 --- a/webprotege-gwt-ui-server/pom.xml +++ b/webprotege-gwt-ui-server/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT webprotege-gwt-ui-server @@ -143,12 +143,12 @@ com.sun.xml.bind jaxb-core - 2.2.11 + 2.3.0 com.sun.xml.bind jaxb-impl - 2.2.11 + 2.3.0 javax.activation diff --git a/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/web.xml b/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/web.xml index 87eaf7980d..24cfc99339 100644 --- a/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/web.xml +++ b/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/web.xml @@ -79,4 +79,13 @@ /forbidden.jsp + + remoteLogging + com.google.gwt.logging.server.RemoteLoggingServiceImpl + + + remoteLogging + /webprotege/remote_logging + + diff --git a/webprotege-gwt-ui-server/src/main/webapp/WebProtege.jsp b/webprotege-gwt-ui-server/src/main/webapp/WebProtege.jsp index c4d49dc824..568db40b7a 100644 --- a/webprotege-gwt-ui-server/src/main/webapp/WebProtege.jsp +++ b/webprotege-gwt-ui-server/src/main/webapp/WebProtege.jsp @@ -30,7 +30,7 @@ - + diff --git a/webprotege-gwt-ui-shared-core/pom.xml b/webprotege-gwt-ui-shared-core/pom.xml index 88d8667a11..56fd54c000 100644 --- a/webprotege-gwt-ui-shared-core/pom.xml +++ b/webprotege-gwt-ui-shared-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-shared/pom.xml b/webprotege-gwt-ui-shared/pom.xml index a444ab6a54..47526bcef2 100644 --- a/webprotege-gwt-ui-shared/pom.xml +++ b/webprotege-gwt-ui-shared/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT webprotege-gwt-ui-shared From 65056a431239ca4785c81a47583c40dedaf290ed Mon Sep 17 00:00:00 2001 From: silag Date: Wed, 7 Feb 2024 15:48:09 +0200 Subject: [PATCH 02/24] fix: added some logs. bump image version. trying to solve setPerspectiveLayoutProblem --- pom.xml | 2 +- webprotege-gwt-ui-client/pom.xml | 2 +- .../ReadLoggedInUserInitializationTask.java | 4 + .../dispatch/DispatchServiceManager.java | 5 ++ .../perspective/PerspectivePresenter.java | 13 +++- .../src/main/module.gwt.xml | 2 +- webprotege-gwt-ui-server-core/pom.xml | 2 +- .../impl/DispatchServiceExecutorImpl.java | 3 + .../server/rpc/JsonRpcHttpRequestBuilder.java | 6 ++ ...spectiveLayout_Serialization_TestCase.java | 3 +- webprotege-gwt-ui-server/pom.xml | 2 +- .../app/WebProtegeRemoteServiceServlet.java | 10 +-- .../web/server/dispatch/DispatchServlet.java | 11 ++- .../server/filter/WebProtegeWebAppFilter.java | 6 ++ webprotege-gwt-ui-shared-core/pom.xml | 2 +- webprotege-gwt-ui-shared/pom.xml | 2 +- .../web/shared/perspective/ChangeRequest.java | 5 ++ .../shared/perspective/ChangeRequestId.java | 34 ++++++++ .../SetPerspectiveLayoutAction.java | 78 +++++-------------- .../web/shared/perspective/ValueObject.java | 8 ++ .../SetPerspectiveLayoutAction_TestCase.java | 22 +++--- 21 files changed, 131 insertions(+), 91 deletions(-) create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequest.java create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ValueObject.java diff --git a/pom.xml b/pom.xml index b203733d0b..4e33ff7303 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT pom diff --git a/webprotege-gwt-ui-client/pom.xml b/webprotege-gwt-ui-client/pom.xml index ab44dbf7f9..aa69641701 100644 --- a/webprotege-gwt-ui-client/pom.xml +++ b/webprotege-gwt-ui-client/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT webprotege-gwt-ui-client diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/app/ReadLoggedInUserInitializationTask.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/app/ReadLoggedInUserInitializationTask.java index e498d71197..8bc0333715 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/app/ReadLoggedInUserInitializationTask.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/app/ReadLoggedInUserInitializationTask.java @@ -11,11 +11,13 @@ import javax.annotation.Nonnull; import javax.inject.Inject; +import java.util.logging.Logger; /** * Matthew Horridge Stanford Center for Biomedical Informatics Research 22 Dec 2017 */ public class ReadLoggedInUserInitializationTask implements ApplicationInitManager.ApplicationInitializationTask { + Logger logger = Logger.getLogger("ReadLoggedInUserInitializationTask"); @Nonnull private final LoggedInUserManager loggedInUserManager; @@ -41,6 +43,8 @@ public void run(ApplicationInitManager.ApplicationInitTaskCallback callback) { new DispatchServiceCallback(errorMessageDisplay) { @Override public void handleSuccess(GetAuthenticatedUserDetailsResult result) { + logger.info("[ReadLoggedInUserInitializationTask] set logged user: " + result); + loggedInUserManager.setLoggedInUser(new UserInSession(result.getUserDetails(), result.getPermittedActions())); callback.taskComplete(); diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java index 288c194412..b156d3fcaa 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java @@ -26,12 +26,14 @@ import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.user.UserDetails; import edu.stanford.bmir.protege.web.shared.user.UserId; +import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; import javax.inject.Inject; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; +import java.util.logging.Logger; import static com.google.common.base.Preconditions.checkNotNull; @@ -43,6 +45,7 @@ */ @ApplicationSingleton public class DispatchServiceManager { + private final static java.util.logging.Logger logger = Logger.getLogger("DispatchServiceManager"); @Nonnull private final DispatchServiceAsync async; @@ -148,6 +151,7 @@ public , R extends Result> void execute(A action, final Disp private , R extends Result> void execAction(A action, DispatchServiceCallback callback) { requestCount++; logAction(action); + logger.info("ALEX din execAction " + action.getClass() + " async " + async.getClass()); async.executeAction(action, new AsyncCallbackProxy(action, callback)); } @@ -160,6 +164,7 @@ private , R extends Result> void logAction(A action) { } else { GWT.log("[Dispatch] Executing action " + requestCount + " " + action); + logger.info("[Dispatch] Executing action " + requestCount + " " + action); } } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/perspective/PerspectivePresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/perspective/PerspectivePresenter.java index 82bc2ca4db..076f24e1a1 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/perspective/PerspectivePresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/perspective/PerspectivePresenter.java @@ -13,9 +13,11 @@ import edu.stanford.bmir.protege.web.client.portlet.PortletChooserPresenter; import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; import edu.stanford.bmir.protege.web.client.user.LoggedInUserProvider; +import edu.stanford.bmir.protege.web.client.uuid.UuidV4; import edu.stanford.bmir.protege.web.shared.HasDispose; import edu.stanford.bmir.protege.web.shared.perspective.*; import edu.stanford.bmir.protege.web.shared.place.ProjectViewPlace; +import edu.stanford.bmir.protege.web.shared.perspective.ChangeRequestId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.user.UserId; import edu.stanford.protege.widgetmap.shared.node.Node; @@ -25,6 +27,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; +import java.util.logging.Logger; import static edu.stanford.bmir.protege.web.shared.access.BuiltInAction.ADD_OR_REMOVE_VIEW; import static edu.stanford.bmir.protege.web.shared.perspective.ResetPerspectiveLayoutAction.resetPerspective; @@ -33,6 +36,7 @@ * @author Matthew Horridge, Stanford University, Bio-Medical Informatics Research Group, Date: 16/05/2014 */ public class PerspectivePresenter implements HasDispose { + private final static Logger logger = Logger.getLogger("PerspectivePresenter"); private final ProjectId projectId; @@ -238,14 +242,17 @@ public SavePerspectiveRunner(ProjectId projectId, PerspectiveId perspectiveId, O } public void savePerspective() { - GWT.log("[PerspectivePresenter] Saving perspective: " + perspectiveId); - GWT.log("[PerspectivePresenter] perspective: " + node.toString()); + UserId currentUserId = loggedInUserProvider.getCurrentUserId(); if(currentUserId.isGuest()) { return; } PerspectiveLayout layout = PerspectiveLayout.get(perspectiveId, node); - dispatchServiceManager.execute(SetPerspectiveLayoutAction.create(projectId, currentUserId, layout), result -> {}); + String uuid = UuidV4.uuidv4(); + SetPerspectiveLayoutAction perspectiveLayoutAction = SetPerspectiveLayoutAction.create(ChangeRequestId.get(uuid), projectId, currentUserId, layout); + logger.info("[PerspectivePresenter] Saving perspective: " + perspectiveId + " and uuid: " + uuid); + logger.info("[PerspectivePresenter] perspective: " + perspectiveLayoutAction); + dispatchServiceManager.execute(perspectiveLayoutAction, result -> {}); } } } \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/module.gwt.xml b/webprotege-gwt-ui-client/src/main/module.gwt.xml index c480fb76c3..5f03af5dd0 100644 --- a/webprotege-gwt-ui-client/src/main/module.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module.gwt.xml @@ -41,7 +41,7 @@ Trim down the permutations that are compiled. We need CSS3 features and so don't support earlier versions of IE. --> - + diff --git a/webprotege-gwt-ui-server-core/pom.xml b/webprotege-gwt-ui-server-core/pom.xml index d102135419..4830cccfe3 100644 --- a/webprotege-gwt-ui-server-core/pom.xml +++ b/webprotege-gwt-ui-server-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java index 0c611de01d..f1e6d1f034 100644 --- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java +++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java @@ -51,6 +51,7 @@ public DispatchServiceExecutorImpl(HttpClient httpClient, @Override public , R extends Result> DispatchServiceResultContainer execute(A action, ExecutionContext executionContext) throws ActionExecutionException, PermissionDeniedException { try { + logger.info("ALEX din executroIMpl " + action.getClass()); var result = sendRequest(action, executionContext); return DispatchServiceResultContainer.create(result); } @@ -70,6 +71,7 @@ public , R extends Result> DispatchServiceResultContainer ex private , R extends Result> R sendRequest(A action, ExecutionContext executionContext) throws IOException, InterruptedException { // Workaround + logger.info("ALEX in send request " + action.getClass()); if(action instanceof GetProjectEventsAction) { return (R) GetProjectEventsResult.create(EventList.create(((GetProjectEventsAction) action).getSinceTag(), ImmutableList.of(), @@ -78,6 +80,7 @@ private , R extends Result> R sendRequest(A action, try { var httpRequest = requestBuilder.getHttpRequestForAction(action, executionContext); + logger.info("ALEX in send request httpRequest " + httpRequest); var httpResponse = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofString()); diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java index 9ce871dd00..1f4a041c84 100644 --- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java +++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java @@ -2,8 +2,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; import edu.stanford.bmir.protege.web.server.dispatch.ExecutionContext; +import edu.stanford.bmir.protege.web.server.dispatch.impl.DispatchServiceExecutorImpl; import edu.stanford.bmir.protege.web.shared.dispatch.Action; import edu.stanford.bmir.protege.web.shared.dispatch.Result; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; import javax.inject.Inject; @@ -17,6 +20,7 @@ * 2021-04-09 */ public class JsonRpcHttpRequestBuilder { + private static final Logger logger = LoggerFactory.getLogger(JsonRpcHttpRequestBuilder.class.getName()); private static final String CONTENT_TYPE = "Content-Type"; @@ -43,6 +47,8 @@ public , R extends Result> HttpRequest getHttpRequestForAct .setHeader(CONTENT_TYPE, APPLICATION_JSON); var jwt = executionContext.getToken(); builder.setHeader("Authorization", "Bearer " + jwt); + logger.info("ALEX action " + action.getClass() + " body " + requestBody + " uri " + jsonRpcEndPoint.getUri() + " builder " +builder); + return builder.build(); } diff --git a/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayout_Serialization_TestCase.java b/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayout_Serialization_TestCase.java index 14d2eaf772..0d51c92b47 100644 --- a/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayout_Serialization_TestCase.java +++ b/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayout_Serialization_TestCase.java @@ -19,7 +19,8 @@ public class SetPerspectiveLayout_Serialization_TestCase { @Test public void shouldSerializeAction() throws IOException { - var action = SetPerspectiveLayoutAction.create(mockProjectId(), + var action = SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"), + mockProjectId(), mockUserId(), PerspectiveLayout.get(PerspectiveId.generate())); JsonSerializationTestUtil.testSerialization(action, Action.class); diff --git a/webprotege-gwt-ui-server/pom.xml b/webprotege-gwt-ui-server/pom.xml index 88cc26267c..d5d506122e 100644 --- a/webprotege-gwt-ui-server/pom.xml +++ b/webprotege-gwt-ui-server/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT webprotege-gwt-ui-server diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeRemoteServiceServlet.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeRemoteServiceServlet.java index 366a7c426e..efd3b0db19 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeRemoteServiceServlet.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeRemoteServiceServlet.java @@ -19,6 +19,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Optional; +import java.util.logging.Logger; import static com.google.common.base.Preconditions.checkNotNull; @@ -34,11 +35,8 @@ */ public abstract class WebProtegeRemoteServiceServlet extends RemoteServiceServlet { - public final WebProtegeLogger logger; - public WebProtegeRemoteServiceServlet(@Nonnull WebProtegeLogger logger) { - this.logger = checkNotNull(logger); - } + private final static java.util.logging.Logger logger = Logger.getLogger("WebProtegeRemoteServiceServlet"); /** * Gets the userId for the client associated with the current thread local request. @@ -75,7 +73,7 @@ public String processCall(String payload) throws SerializationException { @Override protected void doUnexpectedFailure(Throwable e) { HttpServletRequest request = getThreadLocalRequest(); - logger.error(e, getUserInSession(), request); + logger.info(e.getMessage()); if(e instanceof SerializationException) { HttpServletResponse response = getThreadLocalResponse(); response.reset(); @@ -83,7 +81,7 @@ protected void doUnexpectedFailure(Throwable e) { response.setContentType("text/plain"); response.sendError(StatusCodes.UPDATED, "WebProtege has been updated. Please refresh your browser"); } catch (IOException ex) { - logger.error(ex); + logger.info(ex.getMessage()); } } else { diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java index d196af1943..7eb342bbac 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java @@ -7,12 +7,13 @@ import edu.stanford.bmir.protege.web.shared.permissions.PermissionDeniedException; import edu.stanford.bmir.protege.web.shared.user.UserId; import org.keycloak.KeycloakPrincipal; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; import javax.inject.Inject; +import java.util.logging.Logger; + import static com.google.common.base.Preconditions.checkNotNull; /** @@ -22,24 +23,21 @@ * Date: 20/01/2013 */ @ApplicationSingleton -@SuppressWarnings("GwtServiceNotRegistered") public class DispatchServlet extends WebProtegeRemoteServiceServlet implements DispatchService { + private final static java.util.logging.Logger logger = Logger.getLogger("DispatchServiceManager"); @Nonnull private final DispatchServiceExecutor executor; - @Nonnull - private static Logger logger = LoggerFactory.getLogger(DispatchServlet.class); - @Inject public DispatchServlet(@Nonnull WebProtegeLogger logger, @Nonnull DispatchServiceExecutor executor) { - super(logger); this.executor = checkNotNull(executor); } @Override public DispatchServiceResultContainer executeAction(Action action) throws ActionExecutionException, PermissionDeniedException { + logger.info("Alex tocmai ce intru in execute action " + action.getClass()); var request = getThreadLocalRequest(); var principal = (KeycloakPrincipal) request.getUserPrincipal(); var context = principal.getKeycloakSecurityContext(); @@ -47,6 +45,7 @@ public DispatchServiceResultContainer executeAction(Action action) throws Action var userId = UserId.valueOf(idToken.getPreferredUsername()); var executionContext = new ExecutionContext(userId, context.getTokenString()); + logger.info("ALEX execute with executor " + executor.getClass() + " principal " + principal + " request " + request + " userid " + userId + "context " + executionContext + " action " + action.getClass()) ; return executor.execute(action, executionContext); } diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java index 459fee4955..e12958cf45 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java @@ -2,6 +2,9 @@ import edu.stanford.bmir.protege.web.server.app.GwtResourceCachingStrategy; import edu.stanford.bmir.protege.web.server.app.ResourceCachingManager; +import edu.stanford.bmir.protege.web.server.filemanager.ConfigInputStreamSupplier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; @@ -15,6 +18,7 @@ * Date: 07/01/2013 */ public class WebProtegeWebAppFilter implements Filter { + private static final Logger logger = LoggerFactory.getLogger(WebProtegeWebAppFilter.class); public ResourceCachingManager cachingManager = new ResourceCachingManager(new GwtResourceCachingStrategy()); @@ -60,6 +64,8 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha if(request instanceof HttpServletRequest) { HttpServletRequest httpReq = (HttpServletRequest) request; HttpServletResponse httpRes = (HttpServletResponse) response; + logger.info("ALEX " + httpReq.getUserPrincipal().toString()); + doHttpFilter(httpReq, httpRes); } } diff --git a/webprotege-gwt-ui-shared-core/pom.xml b/webprotege-gwt-ui-shared-core/pom.xml index 56fd54c000..ae059f2084 100644 --- a/webprotege-gwt-ui-shared-core/pom.xml +++ b/webprotege-gwt-ui-shared-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-shared/pom.xml b/webprotege-gwt-ui-shared/pom.xml index 47526bcef2..51e0a6f7f8 100644 --- a/webprotege-gwt-ui-shared/pom.xml +++ b/webprotege-gwt-ui-shared/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.1-SNAPSHOT + 5.0.2-SNAPSHOT webprotege-gwt-ui-shared diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequest.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequest.java new file mode 100644 index 0000000000..5a292c0b32 --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequest.java @@ -0,0 +1,5 @@ +package edu.stanford.bmir.protege.web.shared.perspective; + +public interface ChangeRequest { + ChangeRequestId changeRequestId(); +} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java new file mode 100644 index 0000000000..d834238eee --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java @@ -0,0 +1,34 @@ +package edu.stanford.bmir.protege.web.shared.perspective; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.google.auto.value.AutoValue; +import com.google.common.annotations.GwtCompatible; +import com.google.common.annotations.GwtIncompatible; +import com.google.gwt.user.client.rpc.IsSerializable; +import edu.stanford.bmir.protege.web.shared.util.UUIDUtil; + +import javax.annotation.Nonnull; +import java.io.Serializable; + +@AutoValue +@GwtCompatible(serializable = true) +public abstract class ChangeRequestId implements IsSerializable, Serializable { + + @JsonCreator + @Nonnull + public static ChangeRequestId get(@Nonnull String id) { + if(!UUIDUtil.isWellFormed(id)) { + throw new IllegalArgumentException("Malformed ChangeRequestId. ChangeRequestIds must be UUIDs"); + } + return new AutoValue_ChangeRequestId(id); + } + + /** + * Gets the identifier for this perspective. This is a human readable name. + */ + @JsonValue + @Nonnull + public abstract String getId(); + +} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java index dce7a3028d..a0a50500c2 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java @@ -1,85 +1,49 @@ package edu.stanford.bmir.protege.web.shared.perspective; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.google.auto.value.AutoValue; +import com.google.common.annotations.GwtCompatible; import com.google.common.base.Objects; import edu.stanford.bmir.protege.web.shared.dispatch.ProjectAction; +import edu.stanford.bmir.protege.web.shared.project.HasProjectId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.user.UserId; -import javax.annotation.Nonnull; +import javax.validation.constraints.NotNull; import static com.google.common.base.MoreObjects.toStringHelper; -import static com.google.common.base.Preconditions.checkNotNull; /** * Matthew Horridge * Stanford Center for Biomedical Informatics Research * 28/02/16 */ +@AutoValue +@GwtCompatible(serializable = true) @JsonTypeName("webprotege.perspectives.SetPerspectiveLayout") -public class SetPerspectiveLayoutAction implements ProjectAction { - - private ProjectId projectId; - - private UserId userId; - - private PerspectiveLayout layout; - - /** - * For serialization only - */ - private SetPerspectiveLayoutAction() { - } - - private SetPerspectiveLayoutAction(ProjectId projectId, UserId userId, PerspectiveLayout layout) { - this.projectId = checkNotNull(projectId); - this.userId = checkNotNull(userId); - this.layout = checkNotNull(layout); - } - - public static SetPerspectiveLayoutAction create(ProjectId projectId, UserId userId, PerspectiveLayout layout) { - return new SetPerspectiveLayoutAction(projectId, userId, layout); - } - - @Nonnull - public ProjectId getProjectId() { - return projectId; +public abstract class SetPerspectiveLayoutAction implements ProjectAction, ChangeRequest, HasProjectId { + @JsonCreator + public static SetPerspectiveLayoutAction create(@JsonProperty("changeRequestId") @NotNull ChangeRequestId id, + @JsonProperty("projectId") @NotNull ProjectId projectId, + @JsonProperty("userId") @NotNull UserId userId, + @JsonProperty("layout") @NotNull PerspectiveLayout layout) { + return new AutoValue_SetPerspectiveLayoutAction(projectId,id, userId, layout); } - public UserId getUserId() { - return userId; - } + public abstract UserId userId(); - public PerspectiveLayout getLayout() { - return layout; - } - - @Override - public int hashCode() { - return Objects.hashCode(projectId, userId, layout); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof SetPerspectiveLayoutAction)) { - return false; - } - SetPerspectiveLayoutAction other = (SetPerspectiveLayoutAction) obj; - return this.projectId.equals(other.projectId) - && this.userId.equals(other.userId) - && this.layout.equals(other.layout); - } + public abstract PerspectiveLayout layout(); @Override public String toString() { return toStringHelper("SetPerspectiveLayoutAction") - .addValue(projectId) - .addValue(userId) - .addValue(layout) + .addValue(changeRequestId()) + .addValue(getProjectId()) + .addValue(userId()) + .addValue(layout()) .toString(); } } diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ValueObject.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ValueObject.java new file mode 100644 index 0000000000..2de68b8b1a --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ValueObject.java @@ -0,0 +1,8 @@ +package edu.stanford.bmir.protege.web.shared.perspective; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +public interface ValueObject { + @JsonIgnore + String value(); +} diff --git a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java index 8e428f7614..cc1cd0160c 100644 --- a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java +++ b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java @@ -29,12 +29,12 @@ public class SetPerspectiveLayoutAction_TestCase { public void setUp() throws Exception { - setPerspectiveLayoutAction = SetPerspectiveLayoutAction.create(projectId, userId, layout); + setPerspectiveLayoutAction = SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, userId, layout); } @Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIf_projectId_IsNull() { - SetPerspectiveLayoutAction.create(null, userId, layout); + SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),null, userId, layout); } @Test @@ -44,22 +44,22 @@ public void shouldReturnSupplied_projectId() { @Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIf_userId_IsNull() { - SetPerspectiveLayoutAction.create(projectId, null, layout); + SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"), projectId, null, layout); } @Test public void shouldReturnSupplied_userId() { - assertThat(setPerspectiveLayoutAction.getUserId(), is(this.userId)); + assertThat(setPerspectiveLayoutAction.userId(), is(this.userId)); } @Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIf_layout_IsNull() { - SetPerspectiveLayoutAction.create(projectId, userId, null); + SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, userId, null); } @Test public void shouldReturnSupplied_layout() { - assertThat(setPerspectiveLayoutAction.getLayout(), is(this.layout)); + assertThat(setPerspectiveLayoutAction.layout(), is(this.layout)); } @Test @@ -74,27 +74,27 @@ public void shouldNotBeEqualToNull() { @Test public void shouldBeEqualToOther() { - assertThat(setPerspectiveLayoutAction, is(SetPerspectiveLayoutAction.create(projectId, userId, layout))); + assertThat(setPerspectiveLayoutAction, is(SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, userId, layout))); } @Test public void shouldNotBeEqualToOtherThatHasDifferent_projectId() { - assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(mock(ProjectId.class), userId, layout)))); + assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),mock(ProjectId.class), userId, layout)))); } @Test public void shouldNotBeEqualToOtherThatHasDifferent_userId() { - assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(projectId, mock(UserId.class), layout)))); + assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, mock(UserId.class), layout)))); } @Test public void shouldNotBeEqualToOtherThatHasDifferent_layout() { - assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(projectId, userId, mock(PerspectiveLayout.class))))); + assertThat(setPerspectiveLayoutAction, is(Matchers.not(SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, userId, mock(PerspectiveLayout.class))))); } @Test public void shouldBeEqualToOtherHashCode() { - assertThat(setPerspectiveLayoutAction.hashCode(), is(SetPerspectiveLayoutAction.create(projectId, userId, layout) + assertThat(setPerspectiveLayoutAction.hashCode(), is(SetPerspectiveLayoutAction.create(ChangeRequestId.get("123"),projectId, userId, layout) .hashCode())); } From 18753d012a00de3009e908c0bdfcd0961e4bc3dc Mon Sep 17 00:00:00 2001 From: silag Date: Fri, 16 Feb 2024 14:57:10 +0200 Subject: [PATCH 03/24] fixed perspective layout action. changed keycloak config. --- .../src/main/module.gwt.xml | 2 +- .../src/main/webapp/WEB-INF/keycloak.json | 2 +- .../shared/perspective/ChangeRequestId.java | 120 ++++++++++++++++-- .../SetPerspectiveLayoutAction.java | 97 +++++++++++--- .../SetPerspectiveLayoutAction_TestCase.java | 4 +- 5 files changed, 186 insertions(+), 39 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/module.gwt.xml b/webprotege-gwt-ui-client/src/main/module.gwt.xml index 5f03af5dd0..1c35ab38a7 100644 --- a/webprotege-gwt-ui-client/src/main/module.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module.gwt.xml @@ -42,6 +42,7 @@ earlier versions of IE. --> + @@ -52,5 +53,4 @@ - diff --git a/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/keycloak.json b/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/keycloak.json index 1fb799c267..1884f8cffd 100644 --- a/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/keycloak.json +++ b/webprotege-gwt-ui-server/src/main/webapp/WEB-INF/keycloak.json @@ -1,6 +1,6 @@ { "realm": "webprotege", - "auth-server-url": "http://keycloak:8080/auth/", + "auth-server-url": "http://webprotege-local.edu/auth/", "ssl-required": "external", "resource": "webprotege", "public-client": true, diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java index d834238eee..ee054f490c 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/ChangeRequestId.java @@ -2,33 +2,125 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import com.google.auto.value.AutoValue; -import com.google.common.annotations.GwtCompatible; -import com.google.common.annotations.GwtIncompatible; import com.google.gwt.user.client.rpc.IsSerializable; +import edu.stanford.bmir.protege.web.shared.annotations.GwtSerializationConstructor; +import edu.stanford.bmir.protege.web.shared.project.ProjectIdFormatException; import edu.stanford.bmir.protege.web.shared.util.UUIDUtil; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.Serializable; +import java.util.Optional; -@AutoValue -@GwtCompatible(serializable = true) -public abstract class ChangeRequestId implements IsSerializable, Serializable { +import static com.google.common.base.MoreObjects.toStringHelper; +import static com.google.common.base.Preconditions.checkNotNull; - @JsonCreator +public class ChangeRequestId implements Serializable, IsSerializable { + + private String id = ""; + + /** + * Constructs a ProjectId. + * + * @param id The lexical Id of the project. Not null. The specified id must be formatted according + * to the regular expression for UUIDs. See {@link UUIDUtil#getIdRegExp()} + * @throws NullPointerException if the id parameter is null. + */ + private ChangeRequestId(@Nonnull String id) throws ProjectIdFormatException { + this.id = checkFormat(checkNotNull(id)); + } + + @GwtSerializationConstructor + private ChangeRequestId() { + } + + public static boolean isWelFormedProjectId(@Nonnull String candidateId) { + return UUIDUtil.isWellFormed(candidateId); + } + + /** + * Checks that the specified string matches the UUID pattern. + * + * @param id The string to check. + * @return The specified string. + * @throws ProjectIdFormatException if the specified string does not match the UUID pattern. + */ @Nonnull - public static ChangeRequestId get(@Nonnull String id) { - if(!UUIDUtil.isWellFormed(id)) { - throw new IllegalArgumentException("Malformed ChangeRequestId. ChangeRequestIds must be UUIDs"); + private static String checkFormat(@Nonnull String id) throws ProjectIdFormatException { + if (!UUIDUtil.isWellFormed(id)) { + throw new ProjectIdFormatException(id); } - return new AutoValue_ChangeRequestId(id); + return id; } /** - * Gets the identifier for this perspective. This is a human readable name. + * Gets a {@link edu.stanford.bmir.protege.web.shared.project.ProjectId} based on the specified UUID string. The string must be formatted as a UUID string + * according to the regular expression returned by {@link UUIDUtil#getIdRegExp()}. The pattern is specified by the + * {@link UUIDUtil#UUID_PATTERN} constant. + * + * @param uuid The UUID lexical form that the project id will be based on. The specified + * {@code uuid} must match the pattern specified by the {@link UUIDUtil#UUID_PATTERN} pattern. Not {@code null}. + * @return The {@link edu.stanford.bmir.protege.web.shared.project.ProjectId} having the specified UUID. Not {@code null}. + * @throws NullPointerException if {@code uuid} is {@code null}. + * @throws ProjectIdFormatException if {@code uuid} does not match the UUID pattern specified by {@link UUIDUtil#UUID_PATTERN}. */ - @JsonValue @Nonnull - public abstract String getId(); + @JsonCreator + public static ChangeRequestId get(@Nonnull String uuid) throws ProjectIdFormatException { + return new ChangeRequestId(uuid); + } + + @Nonnull + public static ChangeRequestId getNil() { + return get(UUIDUtil.getNilUuid()); + } + + public static ChangeRequestId valueOf(@Nonnull String uuid) throws ProjectIdFormatException { + return get(uuid); + } + + + @Nonnull + public static Optional getFromNullable(@Nullable String uuid) throws ProjectIdFormatException { + if (uuid == null || uuid.isEmpty()) { + return Optional.empty(); + } else { + return Optional.of(get(uuid)); + } + } + + @Nonnull + @JsonValue + public String getId() { + return id; + } + @Override + public String toString() { + return toStringHelper("ChangeRequestId").addValue(id).toString(); + } + + @Override + public int hashCode() { + return id == null ? 0 : id.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (obj == this) { + return true; + } + if (!(obj instanceof ChangeRequestId)) { + return false; + } + ChangeRequestId other = (ChangeRequestId) obj; + if (this.id == null) { + return other.id == null; + } + return other.id != null && other.id.equals(this.id); + } } + diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java index a0a50500c2..ab03e2b700 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction.java @@ -1,49 +1,104 @@ package edu.stanford.bmir.protege.web.shared.perspective; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.google.auto.value.AutoValue; -import com.google.common.annotations.GwtCompatible; import com.google.common.base.Objects; +import com.google.gwt.user.client.rpc.IsSerializable; import edu.stanford.bmir.protege.web.shared.dispatch.ProjectAction; -import edu.stanford.bmir.protege.web.shared.project.HasProjectId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.user.UserId; -import javax.validation.constraints.NotNull; +import javax.annotation.Nonnull; + +import java.io.Serializable; import static com.google.common.base.MoreObjects.toStringHelper; +import static com.google.common.base.Preconditions.checkNotNull; /** * Matthew Horridge * Stanford Center for Biomedical Informatics Research * 28/02/16 */ -@AutoValue -@GwtCompatible(serializable = true) @JsonTypeName("webprotege.perspectives.SetPerspectiveLayout") -public abstract class SetPerspectiveLayoutAction implements ProjectAction, ChangeRequest, HasProjectId { - @JsonCreator - public static SetPerspectiveLayoutAction create(@JsonProperty("changeRequestId") @NotNull ChangeRequestId id, - @JsonProperty("projectId") @NotNull ProjectId projectId, - @JsonProperty("userId") @NotNull UserId userId, - @JsonProperty("layout") @NotNull PerspectiveLayout layout) { - return new AutoValue_SetPerspectiveLayoutAction(projectId,id, userId, layout); +public class SetPerspectiveLayoutAction implements ProjectAction, Serializable, IsSerializable { + + private ProjectId projectId; + + private UserId userId; + + private PerspectiveLayout layout; + + private ChangeRequestId changeRequestId; + + /** + * For serialization only + */ + private SetPerspectiveLayoutAction() { } - public abstract UserId userId(); + private SetPerspectiveLayoutAction(ChangeRequestId changeRequestId, ProjectId projectId, UserId userId, PerspectiveLayout layout) { + this.changeRequestId = checkNotNull(changeRequestId); + this.projectId = checkNotNull(projectId); + this.userId = checkNotNull(userId); + this.layout = checkNotNull(layout); + } - public abstract PerspectiveLayout layout(); + public static SetPerspectiveLayoutAction create(ProjectId projectId, UserId userId, PerspectiveLayout layout) { + return new SetPerspectiveLayoutAction(ChangeRequestId.get("123"), projectId, userId, layout); + } + public static SetPerspectiveLayoutAction create(ChangeRequestId changeRequestId, ProjectId projectId, UserId userId, PerspectiveLayout layout) { + return new SetPerspectiveLayoutAction(changeRequestId, projectId, userId, layout); + } + + @Nonnull + public ProjectId getProjectId() { + return projectId; + } + + public UserId getUserId() { + return userId; + } + + public PerspectiveLayout getLayout() { + return layout; + } + + public ChangeRequestId getChangeRequestId() { + return changeRequestId; + } + + public void setChangeRequestId(ChangeRequestId changeRequestId) { + this.changeRequestId = changeRequestId; + } + + @Override + public int hashCode() { + return Objects.hashCode(projectId, userId, layout); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof SetPerspectiveLayoutAction)) { + return false; + } + SetPerspectiveLayoutAction other = (SetPerspectiveLayoutAction) obj; + return this.projectId.equals(other.projectId) + && this.userId.equals(other.userId) + && this.changeRequestId.equals(other.changeRequestId) + && this.layout.equals(other.layout); + } @Override public String toString() { return toStringHelper("SetPerspectiveLayoutAction") - .addValue(changeRequestId()) - .addValue(getProjectId()) - .addValue(userId()) - .addValue(layout()) + .addValue(projectId) + .addValue(userId) + .addValue(layout) + .addValue(changeRequestId) .toString(); } } diff --git a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java index cc1cd0160c..a4741e046a 100644 --- a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java +++ b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/perspective/SetPerspectiveLayoutAction_TestCase.java @@ -49,7 +49,7 @@ public void shouldThrowNullPointerExceptionIf_userId_IsNull() { @Test public void shouldReturnSupplied_userId() { - assertThat(setPerspectiveLayoutAction.userId(), is(this.userId)); + assertThat(setPerspectiveLayoutAction.getUserId(), is(this.userId)); } @Test(expected = NullPointerException.class) @@ -59,7 +59,7 @@ public void shouldThrowNullPointerExceptionIf_layout_IsNull() { @Test public void shouldReturnSupplied_layout() { - assertThat(setPerspectiveLayoutAction.layout(), is(this.layout)); + assertThat(setPerspectiveLayoutAction.getLayout(), is(this.layout)); } @Test From 50b68ee2409357182e5f5eb328e5e2dbd6a17a63 Mon Sep 17 00:00:00 2001 From: silag Date: Fri, 15 Mar 2024 14:14:18 +0200 Subject: [PATCH 04/24] removed unused logs --- .../protege/web/client/dispatch/DispatchServiceManager.java | 1 - .../web/server/dispatch/impl/DispatchServiceExecutorImpl.java | 3 --- .../bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java | 2 -- .../bmir/protege/web/server/auth/PerformLoginHandler.java | 1 - .../bmir/protege/web/server/dispatch/DispatchServlet.java | 2 -- .../bmir/protege/web/server/filter/WebProtegeWebAppFilter.java | 1 - 6 files changed, 10 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java index b156d3fcaa..79357b7dd0 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java @@ -151,7 +151,6 @@ public , R extends Result> void execute(A action, final Disp private , R extends Result> void execAction(A action, DispatchServiceCallback callback) { requestCount++; logAction(action); - logger.info("ALEX din execAction " + action.getClass() + " async " + async.getClass()); async.executeAction(action, new AsyncCallbackProxy(action, callback)); } diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java index f1e6d1f034..0c611de01d 100644 --- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java +++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java @@ -51,7 +51,6 @@ public DispatchServiceExecutorImpl(HttpClient httpClient, @Override public , R extends Result> DispatchServiceResultContainer execute(A action, ExecutionContext executionContext) throws ActionExecutionException, PermissionDeniedException { try { - logger.info("ALEX din executroIMpl " + action.getClass()); var result = sendRequest(action, executionContext); return DispatchServiceResultContainer.create(result); } @@ -71,7 +70,6 @@ public , R extends Result> DispatchServiceResultContainer ex private , R extends Result> R sendRequest(A action, ExecutionContext executionContext) throws IOException, InterruptedException { // Workaround - logger.info("ALEX in send request " + action.getClass()); if(action instanceof GetProjectEventsAction) { return (R) GetProjectEventsResult.create(EventList.create(((GetProjectEventsAction) action).getSinceTag(), ImmutableList.of(), @@ -80,7 +78,6 @@ private , R extends Result> R sendRequest(A action, try { var httpRequest = requestBuilder.getHttpRequestForAction(action, executionContext); - logger.info("ALEX in send request httpRequest " + httpRequest); var httpResponse = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofString()); diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java index 1f4a041c84..2bc1963cea 100644 --- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java +++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/rpc/JsonRpcHttpRequestBuilder.java @@ -47,8 +47,6 @@ public , R extends Result> HttpRequest getHttpRequestForAct .setHeader(CONTENT_TYPE, APPLICATION_JSON); var jwt = executionContext.getToken(); builder.setHeader("Authorization", "Bearer " + jwt); - logger.info("ALEX action " + action.getClass() + " body " + requestBody + " uri " + jsonRpcEndPoint.getUri() + " builder " +builder); - return builder.build(); } diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/auth/PerformLoginHandler.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/auth/PerformLoginHandler.java index c40e842f28..1fac7e30b0 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/auth/PerformLoginHandler.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/auth/PerformLoginHandler.java @@ -1,6 +1,5 @@ package edu.stanford.bmir.protege.web.server.auth; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import edu.stanford.bmir.protege.web.server.session.UserToken; import edu.stanford.bmir.protege.web.shared.app.UserInSession; diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java index 7eb342bbac..1907f4ec97 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/DispatchServlet.java @@ -37,7 +37,6 @@ public DispatchServlet(@Nonnull WebProtegeLogger logger, @Override public DispatchServiceResultContainer executeAction(Action action) throws ActionExecutionException, PermissionDeniedException { - logger.info("Alex tocmai ce intru in execute action " + action.getClass()); var request = getThreadLocalRequest(); var principal = (KeycloakPrincipal) request.getUserPrincipal(); var context = principal.getKeycloakSecurityContext(); @@ -45,7 +44,6 @@ public DispatchServiceResultContainer executeAction(Action action) throws Action var userId = UserId.valueOf(idToken.getPreferredUsername()); var executionContext = new ExecutionContext(userId, context.getTokenString()); - logger.info("ALEX execute with executor " + executor.getClass() + " principal " + principal + " request " + request + " userid " + userId + "context " + executionContext + " action " + action.getClass()) ; return executor.execute(action, executionContext); } diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java index e12958cf45..199ae0b708 100644 --- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java +++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/filter/WebProtegeWebAppFilter.java @@ -64,7 +64,6 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha if(request instanceof HttpServletRequest) { HttpServletRequest httpReq = (HttpServletRequest) request; HttpServletResponse httpRes = (HttpServletResponse) response; - logger.info("ALEX " + httpReq.getUserPrincipal().toString()); doHttpFilter(httpReq, httpRes); } From 94130b28afb3b158a6a4f7516008450f8251728d Mon Sep 17 00:00:00 2001 From: silag Date: Mon, 18 Mar 2024 11:14:33 +0200 Subject: [PATCH 05/24] removed unused logs, removed unused dependencies --- .../web/client/dispatch/DispatchServiceManager.java | 1 - webprotege-gwt-ui-client/src/main/module-dev.gwt.xml | 8 +------- webprotege-gwt-ui-client/src/main/module.gwt.xml | 4 ++-- .../protege/web/shared/lang/DictionaryLanguageUsage.java | 9 ++++++--- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java index 79357b7dd0..67e6f39adb 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/dispatch/DispatchServiceManager.java @@ -26,7 +26,6 @@ import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.user.UserDetails; import edu.stanford.bmir.protege.web.shared.user.UserId; -import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; import javax.inject.Inject; diff --git a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml index 8e43615d7c..1a36537a31 100644 --- a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml @@ -23,8 +23,6 @@ - - @@ -45,11 +43,7 @@ --> - - - - - + diff --git a/webprotege-gwt-ui-client/src/main/module.gwt.xml b/webprotege-gwt-ui-client/src/main/module.gwt.xml index 1c35ab38a7..c480fb76c3 100644 --- a/webprotege-gwt-ui-client/src/main/module.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module.gwt.xml @@ -41,8 +41,7 @@ Trim down the permutations that are compiled. We need CSS3 features and so don't support earlier versions of IE. --> - - + @@ -53,4 +52,5 @@ + diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/lang/DictionaryLanguageUsage.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/lang/DictionaryLanguageUsage.java index ce9c44ec8e..dae20ce516 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/lang/DictionaryLanguageUsage.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/lang/DictionaryLanguageUsage.java @@ -1,5 +1,7 @@ package edu.stanford.bmir.protege.web.shared.lang; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.auto.value.AutoValue; import com.google.common.annotations.GwtCompatible; import edu.stanford.bmir.protege.web.shared.shortform.DictionaryLanguage; @@ -15,9 +17,10 @@ @GwtCompatible(serializable = true) public abstract class DictionaryLanguageUsage { - public static DictionaryLanguageUsage get(@Nonnull DictionaryLanguage language, - int referenceCount) { - return new AutoValue_DictionaryLanguageUsage(language, referenceCount); + @JsonCreator + public static DictionaryLanguageUsage get(@Nonnull @JsonProperty("dictionaryLanguage") DictionaryLanguage dictionaryLanguage, + @JsonProperty("referenceCount") int referenceCount) { + return new AutoValue_DictionaryLanguageUsage(dictionaryLanguage, referenceCount); } @Nonnull From cd11319a678299156b91390021eeed7399f949d6 Mon Sep 17 00:00:00 2001 From: Gheorghe Soimu Date: Thu, 28 Mar 2024 13:17:55 +0200 Subject: [PATCH 06/24] something that does not work --- .../bmir/protege/web/client/Messages.java | 4 + .../bmir/protege/web/client/WebProtege.java | 1 + .../ClassHierarchyPortletPresenter.java | 17 + .../inject/ClientApplicationModule.java | 98 +- .../protege/web/client/searchIcd/ECT.java | 19 + .../web/client/searchIcd/SearchIcdModal.java | 64 + .../client/searchIcd/SearchIcdPresenter.java | 142 + .../web/client/searchIcd/SearchIcdView.java | 35 + .../client/searchIcd/SearchIcdViewImpl.java | 172 + .../client/searchIcd/SearchIcdViewImpl.ui.xml | 64 + .../web/resources/WebProtegeClientBundle.java | 533 + .../protege/web/resources/icd11ect-1.7.css | 1984 ++ .../protege/web/resources/icd11ect-1.7.js | 26165 ++++++++++++++++ .../src/main/module.gwt.xml | 3 +- .../src/main/webapp/WebProtege.jsp | 5 +- .../src/main/webapp/css/icd11ect-1.7.css | 1980 ++ .../src/main/webapp/js/ect/icd11ect-1.7.js | 26165 ++++++++++++++++ 17 files changed, 57440 insertions(+), 11 deletions(-) create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/ECT.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.css create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.js create mode 100644 webprotege-gwt-ui-server/src/main/webapp/css/icd11ect-1.7.css create mode 100644 webprotege-gwt-ui-server/src/main/webapp/js/ect/icd11ect-1.7.js diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/Messages.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/Messages.java index 2f83fa1a0f..a50178bcc1 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/Messages.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/Messages.java @@ -816,6 +816,10 @@ public interface Messages extends com.google.gwt.i18n.client.Messages { @Key("search") String search(); + @DefaultMessage("Search Icd") + @Key("searchIcd") + String searchIcd(); + @DefaultMessage("Search for Class") @Key("search.class") diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/WebProtege.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/WebProtege.java index 90a39b4559..b05299d944 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/WebProtege.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/WebProtege.java @@ -60,6 +60,7 @@ private void buildUI() { BUNDLE.modal().ensureInjected(); BUNDLE.glyphs().ensureInjected(); BUNDLE.primitiveData().ensureInjected(); + BUNDLE.icd11().ensureInjected(); WidgetMapClientBundle.BUNDLE.style().ensureInjected(); WebProtegeClientInjector injector = WebProtegeClientInjector.get(); diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java index 744380fb90..a9a503a3d3 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java @@ -13,6 +13,7 @@ import edu.stanford.bmir.protege.web.client.portlet.PortletAction; import edu.stanford.bmir.protege.web.client.portlet.PortletUi; import edu.stanford.bmir.protege.web.client.search.SearchModal; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchIcdModal; import edu.stanford.bmir.protege.web.client.selection.SelectionModel; import edu.stanford.bmir.protege.web.client.tag.TagVisibilityPresenter; import edu.stanford.bmir.protege.web.shared.entity.EntityNode; @@ -51,12 +52,17 @@ public class ClassHierarchyPortletPresenter extends AbstractWebProtegePortletPre @Nonnull private final SearchModal searchModal; + @Nonnull + private final SearchIcdModal searchIcdModal; + private final Messages messages; private final EntityHierarchyModel hierarchyModel; @Nonnull private final EntityNodeHtmlRenderer renderer; + private final UIAction searchActionIcd; + private final UIAction createClassAction; private final UIAction deleteClassAction; @@ -100,6 +106,7 @@ public class ClassHierarchyPortletPresenter extends AbstractWebProtegePortletPre public ClassHierarchyPortletPresenter(@Nonnull final ProjectId projectId, @Nonnull SelectionModel selectionModel, @Nonnull SearchModal searchModal, + @Nonnull SearchIcdModal searchIcdModal, @Nonnull Messages messages, @Nonnull EntityHierarchyModel hierarchyModel, @Nonnull EntityHierarchyContextMenuPresenterFactory contextMenuPresenterFactory, @@ -117,6 +124,7 @@ public ClassHierarchyPortletPresenter(@Nonnull final ProjectId projectId, @Nonnull DispatchServiceManager dispatch) { super(selectionModel, projectId, displayNameRenderer, dispatch); this.searchModal = searchModal; + this.searchIcdModal = searchIcdModal; this.messages = checkNotNull(messages); this.hierarchyModel = checkNotNull(hierarchyModel); this.contextMenuPresenterFactory = checkNotNull(contextMenuPresenterFactory); @@ -132,6 +140,9 @@ public ClassHierarchyPortletPresenter(@Nonnull final ProjectId projectId, "wp-btn-g--delete-class wp-btn-g--delete", this::handleDelete); + this.searchActionIcd = new PortletAction(messages.searchIcd(), + "wp-btn-g--search", + this::handleIcdSearch); this.searchAction = new PortletAction(messages.search(), "wp-btn-g--search", this::handleSearch); @@ -163,6 +174,7 @@ public void startPortlet(@Nonnull PortletUi portletUi, @Nonnull WebProtegeEventBus eventBus) { portletUi.addAction(createClassAction); portletUi.addAction(deleteClassAction); + portletUi.addAction(searchActionIcd); portletUi.addAction(searchAction); portletUi.setWidget(treeWidget); portletUi.setFilterView(filterView); @@ -249,6 +261,11 @@ private void handleSearch() { searchModal.showModal(); } + private void handleIcdSearch() { + searchIcdModal.setEntityTypes(CLASS); + searchIcdModal.showModal(); + } + private void selectAndExpandPath(Path entityPath) { treeWidget.setSelected(entityPath, true, () -> treeWidget.setExpanded(entityPath)); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientApplicationModule.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientApplicationModule.java index 3a04af3f1d..68c73c8716 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientApplicationModule.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientApplicationModule.java @@ -15,7 +15,20 @@ import dagger.Provides; import edu.stanford.bmir.protege.web.client.FormsMessages; import edu.stanford.bmir.protege.web.client.Messages; -import edu.stanford.bmir.protege.web.client.app.*; +import edu.stanford.bmir.protege.web.client.app.ApplicationUrlView; +import edu.stanford.bmir.protege.web.client.app.ApplicationUrlViewImpl; +import edu.stanford.bmir.protege.web.client.app.ApplicationView; +import edu.stanford.bmir.protege.web.client.app.ApplicationViewImpl; +import edu.stanford.bmir.protege.web.client.app.EmailNotificationSettingsView; +import edu.stanford.bmir.protege.web.client.app.EmailNotificationSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.app.ForbiddenView; +import edu.stanford.bmir.protege.web.client.app.ForbiddenViewImpl; +import edu.stanford.bmir.protege.web.client.app.GlobalPermissionSettingsView; +import edu.stanford.bmir.protege.web.client.app.GlobalPermissionSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.app.NothingSelectedView; +import edu.stanford.bmir.protege.web.client.app.NothingSelectedViewImpl; +import edu.stanford.bmir.protege.web.client.app.SystemDetailsView; +import edu.stanford.bmir.protege.web.client.app.SystemDetailsViewImpl; import edu.stanford.bmir.protege.web.client.chgpwd.ChangePasswordView; import edu.stanford.bmir.protege.web.client.chgpwd.ChangePasswordViewImpl; import edu.stanford.bmir.protege.web.client.chgpwd.ResetPasswordView; @@ -24,7 +37,12 @@ import edu.stanford.bmir.protege.web.client.color.ColorSwatchViewImpl; import edu.stanford.bmir.protege.web.client.color.ColorSwatchWellView; import edu.stanford.bmir.protege.web.client.color.ColorSwatchWellViewImpl; -import edu.stanford.bmir.protege.web.client.dispatch.*; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchErrorMessageDisplay; +import edu.stanford.bmir.protege.web.client.dispatch.MessageBoxErrorDisplay; +import edu.stanford.bmir.protege.web.client.dispatch.ProgressDisplay; +import edu.stanford.bmir.protege.web.client.dispatch.ProgressDisplayImpl; +import edu.stanford.bmir.protege.web.client.dispatch.SignInRequiredHandler; +import edu.stanford.bmir.protege.web.client.dispatch.SignInRequiredHandlerImpl; import edu.stanford.bmir.protege.web.client.editor.EditorPortletView; import edu.stanford.bmir.protege.web.client.editor.EditorPortletViewImpl; import edu.stanford.bmir.protege.web.client.entity.CreateEntityFormView; @@ -33,7 +51,12 @@ import edu.stanford.bmir.protege.web.client.entity.DeprecatedEntitiesViewImpl; import edu.stanford.bmir.protege.web.client.filter.FilterView; import edu.stanford.bmir.protege.web.client.filter.FilterViewImpl; -import edu.stanford.bmir.protege.web.client.help.*; +import edu.stanford.bmir.protege.web.client.help.HelpView; +import edu.stanford.bmir.protege.web.client.help.HelpViewImpl; +import edu.stanford.bmir.protege.web.client.help.ShowAboutBoxHandler; +import edu.stanford.bmir.protege.web.client.help.ShowAboutBoxHandlerImpl; +import edu.stanford.bmir.protege.web.client.help.ShowUserGuideHandler; +import edu.stanford.bmir.protege.web.client.help.ShowUserGuideHandlerImpl; import edu.stanford.bmir.protege.web.client.issues.CommentedEntitiesView; import edu.stanford.bmir.protege.web.client.issues.CommentedEntitiesViewImpl; import edu.stanford.bmir.protege.web.client.lang.LangCodesProvider; @@ -52,8 +75,20 @@ import edu.stanford.bmir.protege.web.client.mail.EmailAddressEditorImpl; import edu.stanford.bmir.protege.web.client.pagination.PaginatorView; import edu.stanford.bmir.protege.web.client.pagination.PaginatorViewImpl; -import edu.stanford.bmir.protege.web.client.perspective.*; -import edu.stanford.bmir.protege.web.client.place.*; +import edu.stanford.bmir.protege.web.client.perspective.CreateFreshPerspectiveRequestHandler; +import edu.stanford.bmir.protege.web.client.perspective.CreateFreshPerspectiveRequestHandlerImpl; +import edu.stanford.bmir.protege.web.client.perspective.EmptyPerspectiveView; +import edu.stanford.bmir.protege.web.client.perspective.EmptyPerspectiveViewImpl; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveSwitcherView; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveSwitcherViewImpl; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveView; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveViewImpl; +import edu.stanford.bmir.protege.web.client.place.PlaceHistoryHandlerProvider; +import edu.stanford.bmir.protege.web.client.place.WebProtegeActivityManager; +import edu.stanford.bmir.protege.web.client.place.WebProtegeActivityMapper; +import edu.stanford.bmir.protege.web.client.place.WebProtegePlaceHistoryMapper; +import edu.stanford.bmir.protege.web.client.place.WindowTitleUpdater; +import edu.stanford.bmir.protege.web.client.place.WindowTitleUpdaterImpl; import edu.stanford.bmir.protege.web.client.portlet.PortletChooserView; import edu.stanford.bmir.protege.web.client.portlet.PortletChooserViewImpl; import edu.stanford.bmir.protege.web.client.portlet.PortletUi; @@ -62,24 +97,64 @@ import edu.stanford.bmir.protege.web.client.primitive.PrimitiveDataEditorImageViewImpl; import edu.stanford.bmir.protege.web.client.progress.BusyView; import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; -import edu.stanford.bmir.protege.web.client.project.*; +import edu.stanford.bmir.protege.web.client.project.ActiveProjectManager; +import edu.stanford.bmir.protege.web.client.project.ActiveProjectManagerImpl; +import edu.stanford.bmir.protege.web.client.project.CreateNewProjectView; +import edu.stanford.bmir.protege.web.client.project.CreateNewProjectViewImpl; +import edu.stanford.bmir.protege.web.client.project.EditProjectPrefixDeclarationsHandler; +import edu.stanford.bmir.protege.web.client.project.EditProjectPrefixDeclarationsHandlerImpl; +import edu.stanford.bmir.protege.web.client.project.ProjectMenuView; +import edu.stanford.bmir.protege.web.client.project.ProjectMenuViewImpl; +import edu.stanford.bmir.protege.web.client.project.ProjectPrefixDeclarationsView; +import edu.stanford.bmir.protege.web.client.project.ProjectPrefixDeclarationsViewImpl; +import edu.stanford.bmir.protege.web.client.project.ProjectView; +import edu.stanford.bmir.protege.web.client.project.ProjectViewImpl; import edu.stanford.bmir.protege.web.client.projectlist.AvailableProjectView; import edu.stanford.bmir.protege.web.client.projectlist.AvailableProjectViewImpl; -import edu.stanford.bmir.protege.web.client.projectmanager.*; +import edu.stanford.bmir.protege.web.client.projectmanager.CreateProjectRequestHandler; +import edu.stanford.bmir.protege.web.client.projectmanager.CreateProjectRequestHandlerImpl; +import edu.stanford.bmir.protege.web.client.projectmanager.DownloadProjectRequestHandler; +import edu.stanford.bmir.protege.web.client.projectmanager.DownloadProjectRequestHandlerImpl; +import edu.stanford.bmir.protege.web.client.projectmanager.LoadProjectInNewWindowRequestHandler; +import edu.stanford.bmir.protege.web.client.projectmanager.LoadProjectInNewWindowRequestHandlerImpl; +import edu.stanford.bmir.protege.web.client.projectmanager.LoadProjectRequestHandler; +import edu.stanford.bmir.protege.web.client.projectmanager.LoadProjectRequestHandlerImpl; +import edu.stanford.bmir.protege.web.client.projectmanager.ProjectManagerView; +import edu.stanford.bmir.protege.web.client.projectmanager.ProjectManagerViewImpl; +import edu.stanford.bmir.protege.web.client.projectmanager.TrashManagerRequestHandler; +import edu.stanford.bmir.protege.web.client.projectmanager.TrashManagerRequestHandlerImpl; import edu.stanford.bmir.protege.web.client.search.SearchView; import edu.stanford.bmir.protege.web.client.search.SearchViewImpl; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchIcdView; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchIcdViewImpl; import edu.stanford.bmir.protege.web.client.settings.SettingsSectionViewContainer; import edu.stanford.bmir.protege.web.client.settings.SettingsSectionViewContainerImpl; import edu.stanford.bmir.protege.web.client.settings.SettingsView; import edu.stanford.bmir.protege.web.client.settings.SettingsViewImpl; import edu.stanford.bmir.protege.web.client.signup.SignUpView; import edu.stanford.bmir.protege.web.client.signup.SignUpViewImpl; -import edu.stanford.bmir.protege.web.client.tag.*; +import edu.stanford.bmir.protege.web.client.tag.EntityTagsSelectorView; +import edu.stanford.bmir.protege.web.client.tag.EntityTagsSelectorViewImpl; +import edu.stanford.bmir.protege.web.client.tag.ProjectTagsView; +import edu.stanford.bmir.protege.web.client.tag.ProjectTagsViewImpl; +import edu.stanford.bmir.protege.web.client.tag.TagListView; +import edu.stanford.bmir.protege.web.client.tag.TagListViewImpl; +import edu.stanford.bmir.protege.web.client.tag.TagView; +import edu.stanford.bmir.protege.web.client.tag.TagViewImpl; import edu.stanford.bmir.protege.web.client.topbar.GoToHomeView; import edu.stanford.bmir.protege.web.client.topbar.GoToToHomeViewImpl; import edu.stanford.bmir.protege.web.client.topbar.TopBarView; import edu.stanford.bmir.protege.web.client.topbar.TopBarViewImpl; -import edu.stanford.bmir.protege.web.client.user.*; +import edu.stanford.bmir.protege.web.client.user.ChangeEmailAddressHandler; +import edu.stanford.bmir.protege.web.client.user.ChangeEmailAddressHandlerImpl; +import edu.stanford.bmir.protege.web.client.user.ChangePasswordHandler; +import edu.stanford.bmir.protege.web.client.user.ChangePasswordHandlerImpl; +import edu.stanford.bmir.protege.web.client.user.LoggedInUser; +import edu.stanford.bmir.protege.web.client.user.LoggedInUserProvider; +import edu.stanford.bmir.protege.web.client.user.LoggedInUserView; +import edu.stanford.bmir.protege.web.client.user.LoggedInUserViewImpl; +import edu.stanford.bmir.protege.web.client.user.SignOutRequestHandler; +import edu.stanford.bmir.protege.web.client.user.SignOutRequestHandlerImpl; import edu.stanford.bmir.protege.web.resources.WebProtegeClientBundle; import edu.stanford.bmir.protege.web.shared.auth.Md5MessageDigestAlgorithm; import edu.stanford.bmir.protege.web.shared.auth.MessageDigestAlgorithm; @@ -368,6 +443,11 @@ SearchView providesSearchView(SearchViewImpl impl) { return impl; } + @Provides + SearchIcdView providesSearchViewIcd(SearchIcdViewImpl impl) { + return impl; + } + @Provides DeprecatedEntitiesView provideDeprecatedEntitiesView(DeprecatedEntitiesViewImpl impl) { return impl; diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/ECT.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/ECT.java new file mode 100644 index 0000000000..5f8b845cd9 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/ECT.java @@ -0,0 +1,19 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +import edu.stanford.bmir.protege.web.client.d3.Selection; +import jsinterop.annotations.JsMethod; +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +import java.util.HashMap; +import java.util.Map; + +//@JsType(isNative = true, namespace = JsPackage.GLOBAL) +public class ECT { + + public static native void configure(Map opts); + +// @JsMethod(name = "search") + public static native void triggerSearch(String iNo, String query); +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java new file mode 100644 index 0000000000..2a7b472683 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java @@ -0,0 +1,64 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +import edu.stanford.bmir.protege.web.client.Messages; +import edu.stanford.bmir.protege.web.client.library.dlg.DialogButton; +import edu.stanford.bmir.protege.web.client.library.modal.ModalManager; +import edu.stanford.bmir.protege.web.client.library.modal.ModalPresenter; +import edu.stanford.bmir.protege.web.client.selection.SelectionModel; +import org.semanticweb.owlapi.model.EntityType; + +import javax.annotation.Nonnull; +import javax.inject.Inject; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 5 Oct 2018 + */ +public class SearchIcdModal { + + @Nonnull + private final ModalManager modalManager; + + @Nonnull + private final SearchIcdPresenter searchIcdPresenter; + + @Nonnull + private final Messages messages; + + @Nonnull + private final SelectionModel selectionModel; + + @Nonnull + private String title; + + @Inject + public SearchIcdModal(@Nonnull ModalManager modalManager, @Nonnull SearchIcdPresenter searchIcdPresenter, @Nonnull Messages messages, @Nonnull SelectionModel selectionModel) { + this.modalManager = modalManager; + this.searchIcdPresenter = searchIcdPresenter; + this.messages = messages; + this.selectionModel = selectionModel; + title = messages.search(); + } + + public void setEntityTypes(EntityType... entityTypes) { + searchIcdPresenter.setEntityTypes(entityTypes); + if(entityTypes.length == 1) { + title = messages.searchFor(entityTypes[0].getPrintName()); + } + } + + public void showModal() { + ModalPresenter modalPresenter = modalManager.createPresenter(); + modalPresenter.setTitle(title); + modalPresenter.setView(searchIcdPresenter.getView()); + modalPresenter.setEscapeButton(DialogButton.CANCEL); + modalPresenter.setPrimaryButton(DialogButton.SELECT); + modalPresenter.setButtonHandler(DialogButton.SELECT, closer -> { + closer.closeModal(); + }); + searchIcdPresenter.start(); + searchIcdPresenter.setAcceptKeyHandler(modalPresenter::accept); + modalManager.showModal(modalPresenter); + } +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java new file mode 100644 index 0000000000..e3e20eaed7 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java @@ -0,0 +1,142 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +import com.google.gwt.user.client.Timer; +import com.google.gwt.user.client.ui.IsWidget; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager; +import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; +import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; +import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; +import edu.stanford.bmir.protege.web.client.search.SearchResultChosenHandler; +import edu.stanford.bmir.protege.web.shared.project.ProjectId; +import edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchResult; +import org.semanticweb.owlapi.model.EntityType; + +import javax.annotation.Nonnull; +import javax.inject.Inject; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + +import static com.google.common.base.Preconditions.checkNotNull; + + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 21 Apr 2017 + */ +public class SearchIcdPresenter implements HasInitialFocusable { + + private static final int SEARCH_DELAY_MILLIS = 900; + + private static final int PAGE_CHANGE_DELAY_MILLIS = 250; + + private final ProjectId projectId; + + private final SearchIcdView view; + + private final Set> entityTypes = new HashSet<>(); + + private final DispatchServiceManager dispatchServiceManager; + + private final Timer searchTimer = new Timer() { + @Override + public void run() { + performSearch(); + } + }; + + private final Timer pageChangeTimer = new Timer() { + @Override + public void run() { + performSearch(); + } + }; + + + private SearchResultChosenHandler searchResultChosenHandler; + + private AcceptKeyHandler acceptKeyHandler = () -> {}; + + + + @Inject + public SearchIcdPresenter(@Nonnull ProjectId projectId, + @Nonnull SearchIcdView view, + @Nonnull DispatchServiceManager dispatchServiceManager) { + this.projectId = projectId; + this.view = view; + this.dispatchServiceManager = dispatchServiceManager; + } + + public void start() { + view.setSearchStringChangedHandler(() -> { + restartSearchTimer(); + }); + view.setAcceptKeyHandler(this::handleAcceptKey); +// Map opts = new HashMap<>(); +// +// opts.put("apiServerUrl", "https://icd11restapi-developer-test.azurewebsites.net"); +// ECT.configure(opts); + } + + public void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler) { + this.acceptKeyHandler = checkNotNull(acceptKeyHandler); + } + + private void handleAcceptKey() { + this.acceptKeyHandler.handleAcceptKey(); + } + + + private void restartSearchTimer() { + searchTimer.cancel(); + searchTimer.schedule(SEARCH_DELAY_MILLIS); + } + + private void restartPageChangeTimer() { + pageChangeTimer.cancel(); + pageChangeTimer.schedule(PAGE_CHANGE_DELAY_MILLIS); + } + + public void setSearchResultChosenHandler(SearchResultChosenHandler handler) { + searchResultChosenHandler = checkNotNull(handler); + } + + public IsWidget getView() { + return view; + } + + @Override + public Optional getInitialFocusable() { + return view.getInitialFocusable(); + } + + public void setEntityTypes(EntityType ... entityTypes) { + this.entityTypes.clear(); + this.entityTypes.addAll(Arrays.asList(entityTypes)); + } + + private void performSearch() { + if(view.getSearchString().length() < 1) { + triggerSearch(view.getSearchString()); +// ect.triggerSearch("1", view.getSearchString()); +// ECT.triggerSearch("1", view.getSearchString()); + } + } + + private void displaySearchResult(PerformEntitySearchResult result) { + if(!view.getSearchString().equals(result.getSearchString())) { + return; + } + } + + public static native void triggerSearch(String query) /*-{ + $wnd.ECT.Handler.search("1", query); + }-*/; + + +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java new file mode 100644 index 0000000000..26cd433c6b --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java @@ -0,0 +1,35 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +import com.google.gwt.user.client.ui.IsWidget; +import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; +import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; +import edu.stanford.bmir.protege.web.client.progress.HasBusy; +import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; + +import javax.annotation.Nonnull; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 21 Apr 2017 + */ +public interface SearchIcdView extends HasBusy, IsWidget, HasInitialFocusable { + + interface IncrementSelectionHandler { + void handleIncrementSelection(); + } + + interface DecrementSelectionHandler { + void handleDecrementSelection(); + } + + void setIncrementSelectionHandler(@Nonnull IncrementSelectionHandler handler); + + void setDecrementSelectionHandler(@Nonnull DecrementSelectionHandler handler); + + void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler); + + String getSearchString(); + + void setSearchStringChangedHandler(SearchStringChangedHandler handler); +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java new file mode 100644 index 0000000000..8e8553d67f --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java @@ -0,0 +1,172 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.KeyCodes; +import com.google.gwt.event.dom.client.KeyDownEvent; +import com.google.gwt.event.dom.client.KeyUpEvent; +import com.google.gwt.uibinder.client.UiBinder; +import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.uibinder.client.UiHandler; +import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.HTMLPanel; +import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; +import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; +import edu.stanford.bmir.protege.web.client.library.text.PlaceholderTextBox; +import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; +import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; + +import javax.annotation.Nonnull; +import javax.inject.Inject; +import java.util.Optional; +import java.util.logging.Logger; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 21 Apr 2017 + */ +public class SearchIcdViewImpl extends Composite implements SearchIcdView { + + + private final static java.util.logging.Logger logger = Logger.getLogger("DispatchServiceManager"); + + private static SearchViewIcdImplUiBinder ourUiBinder = GWT.create(SearchViewIcdImplUiBinder.class); + + @UiField + protected PlaceholderTextBox searchStringField; + + @Nonnull + private IncrementSelectionHandler incrementSelectionHandler = () -> { + }; + + @Nonnull + private DecrementSelectionHandler decrementSelectionHandler = () -> { + }; + + @Nonnull + private SearchStringChangedHandler searchStringChangedHandler = () -> { + }; + + @Nonnull + private AcceptKeyHandler acceptKeyHandler = () -> { + }; + + private String previousSearchString = ""; + + + @UiField + BusyViewImpl busyView; + @UiField + HTMLPanel ectElement; + + @Inject + public SearchIcdViewImpl() { + initWidget(ourUiBinder.createAndBindUi(this)); + Element element = searchStringField.getElement(); + element.setPropertyString("autocomplete", "off"); + element.setPropertyString("autocorrect", "off"); + element.setPropertyString("autocapitalize", "off"); + element.setPropertyString("spellcheck", "off"); + + ectElement.getElement().setAttribute("data-ctw-ino", "1"); + } + + public native void initEct(); /*-{ + + console.log("i'm here in initECT"); + + const mySettings = { + apiServerUrl: "https://icd11restapi-developer-test.azurewebsites.net", + simplifiedMode: false, + popupMode: false, + icdLinearization: "foundation", + autoBind: false, + apiSecured: false + }; + +// configure the ECT Handler + ECT.Handler.configure(mySettings); + }-*/ + + @UiHandler("searchStringField") + protected void handleSearchStringFileKeyUp(KeyUpEvent event) { + int keyCode = event.getNativeEvent().getKeyCode(); + if (keyCode != KeyCodes.KEY_UP && keyCode != KeyCodes.KEY_DOWN && keyCode != KeyCodes.KEY_ENTER) { + performSearchIfChanged(); + } + } + + private void performSearchIfChanged() { + String searchString = searchStringField.getText(); + if (!previousSearchString.equals(searchString)) { + previousSearchString = searchString; + searchStringChangedHandler.handleSearchStringChanged(); + } + } + + @Override + public void setIncrementSelectionHandler(@Nonnull IncrementSelectionHandler handler) { + incrementSelectionHandler = checkNotNull(handler); + } + + @Override + public void setDecrementSelectionHandler(@Nonnull DecrementSelectionHandler handler) { + decrementSelectionHandler = checkNotNull(handler); + } + + @Override + public void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler) { + this.acceptKeyHandler = checkNotNull(acceptKeyHandler); + } + + @UiHandler("searchStringField") + protected void handleSearchStringFieldKeyDown(KeyDownEvent event) { + if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_DOWN) { + event.preventDefault(); + incrementSelectionHandler.handleIncrementSelection(); + } else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_UP) { + event.preventDefault(); + decrementSelectionHandler.handleDecrementSelection(); + } else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { + event.preventDefault(); + acceptKeyHandler.handleAcceptKey(); + } else { + performSearchIfChanged(); + } + } + + @Override + public Optional getInitialFocusable() { + return Optional.of(() -> searchStringField.setFocus(true)); + } + + @Override + public String getSearchString() { + return searchStringField.getText(); + } + + @Override + public void setSearchStringChangedHandler(SearchStringChangedHandler handler) { + this.searchStringChangedHandler = handler; + } + + @Override + protected void onAttach() { + super.onAttach(); + searchStringField.setFocus(true); + initEct(); + logger.info("sunt apelat searchview"); + } + + @Override + public void setBusy(boolean busy) { + busyView.setVisible(busy); + } + + interface SearchViewIcdImplUiBinder extends UiBinder { + + } +} \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml new file mode 100644 index 0000000000..81fd924328 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml @@ -0,0 +1,64 @@ + + + + + .main { + display: flex; + flex-direction: column; + align-items: stretch; + } + + .searchField { + box-sizing: border-box; + } + + .helpText { + } + + .main strong { + background-color: #ffea8b; + color: #000; + } + + .busyView { + width: 100%; + height: 100%; + } + + .langTagFilter { + flex-basis: 100px; + flex-grow: 1; + flex-shrink: 1; + } + + .searchFilter { + flex-basis: 100px; + flex-grow: 1; + flex-shrink: 1; + } + + .filteringPanel { + display: flex; + flex-direction: row; + } + + @external .ctw-eb-window; + .ctw-eb-window {} + + + + + + + + + + + + + \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/WebProtegeClientBundle.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/WebProtegeClientBundle.java index fcee62ff60..ac2a30d7ab 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/WebProtegeClientBundle.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/WebProtegeClientBundle.java @@ -303,6 +303,9 @@ public interface WebProtegeClientBundle extends ClientBundle { @Source("glyphs.css") Glyphs glyphs(); + @Source("icd11ect-1.7.css") + Icd11 icd11(); + @Source("primitive-data.css") WebProtegePrimitiveDataCss primitiveData(); @@ -934,4 +937,534 @@ interface EntityNodeCss extends CssResource { interface Glyphs extends CssResource { } + + interface Icd11 extends CssResource { + + @ClassName("ectComponent") + String ectComponent(); + + @ClassName("ctw-eb-window") + String ctwEbWindow(); + + @ClassName("defaultFontColor") + String defaultFontColor(); + + String titleinh(); + + String ctwFlexItem75(); + + String propertyWrapper(); + + String embeddedBrowserSearchbox(); + + String flexisearchwarning(); + + String entityDetailsCloseiconWrapper(); + + String chapterdistributionandfilterdiv(); + + String entityDetailsTheCode(); + + String chtitlediv(); + + String textNotFound(); + + String hierarchyNotAvailable(); + + String hierarchy(); + + String filterSwitchStar(); + + String filterSwitchLabel(); + + String pccodeset(); + + String messageright(); + + String pcicon(); + + String tooltipContentPostcoordination(); + + String postcoordPvs(); + + String openicon(); + + String topul(); + + String rtitle(); + + String chapter(); + + String entityPvPointer(); + + String advancedsearchInput(); + + String statusError(); + + String pcHeader(); + + String collapsed(); + + String prcolor(); + + String freq(); + + String foundationCodingTool(); + + String plcolor(); + + String embeddedBrowser(); + + String postcoordSearch(); + + String postcoordForSelectionLeft(); + + String toplevel(); + + String found(); + + String statusFlexInfo(); + + String thecode(); + + String statusFlexWords(); + + String entityLoading(); + + String entityTitlePointerSelection(); + + String notleaf(); + + String ctwFlexItem50(); + + String flexi(); + + String tooltipContentKeyboard(); + + String propertyHeaderDiagnosticCriteria(); + + String showdetails(); + + String ulDescendants(); + + String markdownDefinition(); + + String rtl(); + + String advancedsearchdiv(); + + String mitHeader(); + + String syntaxErrorAlert(); + + String entityTheCode(); + + String chaptertitle(); + + String entityDetailsCodeAndTitle(); + + String browsericon(); + + String pctitle(); + + String postcoordSticky(); + + String entityDetailsProperties(); + + String postcoordURI(); + + String codedelimamp(); + + String ctwFlexItemPadding(); + + String slider(); + + @ClassName("thecode-7") + String thecode7(); + + @ClassName("thecode-8") + String thecode8(); + + String entityTitleAndIcons(); + + @ClassName("thecode-9") + String thecode9(); + + @ClassName("thecode-4") + String thecode4(); + + @ClassName("thecode-5") + String thecode5(); + + @ClassName("thecode-6") + String thecode6(); + + String entityTheCodeInDetails(); + + String entityDetailsContentAfterHead(); + + String messageleft(); + + String entityPvBadge(); + + String empty(); + + String postcoordinatedCodeRight(); + + String filterWrapper(); + + String entityTitleSelection(); + + String lastPropertyWrapper(); + + String entityDetails(); + + String chopped(); + + String mandatoryPostcoord(); + + String circleicon(); + + String ctwFlexItem100(); + + String sortoption(); + + String propertyHeader(); + + String pccode(); + + String entitylist(); + + String unicodeicon(); + + String pcdelete(); + + String closeSearch(); + + String browserBodyLeft(); + + String showlinkSeeInHierarchy(); + + String showlinkPostcoordination(); + + String overflowBox(); + + String title(); + + String idclass2(); + + String hierarchyResizable(); + + String expanded(); + + String propertyDiagnosticCriteria(); + + String mlcolor(); + + String circleiconWithinDetails(); + + String nodeWindow(); + + String postcoordForSelection(); + + String parentcode(); + + String popupModeResults(); + + String postcoordSearchResult(); + + String destinationentitiesdiv(); + + String nodeAdoptedChild(); + + String tooltipWrapper(); + + String browserBodyRightContent(); + + String codeinh(); + + String wbe(); + + String ch09(); + + String entityDetailsError(); + + String ch07(); + + String ch08(); + + String ch05(); + + String browserBodyLeftContent(); + + String ch06(); + + String ch03(); + + String ch04(); + + String simplifiedcode(); + + String nonwbe(); + + String ch01(); + + String statusFlexFilter(); + + String ch02(); + + String advancedsearchIndexTerms(); + + String clipboard(); + + String tooltipLinkKeyboardOpen(); + + String entityTitleSelectionFlex(); + + String iconSeeInHierarchy(); + + String browserModal(); + + String wordlist(); + + String postcoorForSelectionURI(); + + String highlightedEntity(); + + String axisWithName(); + + String property(); + + String importantlabelCurrentEntityHighlighted(); + + String currentEntityHighlighted(); + + String rsubtitle(); + + String liFlex(); + + String entityDetailsSelectionHeader(); + + @ClassName("ctw-input") + String ctwInput(); + + String defaultErrorAlert(); + + String searchError(); + + String pvs(); + + String popupMode(); + + String browserBody(); + + String tooltipCloseiconWrapper(); + + String entityTitlePointer(); + + String postcoordinatedCodeLeft(); + + String closeicon(); + + String chdistro(); + + String postcoordForSelectionRight(); + + String tooltipOpenEndedPostcoordination(); + + String codedelimsl(); + + String foundpc(); + + String propertyHeaderSelection(); + + String subIndexTerm(); + + String popupModeTop(); + + String listhead(); + + String highlightedEntityPv(); + + String ch27(); + + String ch25(); + + String ch26(); + + String ch23(); + + String ch24(); + + String orangetextbutton(); + + String ch21(); + + String ch22(); + + String xchaptercodestyle(); + + String ch20(); + + String browserBodyTitle(); + + String postcoordSearchInputToResult(); + + String tooltipLinkKeyboard(); + + String labelinh(); + + String subproperty(); + + String detailsicon(); + + String propertyHeaderCodingNoteSub(); + + String clickinh(); + + String postcoordSearchResultList(); + + String entityDetailsSelection(); + + @ClassName("thecode-11") + String thecode11(); + + String ch18(); + + @ClassName("thecode-10") + String thecode10(); + + String ch19(); + + String ch16(); + + String ch17(); + + String ch14(); + + String ch15(); + + String embeddedBrowserAllIndexTerms(); + + String ch12(); + + String ch13(); + + String ch10(); + + String ch11(); + + String tooltipContent(); + + String nodeAdoptedResidual(); + + String mitHeaderFlex(); + + String nodeError(); + + String entityInList(); + + String icdcodewpc(); + + @ClassName("thecode-12") + String thecode12(); + + String idclass(); + + String wordlistdiv(); + + String propertyHeaderCodingNote(); + + String browserCloseiconWrapper(); + + String axis(); + + String postcoordCode(); + + String browserBodyRight(); + + String dontChangeResult(); + + String postcoordActionClickable(); + + String postcoordFlex(); + + String filterSwitch(); + + String selected(); + + String showlinkNormalSize(); + + String postcoordAction(); + + String diagnosticCriteria(); + + String showlink(); + + String important(); + + String clearfix(); + + String importantlabel(); + + String embeddedBrowserSearch(); + + String cncolor(); + + String highlightedEntityArrow(); + + String nodeResidual(); + + String postcoordColored(); + + String values(); + + String entityDetailsCloseicon(); + + String hideNodeWindow(); + + String showAllEntities(); + + String elementToFadeOut(); + + String highlightedParent(); + + String dimensionicon(); + + String browser(); + + String postcoordSearchInput(); + + String entityDetailsContent(); + + String propertyPostcoordinationSummary(); + + String searchresults(); + + String ctwFlexItem25(); + + String tooltipPostcoordination(); + + String propertyHeaderPostcoordination(); + + String statusAdvancedsearch(); + + String entityTitle(); + + String showallbutton(); + + String round(); + + String pacolor(); + + String entityHead(); + + String browserContent(); + + String circleiconWithinDetailsHeaders(); + + String stemcodestyle(); + + String entityPv(); + } } \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.css b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.css new file mode 100644 index 0000000000..d6aea2211a --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.css @@ -0,0 +1,1984 @@ +.ectComponent { + font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; + margin: 0; + padding: 0; + font-size: 14px; + line-height: 1.42857143; + color: #333 +} + +.ectComponent .clearfix:after { + content: ""; + clear: both; + display: table +} + +.ectComponent .defaultFontColor { + color: #333 +} + +.ectComponent .defaultErrorAlert { + display: block; + padding: .75rem 1.25rem; + color: #721c24; + background-color: #f8d7da !important; + border-color: #f5c6cb; + font-size: 85% +} + +.ectComponent .syntaxErrorAlert { + display: block; + padding: .75rem 1.25rem; + color: #004085; + background-color: #cce5ff !important; + border-color: #b8daff; + font-size: 85% +} + +.ctw-input {} +.currentEntityHighlighted{} +.importantlabelCurrentEntityHighlighted{} + +.ctw-input:not(.apiInitializationCompleted) { + background-color: #eee; + pointer-events: none; + color: #aea79f +} + +.ectComponent .overflowBox { + overflow: auto +} + +.ectComponent .browserContent { + height: 85vh +} + +.ectComponent .browserBodyLeft, .ectComponent .browserBodyRight { + overflow: auto; + height: 80vh +} + +.ectComponent .browserCloseiconWrapper { + float: right +} + +.ectComponent ol, .ectComponent ul { + margin-top: 0; + margin-bottom: 0 +} + +.ectComponent .embeddedBrowser .browser, .ectComponent .embeddedBrowser .browserBody, .ectComponent .embeddedBrowser .browserBodyLeft, .ectComponent .embeddedBrowser .browserBodyRight, .ectComponent .embeddedBrowser .browserContent { + height: inherit; + max-height: inherit +} + +.ctw-eb-window .embeddedBrowserSearchbox { + width: 30%; + margin-left: 20px; + height: 30px +} + +.ctw-eb-window .popupMode { + max-width: 60vw +} + +.ctw-eb-window .popupModeResults { + margin-left: 20px +} + +.ectComponent .popupMode { + position: relative +} + +.ectComponent .popupMode .popupModeTop { + margin-top: 4px +} + +.ectComponent .popupMode .popupModeTop .entityLoading { + margin-left: 6px +} + +.ectComponent .popupMode .popupModeTop .closeicon { + float: right; + margin-right: 6px +} + +.ectComponent .popupMode .popupModeResults { + position: absolute; + z-index: 100002; + top: 0; + background-color: #fff; + border: 1px solid #ccc; + min-width: 40%; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2), 0 6px 20px 0 rgba(0, 0, 0, .19); + height: auto +} + +.ectComponent #ctwFlexContainer { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .ctwFlexItem25 { + width: 25% +} + +.ectComponent .ctwFlexItem50 { + width: 50% +} + +.ectComponent .ctwFlexItem75 { + width: 75% +} + +.ectComponent .ctwFlexItem100 { + width: 100% +} + +.ectComponent .ctwFlexItemPadding { + padding-left: 10px; + padding-right: 10px +} + +.ectComponent .entityHead.currentEntityHighlighted, .ectComponent .entityHead:not(.keyboardOnlyHighlight):hover { + background-color: #eee +} + +.ectComponent .importantlabel:not(.keyboardOnlyHighlight):hover, .ectComponent .importantlabelCurrentEntityHighlighted { + background-color: #cae1ed !important +} + +.ectComponent .entityHead { + display: flex; + flex-direction: row +} + +.ectComponent .entityTheCode { + flex-basis: 7em; + cursor: pointer; + color: #555; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +.ectComponent .entityTitleAndIcons { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityTheCodeInDetails { + cursor: pointer; + color: #555; + font-weight: 600; + margin-right: 10px +} + +.ectComponent .entityTitle { + width: 100% +} + +.ectComponent .entityTitlePointer { + cursor: pointer +} + +.ectComponent .entityPv { + border-right: 2px solid #fff; + border-bottom: 2px solid #fff +} + +.ectComponent .entityPvPointer { + cursor: pointer +} + +.ectComponent .entityPv .entityPvBadge { + font-size: 80%; + white-space: nowrap; + background-color: #feeebd; + border: 1px solid #d19405; + text-align: center; + border-radius: 2px; + margin: 0 5px; + padding: 0 5px; + vertical-align: 1px; + cursor: default +} + +.ectComponent .entityDetails { + margin-top: 10px; + margin-bottom: 13px; + border: 1px solid #ccc; + border-radius: 3px; + background-color: #f8f8f8 !important +} + +.ectComponent .entityDetails .entityDetailsSelection .entityHead { + padding-left: 8px; + padding-right: 8px +} + +.ectComponent .entityDetails .showAllEntities .entityHead { + padding-left: 4px +} + +.ectComponent .entityDetailsError { + margin-bottom: 13px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px +} + +.ectComponent .entityDetails .entityDetailsContentAfterHead { + font-size: 85%; + margin-top: 4px +} + +.ectComponent .entityDetails .entityDetailsContent { + padding: 4px 8px +} + +.ectComponent .entityDetailsCodeAndTitle { + display: flex; + flex-direction: row; + margin-bottom: 8px +} + +.ectComponent .entityDetailsCodeAndTitle .entityDetailsTheCode { + color: #555; + font-weight: 600; + white-space: nowrap; + margin-right: 10px +} + +.ectComponent .entityDetailsSelectionHeader { + display: flex; + flex-direction: row +} + +.ectComponent .entityDetailsSelectionHeader .mitHeader { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityDetailsSelectionHeader .mitHeader .mitHeaderFlex { + width: 100% +} + +.ectComponent .entityDetailsSelectionHeader .pcHeader { + white-space: nowrap +} + +.ectComponent .entityDetailsSelection { + background-color: #fff !important; + border: 1px solid #e8e6e6; + padding-top: 4px; + padding-bottom: 4px +} + +.ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection { + font-size: 85% +} + +.ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection .showlink { + margin-left: 4px !important +} + +.ectComponent .entityTitleSelection { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityTitleSelectionFlex { + width: 100% +} + +.ectComponent .entityTitlePointerSelection { + cursor: pointer +} + +.ectComponent .entityDetails .entityDetailsProperties { + margin-top: 8px; + font-size: 85% +} + +.ectComponent .entityDetails .entityDetailsContent .propertyWrapper { + margin-bottom: 8px +} + +.ectComponent .entityDetails .entityDetailsContent .propertyWrapper.lastPropertyWrapper { + margin-bottom: 4px +} + +.ectComponent .entityDetails .entityDetailsContent .propertyHeader { + font-weight: 700; + color: #4e4c48 +} + +.ectComponent .entityDetails .entityDetailsContent .propertyHeaderSelection { + font-size: 85%; + font-weight: 700; + color: #4e4c48 +} + +.ectComponent .entityDetails .entityDetailsContent .property { + margin-left: 10px +} + +.ectComponent .embeddedBrowserAllIndexTerms .subIndexTerm { + margin-left: 2.5rem; + font-size: 85%; + display: list-item; + list-style-type: circle +} + +.ectComponent .entityLoading { + font-weight: 700 +} + +@keyframes blink { + 0% { + opacity: .2 + } + 20% { + opacity: 1 + } + to { + opacity: .2 + } +} + +.ectComponent .entityLoading span { + margin-left: 2px; + animation-name: blink; + animation-duration: 1.4s; + animation-iteration-count: infinite; + animation-fill-mode: both +} + +.ectComponent .entityLoading span:nth-child(2) { + animation-delay: .2s +} + +.ectComponent .entityLoading span:nth-child(3) { + animation-delay: .4s +} + +.ectComponent .elementToFadeOut { + animation: fadeOut 5s linear forwards; + border-radius: 2px; + padding-bottom: 1px +} + +@keyframes fadeOut { + 0%, 90% { + background-color: #fbdaa0 + } + to { + background-color: transparent + } +} + +.ectComponent .foundationCodingTool .ulDescendants { + padding-left: 30px +} + +.ectComponent .browser.browserModal { + position: fixed; + top: 0; + left: 0; + z-index: 99999; + width: 100%; + height: 100%; + overflow: hidden; + background-color: #000; + background-color: rgba(0, 0, 0, .5) !important +} + +.ectComponent .browser.browserModal .browserContent { + border: 1px solid #ccc; + border-radius: 10px; + background-color: #fff !important; + margin: 3% 5%; + padding: 10px +} + +.ectComponent .browser .browserBodyTitle { + font-weight: 700; + font-size: 1.2em; + color: #404040; + margin-bottom: 6px; + margin-right: 0; + border-bottom: 1px solid #ccc +} + +.ectComponent .browser .browserBody { + margin-top: 20px; + display: grid; + grid-template-columns:auto 1fr +} + +.ectComponent .embeddedBrowser .browser .browserBody { + margin-top: 0 +} + +.ectComponent .embeddedBrowser .browser .browserBody.hierarchyNotAvailable { + display: inline; + display: initial +} + +.ectComponent .browser .browserBodyLeft { + width: 31vw; + border-right: 1px solid #ccc; + padding-left: 20px; + padding-right: 20px +} + +.ectComponent .browser .browserBodyLeft.hierarchyResizable { + resize: horizontal; + min-width: 15vw; + max-width: 60vw +} + +.ectComponent .browser .browserBodyRight { + padding-left: 20px; + padding-right: 20px +} + +.ectComponent .browser .propertyHeader { + font-weight: 700; + margin-bottom: 8px +} + +.ectComponent .browser .property { + margin-left: 10px; + margin-bottom: 15px +} + +.ectComponent .browser .subproperty { + font-size: 85%; + font-style: italic; + margin-left: 8px +} + +.ectComponent .browser .parentcode { + font-weight: 600; + font-style: normal; + margin-right: 4px +} + +.ectComponent .browser .propertyHeaderCodingNote, .ectComponent .browser .propertyHeaderDiagnosticCriteria, .ectComponent .browser .propertyHeaderPostcoordination { + background-color: #e8e8f0; + padding: 2px 10px 4px; + margin-top: 20px +} + +.ectComponent .browser .propertyHeaderCodingNoteSub { + margin-left: 10px +} + +.ectComponent .browser .idclass { + margin-right: 2px; + vertical-align: bottom +} + +.ectComponent .browser .idclass, .ectComponent .browser .idclass2 { + color: #606060; + font-style: italic; + font-size: .8em; + white-space: nowrap +} + +.ectComponent .browser .idclass2 { + margin-left: 8px +} + +.ectComponent .browser .orangetextbutton { + font-size: .8em; + color: #df7030; + margin-left: 8px; + text-decoration: none; + vertical-align: bottom +} + +.ectComponent .browser .markdownDefinition li { + list-style-type: disc +} + +.ectComponent .browser .markdownDefinition table td { + border-bottom: 1px solid #ddd; + padding: 4px 20px 4px 0 +} + +.ectComponent .browser .markdownDefinition table th { + border-bottom: 1px solid #ddd; + padding: 4px 20px 4px 0; + text-align: left +} + +.ectComponent .browser .markdownDefinition table ul { + margin-left: 0; + padding-left: 0 +} + +.ectComponent .browser .markdownDefinition table li { + list-style: none +} + +.ectComponent .browser .propertyDiagnosticCriteria { + font-size: 14px +} + +.ectComponent .browser .diagnosticCriteria h1 { + font-weight: 700; + font-size: 1em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h2 { + font-weight: 400; + font-size: 1em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h3 { + font-weight: 400; + font-size: .9em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h4 { + font-weight: 700; + font-size: .9em; + color: #333; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .openicon { + margin-right: 4px +} + +.ectComponent .entityHead:hover > .openicon { + display: inline +} + +.ectComponent .closeicon { + font-size: 9.8px; + color: #777; + cursor: pointer; + margin-right: 4px; + vertical-align: text-top; + font-weight: 700 +} + +.ectComponent .closeicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .entityDetailsCloseiconWrapper { + position: relative; + float: right +} + +.ectComponent .entityDetailsCloseicon { + position: absolute; + top: -3px; + right: -3px; + font-size: 9.8px; + color: #777; + border-radius: 3px; + padding: 0 3px 1px 2px; + cursor: pointer; + background: #fff; + border: 1px solid #ccc; + font-weight: 700 +} + +.ectComponent .entityDetailsCloseicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .dimensionicon { + font-size: smaller; + color: #777; + cursor: pointer; + margin-right: 4px; + margin-left: 6px; + vertical-align: top +} + +.ectComponent .dimensionicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .showlink { + color: #4169e1 !important; + cursor: pointer; + font-size: 85%; + font-weight: 400; + margin-left: 6px +} + +.ectComponent .showlinkPostcoordination { + font-size: 85%; + margin-right: 3px; + vertical-align: 2px +} + +.ectComponent .showlinkNormalSize { + color: #4169e1 !important; + cursor: pointer; + font-size: 100%; + font-weight: 400; + margin-left: 6px +} + +.ectComponent .showlink:hover, .ectComponent .showlinkNormalSize:hover { + color: #4169e1; + text-decoration: none +} + +.ectComponent .showlinkSeeInHierarchy { + color: #4169e1 !important; + cursor: pointer; + font-size: 85% +} + +.ectComponent .showlinkSeeInHierarchy:hover { + text-decoration: none +} + +.ectComponent .iconSeeInHierarchy { + font-size: 120%; + color: #fff; + background-color: #4f74e3; + padding: 0 4px; + border-radius: 3px; + margin-right: 2px +} + +.ectComponent .showdetails { + font-size: 85%; + padding-right: 2px; + vertical-align: 2px; + word-break: keep-all; + white-space: nowrap +} + +.ectComponent .unicodeicon { + color: #4169e1; + font-size: 8px; + cursor: pointer +} + +.ectComponent .mandatoryPostcoord { + color: #d45800 +} + +.ectComponent .circleicon { + cursor: pointer +} + +.ectComponent .circleicon, .ectComponent .circleiconWithinDetails { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px; + color: #424242; + border-radius: 50%; + padding: 1px 4px; + margin-left: 2px; + vertical-align: 2px +} + +.ectComponent .circleiconWithinDetails { + cursor: default +} + +.ectComponent .circleiconWithinDetailsHeaders { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px !important; + color: #424242; + border-radius: 50%; + padding: 1px 4px; + margin-left: 6px; + cursor: default; + vertical-align: 2px +} + +.ectComponent .pacolor { + background: #eee; + border: 1px solid #ccc; + padding-right: 3px !important; + font-weight: 700 +} + +.ectComponent .prcolor { + background: #facdac; + border: 1px solid #f8b687; + padding-right: 3px !important; + font-weight: 700 +} + +.ectComponent .mlcolor { + background: #f8ee69; + border: 1px solid #f0f00f; + font-weight: 700 +} + +.ectComponent .plcolor { + background: #e2d0e2; + border: 1px solid #cfb0cf; + font-weight: 700 +} + +.ectComponent .cncolor { + background: #ace259; + border: 1px solid #9ac754; + padding: 1px 3px 1px 2px !important; + font-weight: 700 +} + +.ectComponent .entityDetails .circleiconWithinDetails { + cursor: pointer +} + +.ectComponent .hierarchy ul { + list-style: none; + padding-left: 0 +} + +.ectComponent .hierarchy ul ul { + padding-left: 18px +} + +.ectComponent .hierarchy .topul li { + margin-bottom: 3px +} + +.ectComponent .hierarchy .collapsed, .hierarchy .expanded { + cursor: pointer; + width: 16px; + display: inline-block; + font-size: .8em +} + +.ectComponent .hierarchy .collapsed { + vertical-align: top +} + +.ectComponent .hierarchy .expanded { + vertical-align: top; + position: relative; + top: 2px +} + +.ectComponent .hierarchy .empty { + width: 16px; + display: inline-block +} + +.ectComponent .hierarchy .codeinh { + font-weight: 600 +} + +.ectComponent .hierarchy .nodeWindow .codeinh, .ectComponent .hierarchy .nodeWindow .titleinh { + color: #668 +} + +.ectComponent .hierarchy .nodeAdoptedChild .codeinh, .ectComponent .hierarchy .nodeAdoptedChild .titleinh { + color: #999 +} + +.ectComponent .hierarchy .nodeResidual .codeinh, .ectComponent .hierarchy .nodeResidual .titleinh { + color: maroon +} + +.ectComponent .hierarchy .nodeAdoptedResidual .codeinh, .ectComponent .hierarchy .nodeAdoptedResidual .titleinh { + color: rgba(128, 0, 0, .6) +} + +.ectComponent .hierarchy .hideNodeWindow { + display: none +} + +.ectComponent .hierarchy .labelinh { + cursor: pointer; + width: calc(100% - 16px); + display: inline-block +} + +.ectComponent .hierarchy .selected { + background-color: #fef6e8 !important +} + +.ectComponent .hierarchy .labelinh:hover { + background-color: #eee +} + +.ectComponent .hierarchy .rsubtitle { + font-style: italic; + color: #505050 +} + +.ectComponent .browserBodyLeft .hierarchy .rtitle { + font-weight: 600; + color: #505050 +} + +.ectComponent .hierarchy .nodeError { + border-radius: 3px; + margin-right: 10px +} + +.ectComponent .postcoordinatedCodeLeft { + float: left +} + +.ectComponent .postcoordinatedCodeRight { + float: right +} + +.ectComponent .postcoordColored { + font-style: normal; + color: #d45800 +} + +.ectComponent .postcoordAction { + padding-top: 10px; + padding-left: 10px; + padding-bottom: 10px; + font-size: .9em; + margin-top: 5px; + margin-bottom: 10px; + margin-left: 0; + border-left: thin solid #b96021; + background-color: #f8f8f8 +} + +.ectComponent .postcoordAction .hierarchy { + max-height: 300px; + overflow: auto +} + +.ectComponent .postcoordActionClickable { + cursor: pointer +} + +.ectComponent .highlightedEntity, .ectComponent .postcoordActionClickable:hover { + background-color: #eee +} + +.ectComponent .highlightedEntityPv { + background-color: #eee; + border-right: 2px solid #eee !important; + border-bottom: 2px solid #eee !important +} + +.ectComponent .highlightedParent { + position: relative +} + +.ectComponent .highlightedEntityArrow { + left: -15px; + position: absolute; + color: #d45800 +} + +.ectComponent .icdcodewpc .stemcodestyle { + font-weight: 500 +} + +.ectComponent .icdcodewpc .simplifiedcode { + text-decoration: underline; + display: inline-block; + animation: shake .82s cubic-bezier(.36, .07, .19, .97) both; + animation-iteration-count: 1; + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + perspective: 1000px +} + +@keyframes shake { + 10%, 90% { + transform: translate3d(-1px, 0, 0) + } + 20%, 80% { + transform: translate3d(2px, 0, 0) + } + 30%, 50%, 70% { + transform: translate3d(-4px, 0, 0) + } + 40%, 60% { + transform: translate3d(4px, 0, 0) + } +} + +.ectComponent .icdcodewpc .codedelimamp { + display: inline-block; + margin: 0 1px; + color: #8080e0; + font-weight: 500; + font-size: .9em +} + +.ectComponent .icdcodewpc .codedelimsl { + display: inline-block; + margin: 0 3px; + color: #df7030; + font-weight: 700; + font-size: .9em +} + +.ectComponent .icdcodewpc .xchaptercodestyle { + font-size: .9em; + color: #666 +} + +.ectComponent .postcoordSticky { + position: -webkit-sticky; + position: sticky; + top: -10px; + background-color: #fff; + padding-top: 10px; + padding-bottom: 20px; + z-index: 100001 +} + +.ectComponent .postcoordForSelection { + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fef6e8 !important; + padding: 10px +} + +.ectComponent .postcoordForSelection .postcoordCode { + font-size: 110%; + cursor: pointer +} + +.ectComponent .postcoorForSelectionURI { + margin-top: 6px +} + +.ectComponent .postcoorForSelectionURI .postcoordURI { + color: #606060; + font-style: italic; + font-size: .8em; + white-space: normal; + cursor: pointer +} + +.ectComponent .postcoorForSelectionURI .postcoordURI .codedelimamp, .ectComponent .postcoorForSelectionURI .postcoordURI .codedelimsl { + font-style: normal; + font-size: 1.2em +} + +.ectComponent .postcoordForSelection button { + color: #4169e1; + background-color: #fff; + border: 1px solid #7a7a7a; + border-radius: 3px +} + +.ectComponent .postcoordForSelection button:hover { + background-color: #eee +} + +.ectComponent .postcoordForSelection .postcoordForSelectionLeft { + float: left +} + +.ectComponent .postcoordForSelection .postcoordForSelectionRight { + float: right +} + +.ectComponent .propertyPostcoordinationSummary .pccodeset { + list-style-type: none; + margin: 0; + padding: 0 +} + +.ectComponent .propertyPostcoordinationSummary .liFlex { + display: flex +} + +.ectComponent .propertyPostcoordinationSummary .axis { + width: 200px; + color: #505050; + font-size: .9em; + font-weight: 400; + color: #b96021 +} + +.ectComponent .propertyPostcoordinationSummary .axisWithName { + margin-top: 10px +} + +.ectComponent .propertyPostcoordinationSummary .values { + flex-grow: 1 +} + +.ectComponent .propertyPostcoordinationSummary .pccode { + font-weight: 600; + color: #444; + font-size: .9em; + margin-right: 10px +} + +.ectComponent .propertyPostcoordinationSummary .pctitle { + color: #444; + font-size: .9em; + margin-right: 10px +} + +.ectComponent .propertyPostcoordinationSummary .pcdelete { + font-size: .8em; + cursor: pointer +} + +.ectComponent .postcoordSearch .rtitle { + color: #b96021 +} + +.ectComponent .postcoordSearch .rsubtitle { + font-style: italic; + color: #505050 +} + +.ectComponent .postcoordSearchInput input { + margin-right: 10px; + width: 40% +} + +.ectComponent .postcoordSearchInputToResult { + position: relative +} + +.ectComponent .postcoordSearchResult { + position: absolute; + z-index: 100000; + top: 0; + background-color: #fff; + border: 1px solid #ccc; + margin-right: 10px; + padding-top: 10px; + padding-bottom: 10px; + border-bottom-right-radius: 10px; + border-bottom-left-radius: 10px; + min-width: 40%; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2), 0 6px 20px 0 rgba(0, 0, 0, .19); + max-height: 300px; + overflow-y: auto +} + +.ectComponent .postcoordSearchResult .closeSearch { + float: right; + font-size: 9.8px; + margin-right: 10px; + margin-left: 10px; + cursor: pointer; + position: -webkit-sticky; + position: sticky; + top: 0 +} + +.ectComponent .postcoordSearchResult .postcoordSearchResultList { + float: left +} + +.ectComponent .postcoordSearchResult ul { + list-style: none; + padding-left: 0 +} + +.ectComponent .postcoordSearchResult ul ul { + padding-left: 18px +} + +.ectComponent .postcoordSearchResult .postcoordFlex { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .postcoordSearchResult .labelinh { + cursor: pointer; + margin-left: 1em; + margin-right: 1em; + margin-bottom: 4px +} + +.ectComponent .postcoordSearchResult .titleinh { + width: 100% +} + +.ectComponent .postcoordSearchResult .postcoordPvs { + font-size: small; + background-color: #fef6e8; + z-index: 1002; + overflow: auto; + margin-left: 7em; + cursor: auto +} + +.ectComponent .postcoordSearchResult .clickinh:hover { + background-color: #eee +} + +.ectComponent .postcoordSearchResult .searchError { + border-radius: 3px; + margin-left: 10px; + margin-right: 10px +} + +.ectComponent .messageright { + float: right +} + +.ectComponent .messageleft { + float: left +} + +.ectComponent .wordlist ul { + list-style: none; + margin-left: -40px +} + +.ectComponent .wordlist li { + cursor: pointer; + width: 140px; + text-indent: -10px; + padding-left: 10px +} + +.ectComponent .wordlist li:hover { + background-color: #eee +} + +.ectComponent .wordlist .dontChangeResult { + color: #b0a0a0 +} + +.ectComponent .browser ul.toplevel, .ectComponent .entitylist ul.toplevel { + list-style: none; + margin-left: -40px +} + +.ectComponent .browser em.foundpc, .ectComponent .entitylist em.foundpc { + font-weight: 700; + font-style: normal; + color: red +} + +.ectComponent .browser em.found, .ectComponent .browser em.found em.wbe, .ectComponent .entitylist em.found, .ectComponent .entitylist em.found em.wbe { + font-weight: 700; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.found em.nonwbe, .ectComponent .entitylist em.found em.nonwbe { + font-weight: 400; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.foundpc em.wbe, .ectComponent .entitylist em.foundpc em.wbe { + font-weight: 700; + font-style: normal; + color: red +} + +.ectComponent .browser em.foundpc em.nonwbe, .ectComponent .entitylist em.foundpc em.nonwbe { + font-weight: 400; + font-style: normal; + color: red +} + +.ectComponent .browser em.wbe, .ectComponent .entitylist em.wbe { + font-weight: 700; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.nonwbe, .ectComponent .entitylist em.nonwbe { + font-weight: 400; + font-style: normal; + color: #d45800 +} + +.ectComponent .searchresults h5 { + color: #d45800 +} + +.ectComponent .searchresults h4 { + color: #d45800; + margin-bottom: 0; + font-size: 18px; + font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; + font-weight: 500; + line-height: 1.1 +} + +.ectComponent .detailsicon { + font-size: 8px; + color: #728ead; + cursor: pointer +} + +.ectComponent .browsericon { + font-size: smaller; + color: #d45800; + cursor: pointer +} + +.ectComponent a.browsericon { + text-decoration: none +} + +.ectComponent a.browsericon:visited { + color: #d45800 +} + +.ectComponent .pvs { + font-size: small; + background-color: #fef6e8; + z-index: 1002; + overflow: auto; + margin-left: 8em +} + +.ectComponent .foundationCodingTool .pvs { + margin-left: 1.4em +} + +.ectComponent .destinationentitiesdiv .toplevel li { + margin-bottom: 3px +} + +.ectComponent .toplevel li { + list-style: none +} + +.ectComponent .searchresults .title { + text-align: left; + margin-left: 10px +} + +.ectComponent .searchresults ul dt.thecode { + font-weight: 700; + color: #606060; + text-align: left; + cursor: pointer +} + +.ectComponent .searchresults ul dt.thecode-4 { + width: 3em +} + +.ectComponent .searchresults ul dt.thecode-5 { + width: 3.4em +} + +.ectComponent .searchresults ul dt.thecode-6 { + width: 3.9em +} + +.ectComponent .searchresults ul dt.thecode-7 { + width: 4.6em +} + +.ectComponent .searchresults ul dt.thecode-8 { + width: 4.9em +} + +.ectComponent .searchresults ul dt.thecode-9 { + width: 5.2em +} + +.ectComponent .searchresults ul dt.thecode-10 { + width: 5.9em +} + +.ectComponent .searchresults ul dt.thecode-11 { + width: 6.5em +} + +.ectComponent .searchresults ul dt.thecode-12 { + width: 7em +} + +.ectComponent .searchresults dl { + margin-top: 0; + margin-bottom: 3px +} + +.ectComponent .sortoption { + position: relative; + float: right; + font-size: .9em; + color: #4169e1 +} + +.ectComponent .listhead { + margin-bottom: 35px +} + +.ectComponent .listhead h4 { + margin-top: 10px !important +} + +.ectComponent .chdistro { + margin-left: -40px; + list-style: none +} + +.ectComponent .ch01 { + background-color: #f7c3b5 +} + +.ectComponent .ch02 { + background-color: #e5cbf8 +} + +.ectComponent .ch03 { + background-color: #beeb9f +} + +.ectComponent .ch04 { + background-color: #79bd8f +} + +.ectComponent .ch05 { + background-color: #d0fcff +} + +.ectComponent .ch06 { + background-color: #ededed +} + +.ectComponent .ch07 { + background-color: #f2e088 +} + +.ectComponent .ch08 { + background-color: #95c3c7 +} + +.ectComponent .ch09 { + background-color: #ffff9d +} + +.ectComponent .ch10 { + background-color: #c6f4d5 +} + +.ectComponent .ch11 { + background-color: #e3d2b4 +} + +.ectComponent .ch12 { + background-color: #fff7ea +} + +.ectComponent .ch13 { + background-color: #7da626 +} + +.ectComponent .ch14 { + background-color: #bcd952 +} + +.ectComponent .ch15 { + background-color: #eefec3 +} + +.ectComponent .ch16 { + background-color: #6dbcdb +} + +.ectComponent .ch17 { + background-color: #ff9c47 +} + +.ectComponent .ch18 { + background-color: #facdac +} + +.ectComponent .ch19 { + background-color: #f2e088 +} + +.ectComponent .ch20 { + background-color: #94e5d5 +} + +.ectComponent .ch21 { + background-color: #d1dbbd +} + +.ectComponent .ch22 { + background-color: #91aa9d +} + +.ectComponent .ch23 { + background-color: #bdd4de +} + +.ectComponent .ch24 { + background-color: #f2ebbf +} + +.ectComponent .ch25 { + background-color: #c3cfeb +} + +.ectComponent .ch26 { + background-color: #d7d8dc +} + +.ectComponent .ch27 { + background-color: #d9cb9e +} + +.ectComponent .chapter { + font-size: .9em; + vertical-align: central +} + +.ectComponent .freq { + font-style: italic; + font-size: .9em; + position: absolute; + right: 8px; + top: 0 +} + +.ectComponent .chtitlediv { + position: relative; + margin-left: 10px; + padding-right: 24px; + padding-left: 20px; + text-indent: -20px +} + +.ectComponent .chaptertitle, .ectComponent .showallbutton { + cursor: pointer; + text-decoration: underline +} + +.ectComponent .showallbutton { + position: absolute; + top: -20px; + white-space: nowrap +} + +.ectComponent #chapters { + position: relative +} + +.ectComponent .important { + margin-left: 6px; + cursor: default +} + +.ectComponent .importantlabel { + background-color: #dbf2fe !important +} + +.ectComponent #flexisearchbtn { + background-color: #03038d; + color: #eee; + padding: 1px 8px; + cursor: pointer; + margin-right: 2px; + display: inline-block +} + +.ectComponent .flexisearchwarning { + position: absolute; + top: 30px; + right: 6px; + color: #03038d; + font-weight: 300 +} + +.ectComponent .flexi { + color: #03038d; + font-weight: 300 +} + +.ectComponent .clipboard, .ectComponent .pcicon { + color: #777; + font-weight: 300 +} + +.ectComponent .pcicon { + font-size: .8em +} + +.ectComponent .entityInList .notleaf, .ectComponent .postcoordSearchResultList .notleaf { + background-color: #ececec; + color: #555; + font-weight: 400; + padding-left: 2px; + font-size: 1.1em; + padding-right: 2px +} + +.ectComponent .chopped { + color: #d45800 +} + +.ectComponent select { + color: #4169e1 +} + +.ectComponent .filterSwitch { + position: relative; + display: inline-block; + top: 2px; + right: 1px; + width: 43px; + height: 17px +} + +.ectComponent .filterSwitch input { + opacity: 0; + width: 0; + height: 0 +} + +.ectComponent .filterSwitch .slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ddd; + transition: .4s +} + +.ectComponent .filterSwitch .slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: #fff; + transition: .4s +} + +.ectComponent .filterSwitch input:checked + .slider { + background-color: #9acbb1 +} + +.ectComponent .filterSwitch input:focus + .slider { + box-shadow: 0 0 1px #9acbb1 +} + +.ectComponent .filterSwitch input:checked + .slider:before { + transform: translateX(26px) +} + +.ectComponent .filterSwitch .slider.round { + border-radius: 34px +} + +.ectComponent .filterSwitch .slider.round:before { + border-radius: 50% +} + +.ectComponent .filterSwitchLabel { + margin-right: 6px; + margin-left: 6px; + color: #777 +} + +.ectComponent .filterSwitchStar { + color: #d45800; + cursor: help +} + +.ectComponent #statusFlexContainer { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .statusFlexWords { + text-align: left; + color: #777 +} + +.ectComponent .statusFlexInfo { + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +.ectComponent .statusFlexFilter { + text-align: right +} + +.ectComponent .statusError { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.ectComponent .textNotFound { + color: #777 +} + +.ectComponent .tooltipWrapper { + text-align: left; + text-align: initial; + position: relative; + display: inline-block; + z-index: 100003 +} + +.ectComponent .tooltipContent { + position: absolute; + width: 25vw; + max-width: 80vw; + max-height: 600px; + overflow: auto; + background-color: #fff; + border: 1px solid #ccc; + padding: 10px; + border-radius: 3px; + box-shadow: 0 4px 8px 0 rgb(0 0 0/20%), 0 6px 20px 0 rgb(0 0 0/19%); + color: #777; + font-size: 14px; + font-weight: 400 +} + +.ectComponent .tooltipCloseiconWrapper { + float: right +} + +.ectComponent .tooltipLinkKeyboard { + color: #777; + vertical-align: -1px; + cursor: help; + margin-right: 25px +} + +.ectComponent .tooltipLinkKeyboard:hover, .ectComponent .tooltipLinkKeyboardOpen { + background-color: #eee +} + +.ectComponent .tooltipContentKeyboard { + top: 5px; + right: 1vw +} + +.ectComponent .tooltipPostcoordination { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px; + border-radius: 50%; + padding: 1px 4px; + cursor: help; + vertical-align: 2px; + color: #4169e1; + background-color: #fff; + border: 1px solid #7a7a7a; + margin-left: 4px; + margin-right: 6px +} + +.ectComponent .tooltipPostcoordination:hover { + background-color: #eee; + border-color: #4169e1 +} + +.ectComponent .tooltipOpenEndedPostcoordination { + vertical-align: 3px !important +} + +.ectComponent .tooltipContentPostcoordination { + list-style-type: none +} + +.ectComponent .tooltipContentPostcoordination ul { + list-style-type: none; + padding: 0; + margin: 0 +} + +.ectComponent .statusAdvancedsearch { + white-space: nowrap; + color: #d19405 !important; + cursor: pointer; + font-size: 100%; + font-weight: 400; + margin-right: .5em +} + +.ectComponent .statusAdvancedsearch .unicodeicon { + color: #d19405 !important; + vertical-align: 0 +} + +.ectComponent .advancedsearchdiv { + display: flex; + background-color: #feeebd; + border: 1px solid #d19405; + border-radius: 3px; + margin-left: .5em; + margin-right: .5em; + margin-bottom: 1em; + padding-top: .5em; + padding-bottom: .5em; + padding-left: .5em +} + +.ectComponent .advancedsearchdiv .advancedsearchIndexTerms { + display: inline-block; + margin-right: 1em +} + +.ectComponent .advancedsearchdiv .advancedsearchInput { + display: inline-block; + margin-right: .5em +} + +.ectComponent .advancedsearchdiv .advancedsearchIndexTerms input, .ectComponent .advancedsearchdiv .advancedsearchIndexTerms label, .ectComponent .advancedsearchdiv .advancedsearchInput input, .ectComponent .advancedsearchdiv .advancedsearchInput label { + vertical-align: 1px; + cursor: pointer +} + +.ectComponent .browser, .ectComponent .entityTheCode, .ectComponent .postcoordCode, .ectComponent .statusFlexInfo .clipboard { + direction: ltr +} + +.rtl .ectComponent .advancedsearchdiv, .rtl .ectComponent .browserBodyLeftContent, .rtl .ectComponent .browserBodyRightContent, .rtl .ectComponent .chapterdistributionandfilterdiv, .rtl .ectComponent .destinationentitiesdiv, .rtl .ectComponent .filterWrapper, .rtl .ectComponent .statusFlexInfo, .rtl .ectComponent .statusFlexWords, .rtl .ectComponent .wordlistdiv { + direction: rtl +} + +.rtl .ectComponent .browserCloseiconWrapper { + float: left +} + +.rtl .ectComponent .browserCloseiconWrapper .closeicon { + margin-right: 0; + margin-left: 4px +} + +.rtl .ectComponent .chapterdistributionandfilterdiv .chdistro, .rtl .ectComponent .entitylist ul.toplevel, .rtl .ectComponent .wordlist ul { + padding-right: 0; + padding-left: 40px +} + +.rtl .ectComponent .entityInList .entityHead .entityTheCode, .rtl .ectComponent .postcoordSearchResult .entityTheCode { + padding-left: 6px +} + +.rtl .ectComponent .sortoption { + float: left +} + +.rtl .ectComponent .browser .hierarchy .topul { + padding-right: 0 +} + +.rtl .ectComponent .browser .postcoordAction { + padding-left: 0; + padding-right: 10px; + border-left: initial; + border-right: thin solid #b96021 +} + +.rtl .ectComponent .wordlist li { + padding-right: 10px +} + +.rtl .ectComponent .chapterdistributionandfilterdiv .freq { + right: auto; + left: 8px +} + +.rtl .ectComponent .entityDetailsCodeAndTitle .entityDetailsTheCode, .rtl .ectComponent .entityTheCodeInDetails { + margin-right: 0; + margin-left: 10px +} + +.rtl .ectComponent .entityDetailsCloseiconWrapper { + float: left +} + +.rtl .ectComponent .entityDetailsCloseicon { + right: -12px +} + +.rtl .ectComponent .entityDetailsSelectionHeader .mitHeader { + padding-left: 0; + padding-right: 4px +} + +.rtl .ectComponent .entityDetailsSelectionHeader .pcHeader { + text-align: left +} + +.rtl .ectComponent .pvs { + margin-left: 0; + margin-right: 8em +} + +.rtl .ectComponent .entityPv { + border-right: 0 solid #fff; + border-left: 2px solid #fff +} + +.rtl .ectComponent .highlightedEntityPv { + border-right: 0 solid #eee !important; + border-left: 2px solid #eee !important +} + +.rtl .ectComponent .circleiconWithinDetailsHeaders { + margin-left: 0; + margin-right: 6px +} + +.rtl .ectComponent .iconSeeInHierarchy { + margin-right: 0; + margin-left: 2px +} + +.rtl .ectComponent .postcoordSearchInput input, .rtl .ectComponent .postcoordSearchResult { + margin-right: 0; + margin-left: 10px +} + +.rtl .ectComponent .postcoordSearchResult .closeSearch { + float: left +} + +.rtl .ectComponent .postcoordSearchResult .postcoordSearchResultList { + float: right +} + +.rtl .ectComponent .postcoordSearchResult .postcoordPvs { + margin-left: 0; + margin-right: 7em +} + +.rtl .ectComponent .showlink, .rtl .ectComponent .showlinkNormalSize { + margin-left: 0; + margin-right: 6px +} + +.rtl .ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection .showlink { + margin-left: 0 !important; + margin-right: 8px !important +} + +.rtl .ectComponent .browser .property { + margin-left: 0; + margin-right: 10px +} + +.rtl .ectComponent .browser .subproperty { + margin-left: 0; + margin-right: 8px +} + +.rtl .ectComponent .browser .parentcode { + margin-right: 0; + margin-left: 4px +} + +.ctw-eb-window.rtl .embeddedBrowserSearch { + text-align: right +} + +.ctw-eb-window.rtl .embeddedBrowserSearchbox { + margin-left: 0; + margin-right: 20px; + direction: rtl +} + +.ctw-eb-window.rtl .popupMode .popupModeTop .entityLoading, .rtl .popupMode .popupModeTop .entityLoading { + float: right; + margin-left: inherit; + margin-right: 6px +} + +.ctw-eb-window.rtl .popupMode .popupModeTop .closeicon, .rtl .popupMode .popupModeTop .closeicon { + float: left; + margin-right: 0; + margin-left: 6px +} + +.ctw-eb-window.rtl .popupMode { + max-width: none +} + +.ctw-eb-window.rtl .popupMode .popupModeResults { + right: 20px +} + +.rtl .ectComponent .advancedsearchdiv .advancedsearchIndexTerms { + margin-right: 0; + margin-left: 2em +} + +.rtl .ectComponent .advancedsearchdiv .advancedsearchInput { + margin-right: 0; + margin-left: .5em +} + +.rtl .ectComponent .browser .idclass2 { + margin-left: 0; + margin-right: 8px +} + +.rtl .ectComponent .embeddedBrowserAllIndexTerms .subIndexTerm { + margin-left: 0; + margin-right: 2.5rem +} + +.rtl .ectComponent .propertyPostcoordinationSummary .pcdelete { + margin-right: 10px +} + +.rtl .ectComponent .tooltipCloseiconWrapper { + float: left +} + +.rtl .ectComponent .tooltipWrapper { + direction: rtl +} + +.rtl .ectComponent .tooltipPostcoordination { + margin-left: 6px; + margin-right: 4px +} + +.rtl .ectComponent .tooltipContentPostcoordination { + left: auto; + right: -1vw +} \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.js b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.js new file mode 100644 index 0000000000..9f76f0b070 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/resources/icd11ect-1.7.js @@ -0,0 +1,26165 @@ +!function (e, t) { + "object" === typeof exports && "object" === typeof module ? module.exports = t() : "function" === typeof define && define.amd ? define("ECT", [], t) : "object" === typeof exports ? exports.ECT = t() : e.ECT = t() +}(this, (function () { + return function (e) { + var t = {}; + + function n(r) { + if (t[r]) return t[r].exports; + var i = t[r] = {i: r, l: !1, exports: {}}; + return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports + } + + return n.m = e, n.c = t, n.d = function (e, t, r) { + n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: r}) + }, n.r = function (e) { + "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0}) + }, n.t = function (e, t) { + if (1 & t && (e = n(e)), 8 & t) return e; + if (4 & t && "object" === typeof e && e && e.__esModule) return e; + var r = Object.create(null); + if (n.r(r), Object.defineProperty(r, "default", { + enumerable: !0, + value: e + }), 2 & t && "string" != typeof e) for (var i in e) n.d(r, i, function (t) { + return e[t] + }.bind(null, i)); + return r + }, n.n = function (e) { + var t = e && e.__esModule ? function () { + return e.default + } : function () { + return e + }; + return n.d(t, "a", t), t + }, n.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + }, n.p = "/", n(n.s = 672) + }([function (e, t, n) { + "use strict"; + e.exports = n(551) + }, function (e, t, n) { + var r = n(4), i = n(29).f, o = n(39), a = n(26), s = n(131), l = n(132), u = n(136); + e.exports = function (e, t) { + var n, c, d, f, h, p = e.target, v = e.global, g = e.stat; + if (n = v ? r : g ? r[p] || s(p, {}) : (r[p] || {}).prototype) for (c in t) { + if (f = t[c], d = e.noTargetGet ? (h = i(n, c)) && h.value : n[c], !u(v ? c : p + (g ? "." : "#") + c, e.forced) && void 0 !== d) { + if (typeof f == typeof d) continue; + l(f, d) + } + (e.sham || d && d.sham) && o(f, "sham", !0), a(n, c, f, e) + } + } + }, function (e, t, n) { + e.exports = n(542) + }, function (e, t, n) { + (function (e, r) { + var i; + (function () { + var o, a = "Expected a function", s = "__lodash_hash_undefined__", l = "__lodash_placeholder__", u = 16, + c = 32, d = 64, f = 128, h = 256, p = 1 / 0, v = 9007199254740991, g = NaN, y = 4294967295, + m = [["ary", f], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", u], ["flip", 512], ["partial", c], ["partialRight", d], ["rearg", h]], + b = "[object Arguments]", x = "[object Array]", w = "[object Boolean]", C = "[object Date]", + D = "[object Error]", S = "[object Function]", E = "[object GeneratorFunction]", k = "[object Map]", + j = "[object Number]", O = "[object Object]", A = "[object Promise]", I = "[object RegExp]", + F = "[object Set]", P = "[object String]", _ = "[object Symbol]", T = "[object WeakMap]", + R = "[object ArrayBuffer]", N = "[object DataView]", M = "[object Float32Array]", + B = "[object Float64Array]", L = "[object Int8Array]", U = "[object Int16Array]", + z = "[object Int32Array]", V = "[object Uint8Array]", H = "[object Uint8ClampedArray]", + W = "[object Uint16Array]", q = "[object Uint32Array]", K = /\b__p \+= '';/g, + $ = /\b(__p \+=) '' \+/g, Q = /(__e\(.*?\)|\b__t\)) \+\n'';/g, G = /&(?:amp|lt|gt|quot|#39);/g, + X = /[&<>"']/g, Y = RegExp(G.source), Z = RegExp(X.source), J = /<%-([\s\S]+?)%>/g, + ee = /<%([\s\S]+?)%>/g, te = /<%=([\s\S]+?)%>/g, + ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, re = /^\w*$/, + ie = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + oe = /[\\^$.*+?()[\]{}|]/g, ae = RegExp(oe.source), se = /^\s+/, le = /\s/, + ue = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, ce = /\{\n\/\* \[wrapped with (.+)\] \*/, + de = /,? & /, fe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, he = /[()=,{}\[\]\/\s]/, + pe = /\\(\\)?/g, ve = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ge = /\w*$/, ye = /^[-+]0x[0-9a-f]+$/i, + me = /^0b[01]+$/i, be = /^\[object .+?Constructor\]$/, xe = /^0o[0-7]+$/i, we = /^(?:0|[1-9]\d*)$/, + Ce = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, De = /($^)/, Se = /['\n\r\u2028\u2029\\]/g, + Ee = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", ke = "\\u2700-\\u27bf", + je = "a-z\\xdf-\\xf6\\xf8-\\xff", Oe = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ae = "\\ufe0e\\ufe0f", + Ie = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", + Fe = "['\u2019]", Pe = "[\\ud800-\\udfff]", _e = "[" + Ie + "]", Te = "[" + Ee + "]", Re = "\\d+", + Ne = "[\\u2700-\\u27bf]", Me = "[" + je + "]", + Be = "[^\\ud800-\\udfff" + Ie + Re + ke + je + Oe + "]", Le = "\\ud83c[\\udffb-\\udfff]", + Ue = "[^\\ud800-\\udfff]", ze = "(?:\\ud83c[\\udde6-\\uddff]){2}", + Ve = "[\\ud800-\\udbff][\\udc00-\\udfff]", He = "[" + Oe + "]", We = "(?:" + Me + "|" + Be + ")", + qe = "(?:" + He + "|" + Be + ")", Ke = "(?:['\u2019](?:d|ll|m|re|s|t|ve))?", + $e = "(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", Qe = "(?:" + Te + "|" + Le + ")" + "?", + Ge = "[\\ufe0e\\ufe0f]?", + Xe = Ge + Qe + ("(?:\\u200d(?:" + [Ue, ze, Ve].join("|") + ")" + Ge + Qe + ")*"), + Ye = "(?:" + [Ne, ze, Ve].join("|") + ")" + Xe, + Ze = "(?:" + [Ue + Te + "?", Te, ze, Ve, Pe].join("|") + ")", Je = RegExp(Fe, "g"), + et = RegExp(Te, "g"), tt = RegExp(Le + "(?=" + Le + ")|" + Ze + Xe, "g"), + nt = RegExp([He + "?" + Me + "+" + Ke + "(?=" + [_e, He, "$"].join("|") + ")", qe + "+" + $e + "(?=" + [_e, He + We, "$"].join("|") + ")", He + "?" + We + "+" + Ke, He + "+" + $e, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Re, Ye].join("|"), "g"), + rt = RegExp("[\\u200d\\ud800-\\udfff" + Ee + Ae + "]"), + it = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + ot = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], + at = -1, st = {}; + st[M] = st[B] = st[L] = st[U] = st[z] = st[V] = st[H] = st[W] = st[q] = !0, st[b] = st[x] = st[R] = st[w] = st[N] = st[C] = st[D] = st[S] = st[k] = st[j] = st[O] = st[I] = st[F] = st[P] = st[T] = !1; + var lt = {}; + lt[b] = lt[x] = lt[R] = lt[N] = lt[w] = lt[C] = lt[M] = lt[B] = lt[L] = lt[U] = lt[z] = lt[k] = lt[j] = lt[O] = lt[I] = lt[F] = lt[P] = lt[_] = lt[V] = lt[H] = lt[W] = lt[q] = !0, lt[D] = lt[S] = lt[T] = !1; + var ut = {"\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029"}, + ct = parseFloat, dt = parseInt, ft = "object" == typeof e && e && e.Object === Object && e, + ht = "object" == typeof self && self && self.Object === Object && self, + pt = ft || ht || Function("return this")(), vt = t && !t.nodeType && t, + gt = vt && "object" == typeof r && r && !r.nodeType && r, yt = gt && gt.exports === vt, + mt = yt && ft.process, bt = function () { + try { + var e = gt && gt.require && gt.require("util").types; + return e || mt && mt.binding && mt.binding("util") + } catch (t) { + } + }(), xt = bt && bt.isArrayBuffer, wt = bt && bt.isDate, Ct = bt && bt.isMap, Dt = bt && bt.isRegExp, + St = bt && bt.isSet, Et = bt && bt.isTypedArray; + + function kt(e, t, n) { + switch (n.length) { + case 0: + return e.call(t); + case 1: + return e.call(t, n[0]); + case 2: + return e.call(t, n[0], n[1]); + case 3: + return e.call(t, n[0], n[1], n[2]) + } + return e.apply(t, n) + } + + function jt(e, t, n, r) { + for (var i = -1, o = null == e ? 0 : e.length; ++i < o;) { + var a = e[i]; + t(r, a, n(a), e) + } + return r + } + + function Ot(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e);) ; + return e + } + + function At(e, t) { + for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e);) ; + return e + } + + function It(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (!t(e[n], n, e)) return !1; + return !0 + } + + function Ft(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = 0, o = []; ++n < r;) { + var a = e[n]; + t(a, n, e) && (o[i++] = a) + } + return o + } + + function Pt(e, t) { + return !!(null == e ? 0 : e.length) && Vt(e, t, 0) > -1 + } + + function _t(e, t, n) { + for (var r = -1, i = null == e ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0; + return !1 + } + + function Tt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e); + return i + } + + function Rt(e, t) { + for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n]; + return e + } + + function Nt(e, t, n, r) { + var i = -1, o = null == e ? 0 : e.length; + for (r && o && (n = e[++i]); ++i < o;) n = t(n, e[i], i, e); + return n + } + + function Mt(e, t, n, r) { + var i = null == e ? 0 : e.length; + for (r && i && (n = e[--i]); i--;) n = t(n, e[i], i, e); + return n + } + + function Bt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0; + return !1 + } + + var Lt = Kt("length"); + + function Ut(e, t, n) { + var r; + return n(e, (function (e, n, i) { + if (t(e, n, i)) return r = n, !1 + })), r + } + + function zt(e, t, n, r) { + for (var i = e.length, o = n + (r ? 1 : -1); r ? o-- : ++o < i;) if (t(e[o], o, e)) return o; + return -1 + } + + function Vt(e, t, n) { + return t === t ? function (e, t, n) { + var r = n - 1, i = e.length; + for (; ++r < i;) if (e[r] === t) return r; + return -1 + }(e, t, n) : zt(e, Wt, n) + } + + function Ht(e, t, n, r) { + for (var i = n - 1, o = e.length; ++i < o;) if (r(e[i], t)) return i; + return -1 + } + + function Wt(e) { + return e !== e + } + + function qt(e, t) { + var n = null == e ? 0 : e.length; + return n ? Gt(e, t) / n : g + } + + function Kt(e) { + return function (t) { + return null == t ? o : t[e] + } + } + + function $t(e) { + return function (t) { + return null == e ? o : e[t] + } + } + + function Qt(e, t, n, r, i) { + return i(e, (function (e, i, o) { + n = r ? (r = !1, e) : t(n, e, i, o) + })), n + } + + function Gt(e, t) { + for (var n, r = -1, i = e.length; ++r < i;) { + var a = t(e[r]); + a !== o && (n = n === o ? a : n + a) + } + return n + } + + function Xt(e, t) { + for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n); + return r + } + + function Yt(e) { + return e ? e.slice(0, gn(e) + 1).replace(se, "") : e + } + + function Zt(e) { + return function (t) { + return e(t) + } + } + + function Jt(e, t) { + return Tt(t, (function (t) { + return e[t] + })) + } + + function en(e, t) { + return e.has(t) + } + + function tn(e, t) { + for (var n = -1, r = e.length; ++n < r && Vt(t, e[n], 0) > -1;) ; + return n + } + + function nn(e, t) { + for (var n = e.length; n-- && Vt(t, e[n], 0) > -1;) ; + return n + } + + function rn(e, t) { + for (var n = e.length, r = 0; n--;) e[n] === t && ++r; + return r + } + + var on = $t({ + "\xc0": "A", + "\xc1": "A", + "\xc2": "A", + "\xc3": "A", + "\xc4": "A", + "\xc5": "A", + "\xe0": "a", + "\xe1": "a", + "\xe2": "a", + "\xe3": "a", + "\xe4": "a", + "\xe5": "a", + "\xc7": "C", + "\xe7": "c", + "\xd0": "D", + "\xf0": "d", + "\xc8": "E", + "\xc9": "E", + "\xca": "E", + "\xcb": "E", + "\xe8": "e", + "\xe9": "e", + "\xea": "e", + "\xeb": "e", + "\xcc": "I", + "\xcd": "I", + "\xce": "I", + "\xcf": "I", + "\xec": "i", + "\xed": "i", + "\xee": "i", + "\xef": "i", + "\xd1": "N", + "\xf1": "n", + "\xd2": "O", + "\xd3": "O", + "\xd4": "O", + "\xd5": "O", + "\xd6": "O", + "\xd8": "O", + "\xf2": "o", + "\xf3": "o", + "\xf4": "o", + "\xf5": "o", + "\xf6": "o", + "\xf8": "o", + "\xd9": "U", + "\xda": "U", + "\xdb": "U", + "\xdc": "U", + "\xf9": "u", + "\xfa": "u", + "\xfb": "u", + "\xfc": "u", + "\xdd": "Y", + "\xfd": "y", + "\xff": "y", + "\xc6": "Ae", + "\xe6": "ae", + "\xde": "Th", + "\xfe": "th", + "\xdf": "ss", + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010a": "C", + "\u010c": "C", + "\u0107": "c", + "\u0109": "c", + "\u010b": "c", + "\u010d": "c", + "\u010e": "D", + "\u0110": "D", + "\u010f": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011a": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011b": "e", + "\u011c": "G", + "\u011e": "G", + "\u0120": "G", + "\u0122": "G", + "\u011d": "g", + "\u011f": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012a": "I", + "\u012c": "I", + "\u012e": "I", + "\u0130": "I", + "\u0129": "i", + "\u012b": "i", + "\u012d": "i", + "\u012f": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013b": "L", + "\u013d": "L", + "\u013f": "L", + "\u0141": "L", + "\u013a": "l", + "\u013c": "l", + "\u013e": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014a": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014b": "n", + "\u014c": "O", + "\u014e": "O", + "\u0150": "O", + "\u014d": "o", + "\u014f": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015a": "S", + "\u015c": "S", + "\u015e": "S", + "\u0160": "S", + "\u015b": "s", + "\u015d": "s", + "\u015f": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016a": "U", + "\u016c": "U", + "\u016e": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016b": "u", + "\u016d": "u", + "\u016f": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017b": "Z", + "\u017d": "Z", + "\u017a": "z", + "\u017c": "z", + "\u017e": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017f": "s" + }), an = $t({"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}); + + function sn(e) { + return "\\" + ut[e] + } + + function ln(e) { + return rt.test(e) + } + + function un(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e, r) { + n[++t] = [r, e] + })), n + } + + function cn(e, t) { + return function (n) { + return e(t(n)) + } + } + + function dn(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var a = e[n]; + a !== t && a !== l || (e[n] = l, o[i++] = n) + } + return o + } + + function fn(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e) { + n[++t] = e + })), n + } + + function hn(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e) { + n[++t] = [e, e] + })), n + } + + function pn(e) { + return ln(e) ? function (e) { + var t = tt.lastIndex = 0; + for (; tt.test(e);) ++t; + return t + }(e) : Lt(e) + } + + function vn(e) { + return ln(e) ? function (e) { + return e.match(tt) || [] + }(e) : function (e) { + return e.split("") + }(e) + } + + function gn(e) { + for (var t = e.length; t-- && le.test(e.charAt(t));) ; + return t + } + + var yn = $t({"&": "&", "<": "<", ">": ">", """: '"', "'": "'"}); + var mn = function e(t) { + var n = (t = null == t ? pt : mn.defaults(pt.Object(), t, mn.pick(pt, ot))).Array, r = t.Date, + i = t.Error, le = t.Function, Ee = t.Math, ke = t.Object, je = t.RegExp, Oe = t.String, + Ae = t.TypeError, Ie = n.prototype, Fe = le.prototype, Pe = ke.prototype, + _e = t["__core-js_shared__"], Te = Fe.toString, Re = Pe.hasOwnProperty, Ne = 0, + Me = function () { + var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || ""); + return e ? "Symbol(src)_1." + e : "" + }(), Be = Pe.toString, Le = Te.call(ke), Ue = pt._, + ze = je("^" + Te.call(Re).replace(oe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), + Ve = yt ? t.Buffer : o, He = t.Symbol, We = t.Uint8Array, qe = Ve ? Ve.allocUnsafe : o, + Ke = cn(ke.getPrototypeOf, ke), $e = ke.create, Qe = Pe.propertyIsEnumerable, Ge = Ie.splice, + Xe = He ? He.isConcatSpreadable : o, Ye = He ? He.iterator : o, Ze = He ? He.toStringTag : o, + tt = function () { + try { + var e = ho(ke, "defineProperty"); + return e({}, "", {}), e + } catch (t) { + } + }(), rt = t.clearTimeout !== pt.clearTimeout && t.clearTimeout, + ut = r && r.now !== pt.Date.now && r.now, ft = t.setTimeout !== pt.setTimeout && t.setTimeout, + ht = Ee.ceil, vt = Ee.floor, gt = ke.getOwnPropertySymbols, mt = Ve ? Ve.isBuffer : o, + bt = t.isFinite, Lt = Ie.join, $t = cn(ke.keys, ke), bn = Ee.max, xn = Ee.min, wn = r.now, + Cn = t.parseInt, Dn = Ee.random, Sn = Ie.reverse, En = ho(t, "DataView"), kn = ho(t, "Map"), + jn = ho(t, "Promise"), On = ho(t, "Set"), An = ho(t, "WeakMap"), In = ho(ke, "create"), + Fn = An && new An, Pn = {}, _n = Uo(En), Tn = Uo(kn), Rn = Uo(jn), Nn = Uo(On), Mn = Uo(An), + Bn = He ? He.prototype : o, Ln = Bn ? Bn.valueOf : o, Un = Bn ? Bn.toString : o; + + function zn(e) { + if (rs(e) && !Ka(e) && !(e instanceof qn)) { + if (e instanceof Wn) return e; + if (Re.call(e, "__wrapped__")) return zo(e) + } + return new Wn(e) + } + + var Vn = function () { + function e() { + } + + return function (t) { + if (!ns(t)) return {}; + if ($e) return $e(t); + e.prototype = t; + var n = new e; + return e.prototype = o, n + } + }(); + + function Hn() { + } + + function Wn(e, t) { + this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = o + } + + function qn(e) { + this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = y, this.__views__ = [] + } + + function Kn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function $n(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Qn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Gn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.__data__ = new Qn; ++t < n;) this.add(e[t]) + } + + function Xn(e) { + var t = this.__data__ = new $n(e); + this.size = t.size + } + + function Yn(e, t) { + var n = Ka(e), r = !n && qa(e), i = !n && !r && Xa(e), o = !n && !r && !i && ds(e), + a = n || r || i || o, s = a ? Xt(e.length, Oe) : [], l = s.length; + for (var u in e) !t && !Re.call(e, u) || a && ("length" == u || i && ("offset" == u || "parent" == u) || o && ("buffer" == u || "byteLength" == u || "byteOffset" == u) || xo(u, l)) || s.push(u); + return s + } + + function Zn(e) { + var t = e.length; + return t ? e[Gr(0, t - 1)] : o + } + + function Jn(e, t) { + return Mo(Ii(e), lr(t, 0, e.length)) + } + + function er(e) { + return Mo(Ii(e)) + } + + function tr(e, t, n) { + (n !== o && !Va(e[t], n) || n === o && !(t in e)) && ar(e, t, n) + } + + function nr(e, t, n) { + var r = e[t]; + Re.call(e, t) && Va(r, n) && (n !== o || t in e) || ar(e, t, n) + } + + function rr(e, t) { + for (var n = e.length; n--;) if (Va(e[n][0], t)) return n; + return -1 + } + + function ir(e, t, n, r) { + return hr(e, (function (e, i, o) { + t(r, e, n(e), o) + })), r + } + + function or(e, t) { + return e && Fi(t, _s(t), e) + } + + function ar(e, t, n) { + "__proto__" == t && tt ? tt(e, t, { + configurable: !0, + enumerable: !0, + value: n, + writable: !0 + }) : e[t] = n + } + + function sr(e, t) { + for (var r = -1, i = t.length, a = n(i), s = null == e; ++r < i;) a[r] = s ? o : Os(e, t[r]); + return a + } + + function lr(e, t, n) { + return e === e && (n !== o && (e = e <= n ? e : n), t !== o && (e = e >= t ? e : t)), e + } + + function ur(e, t, n, r, i, a) { + var s, l = 1 & t, u = 2 & t, c = 4 & t; + if (n && (s = i ? n(e, r, i, a) : n(e)), s !== o) return s; + if (!ns(e)) return e; + var d = Ka(e); + if (d) { + if (s = function (e) { + var t = e.length, n = new e.constructor(t); + t && "string" == typeof e[0] && Re.call(e, "index") && (n.index = e.index, n.input = e.input); + return n + }(e), !l) return Ii(e, s) + } else { + var f = go(e), h = f == S || f == E; + if (Xa(e)) return Si(e, l); + if (f == O || f == b || h && !i) { + if (s = u || h ? {} : mo(e), !l) return u ? function (e, t) { + return Fi(e, vo(e), t) + }(e, function (e, t) { + return e && Fi(t, Ts(t), e) + }(s, e)) : function (e, t) { + return Fi(e, po(e), t) + }(e, or(s, e)) + } else { + if (!lt[f]) return i ? e : {}; + s = function (e, t, n) { + var r = e.constructor; + switch (t) { + case R: + return Ei(e); + case w: + case C: + return new r(+e); + case N: + return function (e, t) { + var n = t ? Ei(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.byteLength) + }(e, n); + case M: + case B: + case L: + case U: + case z: + case V: + case H: + case W: + case q: + return ki(e, n); + case k: + case F: + return new r; + case j: + case P: + return new r(e); + case I: + return function (e) { + var t = new e.constructor(e.source, ge.exec(e)); + return t.lastIndex = e.lastIndex, t + }(e); + case _: + return i = e, Ln ? ke(Ln.call(i)) : {} + } + var i + }(e, f, l) + } + } + a || (a = new Xn); + var p = a.get(e); + if (p) return p; + a.set(e, s), ls(e) ? e.forEach((function (r) { + s.add(ur(r, t, n, r, e, a)) + })) : is(e) && e.forEach((function (r, i) { + s.set(i, ur(r, t, n, i, e, a)) + })); + var v = d ? o : (c ? u ? oo : io : u ? Ts : _s)(e); + return Ot(v || e, (function (r, i) { + v && (r = e[i = r]), nr(s, i, ur(r, t, n, i, e, a)) + })), s + } + + function cr(e, t, n) { + var r = n.length; + if (null == e) return !r; + for (e = ke(e); r--;) { + var i = n[r], a = t[i], s = e[i]; + if (s === o && !(i in e) || !a(s)) return !1 + } + return !0 + } + + function dr(e, t, n) { + if ("function" != typeof e) throw new Ae(a); + return _o((function () { + e.apply(o, n) + }), t) + } + + function fr(e, t, n, r) { + var i = -1, o = Pt, a = !0, s = e.length, l = [], u = t.length; + if (!s) return l; + n && (t = Tt(t, Zt(n))), r ? (o = _t, a = !1) : t.length >= 200 && (o = en, a = !1, t = new Gn(t)); + e:for (; ++i < s;) { + var c = e[i], d = null == n ? c : n(c); + if (c = r || 0 !== c ? c : 0, a && d === d) { + for (var f = u; f--;) if (t[f] === d) continue e; + l.push(c) + } else o(t, d, r) || l.push(c) + } + return l + } + + zn.templateSettings = { + escape: J, + evaluate: ee, + interpolate: te, + variable: "", + imports: {_: zn} + }, zn.prototype = Hn.prototype, zn.prototype.constructor = zn, Wn.prototype = Vn(Hn.prototype), Wn.prototype.constructor = Wn, qn.prototype = Vn(Hn.prototype), qn.prototype.constructor = qn, Kn.prototype.clear = function () { + this.__data__ = In ? In(null) : {}, this.size = 0 + }, Kn.prototype.delete = function (e) { + var t = this.has(e) && delete this.__data__[e]; + return this.size -= t ? 1 : 0, t + }, Kn.prototype.get = function (e) { + var t = this.__data__; + if (In) { + var n = t[e]; + return n === s ? o : n + } + return Re.call(t, e) ? t[e] : o + }, Kn.prototype.has = function (e) { + var t = this.__data__; + return In ? t[e] !== o : Re.call(t, e) + }, Kn.prototype.set = function (e, t) { + var n = this.__data__; + return this.size += this.has(e) ? 0 : 1, n[e] = In && t === o ? s : t, this + }, $n.prototype.clear = function () { + this.__data__ = [], this.size = 0 + }, $n.prototype.delete = function (e) { + var t = this.__data__, n = rr(t, e); + return !(n < 0) && (n == t.length - 1 ? t.pop() : Ge.call(t, n, 1), --this.size, !0) + }, $n.prototype.get = function (e) { + var t = this.__data__, n = rr(t, e); + return n < 0 ? o : t[n][1] + }, $n.prototype.has = function (e) { + return rr(this.__data__, e) > -1 + }, $n.prototype.set = function (e, t) { + var n = this.__data__, r = rr(n, e); + return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this + }, Qn.prototype.clear = function () { + this.size = 0, this.__data__ = {hash: new Kn, map: new (kn || $n), string: new Kn} + }, Qn.prototype.delete = function (e) { + var t = co(this, e).delete(e); + return this.size -= t ? 1 : 0, t + }, Qn.prototype.get = function (e) { + return co(this, e).get(e) + }, Qn.prototype.has = function (e) { + return co(this, e).has(e) + }, Qn.prototype.set = function (e, t) { + var n = co(this, e), r = n.size; + return n.set(e, t), this.size += n.size == r ? 0 : 1, this + }, Gn.prototype.add = Gn.prototype.push = function (e) { + return this.__data__.set(e, s), this + }, Gn.prototype.has = function (e) { + return this.__data__.has(e) + }, Xn.prototype.clear = function () { + this.__data__ = new $n, this.size = 0 + }, Xn.prototype.delete = function (e) { + var t = this.__data__, n = t.delete(e); + return this.size = t.size, n + }, Xn.prototype.get = function (e) { + return this.__data__.get(e) + }, Xn.prototype.has = function (e) { + return this.__data__.has(e) + }, Xn.prototype.set = function (e, t) { + var n = this.__data__; + if (n instanceof $n) { + var r = n.__data__; + if (!kn || r.length < 199) return r.push([e, t]), this.size = ++n.size, this; + n = this.__data__ = new Qn(r) + } + return n.set(e, t), this.size = n.size, this + }; + var hr = Ti(wr), pr = Ti(Cr, !0); + + function vr(e, t) { + var n = !0; + return hr(e, (function (e, r, i) { + return n = !!t(e, r, i) + })), n + } + + function gr(e, t, n) { + for (var r = -1, i = e.length; ++r < i;) { + var a = e[r], s = t(a); + if (null != s && (l === o ? s === s && !cs(s) : n(s, l))) var l = s, u = a + } + return u + } + + function yr(e, t) { + var n = []; + return hr(e, (function (e, r, i) { + t(e, r, i) && n.push(e) + })), n + } + + function mr(e, t, n, r, i) { + var o = -1, a = e.length; + for (n || (n = bo), i || (i = []); ++o < a;) { + var s = e[o]; + t > 0 && n(s) ? t > 1 ? mr(s, t - 1, n, r, i) : Rt(i, s) : r || (i[i.length] = s) + } + return i + } + + var br = Ri(), xr = Ri(!0); + + function wr(e, t) { + return e && br(e, t, _s) + } + + function Cr(e, t) { + return e && xr(e, t, _s) + } + + function Dr(e, t) { + return Ft(t, (function (t) { + return Ja(e[t]) + })) + } + + function Sr(e, t) { + for (var n = 0, r = (t = xi(t, e)).length; null != e && n < r;) e = e[Lo(t[n++])]; + return n && n == r ? e : o + } + + function Er(e, t, n) { + var r = t(e); + return Ka(e) ? r : Rt(r, n(e)) + } + + function kr(e) { + return null == e ? e === o ? "[object Undefined]" : "[object Null]" : Ze && Ze in ke(e) ? function (e) { + var t = Re.call(e, Ze), n = e[Ze]; + try { + e[Ze] = o; + var r = !0 + } catch (a) { + } + var i = Be.call(e); + r && (t ? e[Ze] = n : delete e[Ze]); + return i + }(e) : function (e) { + return Be.call(e) + }(e) + } + + function jr(e, t) { + return e > t + } + + function Or(e, t) { + return null != e && Re.call(e, t) + } + + function Ar(e, t) { + return null != e && t in ke(e) + } + + function Ir(e, t, r) { + for (var i = r ? _t : Pt, a = e[0].length, s = e.length, l = s, u = n(s), c = 1 / 0, d = []; l--;) { + var f = e[l]; + l && t && (f = Tt(f, Zt(t))), c = xn(f.length, c), u[l] = !r && (t || a >= 120 && f.length >= 120) ? new Gn(l && f) : o + } + f = e[0]; + var h = -1, p = u[0]; + e:for (; ++h < a && d.length < c;) { + var v = f[h], g = t ? t(v) : v; + if (v = r || 0 !== v ? v : 0, !(p ? en(p, g) : i(d, g, r))) { + for (l = s; --l;) { + var y = u[l]; + if (!(y ? en(y, g) : i(e[l], g, r))) continue e + } + p && p.push(g), d.push(v) + } + } + return d + } + + function Fr(e, t, n) { + var r = null == (e = Ao(e, t = xi(t, e))) ? e : e[Lo(Zo(t))]; + return null == r ? o : kt(r, e, n) + } + + function Pr(e) { + return rs(e) && kr(e) == b + } + + function _r(e, t, n, r, i) { + return e === t || (null == e || null == t || !rs(e) && !rs(t) ? e !== e && t !== t : function (e, t, n, r, i, a) { + var s = Ka(e), l = Ka(t), u = s ? x : go(e), c = l ? x : go(t), + d = (u = u == b ? O : u) == O, f = (c = c == b ? O : c) == O, h = u == c; + if (h && Xa(e)) { + if (!Xa(t)) return !1; + s = !0, d = !1 + } + if (h && !d) return a || (a = new Xn), s || ds(e) ? no(e, t, n, r, i, a) : function (e, t, n, r, i, o, a) { + switch (n) { + case N: + if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; + e = e.buffer, t = t.buffer; + case R: + return !(e.byteLength != t.byteLength || !o(new We(e), new We(t))); + case w: + case C: + case j: + return Va(+e, +t); + case D: + return e.name == t.name && e.message == t.message; + case I: + case P: + return e == t + ""; + case k: + var s = un; + case F: + var l = 1 & r; + if (s || (s = fn), e.size != t.size && !l) return !1; + var u = a.get(e); + if (u) return u == t; + r |= 2, a.set(e, t); + var c = no(s(e), s(t), r, i, o, a); + return a.delete(e), c; + case _: + if (Ln) return Ln.call(e) == Ln.call(t) + } + return !1 + }(e, t, u, n, r, i, a); + if (!(1 & n)) { + var p = d && Re.call(e, "__wrapped__"), v = f && Re.call(t, "__wrapped__"); + if (p || v) { + var g = p ? e.value() : e, y = v ? t.value() : t; + return a || (a = new Xn), i(g, y, n, r, a) + } + } + if (!h) return !1; + return a || (a = new Xn), function (e, t, n, r, i, a) { + var s = 1 & n, l = io(e), u = l.length, c = io(t).length; + if (u != c && !s) return !1; + var d = u; + for (; d--;) { + var f = l[d]; + if (!(s ? f in t : Re.call(t, f))) return !1 + } + var h = a.get(e), p = a.get(t); + if (h && p) return h == t && p == e; + var v = !0; + a.set(e, t), a.set(t, e); + var g = s; + for (; ++d < u;) { + var y = e[f = l[d]], m = t[f]; + if (r) var b = s ? r(m, y, f, t, e, a) : r(y, m, f, e, t, a); + if (!(b === o ? y === m || i(y, m, n, r, a) : b)) { + v = !1; + break + } + g || (g = "constructor" == f) + } + if (v && !g) { + var x = e.constructor, w = t.constructor; + x == w || !("constructor" in e) || !("constructor" in t) || "function" == typeof x && x instanceof x && "function" == typeof w && w instanceof w || (v = !1) + } + return a.delete(e), a.delete(t), v + }(e, t, n, r, i, a) + }(e, t, n, r, _r, i)) + } + + function Tr(e, t, n, r) { + var i = n.length, a = i, s = !r; + if (null == e) return !a; + for (e = ke(e); i--;) { + var l = n[i]; + if (s && l[2] ? l[1] !== e[l[0]] : !(l[0] in e)) return !1 + } + for (; ++i < a;) { + var u = (l = n[i])[0], c = e[u], d = l[1]; + if (s && l[2]) { + if (c === o && !(u in e)) return !1 + } else { + var f = new Xn; + if (r) var h = r(c, d, u, e, t, f); + if (!(h === o ? _r(d, c, 3, r, f) : h)) return !1 + } + } + return !0 + } + + function Rr(e) { + return !(!ns(e) || (t = e, Me && Me in t)) && (Ja(e) ? ze : be).test(Uo(e)); + var t + } + + function Nr(e) { + return "function" == typeof e ? e : null == e ? ol : "object" == typeof e ? Ka(e) ? Vr(e[0], e[1]) : zr(e) : pl(e) + } + + function Mr(e) { + if (!Eo(e)) return $t(e); + var t = []; + for (var n in ke(e)) Re.call(e, n) && "constructor" != n && t.push(n); + return t + } + + function Br(e) { + if (!ns(e)) return function (e) { + var t = []; + if (null != e) for (var n in ke(e)) t.push(n); + return t + }(e); + var t = Eo(e), n = []; + for (var r in e) ("constructor" != r || !t && Re.call(e, r)) && n.push(r); + return n + } + + function Lr(e, t) { + return e < t + } + + function Ur(e, t) { + var r = -1, i = Qa(e) ? n(e.length) : []; + return hr(e, (function (e, n, o) { + i[++r] = t(e, n, o) + })), i + } + + function zr(e) { + var t = fo(e); + return 1 == t.length && t[0][2] ? jo(t[0][0], t[0][1]) : function (n) { + return n === e || Tr(n, e, t) + } + } + + function Vr(e, t) { + return Co(e) && ko(t) ? jo(Lo(e), t) : function (n) { + var r = Os(n, e); + return r === o && r === t ? As(n, e) : _r(t, r, 3) + } + } + + function Hr(e, t, n, r, i) { + e !== t && br(t, (function (a, s) { + if (i || (i = new Xn), ns(a)) !function (e, t, n, r, i, a, s) { + var l = Fo(e, n), u = Fo(t, n), c = s.get(u); + if (c) return void tr(e, n, c); + var d = a ? a(l, u, n + "", e, t, s) : o, f = d === o; + if (f) { + var h = Ka(u), p = !h && Xa(u), v = !h && !p && ds(u); + d = u, h || p || v ? Ka(l) ? d = l : Ga(l) ? d = Ii(l) : p ? (f = !1, d = Si(u, !0)) : v ? (f = !1, d = ki(u, !0)) : d = [] : as(u) || qa(u) ? (d = l, qa(l) ? d = bs(l) : ns(l) && !Ja(l) || (d = mo(u))) : f = !1 + } + f && (s.set(u, d), i(d, u, r, a, s), s.delete(u)); + tr(e, n, d) + }(e, t, s, n, Hr, r, i); else { + var l = r ? r(Fo(e, s), a, s + "", e, t, i) : o; + l === o && (l = a), tr(e, s, l) + } + }), Ts) + } + + function Wr(e, t) { + var n = e.length; + if (n) return xo(t += t < 0 ? n : 0, n) ? e[t] : o + } + + function qr(e, t, n) { + t = t.length ? Tt(t, (function (e) { + return Ka(e) ? function (t) { + return Sr(t, 1 === e.length ? e[0] : e) + } : e + })) : [ol]; + var r = -1; + t = Tt(t, Zt(uo())); + var i = Ur(e, (function (e, n, i) { + var o = Tt(t, (function (t) { + return t(e) + })); + return {criteria: o, index: ++r, value: e} + })); + return function (e, t) { + var n = e.length; + for (e.sort(t); n--;) e[n] = e[n].value; + return e + }(i, (function (e, t) { + return function (e, t, n) { + var r = -1, i = e.criteria, o = t.criteria, a = i.length, s = n.length; + for (; ++r < a;) { + var l = ji(i[r], o[r]); + if (l) return r >= s ? l : l * ("desc" == n[r] ? -1 : 1) + } + return e.index - t.index + }(e, t, n) + })) + } + + function Kr(e, t, n) { + for (var r = -1, i = t.length, o = {}; ++r < i;) { + var a = t[r], s = Sr(e, a); + n(s, a) && ei(o, xi(a, e), s) + } + return o + } + + function $r(e, t, n, r) { + var i = r ? Ht : Vt, o = -1, a = t.length, s = e; + for (e === t && (t = Ii(t)), n && (s = Tt(e, Zt(n))); ++o < a;) for (var l = 0, u = t[o], c = n ? n(u) : u; (l = i(s, c, l, r)) > -1;) s !== e && Ge.call(s, l, 1), Ge.call(e, l, 1); + return e + } + + function Qr(e, t) { + for (var n = e ? t.length : 0, r = n - 1; n--;) { + var i = t[n]; + if (n == r || i !== o) { + var o = i; + xo(i) ? Ge.call(e, i, 1) : fi(e, i) + } + } + return e + } + + function Gr(e, t) { + return e + vt(Dn() * (t - e + 1)) + } + + function Xr(e, t) { + var n = ""; + if (!e || t < 1 || t > v) return n; + do { + t % 2 && (n += e), (t = vt(t / 2)) && (e += e) + } while (t); + return n + } + + function Yr(e, t) { + return To(Oo(e, t, ol), e + "") + } + + function Zr(e) { + return Zn(Vs(e)) + } + + function Jr(e, t) { + var n = Vs(e); + return Mo(n, lr(t, 0, n.length)) + } + + function ei(e, t, n, r) { + if (!ns(e)) return e; + for (var i = -1, a = (t = xi(t, e)).length, s = a - 1, l = e; null != l && ++i < a;) { + var u = Lo(t[i]), c = n; + if ("__proto__" === u || "constructor" === u || "prototype" === u) return e; + if (i != s) { + var d = l[u]; + (c = r ? r(d, u, l) : o) === o && (c = ns(d) ? d : xo(t[i + 1]) ? [] : {}) + } + nr(l, u, c), l = l[u] + } + return e + } + + var ti = Fn ? function (e, t) { + return Fn.set(e, t), e + } : ol, ni = tt ? function (e, t) { + return tt(e, "toString", {configurable: !0, enumerable: !1, value: nl(t), writable: !0}) + } : ol; + + function ri(e) { + return Mo(Vs(e)) + } + + function ii(e, t, r) { + var i = -1, o = e.length; + t < 0 && (t = -t > o ? 0 : o + t), (r = r > o ? o : r) < 0 && (r += o), o = t > r ? 0 : r - t >>> 0, t >>>= 0; + for (var a = n(o); ++i < o;) a[i] = e[i + t]; + return a + } + + function oi(e, t) { + var n; + return hr(e, (function (e, r, i) { + return !(n = t(e, r, i)) + })), !!n + } + + function ai(e, t, n) { + var r = 0, i = null == e ? r : e.length; + if ("number" == typeof t && t === t && i <= 2147483647) { + for (; r < i;) { + var o = r + i >>> 1, a = e[o]; + null !== a && !cs(a) && (n ? a <= t : a < t) ? r = o + 1 : i = o + } + return i + } + return si(e, t, ol, n) + } + + function si(e, t, n, r) { + var i = 0, a = null == e ? 0 : e.length; + if (0 === a) return 0; + for (var s = (t = n(t)) !== t, l = null === t, u = cs(t), c = t === o; i < a;) { + var d = vt((i + a) / 2), f = n(e[d]), h = f !== o, p = null === f, v = f === f, g = cs(f); + if (s) var y = r || v; else y = c ? v && (r || h) : l ? v && h && (r || !p) : u ? v && h && !p && (r || !g) : !p && !g && (r ? f <= t : f < t); + y ? i = d + 1 : a = d + } + return xn(a, 4294967294) + } + + function li(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var a = e[n], s = t ? t(a) : a; + if (!n || !Va(s, l)) { + var l = s; + o[i++] = 0 === a ? 0 : a + } + } + return o + } + + function ui(e) { + return "number" == typeof e ? e : cs(e) ? g : +e + } + + function ci(e) { + if ("string" == typeof e) return e; + if (Ka(e)) return Tt(e, ci) + ""; + if (cs(e)) return Un ? Un.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function di(e, t, n) { + var r = -1, i = Pt, o = e.length, a = !0, s = [], l = s; + if (n) a = !1, i = _t; else if (o >= 200) { + var u = t ? null : Xi(e); + if (u) return fn(u); + a = !1, i = en, l = new Gn + } else l = t ? [] : s; + e:for (; ++r < o;) { + var c = e[r], d = t ? t(c) : c; + if (c = n || 0 !== c ? c : 0, a && d === d) { + for (var f = l.length; f--;) if (l[f] === d) continue e; + t && l.push(d), s.push(c) + } else i(l, d, n) || (l !== s && l.push(d), s.push(c)) + } + return s + } + + function fi(e, t) { + return null == (e = Ao(e, t = xi(t, e))) || delete e[Lo(Zo(t))] + } + + function hi(e, t, n, r) { + return ei(e, t, n(Sr(e, t)), r) + } + + function pi(e, t, n, r) { + for (var i = e.length, o = r ? i : -1; (r ? o-- : ++o < i) && t(e[o], o, e);) ; + return n ? ii(e, r ? 0 : o, r ? o + 1 : i) : ii(e, r ? o + 1 : 0, r ? i : o) + } + + function vi(e, t) { + var n = e; + return n instanceof qn && (n = n.value()), Nt(t, (function (e, t) { + return t.func.apply(t.thisArg, Rt([e], t.args)) + }), n) + } + + function gi(e, t, r) { + var i = e.length; + if (i < 2) return i ? di(e[0]) : []; + for (var o = -1, a = n(i); ++o < i;) for (var s = e[o], l = -1; ++l < i;) l != o && (a[o] = fr(a[o] || s, e[l], t, r)); + return di(mr(a, 1), t, r) + } + + function yi(e, t, n) { + for (var r = -1, i = e.length, a = t.length, s = {}; ++r < i;) { + var l = r < a ? t[r] : o; + n(s, e[r], l) + } + return s + } + + function mi(e) { + return Ga(e) ? e : [] + } + + function bi(e) { + return "function" == typeof e ? e : ol + } + + function xi(e, t) { + return Ka(e) ? e : Co(e, t) ? [e] : Bo(xs(e)) + } + + var wi = Yr; + + function Ci(e, t, n) { + var r = e.length; + return n = n === o ? r : n, !t && n >= r ? e : ii(e, t, n) + } + + var Di = rt || function (e) { + return pt.clearTimeout(e) + }; + + function Si(e, t) { + if (t) return e.slice(); + var n = e.length, r = qe ? qe(n) : new e.constructor(n); + return e.copy(r), r + } + + function Ei(e) { + var t = new e.constructor(e.byteLength); + return new We(t).set(new We(e)), t + } + + function ki(e, t) { + var n = t ? Ei(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.length) + } + + function ji(e, t) { + if (e !== t) { + var n = e !== o, r = null === e, i = e === e, a = cs(e), s = t !== o, l = null === t, + u = t === t, c = cs(t); + if (!l && !c && !a && e > t || a && s && u && !l && !c || r && s && u || !n && u || !i) return 1; + if (!r && !a && !c && e < t || c && n && i && !r && !a || l && n && i || !s && i || !u) return -1 + } + return 0 + } + + function Oi(e, t, r, i) { + for (var o = -1, a = e.length, s = r.length, l = -1, u = t.length, c = bn(a - s, 0), d = n(u + c), f = !i; ++l < u;) d[l] = t[l]; + for (; ++o < s;) (f || o < a) && (d[r[o]] = e[o]); + for (; c--;) d[l++] = e[o++]; + return d + } + + function Ai(e, t, r, i) { + for (var o = -1, a = e.length, s = -1, l = r.length, u = -1, c = t.length, d = bn(a - l, 0), f = n(d + c), h = !i; ++o < d;) f[o] = e[o]; + for (var p = o; ++u < c;) f[p + u] = t[u]; + for (; ++s < l;) (h || o < a) && (f[p + r[s]] = e[o++]); + return f + } + + function Ii(e, t) { + var r = -1, i = e.length; + for (t || (t = n(i)); ++r < i;) t[r] = e[r]; + return t + } + + function Fi(e, t, n, r) { + var i = !n; + n || (n = {}); + for (var a = -1, s = t.length; ++a < s;) { + var l = t[a], u = r ? r(n[l], e[l], l, n, e) : o; + u === o && (u = e[l]), i ? ar(n, l, u) : nr(n, l, u) + } + return n + } + + function Pi(e, t) { + return function (n, r) { + var i = Ka(n) ? jt : ir, o = t ? t() : {}; + return i(n, e, uo(r, 2), o) + } + } + + function _i(e) { + return Yr((function (t, n) { + var r = -1, i = n.length, a = i > 1 ? n[i - 1] : o, s = i > 2 ? n[2] : o; + for (a = e.length > 3 && "function" == typeof a ? (i--, a) : o, s && wo(n[0], n[1], s) && (a = i < 3 ? o : a, i = 1), t = ke(t); ++r < i;) { + var l = n[r]; + l && e(t, l, r, a) + } + return t + })) + } + + function Ti(e, t) { + return function (n, r) { + if (null == n) return n; + if (!Qa(n)) return e(n, r); + for (var i = n.length, o = t ? i : -1, a = ke(n); (t ? o-- : ++o < i) && !1 !== r(a[o], o, a);) ; + return n + } + } + + function Ri(e) { + return function (t, n, r) { + for (var i = -1, o = ke(t), a = r(t), s = a.length; s--;) { + var l = a[e ? s : ++i]; + if (!1 === n(o[l], l, o)) break + } + return t + } + } + + function Ni(e) { + return function (t) { + var n = ln(t = xs(t)) ? vn(t) : o, r = n ? n[0] : t.charAt(0), + i = n ? Ci(n, 1).join("") : t.slice(1); + return r[e]() + i + } + } + + function Mi(e) { + return function (t) { + return Nt(Js(qs(t).replace(Je, "")), e, "") + } + } + + function Bi(e) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new e; + case 1: + return new e(t[0]); + case 2: + return new e(t[0], t[1]); + case 3: + return new e(t[0], t[1], t[2]); + case 4: + return new e(t[0], t[1], t[2], t[3]); + case 5: + return new e(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new e(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6]) + } + var n = Vn(e.prototype), r = e.apply(n, t); + return ns(r) ? r : n + } + } + + function Li(e) { + return function (t, n, r) { + var i = ke(t); + if (!Qa(t)) { + var a = uo(n, 3); + t = _s(t), n = function (e) { + return a(i[e], e, i) + } + } + var s = e(t, n, r); + return s > -1 ? i[a ? t[s] : s] : o + } + } + + function Ui(e) { + return ro((function (t) { + var n = t.length, r = n, i = Wn.prototype.thru; + for (e && t.reverse(); r--;) { + var s = t[r]; + if ("function" != typeof s) throw new Ae(a); + if (i && !l && "wrapper" == so(s)) var l = new Wn([], !0) + } + for (r = l ? r : n; ++r < n;) { + var u = so(s = t[r]), c = "wrapper" == u ? ao(s) : o; + l = c && Do(c[0]) && 424 == c[1] && !c[4].length && 1 == c[9] ? l[so(c[0])].apply(l, c[3]) : 1 == s.length && Do(s) ? l[u]() : l.thru(s) + } + return function () { + var e = arguments, r = e[0]; + if (l && 1 == e.length && Ka(r)) return l.plant(r).value(); + for (var i = 0, o = n ? t[i].apply(this, e) : r; ++i < n;) o = t[i].call(this, o); + return o + } + })) + } + + function zi(e, t, r, i, a, s, l, u, c, d) { + var h = t & f, p = 1 & t, v = 2 & t, g = 24 & t, y = 512 & t, m = v ? o : Bi(e); + return function o() { + for (var f = arguments.length, b = n(f), x = f; x--;) b[x] = arguments[x]; + if (g) var w = lo(o), C = rn(b, w); + if (i && (b = Oi(b, i, a, g)), s && (b = Ai(b, s, l, g)), f -= C, g && f < d) { + var D = dn(b, w); + return Qi(e, t, zi, o.placeholder, r, b, D, u, c, d - f) + } + var S = p ? r : this, E = v ? S[e] : e; + return f = b.length, u ? b = Io(b, u) : y && f > 1 && b.reverse(), h && c < f && (b.length = c), this && this !== pt && this instanceof o && (E = m || Bi(E)), E.apply(S, b) + } + } + + function Vi(e, t) { + return function (n, r) { + return function (e, t, n, r) { + return wr(e, (function (e, i, o) { + t(r, n(e), i, o) + })), r + }(n, e, t(r), {}) + } + } + + function Hi(e, t) { + return function (n, r) { + var i; + if (n === o && r === o) return t; + if (n !== o && (i = n), r !== o) { + if (i === o) return r; + "string" == typeof n || "string" == typeof r ? (n = ci(n), r = ci(r)) : (n = ui(n), r = ui(r)), i = e(n, r) + } + return i + } + } + + function Wi(e) { + return ro((function (t) { + return t = Tt(t, Zt(uo())), Yr((function (n) { + var r = this; + return e(t, (function (e) { + return kt(e, r, n) + })) + })) + })) + } + + function qi(e, t) { + var n = (t = t === o ? " " : ci(t)).length; + if (n < 2) return n ? Xr(t, e) : t; + var r = Xr(t, ht(e / pn(t))); + return ln(t) ? Ci(vn(r), 0, e).join("") : r.slice(0, e) + } + + function Ki(e) { + return function (t, r, i) { + return i && "number" != typeof i && wo(t, r, i) && (r = i = o), t = vs(t), r === o ? (r = t, t = 0) : r = vs(r), function (e, t, r, i) { + for (var o = -1, a = bn(ht((t - e) / (r || 1)), 0), s = n(a); a--;) s[i ? a : ++o] = e, e += r; + return s + }(t, r, i = i === o ? t < r ? 1 : -1 : vs(i), e) + } + } + + function $i(e) { + return function (t, n) { + return "string" == typeof t && "string" == typeof n || (t = ms(t), n = ms(n)), e(t, n) + } + } + + function Qi(e, t, n, r, i, a, s, l, u, f) { + var h = 8 & t; + t |= h ? c : d, 4 & (t &= ~(h ? d : c)) || (t &= -4); + var p = [e, t, i, h ? a : o, h ? s : o, h ? o : a, h ? o : s, l, u, f], v = n.apply(o, p); + return Do(e) && Po(v, p), v.placeholder = r, Ro(v, e, t) + } + + function Gi(e) { + var t = Ee[e]; + return function (e, n) { + if (e = ms(e), (n = null == n ? 0 : xn(gs(n), 292)) && bt(e)) { + var r = (xs(e) + "e").split("e"); + return +((r = (xs(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n)) + } + return t(e) + } + } + + var Xi = On && 1 / fn(new On([, -0]))[1] == p ? function (e) { + return new On(e) + } : cl; + + function Yi(e) { + return function (t) { + var n = go(t); + return n == k ? un(t) : n == F ? hn(t) : function (e, t) { + return Tt(t, (function (t) { + return [t, e[t]] + })) + }(t, e(t)) + } + } + + function Zi(e, t, r, i, s, p, v, g) { + var y = 2 & t; + if (!y && "function" != typeof e) throw new Ae(a); + var m = i ? i.length : 0; + if (m || (t &= -97, i = s = o), v = v === o ? v : bn(gs(v), 0), g = g === o ? g : gs(g), m -= s ? s.length : 0, t & d) { + var b = i, x = s; + i = s = o + } + var w = y ? o : ao(e), C = [e, t, r, i, s, b, x, p, v, g]; + if (w && function (e, t) { + var n = e[1], r = t[1], i = n | r, o = i < 131, + a = r == f && 8 == n || r == f && n == h && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n; + if (!o && !a) return e; + 1 & r && (e[2] = t[2], i |= 1 & n ? 0 : 4); + var s = t[3]; + if (s) { + var u = e[3]; + e[3] = u ? Oi(u, s, t[4]) : s, e[4] = u ? dn(e[3], l) : t[4] + } + (s = t[5]) && (u = e[5], e[5] = u ? Ai(u, s, t[6]) : s, e[6] = u ? dn(e[5], l) : t[6]); + (s = t[7]) && (e[7] = s); + r & f && (e[8] = null == e[8] ? t[8] : xn(e[8], t[8])); + null == e[9] && (e[9] = t[9]); + e[0] = t[0], e[1] = i + }(C, w), e = C[0], t = C[1], r = C[2], i = C[3], s = C[4], !(g = C[9] = C[9] === o ? y ? 0 : e.length : bn(C[9] - m, 0)) && 24 & t && (t &= -25), t && 1 != t) D = 8 == t || t == u ? function (e, t, r) { + var i = Bi(e); + return function a() { + for (var s = arguments.length, l = n(s), u = s, c = lo(a); u--;) l[u] = arguments[u]; + var d = s < 3 && l[0] !== c && l[s - 1] !== c ? [] : dn(l, c); + return (s -= d.length) < r ? Qi(e, t, zi, a.placeholder, o, l, d, o, o, r - s) : kt(this && this !== pt && this instanceof a ? i : e, this, l) + } + }(e, t, g) : t != c && 33 != t || s.length ? zi.apply(o, C) : function (e, t, r, i) { + var o = 1 & t, a = Bi(e); + return function t() { + for (var s = -1, l = arguments.length, u = -1, c = i.length, d = n(c + l), f = this && this !== pt && this instanceof t ? a : e; ++u < c;) d[u] = i[u]; + for (; l--;) d[u++] = arguments[++s]; + return kt(f, o ? r : this, d) + } + }(e, t, r, i); else var D = function (e, t, n) { + var r = 1 & t, i = Bi(e); + return function t() { + return (this && this !== pt && this instanceof t ? i : e).apply(r ? n : this, arguments) + } + }(e, t, r); + return Ro((w ? ti : Po)(D, C), e, t) + } + + function Ji(e, t, n, r) { + return e === o || Va(e, Pe[n]) && !Re.call(r, n) ? t : e + } + + function eo(e, t, n, r, i, a) { + return ns(e) && ns(t) && (a.set(t, e), Hr(e, t, o, eo, a), a.delete(t)), e + } + + function to(e) { + return as(e) ? o : e + } + + function no(e, t, n, r, i, a) { + var s = 1 & n, l = e.length, u = t.length; + if (l != u && !(s && u > l)) return !1; + var c = a.get(e), d = a.get(t); + if (c && d) return c == t && d == e; + var f = -1, h = !0, p = 2 & n ? new Gn : o; + for (a.set(e, t), a.set(t, e); ++f < l;) { + var v = e[f], g = t[f]; + if (r) var y = s ? r(g, v, f, t, e, a) : r(v, g, f, e, t, a); + if (y !== o) { + if (y) continue; + h = !1; + break + } + if (p) { + if (!Bt(t, (function (e, t) { + if (!en(p, t) && (v === e || i(v, e, n, r, a))) return p.push(t) + }))) { + h = !1; + break + } + } else if (v !== g && !i(v, g, n, r, a)) { + h = !1; + break + } + } + return a.delete(e), a.delete(t), h + } + + function ro(e) { + return To(Oo(e, o, $o), e + "") + } + + function io(e) { + return Er(e, _s, po) + } + + function oo(e) { + return Er(e, Ts, vo) + } + + var ao = Fn ? function (e) { + return Fn.get(e) + } : cl; + + function so(e) { + for (var t = e.name + "", n = Pn[t], r = Re.call(Pn, t) ? n.length : 0; r--;) { + var i = n[r], o = i.func; + if (null == o || o == e) return i.name + } + return t + } + + function lo(e) { + return (Re.call(zn, "placeholder") ? zn : e).placeholder + } + + function uo() { + var e = zn.iteratee || al; + return e = e === al ? Nr : e, arguments.length ? e(arguments[0], arguments[1]) : e + } + + function co(e, t) { + var n = e.__data__; + return function (e) { + var t = typeof e; + return "string" == t || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== e : null === e + }(t) ? n["string" == typeof t ? "string" : "hash"] : n.map + } + + function fo(e) { + for (var t = _s(e), n = t.length; n--;) { + var r = t[n], i = e[r]; + t[n] = [r, i, ko(i)] + } + return t + } + + function ho(e, t) { + var n = function (e, t) { + return null == e ? o : e[t] + }(e, t); + return Rr(n) ? n : o + } + + var po = gt ? function (e) { + return null == e ? [] : (e = ke(e), Ft(gt(e), (function (t) { + return Qe.call(e, t) + }))) + } : yl, vo = gt ? function (e) { + for (var t = []; e;) Rt(t, po(e)), e = Ke(e); + return t + } : yl, go = kr; + + function yo(e, t, n) { + for (var r = -1, i = (t = xi(t, e)).length, o = !1; ++r < i;) { + var a = Lo(t[r]); + if (!(o = null != e && n(e, a))) break; + e = e[a] + } + return o || ++r != i ? o : !!(i = null == e ? 0 : e.length) && ts(i) && xo(a, i) && (Ka(e) || qa(e)) + } + + function mo(e) { + return "function" != typeof e.constructor || Eo(e) ? {} : Vn(Ke(e)) + } + + function bo(e) { + return Ka(e) || qa(e) || !!(Xe && e && e[Xe]) + } + + function xo(e, t) { + var n = typeof e; + return !!(t = null == t ? v : t) && ("number" == n || "symbol" != n && we.test(e)) && e > -1 && e % 1 == 0 && e < t + } + + function wo(e, t, n) { + if (!ns(n)) return !1; + var r = typeof t; + return !!("number" == r ? Qa(n) && xo(t, n.length) : "string" == r && t in n) && Va(n[t], e) + } + + function Co(e, t) { + if (Ka(e)) return !1; + var n = typeof e; + return !("number" != n && "symbol" != n && "boolean" != n && null != e && !cs(e)) || (re.test(e) || !ne.test(e) || null != t && e in ke(t)) + } + + function Do(e) { + var t = so(e), n = zn[t]; + if ("function" != typeof n || !(t in qn.prototype)) return !1; + if (e === n) return !0; + var r = ao(n); + return !!r && e === r[0] + } + + (En && go(new En(new ArrayBuffer(1))) != N || kn && go(new kn) != k || jn && go(jn.resolve()) != A || On && go(new On) != F || An && go(new An) != T) && (go = function (e) { + var t = kr(e), n = t == O ? e.constructor : o, r = n ? Uo(n) : ""; + if (r) switch (r) { + case _n: + return N; + case Tn: + return k; + case Rn: + return A; + case Nn: + return F; + case Mn: + return T + } + return t + }); + var So = _e ? Ja : ml; + + function Eo(e) { + var t = e && e.constructor; + return e === ("function" == typeof t && t.prototype || Pe) + } + + function ko(e) { + return e === e && !ns(e) + } + + function jo(e, t) { + return function (n) { + return null != n && (n[e] === t && (t !== o || e in ke(n))) + } + } + + function Oo(e, t, r) { + return t = bn(t === o ? e.length - 1 : t, 0), function () { + for (var i = arguments, o = -1, a = bn(i.length - t, 0), s = n(a); ++o < a;) s[o] = i[t + o]; + o = -1; + for (var l = n(t + 1); ++o < t;) l[o] = i[o]; + return l[t] = r(s), kt(e, this, l) + } + } + + function Ao(e, t) { + return t.length < 2 ? e : Sr(e, ii(t, 0, -1)) + } + + function Io(e, t) { + for (var n = e.length, r = xn(t.length, n), i = Ii(e); r--;) { + var a = t[r]; + e[r] = xo(a, n) ? i[a] : o + } + return e + } + + function Fo(e, t) { + if (("constructor" !== t || "function" !== typeof e[t]) && "__proto__" != t) return e[t] + } + + var Po = No(ti), _o = ft || function (e, t) { + return pt.setTimeout(e, t) + }, To = No(ni); + + function Ro(e, t, n) { + var r = t + ""; + return To(e, function (e, t) { + var n = t.length; + if (!n) return e; + var r = n - 1; + return t[r] = (n > 1 ? "& " : "") + t[r], t = t.join(n > 2 ? ", " : " "), e.replace(ue, "{\n/* [wrapped with " + t + "] */\n") + }(r, function (e, t) { + return Ot(m, (function (n) { + var r = "_." + n[0]; + t & n[1] && !Pt(e, r) && e.push(r) + })), e.sort() + }(function (e) { + var t = e.match(ce); + return t ? t[1].split(de) : [] + }(r), n))) + } + + function No(e) { + var t = 0, n = 0; + return function () { + var r = wn(), i = 16 - (r - n); + if (n = r, i > 0) { + if (++t >= 800) return arguments[0] + } else t = 0; + return e.apply(o, arguments) + } + } + + function Mo(e, t) { + var n = -1, r = e.length, i = r - 1; + for (t = t === o ? r : t; ++n < t;) { + var a = Gr(n, i), s = e[a]; + e[a] = e[n], e[n] = s + } + return e.length = t, e + } + + var Bo = function (e) { + var t = Na(e, (function (e) { + return 500 === n.size && n.clear(), e + })), n = t.cache; + return t + }((function (e) { + var t = []; + return 46 === e.charCodeAt(0) && t.push(""), e.replace(ie, (function (e, n, r, i) { + t.push(r ? i.replace(pe, "$1") : n || e) + })), t + })); + + function Lo(e) { + if ("string" == typeof e || cs(e)) return e; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function Uo(e) { + if (null != e) { + try { + return Te.call(e) + } catch (t) { + } + try { + return e + "" + } catch (t) { + } + } + return "" + } + + function zo(e) { + if (e instanceof qn) return e.clone(); + var t = new Wn(e.__wrapped__, e.__chain__); + return t.__actions__ = Ii(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t + } + + var Vo = Yr((function (e, t) { + return Ga(e) ? fr(e, mr(t, 1, Ga, !0)) : [] + })), Ho = Yr((function (e, t) { + var n = Zo(t); + return Ga(n) && (n = o), Ga(e) ? fr(e, mr(t, 1, Ga, !0), uo(n, 2)) : [] + })), Wo = Yr((function (e, t) { + var n = Zo(t); + return Ga(n) && (n = o), Ga(e) ? fr(e, mr(t, 1, Ga, !0), o, n) : [] + })); + + function qo(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : gs(n); + return i < 0 && (i = bn(r + i, 0)), zt(e, uo(t, 3), i) + } + + function Ko(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = r - 1; + return n !== o && (i = gs(n), i = n < 0 ? bn(r + i, 0) : xn(i, r - 1)), zt(e, uo(t, 3), i, !0) + } + + function $o(e) { + return (null == e ? 0 : e.length) ? mr(e, 1) : [] + } + + function Qo(e) { + return e && e.length ? e[0] : o + } + + var Go = Yr((function (e) { + var t = Tt(e, mi); + return t.length && t[0] === e[0] ? Ir(t) : [] + })), Xo = Yr((function (e) { + var t = Zo(e), n = Tt(e, mi); + return t === Zo(n) ? t = o : n.pop(), n.length && n[0] === e[0] ? Ir(n, uo(t, 2)) : [] + })), Yo = Yr((function (e) { + var t = Zo(e), n = Tt(e, mi); + return (t = "function" == typeof t ? t : o) && n.pop(), n.length && n[0] === e[0] ? Ir(n, o, t) : [] + })); + + function Zo(e) { + var t = null == e ? 0 : e.length; + return t ? e[t - 1] : o + } + + var Jo = Yr(ea); + + function ea(e, t) { + return e && e.length && t && t.length ? $r(e, t) : e + } + + var ta = ro((function (e, t) { + var n = null == e ? 0 : e.length, r = sr(e, t); + return Qr(e, Tt(t, (function (e) { + return xo(e, n) ? +e : e + })).sort(ji)), r + })); + + function na(e) { + return null == e ? e : Sn.call(e) + } + + var ra = Yr((function (e) { + return di(mr(e, 1, Ga, !0)) + })), ia = Yr((function (e) { + var t = Zo(e); + return Ga(t) && (t = o), di(mr(e, 1, Ga, !0), uo(t, 2)) + })), oa = Yr((function (e) { + var t = Zo(e); + return t = "function" == typeof t ? t : o, di(mr(e, 1, Ga, !0), o, t) + })); + + function aa(e) { + if (!e || !e.length) return []; + var t = 0; + return e = Ft(e, (function (e) { + if (Ga(e)) return t = bn(e.length, t), !0 + })), Xt(t, (function (t) { + return Tt(e, Kt(t)) + })) + } + + function sa(e, t) { + if (!e || !e.length) return []; + var n = aa(e); + return null == t ? n : Tt(n, (function (e) { + return kt(t, o, e) + })) + } + + var la = Yr((function (e, t) { + return Ga(e) ? fr(e, t) : [] + })), ua = Yr((function (e) { + return gi(Ft(e, Ga)) + })), ca = Yr((function (e) { + var t = Zo(e); + return Ga(t) && (t = o), gi(Ft(e, Ga), uo(t, 2)) + })), da = Yr((function (e) { + var t = Zo(e); + return t = "function" == typeof t ? t : o, gi(Ft(e, Ga), o, t) + })), fa = Yr(aa); + var ha = Yr((function (e) { + var t = e.length, n = t > 1 ? e[t - 1] : o; + return n = "function" == typeof n ? (e.pop(), n) : o, sa(e, n) + })); + + function pa(e) { + var t = zn(e); + return t.__chain__ = !0, t + } + + function va(e, t) { + return t(e) + } + + var ga = ro((function (e) { + var t = e.length, n = t ? e[0] : 0, r = this.__wrapped__, i = function (t) { + return sr(t, e) + }; + return !(t > 1 || this.__actions__.length) && r instanceof qn && xo(n) ? ((r = r.slice(n, +n + (t ? 1 : 0))).__actions__.push({ + func: va, + args: [i], + thisArg: o + }), new Wn(r, this.__chain__).thru((function (e) { + return t && !e.length && e.push(o), e + }))) : this.thru(i) + })); + var ya = Pi((function (e, t, n) { + Re.call(e, n) ? ++e[n] : ar(e, n, 1) + })); + var ma = Li(qo), ba = Li(Ko); + + function xa(e, t) { + return (Ka(e) ? Ot : hr)(e, uo(t, 3)) + } + + function wa(e, t) { + return (Ka(e) ? At : pr)(e, uo(t, 3)) + } + + var Ca = Pi((function (e, t, n) { + Re.call(e, n) ? e[n].push(t) : ar(e, n, [t]) + })); + var Da = Yr((function (e, t, r) { + var i = -1, o = "function" == typeof t, a = Qa(e) ? n(e.length) : []; + return hr(e, (function (e) { + a[++i] = o ? kt(t, e, r) : Fr(e, t, r) + })), a + })), Sa = Pi((function (e, t, n) { + ar(e, n, t) + })); + + function Ea(e, t) { + return (Ka(e) ? Tt : Ur)(e, uo(t, 3)) + } + + var ka = Pi((function (e, t, n) { + e[n ? 0 : 1].push(t) + }), (function () { + return [[], []] + })); + var ja = Yr((function (e, t) { + if (null == e) return []; + var n = t.length; + return n > 1 && wo(e, t[0], t[1]) ? t = [] : n > 2 && wo(t[0], t[1], t[2]) && (t = [t[0]]), qr(e, mr(t, 1), []) + })), Oa = ut || function () { + return pt.Date.now() + }; + + function Aa(e, t, n) { + return t = n ? o : t, t = e && null == t ? e.length : t, Zi(e, f, o, o, o, o, t) + } + + function Ia(e, t) { + var n; + if ("function" != typeof t) throw new Ae(a); + return e = gs(e), function () { + return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = o), n + } + } + + var Fa = Yr((function (e, t, n) { + var r = 1; + if (n.length) { + var i = dn(n, lo(Fa)); + r |= c + } + return Zi(e, r, t, n, i) + })), Pa = Yr((function (e, t, n) { + var r = 3; + if (n.length) { + var i = dn(n, lo(Pa)); + r |= c + } + return Zi(t, r, e, n, i) + })); + + function _a(e, t, n) { + var r, i, s, l, u, c, d = 0, f = !1, h = !1, p = !0; + if ("function" != typeof e) throw new Ae(a); + + function v(t) { + var n = r, a = i; + return r = i = o, d = t, l = e.apply(a, n) + } + + function g(e) { + return d = e, u = _o(m, t), f ? v(e) : l + } + + function y(e) { + var n = e - c; + return c === o || n >= t || n < 0 || h && e - d >= s + } + + function m() { + var e = Oa(); + if (y(e)) return b(e); + u = _o(m, function (e) { + var n = t - (e - c); + return h ? xn(n, s - (e - d)) : n + }(e)) + } + + function b(e) { + return u = o, p && r ? v(e) : (r = i = o, l) + } + + function x() { + var e = Oa(), n = y(e); + if (r = arguments, i = this, c = e, n) { + if (u === o) return g(c); + if (h) return Di(u), u = _o(m, t), v(c) + } + return u === o && (u = _o(m, t)), l + } + + return t = ms(t) || 0, ns(n) && (f = !!n.leading, s = (h = "maxWait" in n) ? bn(ms(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p), x.cancel = function () { + u !== o && Di(u), d = 0, r = c = i = u = o + }, x.flush = function () { + return u === o ? l : b(Oa()) + }, x + } + + var Ta = Yr((function (e, t) { + return dr(e, 1, t) + })), Ra = Yr((function (e, t, n) { + return dr(e, ms(t) || 0, n) + })); + + function Na(e, t) { + if ("function" != typeof e || null != t && "function" != typeof t) throw new Ae(a); + var n = function n() { + var r = arguments, i = t ? t.apply(this, r) : r[0], o = n.cache; + if (o.has(i)) return o.get(i); + var a = e.apply(this, r); + return n.cache = o.set(i, a) || o, a + }; + return n.cache = new (Na.Cache || Qn), n + } + + function Ma(e) { + if ("function" != typeof e) throw new Ae(a); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !e.call(this); + case 1: + return !e.call(this, t[0]); + case 2: + return !e.call(this, t[0], t[1]); + case 3: + return !e.call(this, t[0], t[1], t[2]) + } + return !e.apply(this, t) + } + } + + Na.Cache = Qn; + var Ba = wi((function (e, t) { + var n = (t = 1 == t.length && Ka(t[0]) ? Tt(t[0], Zt(uo())) : Tt(mr(t, 1), Zt(uo()))).length; + return Yr((function (r) { + for (var i = -1, o = xn(r.length, n); ++i < o;) r[i] = t[i].call(this, r[i]); + return kt(e, this, r) + })) + })), La = Yr((function (e, t) { + var n = dn(t, lo(La)); + return Zi(e, c, o, t, n) + })), Ua = Yr((function (e, t) { + var n = dn(t, lo(Ua)); + return Zi(e, d, o, t, n) + })), za = ro((function (e, t) { + return Zi(e, h, o, o, o, t) + })); + + function Va(e, t) { + return e === t || e !== e && t !== t + } + + var Ha = $i(jr), Wa = $i((function (e, t) { + return e >= t + })), qa = Pr(function () { + return arguments + }()) ? Pr : function (e) { + return rs(e) && Re.call(e, "callee") && !Qe.call(e, "callee") + }, Ka = n.isArray, $a = xt ? Zt(xt) : function (e) { + return rs(e) && kr(e) == R + }; + + function Qa(e) { + return null != e && ts(e.length) && !Ja(e) + } + + function Ga(e) { + return rs(e) && Qa(e) + } + + var Xa = mt || ml, Ya = wt ? Zt(wt) : function (e) { + return rs(e) && kr(e) == C + }; + + function Za(e) { + if (!rs(e)) return !1; + var t = kr(e); + return t == D || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !as(e) + } + + function Ja(e) { + if (!ns(e)) return !1; + var t = kr(e); + return t == S || t == E || "[object AsyncFunction]" == t || "[object Proxy]" == t + } + + function es(e) { + return "number" == typeof e && e == gs(e) + } + + function ts(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= v + } + + function ns(e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t) + } + + function rs(e) { + return null != e && "object" == typeof e + } + + var is = Ct ? Zt(Ct) : function (e) { + return rs(e) && go(e) == k + }; + + function os(e) { + return "number" == typeof e || rs(e) && kr(e) == j + } + + function as(e) { + if (!rs(e) || kr(e) != O) return !1; + var t = Ke(e); + if (null === t) return !0; + var n = Re.call(t, "constructor") && t.constructor; + return "function" == typeof n && n instanceof n && Te.call(n) == Le + } + + var ss = Dt ? Zt(Dt) : function (e) { + return rs(e) && kr(e) == I + }; + var ls = St ? Zt(St) : function (e) { + return rs(e) && go(e) == F + }; + + function us(e) { + return "string" == typeof e || !Ka(e) && rs(e) && kr(e) == P + } + + function cs(e) { + return "symbol" == typeof e || rs(e) && kr(e) == _ + } + + var ds = Et ? Zt(Et) : function (e) { + return rs(e) && ts(e.length) && !!st[kr(e)] + }; + var fs = $i(Lr), hs = $i((function (e, t) { + return e <= t + })); + + function ps(e) { + if (!e) return []; + if (Qa(e)) return us(e) ? vn(e) : Ii(e); + if (Ye && e[Ye]) return function (e) { + for (var t, n = []; !(t = e.next()).done;) n.push(t.value); + return n + }(e[Ye]()); + var t = go(e); + return (t == k ? un : t == F ? fn : Vs)(e) + } + + function vs(e) { + return e ? (e = ms(e)) === p || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e === e ? e : 0 : 0 === e ? e : 0 + } + + function gs(e) { + var t = vs(e), n = t % 1; + return t === t ? n ? t - n : t : 0 + } + + function ys(e) { + return e ? lr(gs(e), 0, y) : 0 + } + + function ms(e) { + if ("number" == typeof e) return e; + if (cs(e)) return g; + if (ns(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = ns(t) ? t + "" : t + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = Yt(e); + var n = me.test(e); + return n || xe.test(e) ? dt(e.slice(2), n ? 2 : 8) : ye.test(e) ? g : +e + } + + function bs(e) { + return Fi(e, Ts(e)) + } + + function xs(e) { + return null == e ? "" : ci(e) + } + + var ws = _i((function (e, t) { + if (Eo(t) || Qa(t)) Fi(t, _s(t), e); else for (var n in t) Re.call(t, n) && nr(e, n, t[n]) + })), Cs = _i((function (e, t) { + Fi(t, Ts(t), e) + })), Ds = _i((function (e, t, n, r) { + Fi(t, Ts(t), e, r) + })), Ss = _i((function (e, t, n, r) { + Fi(t, _s(t), e, r) + })), Es = ro(sr); + var ks = Yr((function (e, t) { + e = ke(e); + var n = -1, r = t.length, i = r > 2 ? t[2] : o; + for (i && wo(t[0], t[1], i) && (r = 1); ++n < r;) for (var a = t[n], s = Ts(a), l = -1, u = s.length; ++l < u;) { + var c = s[l], d = e[c]; + (d === o || Va(d, Pe[c]) && !Re.call(e, c)) && (e[c] = a[c]) + } + return e + })), js = Yr((function (e) { + return e.push(o, eo), kt(Ns, o, e) + })); + + function Os(e, t, n) { + var r = null == e ? o : Sr(e, t); + return r === o ? n : r + } + + function As(e, t) { + return null != e && yo(e, t, Ar) + } + + var Is = Vi((function (e, t, n) { + null != t && "function" != typeof t.toString && (t = Be.call(t)), e[t] = n + }), nl(ol)), Fs = Vi((function (e, t, n) { + null != t && "function" != typeof t.toString && (t = Be.call(t)), Re.call(e, t) ? e[t].push(n) : e[t] = [n] + }), uo), Ps = Yr(Fr); + + function _s(e) { + return Qa(e) ? Yn(e) : Mr(e) + } + + function Ts(e) { + return Qa(e) ? Yn(e, !0) : Br(e) + } + + var Rs = _i((function (e, t, n) { + Hr(e, t, n) + })), Ns = _i((function (e, t, n, r) { + Hr(e, t, n, r) + })), Ms = ro((function (e, t) { + var n = {}; + if (null == e) return n; + var r = !1; + t = Tt(t, (function (t) { + return t = xi(t, e), r || (r = t.length > 1), t + })), Fi(e, oo(e), n), r && (n = ur(n, 7, to)); + for (var i = t.length; i--;) fi(n, t[i]); + return n + })); + var Bs = ro((function (e, t) { + return null == e ? {} : function (e, t) { + return Kr(e, t, (function (t, n) { + return As(e, n) + })) + }(e, t) + })); + + function Ls(e, t) { + if (null == e) return {}; + var n = Tt(oo(e), (function (e) { + return [e] + })); + return t = uo(t), Kr(e, n, (function (e, n) { + return t(e, n[0]) + })) + } + + var Us = Yi(_s), zs = Yi(Ts); + + function Vs(e) { + return null == e ? [] : Jt(e, _s(e)) + } + + var Hs = Mi((function (e, t, n) { + return t = t.toLowerCase(), e + (n ? Ws(t) : t) + })); + + function Ws(e) { + return Zs(xs(e).toLowerCase()) + } + + function qs(e) { + return (e = xs(e)) && e.replace(Ce, on).replace(et, "") + } + + var Ks = Mi((function (e, t, n) { + return e + (n ? "-" : "") + t.toLowerCase() + })), $s = Mi((function (e, t, n) { + return e + (n ? " " : "") + t.toLowerCase() + })), Qs = Ni("toLowerCase"); + var Gs = Mi((function (e, t, n) { + return e + (n ? "_" : "") + t.toLowerCase() + })); + var Xs = Mi((function (e, t, n) { + return e + (n ? " " : "") + Zs(t) + })); + var Ys = Mi((function (e, t, n) { + return e + (n ? " " : "") + t.toUpperCase() + })), Zs = Ni("toUpperCase"); + + function Js(e, t, n) { + return e = xs(e), (t = n ? o : t) === o ? function (e) { + return it.test(e) + }(e) ? function (e) { + return e.match(nt) || [] + }(e) : function (e) { + return e.match(fe) || [] + }(e) : e.match(t) || [] + } + + var el = Yr((function (e, t) { + try { + return kt(e, o, t) + } catch (n) { + return Za(n) ? n : new i(n) + } + })), tl = ro((function (e, t) { + return Ot(t, (function (t) { + t = Lo(t), ar(e, t, Fa(e[t], e)) + })), e + })); + + function nl(e) { + return function () { + return e + } + } + + var rl = Ui(), il = Ui(!0); + + function ol(e) { + return e + } + + function al(e) { + return Nr("function" == typeof e ? e : ur(e, 1)) + } + + var sl = Yr((function (e, t) { + return function (n) { + return Fr(n, e, t) + } + })), ll = Yr((function (e, t) { + return function (n) { + return Fr(e, n, t) + } + })); + + function ul(e, t, n) { + var r = _s(t), i = Dr(t, r); + null != n || ns(t) && (i.length || !r.length) || (n = t, t = e, e = this, i = Dr(t, _s(t))); + var o = !(ns(n) && "chain" in n) || !!n.chain, a = Ja(e); + return Ot(i, (function (n) { + var r = t[n]; + e[n] = r, a && (e.prototype[n] = function () { + var t = this.__chain__; + if (o || t) { + var n = e(this.__wrapped__), i = n.__actions__ = Ii(this.__actions__); + return i.push({func: r, args: arguments, thisArg: e}), n.__chain__ = t, n + } + return r.apply(e, Rt([this.value()], arguments)) + }) + })), e + } + + function cl() { + } + + var dl = Wi(Tt), fl = Wi(It), hl = Wi(Bt); + + function pl(e) { + return Co(e) ? Kt(Lo(e)) : function (e) { + return function (t) { + return Sr(t, e) + } + }(e) + } + + var vl = Ki(), gl = Ki(!0); + + function yl() { + return [] + } + + function ml() { + return !1 + } + + var bl = Hi((function (e, t) { + return e + t + }), 0), xl = Gi("ceil"), wl = Hi((function (e, t) { + return e / t + }), 1), Cl = Gi("floor"); + var Dl = Hi((function (e, t) { + return e * t + }), 1), Sl = Gi("round"), El = Hi((function (e, t) { + return e - t + }), 0); + return zn.after = function (e, t) { + if ("function" != typeof t) throw new Ae(a); + return e = gs(e), function () { + if (--e < 1) return t.apply(this, arguments) + } + }, zn.ary = Aa, zn.assign = ws, zn.assignIn = Cs, zn.assignInWith = Ds, zn.assignWith = Ss, zn.at = Es, zn.before = Ia, zn.bind = Fa, zn.bindAll = tl, zn.bindKey = Pa, zn.castArray = function () { + if (!arguments.length) return []; + var e = arguments[0]; + return Ka(e) ? e : [e] + }, zn.chain = pa, zn.chunk = function (e, t, r) { + t = (r ? wo(e, t, r) : t === o) ? 1 : bn(gs(t), 0); + var i = null == e ? 0 : e.length; + if (!i || t < 1) return []; + for (var a = 0, s = 0, l = n(ht(i / t)); a < i;) l[s++] = ii(e, a, a += t); + return l + }, zn.compact = function (e) { + for (var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; ++t < n;) { + var o = e[t]; + o && (i[r++] = o) + } + return i + }, zn.concat = function () { + var e = arguments.length; + if (!e) return []; + for (var t = n(e - 1), r = arguments[0], i = e; i--;) t[i - 1] = arguments[i]; + return Rt(Ka(r) ? Ii(r) : [r], mr(t, 1)) + }, zn.cond = function (e) { + var t = null == e ? 0 : e.length, n = uo(); + return e = t ? Tt(e, (function (e) { + if ("function" != typeof e[1]) throw new Ae(a); + return [n(e[0]), e[1]] + })) : [], Yr((function (n) { + for (var r = -1; ++r < t;) { + var i = e[r]; + if (kt(i[0], this, n)) return kt(i[1], this, n) + } + })) + }, zn.conforms = function (e) { + return function (e) { + var t = _s(e); + return function (n) { + return cr(n, e, t) + } + }(ur(e, 1)) + }, zn.constant = nl, zn.countBy = ya, zn.create = function (e, t) { + var n = Vn(e); + return null == t ? n : or(n, t) + }, zn.curry = function e(t, n, r) { + var i = Zi(t, 8, o, o, o, o, o, n = r ? o : n); + return i.placeholder = e.placeholder, i + }, zn.curryRight = function e(t, n, r) { + var i = Zi(t, u, o, o, o, o, o, n = r ? o : n); + return i.placeholder = e.placeholder, i + }, zn.debounce = _a, zn.defaults = ks, zn.defaultsDeep = js, zn.defer = Ta, zn.delay = Ra, zn.difference = Vo, zn.differenceBy = Ho, zn.differenceWith = Wo, zn.drop = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, (t = n || t === o ? 1 : gs(t)) < 0 ? 0 : t, r) : [] + }, zn.dropRight = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, 0, (t = r - (t = n || t === o ? 1 : gs(t))) < 0 ? 0 : t) : [] + }, zn.dropRightWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !0, !0) : [] + }, zn.dropWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !0) : [] + }, zn.fill = function (e, t, n, r) { + var i = null == e ? 0 : e.length; + return i ? (n && "number" != typeof n && wo(e, t, n) && (n = 0, r = i), function (e, t, n, r) { + var i = e.length; + for ((n = gs(n)) < 0 && (n = -n > i ? 0 : i + n), (r = r === o || r > i ? i : gs(r)) < 0 && (r += i), r = n > r ? 0 : ys(r); n < r;) e[n++] = t; + return e + }(e, t, n, r)) : [] + }, zn.filter = function (e, t) { + return (Ka(e) ? Ft : yr)(e, uo(t, 3)) + }, zn.flatMap = function (e, t) { + return mr(Ea(e, t), 1) + }, zn.flatMapDeep = function (e, t) { + return mr(Ea(e, t), p) + }, zn.flatMapDepth = function (e, t, n) { + return n = n === o ? 1 : gs(n), mr(Ea(e, t), n) + }, zn.flatten = $o, zn.flattenDeep = function (e) { + return (null == e ? 0 : e.length) ? mr(e, p) : [] + }, zn.flattenDepth = function (e, t) { + return (null == e ? 0 : e.length) ? mr(e, t = t === o ? 1 : gs(t)) : [] + }, zn.flip = function (e) { + return Zi(e, 512) + }, zn.flow = rl, zn.flowRight = il, zn.fromPairs = function (e) { + for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n;) { + var i = e[t]; + r[i[0]] = i[1] + } + return r + }, zn.functions = function (e) { + return null == e ? [] : Dr(e, _s(e)) + }, zn.functionsIn = function (e) { + return null == e ? [] : Dr(e, Ts(e)) + }, zn.groupBy = Ca, zn.initial = function (e) { + return (null == e ? 0 : e.length) ? ii(e, 0, -1) : [] + }, zn.intersection = Go, zn.intersectionBy = Xo, zn.intersectionWith = Yo, zn.invert = Is, zn.invertBy = Fs, zn.invokeMap = Da, zn.iteratee = al, zn.keyBy = Sa, zn.keys = _s, zn.keysIn = Ts, zn.map = Ea, zn.mapKeys = function (e, t) { + var n = {}; + return t = uo(t, 3), wr(e, (function (e, r, i) { + ar(n, t(e, r, i), e) + })), n + }, zn.mapValues = function (e, t) { + var n = {}; + return t = uo(t, 3), wr(e, (function (e, r, i) { + ar(n, r, t(e, r, i)) + })), n + }, zn.matches = function (e) { + return zr(ur(e, 1)) + }, zn.matchesProperty = function (e, t) { + return Vr(e, ur(t, 1)) + }, zn.memoize = Na, zn.merge = Rs, zn.mergeWith = Ns, zn.method = sl, zn.methodOf = ll, zn.mixin = ul, zn.negate = Ma, zn.nthArg = function (e) { + return e = gs(e), Yr((function (t) { + return Wr(t, e) + })) + }, zn.omit = Ms, zn.omitBy = function (e, t) { + return Ls(e, Ma(uo(t))) + }, zn.once = function (e) { + return Ia(2, e) + }, zn.orderBy = function (e, t, n, r) { + return null == e ? [] : (Ka(t) || (t = null == t ? [] : [t]), Ka(n = r ? o : n) || (n = null == n ? [] : [n]), qr(e, t, n)) + }, zn.over = dl, zn.overArgs = Ba, zn.overEvery = fl, zn.overSome = hl, zn.partial = La, zn.partialRight = Ua, zn.partition = ka, zn.pick = Bs, zn.pickBy = Ls, zn.property = pl, zn.propertyOf = function (e) { + return function (t) { + return null == e ? o : Sr(e, t) + } + }, zn.pull = Jo, zn.pullAll = ea, zn.pullAllBy = function (e, t, n) { + return e && e.length && t && t.length ? $r(e, t, uo(n, 2)) : e + }, zn.pullAllWith = function (e, t, n) { + return e && e.length && t && t.length ? $r(e, t, o, n) : e + }, zn.pullAt = ta, zn.range = vl, zn.rangeRight = gl, zn.rearg = za, zn.reject = function (e, t) { + return (Ka(e) ? Ft : yr)(e, Ma(uo(t, 3))) + }, zn.remove = function (e, t) { + var n = []; + if (!e || !e.length) return n; + var r = -1, i = [], o = e.length; + for (t = uo(t, 3); ++r < o;) { + var a = e[r]; + t(a, r, e) && (n.push(a), i.push(r)) + } + return Qr(e, i), n + }, zn.rest = function (e, t) { + if ("function" != typeof e) throw new Ae(a); + return Yr(e, t = t === o ? t : gs(t)) + }, zn.reverse = na,zn.sampleSize = function (e, t, n) { + return t = (n ? wo(e, t, n) : t === o) ? 1 : gs(t), (Ka(e) ? Jn : Jr)(e, t) + },zn.set = function (e, t, n) { + return null == e ? e : ei(e, t, n) + },zn.setWith = function (e, t, n, r) { + return r = "function" == typeof r ? r : o, null == e ? e : ei(e, t, n, r) + },zn.shuffle = function (e) { + return (Ka(e) ? er : ri)(e) + },zn.slice = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? (n && "number" != typeof n && wo(e, t, n) ? (t = 0, n = r) : (t = null == t ? 0 : gs(t), n = n === o ? r : gs(n)), ii(e, t, n)) : [] + },zn.sortBy = ja,zn.sortedUniq = function (e) { + return e && e.length ? li(e) : [] + },zn.sortedUniqBy = function (e, t) { + return e && e.length ? li(e, uo(t, 2)) : [] + },zn.split = function (e, t, n) { + return n && "number" != typeof n && wo(e, t, n) && (t = n = o), (n = n === o ? y : n >>> 0) ? (e = xs(e)) && ("string" == typeof t || null != t && !ss(t)) && !(t = ci(t)) && ln(e) ? Ci(vn(e), 0, n) : e.split(t, n) : [] + },zn.spread = function (e, t) { + if ("function" != typeof e) throw new Ae(a); + return t = null == t ? 0 : bn(gs(t), 0), Yr((function (n) { + var r = n[t], i = Ci(n, 0, t); + return r && Rt(i, r), kt(e, this, i) + })) + },zn.tail = function (e) { + var t = null == e ? 0 : e.length; + return t ? ii(e, 1, t) : [] + },zn.take = function (e, t, n) { + return e && e.length ? ii(e, 0, (t = n || t === o ? 1 : gs(t)) < 0 ? 0 : t) : [] + },zn.takeRight = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, (t = r - (t = n || t === o ? 1 : gs(t))) < 0 ? 0 : t, r) : [] + },zn.takeRightWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !1, !0) : [] + },zn.takeWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3)) : [] + },zn.tap = function (e, t) { + return t(e), e + },zn.throttle = function (e, t, n) { + var r = !0, i = !0; + if ("function" != typeof e) throw new Ae(a); + return ns(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), _a(e, t, { + leading: r, + maxWait: t, + trailing: i + }) + },zn.thru = va,zn.toArray = ps,zn.toPairs = Us,zn.toPairsIn = zs,zn.toPath = function (e) { + return Ka(e) ? Tt(e, Lo) : cs(e) ? [e] : Ii(Bo(xs(e))) + },zn.toPlainObject = bs,zn.transform = function (e, t, n) { + var r = Ka(e), i = r || Xa(e) || ds(e); + if (t = uo(t, 4), null == n) { + var o = e && e.constructor; + n = i ? r ? new o : [] : ns(e) && Ja(o) ? Vn(Ke(e)) : {} + } + return (i ? Ot : wr)(e, (function (e, r, i) { + return t(n, e, r, i) + })), n + },zn.unary = function (e) { + return Aa(e, 1) + },zn.union = ra,zn.unionBy = ia,zn.unionWith = oa,zn.uniq = function (e) { + return e && e.length ? di(e) : [] + },zn.uniqBy = function (e, t) { + return e && e.length ? di(e, uo(t, 2)) : [] + },zn.uniqWith = function (e, t) { + return t = "function" == typeof t ? t : o, e && e.length ? di(e, o, t) : [] + },zn.unset = function (e, t) { + return null == e || fi(e, t) + },zn.unzip = aa,zn.unzipWith = sa,zn.update = function (e, t, n) { + return null == e ? e : hi(e, t, bi(n)) + },zn.updateWith = function (e, t, n, r) { + return r = "function" == typeof r ? r : o, null == e ? e : hi(e, t, bi(n), r) + },zn.values = Vs,zn.valuesIn = function (e) { + return null == e ? [] : Jt(e, Ts(e)) + },zn.without = la,zn.words = Js,zn.wrap = function (e, t) { + return La(bi(t), e) + },zn.xor = ua,zn.xorBy = ca,zn.xorWith = da,zn.zip = fa,zn.zipObject = function (e, t) { + return yi(e || [], t || [], nr) + },zn.zipObjectDeep = function (e, t) { + return yi(e || [], t || [], ei) + },zn.zipWith = ha,zn.entries = Us,zn.entriesIn = zs,zn.extend = Cs,zn.extendWith = Ds,ul(zn, zn),zn.add = bl,zn.attempt = el,zn.camelCase = Hs,zn.capitalize = Ws,zn.ceil = xl,zn.clamp = function (e, t, n) { + return n === o && (n = t, t = o), n !== o && (n = (n = ms(n)) === n ? n : 0), t !== o && (t = (t = ms(t)) === t ? t : 0), lr(ms(e), t, n) + },zn.clone = function (e) { + return ur(e, 4) + },zn.cloneDeep = function (e) { + return ur(e, 5) + },zn.cloneDeepWith = function (e, t) { + return ur(e, 5, t = "function" == typeof t ? t : o) + },zn.cloneWith = function (e, t) { + return ur(e, 4, t = "function" == typeof t ? t : o) + },zn.conformsTo = function (e, t) { + return null == t || cr(e, t, _s(t)) + },zn.deburr = qs,zn.defaultTo = function (e, t) { + return null == e || e !== e ? t : e + },zn.divide = wl,zn.endsWith = function (e, t, n) { + e = xs(e), t = ci(t); + var r = e.length, i = n = n === o ? r : lr(gs(n), 0, r); + return (n -= t.length) >= 0 && e.slice(n, i) == t + },zn.eq = Va,zn.escape = function (e) { + return (e = xs(e)) && Z.test(e) ? e.replace(X, an) : e + },zn.escapeRegExp = function (e) { + return (e = xs(e)) && ae.test(e) ? e.replace(oe, "\\$&") : e + },zn.every = function (e, t, n) { + var r = Ka(e) ? It : vr; + return n && wo(e, t, n) && (t = o), r(e, uo(t, 3)) + },zn.find = ma,zn.findIndex = qo,zn.findKey = function (e, t) { + return Ut(e, uo(t, 3), wr) + },zn.findLast = ba,zn.findLastIndex = Ko,zn.findLastKey = function (e, t) { + return Ut(e, uo(t, 3), Cr) + },zn.floor = Cl,zn.forEach = xa,zn.forEachRight = wa,zn.forIn = function (e, t) { + return null == e ? e : br(e, uo(t, 3), Ts) + },zn.forInRight = function (e, t) { + return null == e ? e : xr(e, uo(t, 3), Ts) + },zn.forOwn = function (e, t) { + return e && wr(e, uo(t, 3)) + },zn.forOwnRight = function (e, t) { + return e && Cr(e, uo(t, 3)) + },zn.get = Os,zn.gt = Ha,zn.gte = Wa,zn.has = function (e, t) { + return null != e && yo(e, t, Or) + },zn.hasIn = As,zn.head = Qo,zn.identity = ol,zn.includes = function (e, t, n, r) { + e = Qa(e) ? e : Vs(e), n = n && !r ? gs(n) : 0; + var i = e.length; + return n < 0 && (n = bn(i + n, 0)), us(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && Vt(e, t, n) > -1 + },zn.indexOf = function (e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : gs(n); + return i < 0 && (i = bn(r + i, 0)), Vt(e, t, i) + },zn.inRange = function (e, t, n) { + return t = vs(t), n === o ? (n = t, t = 0) : n = vs(n), function (e, t, n) { + return e >= xn(t, n) && e < bn(t, n) + }(e = ms(e), t, n) + },zn.invoke = Ps,zn.isArguments = qa,zn.isArray = Ka,zn.isArrayBuffer = $a,zn.isArrayLike = Qa,zn.isArrayLikeObject = Ga,zn.isBoolean = function (e) { + return !0 === e || !1 === e || rs(e) && kr(e) == w + },zn.isBuffer = Xa,zn.isDate = Ya,zn.isElement = function (e) { + return rs(e) && 1 === e.nodeType && !as(e) + },zn.isEmpty = function (e) { + if (null == e) return !0; + if (Qa(e) && (Ka(e) || "string" == typeof e || "function" == typeof e.splice || Xa(e) || ds(e) || qa(e))) return !e.length; + var t = go(e); + if (t == k || t == F) return !e.size; + if (Eo(e)) return !Mr(e).length; + for (var n in e) if (Re.call(e, n)) return !1; + return !0 + },zn.isEqual = function (e, t) { + return _r(e, t) + },zn.isEqualWith = function (e, t, n) { + var r = (n = "function" == typeof n ? n : o) ? n(e, t) : o; + return r === o ? _r(e, t, o, n) : !!r + },zn.isError = Za,zn.isFinite = function (e) { + return "number" == typeof e && bt(e) + },zn.isFunction = Ja,zn.isInteger = es,zn.isLength = ts,zn.isMap = is,zn.isMatch = function (e, t) { + return e === t || Tr(e, t, fo(t)) + },zn.isMatchWith = function (e, t, n) { + return n = "function" == typeof n ? n : o, Tr(e, t, fo(t), n) + },zn.isNaN = function (e) { + return os(e) && e != +e + },zn.isNative = function (e) { + if (So(e)) throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill."); + return Rr(e) + },zn.isNil = function (e) { + return null == e + },zn.isNull = function (e) { + return null === e + },zn.isNumber = os,zn.isObject = ns,zn.isObjectLike = rs,zn.isPlainObject = as,zn.isRegExp = ss,zn.isSafeInteger = function (e) { + return es(e) && e >= -9007199254740991 && e <= v + },zn.isSet = ls,zn.isString = us,zn.isSymbol = cs,zn.isTypedArray = ds,zn.isUndefined = function (e) { + return e === o + },zn.isWeakMap = function (e) { + return rs(e) && go(e) == T + },zn.isWeakSet = function (e) { + return rs(e) && "[object WeakSet]" == kr(e) + },zn.join = function (e, t) { + return null == e ? "" : Lt.call(e, t) + },zn.kebabCase = Ks,zn.last = Zo,zn.lastIndexOf = function (e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = r; + return n !== o && (i = (i = gs(n)) < 0 ? bn(r + i, 0) : xn(i, r - 1)), t === t ? function (e, t, n) { + for (var r = n + 1; r--;) if (e[r] === t) return r; + return r + }(e, t, i) : zt(e, Wt, i, !0) + },zn.lowerCase = $s,zn.lowerFirst = Qs,zn.lt = fs,zn.lte = hs,zn.max = function (e) { + return e && e.length ? gr(e, ol, jr) : o + },zn.maxBy = function (e, t) { + return e && e.length ? gr(e, uo(t, 2), jr) : o + },zn.mean = function (e) { + return qt(e, ol) + },zn.meanBy = function (e, t) { + return qt(e, uo(t, 2)) + },zn.min = function (e) { + return e && e.length ? gr(e, ol, Lr) : o + },zn.minBy = function (e, t) { + return e && e.length ? gr(e, uo(t, 2), Lr) : o + },zn.stubArray = yl,zn.stubFalse = ml,zn.stubObject = function () { + return {} + },zn.stubString = function () { + return "" + },zn.stubTrue = function () { + return !0 + },zn.multiply = Dl,zn.nth = function (e, t) { + return e && e.length ? Wr(e, gs(t)) : o + },zn.noConflict = function () { + return pt._ === this && (pt._ = Ue), this + },zn.noop = cl,zn.now = Oa,zn.pad = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + if (!t || r >= t) return e; + var i = (t - r) / 2; + return qi(vt(i), n) + e + qi(ht(i), n) + },zn.padEnd = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + return t && r < t ? e + qi(t - r, n) : e + },zn.padStart = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + return t && r < t ? qi(t - r, n) + e : e + },zn.parseInt = function (e, t, n) { + return n || null == t ? t = 0 : t && (t = +t), Cn(xs(e).replace(se, ""), t || 0) + },zn.random = function (e, t, n) { + if (n && "boolean" != typeof n && wo(e, t, n) && (t = n = o), n === o && ("boolean" == typeof t ? (n = t, t = o) : "boolean" == typeof e && (n = e, e = o)), e === o && t === o ? (e = 0, t = 1) : (e = vs(e), t === o ? (t = e, e = 0) : t = vs(t)), e > t) { + var r = e; + e = t, t = r + } + if (n || e % 1 || t % 1) { + var i = Dn(); + return xn(e + i * (t - e + ct("1e-" + ((i + "").length - 1))), t) + } + return Gr(e, t) + },zn.reduce = function (e, t, n) { + var r = Ka(e) ? Nt : Qt, i = arguments.length < 3; + return r(e, uo(t, 4), n, i, hr) + },zn.reduceRight = function (e, t, n) { + var r = Ka(e) ? Mt : Qt, i = arguments.length < 3; + return r(e, uo(t, 4), n, i, pr) + },zn.repeat = function (e, t, n) { + return t = (n ? wo(e, t, n) : t === o) ? 1 : gs(t), Xr(xs(e), t) + },zn.replace = function () { + var e = arguments, t = xs(e[0]); + return e.length < 3 ? t : t.replace(e[1], e[2]) + },zn.result = function (e, t, n) { + var r = -1, i = (t = xi(t, e)).length; + for (i || (i = 1, e = o); ++r < i;) { + var a = null == e ? o : e[Lo(t[r])]; + a === o && (r = i, a = n), e = Ja(a) ? a.call(e) : a + } + return e + },zn.round = Sl,zn.runInContext = e,zn.sample = function (e) { + return (Ka(e) ? Zn : Zr)(e) + },zn.size = function (e) { + if (null == e) return 0; + if (Qa(e)) return us(e) ? pn(e) : e.length; + var t = go(e); + return t == k || t == F ? e.size : Mr(e).length + },zn.snakeCase = Gs,zn.some = function (e, t, n) { + var r = Ka(e) ? Bt : oi; + return n && wo(e, t, n) && (t = o), r(e, uo(t, 3)) + },zn.sortedIndex = function (e, t) { + return ai(e, t) + },zn.sortedIndexBy = function (e, t, n) { + return si(e, t, uo(n, 2)) + },zn.sortedIndexOf = function (e, t) { + var n = null == e ? 0 : e.length; + if (n) { + var r = ai(e, t); + if (r < n && Va(e[r], t)) return r + } + return -1 + },zn.sortedLastIndex = function (e, t) { + return ai(e, t, !0) + },zn.sortedLastIndexBy = function (e, t, n) { + return si(e, t, uo(n, 2), !0) + },zn.sortedLastIndexOf = function (e, t) { + if (null == e ? 0 : e.length) { + var n = ai(e, t, !0) - 1; + if (Va(e[n], t)) return n + } + return -1 + },zn.startCase = Xs,zn.startsWith = function (e, t, n) { + return e = xs(e), n = null == n ? 0 : lr(gs(n), 0, e.length), t = ci(t), e.slice(n, n + t.length) == t + },zn.subtract = El,zn.sum = function (e) { + return e && e.length ? Gt(e, ol) : 0 + },zn.sumBy = function (e, t) { + return e && e.length ? Gt(e, uo(t, 2)) : 0 + },zn.template = function (e, t, n) { + var r = zn.templateSettings; + n && wo(e, t, n) && (t = o), e = xs(e), t = Ds({}, t, r, Ji); + var a, s, l = Ds({}, t.imports, r.imports, Ji), u = _s(l), c = Jt(l, u), d = 0, + f = t.interpolate || De, h = "__p += '", + p = je((t.escape || De).source + "|" + f.source + "|" + (f === te ? ve : De).source + "|" + (t.evaluate || De).source + "|$", "g"), + v = "//# sourceURL=" + (Re.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++at + "]") + "\n"; + e.replace(p, (function (t, n, r, i, o, l) { + return r || (r = i), h += e.slice(d, l).replace(Se, sn), n && (a = !0, h += "' +\n__e(" + n + ") +\n'"), o && (s = !0, h += "';\n" + o + ";\n__p += '"), r && (h += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), d = l + t.length, t + })), h += "';\n"; + var g = Re.call(t, "variable") && t.variable; + if (g) { + if (he.test(g)) throw new i("Invalid `variable` option passed into `_.template`") + } else h = "with (obj) {\n" + h + "\n}\n"; + h = (s ? h.replace(K, "") : h).replace($, "$1").replace(Q, "$1;"), h = "function(" + (g || "obj") + ") {\n" + (g ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (a ? ", __e = _.escape" : "") + (s ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + h + "return __p\n}"; + var y = el((function () { + return le(u, v + "return " + h).apply(o, c) + })); + if (y.source = h, Za(y)) throw y; + return y + },zn.times = function (e, t) { + if ((e = gs(e)) < 1 || e > v) return []; + var n = y, r = xn(e, y); + t = uo(t), e -= y; + for (var i = Xt(r, t); ++n < e;) t(n); + return i + },zn.toFinite = vs,zn.toInteger = gs,zn.toLength = ys,zn.toLower = function (e) { + return xs(e).toLowerCase() + },zn.toNumber = ms,zn.toSafeInteger = function (e) { + return e ? lr(gs(e), -9007199254740991, v) : 0 === e ? e : 0 + },zn.toString = xs,zn.toUpper = function (e) { + return xs(e).toUpperCase() + },zn.trim = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return Yt(e); + if (!e || !(t = ci(t))) return e; + var r = vn(e), i = vn(t); + return Ci(r, tn(r, i), nn(r, i) + 1).join("") + },zn.trimEnd = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return e.slice(0, gn(e) + 1); + if (!e || !(t = ci(t))) return e; + var r = vn(e); + return Ci(r, 0, nn(r, vn(t)) + 1).join("") + },zn.trimStart = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return e.replace(se, ""); + if (!e || !(t = ci(t))) return e; + var r = vn(e); + return Ci(r, tn(r, vn(t))).join("") + },zn.truncate = function (e, t) { + var n = 30, r = "..."; + if (ns(t)) { + var i = "separator" in t ? t.separator : i; + n = "length" in t ? gs(t.length) : n, r = "omission" in t ? ci(t.omission) : r + } + var a = (e = xs(e)).length; + if (ln(e)) { + var s = vn(e); + a = s.length + } + if (n >= a) return e; + var l = n - pn(r); + if (l < 1) return r; + var u = s ? Ci(s, 0, l).join("") : e.slice(0, l); + if (i === o) return u + r; + if (s && (l += u.length - l), ss(i)) { + if (e.slice(l).search(i)) { + var c, d = u; + for (i.global || (i = je(i.source, xs(ge.exec(i)) + "g")), i.lastIndex = 0; c = i.exec(d);) var f = c.index; + u = u.slice(0, f === o ? l : f) + } + } else if (e.indexOf(ci(i), l) != l) { + var h = u.lastIndexOf(i); + h > -1 && (u = u.slice(0, h)) + } + return u + r + },zn.unescape = function (e) { + return (e = xs(e)) && Y.test(e) ? e.replace(G, yn) : e + },zn.uniqueId = function (e) { + var t = ++Ne; + return xs(e) + t + },zn.upperCase = Ys,zn.upperFirst = Zs,zn.each = xa,zn.eachRight = wa,zn.first = Qo,ul(zn, function () { + var e = {}; + return wr(zn, (function (t, n) { + Re.call(zn.prototype, n) || (e[n] = t) + })), e + }(), {chain: !1}),zn.VERSION = "4.17.21",Ot(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], (function (e) { + zn[e].placeholder = zn + })),Ot(["drop", "take"], (function (e, t) { + qn.prototype[e] = function (n) { + n = n === o ? 1 : bn(gs(n), 0); + var r = this.__filtered__ && !t ? new qn(this) : this.clone(); + return r.__filtered__ ? r.__takeCount__ = xn(n, r.__takeCount__) : r.__views__.push({ + size: xn(n, y), + type: e + (r.__dir__ < 0 ? "Right" : "") + }), r + }, qn.prototype[e + "Right"] = function (t) { + return this.reverse()[e](t).reverse() + } + })),Ot(["filter", "map", "takeWhile"], (function (e, t) { + var n = t + 1, r = 1 == n || 3 == n; + qn.prototype[e] = function (e) { + var t = this.clone(); + return t.__iteratees__.push({ + iteratee: uo(e, 3), + type: n + }), t.__filtered__ = t.__filtered__ || r, t + } + })),Ot(["head", "last"], (function (e, t) { + var n = "take" + (t ? "Right" : ""); + qn.prototype[e] = function () { + return this[n](1).value()[0] + } + })),Ot(["initial", "tail"], (function (e, t) { + var n = "drop" + (t ? "" : "Right"); + qn.prototype[e] = function () { + return this.__filtered__ ? new qn(this) : this[n](1) + } + })),qn.prototype.compact = function () { + return this.filter(ol) + },qn.prototype.find = function (e) { + return this.filter(e).head() + },qn.prototype.findLast = function (e) { + return this.reverse().find(e) + },qn.prototype.invokeMap = Yr((function (e, t) { + return "function" == typeof e ? new qn(this) : this.map((function (n) { + return Fr(n, e, t) + })) + })),qn.prototype.reject = function (e) { + return this.filter(Ma(uo(e))) + },qn.prototype.slice = function (e, t) { + e = gs(e); + var n = this; + return n.__filtered__ && (e > 0 || t < 0) ? new qn(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== o && (n = (t = gs(t)) < 0 ? n.dropRight(-t) : n.take(t - e)), n) + },qn.prototype.takeRightWhile = function (e) { + return this.reverse().takeWhile(e).reverse() + },qn.prototype.toArray = function () { + return this.take(y) + },wr(qn.prototype, (function (e, t) { + var n = /^(?:filter|find|map|reject)|While$/.test(t), r = /^(?:head|last)$/.test(t), + i = zn[r ? "take" + ("last" == t ? "Right" : "") : t], a = r || /^find/.test(t); + i && (zn.prototype[t] = function () { + var t = this.__wrapped__, s = r ? [1] : arguments, l = t instanceof qn, u = s[0], + c = l || Ka(t), d = function (e) { + var t = i.apply(zn, Rt([e], s)); + return r && f ? t[0] : t + }; + c && n && "function" == typeof u && 1 != u.length && (l = c = !1); + var f = this.__chain__, h = !!this.__actions__.length, p = a && !f, v = l && !h; + if (!a && c) { + t = v ? t : new qn(this); + var g = e.apply(t, s); + return g.__actions__.push({func: va, args: [d], thisArg: o}), new Wn(g, f) + } + return p && v ? e.apply(this, s) : (g = this.thru(d), p ? r ? g.value()[0] : g.value() : g) + }) + })),Ot(["pop", "push", "shift", "sort", "splice", "unshift"], (function (e) { + var t = Ie[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", + r = /^(?:pop|shift)$/.test(e); + zn.prototype[e] = function () { + var e = arguments; + if (r && !this.__chain__) { + var i = this.value(); + return t.apply(Ka(i) ? i : [], e) + } + return this[n]((function (n) { + return t.apply(Ka(n) ? n : [], e) + })) + } + })),wr(qn.prototype, (function (e, t) { + var n = zn[t]; + if (n) { + var r = n.name + ""; + Re.call(Pn, r) || (Pn[r] = []), Pn[r].push({name: t, func: n}) + } + })),Pn[zi(o, 2).name] = [{name: "wrapper", func: o}],qn.prototype.clone = function () { + var e = new qn(this.__wrapped__); + return e.__actions__ = Ii(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ii(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ii(this.__views__), e + },qn.prototype.reverse = function () { + if (this.__filtered__) { + var e = new qn(this); + e.__dir__ = -1, e.__filtered__ = !0 + } else (e = this.clone()).__dir__ *= -1; + return e + },qn.prototype.value = function () { + var e = this.__wrapped__.value(), t = this.__dir__, n = Ka(e), r = t < 0, i = n ? e.length : 0, + o = function (e, t, n) { + var r = -1, i = n.length; + for (; ++r < i;) { + var o = n[r], a = o.size; + switch (o.type) { + case"drop": + e += a; + break; + case"dropRight": + t -= a; + break; + case"take": + t = xn(t, e + a); + break; + case"takeRight": + e = bn(e, t - a) + } + } + return {start: e, end: t} + }(0, i, this.__views__), a = o.start, s = o.end, l = s - a, u = r ? s : a - 1, + c = this.__iteratees__, d = c.length, f = 0, h = xn(l, this.__takeCount__); + if (!n || !r && i == l && h == l) return vi(e, this.__actions__); + var p = []; + e:for (; l-- && f < h;) { + for (var v = -1, g = e[u += t]; ++v < d;) { + var y = c[v], m = y.iteratee, b = y.type, x = m(g); + if (2 == b) g = x; else if (!x) { + if (1 == b) continue e; + break e + } + } + p[f++] = g + } + return p + },zn.prototype.at = ga,zn.prototype.chain = function () { + return pa(this) + },zn.prototype.commit = function () { + return new Wn(this.value(), this.__chain__) + },zn.prototype.next = function () { + this.__values__ === o && (this.__values__ = ps(this.value())); + var e = this.__index__ >= this.__values__.length; + return {done: e, value: e ? o : this.__values__[this.__index__++]} + },zn.prototype.plant = function (e) { + for (var t, n = this; n instanceof Hn;) { + var r = zo(n); + r.__index__ = 0, r.__values__ = o, t ? i.__wrapped__ = r : t = r; + var i = r; + n = n.__wrapped__ + } + return i.__wrapped__ = e, t + },zn.prototype.reverse = function () { + var e = this.__wrapped__; + if (e instanceof qn) { + var t = e; + return this.__actions__.length && (t = new qn(this)), (t = t.reverse()).__actions__.push({ + func: va, + args: [na], + thisArg: o + }), new Wn(t, this.__chain__) + } + return this.thru(na) + },zn.prototype.toJSON = zn.prototype.valueOf = zn.prototype.value = function () { + return vi(this.__wrapped__, this.__actions__) + },zn.prototype.first = zn.prototype.head,Ye && (zn.prototype[Ye] = function () { + return this + }),zn + }(); + pt._ = mn, (i = function () { + return mn + }.call(t, n, t, r)) === o || (r.exports = i) + }).call(this) + }).call(this, n(128), n(547)(e)) + }, function (e, t, n) { + (function (t) { + var n = function (e) { + return e && e.Math == Math && e + }; + e.exports = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof t && t) || function () { + return this + }() || Function("return this")() + }).call(this, n(128)) + }, function (e, t, n) { + var r = n(4), i = n(13), o = r.String, a = r.TypeError; + e.exports = function (e) { + if (i(e)) return e; + throw a(o(e) + " is not an object") + } + }, function (e, t) { + var n = Function.prototype, r = n.bind, i = n.call, o = r && r.bind(i); + e.exports = r ? function (e) { + return e && o(i, e) + } : function (e) { + return e && function () { + return i.apply(e, arguments) + } + } + }, function (e, t) { + e.exports = function (e) { + try { + return !!e() + } catch (t) { + return !0 + } + } + }, function (e, t) { + var n = Function.prototype.call; + e.exports = n.bind ? n.bind(n) : function () { + return n.apply(n, arguments) + } + }, function (e, t) { + e.exports = !1 + }, function (e, t, n) { + var r = n(4), i = n(15), o = n(76), a = r.TypeError; + e.exports = function (e) { + if (i(e)) return e; + throw a(o(e) + " is not a function") + } + }, function (e, t, n) { + "use strict"; + e.exports = n(543) + }, function (e, t, n) { + var r = n(4), i = n(22), o = n(8), a = n(5), s = n(76), l = n(140), u = n(24), c = n(48), d = n(63), f = n(84), + h = n(174), p = r.TypeError, v = function (e, t) { + this.stopped = e, this.result = t + }, g = v.prototype; + e.exports = function (e, t, n) { + var r, y, m, b, x, w, C, D = n && n.that, S = !(!n || !n.AS_ENTRIES), E = !(!n || !n.IS_ITERATOR), + k = !(!n || !n.INTERRUPTED), j = i(t, D), O = function (e) { + return r && h(r, "normal", e), new v(!0, e) + }, A = function (e) { + return S ? (a(e), k ? j(e[0], e[1], O) : j(e[0], e[1])) : k ? j(e, O) : j(e) + }; + if (E) r = e; else { + if (!(y = f(e))) throw p(s(e) + " is not iterable"); + if (l(y)) { + for (m = 0, b = u(e); b > m; m++) if ((x = A(e[m])) && c(g, x)) return x; + return new v(!1) + } + r = d(e, y) + } + for (w = r.next; !(C = o(w, r)).done;) { + try { + x = A(C.value) + } catch (I) { + h(r, "throw", I) + } + if ("object" == typeof x && x && c(g, x)) return x + } + return new v(!1) + } + }, function (e, t, n) { + var r = n(15); + e.exports = function (e) { + return "object" == typeof e ? null !== e : r(e) + } + }, function (e, t, n) { + var r = n(4), i = n(77), o = n(23), a = n(78), s = n(129), l = n(163), u = i("wks"), c = r.Symbol, + d = c && c.for, f = l ? c : c && c.withoutSetter || a; + e.exports = function (e) { + if (!o(u, e) || !s && "string" != typeof u[e]) { + var t = "Symbol." + e; + s && o(c, e) ? u[e] = c[e] : u[e] = l && d ? d(t) : f(t) + } + return u[e] + } + }, function (e, t) { + e.exports = function (e) { + return "function" == typeof e + } + }, function (e, t, n) { + var r = n(7); + e.exports = !r((function () { + return 7 != Object.defineProperty({}, 1, { + get: function () { + return 7 + } + })[1] + })) + }, function (e, t, n) { + "use strict"; + var r, i, o, a = n(200), s = n(16), l = n(4), u = n(15), c = n(13), d = n(23), f = n(61), h = n(76), p = n(39), + v = n(26), g = n(21).f, y = n(48), m = n(31), b = n(58), x = n(14), w = n(78), C = l.Int8Array, + D = C && C.prototype, S = l.Uint8ClampedArray, E = S && S.prototype, k = C && m(C), j = D && m(D), + O = Object.prototype, A = l.TypeError, I = x("toStringTag"), F = w("TYPED_ARRAY_TAG"), + P = w("TYPED_ARRAY_CONSTRUCTOR"), _ = a && !!b && "Opera" !== f(l.opera), T = !1, R = { + Int8Array: 1, + Uint8Array: 1, + Uint8ClampedArray: 1, + Int16Array: 2, + Uint16Array: 2, + Int32Array: 4, + Uint32Array: 4, + Float32Array: 4, + Float64Array: 8 + }, N = {BigInt64Array: 8, BigUint64Array: 8}, M = function (e) { + if (!c(e)) return !1; + var t = f(e); + return d(R, t) || d(N, t) + }; + for (r in R) (o = (i = l[r]) && i.prototype) ? p(o, P, i) : _ = !1; + for (r in N) (o = (i = l[r]) && i.prototype) && p(o, P, i); + if ((!_ || !u(k) || k === Function.prototype) && (k = function () { + throw A("Incorrect invocation") + }, _)) for (r in R) l[r] && b(l[r], k); + if ((!_ || !j || j === O) && (j = k.prototype, _)) for (r in R) l[r] && b(l[r].prototype, j); + if (_ && m(E) !== j && b(E, j), s && !d(j, I)) for (r in T = !0, g(j, I, { + get: function () { + return c(this) ? this[F] : void 0 + } + }), R) l[r] && p(l[r], F, r); + e.exports = { + NATIVE_ARRAY_BUFFER_VIEWS: _, + TYPED_ARRAY_CONSTRUCTOR: P, + TYPED_ARRAY_TAG: T && F, + aTypedArray: function (e) { + if (M(e)) return e; + throw A("Target is not a typed array") + }, + aTypedArrayConstructor: function (e) { + if (u(e) && (!b || y(k, e))) return e; + throw A(h(e) + " is not a typed array constructor") + }, + exportTypedArrayMethod: function (e, t, n) { + if (s) { + if (n) for (var r in R) { + var i = l[r]; + if (i && d(i.prototype, e)) try { + delete i.prototype[e] + } catch (o) { + } + } + j[e] && !n || v(j, e, n ? t : _ && D[e] || t) + } + }, + exportTypedArrayStaticMethod: function (e, t, n) { + var r, i; + if (s) { + if (b) { + if (n) for (r in R) if ((i = l[r]) && d(i, e)) try { + delete i[e] + } catch (o) { + } + if (k[e] && !n) return; + try { + return v(k, e, n ? t : _ && k[e] || t) + } catch (o) { + } + } + for (r in R) !(i = l[r]) || i[e] && !n || v(i, e, t) + } + }, + isView: function (e) { + if (!c(e)) return !1; + var t = f(e); + return "DataView" === t || d(R, t) || d(N, t) + }, + isTypedArray: M, + TypedArray: k, + TypedArrayPrototype: j + } + }, function (e, t, n) { + var r = n(4), i = n(15), o = function (e) { + return i(e) ? e : void 0 + }; + e.exports = function (e, t) { + return arguments.length < 2 ? o(r[e]) : r[e] && r[e][t] + } + }, function (e, t, n) { + var r = n(4), i = n(61), o = r.String; + e.exports = function (e) { + if ("Symbol" === i(e)) throw TypeError("Cannot convert a Symbol value to a string"); + return o(e) + } + }, function (e, t, n) { + var r = n(4), i = n(25), o = r.Object; + e.exports = function (e) { + return o(i(e)) + } + }, function (e, t, n) { + var r = n(4), i = n(16), o = n(165), a = n(5), s = n(56), l = r.TypeError, u = Object.defineProperty; + t.f = i ? u : function (e, t, n) { + if (a(e), t = s(t), a(n), o) try { + return u(e, t, n) + } catch (r) { + } + if ("get" in n || "set" in n) throw l("Accessors not supported"); + return "value" in n && (e[t] = n.value), e + } + }, function (e, t, n) { + var r = n(6), i = n(10), o = r(r.bind); + e.exports = function (e, t) { + return i(e), void 0 === t ? e : o ? o(e, t) : function () { + return e.apply(t, arguments) + } + } + }, function (e, t, n) { + var r = n(6), i = n(20), o = r({}.hasOwnProperty); + e.exports = Object.hasOwn || function (e, t) { + return o(i(e), t) + } + }, function (e, t, n) { + var r = n(40); + e.exports = function (e) { + return r(e.length) + } + }, function (e, t, n) { + var r = n(4).TypeError; + e.exports = function (e) { + if (void 0 == e) throw r("Can't call method on " + e); + return e + } + }, function (e, t, n) { + var r = n(4), i = n(15), o = n(23), a = n(39), s = n(131), l = n(100), u = n(27), c = n(59).CONFIGURABLE, + d = u.get, f = u.enforce, h = String(String).split("String"); + (e.exports = function (e, t, n, l) { + var u, d = !!l && !!l.unsafe, p = !!l && !!l.enumerable, v = !!l && !!l.noTargetGet, + g = l && void 0 !== l.name ? l.name : t; + i(n) && ("Symbol(" === String(g).slice(0, 7) && (g = "[" + String(g).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), (!o(n, "name") || c && n.name !== g) && a(n, "name", g), (u = f(n)).source || (u.source = h.join("string" == typeof g ? g : ""))), e !== r ? (d ? !v && e[t] && (p = !0) : delete e[t], p ? e[t] = n : a(e, t, n)) : p ? e[t] = n : s(t, n) + })(Function.prototype, "toString", (function () { + return i(this) && d(this).source || l(this) + })) + }, function (e, t, n) { + var r, i, o, a = n(166), s = n(4), l = n(6), u = n(13), c = n(39), d = n(23), f = n(130), h = n(101), p = n(79), + v = "Object already initialized", g = s.TypeError, y = s.WeakMap; + if (a || f.state) { + var m = f.state || (f.state = new y), b = l(m.get), x = l(m.has), w = l(m.set); + r = function (e, t) { + if (x(m, e)) throw new g(v); + return t.facade = e, w(m, e, t), t + }, i = function (e) { + return b(m, e) || {} + }, o = function (e) { + return x(m, e) + } + } else { + var C = h("state"); + p[C] = !0, r = function (e, t) { + if (d(e, C)) throw new g(v); + return t.facade = e, c(e, C, t), t + }, i = function (e) { + return d(e, C) ? e[C] : {} + }, o = function (e) { + return d(e, C) + } + } + e.exports = { + set: r, get: i, has: o, enforce: function (e) { + return o(e) ? i(e) : r(e, {}) + }, getterFor: function (e) { + return function (t) { + var n; + if (!u(t) || (n = i(t)).type !== e) throw g("Incompatible receiver, " + e + " required"); + return n + } + } + } + }, function (e, t, n) { + var r = n(254), i = n(23), o = n(170), a = n(21).f; + e.exports = function (e) { + var t = r.Symbol || (r.Symbol = {}); + i(t, e) || a(t, e, {value: o.f(e)}) + } + }, function (e, t, n) { + var r = n(16), i = n(8), o = n(97), a = n(47), s = n(32), l = n(56), u = n(23), c = n(165), + d = Object.getOwnPropertyDescriptor; + t.f = r ? d : function (e, t) { + if (e = s(e), t = l(t), c) try { + return d(e, t) + } catch (n) { + } + if (u(e, t)) return a(!i(o.f, e, t), e[t]) + } + }, function (e, t, n) { + var r = n(22), i = n(6), o = n(75), a = n(20), s = n(24), l = n(70), u = i([].push), c = function (e) { + var t = 1 == e, n = 2 == e, i = 3 == e, c = 4 == e, d = 6 == e, f = 7 == e, h = 5 == e || d; + return function (p, v, g, y) { + for (var m, b, x = a(p), w = o(x), C = r(v, g), D = s(w), S = 0, E = y || l, k = t ? E(p, D) : n || f ? E(p, 0) : void 0; D > S; S++) if ((h || S in w) && (b = C(m = w[S], S, x), e)) if (t) k[S] = b; else if (b) switch (e) { + case 3: + return !0; + case 5: + return m; + case 6: + return S; + case 2: + u(k, m) + } else switch (e) { + case 4: + return !1; + case 7: + u(k, m) + } + return d ? -1 : i || c ? c : k + } + }; + e.exports = { + forEach: c(0), + map: c(1), + filter: c(2), + some: c(3), + every: c(4), + find: c(5), + findIndex: c(6), + filterReject: c(7) + } + }, function (e, t, n) { + var r = n(4), i = n(23), o = n(15), a = n(20), s = n(101), l = n(142), u = s("IE_PROTO"), c = r.Object, + d = c.prototype; + e.exports = l ? c.getPrototypeOf : function (e) { + var t = a(e); + if (i(t, u)) return t[u]; + var n = t.constructor; + return o(n) && t instanceof n ? n.prototype : t instanceof c ? d : null + } + }, function (e, t, n) { + var r = n(75), i = n(25); + e.exports = function (e) { + return r(i(e)) + } + }, function (e, t, n) { + var r = n(5), i = n(111), o = n(14)("species"); + e.exports = function (e, t) { + var n, a = r(e).constructor; + return void 0 === a || void 0 == (n = r(a)[o]) ? t : i(n) + } + }, function (e, t, n) { + "use strict"; + e.exports = function (e, t) { + var n, o, a = t.children || [], s = a.length, l = [], u = -1; + for (; ++u < s;) (n = i(e, a[u], t)) && (u && "break" === a[u - 1].type && (n.value && (n.value = r.left(n.value)), (o = n.children && n.children[0]) && o.value && (o.value = r.left(o.value))), l = l.concat(n)); + return l + }; + var r = n(67), i = n(247) + }, function (e, t) { + var n = Math.ceil, r = Math.floor; + e.exports = function (e) { + var t = +e; + return t !== t || 0 === t ? 0 : (t > 0 ? r : n)(t) + } + }, function (e, t, n) { + var r = n(6); + e.exports = r([].slice) + }, function (e, t, n) { + var r = n(6), i = n(25), o = n(19), a = /"/g, s = r("".replace); + e.exports = function (e, t, n, r) { + var l = o(i(e)), u = "<" + t; + return "" !== n && (u += " " + n + '="' + s(o(r), a, """) + '"'), u + ">" + l + "" + } + }, function (e, t, n) { + var r = n(7); + e.exports = function (e) { + return r((function () { + var t = ""[e]('"'); + return t !== t.toLowerCase() || t.split('"').length > 3 + })) + } + }, function (e, t, n) { + var r = n(16), i = n(21), o = n(47); + e.exports = r ? function (e, t, n) { + return i.f(e, t, o(1, n)) + } : function (e, t, n) { + return e[t] = n, e + } + }, function (e, t, n) { + var r = n(35), i = Math.min; + e.exports = function (e) { + return e > 0 ? i(r(e), 9007199254740991) : 0 + } + }, function (e, t, n) { + var r, i = n(5), o = n(168), a = n(134), s = n(79), l = n(169), u = n(99), c = n(101), d = c("IE_PROTO"), + f = function () { + }, h = function (e) { + return " @@ -31,7 +33,8 @@ - + + diff --git a/webprotege-gwt-ui-server/src/main/webapp/css/icd11ect-1.7.css b/webprotege-gwt-ui-server/src/main/webapp/css/icd11ect-1.7.css new file mode 100644 index 0000000000..a6bd08ebb1 --- /dev/null +++ b/webprotege-gwt-ui-server/src/main/webapp/css/icd11ect-1.7.css @@ -0,0 +1,1980 @@ +.ectComponent { + font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; + margin: 0; + padding: 0; + font-size: 14px; + line-height: 1.42857143; + color: #333 +} + +.ectComponent .clearfix:after { + content: ""; + clear: both; + display: table +} + +.ectComponent .defaultFontColor { + color: #333 +} + +.ectComponent .defaultErrorAlert { + display: block; + padding: .75rem 1.25rem; + color: #721c24; + background-color: #f8d7da !important; + border-color: #f5c6cb; + font-size: 85% +} + +.ectComponent .syntaxErrorAlert { + display: block; + padding: .75rem 1.25rem; + color: #004085; + background-color: #cce5ff !important; + border-color: #b8daff; + font-size: 85% +} + +.ctw-input:not(.apiInitializationCompleted) { + background-color: #eee; + pointer-events: none; + color: #aea79f +} + +.ectComponent .overflowBox { + overflow: auto +} + +.ectComponent .browserContent { + height: 85vh +} + +.ectComponent .browserBodyLeft, .ectComponent .browserBodyRight { + overflow: auto; + height: 80vh +} + +.ectComponent .browserCloseiconWrapper { + float: right +} + +.ectComponent ol, .ectComponent ul { + margin-top: 0; + margin-bottom: 0 +} + +.ectComponent .embeddedBrowser .browser, .ectComponent .embeddedBrowser .browserBody, .ectComponent .embeddedBrowser .browserBodyLeft, .ectComponent .embeddedBrowser .browserBodyRight, .ectComponent .embeddedBrowser .browserContent { + height: inherit; + max-height: inherit +} + +.ctw-eb-window .embeddedBrowserSearchbox { + width: 30%; + margin-left: 20px; + height: 30px +} + +.ctw-eb-window .popupMode { + max-width: 60vw +} + +.ctw-eb-window .popupModeResults { + margin-left: 20px +} + +.ectComponent .popupMode { + position: relative +} + +.ectComponent .popupMode .popupModeTop { + margin-top: 4px +} + +.ectComponent .popupMode .popupModeTop .entityLoading { + margin-left: 6px +} + +.ectComponent .popupMode .popupModeTop .closeicon { + float: right; + margin-right: 6px +} + +.ectComponent .popupMode .popupModeResults { + position: absolute; + z-index: 100002; + top: 0; + background-color: #fff; + border: 1px solid #ccc; + min-width: 40%; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2), 0 6px 20px 0 rgba(0, 0, 0, .19); + height: auto +} + +.ectComponent #ctwFlexContainer { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .ctwFlexItem25 { + width: 25% +} + +.ectComponent .ctwFlexItem50 { + width: 50% +} + +.ectComponent .ctwFlexItem75 { + width: 75% +} + +.ectComponent .ctwFlexItem100 { + width: 100% +} + +.ectComponent .ctwFlexItemPadding { + padding-left: 10px; + padding-right: 10px +} + +.ectComponent .entityHead.currentEntityHighlighted, .ectComponent .entityHead:not(.keyboardOnlyHighlight):hover { + background-color: #eee +} + +.ectComponent .importantlabel:not(.keyboardOnlyHighlight):hover, .ectComponent .importantlabelCurrentEntityHighlighted { + background-color: #cae1ed !important +} + +.ectComponent .entityHead { + display: flex; + flex-direction: row +} + +.ectComponent .entityTheCode { + flex-basis: 7em; + cursor: pointer; + color: #555; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +.ectComponent .entityTitleAndIcons { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityTheCodeInDetails { + cursor: pointer; + color: #555; + font-weight: 600; + margin-right: 10px +} + +.ectComponent .entityTitle { + width: 100% +} + +.ectComponent .entityTitlePointer { + cursor: pointer +} + +.ectComponent .entityPv { + border-right: 2px solid #fff; + border-bottom: 2px solid #fff +} + +.ectComponent .entityPvPointer { + cursor: pointer +} + +.ectComponent .entityPv .entityPvBadge { + font-size: 80%; + white-space: nowrap; + background-color: #feeebd; + border: 1px solid #d19405; + text-align: center; + border-radius: 2px; + margin: 0 5px; + padding: 0 5px; + vertical-align: 1px; + cursor: default +} + +.ectComponent .entityDetails { + margin-top: 10px; + margin-bottom: 13px; + border: 1px solid #ccc; + border-radius: 3px; + background-color: #f8f8f8 !important +} + +.ectComponent .entityDetails .entityDetailsSelection .entityHead { + padding-left: 8px; + padding-right: 8px +} + +.ectComponent .entityDetails .showAllEntities .entityHead { + padding-left: 4px +} + +.ectComponent .entityDetailsError { + margin-bottom: 13px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px +} + +.ectComponent .entityDetails .entityDetailsContentAfterHead { + font-size: 85%; + margin-top: 4px +} + +.ectComponent .entityDetails .entityDetailsContent { + padding: 4px 8px +} + +.ectComponent .entityDetailsCodeAndTitle { + display: flex; + flex-direction: row; + margin-bottom: 8px +} + +.ectComponent .entityDetailsCodeAndTitle .entityDetailsTheCode { + color: #555; + font-weight: 600; + white-space: nowrap; + margin-right: 10px +} + +.ectComponent .entityDetailsSelectionHeader { + display: flex; + flex-direction: row +} + +.ectComponent .entityDetailsSelectionHeader .mitHeader { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityDetailsSelectionHeader .mitHeader .mitHeaderFlex { + width: 100% +} + +.ectComponent .entityDetailsSelectionHeader .pcHeader { + white-space: nowrap +} + +.ectComponent .entityDetailsSelection { + background-color: #fff !important; + border: 1px solid #e8e6e6; + padding-top: 4px; + padding-bottom: 4px +} + +.ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection { + font-size: 85% +} + +.ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection .showlink { + margin-left: 4px !important +} + +.ectComponent .entityTitleSelection { + width: 100%; + display: flex; + flex-direction: row +} + +.ectComponent .entityTitleSelectionFlex { + width: 100% +} + +.ectComponent .entityTitlePointerSelection { + cursor: pointer +} + +.ectComponent .entityDetails .entityDetailsProperties { + margin-top: 8px; + font-size: 85% +} + +.ectComponent .entityDetails .entityDetailsContent .propertyWrapper { + margin-bottom: 8px +} + +.ectComponent .entityDetails .entityDetailsContent .propertyWrapper.lastPropertyWrapper { + margin-bottom: 4px +} + +.ectComponent .entityDetails .entityDetailsContent .propertyHeader { + font-weight: 700; + color: #4e4c48 +} + +.ectComponent .entityDetails .entityDetailsContent .propertyHeaderSelection { + font-size: 85%; + font-weight: 700; + color: #4e4c48 +} + +.ectComponent .entityDetails .entityDetailsContent .property { + margin-left: 10px +} + +.ectComponent .embeddedBrowserAllIndexTerms .subIndexTerm { + margin-left: 2.5rem; + font-size: 85%; + display: list-item; + list-style-type: circle +} + +.ectComponent .entityLoading { + font-weight: 700 +} + +@keyframes blink { + 0% { + opacity: .2 + } + 20% { + opacity: 1 + } + to { + opacity: .2 + } +} + +.ectComponent .entityLoading span { + margin-left: 2px; + animation-name: blink; + animation-duration: 1.4s; + animation-iteration-count: infinite; + animation-fill-mode: both +} + +.ectComponent .entityLoading span:nth-child(2) { + animation-delay: .2s +} + +.ectComponent .entityLoading span:nth-child(3) { + animation-delay: .4s +} + +.ectComponent .elementToFadeOut { + animation: fadeOut 5s linear forwards; + border-radius: 2px; + padding-bottom: 1px +} + +@keyframes fadeOut { + 0%, 90% { + background-color: #fbdaa0 + } + to { + background-color: transparent + } +} + +.ectComponent .foundationCodingTool .ulDescendants { + padding-left: 30px +} + +.ectComponent .browser.browserModal { + position: fixed; + top: 0; + left: 0; + z-index: 99999; + width: 100%; + height: 100%; + overflow: hidden; + background-color: #000; + background-color: rgba(0, 0, 0, .5) !important +} + +.ectComponent .browser.browserModal .browserContent { + border: 1px solid #ccc; + border-radius: 10px; + background-color: #fff !important; + margin: 3% 5%; + padding: 10px +} + +.ectComponent .browser .browserBodyTitle { + font-weight: 700; + font-size: 1.2em; + color: #404040; + margin-bottom: 6px; + margin-right: 0; + border-bottom: 1px solid #ccc +} + +.ectComponent .browser .browserBody { + margin-top: 20px; + display: grid; + grid-template-columns:auto 1fr +} + +.ectComponent .embeddedBrowser .browser .browserBody { + margin-top: 0 +} + +.ectComponent .embeddedBrowser .browser .browserBody.hierarchyNotAvailable { + display: inline; + display: initial +} + +.ectComponent .browser .browserBodyLeft { + width: 31vw; + border-right: 1px solid #ccc; + padding-left: 20px; + padding-right: 20px +} + +.ectComponent .browser .browserBodyLeft.hierarchyResizable { + resize: horizontal; + min-width: 15vw; + max-width: 60vw +} + +.ectComponent .browser .browserBodyRight { + padding-left: 20px; + padding-right: 20px +} + +.ectComponent .browser .propertyHeader { + font-weight: 700; + margin-bottom: 8px +} + +.ectComponent .browser .property { + margin-left: 10px; + margin-bottom: 15px +} + +.ectComponent .browser .subproperty { + font-size: 85%; + font-style: italic; + margin-left: 8px +} + +.ectComponent .browser .parentcode { + font-weight: 600; + font-style: normal; + margin-right: 4px +} + +.ectComponent .browser .propertyHeaderCodingNote, .ectComponent .browser .propertyHeaderDiagnosticCriteria, .ectComponent .browser .propertyHeaderPostcoordination { + background-color: #e8e8f0; + padding: 2px 10px 4px; + margin-top: 20px +} + +.ectComponent .browser .propertyHeaderCodingNoteSub { + margin-left: 10px +} + +.ectComponent .browser .idclass { + margin-right: 2px; + vertical-align: bottom +} + +.ectComponent .browser .idclass, .ectComponent .browser .idclass2 { + color: #606060; + font-style: italic; + font-size: .8em; + white-space: nowrap +} + +.ectComponent .browser .idclass2 { + margin-left: 8px +} + +.ectComponent .browser .orangetextbutton { + font-size: .8em; + color: #df7030; + margin-left: 8px; + text-decoration: none; + vertical-align: bottom +} + +.ectComponent .browser .markdownDefinition li { + list-style-type: disc +} + +.ectComponent .browser .markdownDefinition table td { + border-bottom: 1px solid #ddd; + padding: 4px 20px 4px 0 +} + +.ectComponent .browser .markdownDefinition table th { + border-bottom: 1px solid #ddd; + padding: 4px 20px 4px 0; + text-align: left +} + +.ectComponent .browser .markdownDefinition table ul { + margin-left: 0; + padding-left: 0 +} + +.ectComponent .browser .markdownDefinition table li { + list-style: none +} + +.ectComponent .browser .propertyDiagnosticCriteria { + font-size: 14px +} + +.ectComponent .browser .diagnosticCriteria h1 { + font-weight: 700; + font-size: 1em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h2 { + font-weight: 400; + font-size: 1em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h3 { + font-weight: 400; + font-size: .9em; + color: #b96021; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .browser .diagnosticCriteria h4 { + font-weight: 700; + font-size: .9em; + color: #333; + margin-bottom: 4px; + margin-top: 18px; + padding-bottom: 0 +} + +.ectComponent .openicon { + margin-right: 4px +} + +.ectComponent .entityHead:hover > .openicon { + display: inline +} + +.ectComponent .closeicon { + font-size: 9.8px; + color: #777; + cursor: pointer; + margin-right: 4px; + vertical-align: text-top; + font-weight: 700 +} + +.ectComponent .closeicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .entityDetailsCloseiconWrapper { + position: relative; + float: right +} + +.ectComponent .entityDetailsCloseicon { + position: absolute; + top: -3px; + right: -3px; + font-size: 9.8px; + color: #777; + border-radius: 3px; + padding: 0 3px 1px 2px; + cursor: pointer; + background: #fff; + border: 1px solid #ccc; + font-weight: 700 +} + +.ectComponent .entityDetailsCloseicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .dimensionicon { + font-size: smaller; + color: #777; + cursor: pointer; + margin-right: 4px; + margin-left: 6px; + vertical-align: top +} + +.ectComponent .dimensionicon:hover { + color: #333; + background-color: #eee +} + +.ectComponent .showlink { + color: #4169e1 !important; + cursor: pointer; + font-size: 85%; + font-weight: 400; + margin-left: 6px +} + +.ectComponent .showlinkPostcoordination { + font-size: 85%; + margin-right: 3px; + vertical-align: 2px +} + +.ectComponent .showlinkNormalSize { + color: #4169e1 !important; + cursor: pointer; + font-size: 100%; + font-weight: 400; + margin-left: 6px +} + +.ectComponent .showlink:hover, .ectComponent .showlinkNormalSize:hover { + color: #4169e1; + text-decoration: none +} + +.ectComponent .showlinkSeeInHierarchy { + color: #4169e1 !important; + cursor: pointer; + font-size: 85% +} + +.ectComponent .showlinkSeeInHierarchy:hover { + text-decoration: none +} + +.ectComponent .iconSeeInHierarchy { + font-size: 120%; + color: #fff; + background-color: #4f74e3; + padding: 0 4px; + border-radius: 3px; + margin-right: 2px +} + +.ectComponent .showdetails { + font-size: 85%; + padding-right: 2px; + vertical-align: 2px; + word-break: keep-all; + white-space: nowrap +} + +.ectComponent .unicodeicon { + color: #4169e1; + font-size: 8px; + cursor: pointer +} + +.ectComponent .mandatoryPostcoord { + color: #d45800 +} + +.ectComponent .circleicon { + cursor: pointer +} + +.ectComponent .circleicon, .ectComponent .circleiconWithinDetails { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px; + color: #424242; + border-radius: 50%; + padding: 1px 4px; + margin-left: 2px; + vertical-align: 2px +} + +.ectComponent .circleiconWithinDetails { + cursor: default +} + +.ectComponent .circleiconWithinDetailsHeaders { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px !important; + color: #424242; + border-radius: 50%; + padding: 1px 4px; + margin-left: 6px; + cursor: default; + vertical-align: 2px +} + +.ectComponent .pacolor { + background: #eee; + border: 1px solid #ccc; + padding-right: 3px !important; + font-weight: 700 +} + +.ectComponent .prcolor { + background: #facdac; + border: 1px solid #f8b687; + padding-right: 3px !important; + font-weight: 700 +} + +.ectComponent .mlcolor { + background: #f8ee69; + border: 1px solid #f0f00f; + font-weight: 700 +} + +.ectComponent .plcolor { + background: #e2d0e2; + border: 1px solid #cfb0cf; + font-weight: 700 +} + +.ectComponent .cncolor { + background: #ace259; + border: 1px solid #9ac754; + padding: 1px 3px 1px 2px !important; + font-weight: 700 +} + +.ectComponent .entityDetails .circleiconWithinDetails { + cursor: pointer +} + +.ectComponent .hierarchy ul { + list-style: none; + padding-left: 0 +} + +.ectComponent .hierarchy ul ul { + padding-left: 18px +} + +.ectComponent .hierarchy .topul li { + margin-bottom: 3px +} + +.ectComponent .hierarchy .collapsed, .hierarchy .expanded { + cursor: pointer; + width: 16px; + display: inline-block; + font-size: .8em +} + +.ectComponent .hierarchy .collapsed { + vertical-align: top +} + +.ectComponent .hierarchy .expanded { + vertical-align: top; + position: relative; + top: 2px +} + +.ectComponent .hierarchy .empty { + width: 16px; + display: inline-block +} + +.ectComponent .hierarchy .codeinh { + font-weight: 600 +} + +.ectComponent .hierarchy .nodeWindow .codeinh, .ectComponent .hierarchy .nodeWindow .titleinh { + color: #668 +} + +.ectComponent .hierarchy .nodeAdoptedChild .codeinh, .ectComponent .hierarchy .nodeAdoptedChild .titleinh { + color: #999 +} + +.ectComponent .hierarchy .nodeResidual .codeinh, .ectComponent .hierarchy .nodeResidual .titleinh { + color: maroon +} + +.ectComponent .hierarchy .nodeAdoptedResidual .codeinh, .ectComponent .hierarchy .nodeAdoptedResidual .titleinh { + color: rgba(128, 0, 0, .6) +} + +.ectComponent .hierarchy .hideNodeWindow { + display: none +} + +.ectComponent .hierarchy .labelinh { + cursor: pointer; + width: calc(100% - 16px); + display: inline-block +} + +.ectComponent .hierarchy .selected { + background-color: #fef6e8 !important +} + +.ectComponent .hierarchy .labelinh:hover { + background-color: #eee +} + +.ectComponent .hierarchy .rsubtitle { + font-style: italic; + color: #505050 +} + +.ectComponent .browserBodyLeft .hierarchy .rtitle { + font-weight: 600; + color: #505050 +} + +.ectComponent .hierarchy .nodeError { + border-radius: 3px; + margin-right: 10px +} + +.ectComponent .postcoordinatedCodeLeft { + float: left +} + +.ectComponent .postcoordinatedCodeRight { + float: right +} + +.ectComponent .postcoordColored { + font-style: normal; + color: #d45800 +} + +.ectComponent .postcoordAction { + padding-top: 10px; + padding-left: 10px; + padding-bottom: 10px; + font-size: .9em; + margin-top: 5px; + margin-bottom: 10px; + margin-left: 0; + border-left: thin solid #b96021; + background-color: #f8f8f8 +} + +.ectComponent .postcoordAction .hierarchy { + max-height: 300px; + overflow: auto +} + +.ectComponent .postcoordActionClickable { + cursor: pointer +} + +.ectComponent .highlightedEntity, .ectComponent .postcoordActionClickable:hover { + background-color: #eee +} + +.ectComponent .highlightedEntityPv { + background-color: #eee; + border-right: 2px solid #eee !important; + border-bottom: 2px solid #eee !important +} + +.ectComponent .highlightedParent { + position: relative +} + +.ectComponent .highlightedEntityArrow { + left: -15px; + position: absolute; + color: #d45800 +} + +.ectComponent .icdcodewpc .stemcodestyle { + font-weight: 500 +} + +.ectComponent .icdcodewpc .simplifiedcode { + text-decoration: underline; + display: inline-block; + animation: shake .82s cubic-bezier(.36, .07, .19, .97) both; + animation-iteration-count: 1; + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + perspective: 1000px +} + +@keyframes shake { + 10%, 90% { + transform: translate3d(-1px, 0, 0) + } + 20%, 80% { + transform: translate3d(2px, 0, 0) + } + 30%, 50%, 70% { + transform: translate3d(-4px, 0, 0) + } + 40%, 60% { + transform: translate3d(4px, 0, 0) + } +} + +.ectComponent .icdcodewpc .codedelimamp { + display: inline-block; + margin: 0 1px; + color: #8080e0; + font-weight: 500; + font-size: .9em +} + +.ectComponent .icdcodewpc .codedelimsl { + display: inline-block; + margin: 0 3px; + color: #df7030; + font-weight: 700; + font-size: .9em +} + +.ectComponent .icdcodewpc .xchaptercodestyle { + font-size: .9em; + color: #666 +} + +.ectComponent .postcoordSticky { + position: -webkit-sticky; + position: sticky; + top: -10px; + background-color: #fff; + padding-top: 10px; + padding-bottom: 20px; + z-index: 100001 +} + +.ectComponent .postcoordForSelection { + border: 1px solid #ccc; + border-radius: 3px; + background-color: #fef6e8 !important; + padding: 10px +} + +.ectComponent .postcoordForSelection .postcoordCode { + font-size: 110%; + cursor: pointer +} + +.ectComponent .postcoorForSelectionURI { + margin-top: 6px +} + +.ectComponent .postcoorForSelectionURI .postcoordURI { + color: #606060; + font-style: italic; + font-size: .8em; + white-space: normal; + cursor: pointer +} + +.ectComponent .postcoorForSelectionURI .postcoordURI .codedelimamp, .ectComponent .postcoorForSelectionURI .postcoordURI .codedelimsl { + font-style: normal; + font-size: 1.2em +} + +.ectComponent .postcoordForSelection button { + color: #4169e1; + background-color: #fff; + border: 1px solid #7a7a7a; + border-radius: 3px +} + +.ectComponent .postcoordForSelection button:hover { + background-color: #eee +} + +.ectComponent .postcoordForSelection .postcoordForSelectionLeft { + float: left +} + +.ectComponent .postcoordForSelection .postcoordForSelectionRight { + float: right +} + +.ectComponent .propertyPostcoordinationSummary .pccodeset { + list-style-type: none; + margin: 0; + padding: 0 +} + +.ectComponent .propertyPostcoordinationSummary .liFlex { + display: flex +} + +.ectComponent .propertyPostcoordinationSummary .axis { + width: 200px; + color: #505050; + font-size: .9em; + font-weight: 400; + color: #b96021 +} + +.ectComponent .propertyPostcoordinationSummary .axisWithName { + margin-top: 10px +} + +.ectComponent .propertyPostcoordinationSummary .values { + flex-grow: 1 +} + +.ectComponent .propertyPostcoordinationSummary .pccode { + font-weight: 600; + color: #444; + font-size: .9em; + margin-right: 10px +} + +.ectComponent .propertyPostcoordinationSummary .pctitle { + color: #444; + font-size: .9em; + margin-right: 10px +} + +.ectComponent .propertyPostcoordinationSummary .pcdelete { + font-size: .8em; + cursor: pointer +} + +.ectComponent .postcoordSearch .rtitle { + color: #b96021 +} + +.ectComponent .postcoordSearch .rsubtitle { + font-style: italic; + color: #505050 +} + +.ectComponent .postcoordSearchInput input { + margin-right: 10px; + width: 40% +} + +.ectComponent .postcoordSearchInputToResult { + position: relative +} + +.ectComponent .postcoordSearchResult { + position: absolute; + z-index: 100000; + top: 0; + background-color: #fff; + border: 1px solid #ccc; + margin-right: 10px; + padding-top: 10px; + padding-bottom: 10px; + border-bottom-right-radius: 10px; + border-bottom-left-radius: 10px; + min-width: 40%; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2), 0 6px 20px 0 rgba(0, 0, 0, .19); + max-height: 300px; + overflow-y: auto +} + +.ectComponent .postcoordSearchResult .closeSearch { + float: right; + font-size: 9.8px; + margin-right: 10px; + margin-left: 10px; + cursor: pointer; + position: -webkit-sticky; + position: sticky; + top: 0 +} + +.ectComponent .postcoordSearchResult .postcoordSearchResultList { + float: left +} + +.ectComponent .postcoordSearchResult ul { + list-style: none; + padding-left: 0 +} + +.ectComponent .postcoordSearchResult ul ul { + padding-left: 18px +} + +.ectComponent .postcoordSearchResult .postcoordFlex { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .postcoordSearchResult .labelinh { + cursor: pointer; + margin-left: 1em; + margin-right: 1em; + margin-bottom: 4px +} + +.ectComponent .postcoordSearchResult .titleinh { + width: 100% +} + +.ectComponent .postcoordSearchResult .postcoordPvs { + font-size: small; + background-color: #fef6e8; + z-index: 1002; + overflow: auto; + margin-left: 7em; + cursor: auto +} + +.ectComponent .postcoordSearchResult .clickinh:hover { + background-color: #eee +} + +.ectComponent .postcoordSearchResult .searchError { + border-radius: 3px; + margin-left: 10px; + margin-right: 10px +} + +.ectComponent .messageright { + float: right +} + +.ectComponent .messageleft { + float: left +} + +.ectComponent .wordlist ul { + list-style: none; + margin-left: -40px +} + +.ectComponent .wordlist li { + cursor: pointer; + width: 140px; + text-indent: -10px; + padding-left: 10px +} + +.ectComponent .wordlist li:hover { + background-color: #eee +} + +.ectComponent .wordlist .dontChangeResult { + color: #b0a0a0 +} + +.ectComponent .browser ul.toplevel, .ectComponent .entitylist ul.toplevel { + list-style: none; + margin-left: -40px +} + +.ectComponent .browser em.foundpc, .ectComponent .entitylist em.foundpc { + font-weight: 700; + font-style: normal; + color: red +} + +.ectComponent .browser em.found, .ectComponent .browser em.found em.wbe, .ectComponent .entitylist em.found, .ectComponent .entitylist em.found em.wbe { + font-weight: 700; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.found em.nonwbe, .ectComponent .entitylist em.found em.nonwbe { + font-weight: 400; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.foundpc em.wbe, .ectComponent .entitylist em.foundpc em.wbe { + font-weight: 700; + font-style: normal; + color: red +} + +.ectComponent .browser em.foundpc em.nonwbe, .ectComponent .entitylist em.foundpc em.nonwbe { + font-weight: 400; + font-style: normal; + color: red +} + +.ectComponent .browser em.wbe, .ectComponent .entitylist em.wbe { + font-weight: 700; + font-style: normal; + color: #d45800 +} + +.ectComponent .browser em.nonwbe, .ectComponent .entitylist em.nonwbe { + font-weight: 400; + font-style: normal; + color: #d45800 +} + +.ectComponent .searchresults h5 { + color: #d45800 +} + +.ectComponent .searchresults h4 { + color: #d45800; + margin-bottom: 0; + font-size: 18px; + font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; + font-weight: 500; + line-height: 1.1 +} + +.ectComponent .detailsicon { + font-size: 8px; + color: #728ead; + cursor: pointer +} + +.ectComponent .browsericon { + font-size: smaller; + color: #d45800; + cursor: pointer +} + +.ectComponent a.browsericon { + text-decoration: none +} + +.ectComponent a.browsericon:visited { + color: #d45800 +} + +.ectComponent .pvs { + font-size: small; + background-color: #fef6e8; + z-index: 1002; + overflow: auto; + margin-left: 8em +} + +.ectComponent .foundationCodingTool .pvs { + margin-left: 1.4em +} + +.ectComponent .destinationentitiesdiv .toplevel li { + margin-bottom: 3px +} + +.ectComponent .toplevel li { + list-style: none +} + +.ectComponent .searchresults .title { + text-align: left; + margin-left: 10px +} + +.ectComponent .searchresults ul dt.thecode { + font-weight: 700; + color: #606060; + text-align: left; + cursor: pointer +} + +.ectComponent .searchresults ul dt.thecode-4 { + width: 3em +} + +.ectComponent .searchresults ul dt.thecode-5 { + width: 3.4em +} + +.ectComponent .searchresults ul dt.thecode-6 { + width: 3.9em +} + +.ectComponent .searchresults ul dt.thecode-7 { + width: 4.6em +} + +.ectComponent .searchresults ul dt.thecode-8 { + width: 4.9em +} + +.ectComponent .searchresults ul dt.thecode-9 { + width: 5.2em +} + +.ectComponent .searchresults ul dt.thecode-10 { + width: 5.9em +} + +.ectComponent .searchresults ul dt.thecode-11 { + width: 6.5em +} + +.ectComponent .searchresults ul dt.thecode-12 { + width: 7em +} + +.ectComponent .searchresults dl { + margin-top: 0; + margin-bottom: 3px +} + +.ectComponent .sortoption { + position: relative; + float: right; + font-size: .9em; + color: #4169e1 +} + +.ectComponent .listhead { + margin-bottom: 35px +} + +.ectComponent .listhead h4 { + margin-top: 10px !important +} + +.ectComponent .chdistro { + margin-left: -40px; + list-style: none +} + +.ectComponent .ch01 { + background-color: #f7c3b5 +} + +.ectComponent .ch02 { + background-color: #e5cbf8 +} + +.ectComponent .ch03 { + background-color: #beeb9f +} + +.ectComponent .ch04 { + background-color: #79bd8f +} + +.ectComponent .ch05 { + background-color: #d0fcff +} + +.ectComponent .ch06 { + background-color: #ededed +} + +.ectComponent .ch07 { + background-color: #f2e088 +} + +.ectComponent .ch08 { + background-color: #95c3c7 +} + +.ectComponent .ch09 { + background-color: #ffff9d +} + +.ectComponent .ch10 { + background-color: #c6f4d5 +} + +.ectComponent .ch11 { + background-color: #e3d2b4 +} + +.ectComponent .ch12 { + background-color: #fff7ea +} + +.ectComponent .ch13 { + background-color: #7da626 +} + +.ectComponent .ch14 { + background-color: #bcd952 +} + +.ectComponent .ch15 { + background-color: #eefec3 +} + +.ectComponent .ch16 { + background-color: #6dbcdb +} + +.ectComponent .ch17 { + background-color: #ff9c47 +} + +.ectComponent .ch18 { + background-color: #facdac +} + +.ectComponent .ch19 { + background-color: #f2e088 +} + +.ectComponent .ch20 { + background-color: #94e5d5 +} + +.ectComponent .ch21 { + background-color: #d1dbbd +} + +.ectComponent .ch22 { + background-color: #91aa9d +} + +.ectComponent .ch23 { + background-color: #bdd4de +} + +.ectComponent .ch24 { + background-color: #f2ebbf +} + +.ectComponent .ch25 { + background-color: #c3cfeb +} + +.ectComponent .ch26 { + background-color: #d7d8dc +} + +.ectComponent .ch27 { + background-color: #d9cb9e +} + +.ectComponent .chapter { + font-size: .9em; + vertical-align: central +} + +.ectComponent .freq { + font-style: italic; + font-size: .9em; + position: absolute; + right: 8px; + top: 0 +} + +.ectComponent .chtitlediv { + position: relative; + margin-left: 10px; + padding-right: 24px; + padding-left: 20px; + text-indent: -20px +} + +.ectComponent .chaptertitle, .ectComponent .showallbutton { + cursor: pointer; + text-decoration: underline +} + +.ectComponent .showallbutton { + position: absolute; + top: -20px; + white-space: nowrap +} + +.ectComponent #chapters { + position: relative +} + +.ectComponent .important { + margin-left: 6px; + cursor: default +} + +.ectComponent .importantlabel { + background-color: #dbf2fe !important +} + +.ectComponent #flexisearchbtn { + background-color: #03038d; + color: #eee; + padding: 1px 8px; + cursor: pointer; + margin-right: 2px; + display: inline-block +} + +.ectComponent .flexisearchwarning { + position: absolute; + top: 30px; + right: 6px; + color: #03038d; + font-weight: 300 +} + +.ectComponent .flexi { + color: #03038d; + font-weight: 300 +} + +.ectComponent .clipboard, .ectComponent .pcicon { + color: #777; + font-weight: 300 +} + +.ectComponent .pcicon { + font-size: .8em +} + +.ectComponent .entityInList .notleaf, .ectComponent .postcoordSearchResultList .notleaf { + background-color: #ececec; + color: #555; + font-weight: 400; + padding-left: 2px; + font-size: 1.1em; + padding-right: 2px +} + +.ectComponent .chopped { + color: #d45800 +} + +.ectComponent select { + color: #4169e1 +} + +.ectComponent .filterSwitch { + position: relative; + display: inline-block; + top: 2px; + right: 1px; + width: 43px; + height: 17px +} + +.ectComponent .filterSwitch input { + opacity: 0; + width: 0; + height: 0 +} + +.ectComponent .filterSwitch .slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ddd; + transition: .4s +} + +.ectComponent .filterSwitch .slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: #fff; + transition: .4s +} + +.ectComponent .filterSwitch input:checked + .slider { + background-color: #9acbb1 +} + +.ectComponent .filterSwitch input:focus + .slider { + box-shadow: 0 0 1px #9acbb1 +} + +.ectComponent .filterSwitch input:checked + .slider:before { + transform: translateX(26px) +} + +.ectComponent .filterSwitch .slider.round { + border-radius: 34px +} + +.ectComponent .filterSwitch .slider.round:before { + border-radius: 50% +} + +.ectComponent .filterSwitchLabel { + margin-right: 6px; + margin-left: 6px; + color: #777 +} + +.ectComponent .filterSwitchStar { + color: #d45800; + cursor: help +} + +.ectComponent #statusFlexContainer { + display: flex; + flex-direction: row; + width: 100% +} + +.ectComponent .statusFlexWords { + text-align: left; + color: #777 +} + +.ectComponent .statusFlexInfo { + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +.ectComponent .statusFlexFilter { + text-align: right +} + +.ectComponent .statusError { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.ectComponent .textNotFound { + color: #777 +} + +.ectComponent .tooltipWrapper { + text-align: left; + text-align: initial; + position: relative; + display: inline-block; + z-index: 100003 +} + +.ectComponent .tooltipContent { + position: absolute; + width: 25vw; + max-width: 80vw; + max-height: 600px; + overflow: auto; + background-color: #fff; + border: 1px solid #ccc; + padding: 10px; + border-radius: 3px; + box-shadow: 0 4px 8px 0 rgb(0 0 0/20%), 0 6px 20px 0 rgb(0 0 0/19%); + color: #777; + font-size: 14px; + font-weight: 400 +} + +.ectComponent .tooltipCloseiconWrapper { + float: right +} + +.ectComponent .tooltipLinkKeyboard { + color: #777; + vertical-align: -1px; + cursor: help; + margin-right: 25px +} + +.ectComponent .tooltipLinkKeyboard:hover, .ectComponent .tooltipLinkKeyboardOpen { + background-color: #eee +} + +.ectComponent .tooltipContentKeyboard { + top: 5px; + right: 1vw +} + +.ectComponent .tooltipPostcoordination { + font-family: "Courier New"; + font-weight: 700; + font-size: 9.8px; + border-radius: 50%; + padding: 1px 4px; + cursor: help; + vertical-align: 2px; + color: #4169e1; + background-color: #fff; + border: 1px solid #7a7a7a; + margin-left: 4px; + margin-right: 6px +} + +.ectComponent .tooltipPostcoordination:hover { + background-color: #eee; + border-color: #4169e1 +} + +.ectComponent .tooltipOpenEndedPostcoordination { + vertical-align: 3px !important +} + +.ectComponent .tooltipContentPostcoordination { + list-style-type: none +} + +.ectComponent .tooltipContentPostcoordination ul { + list-style-type: none; + padding: 0; + margin: 0 +} + +.ectComponent .statusAdvancedsearch { + white-space: nowrap; + color: #d19405 !important; + cursor: pointer; + font-size: 100%; + font-weight: 400; + margin-right: .5em +} + +.ectComponent .statusAdvancedsearch .unicodeicon { + color: #d19405 !important; + vertical-align: 0 +} + +.ectComponent .advancedsearchdiv { + display: flex; + background-color: #feeebd; + border: 1px solid #d19405; + border-radius: 3px; + margin-left: .5em; + margin-right: .5em; + margin-bottom: 1em; + padding-top: .5em; + padding-bottom: .5em; + padding-left: .5em +} + +.ectComponent .advancedsearchdiv .advancedsearchIndexTerms { + display: inline-block; + margin-right: 1em +} + +.ectComponent .advancedsearchdiv .advancedsearchInput { + display: inline-block; + margin-right: .5em +} + +.ectComponent .advancedsearchdiv .advancedsearchIndexTerms input, .ectComponent .advancedsearchdiv .advancedsearchIndexTerms label, .ectComponent .advancedsearchdiv .advancedsearchInput input, .ectComponent .advancedsearchdiv .advancedsearchInput label { + vertical-align: 1px; + cursor: pointer +} + +.ectComponent .browser, .ectComponent .entityTheCode, .ectComponent .postcoordCode, .ectComponent .statusFlexInfo .clipboard { + direction: ltr +} + +.rtl .ectComponent .advancedsearchdiv, .rtl .ectComponent .browserBodyLeftContent, .rtl .ectComponent .browserBodyRightContent, .rtl .ectComponent .chapterdistributionandfilterdiv, .rtl .ectComponent .destinationentitiesdiv, .rtl .ectComponent .filterWrapper, .rtl .ectComponent .statusFlexInfo, .rtl .ectComponent .statusFlexWords, .rtl .ectComponent .wordlistdiv { + direction: rtl +} + +.rtl .ectComponent .browserCloseiconWrapper { + float: left +} + +.rtl .ectComponent .browserCloseiconWrapper .closeicon { + margin-right: 0; + margin-left: 4px +} + +.rtl .ectComponent .chapterdistributionandfilterdiv .chdistro, .rtl .ectComponent .entitylist ul.toplevel, .rtl .ectComponent .wordlist ul { + padding-right: 0; + padding-left: 40px +} + +.rtl .ectComponent .entityInList .entityHead .entityTheCode, .rtl .ectComponent .postcoordSearchResult .entityTheCode { + padding-left: 6px +} + +.rtl .ectComponent .sortoption { + float: left +} + +.rtl .ectComponent .browser .hierarchy .topul { + padding-right: 0 +} + +.rtl .ectComponent .browser .postcoordAction { + padding-left: 0; + padding-right: 10px; + border-left: initial; + border-right: thin solid #b96021 +} + +.rtl .ectComponent .wordlist li { + padding-right: 10px +} + +.rtl .ectComponent .chapterdistributionandfilterdiv .freq { + right: auto; + left: 8px +} + +.rtl .ectComponent .entityDetailsCodeAndTitle .entityDetailsTheCode, .rtl .ectComponent .entityTheCodeInDetails { + margin-right: 0; + margin-left: 10px +} + +.rtl .ectComponent .entityDetailsCloseiconWrapper { + float: left +} + +.rtl .ectComponent .entityDetailsCloseicon { + right: -12px +} + +.rtl .ectComponent .entityDetailsSelectionHeader .mitHeader { + padding-left: 0; + padding-right: 4px +} + +.rtl .ectComponent .entityDetailsSelectionHeader .pcHeader { + text-align: left +} + +.rtl .ectComponent .pvs { + margin-left: 0; + margin-right: 8em +} + +.rtl .ectComponent .entityPv { + border-right: 0 solid #fff; + border-left: 2px solid #fff +} + +.rtl .ectComponent .highlightedEntityPv { + border-right: 0 solid #eee !important; + border-left: 2px solid #eee !important +} + +.rtl .ectComponent .circleiconWithinDetailsHeaders { + margin-left: 0; + margin-right: 6px +} + +.rtl .ectComponent .iconSeeInHierarchy { + margin-right: 0; + margin-left: 2px +} + +.rtl .ectComponent .postcoordSearchInput input, .rtl .ectComponent .postcoordSearchResult { + margin-right: 0; + margin-left: 10px +} + +.rtl .ectComponent .postcoordSearchResult .closeSearch { + float: left +} + +.rtl .ectComponent .postcoordSearchResult .postcoordSearchResultList { + float: right +} + +.rtl .ectComponent .postcoordSearchResult .postcoordPvs { + margin-left: 0; + margin-right: 7em +} + +.rtl .ectComponent .showlink, .rtl .ectComponent .showlinkNormalSize { + margin-left: 0; + margin-right: 6px +} + +.rtl .ectComponent .entityDetailsSelection .showAllEntities .entityTitleSelection .showlink { + margin-left: 0 !important; + margin-right: 8px !important +} + +.rtl .ectComponent .browser .property { + margin-left: 0; + margin-right: 10px +} + +.rtl .ectComponent .browser .subproperty { + margin-left: 0; + margin-right: 8px +} + +.rtl .ectComponent .browser .parentcode { + margin-right: 0; + margin-left: 4px +} + +.ctw-eb-window.rtl .embeddedBrowserSearch { + text-align: right +} + +.ctw-eb-window.rtl .embeddedBrowserSearchbox { + margin-left: 0; + margin-right: 20px; + direction: rtl +} + +.ctw-eb-window.rtl .popupMode .popupModeTop .entityLoading, .rtl .popupMode .popupModeTop .entityLoading { + float: right; + margin-left: inherit; + margin-right: 6px +} + +.ctw-eb-window.rtl .popupMode .popupModeTop .closeicon, .rtl .popupMode .popupModeTop .closeicon { + float: left; + margin-right: 0; + margin-left: 6px +} + +.ctw-eb-window.rtl .popupMode { + max-width: none +} + +.ctw-eb-window.rtl .popupMode .popupModeResults { + right: 20px +} + +.rtl .ectComponent .advancedsearchdiv .advancedsearchIndexTerms { + margin-right: 0; + margin-left: 2em +} + +.rtl .ectComponent .advancedsearchdiv .advancedsearchInput { + margin-right: 0; + margin-left: .5em +} + +.rtl .ectComponent .browser .idclass2 { + margin-left: 0; + margin-right: 8px +} + +.rtl .ectComponent .embeddedBrowserAllIndexTerms .subIndexTerm { + margin-left: 0; + margin-right: 2.5rem +} + +.rtl .ectComponent .propertyPostcoordinationSummary .pcdelete { + margin-right: 10px +} + +.rtl .ectComponent .tooltipCloseiconWrapper { + float: left +} + +.rtl .ectComponent .tooltipWrapper { + direction: rtl +} + +.rtl .ectComponent .tooltipPostcoordination { + margin-left: 6px; + margin-right: 4px +} + +.rtl .ectComponent .tooltipContentPostcoordination { + left: auto; + right: -1vw +} \ No newline at end of file diff --git a/webprotege-gwt-ui-server/src/main/webapp/js/ect/icd11ect-1.7.js b/webprotege-gwt-ui-server/src/main/webapp/js/ect/icd11ect-1.7.js new file mode 100644 index 0000000000..9f76f0b070 --- /dev/null +++ b/webprotege-gwt-ui-server/src/main/webapp/js/ect/icd11ect-1.7.js @@ -0,0 +1,26165 @@ +!function (e, t) { + "object" === typeof exports && "object" === typeof module ? module.exports = t() : "function" === typeof define && define.amd ? define("ECT", [], t) : "object" === typeof exports ? exports.ECT = t() : e.ECT = t() +}(this, (function () { + return function (e) { + var t = {}; + + function n(r) { + if (t[r]) return t[r].exports; + var i = t[r] = {i: r, l: !1, exports: {}}; + return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports + } + + return n.m = e, n.c = t, n.d = function (e, t, r) { + n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: r}) + }, n.r = function (e) { + "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0}) + }, n.t = function (e, t) { + if (1 & t && (e = n(e)), 8 & t) return e; + if (4 & t && "object" === typeof e && e && e.__esModule) return e; + var r = Object.create(null); + if (n.r(r), Object.defineProperty(r, "default", { + enumerable: !0, + value: e + }), 2 & t && "string" != typeof e) for (var i in e) n.d(r, i, function (t) { + return e[t] + }.bind(null, i)); + return r + }, n.n = function (e) { + var t = e && e.__esModule ? function () { + return e.default + } : function () { + return e + }; + return n.d(t, "a", t), t + }, n.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + }, n.p = "/", n(n.s = 672) + }([function (e, t, n) { + "use strict"; + e.exports = n(551) + }, function (e, t, n) { + var r = n(4), i = n(29).f, o = n(39), a = n(26), s = n(131), l = n(132), u = n(136); + e.exports = function (e, t) { + var n, c, d, f, h, p = e.target, v = e.global, g = e.stat; + if (n = v ? r : g ? r[p] || s(p, {}) : (r[p] || {}).prototype) for (c in t) { + if (f = t[c], d = e.noTargetGet ? (h = i(n, c)) && h.value : n[c], !u(v ? c : p + (g ? "." : "#") + c, e.forced) && void 0 !== d) { + if (typeof f == typeof d) continue; + l(f, d) + } + (e.sham || d && d.sham) && o(f, "sham", !0), a(n, c, f, e) + } + } + }, function (e, t, n) { + e.exports = n(542) + }, function (e, t, n) { + (function (e, r) { + var i; + (function () { + var o, a = "Expected a function", s = "__lodash_hash_undefined__", l = "__lodash_placeholder__", u = 16, + c = 32, d = 64, f = 128, h = 256, p = 1 / 0, v = 9007199254740991, g = NaN, y = 4294967295, + m = [["ary", f], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", u], ["flip", 512], ["partial", c], ["partialRight", d], ["rearg", h]], + b = "[object Arguments]", x = "[object Array]", w = "[object Boolean]", C = "[object Date]", + D = "[object Error]", S = "[object Function]", E = "[object GeneratorFunction]", k = "[object Map]", + j = "[object Number]", O = "[object Object]", A = "[object Promise]", I = "[object RegExp]", + F = "[object Set]", P = "[object String]", _ = "[object Symbol]", T = "[object WeakMap]", + R = "[object ArrayBuffer]", N = "[object DataView]", M = "[object Float32Array]", + B = "[object Float64Array]", L = "[object Int8Array]", U = "[object Int16Array]", + z = "[object Int32Array]", V = "[object Uint8Array]", H = "[object Uint8ClampedArray]", + W = "[object Uint16Array]", q = "[object Uint32Array]", K = /\b__p \+= '';/g, + $ = /\b(__p \+=) '' \+/g, Q = /(__e\(.*?\)|\b__t\)) \+\n'';/g, G = /&(?:amp|lt|gt|quot|#39);/g, + X = /[&<>"']/g, Y = RegExp(G.source), Z = RegExp(X.source), J = /<%-([\s\S]+?)%>/g, + ee = /<%([\s\S]+?)%>/g, te = /<%=([\s\S]+?)%>/g, + ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, re = /^\w*$/, + ie = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + oe = /[\\^$.*+?()[\]{}|]/g, ae = RegExp(oe.source), se = /^\s+/, le = /\s/, + ue = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, ce = /\{\n\/\* \[wrapped with (.+)\] \*/, + de = /,? & /, fe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, he = /[()=,{}\[\]\/\s]/, + pe = /\\(\\)?/g, ve = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ge = /\w*$/, ye = /^[-+]0x[0-9a-f]+$/i, + me = /^0b[01]+$/i, be = /^\[object .+?Constructor\]$/, xe = /^0o[0-7]+$/i, we = /^(?:0|[1-9]\d*)$/, + Ce = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, De = /($^)/, Se = /['\n\r\u2028\u2029\\]/g, + Ee = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", ke = "\\u2700-\\u27bf", + je = "a-z\\xdf-\\xf6\\xf8-\\xff", Oe = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ae = "\\ufe0e\\ufe0f", + Ie = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", + Fe = "['\u2019]", Pe = "[\\ud800-\\udfff]", _e = "[" + Ie + "]", Te = "[" + Ee + "]", Re = "\\d+", + Ne = "[\\u2700-\\u27bf]", Me = "[" + je + "]", + Be = "[^\\ud800-\\udfff" + Ie + Re + ke + je + Oe + "]", Le = "\\ud83c[\\udffb-\\udfff]", + Ue = "[^\\ud800-\\udfff]", ze = "(?:\\ud83c[\\udde6-\\uddff]){2}", + Ve = "[\\ud800-\\udbff][\\udc00-\\udfff]", He = "[" + Oe + "]", We = "(?:" + Me + "|" + Be + ")", + qe = "(?:" + He + "|" + Be + ")", Ke = "(?:['\u2019](?:d|ll|m|re|s|t|ve))?", + $e = "(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", Qe = "(?:" + Te + "|" + Le + ")" + "?", + Ge = "[\\ufe0e\\ufe0f]?", + Xe = Ge + Qe + ("(?:\\u200d(?:" + [Ue, ze, Ve].join("|") + ")" + Ge + Qe + ")*"), + Ye = "(?:" + [Ne, ze, Ve].join("|") + ")" + Xe, + Ze = "(?:" + [Ue + Te + "?", Te, ze, Ve, Pe].join("|") + ")", Je = RegExp(Fe, "g"), + et = RegExp(Te, "g"), tt = RegExp(Le + "(?=" + Le + ")|" + Ze + Xe, "g"), + nt = RegExp([He + "?" + Me + "+" + Ke + "(?=" + [_e, He, "$"].join("|") + ")", qe + "+" + $e + "(?=" + [_e, He + We, "$"].join("|") + ")", He + "?" + We + "+" + Ke, He + "+" + $e, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Re, Ye].join("|"), "g"), + rt = RegExp("[\\u200d\\ud800-\\udfff" + Ee + Ae + "]"), + it = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + ot = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], + at = -1, st = {}; + st[M] = st[B] = st[L] = st[U] = st[z] = st[V] = st[H] = st[W] = st[q] = !0, st[b] = st[x] = st[R] = st[w] = st[N] = st[C] = st[D] = st[S] = st[k] = st[j] = st[O] = st[I] = st[F] = st[P] = st[T] = !1; + var lt = {}; + lt[b] = lt[x] = lt[R] = lt[N] = lt[w] = lt[C] = lt[M] = lt[B] = lt[L] = lt[U] = lt[z] = lt[k] = lt[j] = lt[O] = lt[I] = lt[F] = lt[P] = lt[_] = lt[V] = lt[H] = lt[W] = lt[q] = !0, lt[D] = lt[S] = lt[T] = !1; + var ut = {"\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029"}, + ct = parseFloat, dt = parseInt, ft = "object" == typeof e && e && e.Object === Object && e, + ht = "object" == typeof self && self && self.Object === Object && self, + pt = ft || ht || Function("return this")(), vt = t && !t.nodeType && t, + gt = vt && "object" == typeof r && r && !r.nodeType && r, yt = gt && gt.exports === vt, + mt = yt && ft.process, bt = function () { + try { + var e = gt && gt.require && gt.require("util").types; + return e || mt && mt.binding && mt.binding("util") + } catch (t) { + } + }(), xt = bt && bt.isArrayBuffer, wt = bt && bt.isDate, Ct = bt && bt.isMap, Dt = bt && bt.isRegExp, + St = bt && bt.isSet, Et = bt && bt.isTypedArray; + + function kt(e, t, n) { + switch (n.length) { + case 0: + return e.call(t); + case 1: + return e.call(t, n[0]); + case 2: + return e.call(t, n[0], n[1]); + case 3: + return e.call(t, n[0], n[1], n[2]) + } + return e.apply(t, n) + } + + function jt(e, t, n, r) { + for (var i = -1, o = null == e ? 0 : e.length; ++i < o;) { + var a = e[i]; + t(r, a, n(a), e) + } + return r + } + + function Ot(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e);) ; + return e + } + + function At(e, t) { + for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e);) ; + return e + } + + function It(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (!t(e[n], n, e)) return !1; + return !0 + } + + function Ft(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = 0, o = []; ++n < r;) { + var a = e[n]; + t(a, n, e) && (o[i++] = a) + } + return o + } + + function Pt(e, t) { + return !!(null == e ? 0 : e.length) && Vt(e, t, 0) > -1 + } + + function _t(e, t, n) { + for (var r = -1, i = null == e ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0; + return !1 + } + + function Tt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e); + return i + } + + function Rt(e, t) { + for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n]; + return e + } + + function Nt(e, t, n, r) { + var i = -1, o = null == e ? 0 : e.length; + for (r && o && (n = e[++i]); ++i < o;) n = t(n, e[i], i, e); + return n + } + + function Mt(e, t, n, r) { + var i = null == e ? 0 : e.length; + for (r && i && (n = e[--i]); i--;) n = t(n, e[i], i, e); + return n + } + + function Bt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0; + return !1 + } + + var Lt = Kt("length"); + + function Ut(e, t, n) { + var r; + return n(e, (function (e, n, i) { + if (t(e, n, i)) return r = n, !1 + })), r + } + + function zt(e, t, n, r) { + for (var i = e.length, o = n + (r ? 1 : -1); r ? o-- : ++o < i;) if (t(e[o], o, e)) return o; + return -1 + } + + function Vt(e, t, n) { + return t === t ? function (e, t, n) { + var r = n - 1, i = e.length; + for (; ++r < i;) if (e[r] === t) return r; + return -1 + }(e, t, n) : zt(e, Wt, n) + } + + function Ht(e, t, n, r) { + for (var i = n - 1, o = e.length; ++i < o;) if (r(e[i], t)) return i; + return -1 + } + + function Wt(e) { + return e !== e + } + + function qt(e, t) { + var n = null == e ? 0 : e.length; + return n ? Gt(e, t) / n : g + } + + function Kt(e) { + return function (t) { + return null == t ? o : t[e] + } + } + + function $t(e) { + return function (t) { + return null == e ? o : e[t] + } + } + + function Qt(e, t, n, r, i) { + return i(e, (function (e, i, o) { + n = r ? (r = !1, e) : t(n, e, i, o) + })), n + } + + function Gt(e, t) { + for (var n, r = -1, i = e.length; ++r < i;) { + var a = t(e[r]); + a !== o && (n = n === o ? a : n + a) + } + return n + } + + function Xt(e, t) { + for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n); + return r + } + + function Yt(e) { + return e ? e.slice(0, gn(e) + 1).replace(se, "") : e + } + + function Zt(e) { + return function (t) { + return e(t) + } + } + + function Jt(e, t) { + return Tt(t, (function (t) { + return e[t] + })) + } + + function en(e, t) { + return e.has(t) + } + + function tn(e, t) { + for (var n = -1, r = e.length; ++n < r && Vt(t, e[n], 0) > -1;) ; + return n + } + + function nn(e, t) { + for (var n = e.length; n-- && Vt(t, e[n], 0) > -1;) ; + return n + } + + function rn(e, t) { + for (var n = e.length, r = 0; n--;) e[n] === t && ++r; + return r + } + + var on = $t({ + "\xc0": "A", + "\xc1": "A", + "\xc2": "A", + "\xc3": "A", + "\xc4": "A", + "\xc5": "A", + "\xe0": "a", + "\xe1": "a", + "\xe2": "a", + "\xe3": "a", + "\xe4": "a", + "\xe5": "a", + "\xc7": "C", + "\xe7": "c", + "\xd0": "D", + "\xf0": "d", + "\xc8": "E", + "\xc9": "E", + "\xca": "E", + "\xcb": "E", + "\xe8": "e", + "\xe9": "e", + "\xea": "e", + "\xeb": "e", + "\xcc": "I", + "\xcd": "I", + "\xce": "I", + "\xcf": "I", + "\xec": "i", + "\xed": "i", + "\xee": "i", + "\xef": "i", + "\xd1": "N", + "\xf1": "n", + "\xd2": "O", + "\xd3": "O", + "\xd4": "O", + "\xd5": "O", + "\xd6": "O", + "\xd8": "O", + "\xf2": "o", + "\xf3": "o", + "\xf4": "o", + "\xf5": "o", + "\xf6": "o", + "\xf8": "o", + "\xd9": "U", + "\xda": "U", + "\xdb": "U", + "\xdc": "U", + "\xf9": "u", + "\xfa": "u", + "\xfb": "u", + "\xfc": "u", + "\xdd": "Y", + "\xfd": "y", + "\xff": "y", + "\xc6": "Ae", + "\xe6": "ae", + "\xde": "Th", + "\xfe": "th", + "\xdf": "ss", + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010a": "C", + "\u010c": "C", + "\u0107": "c", + "\u0109": "c", + "\u010b": "c", + "\u010d": "c", + "\u010e": "D", + "\u0110": "D", + "\u010f": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011a": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011b": "e", + "\u011c": "G", + "\u011e": "G", + "\u0120": "G", + "\u0122": "G", + "\u011d": "g", + "\u011f": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012a": "I", + "\u012c": "I", + "\u012e": "I", + "\u0130": "I", + "\u0129": "i", + "\u012b": "i", + "\u012d": "i", + "\u012f": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013b": "L", + "\u013d": "L", + "\u013f": "L", + "\u0141": "L", + "\u013a": "l", + "\u013c": "l", + "\u013e": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014a": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014b": "n", + "\u014c": "O", + "\u014e": "O", + "\u0150": "O", + "\u014d": "o", + "\u014f": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015a": "S", + "\u015c": "S", + "\u015e": "S", + "\u0160": "S", + "\u015b": "s", + "\u015d": "s", + "\u015f": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016a": "U", + "\u016c": "U", + "\u016e": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016b": "u", + "\u016d": "u", + "\u016f": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017b": "Z", + "\u017d": "Z", + "\u017a": "z", + "\u017c": "z", + "\u017e": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017f": "s" + }), an = $t({"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}); + + function sn(e) { + return "\\" + ut[e] + } + + function ln(e) { + return rt.test(e) + } + + function un(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e, r) { + n[++t] = [r, e] + })), n + } + + function cn(e, t) { + return function (n) { + return e(t(n)) + } + } + + function dn(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var a = e[n]; + a !== t && a !== l || (e[n] = l, o[i++] = n) + } + return o + } + + function fn(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e) { + n[++t] = e + })), n + } + + function hn(e) { + var t = -1, n = Array(e.size); + return e.forEach((function (e) { + n[++t] = [e, e] + })), n + } + + function pn(e) { + return ln(e) ? function (e) { + var t = tt.lastIndex = 0; + for (; tt.test(e);) ++t; + return t + }(e) : Lt(e) + } + + function vn(e) { + return ln(e) ? function (e) { + return e.match(tt) || [] + }(e) : function (e) { + return e.split("") + }(e) + } + + function gn(e) { + for (var t = e.length; t-- && le.test(e.charAt(t));) ; + return t + } + + var yn = $t({"&": "&", "<": "<", ">": ">", """: '"', "'": "'"}); + var mn = function e(t) { + var n = (t = null == t ? pt : mn.defaults(pt.Object(), t, mn.pick(pt, ot))).Array, r = t.Date, + i = t.Error, le = t.Function, Ee = t.Math, ke = t.Object, je = t.RegExp, Oe = t.String, + Ae = t.TypeError, Ie = n.prototype, Fe = le.prototype, Pe = ke.prototype, + _e = t["__core-js_shared__"], Te = Fe.toString, Re = Pe.hasOwnProperty, Ne = 0, + Me = function () { + var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || ""); + return e ? "Symbol(src)_1." + e : "" + }(), Be = Pe.toString, Le = Te.call(ke), Ue = pt._, + ze = je("^" + Te.call(Re).replace(oe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), + Ve = yt ? t.Buffer : o, He = t.Symbol, We = t.Uint8Array, qe = Ve ? Ve.allocUnsafe : o, + Ke = cn(ke.getPrototypeOf, ke), $e = ke.create, Qe = Pe.propertyIsEnumerable, Ge = Ie.splice, + Xe = He ? He.isConcatSpreadable : o, Ye = He ? He.iterator : o, Ze = He ? He.toStringTag : o, + tt = function () { + try { + var e = ho(ke, "defineProperty"); + return e({}, "", {}), e + } catch (t) { + } + }(), rt = t.clearTimeout !== pt.clearTimeout && t.clearTimeout, + ut = r && r.now !== pt.Date.now && r.now, ft = t.setTimeout !== pt.setTimeout && t.setTimeout, + ht = Ee.ceil, vt = Ee.floor, gt = ke.getOwnPropertySymbols, mt = Ve ? Ve.isBuffer : o, + bt = t.isFinite, Lt = Ie.join, $t = cn(ke.keys, ke), bn = Ee.max, xn = Ee.min, wn = r.now, + Cn = t.parseInt, Dn = Ee.random, Sn = Ie.reverse, En = ho(t, "DataView"), kn = ho(t, "Map"), + jn = ho(t, "Promise"), On = ho(t, "Set"), An = ho(t, "WeakMap"), In = ho(ke, "create"), + Fn = An && new An, Pn = {}, _n = Uo(En), Tn = Uo(kn), Rn = Uo(jn), Nn = Uo(On), Mn = Uo(An), + Bn = He ? He.prototype : o, Ln = Bn ? Bn.valueOf : o, Un = Bn ? Bn.toString : o; + + function zn(e) { + if (rs(e) && !Ka(e) && !(e instanceof qn)) { + if (e instanceof Wn) return e; + if (Re.call(e, "__wrapped__")) return zo(e) + } + return new Wn(e) + } + + var Vn = function () { + function e() { + } + + return function (t) { + if (!ns(t)) return {}; + if ($e) return $e(t); + e.prototype = t; + var n = new e; + return e.prototype = o, n + } + }(); + + function Hn() { + } + + function Wn(e, t) { + this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = o + } + + function qn(e) { + this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = y, this.__views__ = [] + } + + function Kn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function $n(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Qn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Gn(e) { + var t = -1, n = null == e ? 0 : e.length; + for (this.__data__ = new Qn; ++t < n;) this.add(e[t]) + } + + function Xn(e) { + var t = this.__data__ = new $n(e); + this.size = t.size + } + + function Yn(e, t) { + var n = Ka(e), r = !n && qa(e), i = !n && !r && Xa(e), o = !n && !r && !i && ds(e), + a = n || r || i || o, s = a ? Xt(e.length, Oe) : [], l = s.length; + for (var u in e) !t && !Re.call(e, u) || a && ("length" == u || i && ("offset" == u || "parent" == u) || o && ("buffer" == u || "byteLength" == u || "byteOffset" == u) || xo(u, l)) || s.push(u); + return s + } + + function Zn(e) { + var t = e.length; + return t ? e[Gr(0, t - 1)] : o + } + + function Jn(e, t) { + return Mo(Ii(e), lr(t, 0, e.length)) + } + + function er(e) { + return Mo(Ii(e)) + } + + function tr(e, t, n) { + (n !== o && !Va(e[t], n) || n === o && !(t in e)) && ar(e, t, n) + } + + function nr(e, t, n) { + var r = e[t]; + Re.call(e, t) && Va(r, n) && (n !== o || t in e) || ar(e, t, n) + } + + function rr(e, t) { + for (var n = e.length; n--;) if (Va(e[n][0], t)) return n; + return -1 + } + + function ir(e, t, n, r) { + return hr(e, (function (e, i, o) { + t(r, e, n(e), o) + })), r + } + + function or(e, t) { + return e && Fi(t, _s(t), e) + } + + function ar(e, t, n) { + "__proto__" == t && tt ? tt(e, t, { + configurable: !0, + enumerable: !0, + value: n, + writable: !0 + }) : e[t] = n + } + + function sr(e, t) { + for (var r = -1, i = t.length, a = n(i), s = null == e; ++r < i;) a[r] = s ? o : Os(e, t[r]); + return a + } + + function lr(e, t, n) { + return e === e && (n !== o && (e = e <= n ? e : n), t !== o && (e = e >= t ? e : t)), e + } + + function ur(e, t, n, r, i, a) { + var s, l = 1 & t, u = 2 & t, c = 4 & t; + if (n && (s = i ? n(e, r, i, a) : n(e)), s !== o) return s; + if (!ns(e)) return e; + var d = Ka(e); + if (d) { + if (s = function (e) { + var t = e.length, n = new e.constructor(t); + t && "string" == typeof e[0] && Re.call(e, "index") && (n.index = e.index, n.input = e.input); + return n + }(e), !l) return Ii(e, s) + } else { + var f = go(e), h = f == S || f == E; + if (Xa(e)) return Si(e, l); + if (f == O || f == b || h && !i) { + if (s = u || h ? {} : mo(e), !l) return u ? function (e, t) { + return Fi(e, vo(e), t) + }(e, function (e, t) { + return e && Fi(t, Ts(t), e) + }(s, e)) : function (e, t) { + return Fi(e, po(e), t) + }(e, or(s, e)) + } else { + if (!lt[f]) return i ? e : {}; + s = function (e, t, n) { + var r = e.constructor; + switch (t) { + case R: + return Ei(e); + case w: + case C: + return new r(+e); + case N: + return function (e, t) { + var n = t ? Ei(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.byteLength) + }(e, n); + case M: + case B: + case L: + case U: + case z: + case V: + case H: + case W: + case q: + return ki(e, n); + case k: + case F: + return new r; + case j: + case P: + return new r(e); + case I: + return function (e) { + var t = new e.constructor(e.source, ge.exec(e)); + return t.lastIndex = e.lastIndex, t + }(e); + case _: + return i = e, Ln ? ke(Ln.call(i)) : {} + } + var i + }(e, f, l) + } + } + a || (a = new Xn); + var p = a.get(e); + if (p) return p; + a.set(e, s), ls(e) ? e.forEach((function (r) { + s.add(ur(r, t, n, r, e, a)) + })) : is(e) && e.forEach((function (r, i) { + s.set(i, ur(r, t, n, i, e, a)) + })); + var v = d ? o : (c ? u ? oo : io : u ? Ts : _s)(e); + return Ot(v || e, (function (r, i) { + v && (r = e[i = r]), nr(s, i, ur(r, t, n, i, e, a)) + })), s + } + + function cr(e, t, n) { + var r = n.length; + if (null == e) return !r; + for (e = ke(e); r--;) { + var i = n[r], a = t[i], s = e[i]; + if (s === o && !(i in e) || !a(s)) return !1 + } + return !0 + } + + function dr(e, t, n) { + if ("function" != typeof e) throw new Ae(a); + return _o((function () { + e.apply(o, n) + }), t) + } + + function fr(e, t, n, r) { + var i = -1, o = Pt, a = !0, s = e.length, l = [], u = t.length; + if (!s) return l; + n && (t = Tt(t, Zt(n))), r ? (o = _t, a = !1) : t.length >= 200 && (o = en, a = !1, t = new Gn(t)); + e:for (; ++i < s;) { + var c = e[i], d = null == n ? c : n(c); + if (c = r || 0 !== c ? c : 0, a && d === d) { + for (var f = u; f--;) if (t[f] === d) continue e; + l.push(c) + } else o(t, d, r) || l.push(c) + } + return l + } + + zn.templateSettings = { + escape: J, + evaluate: ee, + interpolate: te, + variable: "", + imports: {_: zn} + }, zn.prototype = Hn.prototype, zn.prototype.constructor = zn, Wn.prototype = Vn(Hn.prototype), Wn.prototype.constructor = Wn, qn.prototype = Vn(Hn.prototype), qn.prototype.constructor = qn, Kn.prototype.clear = function () { + this.__data__ = In ? In(null) : {}, this.size = 0 + }, Kn.prototype.delete = function (e) { + var t = this.has(e) && delete this.__data__[e]; + return this.size -= t ? 1 : 0, t + }, Kn.prototype.get = function (e) { + var t = this.__data__; + if (In) { + var n = t[e]; + return n === s ? o : n + } + return Re.call(t, e) ? t[e] : o + }, Kn.prototype.has = function (e) { + var t = this.__data__; + return In ? t[e] !== o : Re.call(t, e) + }, Kn.prototype.set = function (e, t) { + var n = this.__data__; + return this.size += this.has(e) ? 0 : 1, n[e] = In && t === o ? s : t, this + }, $n.prototype.clear = function () { + this.__data__ = [], this.size = 0 + }, $n.prototype.delete = function (e) { + var t = this.__data__, n = rr(t, e); + return !(n < 0) && (n == t.length - 1 ? t.pop() : Ge.call(t, n, 1), --this.size, !0) + }, $n.prototype.get = function (e) { + var t = this.__data__, n = rr(t, e); + return n < 0 ? o : t[n][1] + }, $n.prototype.has = function (e) { + return rr(this.__data__, e) > -1 + }, $n.prototype.set = function (e, t) { + var n = this.__data__, r = rr(n, e); + return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this + }, Qn.prototype.clear = function () { + this.size = 0, this.__data__ = {hash: new Kn, map: new (kn || $n), string: new Kn} + }, Qn.prototype.delete = function (e) { + var t = co(this, e).delete(e); + return this.size -= t ? 1 : 0, t + }, Qn.prototype.get = function (e) { + return co(this, e).get(e) + }, Qn.prototype.has = function (e) { + return co(this, e).has(e) + }, Qn.prototype.set = function (e, t) { + var n = co(this, e), r = n.size; + return n.set(e, t), this.size += n.size == r ? 0 : 1, this + }, Gn.prototype.add = Gn.prototype.push = function (e) { + return this.__data__.set(e, s), this + }, Gn.prototype.has = function (e) { + return this.__data__.has(e) + }, Xn.prototype.clear = function () { + this.__data__ = new $n, this.size = 0 + }, Xn.prototype.delete = function (e) { + var t = this.__data__, n = t.delete(e); + return this.size = t.size, n + }, Xn.prototype.get = function (e) { + return this.__data__.get(e) + }, Xn.prototype.has = function (e) { + return this.__data__.has(e) + }, Xn.prototype.set = function (e, t) { + var n = this.__data__; + if (n instanceof $n) { + var r = n.__data__; + if (!kn || r.length < 199) return r.push([e, t]), this.size = ++n.size, this; + n = this.__data__ = new Qn(r) + } + return n.set(e, t), this.size = n.size, this + }; + var hr = Ti(wr), pr = Ti(Cr, !0); + + function vr(e, t) { + var n = !0; + return hr(e, (function (e, r, i) { + return n = !!t(e, r, i) + })), n + } + + function gr(e, t, n) { + for (var r = -1, i = e.length; ++r < i;) { + var a = e[r], s = t(a); + if (null != s && (l === o ? s === s && !cs(s) : n(s, l))) var l = s, u = a + } + return u + } + + function yr(e, t) { + var n = []; + return hr(e, (function (e, r, i) { + t(e, r, i) && n.push(e) + })), n + } + + function mr(e, t, n, r, i) { + var o = -1, a = e.length; + for (n || (n = bo), i || (i = []); ++o < a;) { + var s = e[o]; + t > 0 && n(s) ? t > 1 ? mr(s, t - 1, n, r, i) : Rt(i, s) : r || (i[i.length] = s) + } + return i + } + + var br = Ri(), xr = Ri(!0); + + function wr(e, t) { + return e && br(e, t, _s) + } + + function Cr(e, t) { + return e && xr(e, t, _s) + } + + function Dr(e, t) { + return Ft(t, (function (t) { + return Ja(e[t]) + })) + } + + function Sr(e, t) { + for (var n = 0, r = (t = xi(t, e)).length; null != e && n < r;) e = e[Lo(t[n++])]; + return n && n == r ? e : o + } + + function Er(e, t, n) { + var r = t(e); + return Ka(e) ? r : Rt(r, n(e)) + } + + function kr(e) { + return null == e ? e === o ? "[object Undefined]" : "[object Null]" : Ze && Ze in ke(e) ? function (e) { + var t = Re.call(e, Ze), n = e[Ze]; + try { + e[Ze] = o; + var r = !0 + } catch (a) { + } + var i = Be.call(e); + r && (t ? e[Ze] = n : delete e[Ze]); + return i + }(e) : function (e) { + return Be.call(e) + }(e) + } + + function jr(e, t) { + return e > t + } + + function Or(e, t) { + return null != e && Re.call(e, t) + } + + function Ar(e, t) { + return null != e && t in ke(e) + } + + function Ir(e, t, r) { + for (var i = r ? _t : Pt, a = e[0].length, s = e.length, l = s, u = n(s), c = 1 / 0, d = []; l--;) { + var f = e[l]; + l && t && (f = Tt(f, Zt(t))), c = xn(f.length, c), u[l] = !r && (t || a >= 120 && f.length >= 120) ? new Gn(l && f) : o + } + f = e[0]; + var h = -1, p = u[0]; + e:for (; ++h < a && d.length < c;) { + var v = f[h], g = t ? t(v) : v; + if (v = r || 0 !== v ? v : 0, !(p ? en(p, g) : i(d, g, r))) { + for (l = s; --l;) { + var y = u[l]; + if (!(y ? en(y, g) : i(e[l], g, r))) continue e + } + p && p.push(g), d.push(v) + } + } + return d + } + + function Fr(e, t, n) { + var r = null == (e = Ao(e, t = xi(t, e))) ? e : e[Lo(Zo(t))]; + return null == r ? o : kt(r, e, n) + } + + function Pr(e) { + return rs(e) && kr(e) == b + } + + function _r(e, t, n, r, i) { + return e === t || (null == e || null == t || !rs(e) && !rs(t) ? e !== e && t !== t : function (e, t, n, r, i, a) { + var s = Ka(e), l = Ka(t), u = s ? x : go(e), c = l ? x : go(t), + d = (u = u == b ? O : u) == O, f = (c = c == b ? O : c) == O, h = u == c; + if (h && Xa(e)) { + if (!Xa(t)) return !1; + s = !0, d = !1 + } + if (h && !d) return a || (a = new Xn), s || ds(e) ? no(e, t, n, r, i, a) : function (e, t, n, r, i, o, a) { + switch (n) { + case N: + if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; + e = e.buffer, t = t.buffer; + case R: + return !(e.byteLength != t.byteLength || !o(new We(e), new We(t))); + case w: + case C: + case j: + return Va(+e, +t); + case D: + return e.name == t.name && e.message == t.message; + case I: + case P: + return e == t + ""; + case k: + var s = un; + case F: + var l = 1 & r; + if (s || (s = fn), e.size != t.size && !l) return !1; + var u = a.get(e); + if (u) return u == t; + r |= 2, a.set(e, t); + var c = no(s(e), s(t), r, i, o, a); + return a.delete(e), c; + case _: + if (Ln) return Ln.call(e) == Ln.call(t) + } + return !1 + }(e, t, u, n, r, i, a); + if (!(1 & n)) { + var p = d && Re.call(e, "__wrapped__"), v = f && Re.call(t, "__wrapped__"); + if (p || v) { + var g = p ? e.value() : e, y = v ? t.value() : t; + return a || (a = new Xn), i(g, y, n, r, a) + } + } + if (!h) return !1; + return a || (a = new Xn), function (e, t, n, r, i, a) { + var s = 1 & n, l = io(e), u = l.length, c = io(t).length; + if (u != c && !s) return !1; + var d = u; + for (; d--;) { + var f = l[d]; + if (!(s ? f in t : Re.call(t, f))) return !1 + } + var h = a.get(e), p = a.get(t); + if (h && p) return h == t && p == e; + var v = !0; + a.set(e, t), a.set(t, e); + var g = s; + for (; ++d < u;) { + var y = e[f = l[d]], m = t[f]; + if (r) var b = s ? r(m, y, f, t, e, a) : r(y, m, f, e, t, a); + if (!(b === o ? y === m || i(y, m, n, r, a) : b)) { + v = !1; + break + } + g || (g = "constructor" == f) + } + if (v && !g) { + var x = e.constructor, w = t.constructor; + x == w || !("constructor" in e) || !("constructor" in t) || "function" == typeof x && x instanceof x && "function" == typeof w && w instanceof w || (v = !1) + } + return a.delete(e), a.delete(t), v + }(e, t, n, r, i, a) + }(e, t, n, r, _r, i)) + } + + function Tr(e, t, n, r) { + var i = n.length, a = i, s = !r; + if (null == e) return !a; + for (e = ke(e); i--;) { + var l = n[i]; + if (s && l[2] ? l[1] !== e[l[0]] : !(l[0] in e)) return !1 + } + for (; ++i < a;) { + var u = (l = n[i])[0], c = e[u], d = l[1]; + if (s && l[2]) { + if (c === o && !(u in e)) return !1 + } else { + var f = new Xn; + if (r) var h = r(c, d, u, e, t, f); + if (!(h === o ? _r(d, c, 3, r, f) : h)) return !1 + } + } + return !0 + } + + function Rr(e) { + return !(!ns(e) || (t = e, Me && Me in t)) && (Ja(e) ? ze : be).test(Uo(e)); + var t + } + + function Nr(e) { + return "function" == typeof e ? e : null == e ? ol : "object" == typeof e ? Ka(e) ? Vr(e[0], e[1]) : zr(e) : pl(e) + } + + function Mr(e) { + if (!Eo(e)) return $t(e); + var t = []; + for (var n in ke(e)) Re.call(e, n) && "constructor" != n && t.push(n); + return t + } + + function Br(e) { + if (!ns(e)) return function (e) { + var t = []; + if (null != e) for (var n in ke(e)) t.push(n); + return t + }(e); + var t = Eo(e), n = []; + for (var r in e) ("constructor" != r || !t && Re.call(e, r)) && n.push(r); + return n + } + + function Lr(e, t) { + return e < t + } + + function Ur(e, t) { + var r = -1, i = Qa(e) ? n(e.length) : []; + return hr(e, (function (e, n, o) { + i[++r] = t(e, n, o) + })), i + } + + function zr(e) { + var t = fo(e); + return 1 == t.length && t[0][2] ? jo(t[0][0], t[0][1]) : function (n) { + return n === e || Tr(n, e, t) + } + } + + function Vr(e, t) { + return Co(e) && ko(t) ? jo(Lo(e), t) : function (n) { + var r = Os(n, e); + return r === o && r === t ? As(n, e) : _r(t, r, 3) + } + } + + function Hr(e, t, n, r, i) { + e !== t && br(t, (function (a, s) { + if (i || (i = new Xn), ns(a)) !function (e, t, n, r, i, a, s) { + var l = Fo(e, n), u = Fo(t, n), c = s.get(u); + if (c) return void tr(e, n, c); + var d = a ? a(l, u, n + "", e, t, s) : o, f = d === o; + if (f) { + var h = Ka(u), p = !h && Xa(u), v = !h && !p && ds(u); + d = u, h || p || v ? Ka(l) ? d = l : Ga(l) ? d = Ii(l) : p ? (f = !1, d = Si(u, !0)) : v ? (f = !1, d = ki(u, !0)) : d = [] : as(u) || qa(u) ? (d = l, qa(l) ? d = bs(l) : ns(l) && !Ja(l) || (d = mo(u))) : f = !1 + } + f && (s.set(u, d), i(d, u, r, a, s), s.delete(u)); + tr(e, n, d) + }(e, t, s, n, Hr, r, i); else { + var l = r ? r(Fo(e, s), a, s + "", e, t, i) : o; + l === o && (l = a), tr(e, s, l) + } + }), Ts) + } + + function Wr(e, t) { + var n = e.length; + if (n) return xo(t += t < 0 ? n : 0, n) ? e[t] : o + } + + function qr(e, t, n) { + t = t.length ? Tt(t, (function (e) { + return Ka(e) ? function (t) { + return Sr(t, 1 === e.length ? e[0] : e) + } : e + })) : [ol]; + var r = -1; + t = Tt(t, Zt(uo())); + var i = Ur(e, (function (e, n, i) { + var o = Tt(t, (function (t) { + return t(e) + })); + return {criteria: o, index: ++r, value: e} + })); + return function (e, t) { + var n = e.length; + for (e.sort(t); n--;) e[n] = e[n].value; + return e + }(i, (function (e, t) { + return function (e, t, n) { + var r = -1, i = e.criteria, o = t.criteria, a = i.length, s = n.length; + for (; ++r < a;) { + var l = ji(i[r], o[r]); + if (l) return r >= s ? l : l * ("desc" == n[r] ? -1 : 1) + } + return e.index - t.index + }(e, t, n) + })) + } + + function Kr(e, t, n) { + for (var r = -1, i = t.length, o = {}; ++r < i;) { + var a = t[r], s = Sr(e, a); + n(s, a) && ei(o, xi(a, e), s) + } + return o + } + + function $r(e, t, n, r) { + var i = r ? Ht : Vt, o = -1, a = t.length, s = e; + for (e === t && (t = Ii(t)), n && (s = Tt(e, Zt(n))); ++o < a;) for (var l = 0, u = t[o], c = n ? n(u) : u; (l = i(s, c, l, r)) > -1;) s !== e && Ge.call(s, l, 1), Ge.call(e, l, 1); + return e + } + + function Qr(e, t) { + for (var n = e ? t.length : 0, r = n - 1; n--;) { + var i = t[n]; + if (n == r || i !== o) { + var o = i; + xo(i) ? Ge.call(e, i, 1) : fi(e, i) + } + } + return e + } + + function Gr(e, t) { + return e + vt(Dn() * (t - e + 1)) + } + + function Xr(e, t) { + var n = ""; + if (!e || t < 1 || t > v) return n; + do { + t % 2 && (n += e), (t = vt(t / 2)) && (e += e) + } while (t); + return n + } + + function Yr(e, t) { + return To(Oo(e, t, ol), e + "") + } + + function Zr(e) { + return Zn(Vs(e)) + } + + function Jr(e, t) { + var n = Vs(e); + return Mo(n, lr(t, 0, n.length)) + } + + function ei(e, t, n, r) { + if (!ns(e)) return e; + for (var i = -1, a = (t = xi(t, e)).length, s = a - 1, l = e; null != l && ++i < a;) { + var u = Lo(t[i]), c = n; + if ("__proto__" === u || "constructor" === u || "prototype" === u) return e; + if (i != s) { + var d = l[u]; + (c = r ? r(d, u, l) : o) === o && (c = ns(d) ? d : xo(t[i + 1]) ? [] : {}) + } + nr(l, u, c), l = l[u] + } + return e + } + + var ti = Fn ? function (e, t) { + return Fn.set(e, t), e + } : ol, ni = tt ? function (e, t) { + return tt(e, "toString", {configurable: !0, enumerable: !1, value: nl(t), writable: !0}) + } : ol; + + function ri(e) { + return Mo(Vs(e)) + } + + function ii(e, t, r) { + var i = -1, o = e.length; + t < 0 && (t = -t > o ? 0 : o + t), (r = r > o ? o : r) < 0 && (r += o), o = t > r ? 0 : r - t >>> 0, t >>>= 0; + for (var a = n(o); ++i < o;) a[i] = e[i + t]; + return a + } + + function oi(e, t) { + var n; + return hr(e, (function (e, r, i) { + return !(n = t(e, r, i)) + })), !!n + } + + function ai(e, t, n) { + var r = 0, i = null == e ? r : e.length; + if ("number" == typeof t && t === t && i <= 2147483647) { + for (; r < i;) { + var o = r + i >>> 1, a = e[o]; + null !== a && !cs(a) && (n ? a <= t : a < t) ? r = o + 1 : i = o + } + return i + } + return si(e, t, ol, n) + } + + function si(e, t, n, r) { + var i = 0, a = null == e ? 0 : e.length; + if (0 === a) return 0; + for (var s = (t = n(t)) !== t, l = null === t, u = cs(t), c = t === o; i < a;) { + var d = vt((i + a) / 2), f = n(e[d]), h = f !== o, p = null === f, v = f === f, g = cs(f); + if (s) var y = r || v; else y = c ? v && (r || h) : l ? v && h && (r || !p) : u ? v && h && !p && (r || !g) : !p && !g && (r ? f <= t : f < t); + y ? i = d + 1 : a = d + } + return xn(a, 4294967294) + } + + function li(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var a = e[n], s = t ? t(a) : a; + if (!n || !Va(s, l)) { + var l = s; + o[i++] = 0 === a ? 0 : a + } + } + return o + } + + function ui(e) { + return "number" == typeof e ? e : cs(e) ? g : +e + } + + function ci(e) { + if ("string" == typeof e) return e; + if (Ka(e)) return Tt(e, ci) + ""; + if (cs(e)) return Un ? Un.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function di(e, t, n) { + var r = -1, i = Pt, o = e.length, a = !0, s = [], l = s; + if (n) a = !1, i = _t; else if (o >= 200) { + var u = t ? null : Xi(e); + if (u) return fn(u); + a = !1, i = en, l = new Gn + } else l = t ? [] : s; + e:for (; ++r < o;) { + var c = e[r], d = t ? t(c) : c; + if (c = n || 0 !== c ? c : 0, a && d === d) { + for (var f = l.length; f--;) if (l[f] === d) continue e; + t && l.push(d), s.push(c) + } else i(l, d, n) || (l !== s && l.push(d), s.push(c)) + } + return s + } + + function fi(e, t) { + return null == (e = Ao(e, t = xi(t, e))) || delete e[Lo(Zo(t))] + } + + function hi(e, t, n, r) { + return ei(e, t, n(Sr(e, t)), r) + } + + function pi(e, t, n, r) { + for (var i = e.length, o = r ? i : -1; (r ? o-- : ++o < i) && t(e[o], o, e);) ; + return n ? ii(e, r ? 0 : o, r ? o + 1 : i) : ii(e, r ? o + 1 : 0, r ? i : o) + } + + function vi(e, t) { + var n = e; + return n instanceof qn && (n = n.value()), Nt(t, (function (e, t) { + return t.func.apply(t.thisArg, Rt([e], t.args)) + }), n) + } + + function gi(e, t, r) { + var i = e.length; + if (i < 2) return i ? di(e[0]) : []; + for (var o = -1, a = n(i); ++o < i;) for (var s = e[o], l = -1; ++l < i;) l != o && (a[o] = fr(a[o] || s, e[l], t, r)); + return di(mr(a, 1), t, r) + } + + function yi(e, t, n) { + for (var r = -1, i = e.length, a = t.length, s = {}; ++r < i;) { + var l = r < a ? t[r] : o; + n(s, e[r], l) + } + return s + } + + function mi(e) { + return Ga(e) ? e : [] + } + + function bi(e) { + return "function" == typeof e ? e : ol + } + + function xi(e, t) { + return Ka(e) ? e : Co(e, t) ? [e] : Bo(xs(e)) + } + + var wi = Yr; + + function Ci(e, t, n) { + var r = e.length; + return n = n === o ? r : n, !t && n >= r ? e : ii(e, t, n) + } + + var Di = rt || function (e) { + return pt.clearTimeout(e) + }; + + function Si(e, t) { + if (t) return e.slice(); + var n = e.length, r = qe ? qe(n) : new e.constructor(n); + return e.copy(r), r + } + + function Ei(e) { + var t = new e.constructor(e.byteLength); + return new We(t).set(new We(e)), t + } + + function ki(e, t) { + var n = t ? Ei(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.length) + } + + function ji(e, t) { + if (e !== t) { + var n = e !== o, r = null === e, i = e === e, a = cs(e), s = t !== o, l = null === t, + u = t === t, c = cs(t); + if (!l && !c && !a && e > t || a && s && u && !l && !c || r && s && u || !n && u || !i) return 1; + if (!r && !a && !c && e < t || c && n && i && !r && !a || l && n && i || !s && i || !u) return -1 + } + return 0 + } + + function Oi(e, t, r, i) { + for (var o = -1, a = e.length, s = r.length, l = -1, u = t.length, c = bn(a - s, 0), d = n(u + c), f = !i; ++l < u;) d[l] = t[l]; + for (; ++o < s;) (f || o < a) && (d[r[o]] = e[o]); + for (; c--;) d[l++] = e[o++]; + return d + } + + function Ai(e, t, r, i) { + for (var o = -1, a = e.length, s = -1, l = r.length, u = -1, c = t.length, d = bn(a - l, 0), f = n(d + c), h = !i; ++o < d;) f[o] = e[o]; + for (var p = o; ++u < c;) f[p + u] = t[u]; + for (; ++s < l;) (h || o < a) && (f[p + r[s]] = e[o++]); + return f + } + + function Ii(e, t) { + var r = -1, i = e.length; + for (t || (t = n(i)); ++r < i;) t[r] = e[r]; + return t + } + + function Fi(e, t, n, r) { + var i = !n; + n || (n = {}); + for (var a = -1, s = t.length; ++a < s;) { + var l = t[a], u = r ? r(n[l], e[l], l, n, e) : o; + u === o && (u = e[l]), i ? ar(n, l, u) : nr(n, l, u) + } + return n + } + + function Pi(e, t) { + return function (n, r) { + var i = Ka(n) ? jt : ir, o = t ? t() : {}; + return i(n, e, uo(r, 2), o) + } + } + + function _i(e) { + return Yr((function (t, n) { + var r = -1, i = n.length, a = i > 1 ? n[i - 1] : o, s = i > 2 ? n[2] : o; + for (a = e.length > 3 && "function" == typeof a ? (i--, a) : o, s && wo(n[0], n[1], s) && (a = i < 3 ? o : a, i = 1), t = ke(t); ++r < i;) { + var l = n[r]; + l && e(t, l, r, a) + } + return t + })) + } + + function Ti(e, t) { + return function (n, r) { + if (null == n) return n; + if (!Qa(n)) return e(n, r); + for (var i = n.length, o = t ? i : -1, a = ke(n); (t ? o-- : ++o < i) && !1 !== r(a[o], o, a);) ; + return n + } + } + + function Ri(e) { + return function (t, n, r) { + for (var i = -1, o = ke(t), a = r(t), s = a.length; s--;) { + var l = a[e ? s : ++i]; + if (!1 === n(o[l], l, o)) break + } + return t + } + } + + function Ni(e) { + return function (t) { + var n = ln(t = xs(t)) ? vn(t) : o, r = n ? n[0] : t.charAt(0), + i = n ? Ci(n, 1).join("") : t.slice(1); + return r[e]() + i + } + } + + function Mi(e) { + return function (t) { + return Nt(Js(qs(t).replace(Je, "")), e, "") + } + } + + function Bi(e) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new e; + case 1: + return new e(t[0]); + case 2: + return new e(t[0], t[1]); + case 3: + return new e(t[0], t[1], t[2]); + case 4: + return new e(t[0], t[1], t[2], t[3]); + case 5: + return new e(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new e(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6]) + } + var n = Vn(e.prototype), r = e.apply(n, t); + return ns(r) ? r : n + } + } + + function Li(e) { + return function (t, n, r) { + var i = ke(t); + if (!Qa(t)) { + var a = uo(n, 3); + t = _s(t), n = function (e) { + return a(i[e], e, i) + } + } + var s = e(t, n, r); + return s > -1 ? i[a ? t[s] : s] : o + } + } + + function Ui(e) { + return ro((function (t) { + var n = t.length, r = n, i = Wn.prototype.thru; + for (e && t.reverse(); r--;) { + var s = t[r]; + if ("function" != typeof s) throw new Ae(a); + if (i && !l && "wrapper" == so(s)) var l = new Wn([], !0) + } + for (r = l ? r : n; ++r < n;) { + var u = so(s = t[r]), c = "wrapper" == u ? ao(s) : o; + l = c && Do(c[0]) && 424 == c[1] && !c[4].length && 1 == c[9] ? l[so(c[0])].apply(l, c[3]) : 1 == s.length && Do(s) ? l[u]() : l.thru(s) + } + return function () { + var e = arguments, r = e[0]; + if (l && 1 == e.length && Ka(r)) return l.plant(r).value(); + for (var i = 0, o = n ? t[i].apply(this, e) : r; ++i < n;) o = t[i].call(this, o); + return o + } + })) + } + + function zi(e, t, r, i, a, s, l, u, c, d) { + var h = t & f, p = 1 & t, v = 2 & t, g = 24 & t, y = 512 & t, m = v ? o : Bi(e); + return function o() { + for (var f = arguments.length, b = n(f), x = f; x--;) b[x] = arguments[x]; + if (g) var w = lo(o), C = rn(b, w); + if (i && (b = Oi(b, i, a, g)), s && (b = Ai(b, s, l, g)), f -= C, g && f < d) { + var D = dn(b, w); + return Qi(e, t, zi, o.placeholder, r, b, D, u, c, d - f) + } + var S = p ? r : this, E = v ? S[e] : e; + return f = b.length, u ? b = Io(b, u) : y && f > 1 && b.reverse(), h && c < f && (b.length = c), this && this !== pt && this instanceof o && (E = m || Bi(E)), E.apply(S, b) + } + } + + function Vi(e, t) { + return function (n, r) { + return function (e, t, n, r) { + return wr(e, (function (e, i, o) { + t(r, n(e), i, o) + })), r + }(n, e, t(r), {}) + } + } + + function Hi(e, t) { + return function (n, r) { + var i; + if (n === o && r === o) return t; + if (n !== o && (i = n), r !== o) { + if (i === o) return r; + "string" == typeof n || "string" == typeof r ? (n = ci(n), r = ci(r)) : (n = ui(n), r = ui(r)), i = e(n, r) + } + return i + } + } + + function Wi(e) { + return ro((function (t) { + return t = Tt(t, Zt(uo())), Yr((function (n) { + var r = this; + return e(t, (function (e) { + return kt(e, r, n) + })) + })) + })) + } + + function qi(e, t) { + var n = (t = t === o ? " " : ci(t)).length; + if (n < 2) return n ? Xr(t, e) : t; + var r = Xr(t, ht(e / pn(t))); + return ln(t) ? Ci(vn(r), 0, e).join("") : r.slice(0, e) + } + + function Ki(e) { + return function (t, r, i) { + return i && "number" != typeof i && wo(t, r, i) && (r = i = o), t = vs(t), r === o ? (r = t, t = 0) : r = vs(r), function (e, t, r, i) { + for (var o = -1, a = bn(ht((t - e) / (r || 1)), 0), s = n(a); a--;) s[i ? a : ++o] = e, e += r; + return s + }(t, r, i = i === o ? t < r ? 1 : -1 : vs(i), e) + } + } + + function $i(e) { + return function (t, n) { + return "string" == typeof t && "string" == typeof n || (t = ms(t), n = ms(n)), e(t, n) + } + } + + function Qi(e, t, n, r, i, a, s, l, u, f) { + var h = 8 & t; + t |= h ? c : d, 4 & (t &= ~(h ? d : c)) || (t &= -4); + var p = [e, t, i, h ? a : o, h ? s : o, h ? o : a, h ? o : s, l, u, f], v = n.apply(o, p); + return Do(e) && Po(v, p), v.placeholder = r, Ro(v, e, t) + } + + function Gi(e) { + var t = Ee[e]; + return function (e, n) { + if (e = ms(e), (n = null == n ? 0 : xn(gs(n), 292)) && bt(e)) { + var r = (xs(e) + "e").split("e"); + return +((r = (xs(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n)) + } + return t(e) + } + } + + var Xi = On && 1 / fn(new On([, -0]))[1] == p ? function (e) { + return new On(e) + } : cl; + + function Yi(e) { + return function (t) { + var n = go(t); + return n == k ? un(t) : n == F ? hn(t) : function (e, t) { + return Tt(t, (function (t) { + return [t, e[t]] + })) + }(t, e(t)) + } + } + + function Zi(e, t, r, i, s, p, v, g) { + var y = 2 & t; + if (!y && "function" != typeof e) throw new Ae(a); + var m = i ? i.length : 0; + if (m || (t &= -97, i = s = o), v = v === o ? v : bn(gs(v), 0), g = g === o ? g : gs(g), m -= s ? s.length : 0, t & d) { + var b = i, x = s; + i = s = o + } + var w = y ? o : ao(e), C = [e, t, r, i, s, b, x, p, v, g]; + if (w && function (e, t) { + var n = e[1], r = t[1], i = n | r, o = i < 131, + a = r == f && 8 == n || r == f && n == h && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n; + if (!o && !a) return e; + 1 & r && (e[2] = t[2], i |= 1 & n ? 0 : 4); + var s = t[3]; + if (s) { + var u = e[3]; + e[3] = u ? Oi(u, s, t[4]) : s, e[4] = u ? dn(e[3], l) : t[4] + } + (s = t[5]) && (u = e[5], e[5] = u ? Ai(u, s, t[6]) : s, e[6] = u ? dn(e[5], l) : t[6]); + (s = t[7]) && (e[7] = s); + r & f && (e[8] = null == e[8] ? t[8] : xn(e[8], t[8])); + null == e[9] && (e[9] = t[9]); + e[0] = t[0], e[1] = i + }(C, w), e = C[0], t = C[1], r = C[2], i = C[3], s = C[4], !(g = C[9] = C[9] === o ? y ? 0 : e.length : bn(C[9] - m, 0)) && 24 & t && (t &= -25), t && 1 != t) D = 8 == t || t == u ? function (e, t, r) { + var i = Bi(e); + return function a() { + for (var s = arguments.length, l = n(s), u = s, c = lo(a); u--;) l[u] = arguments[u]; + var d = s < 3 && l[0] !== c && l[s - 1] !== c ? [] : dn(l, c); + return (s -= d.length) < r ? Qi(e, t, zi, a.placeholder, o, l, d, o, o, r - s) : kt(this && this !== pt && this instanceof a ? i : e, this, l) + } + }(e, t, g) : t != c && 33 != t || s.length ? zi.apply(o, C) : function (e, t, r, i) { + var o = 1 & t, a = Bi(e); + return function t() { + for (var s = -1, l = arguments.length, u = -1, c = i.length, d = n(c + l), f = this && this !== pt && this instanceof t ? a : e; ++u < c;) d[u] = i[u]; + for (; l--;) d[u++] = arguments[++s]; + return kt(f, o ? r : this, d) + } + }(e, t, r, i); else var D = function (e, t, n) { + var r = 1 & t, i = Bi(e); + return function t() { + return (this && this !== pt && this instanceof t ? i : e).apply(r ? n : this, arguments) + } + }(e, t, r); + return Ro((w ? ti : Po)(D, C), e, t) + } + + function Ji(e, t, n, r) { + return e === o || Va(e, Pe[n]) && !Re.call(r, n) ? t : e + } + + function eo(e, t, n, r, i, a) { + return ns(e) && ns(t) && (a.set(t, e), Hr(e, t, o, eo, a), a.delete(t)), e + } + + function to(e) { + return as(e) ? o : e + } + + function no(e, t, n, r, i, a) { + var s = 1 & n, l = e.length, u = t.length; + if (l != u && !(s && u > l)) return !1; + var c = a.get(e), d = a.get(t); + if (c && d) return c == t && d == e; + var f = -1, h = !0, p = 2 & n ? new Gn : o; + for (a.set(e, t), a.set(t, e); ++f < l;) { + var v = e[f], g = t[f]; + if (r) var y = s ? r(g, v, f, t, e, a) : r(v, g, f, e, t, a); + if (y !== o) { + if (y) continue; + h = !1; + break + } + if (p) { + if (!Bt(t, (function (e, t) { + if (!en(p, t) && (v === e || i(v, e, n, r, a))) return p.push(t) + }))) { + h = !1; + break + } + } else if (v !== g && !i(v, g, n, r, a)) { + h = !1; + break + } + } + return a.delete(e), a.delete(t), h + } + + function ro(e) { + return To(Oo(e, o, $o), e + "") + } + + function io(e) { + return Er(e, _s, po) + } + + function oo(e) { + return Er(e, Ts, vo) + } + + var ao = Fn ? function (e) { + return Fn.get(e) + } : cl; + + function so(e) { + for (var t = e.name + "", n = Pn[t], r = Re.call(Pn, t) ? n.length : 0; r--;) { + var i = n[r], o = i.func; + if (null == o || o == e) return i.name + } + return t + } + + function lo(e) { + return (Re.call(zn, "placeholder") ? zn : e).placeholder + } + + function uo() { + var e = zn.iteratee || al; + return e = e === al ? Nr : e, arguments.length ? e(arguments[0], arguments[1]) : e + } + + function co(e, t) { + var n = e.__data__; + return function (e) { + var t = typeof e; + return "string" == t || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== e : null === e + }(t) ? n["string" == typeof t ? "string" : "hash"] : n.map + } + + function fo(e) { + for (var t = _s(e), n = t.length; n--;) { + var r = t[n], i = e[r]; + t[n] = [r, i, ko(i)] + } + return t + } + + function ho(e, t) { + var n = function (e, t) { + return null == e ? o : e[t] + }(e, t); + return Rr(n) ? n : o + } + + var po = gt ? function (e) { + return null == e ? [] : (e = ke(e), Ft(gt(e), (function (t) { + return Qe.call(e, t) + }))) + } : yl, vo = gt ? function (e) { + for (var t = []; e;) Rt(t, po(e)), e = Ke(e); + return t + } : yl, go = kr; + + function yo(e, t, n) { + for (var r = -1, i = (t = xi(t, e)).length, o = !1; ++r < i;) { + var a = Lo(t[r]); + if (!(o = null != e && n(e, a))) break; + e = e[a] + } + return o || ++r != i ? o : !!(i = null == e ? 0 : e.length) && ts(i) && xo(a, i) && (Ka(e) || qa(e)) + } + + function mo(e) { + return "function" != typeof e.constructor || Eo(e) ? {} : Vn(Ke(e)) + } + + function bo(e) { + return Ka(e) || qa(e) || !!(Xe && e && e[Xe]) + } + + function xo(e, t) { + var n = typeof e; + return !!(t = null == t ? v : t) && ("number" == n || "symbol" != n && we.test(e)) && e > -1 && e % 1 == 0 && e < t + } + + function wo(e, t, n) { + if (!ns(n)) return !1; + var r = typeof t; + return !!("number" == r ? Qa(n) && xo(t, n.length) : "string" == r && t in n) && Va(n[t], e) + } + + function Co(e, t) { + if (Ka(e)) return !1; + var n = typeof e; + return !("number" != n && "symbol" != n && "boolean" != n && null != e && !cs(e)) || (re.test(e) || !ne.test(e) || null != t && e in ke(t)) + } + + function Do(e) { + var t = so(e), n = zn[t]; + if ("function" != typeof n || !(t in qn.prototype)) return !1; + if (e === n) return !0; + var r = ao(n); + return !!r && e === r[0] + } + + (En && go(new En(new ArrayBuffer(1))) != N || kn && go(new kn) != k || jn && go(jn.resolve()) != A || On && go(new On) != F || An && go(new An) != T) && (go = function (e) { + var t = kr(e), n = t == O ? e.constructor : o, r = n ? Uo(n) : ""; + if (r) switch (r) { + case _n: + return N; + case Tn: + return k; + case Rn: + return A; + case Nn: + return F; + case Mn: + return T + } + return t + }); + var So = _e ? Ja : ml; + + function Eo(e) { + var t = e && e.constructor; + return e === ("function" == typeof t && t.prototype || Pe) + } + + function ko(e) { + return e === e && !ns(e) + } + + function jo(e, t) { + return function (n) { + return null != n && (n[e] === t && (t !== o || e in ke(n))) + } + } + + function Oo(e, t, r) { + return t = bn(t === o ? e.length - 1 : t, 0), function () { + for (var i = arguments, o = -1, a = bn(i.length - t, 0), s = n(a); ++o < a;) s[o] = i[t + o]; + o = -1; + for (var l = n(t + 1); ++o < t;) l[o] = i[o]; + return l[t] = r(s), kt(e, this, l) + } + } + + function Ao(e, t) { + return t.length < 2 ? e : Sr(e, ii(t, 0, -1)) + } + + function Io(e, t) { + for (var n = e.length, r = xn(t.length, n), i = Ii(e); r--;) { + var a = t[r]; + e[r] = xo(a, n) ? i[a] : o + } + return e + } + + function Fo(e, t) { + if (("constructor" !== t || "function" !== typeof e[t]) && "__proto__" != t) return e[t] + } + + var Po = No(ti), _o = ft || function (e, t) { + return pt.setTimeout(e, t) + }, To = No(ni); + + function Ro(e, t, n) { + var r = t + ""; + return To(e, function (e, t) { + var n = t.length; + if (!n) return e; + var r = n - 1; + return t[r] = (n > 1 ? "& " : "") + t[r], t = t.join(n > 2 ? ", " : " "), e.replace(ue, "{\n/* [wrapped with " + t + "] */\n") + }(r, function (e, t) { + return Ot(m, (function (n) { + var r = "_." + n[0]; + t & n[1] && !Pt(e, r) && e.push(r) + })), e.sort() + }(function (e) { + var t = e.match(ce); + return t ? t[1].split(de) : [] + }(r), n))) + } + + function No(e) { + var t = 0, n = 0; + return function () { + var r = wn(), i = 16 - (r - n); + if (n = r, i > 0) { + if (++t >= 800) return arguments[0] + } else t = 0; + return e.apply(o, arguments) + } + } + + function Mo(e, t) { + var n = -1, r = e.length, i = r - 1; + for (t = t === o ? r : t; ++n < t;) { + var a = Gr(n, i), s = e[a]; + e[a] = e[n], e[n] = s + } + return e.length = t, e + } + + var Bo = function (e) { + var t = Na(e, (function (e) { + return 500 === n.size && n.clear(), e + })), n = t.cache; + return t + }((function (e) { + var t = []; + return 46 === e.charCodeAt(0) && t.push(""), e.replace(ie, (function (e, n, r, i) { + t.push(r ? i.replace(pe, "$1") : n || e) + })), t + })); + + function Lo(e) { + if ("string" == typeof e || cs(e)) return e; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function Uo(e) { + if (null != e) { + try { + return Te.call(e) + } catch (t) { + } + try { + return e + "" + } catch (t) { + } + } + return "" + } + + function zo(e) { + if (e instanceof qn) return e.clone(); + var t = new Wn(e.__wrapped__, e.__chain__); + return t.__actions__ = Ii(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t + } + + var Vo = Yr((function (e, t) { + return Ga(e) ? fr(e, mr(t, 1, Ga, !0)) : [] + })), Ho = Yr((function (e, t) { + var n = Zo(t); + return Ga(n) && (n = o), Ga(e) ? fr(e, mr(t, 1, Ga, !0), uo(n, 2)) : [] + })), Wo = Yr((function (e, t) { + var n = Zo(t); + return Ga(n) && (n = o), Ga(e) ? fr(e, mr(t, 1, Ga, !0), o, n) : [] + })); + + function qo(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : gs(n); + return i < 0 && (i = bn(r + i, 0)), zt(e, uo(t, 3), i) + } + + function Ko(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = r - 1; + return n !== o && (i = gs(n), i = n < 0 ? bn(r + i, 0) : xn(i, r - 1)), zt(e, uo(t, 3), i, !0) + } + + function $o(e) { + return (null == e ? 0 : e.length) ? mr(e, 1) : [] + } + + function Qo(e) { + return e && e.length ? e[0] : o + } + + var Go = Yr((function (e) { + var t = Tt(e, mi); + return t.length && t[0] === e[0] ? Ir(t) : [] + })), Xo = Yr((function (e) { + var t = Zo(e), n = Tt(e, mi); + return t === Zo(n) ? t = o : n.pop(), n.length && n[0] === e[0] ? Ir(n, uo(t, 2)) : [] + })), Yo = Yr((function (e) { + var t = Zo(e), n = Tt(e, mi); + return (t = "function" == typeof t ? t : o) && n.pop(), n.length && n[0] === e[0] ? Ir(n, o, t) : [] + })); + + function Zo(e) { + var t = null == e ? 0 : e.length; + return t ? e[t - 1] : o + } + + var Jo = Yr(ea); + + function ea(e, t) { + return e && e.length && t && t.length ? $r(e, t) : e + } + + var ta = ro((function (e, t) { + var n = null == e ? 0 : e.length, r = sr(e, t); + return Qr(e, Tt(t, (function (e) { + return xo(e, n) ? +e : e + })).sort(ji)), r + })); + + function na(e) { + return null == e ? e : Sn.call(e) + } + + var ra = Yr((function (e) { + return di(mr(e, 1, Ga, !0)) + })), ia = Yr((function (e) { + var t = Zo(e); + return Ga(t) && (t = o), di(mr(e, 1, Ga, !0), uo(t, 2)) + })), oa = Yr((function (e) { + var t = Zo(e); + return t = "function" == typeof t ? t : o, di(mr(e, 1, Ga, !0), o, t) + })); + + function aa(e) { + if (!e || !e.length) return []; + var t = 0; + return e = Ft(e, (function (e) { + if (Ga(e)) return t = bn(e.length, t), !0 + })), Xt(t, (function (t) { + return Tt(e, Kt(t)) + })) + } + + function sa(e, t) { + if (!e || !e.length) return []; + var n = aa(e); + return null == t ? n : Tt(n, (function (e) { + return kt(t, o, e) + })) + } + + var la = Yr((function (e, t) { + return Ga(e) ? fr(e, t) : [] + })), ua = Yr((function (e) { + return gi(Ft(e, Ga)) + })), ca = Yr((function (e) { + var t = Zo(e); + return Ga(t) && (t = o), gi(Ft(e, Ga), uo(t, 2)) + })), da = Yr((function (e) { + var t = Zo(e); + return t = "function" == typeof t ? t : o, gi(Ft(e, Ga), o, t) + })), fa = Yr(aa); + var ha = Yr((function (e) { + var t = e.length, n = t > 1 ? e[t - 1] : o; + return n = "function" == typeof n ? (e.pop(), n) : o, sa(e, n) + })); + + function pa(e) { + var t = zn(e); + return t.__chain__ = !0, t + } + + function va(e, t) { + return t(e) + } + + var ga = ro((function (e) { + var t = e.length, n = t ? e[0] : 0, r = this.__wrapped__, i = function (t) { + return sr(t, e) + }; + return !(t > 1 || this.__actions__.length) && r instanceof qn && xo(n) ? ((r = r.slice(n, +n + (t ? 1 : 0))).__actions__.push({ + func: va, + args: [i], + thisArg: o + }), new Wn(r, this.__chain__).thru((function (e) { + return t && !e.length && e.push(o), e + }))) : this.thru(i) + })); + var ya = Pi((function (e, t, n) { + Re.call(e, n) ? ++e[n] : ar(e, n, 1) + })); + var ma = Li(qo), ba = Li(Ko); + + function xa(e, t) { + return (Ka(e) ? Ot : hr)(e, uo(t, 3)) + } + + function wa(e, t) { + return (Ka(e) ? At : pr)(e, uo(t, 3)) + } + + var Ca = Pi((function (e, t, n) { + Re.call(e, n) ? e[n].push(t) : ar(e, n, [t]) + })); + var Da = Yr((function (e, t, r) { + var i = -1, o = "function" == typeof t, a = Qa(e) ? n(e.length) : []; + return hr(e, (function (e) { + a[++i] = o ? kt(t, e, r) : Fr(e, t, r) + })), a + })), Sa = Pi((function (e, t, n) { + ar(e, n, t) + })); + + function Ea(e, t) { + return (Ka(e) ? Tt : Ur)(e, uo(t, 3)) + } + + var ka = Pi((function (e, t, n) { + e[n ? 0 : 1].push(t) + }), (function () { + return [[], []] + })); + var ja = Yr((function (e, t) { + if (null == e) return []; + var n = t.length; + return n > 1 && wo(e, t[0], t[1]) ? t = [] : n > 2 && wo(t[0], t[1], t[2]) && (t = [t[0]]), qr(e, mr(t, 1), []) + })), Oa = ut || function () { + return pt.Date.now() + }; + + function Aa(e, t, n) { + return t = n ? o : t, t = e && null == t ? e.length : t, Zi(e, f, o, o, o, o, t) + } + + function Ia(e, t) { + var n; + if ("function" != typeof t) throw new Ae(a); + return e = gs(e), function () { + return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = o), n + } + } + + var Fa = Yr((function (e, t, n) { + var r = 1; + if (n.length) { + var i = dn(n, lo(Fa)); + r |= c + } + return Zi(e, r, t, n, i) + })), Pa = Yr((function (e, t, n) { + var r = 3; + if (n.length) { + var i = dn(n, lo(Pa)); + r |= c + } + return Zi(t, r, e, n, i) + })); + + function _a(e, t, n) { + var r, i, s, l, u, c, d = 0, f = !1, h = !1, p = !0; + if ("function" != typeof e) throw new Ae(a); + + function v(t) { + var n = r, a = i; + return r = i = o, d = t, l = e.apply(a, n) + } + + function g(e) { + return d = e, u = _o(m, t), f ? v(e) : l + } + + function y(e) { + var n = e - c; + return c === o || n >= t || n < 0 || h && e - d >= s + } + + function m() { + var e = Oa(); + if (y(e)) return b(e); + u = _o(m, function (e) { + var n = t - (e - c); + return h ? xn(n, s - (e - d)) : n + }(e)) + } + + function b(e) { + return u = o, p && r ? v(e) : (r = i = o, l) + } + + function x() { + var e = Oa(), n = y(e); + if (r = arguments, i = this, c = e, n) { + if (u === o) return g(c); + if (h) return Di(u), u = _o(m, t), v(c) + } + return u === o && (u = _o(m, t)), l + } + + return t = ms(t) || 0, ns(n) && (f = !!n.leading, s = (h = "maxWait" in n) ? bn(ms(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p), x.cancel = function () { + u !== o && Di(u), d = 0, r = c = i = u = o + }, x.flush = function () { + return u === o ? l : b(Oa()) + }, x + } + + var Ta = Yr((function (e, t) { + return dr(e, 1, t) + })), Ra = Yr((function (e, t, n) { + return dr(e, ms(t) || 0, n) + })); + + function Na(e, t) { + if ("function" != typeof e || null != t && "function" != typeof t) throw new Ae(a); + var n = function n() { + var r = arguments, i = t ? t.apply(this, r) : r[0], o = n.cache; + if (o.has(i)) return o.get(i); + var a = e.apply(this, r); + return n.cache = o.set(i, a) || o, a + }; + return n.cache = new (Na.Cache || Qn), n + } + + function Ma(e) { + if ("function" != typeof e) throw new Ae(a); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !e.call(this); + case 1: + return !e.call(this, t[0]); + case 2: + return !e.call(this, t[0], t[1]); + case 3: + return !e.call(this, t[0], t[1], t[2]) + } + return !e.apply(this, t) + } + } + + Na.Cache = Qn; + var Ba = wi((function (e, t) { + var n = (t = 1 == t.length && Ka(t[0]) ? Tt(t[0], Zt(uo())) : Tt(mr(t, 1), Zt(uo()))).length; + return Yr((function (r) { + for (var i = -1, o = xn(r.length, n); ++i < o;) r[i] = t[i].call(this, r[i]); + return kt(e, this, r) + })) + })), La = Yr((function (e, t) { + var n = dn(t, lo(La)); + return Zi(e, c, o, t, n) + })), Ua = Yr((function (e, t) { + var n = dn(t, lo(Ua)); + return Zi(e, d, o, t, n) + })), za = ro((function (e, t) { + return Zi(e, h, o, o, o, t) + })); + + function Va(e, t) { + return e === t || e !== e && t !== t + } + + var Ha = $i(jr), Wa = $i((function (e, t) { + return e >= t + })), qa = Pr(function () { + return arguments + }()) ? Pr : function (e) { + return rs(e) && Re.call(e, "callee") && !Qe.call(e, "callee") + }, Ka = n.isArray, $a = xt ? Zt(xt) : function (e) { + return rs(e) && kr(e) == R + }; + + function Qa(e) { + return null != e && ts(e.length) && !Ja(e) + } + + function Ga(e) { + return rs(e) && Qa(e) + } + + var Xa = mt || ml, Ya = wt ? Zt(wt) : function (e) { + return rs(e) && kr(e) == C + }; + + function Za(e) { + if (!rs(e)) return !1; + var t = kr(e); + return t == D || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !as(e) + } + + function Ja(e) { + if (!ns(e)) return !1; + var t = kr(e); + return t == S || t == E || "[object AsyncFunction]" == t || "[object Proxy]" == t + } + + function es(e) { + return "number" == typeof e && e == gs(e) + } + + function ts(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= v + } + + function ns(e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t) + } + + function rs(e) { + return null != e && "object" == typeof e + } + + var is = Ct ? Zt(Ct) : function (e) { + return rs(e) && go(e) == k + }; + + function os(e) { + return "number" == typeof e || rs(e) && kr(e) == j + } + + function as(e) { + if (!rs(e) || kr(e) != O) return !1; + var t = Ke(e); + if (null === t) return !0; + var n = Re.call(t, "constructor") && t.constructor; + return "function" == typeof n && n instanceof n && Te.call(n) == Le + } + + var ss = Dt ? Zt(Dt) : function (e) { + return rs(e) && kr(e) == I + }; + var ls = St ? Zt(St) : function (e) { + return rs(e) && go(e) == F + }; + + function us(e) { + return "string" == typeof e || !Ka(e) && rs(e) && kr(e) == P + } + + function cs(e) { + return "symbol" == typeof e || rs(e) && kr(e) == _ + } + + var ds = Et ? Zt(Et) : function (e) { + return rs(e) && ts(e.length) && !!st[kr(e)] + }; + var fs = $i(Lr), hs = $i((function (e, t) { + return e <= t + })); + + function ps(e) { + if (!e) return []; + if (Qa(e)) return us(e) ? vn(e) : Ii(e); + if (Ye && e[Ye]) return function (e) { + for (var t, n = []; !(t = e.next()).done;) n.push(t.value); + return n + }(e[Ye]()); + var t = go(e); + return (t == k ? un : t == F ? fn : Vs)(e) + } + + function vs(e) { + return e ? (e = ms(e)) === p || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e === e ? e : 0 : 0 === e ? e : 0 + } + + function gs(e) { + var t = vs(e), n = t % 1; + return t === t ? n ? t - n : t : 0 + } + + function ys(e) { + return e ? lr(gs(e), 0, y) : 0 + } + + function ms(e) { + if ("number" == typeof e) return e; + if (cs(e)) return g; + if (ns(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = ns(t) ? t + "" : t + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = Yt(e); + var n = me.test(e); + return n || xe.test(e) ? dt(e.slice(2), n ? 2 : 8) : ye.test(e) ? g : +e + } + + function bs(e) { + return Fi(e, Ts(e)) + } + + function xs(e) { + return null == e ? "" : ci(e) + } + + var ws = _i((function (e, t) { + if (Eo(t) || Qa(t)) Fi(t, _s(t), e); else for (var n in t) Re.call(t, n) && nr(e, n, t[n]) + })), Cs = _i((function (e, t) { + Fi(t, Ts(t), e) + })), Ds = _i((function (e, t, n, r) { + Fi(t, Ts(t), e, r) + })), Ss = _i((function (e, t, n, r) { + Fi(t, _s(t), e, r) + })), Es = ro(sr); + var ks = Yr((function (e, t) { + e = ke(e); + var n = -1, r = t.length, i = r > 2 ? t[2] : o; + for (i && wo(t[0], t[1], i) && (r = 1); ++n < r;) for (var a = t[n], s = Ts(a), l = -1, u = s.length; ++l < u;) { + var c = s[l], d = e[c]; + (d === o || Va(d, Pe[c]) && !Re.call(e, c)) && (e[c] = a[c]) + } + return e + })), js = Yr((function (e) { + return e.push(o, eo), kt(Ns, o, e) + })); + + function Os(e, t, n) { + var r = null == e ? o : Sr(e, t); + return r === o ? n : r + } + + function As(e, t) { + return null != e && yo(e, t, Ar) + } + + var Is = Vi((function (e, t, n) { + null != t && "function" != typeof t.toString && (t = Be.call(t)), e[t] = n + }), nl(ol)), Fs = Vi((function (e, t, n) { + null != t && "function" != typeof t.toString && (t = Be.call(t)), Re.call(e, t) ? e[t].push(n) : e[t] = [n] + }), uo), Ps = Yr(Fr); + + function _s(e) { + return Qa(e) ? Yn(e) : Mr(e) + } + + function Ts(e) { + return Qa(e) ? Yn(e, !0) : Br(e) + } + + var Rs = _i((function (e, t, n) { + Hr(e, t, n) + })), Ns = _i((function (e, t, n, r) { + Hr(e, t, n, r) + })), Ms = ro((function (e, t) { + var n = {}; + if (null == e) return n; + var r = !1; + t = Tt(t, (function (t) { + return t = xi(t, e), r || (r = t.length > 1), t + })), Fi(e, oo(e), n), r && (n = ur(n, 7, to)); + for (var i = t.length; i--;) fi(n, t[i]); + return n + })); + var Bs = ro((function (e, t) { + return null == e ? {} : function (e, t) { + return Kr(e, t, (function (t, n) { + return As(e, n) + })) + }(e, t) + })); + + function Ls(e, t) { + if (null == e) return {}; + var n = Tt(oo(e), (function (e) { + return [e] + })); + return t = uo(t), Kr(e, n, (function (e, n) { + return t(e, n[0]) + })) + } + + var Us = Yi(_s), zs = Yi(Ts); + + function Vs(e) { + return null == e ? [] : Jt(e, _s(e)) + } + + var Hs = Mi((function (e, t, n) { + return t = t.toLowerCase(), e + (n ? Ws(t) : t) + })); + + function Ws(e) { + return Zs(xs(e).toLowerCase()) + } + + function qs(e) { + return (e = xs(e)) && e.replace(Ce, on).replace(et, "") + } + + var Ks = Mi((function (e, t, n) { + return e + (n ? "-" : "") + t.toLowerCase() + })), $s = Mi((function (e, t, n) { + return e + (n ? " " : "") + t.toLowerCase() + })), Qs = Ni("toLowerCase"); + var Gs = Mi((function (e, t, n) { + return e + (n ? "_" : "") + t.toLowerCase() + })); + var Xs = Mi((function (e, t, n) { + return e + (n ? " " : "") + Zs(t) + })); + var Ys = Mi((function (e, t, n) { + return e + (n ? " " : "") + t.toUpperCase() + })), Zs = Ni("toUpperCase"); + + function Js(e, t, n) { + return e = xs(e), (t = n ? o : t) === o ? function (e) { + return it.test(e) + }(e) ? function (e) { + return e.match(nt) || [] + }(e) : function (e) { + return e.match(fe) || [] + }(e) : e.match(t) || [] + } + + var el = Yr((function (e, t) { + try { + return kt(e, o, t) + } catch (n) { + return Za(n) ? n : new i(n) + } + })), tl = ro((function (e, t) { + return Ot(t, (function (t) { + t = Lo(t), ar(e, t, Fa(e[t], e)) + })), e + })); + + function nl(e) { + return function () { + return e + } + } + + var rl = Ui(), il = Ui(!0); + + function ol(e) { + return e + } + + function al(e) { + return Nr("function" == typeof e ? e : ur(e, 1)) + } + + var sl = Yr((function (e, t) { + return function (n) { + return Fr(n, e, t) + } + })), ll = Yr((function (e, t) { + return function (n) { + return Fr(e, n, t) + } + })); + + function ul(e, t, n) { + var r = _s(t), i = Dr(t, r); + null != n || ns(t) && (i.length || !r.length) || (n = t, t = e, e = this, i = Dr(t, _s(t))); + var o = !(ns(n) && "chain" in n) || !!n.chain, a = Ja(e); + return Ot(i, (function (n) { + var r = t[n]; + e[n] = r, a && (e.prototype[n] = function () { + var t = this.__chain__; + if (o || t) { + var n = e(this.__wrapped__), i = n.__actions__ = Ii(this.__actions__); + return i.push({func: r, args: arguments, thisArg: e}), n.__chain__ = t, n + } + return r.apply(e, Rt([this.value()], arguments)) + }) + })), e + } + + function cl() { + } + + var dl = Wi(Tt), fl = Wi(It), hl = Wi(Bt); + + function pl(e) { + return Co(e) ? Kt(Lo(e)) : function (e) { + return function (t) { + return Sr(t, e) + } + }(e) + } + + var vl = Ki(), gl = Ki(!0); + + function yl() { + return [] + } + + function ml() { + return !1 + } + + var bl = Hi((function (e, t) { + return e + t + }), 0), xl = Gi("ceil"), wl = Hi((function (e, t) { + return e / t + }), 1), Cl = Gi("floor"); + var Dl = Hi((function (e, t) { + return e * t + }), 1), Sl = Gi("round"), El = Hi((function (e, t) { + return e - t + }), 0); + return zn.after = function (e, t) { + if ("function" != typeof t) throw new Ae(a); + return e = gs(e), function () { + if (--e < 1) return t.apply(this, arguments) + } + }, zn.ary = Aa, zn.assign = ws, zn.assignIn = Cs, zn.assignInWith = Ds, zn.assignWith = Ss, zn.at = Es, zn.before = Ia, zn.bind = Fa, zn.bindAll = tl, zn.bindKey = Pa, zn.castArray = function () { + if (!arguments.length) return []; + var e = arguments[0]; + return Ka(e) ? e : [e] + }, zn.chain = pa, zn.chunk = function (e, t, r) { + t = (r ? wo(e, t, r) : t === o) ? 1 : bn(gs(t), 0); + var i = null == e ? 0 : e.length; + if (!i || t < 1) return []; + for (var a = 0, s = 0, l = n(ht(i / t)); a < i;) l[s++] = ii(e, a, a += t); + return l + }, zn.compact = function (e) { + for (var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; ++t < n;) { + var o = e[t]; + o && (i[r++] = o) + } + return i + }, zn.concat = function () { + var e = arguments.length; + if (!e) return []; + for (var t = n(e - 1), r = arguments[0], i = e; i--;) t[i - 1] = arguments[i]; + return Rt(Ka(r) ? Ii(r) : [r], mr(t, 1)) + }, zn.cond = function (e) { + var t = null == e ? 0 : e.length, n = uo(); + return e = t ? Tt(e, (function (e) { + if ("function" != typeof e[1]) throw new Ae(a); + return [n(e[0]), e[1]] + })) : [], Yr((function (n) { + for (var r = -1; ++r < t;) { + var i = e[r]; + if (kt(i[0], this, n)) return kt(i[1], this, n) + } + })) + }, zn.conforms = function (e) { + return function (e) { + var t = _s(e); + return function (n) { + return cr(n, e, t) + } + }(ur(e, 1)) + }, zn.constant = nl, zn.countBy = ya, zn.create = function (e, t) { + var n = Vn(e); + return null == t ? n : or(n, t) + }, zn.curry = function e(t, n, r) { + var i = Zi(t, 8, o, o, o, o, o, n = r ? o : n); + return i.placeholder = e.placeholder, i + }, zn.curryRight = function e(t, n, r) { + var i = Zi(t, u, o, o, o, o, o, n = r ? o : n); + return i.placeholder = e.placeholder, i + }, zn.debounce = _a, zn.defaults = ks, zn.defaultsDeep = js, zn.defer = Ta, zn.delay = Ra, zn.difference = Vo, zn.differenceBy = Ho, zn.differenceWith = Wo, zn.drop = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, (t = n || t === o ? 1 : gs(t)) < 0 ? 0 : t, r) : [] + }, zn.dropRight = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, 0, (t = r - (t = n || t === o ? 1 : gs(t))) < 0 ? 0 : t) : [] + }, zn.dropRightWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !0, !0) : [] + }, zn.dropWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !0) : [] + }, zn.fill = function (e, t, n, r) { + var i = null == e ? 0 : e.length; + return i ? (n && "number" != typeof n && wo(e, t, n) && (n = 0, r = i), function (e, t, n, r) { + var i = e.length; + for ((n = gs(n)) < 0 && (n = -n > i ? 0 : i + n), (r = r === o || r > i ? i : gs(r)) < 0 && (r += i), r = n > r ? 0 : ys(r); n < r;) e[n++] = t; + return e + }(e, t, n, r)) : [] + }, zn.filter = function (e, t) { + return (Ka(e) ? Ft : yr)(e, uo(t, 3)) + }, zn.flatMap = function (e, t) { + return mr(Ea(e, t), 1) + }, zn.flatMapDeep = function (e, t) { + return mr(Ea(e, t), p) + }, zn.flatMapDepth = function (e, t, n) { + return n = n === o ? 1 : gs(n), mr(Ea(e, t), n) + }, zn.flatten = $o, zn.flattenDeep = function (e) { + return (null == e ? 0 : e.length) ? mr(e, p) : [] + }, zn.flattenDepth = function (e, t) { + return (null == e ? 0 : e.length) ? mr(e, t = t === o ? 1 : gs(t)) : [] + }, zn.flip = function (e) { + return Zi(e, 512) + }, zn.flow = rl, zn.flowRight = il, zn.fromPairs = function (e) { + for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n;) { + var i = e[t]; + r[i[0]] = i[1] + } + return r + }, zn.functions = function (e) { + return null == e ? [] : Dr(e, _s(e)) + }, zn.functionsIn = function (e) { + return null == e ? [] : Dr(e, Ts(e)) + }, zn.groupBy = Ca, zn.initial = function (e) { + return (null == e ? 0 : e.length) ? ii(e, 0, -1) : [] + }, zn.intersection = Go, zn.intersectionBy = Xo, zn.intersectionWith = Yo, zn.invert = Is, zn.invertBy = Fs, zn.invokeMap = Da, zn.iteratee = al, zn.keyBy = Sa, zn.keys = _s, zn.keysIn = Ts, zn.map = Ea, zn.mapKeys = function (e, t) { + var n = {}; + return t = uo(t, 3), wr(e, (function (e, r, i) { + ar(n, t(e, r, i), e) + })), n + }, zn.mapValues = function (e, t) { + var n = {}; + return t = uo(t, 3), wr(e, (function (e, r, i) { + ar(n, r, t(e, r, i)) + })), n + }, zn.matches = function (e) { + return zr(ur(e, 1)) + }, zn.matchesProperty = function (e, t) { + return Vr(e, ur(t, 1)) + }, zn.memoize = Na, zn.merge = Rs, zn.mergeWith = Ns, zn.method = sl, zn.methodOf = ll, zn.mixin = ul, zn.negate = Ma, zn.nthArg = function (e) { + return e = gs(e), Yr((function (t) { + return Wr(t, e) + })) + }, zn.omit = Ms, zn.omitBy = function (e, t) { + return Ls(e, Ma(uo(t))) + }, zn.once = function (e) { + return Ia(2, e) + }, zn.orderBy = function (e, t, n, r) { + return null == e ? [] : (Ka(t) || (t = null == t ? [] : [t]), Ka(n = r ? o : n) || (n = null == n ? [] : [n]), qr(e, t, n)) + }, zn.over = dl, zn.overArgs = Ba, zn.overEvery = fl, zn.overSome = hl, zn.partial = La, zn.partialRight = Ua, zn.partition = ka, zn.pick = Bs, zn.pickBy = Ls, zn.property = pl, zn.propertyOf = function (e) { + return function (t) { + return null == e ? o : Sr(e, t) + } + }, zn.pull = Jo, zn.pullAll = ea, zn.pullAllBy = function (e, t, n) { + return e && e.length && t && t.length ? $r(e, t, uo(n, 2)) : e + }, zn.pullAllWith = function (e, t, n) { + return e && e.length && t && t.length ? $r(e, t, o, n) : e + }, zn.pullAt = ta, zn.range = vl, zn.rangeRight = gl, zn.rearg = za, zn.reject = function (e, t) { + return (Ka(e) ? Ft : yr)(e, Ma(uo(t, 3))) + }, zn.remove = function (e, t) { + var n = []; + if (!e || !e.length) return n; + var r = -1, i = [], o = e.length; + for (t = uo(t, 3); ++r < o;) { + var a = e[r]; + t(a, r, e) && (n.push(a), i.push(r)) + } + return Qr(e, i), n + }, zn.rest = function (e, t) { + if ("function" != typeof e) throw new Ae(a); + return Yr(e, t = t === o ? t : gs(t)) + }, zn.reverse = na,zn.sampleSize = function (e, t, n) { + return t = (n ? wo(e, t, n) : t === o) ? 1 : gs(t), (Ka(e) ? Jn : Jr)(e, t) + },zn.set = function (e, t, n) { + return null == e ? e : ei(e, t, n) + },zn.setWith = function (e, t, n, r) { + return r = "function" == typeof r ? r : o, null == e ? e : ei(e, t, n, r) + },zn.shuffle = function (e) { + return (Ka(e) ? er : ri)(e) + },zn.slice = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? (n && "number" != typeof n && wo(e, t, n) ? (t = 0, n = r) : (t = null == t ? 0 : gs(t), n = n === o ? r : gs(n)), ii(e, t, n)) : [] + },zn.sortBy = ja,zn.sortedUniq = function (e) { + return e && e.length ? li(e) : [] + },zn.sortedUniqBy = function (e, t) { + return e && e.length ? li(e, uo(t, 2)) : [] + },zn.split = function (e, t, n) { + return n && "number" != typeof n && wo(e, t, n) && (t = n = o), (n = n === o ? y : n >>> 0) ? (e = xs(e)) && ("string" == typeof t || null != t && !ss(t)) && !(t = ci(t)) && ln(e) ? Ci(vn(e), 0, n) : e.split(t, n) : [] + },zn.spread = function (e, t) { + if ("function" != typeof e) throw new Ae(a); + return t = null == t ? 0 : bn(gs(t), 0), Yr((function (n) { + var r = n[t], i = Ci(n, 0, t); + return r && Rt(i, r), kt(e, this, i) + })) + },zn.tail = function (e) { + var t = null == e ? 0 : e.length; + return t ? ii(e, 1, t) : [] + },zn.take = function (e, t, n) { + return e && e.length ? ii(e, 0, (t = n || t === o ? 1 : gs(t)) < 0 ? 0 : t) : [] + },zn.takeRight = function (e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ii(e, (t = r - (t = n || t === o ? 1 : gs(t))) < 0 ? 0 : t, r) : [] + },zn.takeRightWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3), !1, !0) : [] + },zn.takeWhile = function (e, t) { + return e && e.length ? pi(e, uo(t, 3)) : [] + },zn.tap = function (e, t) { + return t(e), e + },zn.throttle = function (e, t, n) { + var r = !0, i = !0; + if ("function" != typeof e) throw new Ae(a); + return ns(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), _a(e, t, { + leading: r, + maxWait: t, + trailing: i + }) + },zn.thru = va,zn.toArray = ps,zn.toPairs = Us,zn.toPairsIn = zs,zn.toPath = function (e) { + return Ka(e) ? Tt(e, Lo) : cs(e) ? [e] : Ii(Bo(xs(e))) + },zn.toPlainObject = bs,zn.transform = function (e, t, n) { + var r = Ka(e), i = r || Xa(e) || ds(e); + if (t = uo(t, 4), null == n) { + var o = e && e.constructor; + n = i ? r ? new o : [] : ns(e) && Ja(o) ? Vn(Ke(e)) : {} + } + return (i ? Ot : wr)(e, (function (e, r, i) { + return t(n, e, r, i) + })), n + },zn.unary = function (e) { + return Aa(e, 1) + },zn.union = ra,zn.unionBy = ia,zn.unionWith = oa,zn.uniq = function (e) { + return e && e.length ? di(e) : [] + },zn.uniqBy = function (e, t) { + return e && e.length ? di(e, uo(t, 2)) : [] + },zn.uniqWith = function (e, t) { + return t = "function" == typeof t ? t : o, e && e.length ? di(e, o, t) : [] + },zn.unset = function (e, t) { + return null == e || fi(e, t) + },zn.unzip = aa,zn.unzipWith = sa,zn.update = function (e, t, n) { + return null == e ? e : hi(e, t, bi(n)) + },zn.updateWith = function (e, t, n, r) { + return r = "function" == typeof r ? r : o, null == e ? e : hi(e, t, bi(n), r) + },zn.values = Vs,zn.valuesIn = function (e) { + return null == e ? [] : Jt(e, Ts(e)) + },zn.without = la,zn.words = Js,zn.wrap = function (e, t) { + return La(bi(t), e) + },zn.xor = ua,zn.xorBy = ca,zn.xorWith = da,zn.zip = fa,zn.zipObject = function (e, t) { + return yi(e || [], t || [], nr) + },zn.zipObjectDeep = function (e, t) { + return yi(e || [], t || [], ei) + },zn.zipWith = ha,zn.entries = Us,zn.entriesIn = zs,zn.extend = Cs,zn.extendWith = Ds,ul(zn, zn),zn.add = bl,zn.attempt = el,zn.camelCase = Hs,zn.capitalize = Ws,zn.ceil = xl,zn.clamp = function (e, t, n) { + return n === o && (n = t, t = o), n !== o && (n = (n = ms(n)) === n ? n : 0), t !== o && (t = (t = ms(t)) === t ? t : 0), lr(ms(e), t, n) + },zn.clone = function (e) { + return ur(e, 4) + },zn.cloneDeep = function (e) { + return ur(e, 5) + },zn.cloneDeepWith = function (e, t) { + return ur(e, 5, t = "function" == typeof t ? t : o) + },zn.cloneWith = function (e, t) { + return ur(e, 4, t = "function" == typeof t ? t : o) + },zn.conformsTo = function (e, t) { + return null == t || cr(e, t, _s(t)) + },zn.deburr = qs,zn.defaultTo = function (e, t) { + return null == e || e !== e ? t : e + },zn.divide = wl,zn.endsWith = function (e, t, n) { + e = xs(e), t = ci(t); + var r = e.length, i = n = n === o ? r : lr(gs(n), 0, r); + return (n -= t.length) >= 0 && e.slice(n, i) == t + },zn.eq = Va,zn.escape = function (e) { + return (e = xs(e)) && Z.test(e) ? e.replace(X, an) : e + },zn.escapeRegExp = function (e) { + return (e = xs(e)) && ae.test(e) ? e.replace(oe, "\\$&") : e + },zn.every = function (e, t, n) { + var r = Ka(e) ? It : vr; + return n && wo(e, t, n) && (t = o), r(e, uo(t, 3)) + },zn.find = ma,zn.findIndex = qo,zn.findKey = function (e, t) { + return Ut(e, uo(t, 3), wr) + },zn.findLast = ba,zn.findLastIndex = Ko,zn.findLastKey = function (e, t) { + return Ut(e, uo(t, 3), Cr) + },zn.floor = Cl,zn.forEach = xa,zn.forEachRight = wa,zn.forIn = function (e, t) { + return null == e ? e : br(e, uo(t, 3), Ts) + },zn.forInRight = function (e, t) { + return null == e ? e : xr(e, uo(t, 3), Ts) + },zn.forOwn = function (e, t) { + return e && wr(e, uo(t, 3)) + },zn.forOwnRight = function (e, t) { + return e && Cr(e, uo(t, 3)) + },zn.get = Os,zn.gt = Ha,zn.gte = Wa,zn.has = function (e, t) { + return null != e && yo(e, t, Or) + },zn.hasIn = As,zn.head = Qo,zn.identity = ol,zn.includes = function (e, t, n, r) { + e = Qa(e) ? e : Vs(e), n = n && !r ? gs(n) : 0; + var i = e.length; + return n < 0 && (n = bn(i + n, 0)), us(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && Vt(e, t, n) > -1 + },zn.indexOf = function (e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : gs(n); + return i < 0 && (i = bn(r + i, 0)), Vt(e, t, i) + },zn.inRange = function (e, t, n) { + return t = vs(t), n === o ? (n = t, t = 0) : n = vs(n), function (e, t, n) { + return e >= xn(t, n) && e < bn(t, n) + }(e = ms(e), t, n) + },zn.invoke = Ps,zn.isArguments = qa,zn.isArray = Ka,zn.isArrayBuffer = $a,zn.isArrayLike = Qa,zn.isArrayLikeObject = Ga,zn.isBoolean = function (e) { + return !0 === e || !1 === e || rs(e) && kr(e) == w + },zn.isBuffer = Xa,zn.isDate = Ya,zn.isElement = function (e) { + return rs(e) && 1 === e.nodeType && !as(e) + },zn.isEmpty = function (e) { + if (null == e) return !0; + if (Qa(e) && (Ka(e) || "string" == typeof e || "function" == typeof e.splice || Xa(e) || ds(e) || qa(e))) return !e.length; + var t = go(e); + if (t == k || t == F) return !e.size; + if (Eo(e)) return !Mr(e).length; + for (var n in e) if (Re.call(e, n)) return !1; + return !0 + },zn.isEqual = function (e, t) { + return _r(e, t) + },zn.isEqualWith = function (e, t, n) { + var r = (n = "function" == typeof n ? n : o) ? n(e, t) : o; + return r === o ? _r(e, t, o, n) : !!r + },zn.isError = Za,zn.isFinite = function (e) { + return "number" == typeof e && bt(e) + },zn.isFunction = Ja,zn.isInteger = es,zn.isLength = ts,zn.isMap = is,zn.isMatch = function (e, t) { + return e === t || Tr(e, t, fo(t)) + },zn.isMatchWith = function (e, t, n) { + return n = "function" == typeof n ? n : o, Tr(e, t, fo(t), n) + },zn.isNaN = function (e) { + return os(e) && e != +e + },zn.isNative = function (e) { + if (So(e)) throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill."); + return Rr(e) + },zn.isNil = function (e) { + return null == e + },zn.isNull = function (e) { + return null === e + },zn.isNumber = os,zn.isObject = ns,zn.isObjectLike = rs,zn.isPlainObject = as,zn.isRegExp = ss,zn.isSafeInteger = function (e) { + return es(e) && e >= -9007199254740991 && e <= v + },zn.isSet = ls,zn.isString = us,zn.isSymbol = cs,zn.isTypedArray = ds,zn.isUndefined = function (e) { + return e === o + },zn.isWeakMap = function (e) { + return rs(e) && go(e) == T + },zn.isWeakSet = function (e) { + return rs(e) && "[object WeakSet]" == kr(e) + },zn.join = function (e, t) { + return null == e ? "" : Lt.call(e, t) + },zn.kebabCase = Ks,zn.last = Zo,zn.lastIndexOf = function (e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = r; + return n !== o && (i = (i = gs(n)) < 0 ? bn(r + i, 0) : xn(i, r - 1)), t === t ? function (e, t, n) { + for (var r = n + 1; r--;) if (e[r] === t) return r; + return r + }(e, t, i) : zt(e, Wt, i, !0) + },zn.lowerCase = $s,zn.lowerFirst = Qs,zn.lt = fs,zn.lte = hs,zn.max = function (e) { + return e && e.length ? gr(e, ol, jr) : o + },zn.maxBy = function (e, t) { + return e && e.length ? gr(e, uo(t, 2), jr) : o + },zn.mean = function (e) { + return qt(e, ol) + },zn.meanBy = function (e, t) { + return qt(e, uo(t, 2)) + },zn.min = function (e) { + return e && e.length ? gr(e, ol, Lr) : o + },zn.minBy = function (e, t) { + return e && e.length ? gr(e, uo(t, 2), Lr) : o + },zn.stubArray = yl,zn.stubFalse = ml,zn.stubObject = function () { + return {} + },zn.stubString = function () { + return "" + },zn.stubTrue = function () { + return !0 + },zn.multiply = Dl,zn.nth = function (e, t) { + return e && e.length ? Wr(e, gs(t)) : o + },zn.noConflict = function () { + return pt._ === this && (pt._ = Ue), this + },zn.noop = cl,zn.now = Oa,zn.pad = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + if (!t || r >= t) return e; + var i = (t - r) / 2; + return qi(vt(i), n) + e + qi(ht(i), n) + },zn.padEnd = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + return t && r < t ? e + qi(t - r, n) : e + },zn.padStart = function (e, t, n) { + e = xs(e); + var r = (t = gs(t)) ? pn(e) : 0; + return t && r < t ? qi(t - r, n) + e : e + },zn.parseInt = function (e, t, n) { + return n || null == t ? t = 0 : t && (t = +t), Cn(xs(e).replace(se, ""), t || 0) + },zn.random = function (e, t, n) { + if (n && "boolean" != typeof n && wo(e, t, n) && (t = n = o), n === o && ("boolean" == typeof t ? (n = t, t = o) : "boolean" == typeof e && (n = e, e = o)), e === o && t === o ? (e = 0, t = 1) : (e = vs(e), t === o ? (t = e, e = 0) : t = vs(t)), e > t) { + var r = e; + e = t, t = r + } + if (n || e % 1 || t % 1) { + var i = Dn(); + return xn(e + i * (t - e + ct("1e-" + ((i + "").length - 1))), t) + } + return Gr(e, t) + },zn.reduce = function (e, t, n) { + var r = Ka(e) ? Nt : Qt, i = arguments.length < 3; + return r(e, uo(t, 4), n, i, hr) + },zn.reduceRight = function (e, t, n) { + var r = Ka(e) ? Mt : Qt, i = arguments.length < 3; + return r(e, uo(t, 4), n, i, pr) + },zn.repeat = function (e, t, n) { + return t = (n ? wo(e, t, n) : t === o) ? 1 : gs(t), Xr(xs(e), t) + },zn.replace = function () { + var e = arguments, t = xs(e[0]); + return e.length < 3 ? t : t.replace(e[1], e[2]) + },zn.result = function (e, t, n) { + var r = -1, i = (t = xi(t, e)).length; + for (i || (i = 1, e = o); ++r < i;) { + var a = null == e ? o : e[Lo(t[r])]; + a === o && (r = i, a = n), e = Ja(a) ? a.call(e) : a + } + return e + },zn.round = Sl,zn.runInContext = e,zn.sample = function (e) { + return (Ka(e) ? Zn : Zr)(e) + },zn.size = function (e) { + if (null == e) return 0; + if (Qa(e)) return us(e) ? pn(e) : e.length; + var t = go(e); + return t == k || t == F ? e.size : Mr(e).length + },zn.snakeCase = Gs,zn.some = function (e, t, n) { + var r = Ka(e) ? Bt : oi; + return n && wo(e, t, n) && (t = o), r(e, uo(t, 3)) + },zn.sortedIndex = function (e, t) { + return ai(e, t) + },zn.sortedIndexBy = function (e, t, n) { + return si(e, t, uo(n, 2)) + },zn.sortedIndexOf = function (e, t) { + var n = null == e ? 0 : e.length; + if (n) { + var r = ai(e, t); + if (r < n && Va(e[r], t)) return r + } + return -1 + },zn.sortedLastIndex = function (e, t) { + return ai(e, t, !0) + },zn.sortedLastIndexBy = function (e, t, n) { + return si(e, t, uo(n, 2), !0) + },zn.sortedLastIndexOf = function (e, t) { + if (null == e ? 0 : e.length) { + var n = ai(e, t, !0) - 1; + if (Va(e[n], t)) return n + } + return -1 + },zn.startCase = Xs,zn.startsWith = function (e, t, n) { + return e = xs(e), n = null == n ? 0 : lr(gs(n), 0, e.length), t = ci(t), e.slice(n, n + t.length) == t + },zn.subtract = El,zn.sum = function (e) { + return e && e.length ? Gt(e, ol) : 0 + },zn.sumBy = function (e, t) { + return e && e.length ? Gt(e, uo(t, 2)) : 0 + },zn.template = function (e, t, n) { + var r = zn.templateSettings; + n && wo(e, t, n) && (t = o), e = xs(e), t = Ds({}, t, r, Ji); + var a, s, l = Ds({}, t.imports, r.imports, Ji), u = _s(l), c = Jt(l, u), d = 0, + f = t.interpolate || De, h = "__p += '", + p = je((t.escape || De).source + "|" + f.source + "|" + (f === te ? ve : De).source + "|" + (t.evaluate || De).source + "|$", "g"), + v = "//# sourceURL=" + (Re.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++at + "]") + "\n"; + e.replace(p, (function (t, n, r, i, o, l) { + return r || (r = i), h += e.slice(d, l).replace(Se, sn), n && (a = !0, h += "' +\n__e(" + n + ") +\n'"), o && (s = !0, h += "';\n" + o + ";\n__p += '"), r && (h += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), d = l + t.length, t + })), h += "';\n"; + var g = Re.call(t, "variable") && t.variable; + if (g) { + if (he.test(g)) throw new i("Invalid `variable` option passed into `_.template`") + } else h = "with (obj) {\n" + h + "\n}\n"; + h = (s ? h.replace(K, "") : h).replace($, "$1").replace(Q, "$1;"), h = "function(" + (g || "obj") + ") {\n" + (g ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (a ? ", __e = _.escape" : "") + (s ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + h + "return __p\n}"; + var y = el((function () { + return le(u, v + "return " + h).apply(o, c) + })); + if (y.source = h, Za(y)) throw y; + return y + },zn.times = function (e, t) { + if ((e = gs(e)) < 1 || e > v) return []; + var n = y, r = xn(e, y); + t = uo(t), e -= y; + for (var i = Xt(r, t); ++n < e;) t(n); + return i + },zn.toFinite = vs,zn.toInteger = gs,zn.toLength = ys,zn.toLower = function (e) { + return xs(e).toLowerCase() + },zn.toNumber = ms,zn.toSafeInteger = function (e) { + return e ? lr(gs(e), -9007199254740991, v) : 0 === e ? e : 0 + },zn.toString = xs,zn.toUpper = function (e) { + return xs(e).toUpperCase() + },zn.trim = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return Yt(e); + if (!e || !(t = ci(t))) return e; + var r = vn(e), i = vn(t); + return Ci(r, tn(r, i), nn(r, i) + 1).join("") + },zn.trimEnd = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return e.slice(0, gn(e) + 1); + if (!e || !(t = ci(t))) return e; + var r = vn(e); + return Ci(r, 0, nn(r, vn(t)) + 1).join("") + },zn.trimStart = function (e, t, n) { + if ((e = xs(e)) && (n || t === o)) return e.replace(se, ""); + if (!e || !(t = ci(t))) return e; + var r = vn(e); + return Ci(r, tn(r, vn(t))).join("") + },zn.truncate = function (e, t) { + var n = 30, r = "..."; + if (ns(t)) { + var i = "separator" in t ? t.separator : i; + n = "length" in t ? gs(t.length) : n, r = "omission" in t ? ci(t.omission) : r + } + var a = (e = xs(e)).length; + if (ln(e)) { + var s = vn(e); + a = s.length + } + if (n >= a) return e; + var l = n - pn(r); + if (l < 1) return r; + var u = s ? Ci(s, 0, l).join("") : e.slice(0, l); + if (i === o) return u + r; + if (s && (l += u.length - l), ss(i)) { + if (e.slice(l).search(i)) { + var c, d = u; + for (i.global || (i = je(i.source, xs(ge.exec(i)) + "g")), i.lastIndex = 0; c = i.exec(d);) var f = c.index; + u = u.slice(0, f === o ? l : f) + } + } else if (e.indexOf(ci(i), l) != l) { + var h = u.lastIndexOf(i); + h > -1 && (u = u.slice(0, h)) + } + return u + r + },zn.unescape = function (e) { + return (e = xs(e)) && Y.test(e) ? e.replace(G, yn) : e + },zn.uniqueId = function (e) { + var t = ++Ne; + return xs(e) + t + },zn.upperCase = Ys,zn.upperFirst = Zs,zn.each = xa,zn.eachRight = wa,zn.first = Qo,ul(zn, function () { + var e = {}; + return wr(zn, (function (t, n) { + Re.call(zn.prototype, n) || (e[n] = t) + })), e + }(), {chain: !1}),zn.VERSION = "4.17.21",Ot(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], (function (e) { + zn[e].placeholder = zn + })),Ot(["drop", "take"], (function (e, t) { + qn.prototype[e] = function (n) { + n = n === o ? 1 : bn(gs(n), 0); + var r = this.__filtered__ && !t ? new qn(this) : this.clone(); + return r.__filtered__ ? r.__takeCount__ = xn(n, r.__takeCount__) : r.__views__.push({ + size: xn(n, y), + type: e + (r.__dir__ < 0 ? "Right" : "") + }), r + }, qn.prototype[e + "Right"] = function (t) { + return this.reverse()[e](t).reverse() + } + })),Ot(["filter", "map", "takeWhile"], (function (e, t) { + var n = t + 1, r = 1 == n || 3 == n; + qn.prototype[e] = function (e) { + var t = this.clone(); + return t.__iteratees__.push({ + iteratee: uo(e, 3), + type: n + }), t.__filtered__ = t.__filtered__ || r, t + } + })),Ot(["head", "last"], (function (e, t) { + var n = "take" + (t ? "Right" : ""); + qn.prototype[e] = function () { + return this[n](1).value()[0] + } + })),Ot(["initial", "tail"], (function (e, t) { + var n = "drop" + (t ? "" : "Right"); + qn.prototype[e] = function () { + return this.__filtered__ ? new qn(this) : this[n](1) + } + })),qn.prototype.compact = function () { + return this.filter(ol) + },qn.prototype.find = function (e) { + return this.filter(e).head() + },qn.prototype.findLast = function (e) { + return this.reverse().find(e) + },qn.prototype.invokeMap = Yr((function (e, t) { + return "function" == typeof e ? new qn(this) : this.map((function (n) { + return Fr(n, e, t) + })) + })),qn.prototype.reject = function (e) { + return this.filter(Ma(uo(e))) + },qn.prototype.slice = function (e, t) { + e = gs(e); + var n = this; + return n.__filtered__ && (e > 0 || t < 0) ? new qn(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== o && (n = (t = gs(t)) < 0 ? n.dropRight(-t) : n.take(t - e)), n) + },qn.prototype.takeRightWhile = function (e) { + return this.reverse().takeWhile(e).reverse() + },qn.prototype.toArray = function () { + return this.take(y) + },wr(qn.prototype, (function (e, t) { + var n = /^(?:filter|find|map|reject)|While$/.test(t), r = /^(?:head|last)$/.test(t), + i = zn[r ? "take" + ("last" == t ? "Right" : "") : t], a = r || /^find/.test(t); + i && (zn.prototype[t] = function () { + var t = this.__wrapped__, s = r ? [1] : arguments, l = t instanceof qn, u = s[0], + c = l || Ka(t), d = function (e) { + var t = i.apply(zn, Rt([e], s)); + return r && f ? t[0] : t + }; + c && n && "function" == typeof u && 1 != u.length && (l = c = !1); + var f = this.__chain__, h = !!this.__actions__.length, p = a && !f, v = l && !h; + if (!a && c) { + t = v ? t : new qn(this); + var g = e.apply(t, s); + return g.__actions__.push({func: va, args: [d], thisArg: o}), new Wn(g, f) + } + return p && v ? e.apply(this, s) : (g = this.thru(d), p ? r ? g.value()[0] : g.value() : g) + }) + })),Ot(["pop", "push", "shift", "sort", "splice", "unshift"], (function (e) { + var t = Ie[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", + r = /^(?:pop|shift)$/.test(e); + zn.prototype[e] = function () { + var e = arguments; + if (r && !this.__chain__) { + var i = this.value(); + return t.apply(Ka(i) ? i : [], e) + } + return this[n]((function (n) { + return t.apply(Ka(n) ? n : [], e) + })) + } + })),wr(qn.prototype, (function (e, t) { + var n = zn[t]; + if (n) { + var r = n.name + ""; + Re.call(Pn, r) || (Pn[r] = []), Pn[r].push({name: t, func: n}) + } + })),Pn[zi(o, 2).name] = [{name: "wrapper", func: o}],qn.prototype.clone = function () { + var e = new qn(this.__wrapped__); + return e.__actions__ = Ii(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ii(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ii(this.__views__), e + },qn.prototype.reverse = function () { + if (this.__filtered__) { + var e = new qn(this); + e.__dir__ = -1, e.__filtered__ = !0 + } else (e = this.clone()).__dir__ *= -1; + return e + },qn.prototype.value = function () { + var e = this.__wrapped__.value(), t = this.__dir__, n = Ka(e), r = t < 0, i = n ? e.length : 0, + o = function (e, t, n) { + var r = -1, i = n.length; + for (; ++r < i;) { + var o = n[r], a = o.size; + switch (o.type) { + case"drop": + e += a; + break; + case"dropRight": + t -= a; + break; + case"take": + t = xn(t, e + a); + break; + case"takeRight": + e = bn(e, t - a) + } + } + return {start: e, end: t} + }(0, i, this.__views__), a = o.start, s = o.end, l = s - a, u = r ? s : a - 1, + c = this.__iteratees__, d = c.length, f = 0, h = xn(l, this.__takeCount__); + if (!n || !r && i == l && h == l) return vi(e, this.__actions__); + var p = []; + e:for (; l-- && f < h;) { + for (var v = -1, g = e[u += t]; ++v < d;) { + var y = c[v], m = y.iteratee, b = y.type, x = m(g); + if (2 == b) g = x; else if (!x) { + if (1 == b) continue e; + break e + } + } + p[f++] = g + } + return p + },zn.prototype.at = ga,zn.prototype.chain = function () { + return pa(this) + },zn.prototype.commit = function () { + return new Wn(this.value(), this.__chain__) + },zn.prototype.next = function () { + this.__values__ === o && (this.__values__ = ps(this.value())); + var e = this.__index__ >= this.__values__.length; + return {done: e, value: e ? o : this.__values__[this.__index__++]} + },zn.prototype.plant = function (e) { + for (var t, n = this; n instanceof Hn;) { + var r = zo(n); + r.__index__ = 0, r.__values__ = o, t ? i.__wrapped__ = r : t = r; + var i = r; + n = n.__wrapped__ + } + return i.__wrapped__ = e, t + },zn.prototype.reverse = function () { + var e = this.__wrapped__; + if (e instanceof qn) { + var t = e; + return this.__actions__.length && (t = new qn(this)), (t = t.reverse()).__actions__.push({ + func: va, + args: [na], + thisArg: o + }), new Wn(t, this.__chain__) + } + return this.thru(na) + },zn.prototype.toJSON = zn.prototype.valueOf = zn.prototype.value = function () { + return vi(this.__wrapped__, this.__actions__) + },zn.prototype.first = zn.prototype.head,Ye && (zn.prototype[Ye] = function () { + return this + }),zn + }(); + pt._ = mn, (i = function () { + return mn + }.call(t, n, t, r)) === o || (r.exports = i) + }).call(this) + }).call(this, n(128), n(547)(e)) + }, function (e, t, n) { + (function (t) { + var n = function (e) { + return e && e.Math == Math && e + }; + e.exports = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof t && t) || function () { + return this + }() || Function("return this")() + }).call(this, n(128)) + }, function (e, t, n) { + var r = n(4), i = n(13), o = r.String, a = r.TypeError; + e.exports = function (e) { + if (i(e)) return e; + throw a(o(e) + " is not an object") + } + }, function (e, t) { + var n = Function.prototype, r = n.bind, i = n.call, o = r && r.bind(i); + e.exports = r ? function (e) { + return e && o(i, e) + } : function (e) { + return e && function () { + return i.apply(e, arguments) + } + } + }, function (e, t) { + e.exports = function (e) { + try { + return !!e() + } catch (t) { + return !0 + } + } + }, function (e, t) { + var n = Function.prototype.call; + e.exports = n.bind ? n.bind(n) : function () { + return n.apply(n, arguments) + } + }, function (e, t) { + e.exports = !1 + }, function (e, t, n) { + var r = n(4), i = n(15), o = n(76), a = r.TypeError; + e.exports = function (e) { + if (i(e)) return e; + throw a(o(e) + " is not a function") + } + }, function (e, t, n) { + "use strict"; + e.exports = n(543) + }, function (e, t, n) { + var r = n(4), i = n(22), o = n(8), a = n(5), s = n(76), l = n(140), u = n(24), c = n(48), d = n(63), f = n(84), + h = n(174), p = r.TypeError, v = function (e, t) { + this.stopped = e, this.result = t + }, g = v.prototype; + e.exports = function (e, t, n) { + var r, y, m, b, x, w, C, D = n && n.that, S = !(!n || !n.AS_ENTRIES), E = !(!n || !n.IS_ITERATOR), + k = !(!n || !n.INTERRUPTED), j = i(t, D), O = function (e) { + return r && h(r, "normal", e), new v(!0, e) + }, A = function (e) { + return S ? (a(e), k ? j(e[0], e[1], O) : j(e[0], e[1])) : k ? j(e, O) : j(e) + }; + if (E) r = e; else { + if (!(y = f(e))) throw p(s(e) + " is not iterable"); + if (l(y)) { + for (m = 0, b = u(e); b > m; m++) if ((x = A(e[m])) && c(g, x)) return x; + return new v(!1) + } + r = d(e, y) + } + for (w = r.next; !(C = o(w, r)).done;) { + try { + x = A(C.value) + } catch (I) { + h(r, "throw", I) + } + if ("object" == typeof x && x && c(g, x)) return x + } + return new v(!1) + } + }, function (e, t, n) { + var r = n(15); + e.exports = function (e) { + return "object" == typeof e ? null !== e : r(e) + } + }, function (e, t, n) { + var r = n(4), i = n(77), o = n(23), a = n(78), s = n(129), l = n(163), u = i("wks"), c = r.Symbol, + d = c && c.for, f = l ? c : c && c.withoutSetter || a; + e.exports = function (e) { + if (!o(u, e) || !s && "string" != typeof u[e]) { + var t = "Symbol." + e; + s && o(c, e) ? u[e] = c[e] : u[e] = l && d ? d(t) : f(t) + } + return u[e] + } + }, function (e, t) { + e.exports = function (e) { + return "function" == typeof e + } + }, function (e, t, n) { + var r = n(7); + e.exports = !r((function () { + return 7 != Object.defineProperty({}, 1, { + get: function () { + return 7 + } + })[1] + })) + }, function (e, t, n) { + "use strict"; + var r, i, o, a = n(200), s = n(16), l = n(4), u = n(15), c = n(13), d = n(23), f = n(61), h = n(76), p = n(39), + v = n(26), g = n(21).f, y = n(48), m = n(31), b = n(58), x = n(14), w = n(78), C = l.Int8Array, + D = C && C.prototype, S = l.Uint8ClampedArray, E = S && S.prototype, k = C && m(C), j = D && m(D), + O = Object.prototype, A = l.TypeError, I = x("toStringTag"), F = w("TYPED_ARRAY_TAG"), + P = w("TYPED_ARRAY_CONSTRUCTOR"), _ = a && !!b && "Opera" !== f(l.opera), T = !1, R = { + Int8Array: 1, + Uint8Array: 1, + Uint8ClampedArray: 1, + Int16Array: 2, + Uint16Array: 2, + Int32Array: 4, + Uint32Array: 4, + Float32Array: 4, + Float64Array: 8 + }, N = {BigInt64Array: 8, BigUint64Array: 8}, M = function (e) { + if (!c(e)) return !1; + var t = f(e); + return d(R, t) || d(N, t) + }; + for (r in R) (o = (i = l[r]) && i.prototype) ? p(o, P, i) : _ = !1; + for (r in N) (o = (i = l[r]) && i.prototype) && p(o, P, i); + if ((!_ || !u(k) || k === Function.prototype) && (k = function () { + throw A("Incorrect invocation") + }, _)) for (r in R) l[r] && b(l[r], k); + if ((!_ || !j || j === O) && (j = k.prototype, _)) for (r in R) l[r] && b(l[r].prototype, j); + if (_ && m(E) !== j && b(E, j), s && !d(j, I)) for (r in T = !0, g(j, I, { + get: function () { + return c(this) ? this[F] : void 0 + } + }), R) l[r] && p(l[r], F, r); + e.exports = { + NATIVE_ARRAY_BUFFER_VIEWS: _, + TYPED_ARRAY_CONSTRUCTOR: P, + TYPED_ARRAY_TAG: T && F, + aTypedArray: function (e) { + if (M(e)) return e; + throw A("Target is not a typed array") + }, + aTypedArrayConstructor: function (e) { + if (u(e) && (!b || y(k, e))) return e; + throw A(h(e) + " is not a typed array constructor") + }, + exportTypedArrayMethod: function (e, t, n) { + if (s) { + if (n) for (var r in R) { + var i = l[r]; + if (i && d(i.prototype, e)) try { + delete i.prototype[e] + } catch (o) { + } + } + j[e] && !n || v(j, e, n ? t : _ && D[e] || t) + } + }, + exportTypedArrayStaticMethod: function (e, t, n) { + var r, i; + if (s) { + if (b) { + if (n) for (r in R) if ((i = l[r]) && d(i, e)) try { + delete i[e] + } catch (o) { + } + if (k[e] && !n) return; + try { + return v(k, e, n ? t : _ && k[e] || t) + } catch (o) { + } + } + for (r in R) !(i = l[r]) || i[e] && !n || v(i, e, t) + } + }, + isView: function (e) { + if (!c(e)) return !1; + var t = f(e); + return "DataView" === t || d(R, t) || d(N, t) + }, + isTypedArray: M, + TypedArray: k, + TypedArrayPrototype: j + } + }, function (e, t, n) { + var r = n(4), i = n(15), o = function (e) { + return i(e) ? e : void 0 + }; + e.exports = function (e, t) { + return arguments.length < 2 ? o(r[e]) : r[e] && r[e][t] + } + }, function (e, t, n) { + var r = n(4), i = n(61), o = r.String; + e.exports = function (e) { + if ("Symbol" === i(e)) throw TypeError("Cannot convert a Symbol value to a string"); + return o(e) + } + }, function (e, t, n) { + var r = n(4), i = n(25), o = r.Object; + e.exports = function (e) { + return o(i(e)) + } + }, function (e, t, n) { + var r = n(4), i = n(16), o = n(165), a = n(5), s = n(56), l = r.TypeError, u = Object.defineProperty; + t.f = i ? u : function (e, t, n) { + if (a(e), t = s(t), a(n), o) try { + return u(e, t, n) + } catch (r) { + } + if ("get" in n || "set" in n) throw l("Accessors not supported"); + return "value" in n && (e[t] = n.value), e + } + }, function (e, t, n) { + var r = n(6), i = n(10), o = r(r.bind); + e.exports = function (e, t) { + return i(e), void 0 === t ? e : o ? o(e, t) : function () { + return e.apply(t, arguments) + } + } + }, function (e, t, n) { + var r = n(6), i = n(20), o = r({}.hasOwnProperty); + e.exports = Object.hasOwn || function (e, t) { + return o(i(e), t) + } + }, function (e, t, n) { + var r = n(40); + e.exports = function (e) { + return r(e.length) + } + }, function (e, t, n) { + var r = n(4).TypeError; + e.exports = function (e) { + if (void 0 == e) throw r("Can't call method on " + e); + return e + } + }, function (e, t, n) { + var r = n(4), i = n(15), o = n(23), a = n(39), s = n(131), l = n(100), u = n(27), c = n(59).CONFIGURABLE, + d = u.get, f = u.enforce, h = String(String).split("String"); + (e.exports = function (e, t, n, l) { + var u, d = !!l && !!l.unsafe, p = !!l && !!l.enumerable, v = !!l && !!l.noTargetGet, + g = l && void 0 !== l.name ? l.name : t; + i(n) && ("Symbol(" === String(g).slice(0, 7) && (g = "[" + String(g).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), (!o(n, "name") || c && n.name !== g) && a(n, "name", g), (u = f(n)).source || (u.source = h.join("string" == typeof g ? g : ""))), e !== r ? (d ? !v && e[t] && (p = !0) : delete e[t], p ? e[t] = n : a(e, t, n)) : p ? e[t] = n : s(t, n) + })(Function.prototype, "toString", (function () { + return i(this) && d(this).source || l(this) + })) + }, function (e, t, n) { + var r, i, o, a = n(166), s = n(4), l = n(6), u = n(13), c = n(39), d = n(23), f = n(130), h = n(101), p = n(79), + v = "Object already initialized", g = s.TypeError, y = s.WeakMap; + if (a || f.state) { + var m = f.state || (f.state = new y), b = l(m.get), x = l(m.has), w = l(m.set); + r = function (e, t) { + if (x(m, e)) throw new g(v); + return t.facade = e, w(m, e, t), t + }, i = function (e) { + return b(m, e) || {} + }, o = function (e) { + return x(m, e) + } + } else { + var C = h("state"); + p[C] = !0, r = function (e, t) { + if (d(e, C)) throw new g(v); + return t.facade = e, c(e, C, t), t + }, i = function (e) { + return d(e, C) ? e[C] : {} + }, o = function (e) { + return d(e, C) + } + } + e.exports = { + set: r, get: i, has: o, enforce: function (e) { + return o(e) ? i(e) : r(e, {}) + }, getterFor: function (e) { + return function (t) { + var n; + if (!u(t) || (n = i(t)).type !== e) throw g("Incompatible receiver, " + e + " required"); + return n + } + } + } + }, function (e, t, n) { + var r = n(254), i = n(23), o = n(170), a = n(21).f; + e.exports = function (e) { + var t = r.Symbol || (r.Symbol = {}); + i(t, e) || a(t, e, {value: o.f(e)}) + } + }, function (e, t, n) { + var r = n(16), i = n(8), o = n(97), a = n(47), s = n(32), l = n(56), u = n(23), c = n(165), + d = Object.getOwnPropertyDescriptor; + t.f = r ? d : function (e, t) { + if (e = s(e), t = l(t), c) try { + return d(e, t) + } catch (n) { + } + if (u(e, t)) return a(!i(o.f, e, t), e[t]) + } + }, function (e, t, n) { + var r = n(22), i = n(6), o = n(75), a = n(20), s = n(24), l = n(70), u = i([].push), c = function (e) { + var t = 1 == e, n = 2 == e, i = 3 == e, c = 4 == e, d = 6 == e, f = 7 == e, h = 5 == e || d; + return function (p, v, g, y) { + for (var m, b, x = a(p), w = o(x), C = r(v, g), D = s(w), S = 0, E = y || l, k = t ? E(p, D) : n || f ? E(p, 0) : void 0; D > S; S++) if ((h || S in w) && (b = C(m = w[S], S, x), e)) if (t) k[S] = b; else if (b) switch (e) { + case 3: + return !0; + case 5: + return m; + case 6: + return S; + case 2: + u(k, m) + } else switch (e) { + case 4: + return !1; + case 7: + u(k, m) + } + return d ? -1 : i || c ? c : k + } + }; + e.exports = { + forEach: c(0), + map: c(1), + filter: c(2), + some: c(3), + every: c(4), + find: c(5), + findIndex: c(6), + filterReject: c(7) + } + }, function (e, t, n) { + var r = n(4), i = n(23), o = n(15), a = n(20), s = n(101), l = n(142), u = s("IE_PROTO"), c = r.Object, + d = c.prototype; + e.exports = l ? c.getPrototypeOf : function (e) { + var t = a(e); + if (i(t, u)) return t[u]; + var n = t.constructor; + return o(n) && t instanceof n ? n.prototype : t instanceof c ? d : null + } + }, function (e, t, n) { + var r = n(75), i = n(25); + e.exports = function (e) { + return r(i(e)) + } + }, function (e, t, n) { + var r = n(5), i = n(111), o = n(14)("species"); + e.exports = function (e, t) { + var n, a = r(e).constructor; + return void 0 === a || void 0 == (n = r(a)[o]) ? t : i(n) + } + }, function (e, t, n) { + "use strict"; + e.exports = function (e, t) { + var n, o, a = t.children || [], s = a.length, l = [], u = -1; + for (; ++u < s;) (n = i(e, a[u], t)) && (u && "break" === a[u - 1].type && (n.value && (n.value = r.left(n.value)), (o = n.children && n.children[0]) && o.value && (o.value = r.left(o.value))), l = l.concat(n)); + return l + }; + var r = n(67), i = n(247) + }, function (e, t) { + var n = Math.ceil, r = Math.floor; + e.exports = function (e) { + var t = +e; + return t !== t || 0 === t ? 0 : (t > 0 ? r : n)(t) + } + }, function (e, t, n) { + var r = n(6); + e.exports = r([].slice) + }, function (e, t, n) { + var r = n(6), i = n(25), o = n(19), a = /"/g, s = r("".replace); + e.exports = function (e, t, n, r) { + var l = o(i(e)), u = "<" + t; + return "" !== n && (u += " " + n + '="' + s(o(r), a, """) + '"'), u + ">" + l + "" + } + }, function (e, t, n) { + var r = n(7); + e.exports = function (e) { + return r((function () { + var t = ""[e]('"'); + return t !== t.toLowerCase() || t.split('"').length > 3 + })) + } + }, function (e, t, n) { + var r = n(16), i = n(21), o = n(47); + e.exports = r ? function (e, t, n) { + return i.f(e, t, o(1, n)) + } : function (e, t, n) { + return e[t] = n, e + } + }, function (e, t, n) { + var r = n(35), i = Math.min; + e.exports = function (e) { + return e > 0 ? i(r(e), 9007199254740991) : 0 + } + }, function (e, t, n) { + var r, i = n(5), o = n(168), a = n(134), s = n(79), l = n(169), u = n(99), c = n(101), d = c("IE_PROTO"), + f = function () { + }, h = function (e) { + return " @@ -34,7 +33,6 @@ - From 639e5f340172ef42fcbfbe1a029c1bf840023b9e Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Thu, 4 Apr 2024 13:09:15 -0700 Subject: [PATCH 10/24] Render selection in search results --- .../client/searchIcd/SearchIcdViewImpl.java | 89 +++++++++++++++++-- .../client/searchIcd/SearchIcdViewImpl.ui.xml | 37 +++++++- 2 files changed, 120 insertions(+), 6 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java index 4f1f949786..5adc4d5006 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java @@ -1,9 +1,12 @@ package edu.stanford.bmir.protege.web.client.searchIcd; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.EventTarget; +import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.TextArea; @@ -26,11 +29,16 @@ * Stanford Center for Biomedical Informatics Research * 21 Apr 2017 */ +@SuppressWarnings("OptionalUsedAsFieldOrParameterType") public class SearchIcdViewImpl extends Composite implements SearchIcdView { private final static java.util.logging.Logger logger = Logger.getLogger("SearchIcdViewImpl"); + protected static final String SELECTED_ENTITY_STYLE = "selectedEntity"; + + protected static final String TARGET_ELEMENT_ATTRIBUTE_NAME = "data-entityindex"; + private static SearchViewIcdImplUiBinder ourUiBinder = GWT.create(SearchViewIcdImplUiBinder.class); @UiField @@ -44,11 +52,18 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { private AcceptKeyHandler acceptKeyHandler = () -> { }; + /* + * Member variable for DOM element that holds the selection. This should be + * set with #setSelectedElement(Optional) or #clearLastSelection(). + */ + private Optional selectedElement = Optional.empty(); + private String previousSearchString = ""; @UiField BusyViewImpl busyView; + @UiField HTMLPanel ectElement; @@ -185,14 +200,78 @@ private native void setJsniSubtreeFilter(String icdSearchFilter) /*-{ }-*/; public void setSubtreeFilter(String icdSearchFilter) { - if (icdSearchFilter == null || icdSearchFilter.length() == 0) { - icdSearchFilter = TOP_LEVEL_SUBTREE_FILTER; - } - setJsniSubtreeFilter(icdSearchFilter); - bind("1"); + // TODO: @Geo +// if (icdSearchFilter == null || icdSearchFilter.length() == 0) { +// icdSearchFilter = TOP_LEVEL_SUBTREE_FILTER; +// } +// setJsniSubtreeFilter(icdSearchFilter); +// bind("1"); } public native void bind(String iNo) /*-{ $wnd.ECT.Handler.bind(iNo); }-*/; + + @Override + protected void onAttach() { + super.onAttach(); + + setupClickHandlerForUpdatingSelection(); + } + + /** + * Sets up the click handler for updating the selection. This method adds a click event listener + * to the ectElement and updates the selected element based on the click event target. + */ + private void setupClickHandlerForUpdatingSelection() { + ectElement.sinkEvents(Event.ONCLICK); + ectElement.addDomHandler(event -> { + clearLastSelection(); + EventTarget eventTarget = event.getNativeEvent().getEventTarget(); + if (eventTarget instanceof elemental.dom.Element) { + Optional toSelect = findSelectedElementForTargetElement((elemental.dom.Element) eventTarget); + setSelectedElement(toSelect); + } + }, ClickEvent.getType()); + } + + /** + * Sets the selected element and updates the UI. + * + * @param targetElement The target element to select. + */ + private void setSelectedElement(Optional targetElement) { + clearLastSelection(); + this.selectedElement = targetElement; + this.selectedElement.ifPresent(e -> e.getClassList().add(SELECTED_ENTITY_STYLE)); + } + + /** + * Clears the last selected element by removing the SELECTED_ENTITY_STYLE class from its class list. + * If no element is currently selected, this method does nothing. + */ + private void clearLastSelection() { + this.selectedElement.ifPresent(e -> { + e.getClassList().remove(SELECTED_ENTITY_STYLE); + }); + } + + /** + * Finds the element to select that is an ancestor of the given target element. + * + * @param eventTarget The target element for which to find the element to select. + * @return An Optional that contains the element to select, or empty if no selected element is found. + */ + private Optional findSelectedElementForTargetElement(elemental.dom.Element eventTarget) { + elemental.dom.Element element = eventTarget; + while(element != null) { + if(element.hasAttribute(TARGET_ELEMENT_ATTRIBUTE_NAME)) { + return Optional.of(element); + } + element = element.getParentElement(); + } + return Optional.empty(); + } + + } \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml index 0b65f78ff8..be77056e1f 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml @@ -17,6 +17,10 @@ box-sizing: border-box; } + .searchResults { + height: 300px; + } + .helpText { } @@ -30,6 +34,37 @@ height: 100%; } + @external entityInList; + .entityInList { + cursor: pointer; + } + + @external .selectedEntity; + .selectedEntity { + color: literal("var(--selected-item--color)"); + background-color: literal("var(--selected-item--background-color)"); + } + + @external .pvs; + @external .entityPv; + .selectedEntity .pvs { + color: literal("var(--selected-item--color)") !important; + background-color: literal("var(--selected-item--background-color)") !important; + } + .selectedEntity .entityPv { + color: literal("var(--selected-item--color)"); + background-color: literal("var(--selected-item--background-color)"); + border-color: literal("var(--selected-item--background-color)"); + } + @external .found; + .selectedEntity .found { + color: literal("var(--selected-item--color)") !important; + } + @external .showlink; + .selectedEntity .showlink { + color: literal("var(--selected-item--color)") !important; + } + .langTagFilter { flex-basis: 100px; flex-grow: 1; @@ -78,7 +113,7 @@ - + From 5a050b605a9ec397dfd8bb640418bb6b15a53452 Mon Sep 17 00:00:00 2001 From: Gheorghe Soimu Date: Fri, 5 Apr 2024 20:58:46 +0300 Subject: [PATCH 11/24] icdApi wip --- .../client/searchIcd/SearchIcdPresenter.java | 2 +- .../web/client/searchIcd/SearchIcdView.java | 4 +- .../client/searchIcd/SearchIcdViewImpl.java | 62 +++++++++++-------- .../client/searchIcd/SearchIcdViewImpl.ui.xml | 46 +++----------- 4 files changed, 47 insertions(+), 67 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java index c9286cea73..bc05b1814d 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java @@ -55,7 +55,7 @@ public void start() { } public void setSubTreeFilter(Optional selectedOption) { - selectedOption.ifPresent((selectedOptPres) -> this.view.setSubtreeFilter(selectedOptPres.toStringID())); + selectedOption.ifPresent((selectedOptPres) -> this.view.setSubtreeFilterText(selectedOptPres)); } public void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler) { diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java index 093dd76971..71d53e4d25 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java @@ -5,8 +5,10 @@ import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.progress.HasBusy; import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; +import org.semanticweb.owlapi.model.OWLEntity; import javax.annotation.Nonnull; +import java.util.Optional; /** * Matthew Horridge @@ -22,5 +24,5 @@ public interface SearchIcdView extends HasBusy, IsWidget, HasInitialFocusable { String getSelectedURI(); - public void setSubtreeFilter(String icdSearchFilter); + public void setSubtreeFilterText(OWLEntity icdSearchFilter); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java index 5adc4d5006..ff90d34393 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java @@ -3,19 +3,20 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.EventTarget; import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; +import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTMLPanel; -import com.google.gwt.user.client.ui.TextArea; -import edu.stanford.bmir.protege.web.client.filter.FilterCheckBox; import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; import edu.stanford.bmir.protege.web.client.library.text.PlaceholderTextBox; import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; +import org.semanticweb.owlapi.model.OWLEntity; import javax.annotation.Nonnull; import javax.inject.Inject; @@ -58,9 +59,6 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { */ private Optional selectedElement = Optional.empty(); - private String previousSearchString = ""; - - @UiField BusyViewImpl busyView; @@ -68,10 +66,11 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { HTMLPanel ectElement; @UiField - TextArea selection; + CheckBox filterSubtreeCheckbox; - @UiField - FilterCheckBox filterSubtreeCheckbox; + private final String FILTER_CHECKBOX_LABEL_TEXT = "Search only in selected subtree"; + + private OWLEntity selectedSubtreeInHierarchy; private SearchIcdResultChosenHandler searchResultChosenHandler = result -> { @@ -79,7 +78,7 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { private String selectedURI = ""; - public static String TOP_LEVEL_SUBTREE_FILTER = + public static final String TOP_LEVEL_SUBTREE_FILTER = "http://id.who.int/icd/entity/448895267," // ICD Entity + "http://id.who.int/icd/entity/1405434703," // ICF Entity + "http://id.who.int/icd/entity/60347385," // ICHI Entity @@ -96,12 +95,24 @@ public SearchIcdViewImpl() { element.setAttribute("data-ctw-ino", "1"); ectElement.getElement().setAttribute("data-ctw-ino", "1"); - selection.getElement().setId("selectionTextArea"); + filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT); + filterSubtreeCheckbox.addValueChangeHandler(this::filterSubtreeCheckboxHandler); + } + + private void filterSubtreeCheckboxHandler(ValueChangeEvent event) { + if(event.getValue()){ + filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT +": "+selectedSubtreeInHierarchy.getClass().getName()); + setSubtreeFilter(selectedSubtreeInHierarchy.toStringID()); + }else { + filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT); + setSubtreeFilter(TOP_LEVEL_SUBTREE_FILTER); + } + + triggerSearch(searchStringField.getText()); } public void setSelection(String selection) { this.selectedURI = selection; - this.selection.setText(selection); } public native void exportSetSelection() /*-{ @@ -111,24 +122,18 @@ public native void exportSetSelection() /*-{ }); }-*/; - public native void logSomething() /*-{ - console.log("i'm here in initECT"); - $wnd.console.log("i'm here in initECT"); - - }-*/; - public native void initEct() /*-{ $wnd.console.log("i'm here in initECT"); $wnd.console.log("ECT2 este " + $wnd.ECT); var settings = { - apiServerUrl: "https://icd11restapi-developer-test.azurewebsites.net", + apiServerUrl: "https://icdapilive.azurewebsites.net", simplifiedMode: false, popupMode: false, icdLinearization: "foundation", autoBind: false, apiSecured: false, - height: "300px", + height: "290px", enableKeyboard: false }; @@ -199,15 +204,20 @@ private native void setJsniSubtreeFilter(String icdSearchFilter) /*-{ $wnd.console.log("icdSearchFilter: " + icdSearchFilter); }-*/; - public void setSubtreeFilter(String icdSearchFilter) { - // TODO: @Geo -// if (icdSearchFilter == null || icdSearchFilter.length() == 0) { -// icdSearchFilter = TOP_LEVEL_SUBTREE_FILTER; -// } -// setJsniSubtreeFilter(icdSearchFilter); -// bind("1"); + public void setSubtreeFilterText(OWLEntity icdEntitySubtree) { + selectedSubtreeInHierarchy = icdEntitySubtree; + } + + private void setSubtreeFilter(String subtreeFilter) { + if (subtreeFilter == null || subtreeFilter.length() == 0) { + subtreeFilter = TOP_LEVEL_SUBTREE_FILTER; + } + setJsniSubtreeFilter(subtreeFilter); + bind("1"); } + + public native void bind(String iNo) /*-{ $wnd.ECT.Handler.bind(iNo); }-*/; diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml index be77056e1f..f1e90fad19 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.ui.xml @@ -40,46 +40,16 @@ } @external .selectedEntity; - .selectedEntity { - color: literal("var(--selected-item--color)"); - background-color: literal("var(--selected-item--background-color)"); - } - - @external .pvs; - @external .entityPv; - .selectedEntity .pvs { + @external .entityTitle; + .selectedEntity .entityTitle { color: literal("var(--selected-item--color)") !important; background-color: literal("var(--selected-item--background-color)") !important; } - .selectedEntity .entityPv { - color: literal("var(--selected-item--color)"); - background-color: literal("var(--selected-item--background-color)"); - border-color: literal("var(--selected-item--background-color)"); - } - @external .found; - .selectedEntity .found { - color: literal("var(--selected-item--color)") !important; - } - @external .showlink; - .selectedEntity .showlink { - color: literal("var(--selected-item--color)") !important; - } - .langTagFilter { - flex-basis: 100px; - flex-grow: 1; - flex-shrink: 1; - } - - .searchFilter { - flex-basis: 100px; - flex-grow: 1; - flex-shrink: 1; - } - - .filteringPanel { - display: flex; - flex-direction: row; + @external .entityDetailsCodeAndTitle; + .selectedEntity .entityDetailsCodeAndTitle { + color: literal("var(--selected-item--color)") !important; + background-color: literal("var(--selected-item--background-color)") !important; } @external .ctw-window; @@ -107,10 +77,8 @@ addStyleNames="{style.searchField} {style.ctw-input}"/> - - - + From 91def11ffd035550e39a54024662e224fbc0e0de Mon Sep 17 00:00:00 2001 From: Gheorghe Soimu Date: Mon, 8 Apr 2024 12:34:24 +0300 Subject: [PATCH 12/24] fixed subTreeFilter name for checkbox label --- .../ClassHierarchyPortletPresenter.java | 38 +++++++++---------- .../web/client/searchIcd/SearchIcdModal.java | 5 ++- .../client/searchIcd/SearchIcdPresenter.java | 4 +- .../web/client/searchIcd/SearchIcdView.java | 5 +-- .../client/searchIcd/SearchIcdViewImpl.java | 19 +++++----- 5 files changed, 36 insertions(+), 35 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java index 931391ed6a..5a2fa00fba 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/hierarchy/ClassHierarchyPortletPresenter.java @@ -133,19 +133,19 @@ public ClassHierarchyPortletPresenter(@Nonnull final ProjectId projectId, this.createEntityPresenter = checkNotNull(createEntityPresenter); this.createClassAction = new PortletAction(messages.create(), - "wp-btn-g--create-class wp-btn-g--create", - this::handleCreateSubClasses); + "wp-btn-g--create-class wp-btn-g--create", + this::handleCreateSubClasses); this.deleteClassAction = new PortletAction(messages.delete(), - "wp-btn-g--delete-class wp-btn-g--delete", - this::handleDelete); + "wp-btn-g--delete-class wp-btn-g--delete", + this::handleDelete); this.searchActionIcd = new PortletAction(messages.searchIcd(), "wp-btn-g--searchIcd", this::handleIcdSearch); this.searchAction = new PortletAction(messages.search(), - "wp-btn-g--search", - this::handleSearch); + "wp-btn-g--search", + this::handleSearch); this.deleteEntitiesPresenter = deleteEntitiesPresenter; this.actionStatePresenter = actionStatePresenter; this.dropHandler = dropHandler; @@ -190,14 +190,14 @@ public void startPortlet(@Nonnull PortletUi portletUi, renderer.setDisplayLanguage(displayNameSettingsManager.getLocalDisplayNameSettings()); treeWidget.setRenderer(renderer); treeWidget.setModel(GraphTreeNodeModel.create(hierarchyModel, - node -> node.getEntity())); + node -> node.getEntity())); treeWidget.setDropHandler(this.dropHandler); dropHandler.start(CLASS_HIERARCHY); contextMenuPresenterFactory.create(hierarchyModel, - treeWidget, - createClassAction, - deleteClassAction) - .install(); + treeWidget, + createClassAction, + deleteClassAction) + .install(); tagVisibilityPresenter.start(filterView, treeWidget); setSelectionInTree(getSelectedEntity()); @@ -217,16 +217,16 @@ private void setPreferredDisplayLanguage(@Nonnull DisplayNameSettings lang) { private Optional getFirstSelectedClass() { return treeWidget.getFirstSelectedKey() - .filter(sel -> sel instanceof OWLClass) - .map(sel -> (OWLClass) sel); + .filter(sel -> sel instanceof OWLClass) + .map(sel -> (OWLClass) sel); } private void transmitSelectionFromTree(SelectionChangeEvent event) { actionStatePresenter.setSelectionPresent(!treeWidget.getSelectedKeys().isEmpty()); - if(!treeWidget.isAttached()) { + if (!treeWidget.isAttached()) { return; } - if(settingSelectionInTree) { + if (settingSelectionInTree) { return; } try { @@ -243,8 +243,8 @@ private void transmitSelectionFromTree(SelectionChangeEvent event) { private void handleCreateSubClasses() { createEntityPresenter.createEntities(CLASS, - getFirstSelectedClass(), - CreateEntitiesInHierarchyHandler.get(treeWidget) + getFirstSelectedClass(), + CreateEntitiesInHierarchyHandler.get(treeWidget) ); } @@ -263,7 +263,7 @@ private void handleSearch() { private void handleIcdSearch() { searchIcdModal.setEntityTypes(CLASS); - searchIcdModal.setHierarchySelectedOption(getSelectedEntity()); + searchIcdModal.setHierarchySelectedOptions(treeWidget.getFirstSelectedUserObject()); searchIcdModal.showModal(); } @@ -275,7 +275,7 @@ private void setSelectionInTree(Optional selection) { if (transmittingSelectionFromTree) { return; } - if(treeWidget.getSelectedKeys().contains(selection.orElse(null))) { + if (treeWidget.getSelectedKeys().contains(selection.orElse(null))) { return; } try { diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java index 9e6b60fd77..87820f8f93 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java @@ -6,8 +6,8 @@ import edu.stanford.bmir.protege.web.client.library.modal.ModalManager; import edu.stanford.bmir.protege.web.client.library.modal.ModalPresenter; import edu.stanford.bmir.protege.web.client.selection.SelectionModel; +import edu.stanford.bmir.protege.web.shared.entity.EntityNode; import org.semanticweb.owlapi.model.EntityType; -import org.semanticweb.owlapi.model.OWLEntity; import javax.annotation.Nonnull; import javax.inject.Inject; @@ -54,7 +54,8 @@ public void setEntityTypes(EntityType... entityTypes) { } } - public void setHierarchySelectedOption(Optional selectedOption) { + public void setHierarchySelectedOptions(Optional selectedOption) { + searchIcdPresenter.setSubTreeFilter(selectedOption); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java index bc05b1814d..9940434b8f 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java @@ -5,6 +5,7 @@ import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; import edu.stanford.bmir.protege.web.shared.DataFactory; +import edu.stanford.bmir.protege.web.shared.entity.EntityNode; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import org.semanticweb.owlapi.model.EntityType; import org.semanticweb.owlapi.model.OWLEntity; @@ -54,7 +55,8 @@ public void start() { view.setAcceptKeyHandler(this::handleAcceptKey); } - public void setSubTreeFilter(Optional selectedOption) { + public void setSubTreeFilter(Optional selectedOption) { + selectedOption.ifPresent((selectedOptPres) -> this.view.setSubtreeFilterText(selectedOptPres)); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java index 71d53e4d25..257b3dcfe3 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java @@ -5,10 +5,9 @@ import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.progress.HasBusy; import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; -import org.semanticweb.owlapi.model.OWLEntity; +import edu.stanford.bmir.protege.web.shared.entity.EntityNode; import javax.annotation.Nonnull; -import java.util.Optional; /** * Matthew Horridge @@ -24,5 +23,5 @@ public interface SearchIcdView extends HasBusy, IsWidget, HasInitialFocusable { String getSelectedURI(); - public void setSubtreeFilterText(OWLEntity icdSearchFilter); + public void setSubtreeFilterText(EntityNode icdSearchFilter); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java index ff90d34393..e4bb6b11c0 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java @@ -16,7 +16,7 @@ import edu.stanford.bmir.protege.web.client.library.text.PlaceholderTextBox; import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; -import org.semanticweb.owlapi.model.OWLEntity; +import edu.stanford.bmir.protege.web.shared.entity.EntityNode; import javax.annotation.Nonnull; import javax.inject.Inject; @@ -70,7 +70,7 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { private final String FILTER_CHECKBOX_LABEL_TEXT = "Search only in selected subtree"; - private OWLEntity selectedSubtreeInHierarchy; + private EntityNode selectedSubtreeInHierarchy; private SearchIcdResultChosenHandler searchResultChosenHandler = result -> { @@ -100,10 +100,10 @@ public SearchIcdViewImpl() { } private void filterSubtreeCheckboxHandler(ValueChangeEvent event) { - if(event.getValue()){ - filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT +": "+selectedSubtreeInHierarchy.getClass().getName()); - setSubtreeFilter(selectedSubtreeInHierarchy.toStringID()); - }else { + if (event.getValue()) { + filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT + ": " + selectedSubtreeInHierarchy.getBrowserText()); + setSubtreeFilter(selectedSubtreeInHierarchy.getEntity().toStringID()); + } else { filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT); setSubtreeFilter(TOP_LEVEL_SUBTREE_FILTER); } @@ -204,7 +204,7 @@ private native void setJsniSubtreeFilter(String icdSearchFilter) /*-{ $wnd.console.log("icdSearchFilter: " + icdSearchFilter); }-*/; - public void setSubtreeFilterText(OWLEntity icdEntitySubtree) { + public void setSubtreeFilterText(EntityNode icdEntitySubtree) { selectedSubtreeInHierarchy = icdEntitySubtree; } @@ -217,7 +217,6 @@ private void setSubtreeFilter(String subtreeFilter) { } - public native void bind(String iNo) /*-{ $wnd.ECT.Handler.bind(iNo); }-*/; @@ -274,8 +273,8 @@ private void clearLastSelection() { */ private Optional findSelectedElementForTargetElement(elemental.dom.Element eventTarget) { elemental.dom.Element element = eventTarget; - while(element != null) { - if(element.hasAttribute(TARGET_ELEMENT_ATTRIBUTE_NAME)) { + while (element != null) { + if (element.hasAttribute(TARGET_ELEMENT_ATTRIBUTE_NAME)) { return Optional.of(element); } element = element.getParentElement(); From e1e65819de3ccbf41c21f56a7bd8467ca3a1d7b2 Mon Sep 17 00:00:00 2001 From: Gheorghe Soimu Date: Tue, 9 Apr 2024 14:22:12 +0300 Subject: [PATCH 13/24] finished icd search --- .../client/inject/ClientProjectModule.java | 214 +++++++++++++++--- .../web/client/search/SearchPresenter.java | 62 +++-- .../protege/web/client/search/SearchView.java | 2 + .../web/client/search/SearchViewImpl.java | 31 ++- .../web/client/searchIcd/SearchIcdModal.java | 1 - .../client/searchIcd/SearchIcdPresenter.java | 31 +-- .../web/client/searchIcd/SearchIcdView.java | 12 +- .../client/searchIcd/SearchIcdViewImpl.java | 66 +++--- .../client/searchIcd/SearchInputManager.java | 8 + .../searchIcd/SearchInputManagerImpl.java | 37 +++ 10 files changed, 342 insertions(+), 122 deletions(-) create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManager.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManagerImpl.java diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientProjectModule.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientProjectModule.java index ba1ea56fc0..28ff000949 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientProjectModule.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/inject/ClientProjectModule.java @@ -4,10 +4,35 @@ import com.google.gwt.storage.client.Storage; import dagger.Module; import dagger.Provides; -import edu.stanford.bmir.protege.web.client.bulkop.*; +import edu.stanford.bmir.protege.web.client.bulkop.AnnotationSimpleMatchingCriteriaView; +import edu.stanford.bmir.protege.web.client.bulkop.AnnotationSimpleMatchingCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.bulkop.BulkEditOperationViewContainer; +import edu.stanford.bmir.protege.web.client.bulkop.BulkEditOperationViewContainerImpl; +import edu.stanford.bmir.protege.web.client.bulkop.CommitMessageInputView; +import edu.stanford.bmir.protege.web.client.bulkop.CommitMessageInputViewImpl; +import edu.stanford.bmir.protege.web.client.bulkop.EditAnnotationsView; +import edu.stanford.bmir.protege.web.client.bulkop.EditAnnotationsViewImpl; +import edu.stanford.bmir.protege.web.client.bulkop.MoveToParentView; +import edu.stanford.bmir.protege.web.client.bulkop.MoveToParentViewImpl; +import edu.stanford.bmir.protege.web.client.bulkop.SetAnnotationValueView; +import edu.stanford.bmir.protege.web.client.bulkop.SetAnnotationValueViewImpl; import edu.stanford.bmir.protege.web.client.change.ChangeListView; import edu.stanford.bmir.protege.web.client.change.ChangeListViewImpl; -import edu.stanford.bmir.protege.web.client.crud.*; +import edu.stanford.bmir.protege.web.client.crud.ConditionalIriPrefixPresenter; +import edu.stanford.bmir.protege.web.client.crud.ConditionalIriPrefixView; +import edu.stanford.bmir.protege.web.client.crud.ConditionalIriPrefixViewImpl; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitGeneratedAnnotationsSettingsView; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitGeneratedAnnotationsSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitPrefixSettingsView; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitPrefixSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitSettingsView; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitSuffixSettingsView; +import edu.stanford.bmir.protege.web.client.crud.EntityCrudKitSuffixSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.crud.GeneratedAnnotationDescriptorView; +import edu.stanford.bmir.protege.web.client.crud.GeneratedAnnotationDescriptorViewImpl; +import edu.stanford.bmir.protege.web.client.crud.IncrementingPatternDescriptorView; +import edu.stanford.bmir.protege.web.client.crud.IncrementingPatternDescriptorViewImpl; import edu.stanford.bmir.protege.web.client.crud.obo.OboIdSuffixSettingsView; import edu.stanford.bmir.protege.web.client.crud.obo.OboIdSuffixSettingsViewImpl; import edu.stanford.bmir.protege.web.client.crud.obo.UserIdRangeEditor; @@ -18,40 +43,168 @@ import edu.stanford.bmir.protege.web.client.crud.uuid.UuidSuffixSettingsView; import edu.stanford.bmir.protege.web.client.editor.EditorManagerSelector; import edu.stanford.bmir.protege.web.client.editor.EntityManagerSelectorImpl; -import edu.stanford.bmir.protege.web.client.entity.*; +import edu.stanford.bmir.protege.web.client.entity.CreateEntitiesDialogViewImpl; +import edu.stanford.bmir.protege.web.client.entity.CreateEntityDialogView; +import edu.stanford.bmir.protege.web.client.entity.DeprecateEntityView; +import edu.stanford.bmir.protege.web.client.entity.DeprecateEntityViewImpl; +import edu.stanford.bmir.protege.web.client.entity.MergeEntitiesView; +import edu.stanford.bmir.protege.web.client.entity.MergeEntitiesViewImpl; +import edu.stanford.bmir.protege.web.client.entity.SimilarEntitiesView; +import edu.stanford.bmir.protege.web.client.entity.SimilarEntitiesViewImpl; import edu.stanford.bmir.protege.web.client.form.*; import edu.stanford.bmir.protege.web.client.form.input.CheckBoxView; import edu.stanford.bmir.protege.web.client.form.input.CheckBoxViewImpl; import edu.stanford.bmir.protege.web.client.frame.ManchesterSyntaxFrameEditor; import edu.stanford.bmir.protege.web.client.frame.ManchesterSyntaxFrameEditorImpl; -import edu.stanford.bmir.protege.web.client.hierarchy.*; +import edu.stanford.bmir.protege.web.client.hierarchy.HierarchyFieldView; +import edu.stanford.bmir.protege.web.client.hierarchy.HierarchyFieldViewImpl; +import edu.stanford.bmir.protege.web.client.hierarchy.HierarchyPopupView; +import edu.stanford.bmir.protege.web.client.hierarchy.HierarchyPopupViewImpl; +import edu.stanford.bmir.protege.web.client.hierarchy.PropertyHierarchyPortletView; +import edu.stanford.bmir.protege.web.client.hierarchy.PropertyHierarchyPortletViewImpl; import edu.stanford.bmir.protege.web.client.individualslist.IndividualsListView; import edu.stanford.bmir.protege.web.client.individualslist.IndividualsListViewImpl; -import edu.stanford.bmir.protege.web.client.lang.*; -import edu.stanford.bmir.protege.web.client.library.tokenfield.*; +import edu.stanford.bmir.protege.web.client.lang.DefaultDictionaryLanguageView; +import edu.stanford.bmir.protege.web.client.lang.DefaultDictionaryLanguageViewImpl; +import edu.stanford.bmir.protege.web.client.lang.DefaultDisplayNameSettingsView; +import edu.stanford.bmir.protege.web.client.lang.DefaultDisplayNameSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.lang.DefaultLanguageTagView; +import edu.stanford.bmir.protege.web.client.lang.DefaultLanguageTagViewImpl; +import edu.stanford.bmir.protege.web.client.lang.DictionaryLanguageDataView; +import edu.stanford.bmir.protege.web.client.lang.DictionaryLanguageDataViewImpl; +import edu.stanford.bmir.protege.web.client.lang.DisplayNameSettingsTopBarView; +import edu.stanford.bmir.protege.web.client.lang.DisplayNameSettingsTopBarViewImpl; +import edu.stanford.bmir.protege.web.client.lang.DisplayNameSettingsView; +import edu.stanford.bmir.protege.web.client.lang.DisplayNameSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.lang.LangTagFilterView; +import edu.stanford.bmir.protege.web.client.lang.LangTagFilterViewImpl; +import edu.stanford.bmir.protege.web.client.lang.LanguageUsageView; +import edu.stanford.bmir.protege.web.client.lang.LanguageUsageViewImpl; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenFieldPresenter; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenFieldView; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenFieldViewImpl; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenPresenterFactory; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenView; +import edu.stanford.bmir.protege.web.client.library.tokenfield.TokenViewImpl; import edu.stanford.bmir.protege.web.client.list.EntityNodeListPopupView; import edu.stanford.bmir.protege.web.client.list.EntityNodeListPopupViewImpl; -import edu.stanford.bmir.protege.web.client.match.*; +import edu.stanford.bmir.protege.web.client.match.AnnotationCriteriaView; +import edu.stanford.bmir.protege.web.client.match.AnnotationCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.AnnotationPropertyCriteriaView; +import edu.stanford.bmir.protege.web.client.match.AnnotationPropertyCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.AnnotationPropertyPairView; +import edu.stanford.bmir.protege.web.client.match.AnnotationPropertyPairViewImpl; +import edu.stanford.bmir.protege.web.client.match.BlankCriteriaView; +import edu.stanford.bmir.protege.web.client.match.BlankCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.ClassSelectorView; +import edu.stanford.bmir.protege.web.client.match.ClassSelectorViewImpl; +import edu.stanford.bmir.protege.web.client.match.CriteriaListCriteriaViewContainer; +import edu.stanford.bmir.protege.web.client.match.CriteriaListView; +import edu.stanford.bmir.protege.web.client.match.CriteriaListViewImpl; +import edu.stanford.bmir.protege.web.client.match.CriteriaListViewViewContainerImpl; +import edu.stanford.bmir.protege.web.client.match.DateView; +import edu.stanford.bmir.protege.web.client.match.DateViewImpl; +import edu.stanford.bmir.protege.web.client.match.EntityIsCriteriaView; +import edu.stanford.bmir.protege.web.client.match.EntityIsCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.EntityRelationshipCriteriaView; +import edu.stanford.bmir.protege.web.client.match.EntityRelationshipCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.EntityTypeCriteriaView; +import edu.stanford.bmir.protege.web.client.match.EntityTypeCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.IriEqualsView; +import edu.stanford.bmir.protege.web.client.match.IriEqualsViewImpl; +import edu.stanford.bmir.protege.web.client.match.LangTagMatchesCriteriaView; +import edu.stanford.bmir.protege.web.client.match.LangTagMatchesCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.NumericValueCriteriaView; +import edu.stanford.bmir.protege.web.client.match.NumericValueCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.QueryPortletView; +import edu.stanford.bmir.protege.web.client.match.QueryPortletViewImpl; +import edu.stanford.bmir.protege.web.client.match.RelationValueThatIsEqualToView; +import edu.stanford.bmir.protege.web.client.match.RelationValueThatIsEqualToViewImpl; +import edu.stanford.bmir.protege.web.client.match.RelationshipValueCriteriaView; +import edu.stanford.bmir.protege.web.client.match.RelationshipValueCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.match.SelectableCriteriaTypeView; +import edu.stanford.bmir.protege.web.client.match.SelectableCriteriaTypeViewImpl; +import edu.stanford.bmir.protege.web.client.match.SimpleStringCriteriaView; +import edu.stanford.bmir.protege.web.client.match.SimpleStringCriteriaViewImpl; import edu.stanford.bmir.protege.web.client.ontology.annotations.AnnotationsView; import edu.stanford.bmir.protege.web.client.ontology.annotations.AnnotationsViewImpl; import edu.stanford.bmir.protege.web.client.permissions.LoggedInUserProjectPermissionChecker; import edu.stanford.bmir.protege.web.client.permissions.LoggedInUserProjectPermissionCheckerImpl; -import edu.stanford.bmir.protege.web.client.perspective.*; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveDetailsView; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveDetailsViewImpl; +import edu.stanford.bmir.protege.web.client.perspective.PerspectiveManagerAdminSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.perspective.PerspectivesManagerAdminSettingsView; +import edu.stanford.bmir.protege.web.client.perspective.PerspectivesManagerView; +import edu.stanford.bmir.protege.web.client.perspective.PerspectivesManagerViewImpl; +import edu.stanford.bmir.protege.web.client.perspective.ProjectPerspectivesService; +import edu.stanford.bmir.protege.web.client.perspective.ProjectPerspectivesServiceImpl; import edu.stanford.bmir.protege.web.client.portlet.PortletFactory; import edu.stanford.bmir.protege.web.client.portlet.PortletFactoryGenerated; import edu.stanford.bmir.protege.web.client.portlet.PortletModulesGenerated; -import edu.stanford.bmir.protege.web.client.project.*; -import edu.stanford.bmir.protege.web.client.projectsettings.*; +import edu.stanford.bmir.protege.web.client.project.ProjectDetailsView; +import edu.stanford.bmir.protege.web.client.project.ProjectDetailsViewImpl; +import edu.stanford.bmir.protege.web.client.project.ShowProjectDetailsHandler; +import edu.stanford.bmir.protege.web.client.project.ShowProjectDetailsHandlerImpl; +import edu.stanford.bmir.protege.web.client.project.UploadAndMergeAdditionsHandler; +import edu.stanford.bmir.protege.web.client.project.UploadAndMergeAdditionsHandlerImpl; +import edu.stanford.bmir.protege.web.client.project.UploadAndMergeHandler; +import edu.stanford.bmir.protege.web.client.project.UploadAndMergeHandlerImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.EntityDeprecationSettingsView; +import edu.stanford.bmir.protege.web.client.projectsettings.EntityDeprecationSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.GeneralSettingsView; +import edu.stanford.bmir.protege.web.client.projectsettings.GeneralSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.ProjectSettingsHeaderSectionView; +import edu.stanford.bmir.protege.web.client.projectsettings.ProjectSettingsHeaderSectionViewImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.ProjectSettingsImporterView; +import edu.stanford.bmir.protege.web.client.projectsettings.ProjectSettingsImporterViewImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.SlackWebhookSettingsView; +import edu.stanford.bmir.protege.web.client.projectsettings.SlackWebhookSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.projectsettings.WebhookSettingsView; +import edu.stanford.bmir.protege.web.client.projectsettings.WebhookSettingsViewImpl; import edu.stanford.bmir.protege.web.client.renderer.AnnotationPropertyIriRenderer; import edu.stanford.bmir.protege.web.client.renderer.AnnotationPropertyIriRendererImpl; import edu.stanford.bmir.protege.web.client.renderer.ClassIriRenderer; import edu.stanford.bmir.protege.web.client.renderer.ClassIriRendererImpl; -import edu.stanford.bmir.protege.web.client.search.*; +import edu.stanford.bmir.protege.web.client.search.EntitySearchFilterTokenFieldView; +import edu.stanford.bmir.protege.web.client.search.EntitySearchFilterTokenFieldViewImpl; +import edu.stanford.bmir.protege.web.client.search.EntitySearchFilterView; +import edu.stanford.bmir.protege.web.client.search.EntitySearchFilterViewImpl; +import edu.stanford.bmir.protege.web.client.search.EntitySearchResultView; +import edu.stanford.bmir.protege.web.client.search.EntitySearchResultViewImpl; +import edu.stanford.bmir.protege.web.client.search.SearchResultMatchView; +import edu.stanford.bmir.protege.web.client.search.SearchResultMatchViewImpl; +import edu.stanford.bmir.protege.web.client.search.SearchResultsListView; +import edu.stanford.bmir.protege.web.client.search.SearchResultsListViewImpl; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchInputManager; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchInputManagerImpl; import edu.stanford.bmir.protege.web.client.sharing.SharingSettingsView; import edu.stanford.bmir.protege.web.client.sharing.SharingSettingsViewImpl; import edu.stanford.bmir.protege.web.client.shortform.ShortFormModule; -import edu.stanford.bmir.protege.web.client.tag.*; -import edu.stanford.bmir.protege.web.client.viz.*; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaListView; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaListViewImpl; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaView; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaViewContainer; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaViewContainerImpl; +import edu.stanford.bmir.protege.web.client.tag.TagCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.viz.BlankEdgeCriteriaPresenter; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterListItemView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterListItemViewImpl; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterListView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterListViewImpl; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterTokenView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterTokenViewImpl; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphFilterViewImpl; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphSettingsView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphSettingsViewImpl; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphView; +import edu.stanford.bmir.protege.web.client.viz.EntityGraphViewImpl; +import edu.stanford.bmir.protege.web.client.viz.LargeGraphMessageView; +import edu.stanford.bmir.protege.web.client.viz.LargeGraphMessageViewImpl; +import edu.stanford.bmir.protege.web.client.viz.RelationshipEdgePropertyEqualsCriteriaView; +import edu.stanford.bmir.protege.web.client.viz.RelationshipEdgePropertyEqualsCriteriaViewImpl; +import edu.stanford.bmir.protege.web.client.viz.VizView; +import edu.stanford.bmir.protege.web.client.viz.VizViewImpl; import edu.stanford.bmir.protege.web.client.watches.WatchView; import edu.stanford.bmir.protege.web.client.watches.WatchViewImpl; import edu.stanford.bmir.protege.web.shared.crud.ConditionalIriPrefix; @@ -60,7 +213,11 @@ import edu.stanford.bmir.protege.web.shared.form.field.GridColumnDescriptor; import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton; import edu.stanford.bmir.protege.web.shared.project.ProjectId; -import edu.stanford.bmir.protege.web.shared.viz.*; +import edu.stanford.bmir.protege.web.shared.viz.AnyEdgeCriteria; +import edu.stanford.bmir.protege.web.shared.viz.AnyInstanceOfEdgeCriteria; +import edu.stanford.bmir.protege.web.shared.viz.AnyRelationshipEdgeCriteria; +import edu.stanford.bmir.protege.web.shared.viz.AnySubClassOfEdgeCriteria; +import edu.stanford.bmir.protege.web.shared.viz.FilterName; import edu.stanford.protege.gwt.graphtree.client.MultiSelectionModel; import edu.stanford.protege.gwt.graphtree.client.TreeWidget; import org.semanticweb.owlapi.model.OWLEntity; @@ -582,7 +739,7 @@ GridRowView provideGridRowView(GridRowViewImpl impl) { } @Provides - TokenFieldView provideTokenFieldView(TokenFieldViewImpl impl) { + TokenFieldView provideTokenFieldView(TokenFieldViewImpl impl) { return impl; } @@ -613,13 +770,13 @@ ImmutableList provideFormFieldDescriptorP SubFormControlDescriptorPresenterFactory subFormControlDescriptorPresenterFactory, GridControlDescriptorPresenterFactory gridControlDescriptorPresenterFactory) { return ImmutableList.of(textFieldDescriptorEditorPresenterFactory, - numberFieldDescriptorPresenterFactory, - choiceFieldDescriptorPresenterFactory, - multiChoiceControlDescriptorPresenterFactory, - imageDescriptorPresenterFactory, - entityNameFieldDescriptorPresenterFactory, - subFormControlDescriptorPresenterFactory, - gridControlDescriptorPresenterFactory); + numberFieldDescriptorPresenterFactory, + choiceFieldDescriptorPresenterFactory, + multiChoiceControlDescriptorPresenterFactory, + imageDescriptorPresenterFactory, + entityNameFieldDescriptorPresenterFactory, + subFormControlDescriptorPresenterFactory, + gridControlDescriptorPresenterFactory); } @Provides @@ -651,7 +808,7 @@ GridHeaderView provideGridHeaderView(GridHeaderViewImpl impl) { GridHeaderCellView provideGridColumnHeaderView(GridHeaderCellViewImpl view) { return view; } - + @Provides EntityGraphFilterTokenView provideEntityGraphFilterTokenView(EntityGraphFilterTokenViewImpl impl) { return impl; @@ -748,9 +905,9 @@ ObjectListPresenter getConditionalIriPrefixesListPresenter Provider objectViewHolderProvider, Provider defaultObjectProvider) { return new ObjectListPresenter<>(objectListView, - objectListPresenterProvider, - objectViewHolderProvider, - defaultObjectProvider); + objectListPresenterProvider, + objectViewHolderProvider, + defaultObjectProvider); } @Provides @@ -943,6 +1100,11 @@ IncrementingPatternDescriptorView provideIncrementingPatternDescriptorView(Incre EntityDeprecationSettingsView provideEntityDeprecationSettingsView(EntityDeprecationSettingsViewImpl impl) { return impl; } + + @Provides + SearchInputManager provideSearchInputManager(SearchInputManagerImpl impl) { + return impl; + } } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchPresenter.java index 77050ba318..c233074d18 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchPresenter.java @@ -8,13 +8,18 @@ import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; +import edu.stanford.bmir.protege.web.client.searchIcd.SearchInputManager; import edu.stanford.bmir.protege.web.shared.entity.OWLEntityData; import edu.stanford.bmir.protege.web.shared.lang.GetProjectLangTagsAction; import edu.stanford.bmir.protege.web.shared.lang.GetProjectLangTagsResult; import edu.stanford.bmir.protege.web.shared.lang.LangTagFilter; import edu.stanford.bmir.protege.web.shared.pagination.PageRequest; import edu.stanford.bmir.protege.web.shared.project.ProjectId; -import edu.stanford.bmir.protege.web.shared.search.*; +import edu.stanford.bmir.protege.web.shared.search.EntitySearchFilter; +import edu.stanford.bmir.protege.web.shared.search.GetSearchSettingsAction; +import edu.stanford.bmir.protege.web.shared.search.GetSearchSettingsResult; +import edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchAction; +import edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchResult; import org.semanticweb.owlapi.model.EntityType; import javax.annotation.Nonnull; @@ -69,7 +74,11 @@ public void run() { private SearchResultChosenHandler searchResultChosenHandler; - private AcceptKeyHandler acceptKeyHandler = () -> {}; + private AcceptKeyHandler acceptKeyHandler = () -> { + }; + + + private final SearchInputManager searchInputManager; @Inject public SearchPresenter(@Nonnull ProjectId projectId, @@ -78,34 +87,36 @@ public SearchPresenter(@Nonnull ProjectId projectId, @Nonnull DispatchServiceManager dispatchServiceManager, @Nonnull EntitySearchResultPresenterFactory resultPresenterFactory, @Nonnull EntitySearchFilterTokenFieldPresenter entitySearchFilterTokenFieldPresenter, - @Nonnull LangTagFilterPresenter langTagFilterPresenter) { + @Nonnull LangTagFilterPresenter langTagFilterPresenter, + @Nonnull SearchInputManager searchInputManager) { this.projectId = projectId; this.view = view; this.searchResultsPresenter = searchResultsPresenter; this.dispatchServiceManager = dispatchServiceManager; this.entitySearchFilterTokenFieldPresenter = checkNotNull(entitySearchFilterTokenFieldPresenter); this.langTagFilterPresenter = langTagFilterPresenter; + this.searchInputManager = searchInputManager; } public void start() { view.setSearchStringChangedHandler(() -> { + setSearchInputText(view.getSearchString()); searchResultsPresenter.setPageNumber(1); restartSearchTimer(); }); + view.setSearchString(searchInputManager.getSearchInputText()); view.setIncrementSelectionHandler(searchResultsPresenter::incrementSelection); view.setDecrementSelectionHandler(searchResultsPresenter::decrementSelection); view.setAcceptKeyHandler(this::handleAcceptKey); - searchResultsPresenter.setPageNumberChangedHandler(pageNumber -> { - restartPageChangeTimer(); - }); + searchResultsPresenter.setPageNumberChangedHandler(pageNumber -> restartPageChangeTimer()); searchResultsPresenter.start(view.getSearchResultsContainer()); dispatchServiceManager.beginBatch(); dispatchServiceManager.execute(GetProjectLangTagsAction.create(projectId), - this::handleProjectLangTags); + this::handleProjectLangTags); entitySearchFilterTokenFieldPresenter.start(view.getSearchFilterContainer()); entitySearchFilterTokenFieldPresenter.setSearchFiltersChangedHandler(this::performSearch); dispatchServiceManager.execute(GetSearchSettingsAction.create(projectId), - this::handleSearchSettings); + this::handleSearchSettings); dispatchServiceManager.executeCurrentBatch(); entitySearchFilterTokenFieldPresenter.setPlaceholder(""); langTagFilterPresenter.setPlaceholder(""); @@ -126,7 +137,7 @@ private void handleSearchSettings(GetSearchSettingsResult result) { private void handleProjectLangTags(GetProjectLangTagsResult result) { boolean langTagsPresent = !result.getLangTags().isEmpty(); view.setLangTagFilterVisible(langTagsPresent); - if(langTagsPresent) { + if (langTagsPresent) { langTagFilterPresenter.start(view.getLangTagFilterContainer()); langTagFilterPresenter.setLangTagFilterChangedHandler(this::handleLangTagFilterChanged); } @@ -160,13 +171,13 @@ public Optional getInitialFocusable() { return view.getInitialFocusable(); } - public void setEntityTypes(EntityType ... entityTypes) { + public void setEntityTypes(EntityType... entityTypes) { this.entityTypes.clear(); this.entityTypes.addAll(Arrays.asList(entityTypes)); } private void performSearch() { - if(view.getSearchString().length() < 1) { + if (view.getSearchString().length() < 1) { searchResultsPresenter.clearSearchResults(); return; } @@ -174,17 +185,17 @@ private void performSearch() { int pageNumber = searchResultsPresenter.getPageNumber(); ImmutableList searchFilters = entitySearchFilterTokenFieldPresenter.getSearchFilters(); dispatchServiceManager.execute(PerformEntitySearchAction.create(projectId, - view.getSearchString(), - entityTypes, - langTagFilter, - searchFilters, - PageRequest.requestPage(pageNumber)), - view, - this::displaySearchResult); + view.getSearchString(), + entityTypes, + langTagFilter, + searchFilters, + PageRequest.requestPage(pageNumber)), + view, + this::displaySearchResult); } private void displaySearchResult(PerformEntitySearchResult result) { - if(!view.getSearchString().equals(result.getSearchString())) { + if (!view.getSearchString().equals(result.getSearchString())) { return; } searchResultsPresenter.displaySearchResult(result.getResults()); @@ -194,4 +205,17 @@ private void displaySearchResult(PerformEntitySearchResult result) { public Optional getSelectedSearchResult() { return searchResultsPresenter.getSelectedSearchResult(); } + + + private void setSearchInputText(String text) { + if (text == null) { + return; + } + + if (this.searchInputManager.getSearchInputText().equals(text)) { + return; + } + + this.searchInputManager.setSearchInputText(text); + } } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchView.java index c1ec9576f4..b4e33f74b0 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchView.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchView.java @@ -31,6 +31,8 @@ interface DecrementSelectionHandler { String getSearchString(); + void setSearchString(String text); + void setSearchStringChangedHandler(SearchStringChangedHandler handler); void setLangTagFilterVisible(boolean visible); diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchViewImpl.java index b1ea94421b..334adb1325 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/search/SearchViewImpl.java @@ -1,13 +1,13 @@ package edu.stanford.bmir.protege.web.client.search; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.AcceptsOneWidget; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTMLPanel; @@ -54,16 +54,20 @@ public class SearchViewImpl extends Composite implements SearchView { HTMLPanel langTagsFilterPanel; @Nonnull - private IncrementSelectionHandler incrementSelectionHandler = () -> {}; + private IncrementSelectionHandler incrementSelectionHandler = () -> { + }; @Nonnull - private DecrementSelectionHandler decrementSelectionHandler = () -> {}; + private DecrementSelectionHandler decrementSelectionHandler = () -> { + }; @Nonnull - private SearchStringChangedHandler searchStringChangedHandler = () -> {}; + private SearchStringChangedHandler searchStringChangedHandler = () -> { + }; @Nonnull - private AcceptKeyHandler acceptKeyHandler = () -> {}; + private AcceptKeyHandler acceptKeyHandler = () -> { + }; private String previousSearchString = ""; @@ -130,16 +134,13 @@ protected void handleSearchStringFieldKeyDown(KeyDownEvent event) { if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_DOWN) { event.preventDefault(); incrementSelectionHandler.handleIncrementSelection(); - } - else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_UP) { + } else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_UP) { event.preventDefault(); decrementSelectionHandler.handleDecrementSelection(); - } - else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { + } else if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { event.preventDefault(); acceptKeyHandler.handleAcceptKey(); - } - else { + } else { performSearchIfChanged(); } } @@ -159,6 +160,14 @@ public String getSearchString() { return searchStringField.getText(); } + @Override + public void setSearchString(String text) { + if (text != null && !text.isEmpty()) { + this.searchStringField.setValue(text); + this.searchStringChangedHandler.handleSearchStringChanged(); + } + } + @Override public void setSearchStringChangedHandler(SearchStringChangedHandler handler) { this.searchStringChangedHandler = handler; diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java index 87820f8f93..8d630b3ed2 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdModal.java @@ -70,7 +70,6 @@ public void showModal() { selectChosenEntity(); }); searchIcdPresenter.start(); - searchIcdPresenter.setAcceptKeyHandler(modalPresenter::accept); searchIcdPresenter.setSearchResultChosenHandler(result -> modalPresenter.accept()); modalManager.showModal(modalPresenter); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java index 9940434b8f..bc030542ee 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdPresenter.java @@ -1,12 +1,10 @@ package edu.stanford.bmir.protege.web.client.searchIcd; import com.google.gwt.user.client.ui.IsWidget; -import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; import edu.stanford.bmir.protege.web.shared.DataFactory; import edu.stanford.bmir.protege.web.shared.entity.EntityNode; -import edu.stanford.bmir.protege.web.shared.project.ProjectId; import org.semanticweb.owlapi.model.EntityType; import org.semanticweb.owlapi.model.OWLEntity; @@ -27,12 +25,6 @@ */ public class SearchIcdPresenter implements HasInitialFocusable { - private static final int SEARCH_DELAY_MILLIS = 900; - - private static final int PAGE_CHANGE_DELAY_MILLIS = 250; - - private final ProjectId projectId; - private final SearchIcdView view; private final Set> entityTypes = new HashSet<>(); @@ -40,32 +32,25 @@ public class SearchIcdPresenter implements HasInitialFocusable { private SearchIcdResultChosenHandler searchResultChosenHandler; - private AcceptKeyHandler acceptKeyHandler = () -> { - }; + private final SearchInputManager searchInputManager; @Inject - public SearchIcdPresenter(@Nonnull ProjectId projectId, - @Nonnull SearchIcdView view) { - this.projectId = projectId; + public SearchIcdPresenter(@Nonnull SearchIcdView view, + @Nonnull SearchInputManager searchInputManager) { this.view = view; + this.searchInputManager = searchInputManager; } public void start() { - view.setAcceptKeyHandler(this::handleAcceptKey); - } + view.setInputFieldValue(searchInputManager.getSearchInputText()); - public void setSubTreeFilter(Optional selectedOption) { - - selectedOption.ifPresent((selectedOptPres) -> this.view.setSubtreeFilterText(selectedOptPres)); + view.setSearchStringChangedHandler(() -> searchInputManager.setSearchInputText(view.getInputFieldValue())); } - public void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler) { - this.acceptKeyHandler = checkNotNull(acceptKeyHandler); - } + public void setSubTreeFilter(Optional selectedOption) { - private void handleAcceptKey() { - this.acceptKeyHandler.handleAcceptKey(); + selectedOption.ifPresent(this.view::setSubtreeFilterText); } public void setSearchResultChosenHandler(SearchIcdResultChosenHandler handler) { diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java index 257b3dcfe3..d4c29e94f9 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdView.java @@ -1,14 +1,11 @@ package edu.stanford.bmir.protege.web.client.searchIcd; import com.google.gwt.user.client.ui.IsWidget; -import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; import edu.stanford.bmir.protege.web.client.library.dlg.HasInitialFocusable; import edu.stanford.bmir.protege.web.client.progress.HasBusy; import edu.stanford.bmir.protege.web.client.search.SearchStringChangedHandler; import edu.stanford.bmir.protege.web.shared.entity.EntityNode; -import javax.annotation.Nonnull; - /** * Matthew Horridge * Stanford Center for Biomedical Informatics Research @@ -17,11 +14,14 @@ public interface SearchIcdView extends HasBusy, IsWidget, HasInitialFocusable { - void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler); - void setSearchStringChangedHandler(SearchStringChangedHandler handler); String getSelectedURI(); - public void setSubtreeFilterText(EntityNode icdSearchFilter); + void setSubtreeFilterText(EntityNode icdSearchFilter); + + + String getInputFieldValue(); + + void setInputFieldValue(String newValue); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java index e4bb6b11c0..bedf9d28c1 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchIcdViewImpl.java @@ -1,17 +1,16 @@ package edu.stanford.bmir.protege.web.client.searchIcd; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.EventTarget; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTMLPanel; -import edu.stanford.bmir.protege.web.client.library.dlg.AcceptKeyHandler; import edu.stanford.bmir.protege.web.client.library.dlg.HasRequestFocus; import edu.stanford.bmir.protege.web.client.library.text.PlaceholderTextBox; import edu.stanford.bmir.protege.web.client.progress.BusyViewImpl; @@ -21,9 +20,6 @@ import javax.annotation.Nonnull; import javax.inject.Inject; import java.util.Optional; -import java.util.logging.Logger; - -import static com.google.common.base.Preconditions.checkNotNull; /** * Matthew Horridge @@ -34,8 +30,6 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { - private final static java.util.logging.Logger logger = Logger.getLogger("SearchIcdViewImpl"); - protected static final String SELECTED_ENTITY_STYLE = "selectedEntity"; protected static final String TARGET_ELEMENT_ATTRIBUTE_NAME = "data-entityindex"; @@ -49,10 +43,6 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { private SearchStringChangedHandler searchStringChangedHandler = () -> { }; - @Nonnull - private AcceptKeyHandler acceptKeyHandler = () -> { - }; - /* * Member variable for DOM element that holds the selection. This should be * set with #setSelectedElement(Optional) or #clearLastSelection(). @@ -78,6 +68,7 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { private String selectedURI = ""; + public static final String TOP_LEVEL_SUBTREE_FILTER = "http://id.who.int/icd/entity/448895267," // ICD Entity + "http://id.who.int/icd/entity/1405434703," // ICF Entity @@ -86,6 +77,7 @@ public class SearchIcdViewImpl extends Composite implements SearchIcdView { @Inject public SearchIcdViewImpl() { + initWidget(ourUiBinder.createAndBindUi(this)); Element element = searchStringField.getElement(); element.setPropertyString("autocomplete", "off"); @@ -95,6 +87,8 @@ public SearchIcdViewImpl() { element.setAttribute("data-ctw-ino", "1"); ectElement.getElement().setAttribute("data-ctw-ino", "1"); + searchStringField.addValueChangeHandler(event -> searchStringChangedHandler.handleSearchStringChanged()); + filterSubtreeCheckbox.setText(FILTER_CHECKBOX_LABEL_TEXT); filterSubtreeCheckbox.addValueChangeHandler(this::filterSubtreeCheckboxHandler); } @@ -108,7 +102,7 @@ private void filterSubtreeCheckboxHandler(ValueChangeEvent event) { setSubtreeFilter(TOP_LEVEL_SUBTREE_FILTER); } - triggerSearch(searchStringField.getText()); + triggerSearch(getInputFieldValue()); } public void setSelection(String selection) { @@ -152,14 +146,10 @@ public native void initEct() /*-{ }-*/; public native void triggerSearch(String query) /*-{ + $wnd.console.log("triggered search for: " + query); $wnd.ECT.Handler.search("1", query); }-*/; - @Override - public void setAcceptKeyHandler(@Nonnull AcceptKeyHandler acceptKeyHandler) { - this.acceptKeyHandler = checkNotNull(acceptKeyHandler); - } - @Override public Optional getInitialFocusable() { return Optional.of(() -> searchStringField.setFocus(true)); @@ -179,26 +169,11 @@ interface SearchViewIcdImplUiBinder extends UiBinder targetElement) { * If no element is currently selected, this method does nothing. */ private void clearLastSelection() { - this.selectedElement.ifPresent(e -> { - e.getClassList().remove(SELECTED_ENTITY_STYLE); - }); + this.selectedElement.ifPresent(e -> e.getClassList().remove(SELECTED_ENTITY_STYLE)); } /** @@ -283,4 +258,23 @@ private Optional findSelectedElementForTargetElement(elem } + @Override + public String getInputFieldValue() { + return searchStringField.getText(); + } + + @Override + public void setInputFieldValue(String newValue) { + this.searchStringField.setValue(newValue); + } + + private void triggerSearchIfTextExistsInInput() { + String textToSearch = getInputFieldValue(); + if (textToSearch == null || textToSearch.isEmpty()) { + return; + } + + triggerSearch(textToSearch); + } + } \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManager.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManager.java new file mode 100644 index 0000000000..d0b3129423 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManager.java @@ -0,0 +1,8 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + +public interface SearchInputManager { + + void setSearchInputText(String text); + + String getSearchInputText(); +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManagerImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManagerImpl.java new file mode 100644 index 0000000000..d08a861fa4 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/searchIcd/SearchInputManagerImpl.java @@ -0,0 +1,37 @@ +package edu.stanford.bmir.protege.web.client.searchIcd; + + +import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton; + +import javax.inject.Inject; + +@ProjectSingleton +public class SearchInputManagerImpl implements SearchInputManager { + + private String searchInputText = ""; + + @Inject + public SearchInputManagerImpl() { + + } + + + public void setSearchInputText(String text) { + if (checkStringHasValue(text)) { + searchInputText = text; + } + } + + public String getSearchInputText() { + if (checkStringHasValue(searchInputText)) { + return searchInputText; + } + + return ""; + } + + + private boolean checkStringHasValue(String text) { + return text != null && !text.isEmpty(); + } +} From 8330b71aa3593e631c2e30a66f6cafc1c1b9feca Mon Sep 17 00:00:00 2001 From: silag Date: Tue, 7 May 2024 18:24:15 +0300 Subject: [PATCH 14/24] increased version. --- .../web/client/project/ProjectPresenter.java | 25 ++++++++--- .../sharing/SharingSettingsPresenter.java | 9 +++- .../src/main/module-dev.gwt.xml | 5 +++ .../src/main/module.gwt.xml | 5 +++ .../impl/DispatchServiceExecutorImpl.java | 6 +++ ...haringSettings_Serialization_TestCase.java | 2 +- .../protege/web/shared/dispatch/Result.java | 3 +- .../web/shared/dispatch/RpcWhiteList.java | 2 + .../dispatch/actions/GetUserInfoAction.java | 11 +++++ .../dispatch/actions/GetUserInfoResult.java | 42 +++++++++++++++++++ .../itemlist/GetUserIdCompletionsAction.java | 2 +- .../itemlist/GetUserIdCompletionsResult.java | 2 +- .../SetProjectSharingSettingsAction.java | 33 ++++++++++----- ...ProjectSharingSettingsAction_TestCase.java | 13 ++++-- 14 files changed, 135 insertions(+), 25 deletions(-) create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoAction.java create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoResult.java diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java index 6df9ff45bd..f0ed431b3f 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java @@ -11,7 +11,9 @@ import edu.stanford.bmir.protege.web.client.progress.BusyView; import edu.stanford.bmir.protege.web.client.tag.ProjectTagsStyleManager; import edu.stanford.bmir.protege.web.client.topbar.TopBarPresenter; +import edu.stanford.bmir.protege.web.client.user.LoggedInUserProvider; import edu.stanford.bmir.protege.web.shared.HasDispose; +import edu.stanford.bmir.protege.web.shared.dispatch.actions.GetUserInfoAction; import edu.stanford.bmir.protege.web.shared.dispatch.actions.TranslateEventListAction; import edu.stanford.bmir.protege.web.shared.event.*; import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton; @@ -59,6 +61,8 @@ public class ProjectPresenter implements HasDispose, HasProjectId { private final LargeNumberOfChangesManager largeNumberOfChangesHandler; + private final LoggedInUserProvider loggedInUserProvider; + @Inject public ProjectPresenter(ProjectId projectId, @@ -72,7 +76,7 @@ public ProjectPresenter(ProjectId projectId, PermissionScreener permissionScreener, WebProtegeEventBus eventBus, ProjectTagsStyleManager projectTagsStyleManager, - LargeNumberOfChangesManager largeNumberOfChangesHandler) { + LargeNumberOfChangesManager largeNumberOfChangesHandler, LoggedInUserProvider loggedInUserProvider) { this.projectId = projectId; this.view = view; this.busyView = busyView; @@ -85,6 +89,7 @@ public ProjectPresenter(ProjectId projectId, this.eventBus = eventBus; this.projectTagsStyleManager = projectTagsStyleManager; this.largeNumberOfChangesHandler = largeNumberOfChangesHandler; + this.loggedInUserProvider = loggedInUserProvider; } @Nonnull @@ -109,7 +114,11 @@ private void displayProject(@Nonnull AcceptsOneWidget container, @Nonnull ProjectViewPlace place) { dispatchServiceManager.execute(new LoadProjectAction(projectId), result -> handleProjectLoaded(container, eventBus, place)); - subscribeToWebsocket(projectId.getId()); + dispatchServiceManager.execute(new GetUserInfoAction(), r -> { + subscribeToWebsocket(projectId.getId(), r.getToken(), this.loggedInUserProvider.getCurrentUserId().getUserName()); + + }); + } private void handleProjectLoaded(@Nonnull AcceptsOneWidget container, @Nonnull EventBus eventBus, @Nonnull ProjectViewPlace place) { @@ -122,6 +131,7 @@ private void handleProjectLoaded(@Nonnull AcceptsOneWidget container, @Nonnull E projectId, largeNumberOfChangesHandler); container.setWidget(view); + dispatchServiceManager.execute(GetProjectTagsAction.create(projectId), r -> projectTagsStyleManager.setProjectTags(r.getTags(), view)); dispatchServiceManager.executeCurrentBatch(); @@ -147,7 +157,7 @@ public void dispatchEventsFromWebsocket(String data) { } /*TODO change the hardcoded broker URL and get it from a config class */ - public native void subscribeToWebsocket(String projectId)/*-{ + public native void subscribeToWebsocket(String projectId, String token, String userId)/*-{ try { var that = this; @@ -156,17 +166,22 @@ public native void subscribeToWebsocket(String projectId)/*-{ debug: function(str) { console.log(str); }, - reconnectDelay: 5000, + reconnectDelay: 30000, heartbeatIncoming: 4000, heartbeatOutgoing: 4000, }); stompClient.onConnect = function(frame) { + var headers = { + 'token': token, + 'userId': userId, + 'Authorization' : 'Bearer ' + token + }; stompClient.subscribe('/topic/project-events/' + projectId, function(message) { that.@edu.stanford.bmir.protege.web.client.project.ProjectPresenter::dispatchEventsFromWebsocket(Ljava/lang/String;)(message.body); - }); + }, headers); }; stompClient.onWebSocketError = function(error) { console.error('Error with websocket', error); diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/sharing/SharingSettingsPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/sharing/SharingSettingsPresenter.java index 7bd0e385a9..106fc8d36a 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/sharing/SharingSettingsPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/sharing/SharingSettingsPresenter.java @@ -13,6 +13,8 @@ import edu.stanford.bmir.protege.web.client.permissions.PermissionManager; import edu.stanford.bmir.protege.web.client.progress.BusyView; import edu.stanford.bmir.protege.web.client.settings.SettingsPresenter; +import edu.stanford.bmir.protege.web.client.uuid.UuidV4Provider; +import edu.stanford.bmir.protege.web.shared.perspective.ChangeRequestId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import edu.stanford.bmir.protege.web.shared.sharing.GetProjectSharingSettingsAction; import edu.stanford.bmir.protege.web.shared.sharing.ProjectSharingSettings; @@ -63,6 +65,9 @@ public class SharingSettingsPresenter implements Presenter { @Nonnull private final ProgressDisplay progressDisplay; + @Nonnull + private UuidV4Provider uuidV4Provider; + @Inject public SharingSettingsPresenter(@Nonnull ProjectId projectId, @Nonnull SharingSettingsView view, @@ -70,6 +75,7 @@ public SharingSettingsPresenter(@Nonnull ProjectId projectId, @Nonnull DispatchServiceManager dispatchServiceManager, @Nonnull PermissionManager permissionManager, @Nonnull PermissionScreener permissionScreener, + @Nonnull UuidV4Provider uuidV4Provider, @Nonnull SettingsPresenter settingsPresenter, @Nonnull Messages messages, @Nonnull DispatchErrorMessageDisplay errorDisplay, @Nonnull ProgressDisplay progressDisplay) { this.projectId = checkNotNull(projectId); @@ -81,6 +87,7 @@ public SharingSettingsPresenter(@Nonnull ProjectId projectId, this.settingsPresenter = checkNotNull(settingsPresenter); this.messages = checkNotNull(messages); this.errorDisplay = checkNotNull(errorDisplay); + this.uuidV4Provider = uuidV4Provider; this.progressDisplay = checkNotNull(progressDisplay); } @@ -113,7 +120,7 @@ private void displaySharingSettings(AcceptsOneWidget container) { private void applyChangesAndGoToNextPlace() { settingsPresenter.goToNextPlace(); ProjectSharingSettings settings = new ProjectSharingSettings(projectId, view.getLinkSharingPermission(), view.getSharingSettings()); - dispatchServiceManager.execute(SetProjectSharingSettingsAction.create(settings), new DispatchServiceCallbackWithProgressDisplay(errorDisplay, progressDisplay) { + dispatchServiceManager.execute(SetProjectSharingSettingsAction.create(settings, ChangeRequestId.get(uuidV4Provider.get()), this.projectId), new DispatchServiceCallbackWithProgressDisplay(errorDisplay, progressDisplay) { @Override public void handleSuccess(SetProjectSharingSettingsResult result) { permissionManager.firePermissionsChanged(); diff --git a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml index 1a36537a31..9920a1fc44 100644 --- a/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module-dev.gwt.xml @@ -45,6 +45,11 @@ + + diff --git a/webprotege-gwt-ui-client/src/main/module.gwt.xml b/webprotege-gwt-ui-client/src/main/module.gwt.xml index c480fb76c3..ec20cac7bf 100644 --- a/webprotege-gwt-ui-client/src/main/module.gwt.xml +++ b/webprotege-gwt-ui-client/src/main/module.gwt.xml @@ -49,6 +49,11 @@ + + diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java index ed351fd1c7..b629d26a8c 100644 --- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java +++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/dispatch/impl/DispatchServiceExecutorImpl.java @@ -7,6 +7,8 @@ import edu.stanford.bmir.protege.web.server.rpc.JsonRpcHttpRequestBuilder; import edu.stanford.bmir.protege.web.server.rpc.JsonRpcHttpResponseHandler; import edu.stanford.bmir.protege.web.shared.dispatch.*; +import edu.stanford.bmir.protege.web.shared.dispatch.actions.GetUserInfoAction; +import edu.stanford.bmir.protege.web.shared.dispatch.actions.GetUserInfoResult; import edu.stanford.bmir.protege.web.shared.dispatch.actions.TranslateEventListAction; import edu.stanford.bmir.protege.web.shared.event.GetProjectEventsResult; import edu.stanford.bmir.protege.web.shared.permissions.PermissionDeniedException; @@ -59,6 +61,10 @@ public , R extends Result> DispatchServiceResultContainer ex GetProjectEventsResult result = objectMapper.readValue(translateEventsAction.getEventList(), GetProjectEventsResult.class); return DispatchServiceResultContainer.create(result); } + if(action instanceof GetUserInfoAction) { + GetUserInfoResult result = GetUserInfoResult.create(executionContext.getToken()); + return DispatchServiceResultContainer.create(result); + } var result = sendRequest(action, executionContext); return DispatchServiceResultContainer.create(result); } diff --git a/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettings_Serialization_TestCase.java b/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettings_Serialization_TestCase.java index e4e6e1a8c8..bd8fc2cf59 100644 --- a/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettings_Serialization_TestCase.java +++ b/webprotege-gwt-ui-server-core/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettings_Serialization_TestCase.java @@ -26,7 +26,7 @@ public void shouldSerializeAction() throws IOException { Optional.of(SharingPermission.EDIT), ImmutableList.of( new SharingSetting(PersonId.get("User"), SharingPermission.EDIT) ) - )); + ), null, null); JsonSerializationTestUtil.testSerialization(action, Action.class); } diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java index 41abb44ba9..dcca4cf358 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java @@ -205,7 +205,8 @@ @JsonSubTypes.Type(UpdateObjectPropertyFrameResult.class), @JsonSubTypes.Type(UpdateDataPropertyFrameResult.class), @JsonSubTypes.Type(UpdateAnnotationPropertyFrameResult.class), - @JsonSubTypes.Type(UpdateNamedIndividualFrameResult.class) + @JsonSubTypes.Type(UpdateNamedIndividualFrameResult.class), + @JsonSubTypes.Type(GetUserInfoResult.class) }) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME) public interface Result extends IsSerializable { diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java index 0a7372de63..cf3906ae49 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java @@ -978,6 +978,8 @@ public class RpcWhiteList implements IsSerializable, Action, Result { DropType _DropType; + GetUserInfoResult _GetUserInfoResult; + public RpcWhiteList() { } } diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoAction.java new file mode 100644 index 0000000000..1d70845ead --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoAction.java @@ -0,0 +1,11 @@ +package edu.stanford.bmir.protege.web.shared.dispatch.actions; + +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.google.gwt.user.client.rpc.IsSerializable; +import edu.stanford.bmir.protege.web.shared.dispatch.Action; +import java.io.Serializable; + +@JsonTypeName("webprotege.users.GetUserInfo") +public class GetUserInfoAction implements Action, Serializable, IsSerializable { + +} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoResult.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoResult.java new file mode 100644 index 0000000000..813f69566c --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/actions/GetUserInfoResult.java @@ -0,0 +1,42 @@ +package edu.stanford.bmir.protege.web.shared.dispatch.actions; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.google.gwt.user.client.rpc.IsSerializable; +import edu.stanford.bmir.protege.web.shared.annotations.GwtSerializationConstructor; +import edu.stanford.bmir.protege.web.shared.dispatch.Result; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + + +@JsonTypeName("webprotege.users.GetUserInfo") +public class GetUserInfoResult implements Result, Serializable, IsSerializable { + + + private String token; + @GwtSerializationConstructor + public GetUserInfoResult(){ + + } + + + @JsonCreator + @NotNull + public static GetUserInfoResult create(@JsonProperty("token") String token) { + GetUserInfoResult response = new GetUserInfoResult(); + response.token = token; + return response; + } + + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } +} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsAction.java index 89620fe057..9039fefc40 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsAction.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsAction.java @@ -11,7 +11,7 @@ * Stanford Center for Biomedical Informatics Research * 12/05/15 */ -@JsonTypeName("webprotege.users.GetUserIdCompletions") +@JsonTypeName("webprotege.usersquery.QueryUsers") public class GetUserIdCompletionsAction extends GetPossibleItemCompletionsAction { /** diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsResult.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsResult.java index 2daee743d2..b4186ef5c9 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsResult.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/itemlist/GetUserIdCompletionsResult.java @@ -15,7 +15,7 @@ * Stanford Center for Biomedical Informatics Research * 12/05/15 */ -@JsonTypeName("webprotege.users.GetUserIdCompletions") +@JsonTypeName("webprotege.usersquery.QueryUsers") public class GetUserIdCompletionsResult extends GetPossibleItemCompletionsResult { /** diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction.java index bda17fcc39..f0222a7686 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.base.Objects; import edu.stanford.bmir.protege.web.shared.dispatch.ProjectAction; +import edu.stanford.bmir.protege.web.shared.perspective.ChangeRequestId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import javax.annotation.Nonnull; @@ -18,32 +19,42 @@ @JsonTypeName("webprotege.sharing.SetProjectSharingSettings") public class SetProjectSharingSettingsAction implements ProjectAction { - private ProjectSharingSettings projectSharingSettings; + private ProjectSharingSettings settings; + + private ChangeRequestId changeRequestId; + + private ProjectId projectId; private SetProjectSharingSettingsAction() { } - private SetProjectSharingSettingsAction(ProjectSharingSettings projectSharingSettings) { - this.projectSharingSettings = checkNotNull(projectSharingSettings); + private SetProjectSharingSettingsAction(ProjectSharingSettings projectSharingSettings, ChangeRequestId changeRequestId, ProjectId projectId) { + this.settings = checkNotNull(projectSharingSettings); + this.projectId = projectId; + this.changeRequestId = changeRequestId; } - public static SetProjectSharingSettingsAction create(ProjectSharingSettings projectSharingSettings) { - return new SetProjectSharingSettingsAction(projectSharingSettings); + public static SetProjectSharingSettingsAction create(ProjectSharingSettings projectSharingSettings, ChangeRequestId changeRequestId, ProjectId projectId) { + return new SetProjectSharingSettingsAction(projectSharingSettings, changeRequestId, projectId); } @Nonnull @Override public ProjectId getProjectId() { - return projectSharingSettings.getProjectId(); + return settings.getProjectId(); + } + + public ProjectSharingSettings getSettings() { + return settings; } - public ProjectSharingSettings getProjectSharingSettings() { - return projectSharingSettings; + public ChangeRequestId getChangeRequestId() { + return changeRequestId; } @Override public int hashCode() { - return Objects.hashCode(projectSharingSettings); + return Objects.hashCode(settings); } @Override @@ -55,14 +66,14 @@ public boolean equals(Object obj) { return false; } SetProjectSharingSettingsAction other = (SetProjectSharingSettingsAction) obj; - return this.projectSharingSettings.equals(other.projectSharingSettings); + return this.settings.equals(other.settings); } @Override public String toString() { return toStringHelper("SetProjectSharingSettingsAction") - .addValue(projectSharingSettings) + .addValue(settings) .toString(); } } diff --git a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction_TestCase.java b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction_TestCase.java index 944441a688..9646820ade 100644 --- a/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction_TestCase.java +++ b/webprotege-gwt-ui-shared/src/test/java/edu/stanford/bmir/protege/web/shared/sharing/SetProjectSharingSettingsAction_TestCase.java @@ -1,5 +1,6 @@ package edu.stanford.bmir.protege.web.shared.sharing; +import edu.stanford.bmir.protege.web.shared.perspective.ChangeRequestId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; import org.junit.Before; import org.junit.Test; @@ -33,16 +34,20 @@ public class SetProjectSharingSettingsAction_TestCase { @Mock private ProjectId projectId; + @Mock + private ChangeRequestId changeRequestId; + + @Before public void setUp() throws Exception { - action = SetProjectSharingSettingsAction.create(projectSharingSettings); - otherAction = SetProjectSharingSettingsAction.create(projectSharingSettings); + action = SetProjectSharingSettingsAction.create(projectSharingSettings, changeRequestId, projectId); + otherAction = SetProjectSharingSettingsAction.create(projectSharingSettings, changeRequestId, projectId); when(projectSharingSettings.getProjectId()).thenReturn(projectId); } @Test(expected = NullPointerException.class) public void shouldThrowNullPointerException() { - SetProjectSharingSettingsAction.create(null); + SetProjectSharingSettingsAction.create(null, changeRequestId, projectId); } @Test @@ -72,7 +77,7 @@ public void shouldGenerateToString() { @Test public void shouldReturnSuppliedSharingSettings() { - assertThat(action.getProjectSharingSettings(), is(projectSharingSettings)); + assertThat(action.getSettings(), is(projectSharingSettings)); } @Test From 9201eb5e05f74ad226ee731978d864b41e86f45a Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 15:39:26 -0700 Subject: [PATCH 15/24] Update readme.md --- readme.md | 57 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/readme.md b/readme.md index efa09a1e10..ef53615f75 100644 --- a/readme.md +++ b/readme.md @@ -1,56 +1,3 @@ -WebProtégé -========== +# webprotege-gwt-ui -What is WebProtégé? -------------------- - -WebProtégé is a free, open source collaborative ontology development environment. - -It provides the following features: -- Support for editing OWL 2 ontologies -- A default simple editing interface, which provides access to commonly used OWL constructs -- Full change tracking and revision history -- Collaboration tools such as, sharing and permissions, threaded notes and discussions, watches and email notifications -- Customizable user interface -- Support for editing OBO ontologies -- Multiple file formats for upload and download of ontologies (supported formats: RDF/XML, Turtle, OWL/XML, OBO, and others) - -WebProtégé runs as a Web application. End users access it through their Web browsers. -They do not need to download or install any software. We encourage end-users to use - -https://webprotege.stanford.edu - -This repository houses the code for the WebProtege GWT User Interface. - -Building --------- - -To build WebProtégé from source - -1) Clone the github repository - ``` - git clone https://github.com/protegeproject/webprotege-gwt-ui.git - ``` -2) Open a terminal in the directory where you clone the repository to -3) Use maven to package WebProtégé - ``` - mvn clean package - ``` -5) The WebProtege .war file will be built into the webprotege-server directory - -Running from Maven ------------------- - -To run WebProtégé in SuperDev Mode using maven - -1) Start the GWT code server in one terminal window - ``` - mvn gwt:codeserver - ``` -2) In a different terminal window start the tomcat server - ``` - mvn -Denv=dev tomcat7:run - ``` -3) Start the WebProtégé Backend - -4) Browse to WebProtégé in a Web browser by navigating to [http://localhost:8080](http://localhost:8080) \ No newline at end of file +This is the UI server for WebProtégé. From 579714cacf433037d267caa479c1f4fb59f3c0b0 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 15:41:03 -0700 Subject: [PATCH 16/24] Added CI workflow file --- .github/workflows/ci.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000000..f023adc4d0 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,17 @@ +name: Java CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Maven + run: mvn --batch-mode --update-snapshots package \ No newline at end of file From fbf63fdcfdf2f4ef054d275ddb1ab8310f500160 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 15:55:28 -0700 Subject: [PATCH 17/24] Add workflow for publishing to Docker --- .github/workflows/pub-docker-hub.yaml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pub-docker-hub.yaml diff --git a/.github/workflows/pub-docker-hub.yaml b/.github/workflows/pub-docker-hub.yaml new file mode 100644 index 0000000000..3095f57c62 --- /dev/null +++ b/.github/workflows/pub-docker-hub.yaml @@ -0,0 +1,29 @@ +name: Publish Docker image to Docker Hub +on: + release: + types: + - published + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{secrets.DOCKER_USERNAME}} + password: ${{secrets.DOCKER_PASSWORD}} + - uses: actions/checkout@v3 + - name: Set up Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + server-id: docker.io + server-username: DOCKER_USERNAME + server-password: DOCKER_PASSWORD + - name: Publish package + run: mvn --batch-mode -Prelease package dockerfile:push +env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}} \ No newline at end of file From e16e7bfdb84d8604c5a0346a4feb1161ac0c5f60 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 16:00:33 -0700 Subject: [PATCH 18/24] Bumped version for release --- pom.xml | 2 +- webprotege-gwt-ui-client/pom.xml | 2 +- webprotege-gwt-ui-server-core/pom.xml | 2 +- webprotege-gwt-ui-server/pom.xml | 2 +- webprotege-gwt-ui-shared-core/pom.xml | 2 +- webprotege-gwt-ui-shared/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index f99499bb35..efaf04179f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.4 + 5.0.5 pom diff --git a/webprotege-gwt-ui-client/pom.xml b/webprotege-gwt-ui-client/pom.xml index 0b41c2fdb1..ab01848ee3 100644 --- a/webprotege-gwt-ui-client/pom.xml +++ b/webprotege-gwt-ui-client/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.4 + 5.0.5 webprotege-gwt-ui-client diff --git a/webprotege-gwt-ui-server-core/pom.xml b/webprotege-gwt-ui-server-core/pom.xml index d401bf2ff3..b41b8d6d89 100644 --- a/webprotege-gwt-ui-server-core/pom.xml +++ b/webprotege-gwt-ui-server-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.4 + 5.0.5 4.0.0 diff --git a/webprotege-gwt-ui-server/pom.xml b/webprotege-gwt-ui-server/pom.xml index aa8d05a412..e12cfc18c2 100644 --- a/webprotege-gwt-ui-server/pom.xml +++ b/webprotege-gwt-ui-server/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.4 + 5.0.5 webprotege-gwt-ui-server diff --git a/webprotege-gwt-ui-shared-core/pom.xml b/webprotege-gwt-ui-shared-core/pom.xml index 923861a8f4..3074dc2101 100644 --- a/webprotege-gwt-ui-shared-core/pom.xml +++ b/webprotege-gwt-ui-shared-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.4 + 5.0.5 4.0.0 diff --git a/webprotege-gwt-ui-shared/pom.xml b/webprotege-gwt-ui-shared/pom.xml index 9b42efb3bd..9162bc3280 100644 --- a/webprotege-gwt-ui-shared/pom.xml +++ b/webprotege-gwt-ui-shared/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.4 + 5.0.5 webprotege-gwt-ui-shared From e953cb190c3b681030d36f6465184cf6792c9aaa Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 16:05:54 -0700 Subject: [PATCH 19/24] Remove profile --- .github/workflows/pub-docker-hub.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pub-docker-hub.yaml b/.github/workflows/pub-docker-hub.yaml index 3095f57c62..20b643c266 100644 --- a/.github/workflows/pub-docker-hub.yaml +++ b/.github/workflows/pub-docker-hub.yaml @@ -23,7 +23,7 @@ jobs: server-username: DOCKER_USERNAME server-password: DOCKER_PASSWORD - name: Publish package - run: mvn --batch-mode -Prelease package dockerfile:push + run: mvn --batch-mode package dockerfile:push env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}} \ No newline at end of file From ae4b4e2b5772a5b692913d429d228373b1a0bdcc Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 16:56:39 -0700 Subject: [PATCH 20/24] Updated docker hub deploy command --- .github/workflows/pub-docker-hub.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pub-docker-hub.yaml b/.github/workflows/pub-docker-hub.yaml index 20b643c266..ce6e49fcac 100644 --- a/.github/workflows/pub-docker-hub.yaml +++ b/.github/workflows/pub-docker-hub.yaml @@ -23,7 +23,7 @@ jobs: server-username: DOCKER_USERNAME server-password: DOCKER_PASSWORD - name: Publish package - run: mvn --batch-mode package dockerfile:push + run: mvn --batch-mode clean deploy env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}} \ No newline at end of file From b61ca3a2253ab03f9c45080fafa0f246b1064e0e Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 10 May 2024 16:57:14 -0700 Subject: [PATCH 21/24] Updated version for next development cycle --- pom.xml | 2 +- webprotege-gwt-ui-client/pom.xml | 2 +- webprotege-gwt-ui-server-core/pom.xml | 2 +- webprotege-gwt-ui-server/pom.xml | 2 +- webprotege-gwt-ui-shared-core/pom.xml | 2 +- webprotege-gwt-ui-shared/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index efaf04179f..0219663c39 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.5 + 5.0.6-SNAPSHOT pom diff --git a/webprotege-gwt-ui-client/pom.xml b/webprotege-gwt-ui-client/pom.xml index ab01848ee3..bc802a502b 100644 --- a/webprotege-gwt-ui-client/pom.xml +++ b/webprotege-gwt-ui-client/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.5 + 5.0.6-SNAPSHOT webprotege-gwt-ui-client diff --git a/webprotege-gwt-ui-server-core/pom.xml b/webprotege-gwt-ui-server-core/pom.xml index b41b8d6d89..1755cbf51a 100644 --- a/webprotege-gwt-ui-server-core/pom.xml +++ b/webprotege-gwt-ui-server-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.5 + 5.0.6-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-server/pom.xml b/webprotege-gwt-ui-server/pom.xml index e12cfc18c2..b11a7cf44f 100644 --- a/webprotege-gwt-ui-server/pom.xml +++ b/webprotege-gwt-ui-server/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.5 + 5.0.6-SNAPSHOT webprotege-gwt-ui-server diff --git a/webprotege-gwt-ui-shared-core/pom.xml b/webprotege-gwt-ui-shared-core/pom.xml index 3074dc2101..a00231d7df 100644 --- a/webprotege-gwt-ui-shared-core/pom.xml +++ b/webprotege-gwt-ui-shared-core/pom.xml @@ -5,7 +5,7 @@ webprotege-gwt-ui edu.stanford.protege - 5.0.5 + 5.0.6-SNAPSHOT 4.0.0 diff --git a/webprotege-gwt-ui-shared/pom.xml b/webprotege-gwt-ui-shared/pom.xml index 9162bc3280..4d9c3dff76 100644 --- a/webprotege-gwt-ui-shared/pom.xml +++ b/webprotege-gwt-ui-shared/pom.xml @@ -6,7 +6,7 @@ edu.stanford.protege webprotege-gwt-ui - 5.0.5 + 5.0.6-SNAPSHOT webprotege-gwt-ui-shared From 5470ad770fd7d9130fd40fee9707d8c76ed724f0 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 17 May 2024 08:11:05 -0700 Subject: [PATCH 22/24] Initial working version of CreateNewProject with sources --- .../project/CreateNewProjectPresenter.java | 155 ++++++------- .../client/project/CreateNewProjectView.java | 3 + .../project/CreateNewProjectViewImpl.java | 9 + .../web/client/project/ProjectPresenter.java | 25 +-- .../client/upload/FileReadErrorHandler.java | 11 + .../web/client/upload/FileReadHandler.java | 11 + .../client/upload/FileUploadFileReader.java | 37 ++++ .../web/client/upload/FileUploadResponse.java | 26 ++- .../client/upload/FileUploadResponseJs.java | 21 ++ .../upload/UploadFileDialogController.java | 2 +- .../client/upload/UploadFileDialogForm.java | 2 + .../server/upload/MinioStorageService.java | 8 +- .../web/server/app/ServerComponent.java | 3 - .../app/WebProtegeServletContextListener.java | 3 - .../web/server/upload/FileUploadServlet.java | 204 ------------------ .../protege/web/shared/dispatch/Result.java | 3 + .../web/shared/dispatch/RpcWhiteList.java | 3 + .../web/shared/upload/SubmitFileAction.java | 28 +++ .../web/shared/upload/SubmitFileResult.java | 28 +++ 19 files changed, 265 insertions(+), 317 deletions(-) create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadErrorHandler.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadHandler.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadFileReader.java create mode 100644 webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponseJs.java delete mode 100644 webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/upload/FileUploadServlet.java create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileAction.java create mode 100644 webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileResult.java diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectPresenter.java index 48efd4f93b..2a96e4bf20 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectPresenter.java @@ -1,22 +1,20 @@ package edu.stanford.bmir.protege.web.client.project; -import com.google.gwt.core.client.GWT; -import com.google.gwt.user.client.ui.FormPanel; import com.google.web.bindery.event.shared.EventBus; import edu.stanford.bmir.protege.web.client.dispatch.DispatchErrorMessageDisplay; import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceCallbackWithProgressDisplay; import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager; import edu.stanford.bmir.protege.web.client.dispatch.ProgressDisplay; import edu.stanford.bmir.protege.web.client.library.msgbox.MessageBox; -import edu.stanford.bmir.protege.web.client.progress.ProgressMonitor; import edu.stanford.bmir.protege.web.client.projectmanager.ProjectCreatedEvent; -import edu.stanford.bmir.protege.web.client.upload.FileUploadResponse; +import edu.stanford.bmir.protege.web.client.upload.FileUploadFileReader; import edu.stanford.bmir.protege.web.client.user.LoggedInUserManager; import edu.stanford.bmir.protege.web.client.uuid.UuidV4; import edu.stanford.bmir.protege.web.shared.csv.DocumentId; import edu.stanford.bmir.protege.web.shared.permissions.PermissionDeniedException; import edu.stanford.bmir.protege.web.shared.project.*; -import edu.stanford.bmir.protege.web.shared.util.UUIDUtil; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileAction; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileResult; import javax.annotation.Nonnull; import javax.inject.Inject; @@ -34,6 +32,7 @@ public class CreateNewProjectPresenter { private final ProgressDisplay progressDisplay; public interface ProjectCreatedHandler { + void handleProjectCreated(); } @@ -53,7 +52,9 @@ public interface ProjectCreatedHandler { private final MessageBox messageBox; @Inject - public CreateNewProjectPresenter(DispatchErrorMessageDisplay errorDisplay, ProgressDisplay progressDisplay, @Nonnull CreateNewProjectView view, + public CreateNewProjectPresenter(DispatchErrorMessageDisplay errorDisplay, + ProgressDisplay progressDisplay, + @Nonnull CreateNewProjectView view, @Nonnull LoggedInUserManager loggedInUserManager, @Nonnull DispatchServiceManager dispatchServiceManager, @Nonnull EventBus eventBus, @@ -107,45 +108,48 @@ private void submitCreateProjectRequest(ProjectCreatedHandler handler) { } private void createEmptyProject(ProjectCreatedHandler projectCreatedHandler) { - NewProjectSettings newProjectSettings = NewProjectSettings.get( - loggedInUserManager.getLoggedInUserId(), - view.getProjectName(), - view.getProjectLanguage(), - view.getProjectDescription()); + NewProjectSettings newProjectSettings = NewProjectSettings.get(loggedInUserManager.getLoggedInUserId(), + view.getProjectName(), + view.getProjectLanguage(), + view.getProjectDescription()); submitCreateNewProjectRequest(newProjectSettings, projectCreatedHandler); } private void uploadSourcesAndCreateProject(@Nonnull ProjectCreatedHandler projectCreatedHandler) { checkNotNull(projectCreatedHandler); - String postUrl = GWT.getModuleBaseURL() + "submitfile"; - - view.setFileUploadPostUrl(postUrl); - ProgressMonitor.get().showProgressMonitor("Uploading sources", "Uploading file"); - view.setSubmitCompleteHandler(event -> { - ProgressMonitor.get().hideProgressMonitor(); - handleSourcesUploadComplete(event, projectCreatedHandler); + String fileUploadElementId = view.getFileUploadElementId(); + FileUploadFileReader fileUploadFileReader = new FileUploadFileReader(); + progressDisplay.displayProgress("Uploading file", "Uploading file. Please wait."); + fileUploadFileReader.readFiles(fileUploadElementId, fileContent -> { + progressDisplay.hideProgress(); + handleFileReadComplete(fileContent, projectCreatedHandler); + }, readError -> { + progressDisplay.hideProgress(); + messageBox.showAlert("Upload Failed", "Your file could not be uploaded."); }); - view.submitFormData(); } - private void handleSourcesUploadComplete(FormPanel.SubmitCompleteEvent event, - ProjectCreatedHandler projectCreatedHandler) { - FileUploadResponse response = new FileUploadResponse(event.getResults()); - if (response.wasUploadAccepted()) { - DocumentId documentId = response.getDocumentId(); - NewProjectSettings newProjectSettings = NewProjectSettings.get( - loggedInUserManager.getLoggedInUserId(), - view.getProjectName(), - view.getProjectLanguage(), - view.getProjectDescription(), - documentId - ); - submitCreateNewProjectRequest(newProjectSettings, projectCreatedHandler); - } - else { - messageBox.showAlert("Upload Failed", response.getUploadRejectedMessage()); - } + private void handleFileReadComplete(@Nonnull String base64EncodedContent, + ProjectCreatedHandler projectCreatedHandler) { + + dispatchServiceManager.execute(SubmitFileAction.create(base64EncodedContent), + busy -> {}, + result -> { + handleCreateNewProjectFromUploadedSources(projectCreatedHandler, result); + }); + + + } + + private void handleCreateNewProjectFromUploadedSources(ProjectCreatedHandler projectCreatedHandler, SubmitFileResult result) { + DocumentId documentId = result.getFileSubmissionId(); + NewProjectSettings newProjectSettings = NewProjectSettings.get(loggedInUserManager.getLoggedInUserId(), + view.getProjectName(), + view.getProjectLanguage(), + view.getProjectDescription(), + documentId); + submitCreateNewProjectRequest(newProjectSettings, projectCreatedHandler); } private void submitCreateNewProjectRequest(@Nonnull NewProjectSettings newProjectSettings, @@ -153,44 +157,47 @@ private void submitCreateNewProjectRequest(@Nonnull NewProjectSettings newProjec String uuid = UuidV4.uuidv4(); ProjectId newProjectId = ProjectId.get(uuid); dispatchServiceManager.execute(new CreateNewProjectAction(newProjectId, newProjectSettings), - new DispatchServiceCallbackWithProgressDisplay(errorDisplay, - progressDisplay) { - @Override - public String getProgressDisplayTitle() { - return "Creating project"; - } - - @Override - public String getProgressDisplayMessage() { - return "Please wait."; - } - - @Override - public void handleSuccess(CreateNewProjectResult result) { - projectCreatedHandler.handleProjectCreated(); - eventBus.fireEvent(new ProjectCreatedEvent(result.getProjectDetails())); - } - - @Override - public void handleExecutionException(Throwable cause) { - if (cause instanceof PermissionDeniedException) { - messageBox.showMessage("You do not have permission to create new projects"); - } - else if (cause instanceof ProjectAlreadyRegisteredException) { - ProjectAlreadyRegisteredException ex = (ProjectAlreadyRegisteredException) cause; - String projectName = ex.getProjectId().getId(); - messageBox.showMessage("The project name " + projectName + " is already registered. Please try a different name."); - } - else if (cause instanceof ProjectDocumentExistsException) { - ProjectDocumentExistsException ex = (ProjectDocumentExistsException) cause; - String projectName = ex.getProjectId().getId(); - messageBox.showMessage("There is already a non-empty project on the server with the id " + projectName + ". This project has NOT been overwritten. Please contact the administrator to resolve this issue."); - } - else { - messageBox.showMessage(cause.getMessage()); - } - } - }); + new DispatchServiceCallbackWithProgressDisplay( + errorDisplay, + progressDisplay) { + @Override + public String getProgressDisplayTitle() { + return "Creating project"; + } + + @Override + public String getProgressDisplayMessage() { + return "Please wait."; + } + + @Override + public void handleSuccess(CreateNewProjectResult result) { + projectCreatedHandler.handleProjectCreated(); + eventBus.fireEvent(new ProjectCreatedEvent(result.getProjectDetails())); + } + + @Override + public void handleExecutionException(Throwable cause) { + if (cause instanceof PermissionDeniedException) { + messageBox.showMessage( + "You do not have permission to create new projects"); + } + else if (cause instanceof ProjectAlreadyRegisteredException) { + ProjectAlreadyRegisteredException ex = (ProjectAlreadyRegisteredException) cause; + String projectName = ex.getProjectId().getId(); + messageBox.showMessage("The project name " + projectName + " is already registered. Please try a different name."); + } + else if (cause instanceof ProjectDocumentExistsException) { + ProjectDocumentExistsException ex = (ProjectDocumentExistsException) cause; + String projectName = ex.getProjectId().getId(); + messageBox.showMessage( + "There is already a non-empty project on the server with the id " + projectName + ". This project has NOT been overwritten. Please contact the administrator to resolve this issue."); + } + else { + messageBox.showMessage(cause.getMessage()); + } + } + }); } public NewProjectInfo getNewProjectInfo() { diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectView.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectView.java index 13900f518f..f6e1cbfe03 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectView.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectView.java @@ -72,4 +72,7 @@ public interface CreateNewProjectView extends HasInitialFocusable, IsWidget { * Displays a message saying that the project name is missing */ void showProjectNameMissingMessage(); + + @Nonnull + String getFileUploadElementId(); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectViewImpl.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectViewImpl.java index c2259ab316..3750b32789 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectViewImpl.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/CreateNewProjectViewImpl.java @@ -22,6 +22,8 @@ */ public class CreateNewProjectViewImpl extends Composite implements CreateNewProjectView { + protected static final String FILE_UPLOAD_ID = "fileUpload"; + interface CreateNewProjectViewImplUiBinder extends UiBinder { } @@ -108,6 +110,12 @@ public void submitFormData() { formPanel.submit(); } + @Nonnull + @Override + public String getFileUploadElementId() { + return fileUpload.getElement().getId(); + } + @Override public void showProjectNameMissingMessage() { messageBox.showAlert("Project name missing", "Please enter a project name"); @@ -128,5 +136,6 @@ public Optional getInitialFocusable() { protected void onAttach() { super.onAttach(); projectNameField.setFocus(true); + fileUpload.getElement().setId(FILE_UPLOAD_ID); } } \ No newline at end of file diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java index f0ed431b3f..6df9ff45bd 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/project/ProjectPresenter.java @@ -11,9 +11,7 @@ import edu.stanford.bmir.protege.web.client.progress.BusyView; import edu.stanford.bmir.protege.web.client.tag.ProjectTagsStyleManager; import edu.stanford.bmir.protege.web.client.topbar.TopBarPresenter; -import edu.stanford.bmir.protege.web.client.user.LoggedInUserProvider; import edu.stanford.bmir.protege.web.shared.HasDispose; -import edu.stanford.bmir.protege.web.shared.dispatch.actions.GetUserInfoAction; import edu.stanford.bmir.protege.web.shared.dispatch.actions.TranslateEventListAction; import edu.stanford.bmir.protege.web.shared.event.*; import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton; @@ -61,8 +59,6 @@ public class ProjectPresenter implements HasDispose, HasProjectId { private final LargeNumberOfChangesManager largeNumberOfChangesHandler; - private final LoggedInUserProvider loggedInUserProvider; - @Inject public ProjectPresenter(ProjectId projectId, @@ -76,7 +72,7 @@ public ProjectPresenter(ProjectId projectId, PermissionScreener permissionScreener, WebProtegeEventBus eventBus, ProjectTagsStyleManager projectTagsStyleManager, - LargeNumberOfChangesManager largeNumberOfChangesHandler, LoggedInUserProvider loggedInUserProvider) { + LargeNumberOfChangesManager largeNumberOfChangesHandler) { this.projectId = projectId; this.view = view; this.busyView = busyView; @@ -89,7 +85,6 @@ public ProjectPresenter(ProjectId projectId, this.eventBus = eventBus; this.projectTagsStyleManager = projectTagsStyleManager; this.largeNumberOfChangesHandler = largeNumberOfChangesHandler; - this.loggedInUserProvider = loggedInUserProvider; } @Nonnull @@ -114,11 +109,7 @@ private void displayProject(@Nonnull AcceptsOneWidget container, @Nonnull ProjectViewPlace place) { dispatchServiceManager.execute(new LoadProjectAction(projectId), result -> handleProjectLoaded(container, eventBus, place)); - dispatchServiceManager.execute(new GetUserInfoAction(), r -> { - subscribeToWebsocket(projectId.getId(), r.getToken(), this.loggedInUserProvider.getCurrentUserId().getUserName()); - - }); - + subscribeToWebsocket(projectId.getId()); } private void handleProjectLoaded(@Nonnull AcceptsOneWidget container, @Nonnull EventBus eventBus, @Nonnull ProjectViewPlace place) { @@ -131,7 +122,6 @@ private void handleProjectLoaded(@Nonnull AcceptsOneWidget container, @Nonnull E projectId, largeNumberOfChangesHandler); container.setWidget(view); - dispatchServiceManager.execute(GetProjectTagsAction.create(projectId), r -> projectTagsStyleManager.setProjectTags(r.getTags(), view)); dispatchServiceManager.executeCurrentBatch(); @@ -157,7 +147,7 @@ public void dispatchEventsFromWebsocket(String data) { } /*TODO change the hardcoded broker URL and get it from a config class */ - public native void subscribeToWebsocket(String projectId, String token, String userId)/*-{ + public native void subscribeToWebsocket(String projectId)/*-{ try { var that = this; @@ -166,22 +156,17 @@ public native void subscribeToWebsocket(String projectId, String token, String u debug: function(str) { console.log(str); }, - reconnectDelay: 30000, + reconnectDelay: 5000, heartbeatIncoming: 4000, heartbeatOutgoing: 4000, }); stompClient.onConnect = function(frame) { - var headers = { - 'token': token, - 'userId': userId, - 'Authorization' : 'Bearer ' + token - }; stompClient.subscribe('/topic/project-events/' + projectId, function(message) { that.@edu.stanford.bmir.protege.web.client.project.ProjectPresenter::dispatchEventsFromWebsocket(Ljava/lang/String;)(message.body); - }, headers); + }); }; stompClient.onWebSocketError = function(error) { console.error('Error with websocket', error); diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadErrorHandler.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadErrorHandler.java new file mode 100644 index 0000000000..d91398937c --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadErrorHandler.java @@ -0,0 +1,11 @@ +package edu.stanford.bmir.protege.web.client.upload; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 2024-05-02 + */ +public interface FileReadErrorHandler { + + void handleFileReadError(String message); +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadHandler.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadHandler.java new file mode 100644 index 0000000000..8c23316896 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileReadHandler.java @@ -0,0 +1,11 @@ +package edu.stanford.bmir.protege.web.client.upload; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 2024-05-02 + */ +public interface FileReadHandler { + + void handleFileRead(String base64Encoding); +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadFileReader.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadFileReader.java new file mode 100644 index 0000000000..f26cebcf66 --- /dev/null +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadFileReader.java @@ -0,0 +1,37 @@ +package edu.stanford.bmir.protege.web.client.upload; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 2024-05-01 + */ +public class FileUploadFileReader { + + public void readFiles(String fileUploadElementId, + FileReadHandler fileReadHandler, + FileReadErrorHandler errorHandler) { + readFileNative(fileUploadElementId, fileReadHandler, errorHandler); + } + + private native void readFileNative(String fileInputId, + FileReadHandler handler, + FileReadErrorHandler errorHandler) /*-{ + var fileElement = $doc.getElementById(fileInputId); + var file = fileElement.files[0]; + var reader = new FileReader(); + reader.readAsDataURL(file); + + reader.onerror = function (event) { + var msg = JSON.stringify(event); + errorHandler.@edu.stanford.bmir.protege.web.client.upload.FileReadErrorHandler::handleFileReadError(*)(msg); + } + + reader.onloadend = function () { + var base64data = reader.result.substring('data:application/octet-stream;base64,'.length); + handler.@edu.stanford.bmir.protege.web.client.upload.FileReadHandler::handleFileRead(*)(base64data); + } + return ""; + }-*/; + + +} diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponse.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponse.java index 9c75a1e072..6c40b01408 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponse.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponse.java @@ -35,11 +35,12 @@ private JSONObject parseResult() { /** * The result from a form submission sometimes seems to be surrounded with <pre> tags. This method * strips these tags of the result if the are present. + * * @param result The raw result. * @return The raw result minus the pre tags. */ private String trimPreTags(String result) { - if(result.startsWith("
")) {
+        if (result.startsWith("
")) {
             return result.substring(5, result.length() - 6);
         }
         else {
@@ -49,18 +50,19 @@ private String trimPreTags(String result) {
 
     /**
      * If the upload was rejected the method gets an error message which explains why the upload was rejected.
+     *
      * @return A string representing the message (not null).
      */
     public String getUploadRejectedMessage() {
-        if(jsonObject == null) {
+        if (jsonObject == null) {
             return "Invalid response";
         }
         JSONValue value = jsonObject.get(FileUploadResponseAttributes.UPLOAD_REJECTED_MESSAGE_ATTRIBUTE.name());
-        if(value == null) {
+        if (value == null) {
             return UNKNOWN_REASON_MESSAGE;
         }
         JSONString string = value.isString();
-        if(string == null) {
+        if (string == null) {
             return UNKNOWN_REASON_MESSAGE;
         }
         return string.stringValue();
@@ -68,18 +70,19 @@ public String getUploadRejectedMessage() {
 
     /**
      * Determines if the upload was accepted.
+     *
      * @return true if the upload was accepted, otherwise false.
      */
     public boolean wasUploadAccepted() {
-        if(jsonObject == null) {
+        if (jsonObject == null) {
             return false;
         }
         JSONValue value = jsonObject.get(FileUploadResponseAttributes.RESPONSE_TYPE_ATTRIBUTE.name());
-        if(value == null) {
+        if (value == null) {
             return false;
         }
         JSONString string = value.isString();
-        if(string == null) {
+        if (string == null) {
             return false;
         }
         return string.stringValue().equals(FileUploadResponseAttributes.RESPONSE_TYPE_VALUE_UPLOAD_ACCEPTED.name());
@@ -89,21 +92,22 @@ public boolean wasUploadAccepted() {
     /**
      * For an upload that was accepted ({@link #wasUploadAccepted()} returns true) this method gets
      * the documentId of the upload.
+     *
      * @return The document Id
      */
     public DocumentId getDocumentId() {
-        if(jsonObject == null) {
+        if (jsonObject == null) {
             return new DocumentId("");
         }
-        if(!wasUploadAccepted()) {
+        if (!wasUploadAccepted()) {
             return new DocumentId("");
         }
         JSONValue value = jsonObject.get(FileUploadResponseAttributes.UPLOAD_FILE_ID.name());
-        if(value == null) {
+        if (value == null) {
             return new DocumentId("");
         }
         JSONString string = value.isString();
-        if(string == null) {
+        if (string == null) {
             return new DocumentId("");
         }
         return new DocumentId(string.stringValue().trim());
diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponseJs.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponseJs.java
new file mode 100644
index 0000000000..16fbec9cce
--- /dev/null
+++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/FileUploadResponseJs.java
@@ -0,0 +1,21 @@
+package edu.stanford.bmir.protege.web.client.upload;
+
+import edu.stanford.bmir.protege.web.client.d3.Transform;
+import jsinterop.annotations.JsPackage;
+import jsinterop.annotations.JsProperty;
+import jsinterop.annotations.JsType;
+
+/**
+ * Matthew Horridge
+ * Stanford Center for Biomedical Informatics Research
+ * 2024-05-01
+ */
+@JsType(isNative = true, namespace = JsPackage.GLOBAL)
+public class FileUploadResponseJs {
+
+    @JsProperty(name = "result")
+    public native String getResult();
+
+    @JsProperty(name = "fileId")
+    public native String getFileId();
+}
diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java
index 7a98978fb7..22c76edb9c 100644
--- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java
+++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java
@@ -30,7 +30,7 @@ public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {
                         ProgressMonitor.get().hideProgressMonitor();
                         GWT.log("Submittion of file is complete");
                         FileUploadResponse result = new FileUploadResponse(event.getResults());
-                        if(result.wasUploadAccepted()) {
+                        if (result.wasUploadAccepted()) {
                             GWT.log("Successful upload");
                             resultHandler.handleFileUploaded(result.getDocumentId());
 
diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java
index fc94c25e21..85238a062f 100644
--- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java
+++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java
@@ -15,6 +15,7 @@
 public class UploadFileDialogForm extends WebProtegeDialogForm {
 
     private static final String SUBMIT_FILE_URL = GWT.getModuleBaseURL() + "submitfile";
+    //    private static final String SUBMIT_FILE_URL = "/files/submit";
 
     private final FileUpload fileUpload;
 
@@ -24,6 +25,7 @@ public UploadFileDialogForm() {
         setPostURL(SUBMIT_FILE_URL);
         fileUpload = new FileUpload();
         fileUpload.setName("file");
+
         addWidget(FILE_NAME_FIELD_LABEL, fileUpload);
         fileUpload.setWidth("300px");
         addDialogValidator(new FileNameValidator());
diff --git a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/upload/MinioStorageService.java b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/upload/MinioStorageService.java
index 8fd02dec3f..8546b47178 100644
--- a/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/upload/MinioStorageService.java
+++ b/webprotege-gwt-ui-server-core/src/main/java/edu/stanford/bmir/protege/web/server/upload/MinioStorageService.java
@@ -1,5 +1,6 @@
 package edu.stanford.bmir.protege.web.server.upload;
 
+import edu.stanford.bmir.protege.web.shared.dispatch.DispatchService;
 import io.minio.BucketExistsArgs;
 import io.minio.MakeBucketArgs;
 import io.minio.MinioClient;
@@ -30,13 +31,18 @@ public class MinioStorageService implements StorageService {
 
     private final MinioClient minioClient;
 
+    private final DispatchService dispatchService;
+
     @Inject
-    public MinioStorageService(MinioClient minioClient) {
+    public MinioStorageService(MinioClient minioClient, DispatchService dispatchService) {
         this.minioClient = minioClient;
+        this.dispatchService = dispatchService;
     }
 
     @Override
     public FileSubmissionId storeUpload(Path tempFile) {
+
+
         var fileIdentifier = UUID.randomUUID().toString();
         logger.info("Storing uploaded file ({} MB) with an identifier of {}", getFileSizeInMB(tempFile), fileIdentifier);
         createBucketIfNecessary();
diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/ServerComponent.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/ServerComponent.java
index 6da0658ea9..f68a67f8c0 100644
--- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/ServerComponent.java
+++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/ServerComponent.java
@@ -5,7 +5,6 @@
 import edu.stanford.bmir.protege.web.server.dispatch.DispatchServlet;
 import edu.stanford.bmir.protege.web.server.download.ProjectDownloadServlet;
 import edu.stanford.bmir.protege.web.server.inject.ApplicationModule;
-import edu.stanford.bmir.protege.web.server.upload.FileUploadServlet;
 import edu.stanford.bmir.protege.web.shared.inject.ApplicationSingleton;
 import edu.stanford.bmir.protege.web.shared.inject.SharedApplicationModule;
 
@@ -26,8 +25,6 @@ public interface ServerComponent {
 
     ApplicationSettingsChecker getApplicationSettingsChecker();
 
-    FileUploadServlet getFileUploadServlet();
-
     ProjectDownloadServlet getProjectDownloadServlet();
 
     DispatchServlet getDispatchServlet();
diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeServletContextListener.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeServletContextListener.java
index eff383bf92..e4a721f984 100644
--- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeServletContextListener.java
+++ b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/app/WebProtegeServletContextListener.java
@@ -33,9 +33,6 @@ public void contextInitialized(ServletContextEvent sce) {
             servletContext.addServlet("ProjectDownloadServlet", serverComponent.getProjectDownloadServlet())
                           .addMapping("/download");
 
-            servletContext.addServlet("FileUploadServlet", serverComponent.getFileUploadServlet())
-                          .addMapping("/webprotege/submitfile");
-
             Runtime runtime = Runtime.getRuntime();
             logger.info("Max  Memory: {} MB", (runtime.maxMemory() / (1024 * 1024)));
             logger.info(WebProtegeMarker, "WebProtege initialization complete");
diff --git a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/upload/FileUploadServlet.java b/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/upload/FileUploadServlet.java
deleted file mode 100644
index 93b09b930b..0000000000
--- a/webprotege-gwt-ui-server/src/main/java/edu/stanford/bmir/protege/web/server/upload/FileUploadServlet.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package edu.stanford.bmir.protege.web.server.upload;
-
-import edu.stanford.bmir.protege.web.shared.inject.ApplicationSingleton;
-import edu.stanford.bmir.protege.web.shared.upload.FileUploadResponseAttributes;
-import edu.stanford.bmir.protege.web.server.app.ApplicationNameSupplier;
-import edu.stanford.bmir.protege.web.server.session.WebProtegeSession;
-import edu.stanford.bmir.protege.web.server.session.WebProtegeSessionImpl;
-import edu.stanford.bmir.protege.web.shared.user.UserId;
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileItemFactory;
-import org.apache.commons.fileupload.FileUploadBase;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.annotation.Nonnull;
-import javax.inject.Inject;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static edu.stanford.bmir.protege.web.server.logging.RequestFormatter.formatAddr;
-
-/**
- * Author: Matthew Horridge
- * Stanford University
- * Bio-Medical Informatics Research Group
- * Date: 19/01/2012 - *

- * A servlet for uploading files to web protege. - *

- *

- * If the upload succeeds then the server returns an HTTP 201 response (indicating that a new resource was created - * on the server) and the body of the response consists of the name of the file resource. The upload will fail if - * the content encoding is not multi-part. In this case, the server will return an HTTP 400 response code - * (indicating that the request was not well formed). If the file could not be created on the server for what ever - * reason, the server will return an HTTP 500 response code (internal server error) and the body of the response - * will contain an message that describes the problem. - *

- */ -@ApplicationSingleton -public class FileUploadServlet extends HttpServlet { - - public static final Logger logger = LoggerFactory.getLogger(FileUploadServlet.class); - - public static final String TEMP_FILE_PREFIX = "upload-"; - - public static final String TEMP_FILE_SUFFIX = ""; - - public static final String RESPONSE_MIME_TYPE = "text/html"; - - private final ApplicationNameSupplier applicationNameSupplier; - - private final MinioStorageService storageService; - - @Inject - public FileUploadServlet(@Nonnull ApplicationNameSupplier applicationNameSupplier, MinioStorageService storageService) { - this.applicationNameSupplier = checkNotNull(applicationNameSupplier); - this.storageService = storageService; - } - - @Override - @SuppressWarnings("unchecked") - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - WebProtegeSession webProtegeSession = new WebProtegeSessionImpl(req.getSession(), - null); - UserId userId = webProtegeSession.getUserInSession(); - // TODO: We used to check permission for upload here but this is done later now. Reconsider this. -// if(!accessManager.hasPermission(Subject.forUser(userId), -// ApplicationResource.get(), -// BuiltInAction.UPLOAD_PROJECT)) { -// sendErrorMessage(resp, "You do not have permission to upload files to " + applicationNameSupplier.get()); -// } - - logger.info("Received upload request from {} at {}", - webProtegeSession.getUserInSession(), - formatAddr(req)); - resp.setHeader("Content-Type", RESPONSE_MIME_TYPE); - try { - if (ServletFileUpload.isMultipartContent(req)) { - FileItemFactory factory = new DiskFileItemFactory(); - ServletFileUpload upload = new ServletFileUpload(factory); - // TODO: Set max upload size -// upload.setFileSizeMax(maxUploadSizeSupplier.get()); - List items = upload.parseRequest(req); - - for (FileItem item : items) { - if (!item.isFormField()) { - var tempFile = Files.createTempFile(TEMP_FILE_PREFIX, TEMP_FILE_SUFFIX); - item.write(tempFile.toFile()); - var fileId = storageService.storeUpload(tempFile); - long sizeInBytes = Files.size(tempFile); - logger.info("File size is {} bytes. Stored uploaded file with ID {}", sizeInBytes, fileId.getId()); - resp.setStatus(HttpServletResponse.SC_CREATED); - sendSuccessMessage(resp, fileId.getId()); - return; - } - } - resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not find form file item"); - } - else { - logger.info("Bad upload request: POST must be multipart encoding."); - resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "POST must be multipart encoding."); - } - - } - catch (FileUploadBase.FileSizeLimitExceededException | FileUploadBase.SizeLimitExceededException e) { - logger.info("File upload failed because the file exceeds the maximum allowed size."); - // TODO: Fix - long fileSizeInMB = 0;//maxUploadSizeSupplier.get() / (1024 * 1024); - sendErrorMessage(resp, String.format("The file that you attempted to upload is too large. " + - "Files must not exceed %d MB.", - fileSizeInMB)); - } - catch (FileUploadBase.FileUploadIOException | FileUploadBase.IOFileUploadException e) { - logger.info("File upload failed because an IOException occurred: {}", e.getMessage(), e); - sendErrorMessage(resp, "File upload failed because of an IOException"); - } - catch (FileUploadBase.InvalidContentTypeException e) { - logger.info("File upload failed because the content type was invalid: {}", e.getMessage()); - sendErrorMessage(resp, "File upload failed because the content type is invalid"); - } - catch (FileUploadException e) { - logger.info("File upload failed: {}", e.getMessage()); - sendErrorMessage(resp, "File upload failed"); - } catch (Exception e) { - logger.info("File upload failed because of an error when trying to write the file item: {}", e.getMessage(), e); - sendErrorMessage(resp, "File upload failed"); - } - } - - private void sendSuccessMessage(HttpServletResponse response, String fileName) throws IOException { - PrintWriter writer = response.getWriter(); - writeJSONPairs(writer, - new Pair(FileUploadResponseAttributes.RESPONSE_TYPE_ATTRIBUTE.name(), FileUploadResponseAttributes.RESPONSE_TYPE_VALUE_UPLOAD_ACCEPTED.name()), - new Pair(FileUploadResponseAttributes.UPLOAD_FILE_ID.name(), fileName)); - - } - - private void sendErrorMessage(HttpServletResponse response, String errorMessage) throws IOException { - writeJSONPairs(response.getWriter(), - new Pair(FileUploadResponseAttributes.RESPONSE_TYPE_ATTRIBUTE.name(), FileUploadResponseAttributes.RESPONSE_TYPE_VALUE_UPLOAD_REJECTED.name()), - new Pair(FileUploadResponseAttributes.UPLOAD_REJECTED_MESSAGE_ATTRIBUTE.name(), errorMessage) - ); - - } - - private void writeJSONPairs(PrintWriter printWriter, Pair ... pairs) { - printWriter.println("{"); - for(Iterator it = Arrays.asList(pairs).iterator(); it.hasNext(); ) { - Pair pair = it.next(); - String string = pair.getString(); - writeString(printWriter, string); - printWriter.print(" : "); - writeString(printWriter, pair.getValue()); - if(it.hasNext()) { - printWriter.println(","); - } - else { - printWriter.println(); - } - } - printWriter.println("}"); - printWriter.flush(); - } - - private void writeString(PrintWriter printWriter, String string) { - printWriter.print("\""); - printWriter.print(string); - printWriter.print("\""); - } - - private static class Pair { - - private final String string; - - private final String value; - - private Pair(String string, String value) { - this.string = string; - this.value = value; - } - - public String getString() { - return string; - } - - public String getValue() { - return value; - } - } - -} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java index dcca4cf358..2a3e1c07ca 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/Result.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.gwt.user.client.rpc.IsSerializable; import edu.stanford.bmir.protege.web.shared.app.GetApplicationSettingsResult; import edu.stanford.bmir.protege.web.shared.app.SetApplicationSettingsResult; @@ -44,6 +45,7 @@ import edu.stanford.bmir.protege.web.shared.sharing.GetProjectSharingSettingsResult; import edu.stanford.bmir.protege.web.shared.sharing.SetProjectSharingSettingsResult; import edu.stanford.bmir.protege.web.shared.tag.*; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileResult; import edu.stanford.bmir.protege.web.shared.usage.GetUsageResult; import edu.stanford.bmir.protege.web.shared.user.CreateUserAccountResult; import edu.stanford.bmir.protege.web.shared.user.LogOutUserResult; @@ -199,6 +201,7 @@ @JsonSubTypes.Type(SetProjectTagsResult.class), @JsonSubTypes.Type(SetSearchSettingsResult.class), @JsonSubTypes.Type(SetUserProjectEntityGraphSettingsResult.class), + @JsonSubTypes.Type(SubmitFileResult.class), @JsonSubTypes.Type(UpdateEntityTagsResult.class), @JsonSubTypes.Type(UpdateFormDescriptorResult.class), @JsonSubTypes.Type(UpdateClassFrameResult.class), diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java index cf3906ae49..525d52be6f 100644 --- a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/dispatch/RpcWhiteList.java @@ -62,6 +62,7 @@ import edu.stanford.bmir.protege.web.shared.sharing.*; import edu.stanford.bmir.protege.web.shared.shortform.*; import edu.stanford.bmir.protege.web.shared.tag.*; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileResult; import edu.stanford.bmir.protege.web.shared.usage.GetUsageAction; import edu.stanford.bmir.protege.web.shared.usage.GetUsageResult; import edu.stanford.bmir.protege.web.shared.user.CreateUserAccountAction; @@ -912,6 +913,8 @@ public class RpcWhiteList implements IsSerializable, Action, Result { SubFormControlDescriptor _SubFormControlDescriptor; + SubmitFileResult _SubmitFileResult; + Tag _Tag; TerminalNode _TerminalNode; diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileAction.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileAction.java new file mode 100644 index 0000000000..a361eb1b50 --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileAction.java @@ -0,0 +1,28 @@ +package edu.stanford.bmir.protege.web.shared.upload; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.google.auto.value.AutoValue; +import com.google.common.annotations.GwtCompatible; +import edu.stanford.bmir.protege.web.shared.dispatch.Action; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 2024-05-02 + */ +@GwtCompatible(serializable = true) +@AutoValue +@JsonTypeName("webprotege.files.SubmitFile") +public abstract class SubmitFileAction implements Action { + + @JsonCreator + public static SubmitFileAction create(String base64EncodedContents) { + return new AutoValue_SubmitFileAction(base64EncodedContents); + } + + @JsonProperty("fileContents") + public abstract String getBase64EncodedContents(); + +} diff --git a/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileResult.java b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileResult.java new file mode 100644 index 0000000000..8bddb0ed00 --- /dev/null +++ b/webprotege-gwt-ui-shared/src/main/java/edu/stanford/bmir/protege/web/shared/upload/SubmitFileResult.java @@ -0,0 +1,28 @@ +package edu.stanford.bmir.protege.web.shared.upload; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.google.auto.value.AutoValue; +import com.google.common.annotations.GwtCompatible; +import edu.stanford.bmir.protege.web.shared.csv.DocumentId; +import edu.stanford.bmir.protege.web.shared.dispatch.Result; + +/** + * Matthew Horridge + * Stanford Center for Biomedical Informatics Research + * 2024-05-02 + */ +@GwtCompatible(serializable = true) +@AutoValue +@JsonTypeName("webprotege.files.SubmitFile") +public abstract class SubmitFileResult implements Result { + + @JsonCreator + public static SubmitFileResult create(@JsonProperty("fileSubmissionId") DocumentId fileSubmissionId) { + return new AutoValue_SubmitFileResult(fileSubmissionId); + } + + public abstract DocumentId getFileSubmissionId(); + +} From 08de6ec45a3096591d709f9c214f03719f47e585 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 17 May 2024 09:15:05 -0700 Subject: [PATCH 23/24] Fixes for generic upload file dialog --- .../merge/UploadAndMergeProjectWorkflow.java | 38 +++++--- ...loadAndMergeAdditionsProjectsWorkflow.java | 19 ++-- .../upload/UploadFileDialogController.java | 87 +++++++++++++------ .../client/upload/UploadFileDialogForm.java | 4 + 4 files changed, 102 insertions(+), 46 deletions(-) diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge/UploadAndMergeProjectWorkflow.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge/UploadAndMergeProjectWorkflow.java index 98670c6dc9..ea812a1a0b 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge/UploadAndMergeProjectWorkflow.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge/UploadAndMergeProjectWorkflow.java @@ -1,8 +1,10 @@ package edu.stanford.bmir.protege.web.client.merge; import com.google.gwt.core.client.GWT; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager; import edu.stanford.bmir.protege.web.client.library.dlg.WebProtegeDialog; import edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController; +import edu.stanford.bmir.protege.web.client.upload.UploadFileDialogControllerFactory; import edu.stanford.bmir.protege.web.client.upload.UploadFileResultHandler; import edu.stanford.bmir.protege.web.shared.csv.DocumentId; import edu.stanford.bmir.protege.web.shared.project.ProjectId; @@ -22,9 +24,19 @@ public class UploadAndMergeProjectWorkflow { @Nonnull private final MergeUploadedProjectWorkflow mergeWorkflow; + @Nonnull + private final DispatchServiceManager dispatchServiceManager; + + @Nonnull + private final UploadFileDialogControllerFactory uploadFileDialogControllerFactory; + @Inject - public UploadAndMergeProjectWorkflow(@Nonnull MergeUploadedProjectWorkflow mergeWorkflow) { + public UploadAndMergeProjectWorkflow(@Nonnull MergeUploadedProjectWorkflow mergeWorkflow, + @Nonnull DispatchServiceManager dispatchServiceManager, + @Nonnull UploadFileDialogControllerFactory uploadFileDialogControllerFactory) { this.mergeWorkflow = checkNotNull(mergeWorkflow); + this.dispatchServiceManager = dispatchServiceManager; + this.uploadFileDialogControllerFactory = uploadFileDialogControllerFactory; } public void start(ProjectId projectId) { @@ -32,17 +44,19 @@ public void start(ProjectId projectId) { } private void uploadProject(final ProjectId projectId) { - UploadFileDialogController uploadFileDialogController = new UploadFileDialogController("Upload ontologies", new UploadFileResultHandler() { - @Override - public void handleFileUploaded(DocumentId fileDocumentId) { - startMergeWorkflow(projectId, fileDocumentId); - } - - @Override - public void handleFileUploadFailed(String errorMessage) { - GWT.log("Upload failed"); - } - }); + UploadFileDialogController uploadFileDialogController = uploadFileDialogControllerFactory.create( + "Upload ontologies", new UploadFileResultHandler() { + @Override + public void handleFileUploaded(DocumentId fileDocumentId) { + startMergeWorkflow(projectId, fileDocumentId); + } + + @Override + public void handleFileUploadFailed(String errorMessage) { + GWT.log("Upload failed"); + } + } + ); WebProtegeDialog.showDialog(uploadFileDialogController); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge_add/UploadAndMergeAdditionsProjectsWorkflow.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge_add/UploadAndMergeAdditionsProjectsWorkflow.java index 6084c93647..137c126a39 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge_add/UploadAndMergeAdditionsProjectsWorkflow.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/merge_add/UploadAndMergeAdditionsProjectsWorkflow.java @@ -10,6 +10,7 @@ import edu.stanford.bmir.protege.web.client.library.dlg.WebProtegeDialogButtonHandler; import edu.stanford.bmir.protege.web.client.library.dlg.WebProtegeDialogCloser; import edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController; +import edu.stanford.bmir.protege.web.client.upload.UploadFileDialogControllerFactory; import edu.stanford.bmir.protege.web.client.upload.UploadFileResultHandler; import edu.stanford.bmir.protege.web.shared.csv.DocumentId; import edu.stanford.bmir.protege.web.shared.merge_add.GetAllOntologiesAction; @@ -30,6 +31,9 @@ public class UploadAndMergeAdditionsProjectsWorkflow { @Nonnull private final DispatchServiceManager dispatchServiceManager; + @Nonnull + private final UploadFileDialogControllerFactory uploadFileDialogControllerFactory; + @Nonnull private final DispatchErrorMessageDisplay errorDisplay; @@ -39,10 +43,12 @@ public class UploadAndMergeAdditionsProjectsWorkflow { @Inject public UploadAndMergeAdditionsProjectsWorkflow(@Nonnull SelectOptionForMergeAdditionsWorkflow selectOptionsWorkflow, @Nonnull DispatchServiceManager dispatchServiceManager, + @Nonnull UploadFileDialogControllerFactory uploadFileDialogControllerFactory, @Nonnull DispatchErrorMessageDisplay errorDisplay, @Nonnull ProgressDisplay progressDisplay) { this.selectOptionsWorkflow = selectOptionsWorkflow; this.dispatchServiceManager = dispatchServiceManager; + this.uploadFileDialogControllerFactory = uploadFileDialogControllerFactory; this.errorDisplay = errorDisplay; this.progressDisplay = progressDisplay; } @@ -52,7 +58,7 @@ public void start(ProjectId projectId) { } private void uploadProject(final ProjectId projectId) { - UploadFileDialogController uploadFileDialogController = new UploadFileDialogController("Upload ontologies", new UploadFileResultHandler() { + UploadFileDialogController uploadFileDialogController = uploadFileDialogControllerFactory.create("Upload ontologies", new UploadFileResultHandler() { @Override public void handleFileUploaded(DocumentId fileDocumentId) { getOntologies(projectId, fileDocumentId); @@ -90,13 +96,10 @@ private void selectOntologies(ProjectId projectId, DocumentId documentId, GetAll SelectOntologiesForMergeView view = new SelectOntologiesForMergeViewImpl(list); SelectOntologiesForMergeDialogController controller = new SelectOntologiesForMergeDialogController(view); - controller.setDialogButtonHandler(DialogButton.OK, new WebProtegeDialogButtonHandler>() { - @Override - public void handleHide(List data, WebProtegeDialogCloser closer) { - List l = view.getSelectedOntologies(); - startSelectAdditionsWorkflow(projectId, documentId, list, l); - closer.hide(); - } + controller.setDialogButtonHandler(DialogButton.OK, (data, closer) -> { + List l = view.getSelectedOntologies(); + startSelectAdditionsWorkflow(projectId, documentId, list, l); + closer.hide(); }); WebProtegeDialog.showDialog(controller); } diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java index 22c76edb9c..34ce59d2ee 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogController.java @@ -1,10 +1,19 @@ package edu.stanford.bmir.protege.web.client.upload; +import com.google.auto.factory.AutoFactory; +import com.google.auto.factory.Provided; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.FormPanel; import com.google.gwt.user.client.ui.Widget; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchErrorMessageDisplay; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceCallbackWithProgressDisplay; +import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager; +import edu.stanford.bmir.protege.web.client.dispatch.ProgressDisplay; import edu.stanford.bmir.protege.web.client.library.dlg.*; import edu.stanford.bmir.protege.web.client.progress.ProgressMonitor; +import edu.stanford.bmir.protege.web.client.uuid.UuidV4; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileAction; +import edu.stanford.bmir.protege.web.shared.upload.SubmitFileResult; import javax.annotation.Nonnull; @@ -15,39 +24,65 @@ * Bio-Medical Informatics Research Group
* Date: 19/05/2013 */ +@AutoFactory public class UploadFileDialogController extends WebProtegeOKCancelDialogController { + private final DispatchServiceManager dispatch; + + private final DispatchErrorMessageDisplay errorMessageDisplay; + + private final ProgressDisplay progressDisplay; + private UploadFileDialogForm form = new UploadFileDialogForm(); - public UploadFileDialogController(String title, final UploadFileResultHandler resultHandler) { + public UploadFileDialogController(String title, + final UploadFileResultHandler resultHandler, + @Provided DispatchServiceManager dispatch, + @Provided DispatchErrorMessageDisplay errorMessageDisplay, + @Provided ProgressDisplay progressDisplay) { super(title); - setDialogButtonHandler(DialogButton.OK, new WebProtegeDialogButtonHandler() { - @Override - public void handleHide(String data, final WebProtegeDialogCloser closer) { - ProgressMonitor.get().showProgressMonitor("Uploading", "Uploading file"); - form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() { - public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) { - ProgressMonitor.get().hideProgressMonitor(); - GWT.log("Submittion of file is complete"); - FileUploadResponse result = new FileUploadResponse(event.getResults()); - if (result.wasUploadAccepted()) { - GWT.log("Successful upload"); - resultHandler.handleFileUploaded(result.getDocumentId()); - - } - else { - GWT.log("Upload rejected: " + result.getUploadRejectedMessage()); - resultHandler.handleFileUploadFailed(result.getUploadRejectedMessage()); - } - closer.hide(); - - } - }); - form.submit(); - } - }); + this.dispatch = dispatch; + this.errorMessageDisplay = errorMessageDisplay; + this.progressDisplay = progressDisplay; + setDialogButtonHandler(DialogButton.OK, (data, closer) -> handleButtonPress(resultHandler, closer)); + form.getFileUpload().getElement().setId(UuidV4.uuidv4()); } + private void handleButtonPress(UploadFileResultHandler resultHandler, WebProtegeDialogCloser closer) { + ProgressMonitor.get().showProgressMonitor("Preparing file", "Preparing file for upload. Please wait."); + FileUploadFileReader reader = new FileUploadFileReader(); + reader.readFiles(form.getFileUpload().getElement().getId(), + content -> { + dispatch.execute(SubmitFileAction.create(content), new DispatchServiceCallbackWithProgressDisplay(errorMessageDisplay, + progressDisplay) { + @Override + public String getProgressDisplayTitle() { + return "Uploading file"; + } + + @Override + public String getProgressDisplayMessage() { + return "Please wait"; + } + + @Override + public void handleSuccess(SubmitFileResult submitFileResult) { + closer.hide(); + resultHandler.handleFileUploaded(submitFileResult.getFileSubmissionId()); + } + + @Override + public void handleErrorFinally(Throwable throwable) { + closer.hide(); + resultHandler.handleFileUploadFailed("An error occurred uploading the file: " + throwable.getMessage()); + } + }); + }, + errorHandler -> { + ProgressMonitor.get().hideProgressMonitor(); + resultHandler.handleFileUploadFailed("An error occurred preparing the file for upload"); + }); + } @Nonnull @Override diff --git a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java index 85238a062f..30403bd1d0 100644 --- a/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java +++ b/webprotege-gwt-ui-client/src/main/java/edu/stanford/bmir/protege/web/client/upload/UploadFileDialogForm.java @@ -46,4 +46,8 @@ public String getValidationMessage() { return "A file name must be specified. Please specify a file name"; } } + + public FileUpload getFileUpload() { + return fileUpload; + } } From 39e615913b6e22804729fcd8873c38c9f0e1539b Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Fri, 17 May 2024 16:31:43 -0700 Subject: [PATCH 24/24] Split maven build and image build and push into two steps --- .github/workflows/pub-docker-hub.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pub-docker-hub.yaml b/.github/workflows/pub-docker-hub.yaml index ce6e49fcac..1cf335e11e 100644 --- a/.github/workflows/pub-docker-hub.yaml +++ b/.github/workflows/pub-docker-hub.yaml @@ -3,6 +3,7 @@ on: release: types: - published + workflow_dispatch: jobs: publish: @@ -22,8 +23,11 @@ jobs: server-id: docker.io server-username: DOCKER_USERNAME server-password: DOCKER_PASSWORD - - name: Publish package - run: mvn --batch-mode clean deploy + - name: Build package + run: mvn --batch-mode clean package + - name: Build and push image + run: mvn --batch-mode -pl webprotege-gwt-ui-server dockerfile:build dockerfile:push + env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} DOCKER_TOKEN: ${{secrets.DOCKER_PASSWORD}} \ No newline at end of file