graphdb-workbench 2.4.1-TR1 → 2.4.1-TR2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/108.83bb7ce803f462882200.bundle.js +1 -1
- package/dist/{11.04c9a9818ee92fbde029.bundle.js → 11.08c502782a3bd04cb48b.bundle.js} +1 -1
- package/dist/12.1b9d61202dccebfbec56.bundle.js +1 -1
- package/dist/168.34a1790ea589d9926a97.bundle.js +1 -1
- package/dist/170.d5527024ac9107b542c3.bundle.js +1 -1
- package/dist/173.5e3fea538a2a2d5b5c0c.bundle.js +1 -1
- package/dist/200.76fd30afe28687f92b15.bundle.js +1 -1
- package/dist/23.278dbb3fdef6b228e7a3.bundle.js +1 -1
- package/dist/29.26ba5c5ae01345659970.bundle.js +1 -1
- package/dist/36.8fb93862c497f344662c.bundle.js +1 -1
- package/dist/48.f8b0ea5f9306e24ac2d0.bundle.js +1 -1
- package/dist/{5.95798814242e9fc02db4.bundle.js → 5.adea5d522be945b9d8d3.bundle.js} +1 -1
- package/dist/{bundle.46911255e3d16f33633d.bundle.js → bundle.5d3051485fbd0a1f07ae.bundle.js} +4 -4
- package/dist/css/repositories.css +5 -0
- package/dist/i18n/locale-en.json +1 -0
- package/dist/i18n/locale-fr.json +1 -0
- package/dist/index.html +3 -3
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +6 -3
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +27 -27
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[168],{252:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/autocomplete-select.css?v=2.4.1-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[168],{252:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/autocomplete-select.css?v=2.4.1-TR2" rel="stylesheet"/>\n\n<div class="autocomplete-select-wrapper">\n <div class="autocomplete-select">\n <input type="text" ng-model="searchInput" ng-change="onChange()" ng-keydown="onKeyDown($event)"\n ng-blur="onBlur()"\n class="autocomplete-input" ng-class="styleClass" placeholder="{{placeholder}}">\n </div>\n <div class="autocomplete-results-wrapper card">\n <div ng-repeat="autoCompleteUriResult in autoCompleteUriResults track by $index"\n ng-click="selectResource(autoCompleteUriResult)"\n ng-mousemove="setActiveItemIndex($index)"\n ng-class="{active: activeSearchElm === $index, selected: selectedElementIndex === $index}"\n class="result-item">\n <p ng-bind-html="getResultItemHtml(autoCompleteUriResult)"></p>\n </div>\n </div>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[170],{254:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/operations-statuses-monitor.css?v=2.4.1-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[170],{254:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/operations-statuses-monitor.css?v=2.4.1-TR2" rel="stylesheet"/>\n\n<div ng-if="activeOperations && activeOperations.operations && activeOperations.operations.length > 0"\n class="operations-statuses btn-group">\n <button type="button" class="btn btn-secondary operations-statuses-dropdown-toggle dropdown-toggle" data-toggle="dropdown"\n ng-class="{\n \'btn-fade-danger\': OPERATION_STATUS.CRITICAL === activeOperations.status,\n \'btn-fade-warning\': OPERATION_STATUS.WARNING === activeOperations.status\n }">\n <div class="operation-status-header" ng-repeat="operation in activeOperations.operations"\n ng-if="OPERATION_TYPE.UPDATES !== operation.type">\n <div ng-class="{\n \'icon-import\': OPERATION_GROUP_TYPE.IMPORT_OPERATION === operation.operationGroup,\n \'icon-exchange\': OPERATION_GROUP_TYPE.QUERIES_OPERATION === operation.operationGroup,\n \'fa fa-archive\': OPERATION_GROUP_TYPE.BACKUP_AND_RESTORE_OPERATION === operation.operationGroup,\n \'fa fa-sitemap\': OPERATION_GROUP_TYPE.CLUSTER_OPERATION === operation.operationGroup,\n \'status-critical\': OPERATION_STATUS.CRITICAL === operation.status,\n \'status-information\': OPERATION_STATUS.INFORMATION === operation.status,\n \'status-warning\': OPERATION_STATUS.WARNING === operation.status}">\n </div>\n <span ng-if="operation.groupRunningOperationCount" class="running-operation-count">\n <sup class="tag-info">{{operation.groupRunningOperationCount}}</sup>\n </span>\n </div>\n <span class="caret"></span>\n </button>\n <ul role="menu" class="dropdown-menu dropdown-menu-right">\n <div class="operations-statuses-content">\n <li ng-repeat="operationStatus in activeOperations.operations">\n <a class="operation-status-content btn btn-secondary row" target="_blank" ng-attr-href="{{operationStatus.monitoringViewUrl}}"\n ng-class="{\n \'status-critical\': OPERATION_STATUS.CRITICAL === operationStatus.status,\n \'status-information\': OPERATION_STATUS.INFORMATION === operationStatus.status,\n \'status-warning\': OPERATION_STATUS.WARNING === operationStatus.status\n }">\n <div class="operation-icon col-sm-1" ng-style="noPadding">\n <div ng-class="{\n \'icon-import\': OPERATION_TYPE.IMPORTS === operationStatus.type,\n \'icon-exchange\': OPERATION_TYPE.QUERIES === operationStatus.type || OPERATION_TYPE.UPDATES === operationStatus.type,\n \'fa fa-archive\': OPERATION_TYPE.BACKUP_RESTORE === operationStatus.type,\n \'fa fa-sitemap\': OPERATION_TYPE.CLUSTER_STATUS === operationStatus.type}">\n </div>\n </div>\n <div class="col-sm-8 operation-status-label">\n {{ \'global.operations_statuses.\' + operationStatus.titleLabelKey + \'.title\' | translate }}\n </div>\n <div class="operation-number col-sm-3">\n <div ng-if="operationStatus.runningOperationCount" class="operation-status-running-operation-count tag-info">\n {{operationStatus.runningOperationCount}}\n </div>\n </div>\n </a>\n </li>\n </div>\n </ul>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[173],{257:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/rdf-resource-search.css?v=2.4.1-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[173],{257:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/rdf-resource-search.css?v=2.4.1-TR2" rel="stylesheet"/>\n\n<div ng-if="getActiveRepository() && hasActiveLocation() && isNotLoading()" ng-cloak>\n <div id="search-box" class="card search-rdf-input" ng-keydown="onKeyDown($event)" ng-if="!isHomePage()">\n <div class="card-block">\n <search-resource-input namespacespromise="getNamespacesPromise"\n autocompletepromisestatus="getAutocompletePromise"\n empty="empty"\n open-in-new-tab="true"\n preserve-search="true"\n radio-buttons="true"\n clear-input-icon="true">\n </search-resource-input>\n <button class="btn btn-link close-rdf-search-btn"\n gdb-tooltip="{{\'search.resource.close.msg\' | translate}}" tooltip-placement="bottom"\n ng-click="hideInput()">\n <i class="icon-close icon-2x" aria-hidden="true"></i>\n </button>\n </div>\n </div>\n <button class="btn btn-link search-rdf-btn"\n gdb-tooltip="{{\'search.resources.msg\' | translate}}"\n tooltip-placement="bottom"\n ng-click="showInput()">\n <i class="icon-search" aria-hidden="true"></i>\n </button>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[200],{284:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<script type="text/ng-template" id="popover-content-user.html">\n\t<h5>{{\'security.user.may\' | translate}}</h5>\n\t<ul>\n <li>{{\'security.use.gdb\' | translate}}</li>\n\t <li>{{\'security.grant.read.access\' | translate}}</li>\n\t\t<li>{{\'security.grant.read.write.access\' | translate}}</li>\n </ul>\n<\/script>\n\n<script type="text/ng-template" id="popover-content-repo-manager.html">\n\t<h5>{{\'security.repo.manager.may\' | translate}}</h5>\n\t<ul>\n\t\t<li>{{\'security.use.gdb\' | translate}}</li>\n\t\t<li>{{\'security.read.write.all.repos\' | translate}}</li>\n\t\t<li>{{\'security.create.edit.delete.repos\' | translate}}</li>\n\t\t<li>{{\'security.access.monitoring\' | translate}}</li>\n\t</ul>\n<\/script>\n\n<script type="text/ng-template" id="popover-content-admin.html">\n\t<h5>{{\'security.admin.may\' | translate}}</h5>\n\t<ul>\n\t\t<li>{{\'security.use.gdb\' | translate}}</li>\n\t\t<li>{{\'security.read.write.all.repos\' | translate}}</li>\n\t\t<li>{{\'security.create.edit.delete.repos\' | translate}}</li>\n\t\t<li>{{\'security.access.monitoring\' | translate}}</li>\n\t\t<li>{{\'security.attach.remote.locations\' | translate}}</li>\n\t\t<li>{{\'security.manage.users.access\' | translate}}</li>\n\t\t<li>{{\'security.manage.cluster\' | translate}}</li>\n\t\t<li>{{\'security.view.sys.info\' | translate}}</li>\n\t</ul>\n<\/script>\n\n<link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=2.4.1-TR1" rel="stylesheet"/>\n\n<h1>{{pageTitle}}</h1>\n\n<div id="wb-user" ng-hide="loader">\n\t<form name="form" class="form newUserForm userForm editUserContainer" ng-submit="submit()" novalidate>\n\t\t<div class="row">\n\t\t\t<div class="col-md-6 us-left-col">\n\t\t\t\t<div class="card login-credentials" ng-hide="isOverrideAuth() || !isLocalAuthentication()">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'view.login.title\' | translate}}</h3>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': usernameError}">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.table.username\' | translate}}"><em class="icon-user icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-username" placeholder="{{\'security.table.username\' | translate}}" name="username" class="form-control form-control-lg" type="text" ng-model="user.username" ng-readonly="mode !== \'add\'">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="usernameError" class="form-control-feedback">{{usernameError}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': passwordError}">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.password.placeholder\' | translate}}"><em class="icon-lock icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-password" placeholder="{{passwordPlaceholder | translate}}" name="password" class="form-control form-control-lg" type="password"\tng-model="user.password" ng-hide="user.external || hasExternalAuthUser()" ng-readonly="noPassword">\n\t\t\t\t\t\t\t\t<span ng-show="user.external || hasExternalAuthUser()">{{\'security.auth.from.external.module\' | translate}}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="passwordError" class="form-control-feedback">{{passwordError}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': confirmPasswordError}" ng-hide="user.external || hasExternalAuthUser()">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.password.confirm\' | translate}}"><em class="icon-lock icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-confirmpassword" placeholder="{{\'security.password.confirm\' | translate}}" name="password_confirm" class="form-control form-control-lg" type="password" ng-model="user.confirmpassword" ng-readonly="noPassword">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="confirmPasswordError" class="form-control-feedback">{{confirmPasswordError}}</div>\n\t\t\t\t\t\t</div>\n <div>\n <label class="d-block">\n <input type="checkbox" id="noPassword" ng-model="noPassword" ng-change="setNoPassword()">\n <span ng-show="mode === \'add\'">{{\'security.dont.set.password\' | translate}} </span>\n <span ng-show="mode !== \'add\'">{{\'security.unset.password\' | translate}} </span>\n </label>\n </div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="card sparql-editor-settings" id="user-settings">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.user.settings\' | translate}}</h3>\n\n\t\t\t\t\t\t<div id="sameas-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="sameas-label">\n\t\t\t\t\t\t\t\t{{\'security.expand.sameAs.is\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_SAMEAS ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_SAMEAS ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span gdb-tooltip="{{shouldDisableSameAs() ? \'core.require.inferred\' : \'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n\t\t\t\t\t\t\t\t ng-click="user.appSettings.DEFAULT_SAMEAS = !user.appSettings.DEFAULT_SAMEAS"\n\t\t\t\t\t\t\t\t class="switch mr-0">\n\t\t\t\t\t\t\t\t<input id="sameAsCheck" type="checkbox" class="switch"\n ng-checked="user.appSettings.DEFAULT_SAMEAS"\n ng-disabled="shouldDisableSameAs()"/>\n\t\t\t\t\t\t\t\t<label for="sameas-on"></label>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{{\'security.default.editor.graph\' | translate}}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id="inference-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="inference-label">\n\t\t\t\t\t\t\t\t{{\'security.inference.is\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_INFERENCE ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_INFERENCE ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span gdb-tooltip="{{\'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n\t\t\t\t\t\t\t\t ng-click="user.appSettings.DEFAULT_INFERENCE = !user.appSettings.DEFAULT_INFERENCE"\n\t\t\t\t\t\t\t\t class="switch mr-0">\n\t\t\t\t\t\t\t\t<input type="checkbox" class="switch" ng-checked="user.appSettings.DEFAULT_INFERENCE"/>\n\t\t\t\t\t\t\t\t<label for="inference-on"></label>\n\t\t\t\t\t\t\t</span>\n {{\'security.default.editor.graph\' | translate}}\n\t\t\t\t\t\t</div>\n\n <div id="schema-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="schema-label">\n\t\t\t\t\t\t\t\t{{\'security.show.schema\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n <span gdb-tooltip="{{\'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n ng-click="user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA = !user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA"\n class="switch mr-0">\n\t\t\t\t\t\t\t\t<input type="checkbox" class="switch" ng-checked="user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA"/>\n\t\t\t\t\t\t\t\t<label for="schema-on"></label>\n\t\t\t\t\t\t\t</span>\n {{\'security.default.visual.graph\' | translate}}\n\t\t\t\t\t\t\t</span>\n </div>\n\n\t\t\t\t\t\t<label class="d-block">\n\t\t\t\t\t\t\t<input type="checkbox" ng-model="user.appSettings.EXECUTE_COUNT" id="defaultCount" checked="appSettings.EXECUTE_COUNT">\n\t\t\t\t\t\t\t{{\'security.count.total.results\' | translate}}\n\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t<label class="d-block">\n\t\t\t\t\t\t\t<input type="checkbox" ng-model="user.appSettings.IGNORE_SHARED_QUERIES" id="ignore-shared" checked="appSettings.IGNORE_SHARED_QUERIES">\n\t\t\t\t\t\t\t{{\'security.ignore.shared.queries\' | translate}}\n\t\t\t\t\t\t</label>\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="card" id="workbench-settings" ng-if="showWorkbenchSettings">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.workbench.settings.title\' | translate}}\n\t\t\t\t\t\t\t<em class="icon-info text-tertiary small" gdb-tooltip="{{\'security.workbench.settings.theme.tooltip\' | translate}}"></em></h3>\n\t\t\t\t\t\t<div>\n <div class="form-group">\n <label class="col-lg-2">{{\'security.workbench.settings.theme.label\' | translate}}</label>\n <div class="btn-group theme-selector-dropdown" uib-dropdown>\n <button type="button" class="btn btn-sm btn-secondary dropdown-toggle theme-selector-dropdown-btn" uib-dropdown-toggle>\n {{selectedTheme.label}}\n </button>\n <ul class="dropdown-menu" role="menu">\n <li ng-repeat="theme in themes">\n <a ng-click="setTheme(theme)" class="dropdown-item">{{theme.label}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class="form-group">\n <label class="col-lg-2">{{\'security.workbench.settings.theme.mode.label\' | translate}}</label>\n <div class="radio">\n <label class="px-1">\n <input type="radio" value="light" ng-model="workbenchSettings.mode" ng-change="setThemeMode()"/>\n {{\'security.workbench.settings.theme.mode.light\' | translate}}\n </label>\n <label class="px-1">\n <input type="radio" value="dark" ng-model="workbenchSettings.mode" ng-change="setThemeMode()"/>\n {{\'security.workbench.settings.theme.mode.dark\' | translate}}\n </label>\n </div>\n </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="col-md-6 us-right-col" ng-hide="!isLocalAuthentication()">\n\t\t\t\t<div class="card user-role" id="user-roles">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.user.role\' | translate}}</h3>\n\t\t\t\t\t\t<label class="mr-1"\n\t\t\t\t\t\t\t uib-popover-template="\'popover-content-user.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleUser" value="user" ng-disabled="hasEditRestrictions()" >\n\t\t\t\t\t\t\t{{\'security.user.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label class="mr-1"\n\t\t\t\t\t\t\t uib-popover-template="\'popover-content-repo-manager.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleRepoAdmin" value="repoManager" ng-disabled="hasEditRestrictions()">\n\t\t\t\t\t\t\t{{\'security.repo.manager.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label uib-popover-template="\'popover-content-admin.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleAdmin" value="admin" ng-disabled="hasEditRestrictions()">\n\t\t\t\t\t\t\t{{\'security.admin.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n <div class="card user-custom-roles" id="user-custom-roles">\n <div class="card-block">\n <h3>{{\'security.user.custom_role\' | translate}}</h3>\n <div class="input-group">\n <tags-input class="wb-tags-input" ng-model="customRoles" min-length="2"\n ng-disabled="!isUser() || mode === \'settings\'"\n use-strings="true"\n add-on-space="true"\n add-on-comma="true"\n on-tag-added="addCustomRole($tag)"\n placeholder="{{\'security.user.add.custom_role.msg\' | translate}}"></tags-input>\n </div>\n </div>\n </div>\n\n\t\t\t\t<div id="user-repos" class="card user-repositories">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.repo.rights\' | translate}}</h3>\n\t\t\t\t\t\t<div class="has-danger">\n\t\t\t\t\t\t\t<p ng-show="repositoryCheckError" class="form-control-feedback">\n\t\t\t\t\t\t\t\t{{\'security.user.rights\' | translate}}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n <div class="scrollable-table">\n <table class="table table-hover table-sm" aria-describedby="User rights table">\n <thead>\n <tr>\n <th id="repositoryIdColumn">{{\'security.repository.title\' | translate}}</th>\n <th id="readRightsColumn" class="text-xs-center"><em class="icon-eye icon-lg" gdb-tooltip="{{\'security.tooltip.read\' | translate}}"></em></th>\n <th id="writeRightColumn" class="text-xs-center"><em class="icon-edit icon-lg" gdb-tooltip="{{\'security.tooltip.write\' | translate}}"></em></th>\n </tr>\n <tr>\n <th>{{\'security.any.data.repo\' | translate}}\n <em class="icon-info text-tertiary" gdb-tooltip="{{\'security.data.repos\' | translate}}"></em>\n </th>\n <th class="text-xs-center">\n <input class="read" type="checkbox" ng-model="grantedAuthorities.READ_REPO[\'*\']" ng-checked="hasReadPermission(\'*\')" ng-disabled="readCheckDisabled(\'*\')" ng-click="setGrantedAuthorities()">\n </th>\n <th class="text-xs-center">\n <input class="write" type="checkbox" ng-model="grantedAuthorities.WRITE_REPO[\'*\']" ng-checked="hasWritePermission(\'*\')" ng-disabled="writeCheckDisabled(\'*\')" ng-click="setGrantedAuthorities()">\n </th>\n </tr>\n </thead>\n <tbody>\n <div>\n <tr ng-repeat="repository in getReadableRepositories() | orderBy: [\'location\', \'id\']">\n <td class="repository-name">{{repository.id}}<small> · {{repository.location ? repository.location : \'Local\'}}</small></td>\n <td class="text-xs-center read-rights"><input class="read" type="checkbox" ng-model="grantedAuthorities.READ_REPO[createUniqueKey(repository)]" ng-checked="hasReadPermission(repository)" ng-disabled="readCheckDisabled(repository)" ng-click="setGrantedAuthorities()"></td>\n <td class="text-xs-center write-rights"><input class="write" type="checkbox" ng-model="grantedAuthorities.WRITE_REPO[createUniqueKey(repository)]" ng-checked="hasWritePermission(repository)" ng-disabled="writeCheckDisabled(repository)" ng-click="setGrantedAuthorities()"></td>\n </tr>\n </div>\n </tbody>\n </table>\n </div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n </div>\n\t\t</div>\n\n\t\t<div class="text-right">\n <button id="wb-user-goBack" class="btn btn-secondary" type="button" ng-click="goBack()">{{\'common.cancel.btn\' | translate}}</button>\n <button id="wb-user-submit" class="btn btn-primary" type="submit">{{saveButtonText}}</button>\n\t\t</div>\n\t</form>\n</div>\n<div class="ot-loader ot-main-loader" onto-loader size="50" ng-show="loader"></div>\n\n\n\n';return __p}}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[200],{284:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<script type="text/ng-template" id="popover-content-user.html">\n\t<h5>{{\'security.user.may\' | translate}}</h5>\n\t<ul>\n <li>{{\'security.use.gdb\' | translate}}</li>\n\t <li>{{\'security.grant.read.access\' | translate}}</li>\n\t\t<li>{{\'security.grant.read.write.access\' | translate}}</li>\n </ul>\n<\/script>\n\n<script type="text/ng-template" id="popover-content-repo-manager.html">\n\t<h5>{{\'security.repo.manager.may\' | translate}}</h5>\n\t<ul>\n\t\t<li>{{\'security.use.gdb\' | translate}}</li>\n\t\t<li>{{\'security.read.write.all.repos\' | translate}}</li>\n\t\t<li>{{\'security.create.edit.delete.repos\' | translate}}</li>\n\t\t<li>{{\'security.access.monitoring\' | translate}}</li>\n\t</ul>\n<\/script>\n\n<script type="text/ng-template" id="popover-content-admin.html">\n\t<h5>{{\'security.admin.may\' | translate}}</h5>\n\t<ul>\n\t\t<li>{{\'security.use.gdb\' | translate}}</li>\n\t\t<li>{{\'security.read.write.all.repos\' | translate}}</li>\n\t\t<li>{{\'security.create.edit.delete.repos\' | translate}}</li>\n\t\t<li>{{\'security.access.monitoring\' | translate}}</li>\n\t\t<li>{{\'security.attach.remote.locations\' | translate}}</li>\n\t\t<li>{{\'security.manage.users.access\' | translate}}</li>\n\t\t<li>{{\'security.manage.cluster\' | translate}}</li>\n\t\t<li>{{\'security.view.sys.info\' | translate}}</li>\n\t</ul>\n<\/script>\n\n<link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=2.4.1-TR2" rel="stylesheet"/>\n\n<h1>{{pageTitle}}</h1>\n\n<div id="wb-user" ng-hide="loader">\n\t<form name="form" class="form newUserForm userForm editUserContainer" ng-submit="submit()" novalidate>\n\t\t<div class="row">\n\t\t\t<div class="col-md-6 us-left-col">\n\t\t\t\t<div class="card login-credentials" ng-hide="isOverrideAuth() || !isLocalAuthentication()">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'view.login.title\' | translate}}</h3>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': usernameError}">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.table.username\' | translate}}"><em class="icon-user icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-username" placeholder="{{\'security.table.username\' | translate}}" name="username" class="form-control form-control-lg" type="text" ng-model="user.username" ng-readonly="mode !== \'add\'">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="usernameError" class="form-control-feedback">{{usernameError}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': passwordError}">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.password.placeholder\' | translate}}"><em class="icon-lock icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-password" placeholder="{{passwordPlaceholder | translate}}" name="password" class="form-control form-control-lg" type="password"\tng-model="user.password" ng-hide="user.external || hasExternalAuthUser()" ng-readonly="noPassword">\n\t\t\t\t\t\t\t\t<span ng-show="user.external || hasExternalAuthUser()">{{\'security.auth.from.external.module\' | translate}}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="passwordError" class="form-control-feedback">{{passwordError}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="form-group" ng-class="{\'has-danger\': confirmPasswordError}" ng-hide="user.external || hasExternalAuthUser()">\n\t\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t\t<span class="input-group-addon" gdb-tooltip="{{\'security.password.confirm\' | translate}}"><em class="icon-lock icon-2x text-muted"></em></span>\n\t\t\t\t\t\t\t\t<input id="wb-user-confirmpassword" placeholder="{{\'security.password.confirm\' | translate}}" name="password_confirm" class="form-control form-control-lg" type="password" ng-model="user.confirmpassword" ng-readonly="noPassword">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ng-show="confirmPasswordError" class="form-control-feedback">{{confirmPasswordError}}</div>\n\t\t\t\t\t\t</div>\n <div>\n <label class="d-block">\n <input type="checkbox" id="noPassword" ng-model="noPassword" ng-change="setNoPassword()">\n <span ng-show="mode === \'add\'">{{\'security.dont.set.password\' | translate}} </span>\n <span ng-show="mode !== \'add\'">{{\'security.unset.password\' | translate}} </span>\n </label>\n </div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="card sparql-editor-settings" id="user-settings">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.user.settings\' | translate}}</h3>\n\n\t\t\t\t\t\t<div id="sameas-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="sameas-label">\n\t\t\t\t\t\t\t\t{{\'security.expand.sameAs.is\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_SAMEAS ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_SAMEAS ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span gdb-tooltip="{{shouldDisableSameAs() ? \'core.require.inferred\' : \'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n\t\t\t\t\t\t\t\t ng-click="user.appSettings.DEFAULT_SAMEAS = !user.appSettings.DEFAULT_SAMEAS"\n\t\t\t\t\t\t\t\t class="switch mr-0">\n\t\t\t\t\t\t\t\t<input id="sameAsCheck" type="checkbox" class="switch"\n ng-checked="user.appSettings.DEFAULT_SAMEAS"\n ng-disabled="shouldDisableSameAs()"/>\n\t\t\t\t\t\t\t\t<label for="sameas-on"></label>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{{\'security.default.editor.graph\' | translate}}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id="inference-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="inference-label">\n\t\t\t\t\t\t\t\t{{\'security.inference.is\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_INFERENCE ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_INFERENCE ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span gdb-tooltip="{{\'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n\t\t\t\t\t\t\t\t ng-click="user.appSettings.DEFAULT_INFERENCE = !user.appSettings.DEFAULT_INFERENCE"\n\t\t\t\t\t\t\t\t class="switch mr-0">\n\t\t\t\t\t\t\t\t<input type="checkbox" class="switch" ng-checked="user.appSettings.DEFAULT_INFERENCE"/>\n\t\t\t\t\t\t\t\t<label for="inference-on"></label>\n\t\t\t\t\t\t\t</span>\n {{\'security.default.editor.graph\' | translate}}\n\t\t\t\t\t\t</div>\n\n <div id="schema-on" class="mb-1">\n\t\t\t\t\t\t\t<span class="schema-label">\n\t\t\t\t\t\t\t\t{{\'security.show.schema\' | translate}}\n\t\t\t\t\t\t\t\t<span class="tag {{user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA ? \'tag-primary\' : \'tag-default\'}}">\n\t\t\t\t\t\t\t\t\t{{user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA ? \'common.on.btn\' : \'common.off.btn\' | translate}}\n\t\t\t\t\t\t\t\t</span>\n <span gdb-tooltip="{{\'security.tooltip.click.me\' | translate}}" tooltip-placement="top"\n ng-click="user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA = !user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA"\n class="switch mr-0">\n\t\t\t\t\t\t\t\t<input type="checkbox" class="switch" ng-checked="user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA"/>\n\t\t\t\t\t\t\t\t<label for="schema-on"></label>\n\t\t\t\t\t\t\t</span>\n {{\'security.default.visual.graph\' | translate}}\n\t\t\t\t\t\t\t</span>\n </div>\n\n\t\t\t\t\t\t<label class="d-block">\n\t\t\t\t\t\t\t<input type="checkbox" ng-model="user.appSettings.EXECUTE_COUNT" id="defaultCount" checked="appSettings.EXECUTE_COUNT">\n\t\t\t\t\t\t\t{{\'security.count.total.results\' | translate}}\n\t\t\t\t\t\t</label>\n\n\t\t\t\t\t\t<label class="d-block">\n\t\t\t\t\t\t\t<input type="checkbox" ng-model="user.appSettings.IGNORE_SHARED_QUERIES" id="ignore-shared" checked="appSettings.IGNORE_SHARED_QUERIES">\n\t\t\t\t\t\t\t{{\'security.ignore.shared.queries\' | translate}}\n\t\t\t\t\t\t</label>\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="card" id="workbench-settings" ng-if="showWorkbenchSettings">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.workbench.settings.title\' | translate}}\n\t\t\t\t\t\t\t<em class="icon-info text-tertiary small" gdb-tooltip="{{\'security.workbench.settings.theme.tooltip\' | translate}}"></em></h3>\n\t\t\t\t\t\t<div>\n <div class="form-group">\n <label class="col-lg-2">{{\'security.workbench.settings.theme.label\' | translate}}</label>\n <div class="btn-group theme-selector-dropdown" uib-dropdown>\n <button type="button" class="btn btn-sm btn-secondary dropdown-toggle theme-selector-dropdown-btn" uib-dropdown-toggle>\n {{selectedTheme.label}}\n </button>\n <ul class="dropdown-menu" role="menu">\n <li ng-repeat="theme in themes">\n <a ng-click="setTheme(theme)" class="dropdown-item">{{theme.label}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class="form-group">\n <label class="col-lg-2">{{\'security.workbench.settings.theme.mode.label\' | translate}}</label>\n <div class="radio">\n <label class="px-1">\n <input type="radio" value="light" ng-model="workbenchSettings.mode" ng-change="setThemeMode()"/>\n {{\'security.workbench.settings.theme.mode.light\' | translate}}\n </label>\n <label class="px-1">\n <input type="radio" value="dark" ng-model="workbenchSettings.mode" ng-change="setThemeMode()"/>\n {{\'security.workbench.settings.theme.mode.dark\' | translate}}\n </label>\n </div>\n </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="col-md-6 us-right-col" ng-hide="!isLocalAuthentication()">\n\t\t\t\t<div class="card user-role" id="user-roles">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.user.role\' | translate}}</h3>\n\t\t\t\t\t\t<label class="mr-1"\n\t\t\t\t\t\t\t uib-popover-template="\'popover-content-user.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleUser" value="user" ng-disabled="hasEditRestrictions()" >\n\t\t\t\t\t\t\t{{\'security.user.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label class="mr-1"\n\t\t\t\t\t\t\t uib-popover-template="\'popover-content-repo-manager.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleRepoAdmin" value="repoManager" ng-disabled="hasEditRestrictions()">\n\t\t\t\t\t\t\t{{\'security.repo.manager.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label uib-popover-template="\'popover-content-admin.html\'"\n\t\t\t\t\t\t\t popover-trigger="mouseenter"\n\t\t\t\t\t\t\t popover-placement="bottom">\n\t\t\t\t\t\t\t<input type="radio" ng-model="userType" id="roleAdmin" value="admin" ng-disabled="hasEditRestrictions()">\n\t\t\t\t\t\t\t{{\'security.admin.label\' | translate}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n <div class="card user-custom-roles" id="user-custom-roles">\n <div class="card-block">\n <h3>{{\'security.user.custom_role\' | translate}}</h3>\n <div class="input-group">\n <tags-input class="wb-tags-input" ng-model="customRoles" min-length="2"\n ng-disabled="!isUser() || mode === \'settings\'"\n use-strings="true"\n add-on-space="true"\n add-on-comma="true"\n on-tag-added="addCustomRole($tag)"\n placeholder="{{\'security.user.add.custom_role.msg\' | translate}}"></tags-input>\n </div>\n </div>\n </div>\n\n\t\t\t\t<div id="user-repos" class="card user-repositories">\n\t\t\t\t\t<div class="card-block">\n\t\t\t\t\t\t<h3>{{\'security.repo.rights\' | translate}}</h3>\n\t\t\t\t\t\t<div class="has-danger">\n\t\t\t\t\t\t\t<p ng-show="repositoryCheckError" class="form-control-feedback">\n\t\t\t\t\t\t\t\t{{\'security.user.rights\' | translate}}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n <div class="scrollable-table">\n <table class="table table-hover table-sm" aria-describedby="User rights table">\n <thead>\n <tr>\n <th id="repositoryIdColumn">{{\'security.repository.title\' | translate}}</th>\n <th id="readRightsColumn" class="text-xs-center"><em class="icon-eye icon-lg" gdb-tooltip="{{\'security.tooltip.read\' | translate}}"></em></th>\n <th id="writeRightColumn" class="text-xs-center"><em class="icon-edit icon-lg" gdb-tooltip="{{\'security.tooltip.write\' | translate}}"></em></th>\n </tr>\n <tr>\n <th>{{\'security.any.data.repo\' | translate}}\n <em class="icon-info text-tertiary" gdb-tooltip="{{\'security.data.repos\' | translate}}"></em>\n </th>\n <th class="text-xs-center">\n <input class="read" type="checkbox" ng-model="grantedAuthorities.READ_REPO[\'*\']" ng-checked="hasReadPermission(\'*\')" ng-disabled="readCheckDisabled(\'*\')" ng-click="setGrantedAuthorities()">\n </th>\n <th class="text-xs-center">\n <input class="write" type="checkbox" ng-model="grantedAuthorities.WRITE_REPO[\'*\']" ng-checked="hasWritePermission(\'*\')" ng-disabled="writeCheckDisabled(\'*\')" ng-click="setGrantedAuthorities()">\n </th>\n </tr>\n </thead>\n <tbody>\n <div>\n <tr ng-repeat="repository in getReadableRepositories() | orderBy: [\'location\', \'id\']">\n <td class="repository-name">{{repository.id}}<small> · {{repository.location ? repository.location : \'Local\'}}</small></td>\n <td class="text-xs-center read-rights"><input class="read" type="checkbox" ng-model="grantedAuthorities.READ_REPO[createUniqueKey(repository)]" ng-checked="hasReadPermission(repository)" ng-disabled="readCheckDisabled(repository)" ng-click="setGrantedAuthorities()"></td>\n <td class="text-xs-center write-rights"><input class="write" type="checkbox" ng-model="grantedAuthorities.WRITE_REPO[createUniqueKey(repository)]" ng-checked="hasWritePermission(repository)" ng-disabled="writeCheckDisabled(repository)" ng-click="setGrantedAuthorities()"></td>\n </tr>\n </div>\n </tbody>\n </table>\n </div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n </div>\n\t\t</div>\n\n\t\t<div class="text-right">\n <button id="wb-user-goBack" class="btn btn-secondary" type="button" ng-click="goBack()">{{\'common.cancel.btn\' | translate}}</button>\n <button id="wb-user-submit" class="btn btn-primary" type="submit">{{saveButtonText}}</button>\n\t\t</div>\n\t</form>\n</div>\n<div class="ot-loader ot-main-loader" onto-loader size="50" ng-show="loader"></div>\n\n\n\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{109:function(e,t,n){"use strict";n.r(t);var r=n(297),i=n.n(r),a=n(308),o=n(300),s=n(301);n(10);function l(e,t,n,r,l,c,d,u,f,h,p,v,y){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(d,g,m){!function(d,g){var m=d3.layout.pack().size([780,780]).value((function(e){return e.size})),x=d3.scale.linear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),w=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function S(){return w.append("svg:g").attr({id:"main-group",transform:"translate(400,400)"})}function C(){return"true"===p.get(v.CLASS_HIERARCHY_HIDE_PREFIXES)}function E(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=2.4.1-TR1");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"class-hierarchy-"+c.getActiveRepository()+".svg"})}d.hidePrefixes=C();var T,R,A=S();if(!d.classHierarchyData.classCount&&c.getActiveRepository()&&!c.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=p.get("classHierarchy-selectedGraph-"+c.getActiveRepository());n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&u.warning(y.instant("graphexplore.update.diagram"),y.instant("graphexplore.repository.data.changed")),d.classHierarchyData=t,d3.select("#download-svg").on("mouseover",E)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(y.instant("graphexplore.error.request.failed",{name:h,error:getError(t)}))}))}var H,P,I,b,k,F,L,D,N={};function z(n,s,c,u){I&&I(),b&&b(),d3.selectAll("#main-group").remove(),A=S(),a.a.SingleChild.addPlaceholders(n,!0),P=c||n;var p,v=m.nodes(n);P.isInFocusTransitive=!0,a.a.SingleChild.removePlaceholders(v),a.a.SingleChild.centerNodes(v),a.a.SingleChild.makePositionsRelativeToZero(v);var y=i()().attr("class","d3-tip").customPosition((function(e){return{top:"inherit",bottom:r.innerHeight-d3.event.clientY+"px",right:r.innerWidth-d3.event.clientX+"px"}})).html((function(e){return e.name}));w.call(y);var g=A.selectAll("circle").data(v).enter().append("g");s.doFade&&g.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)}));var C,E=[],k=g.append("circle").attr("class",(function(e){return e.role})).attr("guide-selector",(function(e){return"class-"+e.name})).style("fill",(function(e){return e.children?x(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.name!==h){var t=e.name;E.push({name:t}),N[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(){s.noPrefixes||e.textHidden?y.show(e):y.hide(e)})),e.circle.on("mouseout",y.hide)}})).on("gdb-focus",R).on("gdb-zoom",B);function F(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),C=e}function L(){d.showClassInfoPanel=!1}E&&(E=_.uniqBy(E,"name"),d.flattenedClassNames=E);var D=o.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call(D);R=function(e){B(e),e.name===h?(L(),d3.selectAll(".selected").classed("selected",!1)):(F(e),d.selectedClass=C,d.showClassInfoPanel=!0,d.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},D.on("click",(function(e){e.id&&r.history.pushState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),y.hide(),R(e)})),D.on("dblclick",(function(t){t!==n&&(y.hide(),F(t),e.$broadcast("goToDomainRangeGraphView",C,P),d3.event.stopPropagation())}));var $=0;w.on("wheel",(function(){y.hide();var e=d3.event;e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-$>100){$=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var i=e.target.__data__;if(i||(i=P),"in"===n){if(i!==P){for(;i.parent&&!i.parent.isInFocusTransitive;)i=i.parent;i.depth<P.depth&&(i=P)}if(i===P&&i.children){for(var a=i.children[0],o=1;o<i.children.length;o++)i.children[o].sortingRank>a.sortingRank&&(a=i.children[o]);a.children&&(i=a)}else i.children||(i=i.parent);B(i,!0)}else"out"===n&&(i=P.parent)&&B(i,!0);P.name===h&&r.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),O()}}));var z=A.selectAll("text").data(v).enter().append("text").attr("class",(function(e){return e.children&&e.children.length?"label":"label child-label"})).each((function(e){e.textSel=d3.select(this)}));s.noPrefixes?(H!==n&&(z.each((function(e){var t=e.name.indexOf(":");e.name.indexOf("http://")>-1?e.noPrefixName=e.name:t>-1&&(e.noPrefixName=e.name.substring(t+1))})),H=n),z.style("font-size",(function(e){return o.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):z.style("font-size",(function(e){return o.a.Text.calcFontSize(e.name,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r/3)})),z.style("display",(function(e){return e.parent===n?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&z.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)})),T=function(){function e(e){e&&k.each((function(t){e==t.id&&R(t)}))}var n=t.hash();r.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var U=A.selectAll("circle, text");function M(e,t){var n=800/e[2];p=e,U.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),k.attr("r",(function(e){return e.r*n})),t&&z.each((function(e){e.fullName!==P.topLevelParentUri&&P.topLevelParentUri!==h||(e.textSel.style("display","none"),P.children&&P.children.length?_.each(P.children,(function(e){e.textSel.style("display","inline")})):P.textSel.style("display","inline"),P.parent&&_.each(P.parent.children,(function(e){e.name!==P.name&&e.textSel.style("display","inline")})))})),z.style("font-size",(function(e){return s.noPrefixes?o.a.Text.calcFontSize(e.noPrefixName,e.r*n):o.a.Text.calcFontSize(e.name,e.r*n)})).text((function(e){return s.noPrefixes?o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r*n/3)}))}function V(e){var t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive||(e.textHidden=!0,this.style.display="none")}function Y(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive&&(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display="")}function B(e,t){if(l((function(){d.showExternalElements=e.name===h})),P!==e&&(e.id&&r.history.replaceState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),e.children||(e=e.parent,P!==e))){if(t&&(L(),d3.selectAll(".selected").classed("selected",!1)),P.parent)for(var n=P;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=n.children,n=n.parent;if(2*(P=e).r/(2*P.r+20)<.3||d.currentSliderValue>d.currentBrowserLimit)M([P.x,P.y,V(P.r)]),z.each((function(e){W.call(this,e),Y.call(this,e)}));else d3.transition().duration(f).tween("zoom",(function(e){var t=d3.interpolateZoom(p,[P.x,P.y,V(P.r)]);return function(e){M(t(e))}})).selectAll("text").each("start",W).each("end",Y)}}M([P.x,P.y,V(P.r)],u),I=d.$on("rootFocus",(function(){r.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),R(n)})),b=d.$on("classSearch",(function(e){R(e)}))}function O(){var t=d.classHierarchyData.classCount;let n=p.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,p.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",O),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",O),window.removeEventListener("beforeunload",e)})),d.$watch("classHierarchyData",(function(){k&&k(),F&&F(),L&&L(),D&&D();var e=C();if(d.classHierarchyData.classCount){O();var t=angular.copy(d.classHierarchyData);var n,r,i=function(e){return m.nodes(e).sort((function(e,t){return e.sortingRank>t.sortingRank?-1:e.sortingRank<t.sortingRank||e.depth>t.depth?1:e.depth<t.depth?-1:0}))}(t);function a(e,t){var i={keepPrevState:!0,noPrefixes:C()};r=i.noPrefixes,z(n||e,i,P,!0),l((function(){p.set(v.CLASS_HIERARCHY_SWITCH_PREFIXES,t),T()}),70)}function o(e,i,o){if(e){p.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:h,children:[]};for(var s=new Set,l=1;l<=e;l++)s.add(i[l].id),i[l].parent===i[0]&&n.children.push(i[l]);if(function e(t){if(t.children){for(var n=[],r=0;r<t.children.length;r++)s.has(t.children[r].id)&&n.push($.extend({},t.children[r]));t.children=n;for(r=0;r<t.children.length;r++)e(t.children[r])}}(n),o)r=angular.isUndefined(r)?C():r,z(n,{noPrefixes:r});else a(t)}}var s,c=p.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)o(c,i);else{var u={doFade:!0,keepPrevState:!0,noPrefixes:C()};z(t,u),T()}k=d.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:l((function(){!function(e){angular.isUndefined(e)||p.set(v.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),a(t,!0)}),50)}),!0),F=d.$watch("currentSliderValue",(function(e){o(e,i,!0)}),!0),D=d.$on("onEnterKeypressSearchAction",(function(e){s&&R(s)})),L=d.$on("searchedClass",(function(e,t){(s=N[t.name])&&R(s)}))}}),!0)}(d)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},297:function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,a=null,o=null,s=null;function l(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,a=i.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(o=r.pop());var i,a=n.apply(this,r),u=t.apply(this,r),h=e.apply(this,r),p=f(),v=d.length,y=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,m=s.apply(this,r);for(p.html(a).style({opacity:1,"pointer-events":"all"});v--;)p.classed(d[v],!1);return i=c.get(h).apply(this),m?p.style(m):p.classed(h,!0).style({top:i.top+u[0]+y+"px",left:i.left+u[1]+g+"px"}),l},l.hide=function(){return f().style({opacity:0,"pointer-events":"none"}),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(f(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),l):n},l.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),l):s},l.destroy=function(){return r&&(f().remove(),r=null),l};var c=d3.map({n:function(){var e=h();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=h();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=h();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=h();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=h();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=h();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=h();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=h();return{top:e.se.y,left:e.e.x}}}),d=c.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function h(){for(var e=o||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,l=r.x,c=r.y;return a.x=l,a.y=c,t.nw=a.matrixTransform(n),a.x+=i,t.ne=a.matrixTransform(n),a.y+=s,t.se=a.matrixTransform(n),a.x-=i,t.sw=a.matrixTransform(n),a.y-=s/2,t.w=a.matrixTransform(n),a.x+=i,t.e=a.matrixTransform(n),a.x-=i/2,a.y-=s/2,t.n=a.matrixTransform(n),a.y+=s,t.s=a.matrixTransform(n),t}return l}})?r.apply(t,i):r)||(e.exports=a)},300:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,a;i=n,a=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-a[0],2),Math.pow(i[1]-a[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},301:function(e,t,n){"use strict";var r=r||{};r.Export={getCSSRules:function(e){var t=$('link[href="'+e+'"]')[0].sheet.rules,n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},308:function(e,t,n){"use strict";var r=r||{};r.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var r=0;r<t.children.length;r++)e(t.children[r]);if(1===t.children.length){var i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.name?t.splice(n,1):r.children&&e(r.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var r=n.x-n.children[0].x;n.children[0].x+=r,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{109:function(e,t,n){"use strict";n.r(t);var r=n(297),i=n.n(r),a=n(308),o=n(300),s=n(301);n(10);function l(e,t,n,r,l,c,d,u,f,h,p,v,y){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(d,g,m){!function(d,g){var m=d3.layout.pack().size([780,780]).value((function(e){return e.size})),x=d3.scale.linear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),w=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function S(){return w.append("svg:g").attr({id:"main-group",transform:"translate(400,400)"})}function C(){return"true"===p.get(v.CLASS_HIERARCHY_HIDE_PREFIXES)}function E(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=2.4.1-TR2");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"class-hierarchy-"+c.getActiveRepository()+".svg"})}d.hidePrefixes=C();var T,R,A=S();if(!d.classHierarchyData.classCount&&c.getActiveRepository()&&!c.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=p.get("classHierarchy-selectedGraph-"+c.getActiveRepository());n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&u.warning(y.instant("graphexplore.update.diagram"),y.instant("graphexplore.repository.data.changed")),d.classHierarchyData=t,d3.select("#download-svg").on("mouseover",E)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(y.instant("graphexplore.error.request.failed",{name:h,error:getError(t)}))}))}var H,P,I,b,k,F,L,D,N={};function z(n,s,c,u){I&&I(),b&&b(),d3.selectAll("#main-group").remove(),A=S(),a.a.SingleChild.addPlaceholders(n,!0),P=c||n;var p,v=m.nodes(n);P.isInFocusTransitive=!0,a.a.SingleChild.removePlaceholders(v),a.a.SingleChild.centerNodes(v),a.a.SingleChild.makePositionsRelativeToZero(v);var y=i()().attr("class","d3-tip").customPosition((function(e){return{top:"inherit",bottom:r.innerHeight-d3.event.clientY+"px",right:r.innerWidth-d3.event.clientX+"px"}})).html((function(e){return e.name}));w.call(y);var g=A.selectAll("circle").data(v).enter().append("g");s.doFade&&g.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)}));var C,E=[],k=g.append("circle").attr("class",(function(e){return e.role})).attr("guide-selector",(function(e){return"class-"+e.name})).style("fill",(function(e){return e.children?x(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.name!==h){var t=e.name;E.push({name:t}),N[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(){s.noPrefixes||e.textHidden?y.show(e):y.hide(e)})),e.circle.on("mouseout",y.hide)}})).on("gdb-focus",R).on("gdb-zoom",B);function F(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),C=e}function L(){d.showClassInfoPanel=!1}E&&(E=_.uniqBy(E,"name"),d.flattenedClassNames=E);var D=o.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call(D);R=function(e){B(e),e.name===h?(L(),d3.selectAll(".selected").classed("selected",!1)):(F(e),d.selectedClass=C,d.showClassInfoPanel=!0,d.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},D.on("click",(function(e){e.id&&r.history.pushState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),y.hide(),R(e)})),D.on("dblclick",(function(t){t!==n&&(y.hide(),F(t),e.$broadcast("goToDomainRangeGraphView",C,P),d3.event.stopPropagation())}));var $=0;w.on("wheel",(function(){y.hide();var e=d3.event;e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-$>100){$=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var i=e.target.__data__;if(i||(i=P),"in"===n){if(i!==P){for(;i.parent&&!i.parent.isInFocusTransitive;)i=i.parent;i.depth<P.depth&&(i=P)}if(i===P&&i.children){for(var a=i.children[0],o=1;o<i.children.length;o++)i.children[o].sortingRank>a.sortingRank&&(a=i.children[o]);a.children&&(i=a)}else i.children||(i=i.parent);B(i,!0)}else"out"===n&&(i=P.parent)&&B(i,!0);P.name===h&&r.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),O()}}));var z=A.selectAll("text").data(v).enter().append("text").attr("class",(function(e){return e.children&&e.children.length?"label":"label child-label"})).each((function(e){e.textSel=d3.select(this)}));s.noPrefixes?(H!==n&&(z.each((function(e){var t=e.name.indexOf(":");e.name.indexOf("http://")>-1?e.noPrefixName=e.name:t>-1&&(e.noPrefixName=e.name.substring(t+1))})),H=n),z.style("font-size",(function(e){return o.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):z.style("font-size",(function(e){return o.a.Text.calcFontSize(e.name,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r/3)})),z.style("display",(function(e){return e.parent===n?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&z.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)})),T=function(){function e(e){e&&k.each((function(t){e==t.id&&R(t)}))}var n=t.hash();r.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var U=A.selectAll("circle, text");function M(e,t){var n=800/e[2];p=e,U.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),k.attr("r",(function(e){return e.r*n})),t&&z.each((function(e){e.fullName!==P.topLevelParentUri&&P.topLevelParentUri!==h||(e.textSel.style("display","none"),P.children&&P.children.length?_.each(P.children,(function(e){e.textSel.style("display","inline")})):P.textSel.style("display","inline"),P.parent&&_.each(P.parent.children,(function(e){e.name!==P.name&&e.textSel.style("display","inline")})))})),z.style("font-size",(function(e){return s.noPrefixes?o.a.Text.calcFontSize(e.noPrefixName,e.r*n):o.a.Text.calcFontSize(e.name,e.r*n)})).text((function(e){return s.noPrefixes?o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r*n/3)}))}function V(e){var t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive||(e.textHidden=!0,this.style.display="none")}function Y(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive&&(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display="")}function B(e,t){if(l((function(){d.showExternalElements=e.name===h})),P!==e&&(e.id&&r.history.replaceState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),e.children||(e=e.parent,P!==e))){if(t&&(L(),d3.selectAll(".selected").classed("selected",!1)),P.parent)for(var n=P;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=n.children,n=n.parent;if(2*(P=e).r/(2*P.r+20)<.3||d.currentSliderValue>d.currentBrowserLimit)M([P.x,P.y,V(P.r)]),z.each((function(e){W.call(this,e),Y.call(this,e)}));else d3.transition().duration(f).tween("zoom",(function(e){var t=d3.interpolateZoom(p,[P.x,P.y,V(P.r)]);return function(e){M(t(e))}})).selectAll("text").each("start",W).each("end",Y)}}M([P.x,P.y,V(P.r)],u),I=d.$on("rootFocus",(function(){r.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),R(n)})),b=d.$on("classSearch",(function(e){R(e)}))}function O(){var t=d.classHierarchyData.classCount;let n=p.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,p.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",O),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",O),window.removeEventListener("beforeunload",e)})),d.$watch("classHierarchyData",(function(){k&&k(),F&&F(),L&&L(),D&&D();var e=C();if(d.classHierarchyData.classCount){O();var t=angular.copy(d.classHierarchyData);var n,r,i=function(e){return m.nodes(e).sort((function(e,t){return e.sortingRank>t.sortingRank?-1:e.sortingRank<t.sortingRank||e.depth>t.depth?1:e.depth<t.depth?-1:0}))}(t);function a(e,t){var i={keepPrevState:!0,noPrefixes:C()};r=i.noPrefixes,z(n||e,i,P,!0),l((function(){p.set(v.CLASS_HIERARCHY_SWITCH_PREFIXES,t),T()}),70)}function o(e,i,o){if(e){p.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:h,children:[]};for(var s=new Set,l=1;l<=e;l++)s.add(i[l].id),i[l].parent===i[0]&&n.children.push(i[l]);if(function e(t){if(t.children){for(var n=[],r=0;r<t.children.length;r++)s.has(t.children[r].id)&&n.push($.extend({},t.children[r]));t.children=n;for(r=0;r<t.children.length;r++)e(t.children[r])}}(n),o)r=angular.isUndefined(r)?C():r,z(n,{noPrefixes:r});else a(t)}}var s,c=p.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)o(c,i);else{var u={doFade:!0,keepPrevState:!0,noPrefixes:C()};z(t,u),T()}k=d.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:l((function(){!function(e){angular.isUndefined(e)||p.set(v.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),a(t,!0)}),50)}),!0),F=d.$watch("currentSliderValue",(function(e){o(e,i,!0)}),!0),D=d.$on("onEnterKeypressSearchAction",(function(e){s&&R(s)})),L=d.$on("searchedClass",(function(e,t){(s=N[t.name])&&R(s)}))}}),!0)}(d)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},297:function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,a=null,o=null,s=null;function l(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,a=i.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(o=r.pop());var i,a=n.apply(this,r),u=t.apply(this,r),h=e.apply(this,r),p=f(),v=d.length,y=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,m=s.apply(this,r);for(p.html(a).style({opacity:1,"pointer-events":"all"});v--;)p.classed(d[v],!1);return i=c.get(h).apply(this),m?p.style(m):p.classed(h,!0).style({top:i.top+u[0]+y+"px",left:i.left+u[1]+g+"px"}),l},l.hide=function(){return f().style({opacity:0,"pointer-events":"none"}),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(f(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),l):n},l.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),l):s},l.destroy=function(){return r&&(f().remove(),r=null),l};var c=d3.map({n:function(){var e=h();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=h();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=h();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=h();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=h();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=h();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=h();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=h();return{top:e.se.y,left:e.e.x}}}),d=c.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function h(){for(var e=o||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,l=r.x,c=r.y;return a.x=l,a.y=c,t.nw=a.matrixTransform(n),a.x+=i,t.ne=a.matrixTransform(n),a.y+=s,t.se=a.matrixTransform(n),a.x-=i,t.sw=a.matrixTransform(n),a.y-=s/2,t.w=a.matrixTransform(n),a.x+=i,t.e=a.matrixTransform(n),a.x-=i/2,a.y-=s/2,t.n=a.matrixTransform(n),a.y+=s,t.s=a.matrixTransform(n),t}return l}})?r.apply(t,i):r)||(e.exports=a)},300:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,a;i=n,a=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-a[0],2),Math.pow(i[1]-a[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},301:function(e,t,n){"use strict";var r=r||{};r.Export={getCSSRules:function(e){var t=$('link[href="'+e+'"]')[0].sheet.rules,n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},308:function(e,t,n){"use strict";var r=r||{};r.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var r=0;r<t.children.length;r++)e(t.children[r]);if(1===t.children.length){var i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.name?t.splice(n,1):r.children&&e(r.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var r=n.x-n.children[0].x;n.children[0].x+=r,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[29,130],{107:function(e,t,n){"use strict";n.r(t);n(6);var r=n(300),i=n(297),o=n.n(i),a=(n(10),n(76));function s(e,t,n,i,s,c,l,d,u,p,f,h,g,m,y,v,x,S,I,w,k,L,C){e.languageChanged=!1,e.propertiesObj={},e.propertiesQueryObj={},e.propertiesObj.items=[],e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=f.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder")})),e.onopen=e.onclose=()=>angular.noop(),e.embedded&&(f.search().query||f.search().uri||f.search().config||f.search().saved)&&(e.noGoHome=!0);const T={};let b=0,N=0,P={},A=0;const M=d3.behavior.zoom().scaleExtent([.5,10]);let E;let G,R;function O(){return C.isActive()?e.defaultSettings:e.saveSettings}function j(e){m.openCopyToClipboardModal(e)}function z(){e.settings.languagesMap=_.map(e.settings.languages,(function(e){return{text:e}})),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,(function(e){return{text:e}})),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,(function(e){return{text:e}})),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,(function(e){return{text:e}})),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,(function(e){return{text:e}}))}t.key="",T.get=function(t,n,r){return g.initLazyList(t,n,r,b,e.propertiesObj.items)},t.$watch((function(){return t.key}),(function(){b=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&b++})),N++})),T.revision=function(){return N},e.datasource=T,e.adapterContainer={adapter:{remain:!0}},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder"),e.propertiesFilterFunc=function(t){return t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0},e.resetState=function(){e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,P={},A=0},e.pushHistory=function(t,n){e.embedded&&(t.embedded=!0),f.search(t),f.state(n)},e.goToHome=function(){e.resetState(),f.url("graphs-visualizations")},e.shouldShowSettings=function(){return e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id},e.shouldDisableSameAs=function(){const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.$watch("propertiesObj.items",(function(){angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),500)})),e.toggleMoreInfo=function(e){angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=j,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=angular.copy(e.defaultSettings),p.when(h.getPrincipal()).then(t=>function(t){const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=x.get(S.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch(t){e.saveSettings=angular.copy(e.defaultSettings),x.set(S.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=angular.copy(e.defaultSettings)}(t)),e.resetSettings=function(){e.settings=angular.copy(e.defaultSettings),e.validateLinksLimit(),z()},e.changeLimit=function(t){let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=function(){e.invalidLimit=!a.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=function(){e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=angular.copy(e.saveSettings):e.settings=angular.copy(e.defaultSettings),z()},e.reExpandNode=function(){e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)};const D=function(t,n,r){const i=O(),o=void 0===n?i.sameAsState:!0===n,a=void 0===r?i.includeInferred:!0===r;e.loading=!0,l({url:"rest/explore-graph/graph",method:"POST",headers:{"Content-Type":"application/json"},data:{query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:a,sameAsState:o}}).then((function(e){pe(e)}),(function(t){e.loading=!1,s.error(getError(t.data),L.instant("graphexplore.error.cannot.load.graph"))}))};function F(e){return e.replace(/[()']/g,"")}function B(e,t){let n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")}function W(e){return[e.source.iri,e.target.iri].join(">")}function U(e){if(e.isTriple){let t=document.getElementById(F(B(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x}function q(e){if(e.isTriple){let t=document.getElementById(F(B(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y}function H(e){let t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`}function V(e){return F(`${e.source.isTriple?B(e.source.iri,!0):e.source.iri}>${e.target.isTriple?B(e.target.iri,!0):e.target.iri}>marker`)}function K(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,(function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)})),_.each(this.links,(function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0}))},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,(function(e){let n,r;n=e.isTripleSource?Se(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?Se(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?B(i.source.iri):i.source.iri}>${i.target.isTriple?B(i.target.iri):i.target.iri}`;if(Z.tripleLinksCopy.has(e)){let t=Z.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),Z.tripleLinksCopy.set(e,t),null}Z.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of Z.tripleLinksCopy.keys())1===Z.tripleLinksCopy.get(e).length&&Z.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,(function(t){return t.source.iri===e.iri||t.target.iri===e.iri}))}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,(function(t){return t.source.iri===e.iri?t.target.types:t.source.types}));return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,(function(e){return e.predicates}));return _.uniq(_.flatten(i))},this.removeTriples=function(e){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=B(n.source.iri),o=B(n.target.iri);if(i===e&&Z.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let a=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return a&&(Z.tripleLinksCopy.delete(`${i}>${o}`),Z.tripleLinksCopy.delete(`${o}>${i}`)),a})))}),t.forEach(e=>{this.links=_.reject(this.links,(function(t){return t.source.iri===e.source&&t.target.iri===e.target}))})},this.removeNode=function(n){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(B(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t})),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,(function(e){return 0===t(e,i)})),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let a=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!a){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;a=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return a&&(o.target.isTriple&&r.push(B(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),a})),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,(function(n){return 0===t(n,i)&&n.iri!==e.iri})),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;let r=B(e.iri);if(this.tripleNodes.has(r)){let t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,(function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:angular.copy(e.labels),types:angular.copy(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}})),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,(function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:A,type2color:P,scale:M.scale(),translate:M.translate()}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=angular.copy(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,(function(t){t.fixed&&e.numberOfPinnedNodes++})),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(A=t.colorIndex,P=angular.copy(t.type2color)),angular.isDefined(t.translate)&&angular.isDefined(t.scale)&&(E="translate("+t.translate[0]+", "+t.translate[1]+") scale("+t.scale+")",M.translate(t.translate),M.scale(t.scale)),se()}}e.updateSettings=function(){e.invalidLimit?s.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,(function(e){return e.text})),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,(function(e){return e.text})),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,(function(e){return e.text})),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,(function(e){return e.text})),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,(function(e){return e.text})),e.rootNodeIri?e.reExpandNode(e.rootNodeIri):e.queryResultsMode&&f.search().query?D(f.search().query,f.search().sameAs,f.search().inference):"query"===e.configLoaded.startMode&&e.loadGraphConfig(e.configLoaded),O().showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none"),e.showInfoPanel=!1,e.showFilter=!1,x.set(S.GRAPHS_VIZ,e.saveSettings))},e.showInfoPanel=!1;let Z=new K;e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},e.getGraphConfigs=function(t){w.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.graph.configs.short.msg"))}))},e.loadConfigForId=function(t,n){t===e.defaultGraphConfig.id?e.loadGraphConfig(e.defaultGraphConfig):w.getConfig(t).success((function(t){e.loadGraphConfig(t),n()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.could.not.load.config",{configId:t}))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=function(t){e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.loadGraphConfig=function(t){e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?c((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,w.loadGraphForConfig(t,t.startQueryIncludeInferred,O().linksLimit,t.startQuerySameAs).then((function(e){pe(e)}),(function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.graph.load"))})))},e.deleteConfig=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){w.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=function(t){e.pushHistory({config:t.id},{config:t}),e.resetState(),e.loadGraphConfig(t)},v.onpopstate=function(t){e.resetState(),t.state&&(t.state.config?(e.loadGraphConfig(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))};const Q=function(){f.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,D(f.search().query,f.search().sameAs,f.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0;const r=O();angular.isDefined(n)&&(e.rootNodeIri=n,l({url:"rest/explore-graph/node",method:"GET",params:{iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}}).then((function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),Z=new K;const n=Z.addNode(t.data,500,500);E="translate(0, -70) scale(1)",M.translate([0,-70]),M.scale(1),he(n,!0)})).catch((function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.could.not.load.graph"))})))})),f.search().uri&&e.openUri(f.search().uri,!0),f.search().saved&&I.getSavedGraph(f.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.could.not.open"))}))},J=function(){f.search().config?e.loadConfigForId(f.search().config,Q):f.search().query||f.search().uri?(e.loadGraphConfig(e.defaultGraphConfig),Q()):Q()};function Y(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(J),e.getNamespacesPromise=k.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),X()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.view.will.not.work"))})))}function X(){i.isLicenseValid()&&(e.getAutocompletePromise=u.checkAutocompleteStatus())}e.replaceIRIWithPrefix=function(t){const n=e.namespaces,r=_.findLast(n,(function(e){return 0===t.indexOf(e.uri)}));return r?r.prefix+":"+t.substring(r.uri.length):t},e.addedTag=function(t){return t.text.indexOf(":")<0?(s.warning(L.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=d.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?s.warning(L.instant("graphexplore.absolute.prefixed.iri.option"),t):s.warning(L.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return s.warning(L.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return s.warning(L.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return i.isLicenseValid()},e.hasInitedRepository=!1,e.$on("autocompleteStatus",(function(){X()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),Y(n.newRepo),n.newRepo&&(e.resetState(),$(".graph-visualization svg").empty(),f.search().query&&(e.goToHome(),Q()))})),Y();const ee=d3.scale.linear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),te=d3.scale.linear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(P[e])&&(P[e]=A,A++);const t=P[e];return t>39?"#c2c2c2":t%2==0?ee(t/2):te(t/2)};const ne=d3.layout.force().gravity(.07).size([1e3,1e3]),re=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 1000 1000").attr("preserveAspectRatio","xMidYMid meet");let ie=0,oe=0;const ae=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.select(t).append("circle").attr("cx",(function(){return e.x})).attr("cy",(function(){return e.y})).attr("class","loader-container").attr("r",(function(){return e.size})).style("fill","fff").style("opacity","0.7"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=2.4.1-TR1").attr("x",(function(){return e.x-e.size+5})).attr("y",(function(){return e.y-e.size})).attr("width",(function(){return 2*e.size})).attr("height",(function(){return 2*e.size})).attr("class","node-loader")}};function se(t){d3.selectAll("svg g").remove(),d3.selectAll("svg rect").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),M.on("zoom",(function(){if(C.isActive())return;E="translate("+d3.event.translate+") scale("+d3.event.scale+")",n.attr("transform",E)})),re.append("rect").attr("width",1e4).attr("height",1e4).attr("x",-4500).attr("y",-4500).style("fill","none").style("pointer-events","all").call(M).on("click",(function(){d3.event.stopPropagation(),ge(),ne.stop()}));const n=re.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(E)&&!t?E:""})),i=o()().attr("class","d3-tip").customPosition((function(){const e=G.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i> '),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),a=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return we(t);if(n<10)return" · "+we(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+L.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let l;const d=o()().attr("class","d3-tip").customPosition((function(e){const t=l.getBoundingClientRect(),n=function(e){const t=a(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return a(e)}));const u=function(){c.cancel(void 0),c.cancel(ie),G=null,i.hide(),oe=c((function(){ge()}),500)};re.call(i);re.call(d);let p=re.selectAll(".link"),f=re.selectAll(".node");ne.nodes(Z.nodes).charge(-3e3),ne.links(Z.links).linkDistance((function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness})),n.append("defs").selectAll("marker").data(ne.links()).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return V(e)})).attr("viewBox","0 -5 10 10").attr("refX",(function(e){return e.target.isTriple?11:e.target.size+11})).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),p=n.selectAll(".link").data(Z.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return F(W(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${V(e)})`}));const h=n.selectAll(".link-wrapper").append("text").text((function(e){return Ie(e)})).attr("class",(function(e){return e.predicates.length>1||Z.tripleNodes.has(W(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",O().showLinksText?"":"none").on("mouseover",(function(e){d3.event.stopPropagation(),function(e){c.cancel(void 0);const t=l=d3.event.target;c((function(){l===t&&e.predicates.length>1&&d.show(e,l)}),300)}(e)})).on("mouseout",(function(){c.cancel(void 0),l=null,d.hide()})).on("click",(function(t){d3.event.stopPropagation(),function(t){xe();let n=W(t);if(1===t.predicates.length&&Z.tripleNodes.has(n)){R=null;let e=Z.tripleNodes.get(n)[0];if(de(e,this,d3.event.button)){let t={};t.iri=e.iri,t.pred=we(e.iri.split(" ")[1]),ye(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,R===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(R=null);R=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){let n=function(e,t){let n=W(t);return Z.tripleNodes.has(n)?Z.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:we(e),partOfTriple:r,linkId:r?W(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(t)}(t)}));let g,m=0,y=0,v=0;const x=function(){d3.event.button&&0!==d3.event.button||(u(),c.cancel(g),e.showPredicates=!1,d3.event.timeStamp-m<500?y++:y=1,m=d3.event.timeStamp,d3.event.preventDefault())},S=function(t,n,r){Z.countLinks(t,Z.links)<=O().linksLimit?he(t,!1,r||this.parentNode):s.info(L.instant("graphexplore.increase.limit"),L.instant("graphexplore.node.at.max")),e.closeInfoPanel()},I=function(e){if(d3.event.button&&0!==d3.event.button)return;c.cancel(g);const t=d3.event,n=this;C.isActive()||d3.event.timeStamp-m<500&&(1===y?g=c((function(){de(e,n,t)}),540-(d3.event.timeStamp-m)):2===y&&S(e,0,n.parentNode)),d3.event.preventDefault()};function w(e,t){let r,i,o,a,s=!0;if("down"===t)r=2*e.size,i=e.size/3,o=.8,a=.3;else if("down-fixed"===t)r=2*e.size,i=e.size,o=.8,a=.66;else if("up"===t)r=e.size/3,i=2*e.size,o=.3,a=.8;else{if("fixed"!==t)return;r=e.size,o=.66,s=!1}let c=n.selectAll(".node-wrapper").filter((function(t){return t===e})).append("text").text("").classed("icon-any pinned",!0).style("font-size",r+"px").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).attr("opacity",o);"fixed"!==t&&"down-fixed"!==t||(e.pin=c),s&&(c=c.transition().duration(1e3).style("font-size",(function(){return i+"px"})).attr("opacity",a),"down-fixed"!==t&&c.remove())}const k=d3.behavior.drag().origin((function(e){return e})).on("dragstart",(function(e){if(C.isActive())return;0===d3.event.sourceEvent.button&&(e.fixedBeforeDrag=e.fixed,e.isBeingDragged=!0,e.beginDragging=!0,ge(),d3.event.sourceEvent.stopPropagation(),d3.select(this).classed("dragging",!0))})).on("drag",(function(t){t.isBeingDragged&&(y=0,t.px=d3.event.x,t.py=d3.event.y,t.fixed?t.beginDragging&&w(t,"fixed"):(e.numberOfPinnedNodes++,t.fixed=!0,w(t,"down-fixed")),t.pinWasFixed=!0,t.beginDragging=null,ne.resume())})).on("dragend",(function(e){e.isBeingDragged&&(e.pinWasFixed&&(e.pinWasFixed=null,d3.select(".pinned").remove()),e.isBeingDragged=!1,d3.select(this).classed("dragging",!1))}));f=n.selectAll(".node").data(Z.nodes).enter().append("g").attr("class","node-wrapper").attr("id",(function(e){return e.iri})).append("circle").attr("class","node").attr("r",(function(e){return e.size})).style("fill",(function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])})).call(k).on("mouseover",(function(t){if(!t.isBeingDragged){const n=d3.event;c.cancel(oe),ie=c(()=>{(function(t,n){if(e.showInfoPanel)return!1;(le.closeIcon||le.expandIcon||le.focusIcon||le.copyURIIcon)&&le.removeIcons();if(ne.alpha()<.02)return le.initIcons(t,n.parentNode),ne.stop(),ce(),!0;return!1})(t,this)&&function(e,t){c.cancel(void 0);const n=G=t.target;c((function(){G===n&&i.show(e,G)}),300)}(t,n)},400)}})).on("mouseout",u).on("mousedown",x).on("touchstart",(function(e){x(),v=0,g=c((function(){v<5&&ue(e),g=null,y=0}),1e3)})).on("touchmove",(function(){v++})).on("mouseup",I).on("touchend",I).on("contextmenu",(function(t){d3.event.shiftKey||(d3.event.preventDefault(),ge(),e.closeInfoPanel(),t.fixed?(e.numberOfPinnedNodes--,t.fixed=!1,w(t,"up"),ne.resume()):(e.numberOfPinnedNodes++,t.fixed=!0,w(t,"down")),function(e){G&&i.show(e,G)}(t))})).on("gdb-expand-node",S).on("gdb-show-node-info",me);const T=n.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*1.75}));n.insert("g").attr("class","menu-events"),function(e){e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,16,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),c((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)}(T),ne.on("tick",(function(){d3.geom.quadtree(Z.nodes);Z.nodes.length;p.attr("x1",(function(e){return U(e.source)})).attr("y1",(function(e){return q(e.source)})).attr("x2",(function(e){return U(e.target)})).attr("y2",(function(e){return q(e.target)})),h.attr("x",(function(e){let t=U(e.source),n=U(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=q(e.source),n=q(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:U(e.source),y:q(e.source)},r={x:U(e.target),y:q(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),f.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),n.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),n.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),T.attr("x",(function(e){return e.x-1.75*e.size})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})),ce()})),angular.isDefined(ae)&&ae.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){let r=F(n.source.iri),i=F(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),ne.start()}function ce(){t.d3alpha=ne.alpha()}se();const le=new function(){function e(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(n,r){const i=o()().attr("class","d3-tip d3-actions-tip").customPosition((function(){const e=d3.event.target.getBoundingClientRect();return{top:e.top-20+"px",left:e.right+10+"px"}})).html((function(e){return e}));re.call(i);n.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return e(20,n)})),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--primary-color)"),this.collapseIcon.on("click",(function(){var e;(e=n).isExpanded=!1,Z.removeNodeLeafLinks(e),se()})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(ie),c.cancel(oe)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return e(20,n)})),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--primary-color)"),this.expandIcon.on("click",(function(){he(n,!1,r)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return e(20,n)})),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--primary-color)"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",n.iri)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return e(20,n)})),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--primary-color)"),this.copyURIIcon.on("click",(function(){j(n.iri),ge(),i.hide()})).on("mouseover",(function(){i.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+n.iri+"</div>"),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return e(20,n)})),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--primary-color)"),this.closeIcon.on("click",(function(){ue(n)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.animateMenu(n)},this.animateMenu=function(t){let n=0;let r=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.expandedState=!0}};function de(n,r,i){return e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(ue(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(me(n),!0)}function ue(e){Z.removeNode(e),se()}function pe(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),Z=new K,E="translate(0, -70) scale(1)",M.translate([0,-70]),M.scale(1)}(t),fe(t)}function fe(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(Z.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));let o=[];const a=Z.tripleLinksCopy.values();for(let e=0;e<Z.tripleLinksCopy.size;e++){a.next().value.forEach(e=>{o.push(e)})}i=_.filter(i,(function(e){return-1===_.findIndex(o,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))})),i=_.filter(i,(function(e){return e.source!==e.target}));const c=function(e,t){let n=t.map((function(t){return t[e]}));return t.filter((function(t,r){return n.indexOf(t[e])===r}))}("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),d=_.map(Z.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),u=Z.tripleNodes.values();for(let e=0;e<Z.tripleNodes.size;e++){u.next().value.forEach(e=>{d.push({iri:e.iri,isTriple:e.isTriple})})}const f=_.reject(c,(function(e){return _.some(d,e)}));if(0===f.length)(r||0===i.length)&&s.info(L.instant("graphexplore.error.node.connections")),Z.addAndMatchLinks(i),se();else{const t=[],r=[],o=O();_.forEach(f,(function(n,i){t.push(l({url:"rest/explore-graph/node",method:"GET",params:{iri:n.isTriple?H(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?o.languages:[],includeInferred:o.includeInferred,sameAsState:o.sameAsState}}).then((function(e){r[i]=e.data})))})),p.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+1e3*Math.cos(i)/3,a=(n?n.y:0)+1e3*Math.sin(i)/3;e.isTriple?Z.addTriple(e,o,a):Z.addNode(e,o,a)})),Z.addAndMatchLinks(i),n&&(n.isExpanded=!0),se()}))}}function he(t,n,r){if(ae.getLoadingState())return;ae.init(t,r);const i=O(),o=t.iri;l({url:"rest/explore-graph/links",method:"GET",params:{iri:o,linksLimit:i.linksLimit,includeInferred:i.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?i.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?i.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?i.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?i.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?i.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?i.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?i.languages:[],sameAsState:i.sameAsState,includeSchema:i.includeSchema}}).then((function(e){fe(e,t,n)}),(function(t){const n=getError(t.data);s.error(n,L.instant("graphexplore.error.exploring.node")),e.loading=!1,ae.setLoadingState(!1)}))}function ge(){angular.isDefined(le)&&le.expandedState&&le.removeIcons()}function me(t){ne.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURIComponent(H(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=O();l.get("rest/explore-graph/properties",{params:{iri:t.isTriple?H(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){s.warning(getError(e.data),"Error")}))}function ye(e){ve("predicate","var(--primary-color-dark)",e),ve("predicates","var(--primary-color-dark)",e);let t=document.getElementsByClassName("link");t&&_.each(t,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.style.strokeWidth=4)}));let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function ve(e,t,n){let r=document.getElementsByClassName(e);r&&_.each(r,(function(e){let r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),B(n.iri)===W(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===W(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Ie(r))}))}function xe(){_.each(e.predicates,(function(e){let t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));let t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),ve("predicate",""),ve("predicates","");let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function Se(e){let t=B(e);if(Z.tripleNodes.has(t))return Z.tripleNodes.get(t).find(t=>t.iri===e)}function Ie(e){return e.predicates.length>1?e.predicates.length+" predicates":we(e.predicates[0])}function we(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],R=null,c((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(Z.tripleNodes.has(t.linkId)){xe();let n=Z.tripleNodes.get(t.linkId)[t.nodeIndex];me(n),e.showPredicates=!0;let r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");let i={};const o=Z.tripleLinksCopy.values();for(let e=0;e<Z.tripleLinksCopy.size;e++){let e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=B(t.target.iri),i.oppTriplePred=we(t.target.iri.split(" ")[1])),i.pred=we(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=B(t.source.iri),i.oppTriplePred=we(t.source.iri.split(" ")[1])),i.pred=we(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=we(n.iri.split(" ")[1])),ye(i)}},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){ge();const t=2*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t);d3.selectAll(".node-wrapper").each((function(e){e.x=n*(e.x-500)+r*(e.y-500)+500,e.y=-r*(e.x-500)+n*(e.y-500)+500,e.fixed&&(e.px=e.x,e.py=e.y)})),ne.resume()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,e.pushHistory(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(Z.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};const ke=function(t){I.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){y.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}}).result.then((function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),I.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);s.error(e,L.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":ke(t.graph)}}))},e.refreshSavedGraphs=function(){I.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.getting.saved.graphs"))}))},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig),f.url("?saved="+t.id),Z.restoreState(JSON.parse(t.data)),n||e.pushHistory({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(e){j([location.protocol,"//",location.host,location.pathname,"?saved=",e.id].join(""))},e.deleteSavedGraph=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){I.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.delete"))}))}(t)}))},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){ge();const t=e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.selectAll(".node").each((function(n){n.fixed=t,t&&e.numberOfPinnedNodes++})),ne.resume()},$("body").on("keydown",(function(t){!C.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))})),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)}}function c(e,t,n,r){switch(e.mode=n.mode,e.graph=angular.copy(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",s).controller("SaveGraphModalCtrl",c).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),s.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","$http","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","RDF4JRepositoriesRestService","$translate","GuidesService"],c.$inject=["$scope","$uibModalInstance","data","$translate"]},297:function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,o=null,a=null,s=null;function c(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}c.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),u=t.apply(this,r),f=e.apply(this,r),h=p(),g=d.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=s.apply(this,r);for(h.html(o).style({opacity:1,"pointer-events":"all"});g--;)h.classed(d[g],!1);return i=l.get(f).apply(this),v?h.style(v):h.classed(f,!0).style({top:i.top+u[0]+m+"px",left:i.left+u[1]+y+"px"}),c},c.hide=function(){return p().style({opacity:0,"pointer-events":"none"}),c},c.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(p(),n),c},c.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(p(),n),c},c.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),c):e},c.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),c):t},c.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),c):n},c.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),c):s},c.destroy=function(){return r&&(p().remove(),r=null),c};var l=d3.map({n:function(){var e=f();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=f();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=f();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=f();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=f();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=f();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=f();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=f();return{top:e.se.y,left:e.e.x}}}),d=l.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function p(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function f(){for(var e=a||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,c=r.x,l=r.y;return o.x=c,o.y=l,t.nw=o.matrixTransform(n),o.x+=i,t.ne=o.matrixTransform(n),o.y+=s,t.se=o.matrixTransform(n),o.x-=i,t.sw=o.matrixTransform(n),o.y-=s/2,t.w=o.matrixTransform(n),o.x+=i,t.e=o.matrixTransform(n),o.x-=i/2,o.y-=s/2,t.n=o.matrixTransform(n),o.y+=s,t.s=o.matrixTransform(n),t}return c}})?r.apply(t,i):r)||(e.exports=o)},300:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,o;i=n,o=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-o[0],2),Math.pow(i[1]-o[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},76:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return a}));const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),a=new RegExp("^[0-9]+$")}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[29,130],{107:function(e,t,n){"use strict";n.r(t);n(6);var r=n(300),i=n(297),o=n.n(i),a=(n(10),n(76));function s(e,t,n,i,s,c,l,d,u,p,f,h,g,m,y,v,x,S,I,w,k,L,C){e.languageChanged=!1,e.propertiesObj={},e.propertiesQueryObj={},e.propertiesObj.items=[],e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=f.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder")})),e.onopen=e.onclose=()=>angular.noop(),e.embedded&&(f.search().query||f.search().uri||f.search().config||f.search().saved)&&(e.noGoHome=!0);const T={};let b=0,N=0,P={},A=0;const M=d3.behavior.zoom().scaleExtent([.5,10]);let E;let G,R;function O(){return C.isActive()?e.defaultSettings:e.saveSettings}function j(e){m.openCopyToClipboardModal(e)}function z(){e.settings.languagesMap=_.map(e.settings.languages,(function(e){return{text:e}})),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,(function(e){return{text:e}})),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,(function(e){return{text:e}})),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,(function(e){return{text:e}})),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,(function(e){return{text:e}}))}t.key="",T.get=function(t,n,r){return g.initLazyList(t,n,r,b,e.propertiesObj.items)},t.$watch((function(){return t.key}),(function(){b=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&b++})),N++})),T.revision=function(){return N},e.datasource=T,e.adapterContainer={adapter:{remain:!0}},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder"),e.propertiesFilterFunc=function(t){return t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0},e.resetState=function(){e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,P={},A=0},e.pushHistory=function(t,n){e.embedded&&(t.embedded=!0),f.search(t),f.state(n)},e.goToHome=function(){e.resetState(),f.url("graphs-visualizations")},e.shouldShowSettings=function(){return e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id},e.shouldDisableSameAs=function(){const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.$watch("propertiesObj.items",(function(){angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),500)})),e.toggleMoreInfo=function(e){angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=j,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=angular.copy(e.defaultSettings),p.when(h.getPrincipal()).then(t=>function(t){const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=x.get(S.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch(t){e.saveSettings=angular.copy(e.defaultSettings),x.set(S.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=angular.copy(e.defaultSettings)}(t)),e.resetSettings=function(){e.settings=angular.copy(e.defaultSettings),e.validateLinksLimit(),z()},e.changeLimit=function(t){let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=function(){e.invalidLimit=!a.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=function(){e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=angular.copy(e.saveSettings):e.settings=angular.copy(e.defaultSettings),z()},e.reExpandNode=function(){e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)};const D=function(t,n,r){const i=O(),o=void 0===n?i.sameAsState:!0===n,a=void 0===r?i.includeInferred:!0===r;e.loading=!0,l({url:"rest/explore-graph/graph",method:"POST",headers:{"Content-Type":"application/json"},data:{query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:a,sameAsState:o}}).then((function(e){pe(e)}),(function(t){e.loading=!1,s.error(getError(t.data),L.instant("graphexplore.error.cannot.load.graph"))}))};function F(e){return e.replace(/[()']/g,"")}function B(e,t){let n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")}function W(e){return[e.source.iri,e.target.iri].join(">")}function U(e){if(e.isTriple){let t=document.getElementById(F(B(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x}function q(e){if(e.isTriple){let t=document.getElementById(F(B(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y}function H(e){let t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`}function V(e){return F(`${e.source.isTriple?B(e.source.iri,!0):e.source.iri}>${e.target.isTriple?B(e.target.iri,!0):e.target.iri}>marker`)}function K(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,(function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)})),_.each(this.links,(function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0}))},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,(function(e){let n,r;n=e.isTripleSource?Se(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?Se(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?B(i.source.iri):i.source.iri}>${i.target.isTriple?B(i.target.iri):i.target.iri}`;if(Z.tripleLinksCopy.has(e)){let t=Z.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),Z.tripleLinksCopy.set(e,t),null}Z.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of Z.tripleLinksCopy.keys())1===Z.tripleLinksCopy.get(e).length&&Z.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,(function(t){return t.source.iri===e.iri||t.target.iri===e.iri}))}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,(function(t){return t.source.iri===e.iri?t.target.types:t.source.types}));return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,(function(e){return e.predicates}));return _.uniq(_.flatten(i))},this.removeTriples=function(e){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=B(n.source.iri),o=B(n.target.iri);if(i===e&&Z.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let a=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return a&&(Z.tripleLinksCopy.delete(`${i}>${o}`),Z.tripleLinksCopy.delete(`${o}>${i}`)),a})))}),t.forEach(e=>{this.links=_.reject(this.links,(function(t){return t.source.iri===e.source&&t.target.iri===e.target}))})},this.removeNode=function(n){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(B(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t})),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,(function(e){return 0===t(e,i)})),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let a=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!a){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;a=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return a&&(o.target.isTriple&&r.push(B(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),a})),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,(function(n){return 0===t(n,i)&&n.iri!==e.iri})),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;let r=B(e.iri);if(this.tripleNodes.has(r)){let t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,(function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:angular.copy(e.labels),types:angular.copy(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}})),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,(function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:A,type2color:P,scale:M.scale(),translate:M.translate()}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=angular.copy(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,(function(t){t.fixed&&e.numberOfPinnedNodes++})),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(A=t.colorIndex,P=angular.copy(t.type2color)),angular.isDefined(t.translate)&&angular.isDefined(t.scale)&&(E="translate("+t.translate[0]+", "+t.translate[1]+") scale("+t.scale+")",M.translate(t.translate),M.scale(t.scale)),se()}}e.updateSettings=function(){e.invalidLimit?s.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,(function(e){return e.text})),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,(function(e){return e.text})),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,(function(e){return e.text})),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,(function(e){return e.text})),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,(function(e){return e.text})),e.rootNodeIri?e.reExpandNode(e.rootNodeIri):e.queryResultsMode&&f.search().query?D(f.search().query,f.search().sameAs,f.search().inference):"query"===e.configLoaded.startMode&&e.loadGraphConfig(e.configLoaded),O().showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none"),e.showInfoPanel=!1,e.showFilter=!1,x.set(S.GRAPHS_VIZ,e.saveSettings))},e.showInfoPanel=!1;let Z=new K;e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},e.getGraphConfigs=function(t){w.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.graph.configs.short.msg"))}))},e.loadConfigForId=function(t,n){t===e.defaultGraphConfig.id?e.loadGraphConfig(e.defaultGraphConfig):w.getConfig(t).success((function(t){e.loadGraphConfig(t),n()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.could.not.load.config",{configId:t}))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=function(t){e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.loadGraphConfig=function(t){e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?c((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,w.loadGraphForConfig(t,t.startQueryIncludeInferred,O().linksLimit,t.startQuerySameAs).then((function(e){pe(e)}),(function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.graph.load"))})))},e.deleteConfig=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){w.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=function(t){e.pushHistory({config:t.id},{config:t}),e.resetState(),e.loadGraphConfig(t)},v.onpopstate=function(t){e.resetState(),t.state&&(t.state.config?(e.loadGraphConfig(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))};const Q=function(){f.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,D(f.search().query,f.search().sameAs,f.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0;const r=O();angular.isDefined(n)&&(e.rootNodeIri=n,l({url:"rest/explore-graph/node",method:"GET",params:{iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}}).then((function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),Z=new K;const n=Z.addNode(t.data,500,500);E="translate(0, -70) scale(1)",M.translate([0,-70]),M.scale(1),he(n,!0)})).catch((function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.could.not.load.graph"))})))})),f.search().uri&&e.openUri(f.search().uri,!0),f.search().saved&&I.getSavedGraph(f.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.could.not.open"))}))},J=function(){f.search().config?e.loadConfigForId(f.search().config,Q):f.search().query||f.search().uri?(e.loadGraphConfig(e.defaultGraphConfig),Q()):Q()};function Y(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(J),e.getNamespacesPromise=k.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),X()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.view.will.not.work"))})))}function X(){i.isLicenseValid()&&(e.getAutocompletePromise=u.checkAutocompleteStatus())}e.replaceIRIWithPrefix=function(t){const n=e.namespaces,r=_.findLast(n,(function(e){return 0===t.indexOf(e.uri)}));return r?r.prefix+":"+t.substring(r.uri.length):t},e.addedTag=function(t){return t.text.indexOf(":")<0?(s.warning(L.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=d.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?s.warning(L.instant("graphexplore.absolute.prefixed.iri.option"),t):s.warning(L.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return s.warning(L.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return s.warning(L.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return i.isLicenseValid()},e.hasInitedRepository=!1,e.$on("autocompleteStatus",(function(){X()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),Y(n.newRepo),n.newRepo&&(e.resetState(),$(".graph-visualization svg").empty(),f.search().query&&(e.goToHome(),Q()))})),Y();const ee=d3.scale.linear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),te=d3.scale.linear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(P[e])&&(P[e]=A,A++);const t=P[e];return t>39?"#c2c2c2":t%2==0?ee(t/2):te(t/2)};const ne=d3.layout.force().gravity(.07).size([1e3,1e3]),re=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 1000 1000").attr("preserveAspectRatio","xMidYMid meet");let ie=0,oe=0;const ae=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.select(t).append("circle").attr("cx",(function(){return e.x})).attr("cy",(function(){return e.y})).attr("class","loader-container").attr("r",(function(){return e.size})).style("fill","fff").style("opacity","0.7"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=2.4.1-TR2").attr("x",(function(){return e.x-e.size+5})).attr("y",(function(){return e.y-e.size})).attr("width",(function(){return 2*e.size})).attr("height",(function(){return 2*e.size})).attr("class","node-loader")}};function se(t){d3.selectAll("svg g").remove(),d3.selectAll("svg rect").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),M.on("zoom",(function(){if(C.isActive())return;E="translate("+d3.event.translate+") scale("+d3.event.scale+")",n.attr("transform",E)})),re.append("rect").attr("width",1e4).attr("height",1e4).attr("x",-4500).attr("y",-4500).style("fill","none").style("pointer-events","all").call(M).on("click",(function(){d3.event.stopPropagation(),ge(),ne.stop()}));const n=re.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(E)&&!t?E:""})),i=o()().attr("class","d3-tip").customPosition((function(){const e=G.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i> '),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),a=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return we(t);if(n<10)return" · "+we(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+L.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let l;const d=o()().attr("class","d3-tip").customPosition((function(e){const t=l.getBoundingClientRect(),n=function(e){const t=a(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return a(e)}));const u=function(){c.cancel(void 0),c.cancel(ie),G=null,i.hide(),oe=c((function(){ge()}),500)};re.call(i);re.call(d);let p=re.selectAll(".link"),f=re.selectAll(".node");ne.nodes(Z.nodes).charge(-3e3),ne.links(Z.links).linkDistance((function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness})),n.append("defs").selectAll("marker").data(ne.links()).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return V(e)})).attr("viewBox","0 -5 10 10").attr("refX",(function(e){return e.target.isTriple?11:e.target.size+11})).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),p=n.selectAll(".link").data(Z.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return F(W(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${V(e)})`}));const h=n.selectAll(".link-wrapper").append("text").text((function(e){return Ie(e)})).attr("class",(function(e){return e.predicates.length>1||Z.tripleNodes.has(W(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",O().showLinksText?"":"none").on("mouseover",(function(e){d3.event.stopPropagation(),function(e){c.cancel(void 0);const t=l=d3.event.target;c((function(){l===t&&e.predicates.length>1&&d.show(e,l)}),300)}(e)})).on("mouseout",(function(){c.cancel(void 0),l=null,d.hide()})).on("click",(function(t){d3.event.stopPropagation(),function(t){xe();let n=W(t);if(1===t.predicates.length&&Z.tripleNodes.has(n)){R=null;let e=Z.tripleNodes.get(n)[0];if(de(e,this,d3.event.button)){let t={};t.iri=e.iri,t.pred=we(e.iri.split(" ")[1]),ye(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,R===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(R=null);R=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){let n=function(e,t){let n=W(t);return Z.tripleNodes.has(n)?Z.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:we(e),partOfTriple:r,linkId:r?W(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(t)}(t)}));let g,m=0,y=0,v=0;const x=function(){d3.event.button&&0!==d3.event.button||(u(),c.cancel(g),e.showPredicates=!1,d3.event.timeStamp-m<500?y++:y=1,m=d3.event.timeStamp,d3.event.preventDefault())},S=function(t,n,r){Z.countLinks(t,Z.links)<=O().linksLimit?he(t,!1,r||this.parentNode):s.info(L.instant("graphexplore.increase.limit"),L.instant("graphexplore.node.at.max")),e.closeInfoPanel()},I=function(e){if(d3.event.button&&0!==d3.event.button)return;c.cancel(g);const t=d3.event,n=this;C.isActive()||d3.event.timeStamp-m<500&&(1===y?g=c((function(){de(e,n,t)}),540-(d3.event.timeStamp-m)):2===y&&S(e,0,n.parentNode)),d3.event.preventDefault()};function w(e,t){let r,i,o,a,s=!0;if("down"===t)r=2*e.size,i=e.size/3,o=.8,a=.3;else if("down-fixed"===t)r=2*e.size,i=e.size,o=.8,a=.66;else if("up"===t)r=e.size/3,i=2*e.size,o=.3,a=.8;else{if("fixed"!==t)return;r=e.size,o=.66,s=!1}let c=n.selectAll(".node-wrapper").filter((function(t){return t===e})).append("text").text("").classed("icon-any pinned",!0).style("font-size",r+"px").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).attr("opacity",o);"fixed"!==t&&"down-fixed"!==t||(e.pin=c),s&&(c=c.transition().duration(1e3).style("font-size",(function(){return i+"px"})).attr("opacity",a),"down-fixed"!==t&&c.remove())}const k=d3.behavior.drag().origin((function(e){return e})).on("dragstart",(function(e){if(C.isActive())return;0===d3.event.sourceEvent.button&&(e.fixedBeforeDrag=e.fixed,e.isBeingDragged=!0,e.beginDragging=!0,ge(),d3.event.sourceEvent.stopPropagation(),d3.select(this).classed("dragging",!0))})).on("drag",(function(t){t.isBeingDragged&&(y=0,t.px=d3.event.x,t.py=d3.event.y,t.fixed?t.beginDragging&&w(t,"fixed"):(e.numberOfPinnedNodes++,t.fixed=!0,w(t,"down-fixed")),t.pinWasFixed=!0,t.beginDragging=null,ne.resume())})).on("dragend",(function(e){e.isBeingDragged&&(e.pinWasFixed&&(e.pinWasFixed=null,d3.select(".pinned").remove()),e.isBeingDragged=!1,d3.select(this).classed("dragging",!1))}));f=n.selectAll(".node").data(Z.nodes).enter().append("g").attr("class","node-wrapper").attr("id",(function(e){return e.iri})).append("circle").attr("class","node").attr("r",(function(e){return e.size})).style("fill",(function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])})).call(k).on("mouseover",(function(t){if(!t.isBeingDragged){const n=d3.event;c.cancel(oe),ie=c(()=>{(function(t,n){if(e.showInfoPanel)return!1;(le.closeIcon||le.expandIcon||le.focusIcon||le.copyURIIcon)&&le.removeIcons();if(ne.alpha()<.02)return le.initIcons(t,n.parentNode),ne.stop(),ce(),!0;return!1})(t,this)&&function(e,t){c.cancel(void 0);const n=G=t.target;c((function(){G===n&&i.show(e,G)}),300)}(t,n)},400)}})).on("mouseout",u).on("mousedown",x).on("touchstart",(function(e){x(),v=0,g=c((function(){v<5&&ue(e),g=null,y=0}),1e3)})).on("touchmove",(function(){v++})).on("mouseup",I).on("touchend",I).on("contextmenu",(function(t){d3.event.shiftKey||(d3.event.preventDefault(),ge(),e.closeInfoPanel(),t.fixed?(e.numberOfPinnedNodes--,t.fixed=!1,w(t,"up"),ne.resume()):(e.numberOfPinnedNodes++,t.fixed=!0,w(t,"down")),function(e){G&&i.show(e,G)}(t))})).on("gdb-expand-node",S).on("gdb-show-node-info",me);const T=n.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*1.75}));n.insert("g").attr("class","menu-events"),function(e){e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,16,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),c((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)}(T),ne.on("tick",(function(){d3.geom.quadtree(Z.nodes);Z.nodes.length;p.attr("x1",(function(e){return U(e.source)})).attr("y1",(function(e){return q(e.source)})).attr("x2",(function(e){return U(e.target)})).attr("y2",(function(e){return q(e.target)})),h.attr("x",(function(e){let t=U(e.source),n=U(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=q(e.source),n=q(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:U(e.source),y:q(e.source)},r={x:U(e.target),y:q(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),f.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),n.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),n.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),T.attr("x",(function(e){return e.x-1.75*e.size})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})),ce()})),angular.isDefined(ae)&&ae.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){let r=F(n.source.iri),i=F(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),ne.start()}function ce(){t.d3alpha=ne.alpha()}se();const le=new function(){function e(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(n,r){const i=o()().attr("class","d3-tip d3-actions-tip").customPosition((function(){const e=d3.event.target.getBoundingClientRect();return{top:e.top-20+"px",left:e.right+10+"px"}})).html((function(e){return e}));re.call(i);n.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return e(20,n)})),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--primary-color)"),this.collapseIcon.on("click",(function(){var e;(e=n).isExpanded=!1,Z.removeNodeLeafLinks(e),se()})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(ie),c.cancel(oe)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return e(20,n)})),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--primary-color)"),this.expandIcon.on("click",(function(){he(n,!1,r)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return e(20,n)})),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--primary-color)"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",n.iri)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return e(20,n)})),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--primary-color)"),this.copyURIIcon.on("click",(function(){j(n.iri),ge(),i.hide()})).on("mouseover",(function(){i.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+n.iri+"</div>"),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return e(20,n)})),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--primary-color)"),this.closeIcon.on("click",(function(){ue(n)})).on("mouseover",(function(){i.show(this.getAttribute("name")),c.cancel(oe),c.cancel(ie)})).on("mouseout",(function(){i.hide(),oe=c((function(){ge()}),500)})),this.animateMenu(n)},this.animateMenu=function(t){let n=0;let r=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return e(r,t)})).delay(n+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease("sin").attr("transform",(function(){return r+=30,e(r,t)})).delay(n+=35),this.expandedState=!0}};function de(n,r,i){return e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(ue(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(me(n),!0)}function ue(e){Z.removeNode(e),se()}function pe(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),Z=new K,E="translate(0, -70) scale(1)",M.translate([0,-70]),M.scale(1)}(t),fe(t)}function fe(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(Z.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));let o=[];const a=Z.tripleLinksCopy.values();for(let e=0;e<Z.tripleLinksCopy.size;e++){a.next().value.forEach(e=>{o.push(e)})}i=_.filter(i,(function(e){return-1===_.findIndex(o,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))})),i=_.filter(i,(function(e){return e.source!==e.target}));const c=function(e,t){let n=t.map((function(t){return t[e]}));return t.filter((function(t,r){return n.indexOf(t[e])===r}))}("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),d=_.map(Z.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),u=Z.tripleNodes.values();for(let e=0;e<Z.tripleNodes.size;e++){u.next().value.forEach(e=>{d.push({iri:e.iri,isTriple:e.isTriple})})}const f=_.reject(c,(function(e){return _.some(d,e)}));if(0===f.length)(r||0===i.length)&&s.info(L.instant("graphexplore.error.node.connections")),Z.addAndMatchLinks(i),se();else{const t=[],r=[],o=O();_.forEach(f,(function(n,i){t.push(l({url:"rest/explore-graph/node",method:"GET",params:{iri:n.isTriple?H(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?o.languages:[],includeInferred:o.includeInferred,sameAsState:o.sameAsState}}).then((function(e){r[i]=e.data})))})),p.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+1e3*Math.cos(i)/3,a=(n?n.y:0)+1e3*Math.sin(i)/3;e.isTriple?Z.addTriple(e,o,a):Z.addNode(e,o,a)})),Z.addAndMatchLinks(i),n&&(n.isExpanded=!0),se()}))}}function he(t,n,r){if(ae.getLoadingState())return;ae.init(t,r);const i=O(),o=t.iri;l({url:"rest/explore-graph/links",method:"GET",params:{iri:o,linksLimit:i.linksLimit,includeInferred:i.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?i.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?i.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?i.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?i.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?i.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?i.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?i.languages:[],sameAsState:i.sameAsState,includeSchema:i.includeSchema}}).then((function(e){fe(e,t,n)}),(function(t){const n=getError(t.data);s.error(n,L.instant("graphexplore.error.exploring.node")),e.loading=!1,ae.setLoadingState(!1)}))}function ge(){angular.isDefined(le)&&le.expandedState&&le.removeIcons()}function me(t){ne.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURIComponent(H(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=O();l.get("rest/explore-graph/properties",{params:{iri:t.isTriple?H(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){s.warning(getError(e.data),"Error")}))}function ye(e){ve("predicate","var(--primary-color-dark)",e),ve("predicates","var(--primary-color-dark)",e);let t=document.getElementsByClassName("link");t&&_.each(t,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.style.strokeWidth=4)}));let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function ve(e,t,n){let r=document.getElementsByClassName(e);r&&_.each(r,(function(e){let r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),B(n.iri)===W(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===W(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Ie(r))}))}function xe(){_.each(e.predicates,(function(e){let t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));let t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),ve("predicate",""),ve("predicates","");let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function Se(e){let t=B(e);if(Z.tripleNodes.has(t))return Z.tripleNodes.get(t).find(t=>t.iri===e)}function Ie(e){return e.predicates.length>1?e.predicates.length+" predicates":we(e.predicates[0])}function we(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],R=null,c((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(Z.tripleNodes.has(t.linkId)){xe();let n=Z.tripleNodes.get(t.linkId)[t.nodeIndex];me(n),e.showPredicates=!0;let r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");let i={};const o=Z.tripleLinksCopy.values();for(let e=0;e<Z.tripleLinksCopy.size;e++){let e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=B(t.target.iri),i.oppTriplePred=we(t.target.iri.split(" ")[1])),i.pred=we(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=B(t.source.iri),i.oppTriplePred=we(t.source.iri.split(" ")[1])),i.pred=we(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=we(n.iri.split(" ")[1])),ye(i)}},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){ge();const t=2*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t);d3.selectAll(".node-wrapper").each((function(e){e.x=n*(e.x-500)+r*(e.y-500)+500,e.y=-r*(e.x-500)+n*(e.y-500)+500,e.fixed&&(e.px=e.x,e.py=e.y)})),ne.resume()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,e.pushHistory(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(Z.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};const ke=function(t){I.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){y.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}}).result.then((function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),I.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);s.error(e,L.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":ke(t.graph)}}))},e.refreshSavedGraphs=function(){I.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.getting.saved.graphs"))}))},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig),f.url("?saved="+t.id),Z.restoreState(JSON.parse(t.data)),n||e.pushHistory({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(e){j([location.protocol,"//",location.host,location.pathname,"?saved=",e.id].join(""))},e.deleteSavedGraph=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){I.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.delete"))}))}(t)}))},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){ge();const t=e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.selectAll(".node").each((function(n){n.fixed=t,t&&e.numberOfPinnedNodes++})),ne.resume()},$("body").on("keydown",(function(t){!C.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))})),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)}}function c(e,t,n,r){switch(e.mode=n.mode,e.graph=angular.copy(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",s).controller("SaveGraphModalCtrl",c).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),s.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","$http","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","RDF4JRepositoriesRestService","$translate","GuidesService"],c.$inject=["$scope","$uibModalInstance","data","$translate"]},297:function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,o=null,a=null,s=null;function c(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}c.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),u=t.apply(this,r),f=e.apply(this,r),h=p(),g=d.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=s.apply(this,r);for(h.html(o).style({opacity:1,"pointer-events":"all"});g--;)h.classed(d[g],!1);return i=l.get(f).apply(this),v?h.style(v):h.classed(f,!0).style({top:i.top+u[0]+m+"px",left:i.left+u[1]+y+"px"}),c},c.hide=function(){return p().style({opacity:0,"pointer-events":"none"}),c},c.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(p(),n),c},c.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(p(),n),c},c.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),c):e},c.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),c):t},c.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),c):n},c.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),c):s},c.destroy=function(){return r&&(p().remove(),r=null),c};var l=d3.map({n:function(){var e=f();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=f();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=f();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=f();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=f();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=f();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=f();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=f();return{top:e.se.y,left:e.e.x}}}),d=l.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function p(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function f(){for(var e=a||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,c=r.x,l=r.y;return o.x=c,o.y=l,t.nw=o.matrixTransform(n),o.x+=i,t.ne=o.matrixTransform(n),o.y+=s,t.se=o.matrixTransform(n),o.x-=i,t.sw=o.matrixTransform(n),o.y-=s/2,t.w=o.matrixTransform(n),o.x+=i,t.e=o.matrixTransform(n),o.x-=i/2,o.y-=s/2,t.n=o.matrixTransform(n),o.y+=s,t.s=o.matrixTransform(n),t}return c}})?r.apply(t,i):r)||(e.exports=o)},300:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,o;i=n,o=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-o[0],2),Math.pow(i[1]-o[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},76:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return a}));const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),a=new RegExp("^[0-9]+$")}}]);
|