graphdb-workbench 3.2.0-RC1 → 3.2.0-RC3
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/{38644.763094ed8176a107ad43.bundle.js → 38644.415c961a594eee59589b.bundle.js} +2 -2
- package/dist/{38644.763094ed8176a107ad43.bundle.js.map → 38644.415c961a594eee59589b.bundle.js.map} +1 -1
- package/dist/{39518.7dd8fe04651f2fdbc846.bundle.js → 39518.773abfe893ae02d58978.bundle.js} +2 -2
- package/dist/{39518.7dd8fe04651f2fdbc846.bundle.js.map → 39518.773abfe893ae02d58978.bundle.js.map} +1 -1
- package/dist/{53174.4a1ebee9fa3f2bcebf90.bundle.js → 53174.42c4b8519fa16f6eedc1.bundle.js} +2 -2
- package/dist/53174.42c4b8519fa16f6eedc1.bundle.js.map +1 -0
- package/dist/60560.1a6c5df198a1426b0fb7.bundle.js +2 -0
- package/dist/60560.1a6c5df198a1426b0fb7.bundle.js.map +1 -0
- package/dist/{67888.00b7ea58032ed4b8bfcb.bundle.js → 67888.dc0a5dd0937a17571689.bundle.js} +2 -2
- package/dist/{67888.00b7ea58032ed4b8bfcb.bundle.js.map → 67888.dc0a5dd0937a17571689.bundle.js.map} +1 -1
- package/dist/{7815.182dcef7161cdc589db7.bundle.js → 7815.49f59c286fc0d0b306ab.bundle.js} +2 -2
- package/dist/{7815.182dcef7161cdc589db7.bundle.js.map → 7815.49f59c286fc0d0b306ab.bundle.js.map} +1 -1
- package/dist/82206.d593f5b11aa103af5e3d.bundle.js +2 -0
- package/dist/82206.d593f5b11aa103af5e3d.bundle.js.map +1 -0
- package/dist/{82926.d6c48c23b6e1f89b3d8a.bundle.js → 82926.29de33c593153e0c41ce.bundle.js} +2 -2
- package/dist/{82926.d6c48c23b6e1f89b3d8a.bundle.js.map → 82926.29de33c593153e0c41ce.bundle.js.map} +1 -1
- package/dist/94519.783661f9e08288cddc88.bundle.js +2 -0
- package/dist/94519.783661f9e08288cddc88.bundle.js.map +1 -0
- package/dist/99448.9f5cf75eddd63590310c.bundle.js +2 -0
- package/dist/99448.9f5cf75eddd63590310c.bundle.js.map +1 -0
- package/dist/css/bootstrap-graphdb-theme.css +1 -1
- package/dist/css/clustermanagement.css +1 -1
- package/dist/css/graphql/graphql-playground.css +1 -1
- package/dist/css/graphs-vizualizations.css +1 -1
- package/dist/css/lib/ontotext-yasgui-web-component.css +1 -1
- package/dist/css/repositories.css +1 -1
- package/dist/css/shepherd-custom.css +1 -1
- package/dist/css/shuttle-multiselect.css +1 -1
- package/dist/i18n/locale-en.json +4 -4
- package/dist/i18n/locale-fr.json +4 -4
- package/dist/index.html +9 -9
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.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/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +5 -5
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/legacyWorkbench.74464603beb21b16ee3f.js +3 -0
- package/dist/{legacyWorkbench.59130589967739705b23.js.map → legacyWorkbench.74464603beb21b16ee3f.js.map} +1 -1
- package/dist/{main.1183256fc7ce9d0d3fa3.js → main.f4b1fbec182d8427ee8a.js} +3 -3
- package/dist/{main.1183256fc7ce9d0d3fa3.js.map → main.f4b1fbec182d8427ee8a.js.map} +1 -1
- package/dist/pages/aclmanagement.html +2 -2
- 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 +1 -1
- package/dist/pages/createConnector.html +3 -0
- 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 +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.html +1 -1
- package/dist/pages/login.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- 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 +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +3 -2
- package/dist/pages/webapi.html +25 -2
- package/dist/res/swagger5/css/onto-theme.css +1 -1
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.css +1 -1
- package/dist/shared-components/collection/components/onto-navbar/onto-navbar.css +1 -1
- package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.css +1 -1
- package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
- package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
- package/dist/shared-components/shared-components/{p-79cc3329.entry.js → p-46732fef.entry.js} +1 -1
- package/dist/shared-components/shared-components/p-6ca5791e.entry.js +1 -0
- package/dist/shared-components/shared-components/p-7df9e540.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/styleguide.bc9dcbaac347a57319f2.js +2 -0
- package/dist/styleguide.bc9dcbaac347a57319f2.js.map +1 -0
- package/package.json +1 -1
- package/dist/53174.4a1ebee9fa3f2bcebf90.bundle.js.map +0 -1
- package/dist/60560.0a055f16e4792468aabb.bundle.js +0 -2
- package/dist/60560.0a055f16e4792468aabb.bundle.js.map +0 -1
- package/dist/82206.cebb3d642554cf3e0113.bundle.js +0 -2
- package/dist/82206.cebb3d642554cf3e0113.bundle.js.map +0 -1
- package/dist/94519.32958f75080cd121b880.bundle.js +0 -2
- package/dist/94519.32958f75080cd121b880.bundle.js.map +0 -1
- package/dist/99448.30713a59be1313c4b089.bundle.js +0 -2
- package/dist/99448.30713a59be1313c4b089.bundle.js.map +0 -1
- package/dist/legacyWorkbench.59130589967739705b23.js +0 -3
- package/dist/shared-components/shared-components/p-09a97d11.entry.js +0 -1
- package/dist/shared-components/shared-components/p-12b2f278.entry.js +0 -1
- package/dist/styleguide.26e57b17e3dafc7b6bbe.js +0 -2
- package/dist/styleguide.26e57b17e3dafc7b6bbe.js.map +0 -1
- /package/dist/{legacyWorkbench.59130589967739705b23.js.LICENSE.txt → legacyWorkbench.74464603beb21b16ee3f.js.LICENSE.txt} +0 -0
- /package/dist/{main.1183256fc7ce9d0d3fa3.js.LICENSE.txt → main.f4b1fbec182d8427ee8a.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,c as createEvent,F as Fragment,g as getElement}from"./index-I_gcXFWK.js";import{SubscriptionList,ServiceProvider,SecurityContextService,LicenseContextService,CookieService,ProductInfoContextService,LicenseService,WindowService,CookieConsent,MonitoringService,RepositoryContextService,RepositoryLocationContextService,RepositoryService,OntoToastrService,NamespacesService,NamespacesContextService,LanguageService,FibonacciGenerator,AuthenticationService,EventService,isHomePage,getCurrentRoute,EventName,LanguageContextService,RepositoryList,ObjectUtil,getPathName,UriUtil,openInNewTab,navigate,navigateTo,ToastMessageList,ToastrConfig,ToastType}from"@ontotext/workbench-api";import{T as TranslationService,L as LoggerProvider,s as sanitizeHTML}from"./translation.service-nljGIprK.js";import{H as HtmlUtil}from"./html-util-C8DO915D.js";import{R as ResourceSearchConstants,D as DropdownItem}from"./resource-search-constants-CapzAxJp.js";import{T as TooltipUtil}from"./tooltip-util-BqOc8q8q.js";import"./onto-tooltip-placement-D_J2-9CG.js";const ontoFooterCss=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}",OntoFooter=class{constructor(e){registerInstance(this,e),this.subscriptions=new SubscriptionList,this.currentYear=(new Date).getFullYear(),this.securityContextService=ServiceProvider.get(SecurityContextService),this.licenseContextService=ServiceProvider.get(LicenseContextService),this.cookieService=ServiceProvider.get(CookieService)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var e,t,o,i;return h(Host,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},h("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},h("a",{key:"e81e156b6b691a0a05275ee399ccf26438ba5729",href:"http://graphdb.ontotext.com",target:"_blank",rel:"noopener noreferrer"},"GraphDB")," ",null===(e=this.productInfo)||void 0===e?void 0:e.productVersion," • ",h("a",{key:"018b1772807248dfd83e0c2ca57fde6bd848e9c9",href:"http://rdf4j.org",target:"_blank",rel:"noopener noreferrer"},"RDF4J")," ",null===(t=this.productInfo)||void 0===t?void 0:t.sesame," • Connectors ",null===(o=this.productInfo)||void 0===o?void 0:o.connectors," • Workbench ",null===(i=this.productInfo)||void 0===i?void 0:i.workbench," • © 2002–",this.currentYear," ",h("a",{key:"20e70771852b0c504e86e36a1b9fdb9b61d5963c",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",h("translate-label",{key:"8df55b8d224ae50ca9de3fd038c0285ee01b4ff3",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&h("onto-cookie-consent",{key:"80f9c1af70db76ef4c6680dacf7022eb1262f049"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(ServiceProvider.get(ProductInfoContextService).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return ServiceProvider.get(LicenseService).isTrackableLicense()&&!WindowService.getWindow().wbDevMode}subscribeToUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.setCookieConsentVisibility()}))}setCookieConsentVisibility(){var e;const t=this.securityContextService.getAuthenticatedUser();this.shouldShowCookieConsent=this.isTrackingAllowed()&&!new CookieConsent(null===(e=null==t?void 0:t.appSettings)||void 0===e?void 0:e.COOKIE_CONSENT).policyAccepted}subscribeToLicenseChange(){this.subscriptions.add(this.licenseContextService.onLicenseChanged(()=>{this.setCookieConsentVisibility()}))}};OntoFooter.style=ontoFooterCss;const SelectorItemButton=({repository:e})=>h("div",{class:"repository-selector-dropdown-item"},h("i",{class:"item-icon icon-repo-"+e.type}),h("div",{class:"item-label"},h("div",{class:"repository-id"},e.id),h("div",{class:"repository-location"},e.location?e.location:"Local"))),ontoHeaderCss=":host{display:block}.header-component>*{height:100%}.header-component{display:flex;justify-content:flex-end;align-items:stretch;gap:0.25em;margin-right:2em;font-size:1.1em;padding-bottom:0.5rem}",OntoHeader=class{constructor(e){registerInstance(this,e),this.monitoringService=ServiceProvider.get(MonitoringService),this.repositoryContextService=ServiceProvider.get(RepositoryContextService),this.repositoryLocationContextService=ServiceProvider.get(RepositoryLocationContextService),this.repositoryService=ServiceProvider.get(RepositoryService),this.securityContextService=ServiceProvider.get(SecurityContextService),this.toastrService=ServiceProvider.get(OntoToastrService),this.namespacesService=ServiceProvider.get(NamespacesService),this.namespaceContextService=ServiceProvider.get(NamespacesContextService),this.languageService=ServiceProvider.get(LanguageService),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new FibonacciGenerator,this.authService=ServiceProvider.get(AuthenticationService),this.eventService=ServiceProvider.get(EventService),this.shouldShowSearch=!0,this.isHomePage=isHomePage(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new SubscriptionList,this.skipUpdateActiveOperationsTimes=0,this.canWriteRepo=e=>this.canWriteRepoInLocation(e),this.repositorySizeInfoFetcher=e=>this.repositoryService.getRepositorySizeInfo(e),this.showViewResourceMessage=e=>{e.stopPropagation(),this.toastrService.info(TranslationService.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,HtmlUtil.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:ResourceSearchConstants.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=getCurrentRoute(),this.startOperationPolling()}render(){var e,t,o,i,n,r;return h(Host,{key:"8222e10554a901e025c47424aea4b6294f240ea4"},h("div",{key:"8a0b771d5dbddcb7acff61e7a436d2e4a097277f",class:"header-component"},h("onto-search-icon",{key:"d24c7f1be0241391078cc730a1ef2a5a86172e8f",class:"rdf-search-button",onClick:this.showViewResourceMessage,"data-test":"onto-show-view-resource-message",style:{display:this.shouldShowSearch&&this.isHomePage?"block":"none"}}),h("onto-rdf-search",{key:"b75323ddf445ea121fd6067723bf8550b861f4e5","data-test":"onto-open-rdf-search-button",style:{display:this.shouldShowSearch&&!this.isHomePage?"block":"none"}}),(null===(e=this.activeOperations)||void 0===e?void 0:e.allRunningOperations.getItems().length)?h("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(t=this.license)||void 0===t?void 0:t.valid)?h("onto-license-alert",{license:this.license}):"",h("onto-repository-selector",{key:"25a3345c6482a2794032b161a78bc98204aff061",currentRepository:this.currentRepository,items:this.repositoryItems,repositorySizeInfoFetcher:this.repositorySizeInfoFetcher,totalTripletsFormatter:this.totalTripletsFormatter,canWriteRepo:this.canWriteRepo}),(null===(o=this.securityConfig)||void 0===o?void 0:o.enabled)&&(null===(i=this.securityConfig)||void 0===i?void 0:i.userLoggedIn)?h("onto-user-menu",{user:this.user,securityConfig:this.securityConfig}):"",(null===(n=this.securityConfig)||void 0===n?void 0:n.enabled)&&!(null===(r=this.securityConfig)||void 0===r?void 0:r.userLoggedIn)&&"login"!==this.currentRoute?h("onto-user-login",null):"",h("onto-language-selector",{key:"16cba1ff6d691fe0b7442d88940ec9f9ee22aebd","dropdown-alignment":"right"})))}subscribeToEvents(){this.subscribeToSecurityContextChange(),this.subscribeToRepositoryListChanged(),this.subscribeToLicenseChange(),this.subscribeToRepositoryChange(),this.subscribeToActiveRepositoryLocationChange(),this.subscribeToActiveRepoLoadingChange(),this.subscribeToNavigationEnd(),this.subscribeToLanguageChanged(),this.subscribeToAuthenticatedUserChange()}subscribeToRepositoryListChanged(){return this.repositoryContextService.onRepositoryListChanged(e=>{(null==e?void 0:e.getItems().length)?this.initOnRepositoryListChanged(e):this.resetOnMissingRepositories()})}subscribeToLicenseChange(){this.subscriptions.add(ServiceProvider.get(LicenseContextService).onLicenseChanged(e=>{this.license=e}))}subscribeToRepositoryChange(){this.subscriptions.add(this.repositoryContextService.onSelectedRepositoryChanged(e=>{this.currentRepository=e,this.shouldShowSearch=this.shouldShowRdfSearch(),this.loadNamespaces(),this.updateRepositoryItems()}))}subscribeToSecurityContextChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(e=>{this.user=e})),this.subscriptions.add(this.securityContextService.onSecurityConfigChanged(e=>{this.securityConfig=e}))}subscribeToAuthenticatedUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.updateRepositoryItems()}))}subscribeToActiveRepositoryLocationChange(){this.subscriptions.add(this.repositoryLocationContextService.onActiveLocationChanged(()=>{this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToActiveRepoLoadingChange(){this.subscriptions.add(this.repositoryLocationContextService.onIsLoadingChanged(e=>{this.isActiveLocationLoading=e,this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=isHomePage(),this.currentRoute=getCurrentRoute()}))}subscribeToLanguageChanged(){this.subscriptions.add(ServiceProvider.get(LanguageContextService).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new RepositoryList,this.currentRepository=void 0}initOnRepositoryListChanged(e){this.repositoryList=e,this.updateRepositoryItems()}updateRepositoryItems(){this.repositoryItems=this.getRepositoriesDropdownItems()}getRepositoriesDropdownItems(){var e;if(!(null===(e=this.repositoryList)||void 0===e?void 0:e.getItems().length))return[];let t;return this.repositoryList.sortByLocationAndId(),t=this.currentRepository?this.repositoryList.filterByRepository([this.currentRepository]):this.repositoryList.getItems(),t.filter(e=>this.authService.canReadRepo(e)||this.authService.canReadGqlRepo(e)).map(e=>(new DropdownItem).setName(h(SelectorItemButton,{repository:e})).setValue(e).setDropdownTooltipTrigger("mouseenter focus").setGuideSelector(`repository-id-${e.id}`))}canWriteRepoInLocation(e){return!0}loadNamespaces(){this.currentRepository&&this.authService.canReadRepo(this.currentRepository)&&this.namespacesService.getNamespaces(this.currentRepository.id).then(e=>this.namespaceContextService.updateNamespaces(e))}startOperationPolling(){clearInterval(this.pollingInterval),this.pollingInterval=WindowService.getWindow().setInterval(()=>{this.authService.isAuthenticated()?this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.currentRepository&&this.monitoringService.getOperations(this.currentRepository.id).then(e=>{ObjectUtil.deepEqual(this.activeOperations,e)||(this.activeOperations=e),this.fibonacciGenerator.reset(),this.skipUpdateActiveOperationsTimes=0}).catch(()=>{this.activeOperations=void 0,this.skipUpdateActiveOperationsTimes=this.fibonacciGenerator.next()}):this.activeOperations=void 0},this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL)}stopOperationPolling(){clearInterval(this.pollingInterval),this.activeOperations=void 0}shouldShowRdfSearch(){return!!this.currentRepository&&(!this.isActiveLocationLoading||"/repository"===getPathName())&&this.authService.canReadRepo(this.currentRepository)}setupTotalRepositoryFormater(e){e||(e=this.languageService.getDefaultLanguage()),this.totalTripletsFormatter=new Intl.NumberFormat(e,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})}};OntoHeader.style=ontoHeaderCss;class NavbarToggledEvent{constructor(e){this.type="navbarToggled",this.payload=e}}class NavbarModel{constructor(e=[]){this._items=e}hasParent(e){return this._items.some(t=>e===t.label)}getModel(){const e=t=>{const o=t.children.map(e);return new NavbarItemModel(Object.assign(Object.assign({},t),{children:o}))};return this._items.map(e)}addItem(e){this._items.push(e)}getSelectedRootItem(){return this._items.find(e=>e.selected)}isParentOpened(e){var t;return!!(null===(t=this.getParentItem(e))||void 0===t?void 0:t.open)}getTopLevelItem(e){return this._items.find(t=>t.label===e)}getParentItem(e){return this._items.find(t=>t.label===e.parent)}deselectAll(){this.walk(e=>{e.selected=!1})}closeAll(){this.walk(e=>{e.open=!1})}deselectItem(e){e.selected=!1}selectItem(e){e.label?e.selected=!0:this.selectItem(e.parentModel)}hasSelectedSubmenu(e){return!!e.children&&e.children.some(e=>this.hasSelection(e))}hasSelection(e){return!!e.selected||!!e.children&&e.children.some(e=>this.hasSelection(e))}closeOpened(){const e=this._items.find(e=>e.open);e&&(this.hasSelectedSubmenu(e)&&this.selectItem(e),e.open=!1)}open(e){this.walk(e=>{e.open=!1}),this.openItemAndParent(e)}openItemAndParent(e){e.parentModel&&this.openItemAndParent(e.parentModel),e.open=!0}closeOtherParents(e){const t=e.parent;this.walk(e=>{e.label!==t&&(e.open=!1)})}highlightSelected(){const e=this.getSelectedItem();(null==e?void 0:e.hasParent)&&this.selectItem(this.getParentItem(e))}unhighlightSelected(){const e=this.getSelectedRootItem();e&&e.children.length&&e.open&&this.deselectItem(e)}getSelectedItem(){let e=null;const t=o=>{if(o.selected)return e=o,!0;if(o.children)for(const e of o.children)if(t(e))return!0;return!1};return this._items.some(t),e}expandSelected(){const e=this.getSelectedItem();e&&(e.hasParent?this.open(this.getParentItem(e)):this.open(e))}initSelected(e){this.walk(t=>{var o;let i=e;(null===(o=t.href)||void 0===o?void 0:o.includes("*"))&&(i=this.getWildcardPath(e,t.href)),t.href===i&&(t.hasParent&&this.open(t),this.selectItem(t))})}getWildcardPath(e,t){const o=e.split("/"),i=t.split("/");if(o.length!==i.length)return e;const n=[];for(let t=0;t<i.length;t++)if("*"===i[t])n.push("*");else{if(i[t]!==o[t])return e;n.push(i[t])}return n.join("/")}sorted(){return this._items.filter(e=>e.children).forEach(e=>{e.children.sort(NavbarModel.compare)}),this._items.sort(NavbarModel.compare),this}static compare(e,t){return e.order-t.order}walk(e){this.walkRecursively(this.items,e)}walkRecursively(e,t){e.forEach(e=>{var o;t(e),(null===(o=e.children)||void 0===o?void 0:o.length)&&this.walkRecursively(e.children,t)})}get items(){return this._items}}class NavbarItemModel{constructor(e){var t;this._selected=!1,this._open=!1,this._order=e.order,this._label=e.label,this._labelKey=e.labelKey,this._href=e.href,this._children=[...null!==(t=e.children)&&void 0!==t?t:[]],this._hasParent=e.hasParent,this._parent=e.parent,this._selected=e.selected,this._open=e.open,this._documentationHref=e.documentationHref,this._hrefFun=e.hrefFun,this._editions=e.editions,this._icon=e.icon,this._role=e.role,this._guideSelector=e.guideSelector,this._testSelector=e.testSelector,this._shouldShow=e.shouldShow,this._parentModel=e.parentModel}addChild(e){this.children.push(e),e.setParent(this)}addChildren(...e){e.forEach(e=>{this.addChild(e)})}hasSubmenus(){return"#"===this._href}get parent(){return this._parent}set parent(e){this._parent=e}get order(){return this._order}set order(e){this._order=e}get label(){return this._label}set label(e){this._label=e}get labelKey(){return this._labelKey}set labelKey(e){this._labelKey=e}get documentationHref(){return this._documentationHref}set documentationHref(e){this._documentationHref=e}get href(){return this._href}set href(e){this._href=e}get children(){return this._children}set children(e){this._children=e}get hasParent(){return this._hasParent}set hasParent(e){this._hasParent=e}get selected(){return this._selected}set selected(e){this._selected=e}get open(){return this._open}set open(e){this._open=e}get hrefFun(){return this._hrefFun}set hrefFun(e){this._hrefFun=e}get editions(){return this._editions}set editions(e){this._editions=e}get icon(){return this._icon}set icon(e){this._icon=e}get role(){return this._role}set role(e){this._role=e}get guideSelector(){return this._guideSelector}set guideSelector(e){this._guideSelector=e}get testSelector(){return this._testSelector}set testSelector(e){this._testSelector=e}get parentModel(){return this._parentModel}set parentModel(e){this._parentModel=e}get shouldShow(){return this._shouldShow}set shouldShow(e){this._shouldShow=e}setParent(e){this.parentModel=e,this.hasParent=!!e}}const logger=LoggerProvider.logger;class NavbarService{static map(e,t){const o=new NavbarModel;return NavbarService.setTopLevelMenuItems(e,o,t),NavbarService.setSubmenuItems(e,o,t),o.sorted()}static setTopLevelMenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>!e.parent&&e.shouldShow).forEach(e=>{t.hasParent(e.label)?logger.warn("Doubled parent definition: ",e):t.addItem(this.toMenuItemModel(e,void 0,o,e.children))})})}static setSubmenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>e.parent&&e.shouldShow).forEach(e=>{const i=t.getTopLevelItem(e.parent);null==i||i.addChildren(this.toMenuItemModel(e,i,o,e.children))})})}static toMenuItemModel(e,t,o,i=[]){let n;e.documentationHref&&(n=UriUtil.resolveDocumentationUrl(null==o?void 0:o.shortVersion,e.documentationHref));const r=new NavbarItemModel({label:e.label,labelKey:e.labelKey,href:n||e.href,documentationHref:e.documentationHref,hrefFun:e.hrefFun,order:e.order,role:e.role,editions:e.editions,icon:e.icon,guideSelector:e.guideSelector,hasParent:!!t,parentModel:t,parent:e.parent,selected:!1,shouldShow:e.shouldShow,testSelector:e.testSelector}),s=i.map(e=>this.toMenuItemModel(e,r,o,e.children));return r.addChildren(...s),r}}const ontoNavbarCss=':host{display:block}.navbar-component{width:15rem;position:fixed;font-weight:400;z-index:1010;margin:0;padding:0;-moz-transition:width 0.2s ease-in;-o-transition:width 0.2s ease-in;-webkit-transition:width 0.2s ease-in;transition:width 0.2s ease-in;height:100%;overflow-y:auto;overflow-x:hidden}@media screen and (max-height: 475px){.navbar-component.collapsed{position:absolute}}.navbar-component li{list-style:none;cursor:pointer}.navbar-component li a{text-decoration:none}.navbar-component li a.sub-menu-link:not([href=""]):not([tabindex]):hover{text-decoration:none !important}.navbar-component .sub-menu-item a.sub-menu-link:not([href]) translate-label.menu-item{padding-right:3.5px}.navbar-component a.sub-menu-link:not([href]):hover .menu-item,.navbar-component a.sub-menu-link[href=""]:hover .menu-item{text-decoration-line:underline !important}.navbar-component li .menu-element-root:hover,.navbar-component .sub-menu li:hover{text-decoration-line:none !important}.navbar-component li .menu-element-root:hover .menu-item-icon,.navbar-component .menu-element.open .menu-item-icon{transform:scale(1.1)}.navbar-component .menu-element.open .sub-menu .menu-item-icon{transform:scale(0.5)}.navbar-component .menu-element{position:relative}.navbar-component .menu-element-root{padding:0.8em 2.5em 0.8em 0.8em;display:block;line-height:2.5rem;position:relative;z-index:100;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.navbar-component .menu-item-icon{font-size:2.5rem;width:2.5rem;vertical-align:middle;text-align:center;transform:scale(0.9);display:inline-block;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;pointer-events:none}.navbar-component .menu-element-root .menu-item{pointer-events:none}.navbar-component .menu-element-root.active,.navbar-component .menu-element-root.active:hover{background-color:var(--gw-sidenav-submenuitem-active-background);color:#ffffff}.navbar-component .active .menu-item-icon{transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .sub-menu{position:relative;padding:0;z-index:110}.navbar-component .sub-menu li{display:none}.navbar-component .sub-menu li a{padding:0.5em 0.8em;display:block}.navbar-component .sub-menu li.active a{font-weight:500}.navbar-component .menu-element.open ul li{display:block}.navbar-component .menu-element ul:before,.rdf-list ul.datasource:before{font-family:"icomoon", sans-serif !important;content:"\\e921";display:block;font-size:1.5em;position:absolute;top:-3.3rem;right:1rem;-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;pointer-events:none}.navbar-component .menu-element.open ul:before,.rdf-list ul.open.datasource:before{transform:rotate(180deg)}.navbar-component.collapsed{width:4.375rem;overflow:visible;height:auto}.navbar-component.collapsed .menu-element.open .sub-menu{position:absolute;top:0;left:4.375rem;width:15rem}.navbar-component.collapsed .menu-element .menu-item,.navbar-component.collapsed .menu-element .sub-menu li{display:none}.navbar-component.collapsed .menu-element.open .menu-item,.navbar-component.collapsed .menu-element.open .sub-menu li{display:block}.navbar-component.collapsed .menu-element.open .menu-element-root .menu-item{display:none}.navbar-component.collapsed .menu-element-root{overflow:visible}.navbar-component .menu-element.open ul li.submenu-title,.navbar-component .submenu-title{display:none}.navbar-component.collapsed .menu-element.open ul li.submenu-title{display:block;font-size:1.2em;font-weight:500;text-overflow:ellipsis;overflow:hidden;padding:0.5em 0.8rem 0.2em 0;margin-left:0.8rem;margin-bottom:0.5em}.navbar-component.collapsed .menu-element.open .sub-menu.align-bottom{bottom:0;top:auto}.navbar-component.collapsed .menu-element ul:before{display:none}.navbar-component.collapsed .brand a{padding:0.4rem}.navbar-component.collapsed .small-logo,.navbar-component .big-logo{display:block}.navbar-component .small-logo,.navbar-component.collapsed .big-logo{display:none}.navbar-component .brand{background-color:var(--gw-sidenav-logo-background)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.toggle-menu{display:block;position:absolute;top:0;right:0;font-size:0.8em;line-height:1.5;padding:0 0.3em;z-index:10;cursor:pointer;background-color:var(--gw-sidenav-collapsebutton-background);color:var(--gw-sidenav-collapsebutton-color)}.toggle-menu:hover{color:var(--gw-sidenav-collapsebutton-hover-color);background-color:var(--gw-sidenav-collapsebutton-hover-background)}.toggle-menu [class^=icon-]{transition:all 0.2s ease-in;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.navbar-component .menu-element .menu-element-root{background-color:var(--gw-sidenav-item-background);color:var(--gw-sidenav-item-color)}.navbar-component .menu-element .menu-element-root:hover{background-color:var(--gw-sidenav-item-hover-background);color:var(--gw-sidenav-item-hover-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon{color:var(--gw-sidenav-item-icon-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon:hover{color:var(--gw-sidenav-item-hover-icon-color)}.navbar-component .menu-element.open .menu-element-root{background-color:var(--gw-sidenav-item-selected-background);color:var(--gw-sidenav-item-selected-color)}.navbar-component .menu-element .menu-element-root.active{background-color:var(--gw-sidenav-item-active-background);color:var(--gw-sidenav-item-active-color)}.navbar-component .menu-element .menu-element-root.active .menu-item-icon{color:var(--gw-sidenav-item-active-icon-color)}.navbar-component .menu-element .sub-menu-item,.navbar-component .menu-element .sub-menu{background-color:var(--gw-sidenav-submenuitem-background);color:var(--gw-sidenav-submenuitem-color)}.navbar-component .menu-element .sub-menu-item:hover{background-color:var(--gw-sidenav-submenuitem-hover-background);color:var(--gw-sidenav-submenuitem-hover-color)}.navbar-component .menu-element .sub-menu-item.active,.navbar-component .menu-element .sub-menu-item.active .sub-menu-link{background-color:var(--gw-sidenav-submenuitem-active-background);color:var(--gw-sidenav-submenuitem-active-color)}',labelKeys={EXPAND:"menu.buttons.expand",COLLAPSE:"menu.buttons.collapse",LOGO_LINK:"menu.logo.link.title"},OntoNavbar=class{constructor(e){registerInstance(this,e),this.navbarToggled=createEvent(this,"navbarToggled"),this.productInfoContextService=ServiceProvider.get(ProductInfoContextService),this.subscriptions=new SubscriptionList,this.resizeHandler=()=>this.adjustAllSubmenus(this.hostElement),this.SUBMENU_VERTICAL_MARGIN=8,this.MIN_SUBMENU_HEIGHT=100,this.labels={[labelKeys.EXPAND]:TranslationService.translate(labelKeys.EXPAND),[labelKeys.COLLAPSE]:TranslationService.translate(labelKeys.COLLAPSE),[labelKeys.LOGO_LINK]:TranslationService.translate(labelKeys.LOGO_LINK)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=NavbarService.map(e||[],this.productInfo);t.initSelected(getCurrentRoute()),this.menuModel=t}select(e,t){e.preventDefault(),this.clearAllOpenedSubmenuStyles(),t.hasSubmenus()||(e.ctrlKey?openInNewTab(t.href):navigate(t.href)),t.children.length?t.open?(this.menuModel.closeAll(),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.selectItem(t)):(this.menuModel.closeOpened(),this.menuModel.open(t),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.deselectItem(t)):this.menuModel.closeOtherParents(t),this.isCollapsed&&this.menuModel.isParentOpened(t)&&this.menuModel.closeOpened(),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement)}subscribeToNavigationEnd(){this.subscriptions.add(ServiceProvider.get(EventService).subscribe(EventName.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),isHomePage()||this.menuModel.initSelected(getCurrentRoute()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement))}toggleNavbar(){this.isCollapsed?(this.isCollapsedByUser=!1,this.menuModel.expandSelected(),this.menuModel.unhighlightSelected(),this.expandNavbar(),this.clearAllOpenedSubmenuStyles()):(this.isCollapsedByUser=!0,this.menuModel.highlightSelected(),this.menuModel.closeOpened(),this.collapseNavbar(),this.clearAllOpenedSubmenuStyles()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}collapseNavbar(){this.hostElement.querySelector(".navbar-component").classList.add("collapsed"),this.isCollapsed=!0}expandNavbar(){this.isCollapsedByUser||(this.hostElement.querySelector(".navbar-component").classList.remove("collapsed"),this.isCollapsed=!1)}refreshNavbar(){var e;(null===(e=this.menuModel)||void 0===e?void 0:e.items)&&(this.menuModel=new NavbarModel(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(TranslationService.onTranslate(e,[],t=>{this.labels[e]=t,this.onLanguageChanged()}))}toggleNavbarHandler(){return()=>this.toggleNavbar()}adjustSubmenuMaxHeight(e,t=this.SUBMENU_VERTICAL_MARGIN){if(!e||"function"!=typeof e.getBoundingClientRect)return;const o=e.closest(".menu-element");if(!o)return;const i=e.getBoundingClientRect(),n=o.getBoundingClientRect(),r=window.innerHeight,s=n.top-t+n.height,a=r-n.bottom+n.height-t;let l,c=!1;a>=i.height?l=a:s>=i.height?(l=s,c=!0):a>s?(l=a,c=!1):(l=s,c=!0),c?(e.style.bottom="0",e.style.top="auto"):(e.style.top="0",e.style.bottom="auto"),e.style.maxHeight=`${Math.max(this.MIN_SUBMENU_HEIGHT,l)}px`,e.style.overflowY="auto"}adjustAllSubmenus(e,t=this.SUBMENU_VERTICAL_MARGIN){requestAnimationFrame(()=>{e&&"function"==typeof e.querySelectorAll&&this.getAllOpenedSubmenus(e).forEach(e=>this.adjustSubmenuMaxHeight(e,t))})}getAllOpenedSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component.collapsed .menu-element.open .sub-menu"))}getAllSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component .menu-element .sub-menu"))}clearAllOpenedSubmenuStyles(){this.getAllSubmenus(this.hostElement).forEach(e=>{e.style.maxHeight="",e.style.overflowY="",e.style.top="",e.style.bottom=""})}componentWillLoad(){this.init(this.menuItems)}connectedCallback(){this.subscribeToNavigationEnd(),this.subscribeToProductInfoChanges(),this.onTranslate(labelKeys.EXPAND),this.onTranslate(labelKeys.COLLAPSE),this.onTranslate(labelKeys.LOGO_LINK),window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){this.subscriptions.unsubscribeAll(),window.removeEventListener("resize",this.resizeHandler)}handleSelectMenuItem(e){return t=>{this.select(t,e)}}render(){if(this.menuModel)return h(Host,null,h("ul",{class:"navbar-component"},h("li",{class:"brand"},h("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[labelKeys.EXPAND]:this.labels[labelKeys.COLLAPSE],onClick:this.toggleNavbarHandler()},h("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),h("a",{class:"menu-element-root home-page",onClick:navigateTo("./")},h("svg",{class:"big-logo"},h("desc",null,this.labels[labelKeys.LOGO_LINK]),h("use",{href:"assets/graphdb-logo.svg#Layer_1"})),h("svg",{class:"small-logo"},h("desc",null,this.labels[labelKeys.LOGO_LINK]),h("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(e=>h("li",{key:e.labelKey,class:{"menu-element":!0,open:e.open},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.children.length>0&&h(Fragment,null,h("div",{class:{"menu-element-root":!0,active:e.selected},onClick:this.handleSelectMenuItem(e)},h("span",{class:`menu-item-icon ${e.icon}`})," ",h("translate-label",{class:"menu-item",labelKey:e.labelKey})),h("ul",{class:"sub-menu"},h("li",{key:e.labelKey,class:"submenu-title"},h("translate-label",{labelKey:e.labelKey})),e.children.map(e=>h("li",{key:e.labelKey,class:{"sub-menu-item":!0,active:e.selected},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.documentationHref?h("a",{class:"sub-menu-link external-link",href:e.href,target:"_blank",rel:"noopener noreferrer"},h("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&h("span",{class:`text-muted ${e.icon}`})):h("a",{class:"sub-menu-link",href:e.href,onClick:this.handleSelectMenuItem(e)},h("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&h("span",{class:`text-muted ${e.icon}`})))))),0===e.children.length&&h("a",{class:{"menu-element-root":!0,active:e.selected},href:e.href,onClick:this.handleSelectMenuItem(e)},h("span",{class:`menu-item-icon ${e.icon}`})," ",h("translate-label",{class:"menu-item",labelKey:e.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return getElement(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};OntoNavbar.style=ontoNavbarCss;const ontoToastrCss=".onto-toastr-container{position:fixed;z-index:9999999;pointer-events:auto;flex-direction:column}.onto-toastr-container.bottom-right{bottom:12px;right:12px}.onto-toastr-container.bottom-left{bottom:12px;left:12px}.onto-toastr-container .onto-toast{display:flex;align-items:center;border-radius:0;box-shadow:0 0 12px rgba(0, 0, 0, 0.3);position:relative;width:450px;padding:25px 0;color:white;margin-bottom:5px;overflow-wrap:break-word}.onto-toastr-container .onto-toast:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.onto-toastr-container .onto-toast.warning{color:var(--gw-toast-warn-color);background-color:var(--gw-toast-warn-background);border-color:var(--gw-toast-warn-border-color)}.onto-toastr-container .onto-toast.success{background-color:var(--gw-toast-success-background);border-color:var(--gw-toast-success-border-color);color:var(--gw-toast-success-color)}.onto-toastr-container .onto-toast.error{background-color:var(--gw-toast-error-background);border-color:var(--gw-toast-error-border-color);color:var(--gw-toast-error-color)}.onto-toastr-container .onto-toast.info{background-color:var(--gw-toast-info-background);border-color:var(--gw-toast-info-border-color);color:var(--gw-toast-info-color)}.onto-toastr-container .onto-toast i{font-size:1.8rem;padding:0 20px;color:inherit}.onto-toastr-container .onto-toast i:hover{transform:none}.onto-toastr-container .onto-toast .toast-message{font-size:1.2rem;opacity:1;max-width:370px}",toastTypeToIconMap={[ToastType.INFO]:"ri-information-2-fill",[ToastType.SUCCESS]:"ri-checkbox-circle-line",[ToastType.WARNING]:"ri-message-line",[ToastType.ERROR]:"ri-alert-line"},OntoToastr=class{constructor(e){registerInstance(this,e),this.toasts=new ToastMessageList([]),this.toastToTimeout=new Map,this.config=ToastrConfig.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var e;return h("section",{key:"57fcc0103bbc130bee6043a37c7c3539b8eb3c5a",style:{display:this.toasts.isEmpty()?"none":"flex"},class:`onto-toastr-container ${this.config.position}`},null===(e=this.toasts)||void 0===e?void 0:e.getItems().map(e=>h("div",{class:`onto-toast ${e.type}`,key:e.id,onMouseEnter:this.onToastMouseEnter(e),onMouseLeave:this.onToastMouseLeave(e)},h("i",{class:`${toastTypeToIconMap[e.type]}`}),h("span",{onClick:this.handleToastClick(e),class:"toast-message",innerHTML:sanitizeHTML(e.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=WindowService.getWindow().setTimeout(()=>{this.toasts.remove(e),this.clearToastTimeout(e)},(null===(t=e.config)||void 0===t?void 0:t.timeout)||this.config.timeout);this.toastToTimeout.set(e,o)}updateToastrReference(){this.toasts=new ToastMessageList(this.toasts.getItems())}clearToastTimeout(e){const t=this.toastToTimeout.get(e);clearTimeout(t),this.toastToTimeout.delete(e),this.updateToastrReference()}handleToastClick(e){return t=>{var o,i;(null===(o=e.config)||void 0===o?void 0:o.onClick)&&e.config.onClick(t),(null===(i=e.config)||void 0===i?void 0:i.removeOnClick)&&(this.toasts.remove(e),this.clearToastTimeout(e))}}};OntoToastr.style=ontoToastrCss;const ontoTooltipCss='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light-border]{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#333;box-shadow:0 4px 14px -2px rgba(0,8,16,.08)}.tippy-box[data-theme~=light-border]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light-border]>.tippy-arrow:after,.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{content:"";position:absolute;z-index:-1}.tippy-box[data-theme~=light-border]>.tippy-arrow:after{border-color:transparent;border-style:solid}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after{border-top-color:rgba(0,8,16,.2);border-width:7px 7px 0;top:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg{top:16px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after{top:17px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff;bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after{border-bottom-color:rgba(0,8,16,.2);border-width:0 7px 7px;bottom:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after{bottom:17px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after{border-left-color:rgba(0,8,16,.2);border-width:7px 0 7px 7px;left:17px;top:1px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg{left:11px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after{left:12px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff;right:16px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after{border-width:7px 7px 7px 0;right:17px;top:1px;border-right-color:rgba(0,8,16,.2)}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg{right:11px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after{right:12px}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);background-size:16px 6px;width:16px;height:6px}:host{display:block}.tippy-box[data-theme=onto-tooltip]{color:var(--gw-tooltip-color);background-color:var(--gw-tooltip-background);border-radius:0}.tippy-box[data-theme=onto-tooltip] .tippy-arrow{color:var(--gw-tooltip-background)}',OntoTooltip=class{constructor(e){registerInstance(this,e),this.clearTooltipsForRemovedElements=e=>{for(const t of e)for(const e of Array.from(t.removedNodes))if(this.removeTooltipFromNode(e))return},this.removeTooltipFromNode=e=>{if(e instanceof HTMLElement){if(TooltipUtil.getTooltipInstance(e))return TooltipUtil.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=TooltipUtil.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=TooltipUtil.getTooltipInstance(t);e&&"manual"===e.props.trigger&&TooltipUtil.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return h(Host,{key:"9b797bae73df060bdecef74fb84a90fb61ac6eef"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};OntoTooltip.style=ontoTooltipCss;export{OntoFooter as onto_footer,OntoHeader as onto_header,OntoNavbar as onto_navbar,OntoToastr as onto_toastr,OntoTooltip as onto_tooltip};
|
|
1
|
+
import{r as registerInstance,h,a as Host,c as createEvent,F as Fragment,g as getElement}from"./index-I_gcXFWK.js";import{SubscriptionList,ServiceProvider,SecurityContextService,LicenseContextService,CookieService,ProductInfoContextService,LicenseService,WindowService,CookieConsent,MonitoringService,RepositoryContextService,RepositoryLocationContextService,RepositoryService,OntoToastrService,NamespacesService,NamespacesContextService,LanguageService,FibonacciGenerator,AuthenticationService,EventService,isHomePage,getCurrentRoute,EventName,LanguageContextService,RepositoryList,ObjectUtil,getPathName,UriUtil,openInNewTab,navigate,navigateTo,ToastMessageList,ToastrConfig,ToastType}from"@ontotext/workbench-api";import{T as TranslationService,L as LoggerProvider,s as sanitizeHTML}from"./translation.service-nljGIprK.js";import{H as HtmlUtil}from"./html-util-C8DO915D.js";import{R as ResourceSearchConstants,D as DropdownItem}from"./resource-search-constants-CapzAxJp.js";import{T as TooltipUtil}from"./tooltip-util-BqOc8q8q.js";import"./onto-tooltip-placement-D_J2-9CG.js";const ontoFooterCss=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}",OntoFooter=class{constructor(e){registerInstance(this,e),this.subscriptions=new SubscriptionList,this.currentYear=(new Date).getFullYear(),this.securityContextService=ServiceProvider.get(SecurityContextService),this.licenseContextService=ServiceProvider.get(LicenseContextService),this.cookieService=ServiceProvider.get(CookieService)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var e,t,o,i;return h(Host,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},h("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},h("a",{key:"e81e156b6b691a0a05275ee399ccf26438ba5729",href:"http://graphdb.ontotext.com",target:"_blank",rel:"noopener noreferrer"},"GraphDB")," ",null===(e=this.productInfo)||void 0===e?void 0:e.productVersion," • ",h("a",{key:"018b1772807248dfd83e0c2ca57fde6bd848e9c9",href:"http://rdf4j.org",target:"_blank",rel:"noopener noreferrer"},"RDF4J")," ",null===(t=this.productInfo)||void 0===t?void 0:t.sesame," • Connectors ",null===(o=this.productInfo)||void 0===o?void 0:o.connectors," • Workbench ",null===(i=this.productInfo)||void 0===i?void 0:i.workbench," • © 2002–",this.currentYear," ",h("a",{key:"20e70771852b0c504e86e36a1b9fdb9b61d5963c",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",h("translate-label",{key:"8df55b8d224ae50ca9de3fd038c0285ee01b4ff3",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&h("onto-cookie-consent",{key:"80f9c1af70db76ef4c6680dacf7022eb1262f049"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(ServiceProvider.get(ProductInfoContextService).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return ServiceProvider.get(LicenseService).isTrackableLicense()&&!WindowService.getWindow().wbDevMode}subscribeToUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.setCookieConsentVisibility()}))}setCookieConsentVisibility(){var e;const t=this.securityContextService.getAuthenticatedUser();this.shouldShowCookieConsent=this.isTrackingAllowed()&&!new CookieConsent(null===(e=null==t?void 0:t.appSettings)||void 0===e?void 0:e.COOKIE_CONSENT).policyAccepted}subscribeToLicenseChange(){this.subscriptions.add(this.licenseContextService.onLicenseChanged(()=>{this.setCookieConsentVisibility()}))}};OntoFooter.style=ontoFooterCss;const SelectorItemButton=({repository:e})=>h("div",{class:"repository-selector-dropdown-item"},h("i",{class:"item-icon icon-repo-"+e.type}),h("div",{class:"item-label"},h("div",{class:"repository-id"},e.id),h("div",{class:"repository-location"},e.location?e.location:"Local"))),ontoHeaderCss=":host{display:block}.header-component>*{height:100%}.header-component{display:flex;justify-content:flex-end;align-items:stretch;gap:0.25em;margin-right:2em;font-size:1.1em;padding-bottom:0.5rem}",OntoHeader=class{constructor(e){registerInstance(this,e),this.monitoringService=ServiceProvider.get(MonitoringService),this.repositoryContextService=ServiceProvider.get(RepositoryContextService),this.repositoryLocationContextService=ServiceProvider.get(RepositoryLocationContextService),this.repositoryService=ServiceProvider.get(RepositoryService),this.securityContextService=ServiceProvider.get(SecurityContextService),this.toastrService=ServiceProvider.get(OntoToastrService),this.namespacesService=ServiceProvider.get(NamespacesService),this.namespaceContextService=ServiceProvider.get(NamespacesContextService),this.languageService=ServiceProvider.get(LanguageService),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new FibonacciGenerator,this.authService=ServiceProvider.get(AuthenticationService),this.eventService=ServiceProvider.get(EventService),this.shouldShowSearch=!0,this.isHomePage=isHomePage(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new SubscriptionList,this.skipUpdateActiveOperationsTimes=0,this.canWriteRepo=e=>this.canWriteRepoInLocation(e),this.repositorySizeInfoFetcher=e=>this.repositoryService.getRepositorySizeInfo(e),this.showViewResourceMessage=e=>{e.stopPropagation(),this.toastrService.info(TranslationService.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,HtmlUtil.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:ResourceSearchConstants.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=getCurrentRoute(),this.startOperationPolling()}render(){var e,t,o,i,n,r;return h(Host,{key:"8222e10554a901e025c47424aea4b6294f240ea4"},h("div",{key:"8a0b771d5dbddcb7acff61e7a436d2e4a097277f",class:"header-component"},h("onto-search-icon",{key:"d24c7f1be0241391078cc730a1ef2a5a86172e8f",class:"rdf-search-button",onClick:this.showViewResourceMessage,"data-test":"onto-show-view-resource-message",style:{display:this.shouldShowSearch&&this.isHomePage?"block":"none"}}),h("onto-rdf-search",{key:"b75323ddf445ea121fd6067723bf8550b861f4e5","data-test":"onto-open-rdf-search-button",style:{display:this.shouldShowSearch&&!this.isHomePage?"block":"none"}}),(null===(e=this.activeOperations)||void 0===e?void 0:e.allRunningOperations.getItems().length)?h("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(t=this.license)||void 0===t?void 0:t.valid)?h("onto-license-alert",{license:this.license}):"",h("onto-repository-selector",{key:"25a3345c6482a2794032b161a78bc98204aff061",currentRepository:this.currentRepository,items:this.repositoryItems,repositorySizeInfoFetcher:this.repositorySizeInfoFetcher,totalTripletsFormatter:this.totalTripletsFormatter,canWriteRepo:this.canWriteRepo}),(null===(o=this.securityConfig)||void 0===o?void 0:o.enabled)&&(null===(i=this.securityConfig)||void 0===i?void 0:i.userLoggedIn)?h("onto-user-menu",{user:this.user,securityConfig:this.securityConfig}):"",(null===(n=this.securityConfig)||void 0===n?void 0:n.enabled)&&!(null===(r=this.securityConfig)||void 0===r?void 0:r.userLoggedIn)&&"login"!==this.currentRoute?h("onto-user-login",null):"",h("onto-language-selector",{key:"16cba1ff6d691fe0b7442d88940ec9f9ee22aebd","dropdown-alignment":"right"})))}subscribeToEvents(){this.subscribeToSecurityContextChange(),this.subscribeToRepositoryListChanged(),this.subscribeToLicenseChange(),this.subscribeToRepositoryChange(),this.subscribeToActiveRepositoryLocationChange(),this.subscribeToActiveRepoLoadingChange(),this.subscribeToNavigationEnd(),this.subscribeToLanguageChanged(),this.subscribeToAuthenticatedUserChange()}subscribeToRepositoryListChanged(){return this.repositoryContextService.onRepositoryListChanged(e=>{(null==e?void 0:e.getItems().length)?this.initOnRepositoryListChanged(e):this.resetOnMissingRepositories()})}subscribeToLicenseChange(){this.subscriptions.add(ServiceProvider.get(LicenseContextService).onLicenseChanged(e=>{this.license=e}))}subscribeToRepositoryChange(){this.subscriptions.add(this.repositoryContextService.onSelectedRepositoryChanged(e=>{this.currentRepository=e,this.shouldShowSearch=this.shouldShowRdfSearch(),this.loadNamespaces(),this.updateRepositoryItems()}))}subscribeToSecurityContextChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(e=>{this.user=e})),this.subscriptions.add(this.securityContextService.onSecurityConfigChanged(e=>{this.securityConfig=e}))}subscribeToAuthenticatedUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.updateRepositoryItems()}))}subscribeToActiveRepositoryLocationChange(){this.subscriptions.add(this.repositoryLocationContextService.onActiveLocationChanged(()=>{this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToActiveRepoLoadingChange(){this.subscriptions.add(this.repositoryLocationContextService.onIsLoadingChanged(e=>{this.isActiveLocationLoading=e,this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=isHomePage(),this.currentRoute=getCurrentRoute()}))}subscribeToLanguageChanged(){this.subscriptions.add(ServiceProvider.get(LanguageContextService).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new RepositoryList,this.currentRepository=void 0}initOnRepositoryListChanged(e){this.repositoryList=e,this.updateRepositoryItems()}updateRepositoryItems(){this.repositoryItems=this.getRepositoriesDropdownItems()}getRepositoriesDropdownItems(){var e;if(!(null===(e=this.repositoryList)||void 0===e?void 0:e.getItems().length))return[];let t;return this.repositoryList.sortByLocationAndId(),t=this.currentRepository?this.repositoryList.filterByRepository([this.currentRepository]):this.repositoryList.getItems(),t.filter(e=>this.authService.canReadRepo(e)||this.authService.canReadGqlRepo(e)).map(e=>(new DropdownItem).setName(h(SelectorItemButton,{repository:e})).setValue(e).setDropdownTooltipTrigger("mouseenter focus").setGuideSelector(`repository-id-${e.id}`))}canWriteRepoInLocation(e){return!0}loadNamespaces(){this.currentRepository&&this.authService.canReadRepo(this.currentRepository)&&this.namespacesService.getNamespaces(this.currentRepository.id).then(e=>this.namespaceContextService.updateNamespaces(e))}startOperationPolling(){clearInterval(this.pollingInterval),this.pollingInterval=WindowService.getWindow().setInterval(()=>{this.authService.isAuthenticated()?this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.currentRepository&&this.monitoringService.getOperations(this.currentRepository.id).then(e=>{ObjectUtil.deepEqual(this.activeOperations,e)||(this.activeOperations=e),this.fibonacciGenerator.reset(),this.skipUpdateActiveOperationsTimes=0}).catch(()=>{this.activeOperations=void 0,this.skipUpdateActiveOperationsTimes=this.fibonacciGenerator.next()}):this.activeOperations=void 0},this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL)}stopOperationPolling(){clearInterval(this.pollingInterval),this.activeOperations=void 0}shouldShowRdfSearch(){return!!this.currentRepository&&(!this.isActiveLocationLoading||"/repository"===getPathName())&&this.authService.canReadRepo(this.currentRepository)}setupTotalRepositoryFormater(e){e||(e=this.languageService.getDefaultLanguage()),this.totalTripletsFormatter=new Intl.NumberFormat(e,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})}};OntoHeader.style=ontoHeaderCss;class NavbarToggledEvent{constructor(e){this.type="navbarToggled",this.payload=e}}class NavbarModel{constructor(e=[]){this._items=e}hasParent(e){return this._items.some(t=>e===t.label)}getModel(){const e=t=>{const o=t.children.map(e);return new NavbarItemModel(Object.assign(Object.assign({},t),{children:o}))};return this._items.map(e)}addItem(e){this._items.push(e)}getSelectedRootItem(){return this._items.find(e=>e.selected)}isParentOpened(e){var t;return!!(null===(t=this.getParentItem(e))||void 0===t?void 0:t.open)}getTopLevelItem(e){return this._items.find(t=>t.label===e)}getParentItem(e){return this._items.find(t=>t.label===e.parent)}deselectAll(){this.walk(e=>{e.selected=!1})}closeAll(){this.walk(e=>{e.open=!1})}deselectItem(e){e.selected=!1}selectItem(e){e.label?e.selected=!0:this.selectItem(e.parentModel)}hasSelectedSubmenu(e){return!!e.children&&e.children.some(e=>this.hasSelection(e))}hasSelection(e){return!!e.selected||!!e.children&&e.children.some(e=>this.hasSelection(e))}closeOpened(){const e=this._items.find(e=>e.open);e&&(this.hasSelectedSubmenu(e)&&this.selectItem(e),e.open=!1)}open(e){this.walk(e=>{e.open=!1}),this.openItemAndParent(e)}openItemAndParent(e){e.parentModel&&this.openItemAndParent(e.parentModel),e.open=!0}closeOtherParents(e){const t=e.parent;this.walk(e=>{e.label!==t&&(e.open=!1)})}highlightSelected(){const e=this.getSelectedItem();(null==e?void 0:e.hasParent)&&this.selectItem(this.getParentItem(e))}unhighlightSelected(){const e=this.getSelectedRootItem();e&&e.children.length&&e.open&&this.deselectItem(e)}getSelectedItem(){let e=null;const t=o=>{if(o.selected)return e=o,!0;if(o.children)for(const e of o.children)if(t(e))return!0;return!1};return this._items.some(t),e}expandSelected(){const e=this.getSelectedItem();e&&(e.hasParent?this.open(this.getParentItem(e)):this.open(e))}initSelected(e){this.walk(t=>{var o;let i=e;(null===(o=t.href)||void 0===o?void 0:o.includes("*"))&&(i=this.getWildcardPath(e,t.href)),t.href===i&&(t.hasParent&&this.open(t),this.selectItem(t))})}getWildcardPath(e,t){const o=e.split("/"),i=t.split("/");if(o.length!==i.length)return e;const n=[];for(let t=0;t<i.length;t++)if("*"===i[t])n.push("*");else{if(i[t]!==o[t])return e;n.push(i[t])}return n.join("/")}sorted(){return this._items.filter(e=>e.children).forEach(e=>{e.children.sort(NavbarModel.compare)}),this._items.sort(NavbarModel.compare),this}static compare(e,t){return e.order-t.order}walk(e){this.walkRecursively(this.items,e)}walkRecursively(e,t){e.forEach(e=>{var o;t(e),(null===(o=e.children)||void 0===o?void 0:o.length)&&this.walkRecursively(e.children,t)})}get items(){return this._items}}class NavbarItemModel{constructor(e){var t;this._selected=!1,this._open=!1,this._order=e.order,this._label=e.label,this._labelKey=e.labelKey,this._href=e.href,this._children=[...null!==(t=e.children)&&void 0!==t?t:[]],this._hasParent=e.hasParent,this._parent=e.parent,this._selected=e.selected,this._open=e.open,this._documentationHref=e.documentationHref,this._hrefFun=e.hrefFun,this._editions=e.editions,this._icon=e.icon,this._role=e.role,this._guideSelector=e.guideSelector,this._testSelector=e.testSelector,this._shouldShow=e.shouldShow,this._parentModel=e.parentModel}addChild(e){this.children.push(e),e.setParent(this)}addChildren(...e){e.forEach(e=>{this.addChild(e)})}hasSubmenus(){return"#"===this._href}get parent(){return this._parent}set parent(e){this._parent=e}get order(){return this._order}set order(e){this._order=e}get label(){return this._label}set label(e){this._label=e}get labelKey(){return this._labelKey}set labelKey(e){this._labelKey=e}get documentationHref(){return this._documentationHref}set documentationHref(e){this._documentationHref=e}get href(){return this._href}set href(e){this._href=e}get children(){return this._children}set children(e){this._children=e}get hasParent(){return this._hasParent}set hasParent(e){this._hasParent=e}get selected(){return this._selected}set selected(e){this._selected=e}get open(){return this._open}set open(e){this._open=e}get hrefFun(){return this._hrefFun}set hrefFun(e){this._hrefFun=e}get editions(){return this._editions}set editions(e){this._editions=e}get icon(){return this._icon}set icon(e){this._icon=e}get role(){return this._role}set role(e){this._role=e}get guideSelector(){return this._guideSelector}set guideSelector(e){this._guideSelector=e}get testSelector(){return this._testSelector}set testSelector(e){this._testSelector=e}get parentModel(){return this._parentModel}set parentModel(e){this._parentModel=e}get shouldShow(){return this._shouldShow}set shouldShow(e){this._shouldShow=e}setParent(e){this.parentModel=e,this.hasParent=!!e}}const logger=LoggerProvider.logger;class NavbarService{static map(e,t){const o=new NavbarModel;return NavbarService.setTopLevelMenuItems(e,o,t),NavbarService.setSubmenuItems(e,o,t),o.sorted()}static setTopLevelMenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>!e.parent&&e.shouldShow).forEach(e=>{t.hasParent(e.label)?logger.warn("Doubled parent definition: ",e):t.addItem(this.toMenuItemModel(e,void 0,o,e.children))})})}static setSubmenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>e.parent&&e.shouldShow).forEach(e=>{const i=t.getTopLevelItem(e.parent);null==i||i.addChildren(this.toMenuItemModel(e,i,o,e.children))})})}static toMenuItemModel(e,t,o,i=[]){let n;e.documentationHref&&(n=UriUtil.resolveDocumentationUrl(null==o?void 0:o.shortVersion,e.documentationHref));const r=new NavbarItemModel({label:e.label,labelKey:e.labelKey,href:n||e.href,documentationHref:e.documentationHref,hrefFun:e.hrefFun,order:e.order,role:e.role,editions:e.editions,icon:e.icon,guideSelector:e.guideSelector,hasParent:!!t,parentModel:t,parent:e.parent,selected:!1,shouldShow:e.shouldShow,testSelector:e.testSelector}),s=i.map(e=>this.toMenuItemModel(e,r,o,e.children));return r.addChildren(...s),r}}const ontoNavbarCss=':host{display:block}.navbar-component{width:15rem;position:fixed;font-weight:400;z-index:1010;margin:0;padding:0;-moz-transition:width 0.2s ease-in;-o-transition:width 0.2s ease-in;-webkit-transition:width 0.2s ease-in;transition:width 0.2s ease-in;height:100%;overflow-y:auto;overflow-x:hidden}@media screen and (max-height: 475px){.navbar-component.collapsed{position:absolute}}.navbar-component li{list-style:none;cursor:pointer}.navbar-component li a{text-decoration:none}.navbar-component li a.sub-menu-link:not([href=""]):not([tabindex]):hover{text-decoration:none !important}.navbar-component .sub-menu-item a.sub-menu-link:not([href]) translate-label.menu-item{padding-right:3.5px}.navbar-component a.sub-menu-link:not([href]):hover .menu-item,.navbar-component a.sub-menu-link[href=""]:hover .menu-item{text-decoration-line:underline !important}.navbar-component li .menu-element-root:hover,.navbar-component .sub-menu li:hover{text-decoration-line:none !important}.navbar-component li .menu-element-root:hover .menu-item-icon,.navbar-component .menu-element.open .menu-item-icon{transform:scale(1.1)}.navbar-component .menu-element.open .sub-menu .menu-item-icon{transform:scale(0.5)}.navbar-component .menu-element{position:relative}.navbar-component .menu-element-root{padding:0.8em 2.5em 0.8em 0.8em;display:block;line-height:2.5rem;position:relative;z-index:100;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.navbar-component .menu-item-icon{font-size:2.5rem;width:2.5rem;vertical-align:middle;text-align:center;transform:scale(0.9);display:inline-block;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;pointer-events:none}.navbar-component .menu-element-root .menu-item{pointer-events:none}.navbar-component .menu-element-root.active,.navbar-component .menu-element-root.active:hover{background-color:var(--gw-sidenav-submenuitem-active-background);color:#ffffff}.navbar-component .active .menu-item-icon{transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .sub-menu{position:relative;padding:0;z-index:110}.navbar-component .sub-menu li{display:none}.navbar-component .sub-menu li a{padding:0.5em 0.8em;display:block}.navbar-component .sub-menu li.active a{font-weight:500}.navbar-component .menu-element.open ul li{display:block}.navbar-component .menu-element ul:before,.rdf-list ul.datasource:before{font-family:"icomoon", sans-serif !important;content:"\\e921";display:block;font-size:1.5em;position:absolute;top:-3.3rem;right:1rem;-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;pointer-events:none}.navbar-component .menu-element.open ul:before,.rdf-list ul.open.datasource:before{transform:rotate(180deg)}.navbar-component.collapsed{width:4.375rem;overflow:visible;height:auto}.navbar-component.collapsed .menu-element.open .sub-menu{position:absolute;top:0;left:4.375rem;width:15rem}.navbar-component.collapsed .menu-element .menu-item,.navbar-component.collapsed .menu-element .sub-menu li{display:none}.navbar-component.collapsed .menu-element.open .menu-item,.navbar-component.collapsed .menu-element.open .sub-menu li{display:block}.navbar-component.collapsed .menu-element.open .menu-element-root .menu-item{display:none}.navbar-component.collapsed .menu-element-root{overflow:visible}.navbar-component .menu-element.open ul li.submenu-title,.navbar-component .submenu-title{display:none}.navbar-component.collapsed .menu-element.open ul li.submenu-title{display:block;font-size:1.2em;font-weight:500;text-overflow:ellipsis;overflow:hidden;padding:0.5em 0.8rem 0.2em 0;margin-left:0.8rem;margin-bottom:0.5em}.navbar-component.collapsed .menu-element.open .sub-menu.align-bottom{bottom:0;top:auto}.navbar-component.collapsed .menu-element ul:before{display:none}.navbar-component.collapsed .brand a{padding:0.4rem}.navbar-component.collapsed .small-logo,.navbar-component .big-logo{display:block}.navbar-component .small-logo,.navbar-component.collapsed .big-logo{display:none}.navbar-component .brand{background-color:var(--gw-sidenav-logo-background)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.toggle-menu{display:block;position:absolute;top:0;right:0;font-size:0.8em;line-height:1.5;padding:0 0.3em;z-index:10;cursor:pointer;background-color:var(--gw-sidenav-collapsebutton-background);color:var(--gw-sidenav-collapsebutton-color)}.toggle-menu:hover{color:var(--gw-sidenav-collapsebutton-hover-color);background-color:var(--gw-sidenav-collapsebutton-hover-background)}.toggle-menu [class^=icon-]{transition:all 0.2s ease-in;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.navbar-component .menu-element .menu-element-root{background-color:var(--gw-sidenav-menuitem-background);color:var(--gw-sidenav-menuitem-color)}.navbar-component .menu-element .menu-element-root:hover{background-color:var(--gw-sidenav-menuitem-hover-background);color:var(--gw-sidenav-menuitem-hover-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon{color:var(--gw-sidenav-menuitem-icon-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon:hover{color:var(--gw-sidenav-menuitem-hover-icon-color)}.navbar-component .menu-element.open .menu-element-root{background-color:var(--gw-sidenav-menuitem-selected-background);color:var(--gw-sidenav-menuitem-selected-color)}.navbar-component .menu-element .menu-element-root.active{background-color:var(--gw-sidenav-menuitem-active-background);color:var(--gw-sidenav-menuitem-active-color)}.navbar-component .menu-element .menu-element-root.active .menu-item-icon{color:var(--gw-sidenav-menuitem-active-icon-color)}.navbar-component .menu-element .sub-menu-item,.navbar-component .menu-element .sub-menu{background-color:var(--gw-sidenav-submenuitem-background);color:var(--gw-sidenav-submenuitem-color)}.navbar-component .menu-element .sub-menu-item:hover{background-color:var(--gw-sidenav-submenuitem-hover-background);color:var(--gw-sidenav-submenuitem-hover-color)}.navbar-component .menu-element .sub-menu-item.active,.navbar-component .menu-element .sub-menu-item.active .sub-menu-link{background-color:var(--gw-sidenav-submenuitem-active-background);color:var(--gw-sidenav-submenuitem-active-color)}',labelKeys={EXPAND:"menu.buttons.expand",COLLAPSE:"menu.buttons.collapse",LOGO_LINK:"menu.logo.link.title"},OntoNavbar=class{constructor(e){registerInstance(this,e),this.navbarToggled=createEvent(this,"navbarToggled"),this.productInfoContextService=ServiceProvider.get(ProductInfoContextService),this.subscriptions=new SubscriptionList,this.resizeHandler=()=>this.adjustAllSubmenus(this.hostElement),this.SUBMENU_VERTICAL_MARGIN=8,this.MIN_SUBMENU_HEIGHT=100,this.labels={[labelKeys.EXPAND]:TranslationService.translate(labelKeys.EXPAND),[labelKeys.COLLAPSE]:TranslationService.translate(labelKeys.COLLAPSE),[labelKeys.LOGO_LINK]:TranslationService.translate(labelKeys.LOGO_LINK)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=NavbarService.map(e||[],this.productInfo);t.initSelected(getCurrentRoute()),this.menuModel=t}select(e,t){e.preventDefault(),this.clearAllOpenedSubmenuStyles(),t.hasSubmenus()||(e.ctrlKey?openInNewTab(t.href):navigate(t.href)),t.children.length?t.open?(this.menuModel.closeAll(),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.selectItem(t)):(this.menuModel.closeOpened(),this.menuModel.open(t),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.deselectItem(t)):this.menuModel.closeOtherParents(t),this.isCollapsed&&this.menuModel.isParentOpened(t)&&this.menuModel.closeOpened(),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement)}subscribeToNavigationEnd(){this.subscriptions.add(ServiceProvider.get(EventService).subscribe(EventName.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),isHomePage()||this.menuModel.initSelected(getCurrentRoute()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement))}toggleNavbar(){this.isCollapsed?(this.isCollapsedByUser=!1,this.menuModel.expandSelected(),this.menuModel.unhighlightSelected(),this.expandNavbar(),this.clearAllOpenedSubmenuStyles()):(this.isCollapsedByUser=!0,this.menuModel.highlightSelected(),this.menuModel.closeOpened(),this.collapseNavbar(),this.clearAllOpenedSubmenuStyles()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}collapseNavbar(){this.hostElement.querySelector(".navbar-component").classList.add("collapsed"),this.isCollapsed=!0}expandNavbar(){this.isCollapsedByUser||(this.hostElement.querySelector(".navbar-component").classList.remove("collapsed"),this.isCollapsed=!1)}refreshNavbar(){var e;(null===(e=this.menuModel)||void 0===e?void 0:e.items)&&(this.menuModel=new NavbarModel(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(TranslationService.onTranslate(e,[],t=>{this.labels[e]=t,this.onLanguageChanged()}))}toggleNavbarHandler(){return()=>this.toggleNavbar()}adjustSubmenuMaxHeight(e,t=this.SUBMENU_VERTICAL_MARGIN){if(!e||"function"!=typeof e.getBoundingClientRect)return;const o=e.closest(".menu-element");if(!o)return;const i=e.getBoundingClientRect(),n=o.getBoundingClientRect(),r=window.innerHeight,s=n.top-t+n.height,a=r-n.bottom+n.height-t;let l,c=!1;a>=i.height?l=a:s>=i.height?(l=s,c=!0):a>s?(l=a,c=!1):(l=s,c=!0),c?(e.style.bottom="0",e.style.top="auto"):(e.style.top="0",e.style.bottom="auto"),e.style.maxHeight=`${Math.max(this.MIN_SUBMENU_HEIGHT,l)}px`,e.style.overflowY="auto"}adjustAllSubmenus(e,t=this.SUBMENU_VERTICAL_MARGIN){requestAnimationFrame(()=>{e&&"function"==typeof e.querySelectorAll&&this.getAllOpenedSubmenus(e).forEach(e=>this.adjustSubmenuMaxHeight(e,t))})}getAllOpenedSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component.collapsed .menu-element.open .sub-menu"))}getAllSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component .menu-element .sub-menu"))}clearAllOpenedSubmenuStyles(){this.getAllSubmenus(this.hostElement).forEach(e=>{e.style.maxHeight="",e.style.overflowY="",e.style.top="",e.style.bottom=""})}componentWillLoad(){this.init(this.menuItems)}connectedCallback(){this.subscribeToNavigationEnd(),this.subscribeToProductInfoChanges(),this.onTranslate(labelKeys.EXPAND),this.onTranslate(labelKeys.COLLAPSE),this.onTranslate(labelKeys.LOGO_LINK),window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){this.subscriptions.unsubscribeAll(),window.removeEventListener("resize",this.resizeHandler)}handleSelectMenuItem(e){return t=>{this.select(t,e)}}render(){if(this.menuModel)return h(Host,null,h("ul",{class:"navbar-component"},h("li",{class:"brand"},h("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[labelKeys.EXPAND]:this.labels[labelKeys.COLLAPSE],onClick:this.toggleNavbarHandler()},h("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),h("a",{class:"menu-element-root home-page",onClick:navigateTo("./")},h("svg",{class:"big-logo"},h("desc",null,this.labels[labelKeys.LOGO_LINK]),h("use",{href:"assets/graphdb-logo.svg#Layer_1"})),h("svg",{class:"small-logo"},h("desc",null,this.labels[labelKeys.LOGO_LINK]),h("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(e=>h("li",{key:e.labelKey,class:{"menu-element":!0,open:e.open},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.children.length>0&&h(Fragment,null,h("div",{class:{"menu-element-root":!0,active:e.selected},onClick:this.handleSelectMenuItem(e)},h("span",{class:`menu-item-icon ${e.icon}`})," ",h("translate-label",{class:"menu-item",labelKey:e.labelKey})),h("ul",{class:"sub-menu"},h("li",{key:e.labelKey,class:"submenu-title"},h("translate-label",{labelKey:e.labelKey})),e.children.map(e=>h("li",{key:e.labelKey,class:{"sub-menu-item":!0,active:e.selected},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.documentationHref?h("a",{class:"sub-menu-link external-link",href:e.href,target:"_blank",rel:"noopener noreferrer"},h("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&h("span",{class:`text-muted ${e.icon}`})):h("a",{class:"sub-menu-link",href:e.href,onClick:this.handleSelectMenuItem(e)},h("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&h("span",{class:`text-muted ${e.icon}`})))))),0===e.children.length&&h("a",{class:{"menu-element-root":!0,active:e.selected},href:e.href,onClick:this.handleSelectMenuItem(e)},h("span",{class:`menu-item-icon ${e.icon}`})," ",h("translate-label",{class:"menu-item",labelKey:e.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return getElement(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};OntoNavbar.style=ontoNavbarCss;const ontoToastrCss=".onto-toastr-container{position:fixed;z-index:9999999;pointer-events:auto;flex-direction:column}.onto-toastr-container.bottom-right{bottom:12px;right:12px}.onto-toastr-container.bottom-left{bottom:12px;left:12px}.onto-toastr-container .onto-toast{display:flex;align-items:center;border-radius:0;box-shadow:0 0 12px rgba(0, 0, 0, 0.3);position:relative;width:450px;padding:25px 0;color:white;margin-bottom:5px;overflow-wrap:break-word}.onto-toastr-container .onto-toast:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.onto-toastr-container .onto-toast.warning{color:var(--gw-toast-warn-color);background-color:var(--gw-toast-warn-background);border-color:var(--gw-toast-warn-border-color)}.onto-toastr-container .onto-toast.success{background-color:var(--gw-toast-success-background);border-color:var(--gw-toast-success-border-color);color:var(--gw-toast-success-color)}.onto-toastr-container .onto-toast.error{background-color:var(--gw-toast-error-background);border-color:var(--gw-toast-error-border-color);color:var(--gw-toast-error-color)}.onto-toastr-container .onto-toast.info{background-color:var(--gw-toast-info-background);border-color:var(--gw-toast-info-border-color);color:var(--gw-toast-info-color)}.onto-toastr-container .onto-toast i{font-size:1.8rem;padding:0 20px;color:inherit}.onto-toastr-container .onto-toast i:hover{transform:none}.onto-toastr-container .onto-toast .toast-message{font-size:1.2rem;opacity:1;max-width:370px}",toastTypeToIconMap={[ToastType.INFO]:"ri-information-2-fill",[ToastType.SUCCESS]:"ri-checkbox-circle-line",[ToastType.WARNING]:"ri-message-line",[ToastType.ERROR]:"ri-alert-line"},OntoToastr=class{constructor(e){registerInstance(this,e),this.toasts=new ToastMessageList([]),this.toastToTimeout=new Map,this.config=ToastrConfig.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var e;return h("section",{key:"57fcc0103bbc130bee6043a37c7c3539b8eb3c5a",style:{display:this.toasts.isEmpty()?"none":"flex"},class:`onto-toastr-container ${this.config.position}`},null===(e=this.toasts)||void 0===e?void 0:e.getItems().map(e=>h("div",{class:`onto-toast ${e.type}`,key:e.id,onMouseEnter:this.onToastMouseEnter(e),onMouseLeave:this.onToastMouseLeave(e)},h("i",{class:`${toastTypeToIconMap[e.type]}`}),h("span",{onClick:this.handleToastClick(e),class:"toast-message",innerHTML:sanitizeHTML(e.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=WindowService.getWindow().setTimeout(()=>{this.toasts.remove(e),this.clearToastTimeout(e)},(null===(t=e.config)||void 0===t?void 0:t.timeout)||this.config.timeout);this.toastToTimeout.set(e,o)}updateToastrReference(){this.toasts=new ToastMessageList(this.toasts.getItems())}clearToastTimeout(e){const t=this.toastToTimeout.get(e);clearTimeout(t),this.toastToTimeout.delete(e),this.updateToastrReference()}handleToastClick(e){return t=>{var o,i;(null===(o=e.config)||void 0===o?void 0:o.onClick)&&e.config.onClick(t),(null===(i=e.config)||void 0===i?void 0:i.removeOnClick)&&(this.toasts.remove(e),this.clearToastTimeout(e))}}};OntoToastr.style=ontoToastrCss;const ontoTooltipCss='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light-border]{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#333;box-shadow:0 4px 14px -2px rgba(0,8,16,.08)}.tippy-box[data-theme~=light-border]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light-border]>.tippy-arrow:after,.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{content:"";position:absolute;z-index:-1}.tippy-box[data-theme~=light-border]>.tippy-arrow:after{border-color:transparent;border-style:solid}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after{border-top-color:rgba(0,8,16,.2);border-width:7px 7px 0;top:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg{top:16px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after{top:17px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff;bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after{border-bottom-color:rgba(0,8,16,.2);border-width:0 7px 7px;bottom:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after{bottom:17px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after{border-left-color:rgba(0,8,16,.2);border-width:7px 0 7px 7px;left:17px;top:1px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg{left:11px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after{left:12px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff;right:16px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after{border-width:7px 7px 7px 0;right:17px;top:1px;border-right-color:rgba(0,8,16,.2)}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg{right:11px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after{right:12px}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);background-size:16px 6px;width:16px;height:6px}:host{display:block}.tippy-box[data-theme=onto-tooltip]{color:var(--gw-tooltip-color);background-color:var(--gw-tooltip-background);border-radius:0}.tippy-box[data-theme=onto-tooltip] .tippy-arrow{color:var(--gw-tooltip-background)}',OntoTooltip=class{constructor(e){registerInstance(this,e),this.clearTooltipsForRemovedElements=e=>{for(const t of e)for(const e of Array.from(t.removedNodes))if(this.removeTooltipFromNode(e))return},this.removeTooltipFromNode=e=>{if(e instanceof HTMLElement){if(TooltipUtil.getTooltipInstance(e))return TooltipUtil.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=TooltipUtil.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=TooltipUtil.getTooltipInstance(t);e&&"manual"===e.props.trigger&&TooltipUtil.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return h(Host,{key:"9b797bae73df060bdecef74fb84a90fb61ac6eef"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};OntoTooltip.style=ontoTooltipCss;export{OntoFooter as onto_footer,OntoHeader as onto_header,OntoNavbar as onto_navbar,OntoToastr as onto_toastr,OntoTooltip as onto_tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-I_gcXFWK.js";import{D as DropdownItem,R as ResourceSearchConstants}from"./resource-search-constants-CapzAxJp.js";import{ServiceProvider,LanguageService,LanguageContextService,navigateTo,MapperProvider,OperationGroupSummaryListMapper,OperationStatus,OperationGroup,SubscriptionList,EventService,ResourceSearchStorageService,UriUtil,SearchButtonConfig,SearchButton,openInNewTab,RepositoryContextService,AutocompleteService,AutocompleteContextService,AutocompleteStorageService,OntoToastrService,NamespacesContextService,SuggestionType,SuggestionSelectedPayload,Suggestion,AuthenticationService}from"@ontotext/workbench-api";import{D as DropdownItemAlignment}from"./dropdown-item-alignment-DghTf3pJ.js";import{O as OntoTooltipPlacement}from"./onto-tooltip-placement-D_J2-9CG.js";import{T as TranslationService}from"./translation.service-nljGIprK.js";import{H as HtmlUtil}from"./html-util-C8DO915D.js";const ontoLanguageSelectorCss=":host{display:block}onto-language-selector{display:block}onto-language-selector .onto-dropdown{height:100%}onto-language-selector .onto-dropdown.open .onto-dropdown-button{height:fit-content}onto-language-selector .onto-dropdown.closed .onto-dropdown-button{background-color:transparent}onto-language-selector .onto-dropdown.closed .onto-dropdown-button .icon-translation{font-size:1.5em}onto-language-selector .onto-dropdown.closed .onto-dropdown-button:hover{background-color:var(--gw-button-secondary-hover-background)}",OntoLanguageSelector=class{constructor(e){registerInstance(this,e),this.languageService=ServiceProvider.get(LanguageService),this.languageContextService=ServiceProvider.get(LanguageContextService),this.items=[],this.dropdownAlignment=DropdownItemAlignment.LEFT}connectedCallback(){this.onLanguageChangeSubscription=this.languageContextService.onSelectedLanguageChanged(e=>this.changeLanguage(e)),this.items=this.getLanguageDropdownOptions()}disconnectedCallback(){this.onLanguageChangeSubscription&&this.onLanguageChangeSubscription()}render(){var e,t;return h(Host,{key:"faabdc9c474b053c32f4ae2c45cd79bd6166a255"},h("onto-dropdown",{key:"e15d2c8478c85c3a37c99d22f91602ea17730e67",class:"onto-language-selector",onValueChanged:this.valueChangeHandler(),dropdownButtonNameLabelKey:this.currentLanguage?void 0:"language_selector.toggle_menu.label",dropdownButtonName:null!==(e=this.currentLanguage)&&void 0!==e?e:void 0,dropdownButtonTooltipLabelKey:this.currentLanguage?"language_selector.toggle_menu.tooltip":"language_selector.toggle_menu.label",dropdownAlignment:null!==(t=this.dropdownAlignment)&&void 0!==t?t:DropdownItemAlignment.RIGHT,dropdownTooltipTrigger:"mouseenter focus",iconClass:"icon-translation",items:this.items,"auto-close":!0}))}valueChangeHandler(){return e=>this.onSelectedLanguageChanged(e)}changeLanguage(e){let t=e;t||(t=this.languageService.getDefaultLanguage()),this.currentLanguage=t,this.items=this.getLanguageDropdownOptions()}onSelectedLanguageChanged(e){this.languageContextService.updateSelectedLanguage(e.detail)}getLanguageDropdownOptions(){return this.languageService.getSupportedLanguages().map(e=>{const t=this.currentLanguage===e?"icon-tick":"";return(new DropdownItem).setNameLabelKey(`language_selector.language.${e}.label`).setTooltipLabelKey(`language_selector.language.${e}.tooltip.`+(this.currentLanguage===e?"selected":"not_selected")).setIconClass(t).setCssClass(e).setValue(e).setDropdownTooltipTrigger("mouseenter focus")})}};OntoLanguageSelector.style=ontoLanguageSelectorCss;const ontoLicenseAlertCss=":host{display:block}.onto-license-alert{animation:fade-button 2s infinite;--fade-color:var(--gw-error-light);border:1px solid transparent !important}.onto-license-alert:hover{text-decoration:none;background-color:var(--gw-error-light) !important;border-color:var(--gw-error-light) !important}.onto-license-alert:hover span{transform:scale(1.2)}.onto-license-alert span{transition:transform 0.15s ease-out}.onto-license-alert .icon-warning{margin-right:0.2em;line-height:0.75;font-size:1.4em;display:inline-block;vertical-align:middle}",OntoLicenseAlert=class{constructor(e){registerInstance(this,e)}render(){var e;return h(Host,{key:"0067db786bd82713daab8282753d3f93aec0ec38","tooltip-content":null===(e=this.license)||void 0===e?void 0:e.message,"tooltip-placement":OntoTooltipPlacement.BOTTOM,"data-test":"onto-license-alert"},h("button",{key:"b85276c21bc7686e7d9b00ba5123aa73b5013a19",class:"onto-license-alert onto-btn",onClick:navigateTo("license")},h("span",{key:"7e3d93a7afe21e6b2a4b7706205c5aac60f3fde2",class:"icon-warning"}),h("translate-label",{key:"42f0bfeefdf7d758f5d2ad3f473f1b24f777f1dc",labelKey:"license_alert.label"})))}};OntoLicenseAlert.style=ontoLicenseAlertCss;const ontoOperationsNotificationCss=".operations-statuses{position:relative}.operations-statuses .operations-statuses-dropdown-toggle{display:flex;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border:1px solid transparent;padding:0.4rem 1rem;font-size:1rem;gap:0.75em;transition:all 0.15s ease-out}.operations-statuses .operations-statuses-dropdown-toggle:hover{background-color:#d4d4d4;border-color:#d4d4d4}.operations-statuses .operations-statuses-dropdown-toggle:hover i:not(.ri-arrow-down-s-line){transform:scale(1.2)}.operations-statuses .operations-statuses-dropdown-toggle:focus{outline:none}.operations-statuses .operations-statuses-dropdown-toggle.open{background-color:#bbb !important;border-color:#bbb !important}.operations-statuses .operations-statuses-dropdown-toggle .operation-status-header{display:flex}.operations-statuses .operations-statuses-dropdown-toggle .operation-status-header .running-operation-count{color:white;padding:1px 2px;line-height:1;align-self:center;top:-1em;font-size:60%}.operations-statuses .operations-dropdown{position:absolute;right:0;z-index:1000;border:none;background-color:var(--gw-primary-base, #9e2b0a);border-radius:0;list-style:none;padding:0;-moz-transition:all 150ms ease-out;-o-transition:all 150ms ease-out;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.operations-statuses .operations-dropdown .operations-statuses-content{display:flex;flex-direction:column;background-color:#bbb;margin:0}.operations-statuses .operations-dropdown .operations-statuses-content li:first-child{margin-top:5px}.operations-statuses .operations-dropdown .operations-statuses-content li:last-child{margin-bottom:5px}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content{display:flex;flex-direction:row;margin:5px 10px;align-items:center;justify-content:start;cursor:pointer;text-decoration:none;width:auto;gap:0.5em;background-color:#EBEBEB;border-color:#EBEBEB}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content i{width:8.33%}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-number{min-width:50px;display:block}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-number .operation-status-running-operation-count{display:block;width:100%;color:white;border-radius:2px;padding:3px 2px 2px;text-align:center;font-size:75%;background-color:var(--gw-info-dark, #004177) !important}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-status-content>*{padding:0}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-status-label{width:66.66%;padding-left:5px;line-height:0;text-align:start}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content:hover{text-decoration:none;background-color:#d4d4d4;border-color:#d4d4d4}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content:hover i{transform:scale(1.2)}.operations-statuses .status-information{color:var(--gw-message-info-color, #004177) !important}.operations-statuses .status-warning{color:var(--gw-message-warning-color, #7e2308) !important}.operations-statuses .status-critical{color:var(--gw-message-error-color, #a31425) !important}.operations-statuses i{padding-left:3px;padding-right:3px;font-size:1.1em;line-height:1.6rem !important;align-content:center;transition:transform 0.15s ease-out}.operations-statuses i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);transition:all 0.2s ease-in}.operations-statuses .icon-import{font-size:21px}",operationGroupToIcon={[OperationGroup.BACKUP]:"ri-archive-line",[OperationGroup.QUERY]:"ri-arrow-left-right-line",[OperationGroup.CLUSTER]:"ri-organization-chart",[OperationGroup.IMPORT]:"icon-import"},operationStatusToWarningClass={[OperationStatus.WARNING]:"status-warning",[OperationStatus.INFORMATION]:"status-information",[OperationStatus.CRITICAL]:"status-critical"},operationStatusToFadeClass={[OperationStatus.WARNING]:"onto-btn-fade-warning",[OperationStatus.CRITICAL]:"onto-btn-fade-danger"},OntoOperationsNotification=class{constructor(e){registerInstance(this,e),this.isOpen=!1,this.toggleDropdown=e=>{e.stopPropagation(),this.isOpen=!this.isOpen}}handleOutsideClick(){this.isOpen&&(this.isOpen=!1)}render(){var e;return this.operationGroups=MapperProvider.get(OperationGroupSummaryListMapper).mapToModel(this.activeOperations.toOperationsGroupSummary()),h("section",{key:"095aef34c3a9ba5b5bf39e581946b36f5610df9d",class:"operations-statuses"},h("button",{key:"e7cb1898eb6bfd222ae51c895e8c72078940da6e",class:`operations-statuses-dropdown-toggle ${this.isOpen?"open":"closed"} ${null!==(e=operationStatusToFadeClass[this.activeOperations.status])&&void 0!==e?e:""}`,onClick:this.toggleDropdown},this.operationGroups.getItems().map(e=>h("section",{key:e.id,class:"operation-status-header"},h("i",{class:`${operationGroupToIcon[e.group]} ${operationStatusToWarningClass[e.status]}`}),e.totalOperations?h("sup",{class:"running-operation-count tag-info"},e.totalOperations):"")),h("i",{key:"247f4f98e3d91d851e978d73413c5d00101f2d0b",class:"ri-arrow-down-s-line "+(this.isOpen?"rotate-180":"")})),this.isOpen&&h("ul",{key:"8121c8133a185d2271526d4cca11ee318bc06b99",class:"operations-dropdown"},h("section",{key:"3d53bcbbef30e807e4b139db673d32868facd82b",class:"operations-statuses-content"},this.activeOperations.allRunningOperations.getItems().map(e=>h("li",{key:e.id},h("a",{class:`operation-status-content onto-btn no-underline ${operationStatusToWarningClass[e.status]}`,target:"_blank",onClick:navigateTo(e.href)},h("i",{class:operationGroupToIcon[e.group]}),h("span",{class:"operation-status-label"},h("translate-label",{labelKey:`operations_notification.links.${e.labelKey}`})),h("span",{class:"operation-number"},e.count?h("span",{class:"operation-status-running-operation-count"},e.count):"")))))))}get el(){return getElement(this)}};OntoOperationsNotification.style=ontoOperationsNotificationCss;const ontoRdfSearchCss=".onto-rdf-search{display:flex;align-items:center;font-size:1.4em;height:auto}.onto-rdf-search .search-area{white-space:nowrap;text-align:start;font-weight:300;max-width:100vw;position:fixed;right:3em;z-index:1;display:block;width:60vw;-webkit-transition:top 0.3s ease-in, opacity 0.5s ease;transition:top 0.3s ease-in, opacity 0.5s ease;box-shadow:0 3px 6px rgba(0, 0, 0, 0.1);border-radius:0;margin-bottom:1em;padding:1.6rem;border:1px solid rgba(0, 0, 0, 0.125);color:var(--gw-dialog-color);background-color:var(--gw-dialog-background)}.onto-rdf-search .search-area.visible{top:40px;opacity:1}.onto-rdf-search .search-area.invisible{top:-550px;opacity:0}.onto-rdf-search .search-area .close-btn{display:block;position:absolute;top:0;right:0;font-size:1.5rem}.onto-rdf-search i{cursor:pointer;color:var(--gw-primary-base);transition:all 0.15s ease-out}.onto-rdf-search i.ri-search-line,.onto-rdf-search i.close-btn{padding:0.5rem 0.8rem}.onto-rdf-search i:hover{transform:scale(1.2)}",OntoRdfSearch=class{constructor(e){registerInstance(this,e),this.subscriptions=new SubscriptionList,this.eventService=ServiceProvider.get(EventService),this.resourceSearchStorageService=ServiceProvider.get(ResourceSearchStorageService),this.RDF_CONTEXT="rdfSearchContext",this.isOpen=!1,this.redirectUrl=UriUtil.RESOURCE_URL}handleClick(e){var t;this.isOpen&&((null===(t=this.rdfSearchRef)||void 0===t?void 0:t.contains(e.target))||(this.isOpen=!1))}connectedCallback(){this.onSuggestionSelected()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}componentDidRender(){this.focusSearchInput()}componentDidLoad(){this.buttonConfig=this.createButtonConfig()}render(){return h("section",{key:"fb63b11874e6049ea060d7f8bf2b9ce00a2bc78c",ref:e=>this.rdfSearchRef=e,class:"onto-rdf-search",onKeyDown:this.onKeyDown(),"data-test":"onto-rdf-search-component"},h("section",{key:"1c7f6a7e9951011e1c62e2f24c912c8c2813c404",class:"search-area "+(this.isOpen?"visible":"invisible")},h("i",{key:"e6f8e37067378b674c1ff4ad8ac105cd472972a5",onClick:this.setIsOpen(!1),"tooltip-content":TranslationService.translate("rdf_search.tooltips.close_search_area"),"tooltip-placement":OntoTooltipPlacement.BOTTOM,"data-test":"onto-rdf-resource-search-close-btn",class:"ri-close-line close-btn"}),h("onto-search-resource-input",{key:"a2b41801185618be5658c27bce1e4a05a3820dc7",buttonConfig:this.buttonConfig,preserveSearch:!0,isHidden:!this.isOpen,"data-test":"onto-rdf-resource-search-input",context:this.RDF_CONTEXT})),this.isOpen?"":h("onto-search-icon",{onClick:this.setIsOpen(!0)}))}setIsOpen(e){return()=>{this.isOpen=e,this.isOpen&&this.loadSelectedViewFromStorage()}}createButtonConfig(){return new SearchButtonConfig({isRadio:!0,buttons:[this.createSearchButton(ResourceSearchConstants.TABLE_VIEW,"rdf_search.buttons.table",()=>{this.redirectUrl=UriUtil.RESOURCE_URL,this.resourceSearchStorageService.setSelectedView(ResourceSearchConstants.TABLE_VIEW)},!0),this.createSearchButton(ResourceSearchConstants.VISUAL_VIEW,"rdf_search.buttons.visual",()=>{this.redirectUrl=UriUtil.GRAPHS_VISUALIZATIONS_URL,this.resourceSearchStorageService.setSelectedView(ResourceSearchConstants.VISUAL_VIEW)},!1)]})}createSearchButton(e,t,o,r){return new SearchButton({label:TranslationService.translate(t),id:e,callback:o,selected:r})}onSuggestionSelected(){this.subscriptions.add(this.eventService.subscribe(ResourceSearchConstants.SUGGESTION_SELECTED_EVENT,e=>{if(e.getContext()===this.RDF_CONTEXT){const t=e.getSuggestion().getOverrideToVisual()?UriUtil.GRAPHS_VISUALIZATIONS_URL:this.redirectUrl;openInNewTab(UriUtil.createAutocompleteRedirect(t,e.getSuggestion().getValue()))}}))}onKeyDown(){return e=>{"Escape"===e.key&&(this.isOpen=!1)}}focusSearchInput(){this.isOpen&&HtmlUtil.focusElement(`#${this.RDF_CONTEXT}`)}loadSelectedViewFromStorage(){const e=this.resourceSearchStorageService.getSelectedView();if(e){const t=this.buttonConfig.getButtons().find(t=>t.id===e);t&&(this.buttonConfig=this.buttonConfig.selectButton(t))}}};OntoRdfSearch.style=ontoRdfSearchCss;const RepositorySelection=({repository:e,defaultToggleButtonName:t,location:o})=>{var r;return h("div",{class:e?"repository-selection active-repository":"repository-selection no-selected-repository","data-test":"repository-selection"},e&&h("i",{class:"button-icon icon-repo-"+e.type})," ",null!==(r=null==e?void 0:e.id)&&void 0!==r?r:t,o)},ontoRepositorySelectorCss=":host{display:block}.onto-repository-selector .onto-dropdown.closed .onto-dropdown-button{background-color:var(--gw-button-secondary-background);color:var(--gw-button-secondary-background)}.onto-repository-selector .onto-dropdown.closed .onto-dropdown-button:hover{background-color:var(--gw-button-secondary-hover-background);color:var(--gw-button-secondary-hover-color)}.onto-repository-selector .repository-selector-dropdown-item{display:flex;align-items:center;gap:0.4em}.onto-repository-selector .repository-selector-dropdown-item .item-icon{font-size:1.4em}.onto-repository-selector .repository-selector-dropdown-item .item-label{line-height:0.75em;display:inline-block;vertical-align:middle;text-align:left}.onto-repository-selector .repository-selector-dropdown-item .item-label .repository-id{line-height:0.75em}.onto-repository-selector .repository-selector-dropdown-item .item-label .repository-location{font-weight:300;font-size:0.75em;margin-top:0.4em;display:inline-block;max-width:120px;text-overflow:ellipsis;overflow:hidden}.tippy-box[data-theme=light-border]{border-radius:0}.tippy-box[data-theme=light-border].tippy-box[data-placement*=left]>.tippy-arrow:before{border-left-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=left]>.tippy-arrow:after{border-left-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=top]>.tippy-arrow:before{border-top-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=top]>.tippy-arrow:after{border-top-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=right]>.tippy-arrow:before{border-right-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=right]>.tippy-arrow:after{border-right-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=bottom]>.tippy-arrow:before{border-bottom-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=bottom]>.tippy-arrow:after{border-bottom-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border] .tippy-content{padding:0;color:var(--gw-dialog-color);border:1px solid var(--gw-dialog-border-color);box-shadow:var(--gw-dialog-shadow-1-offset-x) var(--gw-dialog-shadow-1-offset-y) var(--gw-dialog-shadow-1-blur) var(--gw-dialog-shadow-1-spread) var(--gw-dialog-shadow-1-color)}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-title{font-size:1rem;font-weight:400;padding:8px 14px;background-color:var(--gw-dialog-background);border-bottom:var(--gw-dialog-border-color) 1px solid}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-title .value{word-wrap:break-word}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-content{background-color:var(--gw-dialog-background);padding:1.5rem 0.5rem;display:flex;flex-direction:column;gap:0.8em;font-weight:400;font-size:0.875rem}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row{display:flex;flex-direction:row;justify-content:space-between}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row.total{margin-top:1.2em}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row .value{margin-left:0.6em}",OntoRepositorySelector=class{constructor(e){registerInstance(this,e),this.repositoryContextService=ServiceProvider.get(RepositoryContextService),this.subscriptions=[]}onItemsChanged(e){(null==e?void 0:e.length)?this.dropdownItems=this.attachTooltipsToItems(this.items):this.dropdownItems=[]}connectedCallback(){var e;this.subscriptions.push(...this.subscribeToTranslationChanged()),(null===(e=this.items)||void 0===e?void 0:e.length)?this.dropdownItems=this.attachTooltipsToItems(this.items):this.dropdownItems=[]}disconnectedCallback(){this.subscriptions.forEach(e=>e())}render(){const e=h(RepositorySelection,{key:"bf5de32d81929056bbdf4c16a228cbe3dd7d2cdf",repository:this.currentRepository,defaultToggleButtonName:this.getButtonLabel(),location:this.getLocation()});return h(Host,{key:"ad2c4f2fee7b98d840bf0881ec571d7279dcdea5"},h("onto-dropdown",Object.assign({key:"442ac676b56db755c45caf45fd0216ed050334ba",class:"onto-repository-selector","data-test":"onto-repository-selector",onValueChanged:this.onValueChanged(),dropdownButtonName:e,dropdownButtonTooltip:this.createTooltipFunctionForRepository(this.currentRepository)},this.currentRepository?{dropdownButtonGuideSelector:`repository-id-${this.currentRepository.id}`}:{},{dropdownTooltipTrigger:"mouseenter focus",dropdownAlignment:DropdownItemAlignment.RIGHT,tooltipPlacement:this.tooltipAlignment,tooltipTheme:"light-border",items:this.dropdownItems,"auto-close":!0})))}attachTooltipsToItems(e){return e?e.map(e=>e.setTooltip(this.createTooltipFunctionForRepository(e.value))):[]}tooltipAlignment(e){return e?OntoTooltipPlacement.LEFT:OntoTooltipPlacement.BOTTOM}onValueChanged(){return e=>this.onRepositoryChanged(e.detail)}createTooltipFunctionForRepository(e){return async()=>{if(!e)return"";const t=await this.repositorySizeInfoFetcher(e);return this.buildRepositoryTooltipHtml(e,t)}}buildRepositoryTooltipHtml(e,t){let o=`\n <div class="repository-tooltip-title">\n <span class="label">${TranslationService.translate("repository-selector.tooltip.repository")}</span>\n <span class="value">${e.id}</span>\n </div>\n <div class="repository-tooltip-content">\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.location")}:</div>\n <div class="value">${e.location?e.location:TranslationService.translate("repository-selector.tooltip.local")}</div>\n </div>\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.type")}:</div>\n <div class="value">${TranslationService.translate("repository-selector.tooltip.types."+(e.type||"unknown"))}</div>\n </div>\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.access")}:</div>\n <div class="value">${TranslationService.translate(this.canWriteRepo(e)?"repository-selector.tooltip.accesses.read_write":"repository-selector.tooltip.accesses.read")}</div>\n </div>`;return o+=this.buildRepositorySizeInfoHtml(t),o+="</div>",o}buildRepositorySizeInfoHtml(e){if(!e||e.total<0)return"";let t=`\n <div class="repository-tooltip-row total">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.total")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.total)}</div>\n </div>`;if(e.explicit>=0&&(t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.explicit")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.explicit)}</div>\n </div>`),e.inferred>=0&&(t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.inferred")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.inferred)}</div>\n </div>`),e.total>=0){let o="-";e.explicit>0&&(o=this.totalTripletsFormatter.format(e.total/e.explicit)),t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.expansion_ratio")}:</div>\n <div class="value">${o}</div>\n </div>`}return t}subscribeToTranslationChanged(){return[TranslationService.onTranslate("repository-selector.btn.toggle",[],e=>{this.defaultToggleButtonName=e}),TranslationService.onTranslate("repository-selector.btn.no_repositories",[],e=>{this.noRepositoriesButtonMessage=e})]}onRepositoryChanged(e){this.repositoryContextService.updateSelectedRepository(e)}getLocation(){var e;return(null===(e=this.currentRepository)||void 0===e?void 0:e.location)?`@${UriUtil.shortenIri(this.currentRepository.location)}`:""}getButtonLabel(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)?this.defaultToggleButtonName:this.noRepositoriesButtonMessage}static get watchers(){return{items:["onItemsChanged"]}}};OntoRepositorySelector.style=ontoRepositorySelectorCss;const ontoSearchIconCss=".onto-search-icon{cursor:pointer;color:var(--gw-primary-base, #9e2b0a);transition:all 0.15s ease-out;font-size:1.6rem}.onto-search-icon.ri-search-line{padding:0.5rem 0.8rem}.onto-search-icon:hover{transform:scale(1.2)}",OntoSearchIcon=class{constructor(e){registerInstance(this,e),this.tooltipKey="rdf_search.labels.search",this.subscriptions=new SubscriptionList}connectedCallback(){this.onTooltipChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return h("i",{key:"33ac85ef454f5a8de8e24217d92950219df84f7a","tooltip-content":this.tooltipLabel,"tooltip-placement":OntoTooltipPlacement.BOTTOM,class:"onto-search-icon ri-search-line"})}onTooltipChange(){this.subscriptions.add(TranslationService.onTranslate(this.tooltipKey,[],e=>this.tooltipLabel=e))}};OntoSearchIcon.style=ontoSearchIconCss;const ontoSearchResourceInputCss=".search-resources-input{padding-right:20px}.search-resources-input .input-row{gap:3px;display:flex;flex-wrap:wrap}.search-resources-input .input-row .input-wrapper{position:relative;display:flex;flex:1;min-width:20vw}.search-resources-input .input-row .input-wrapper input{min-width:inherit;flex:1;padding:0.5rem 0.75rem;font-size:1rem;line-height:1.25;color:var(--gw-form-field-color);background-color:var(--gw-form-field-background);background-image:none;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid var(--gw-form-field-border-color)}.search-resources-input .input-row .input-wrapper input:focus{outline:0;color:var(--gw-form-field-color);border-color:var(--gw-form-field-focus-border-color)}.search-resources-input .input-row i.ri-close-line{position:absolute;right:10px;top:7px;z-index:10;font-size:1.6rem}.search-resources-input .input-row button{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;transition:all 0.15s ease-out;user-select:none;border:1px solid transparent;padding:0.5rem 1rem;font-size:1rem;color:var(--gw-button-secondary-color);background-color:var(--gw-button-secondary-background)}.search-resources-input .input-row button.selected{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color)}.search-resources-input .input-row button:focus{outline:none}.search-resources-input .input-row button:hover:not(.selected){background-color:var(--gw-button-secondary-hover-background);border-color:var(--gw-button-secondary-hover-color)}.search-resources-input .hint{font-size:0.8rem;color:#818a91}.search-resources-input .autocomplete-results-wrapper{margin-top:6px;max-height:204px;overflow:auto}.search-resources-input .autocomplete-results-wrapper p{font-size:1.1rem;line-height:1.5;color:var(--gw-autocomplete-option-color);background-color:var(--gw-autocomplete-background);margin-bottom:0;padding:5px 25px;cursor:pointer}.search-resources-input .autocomplete-results-wrapper p b{color:var(--gw-secondary-base, #003663)}.search-resources-input .autocomplete-results-wrapper p.selected{background-color:var(--autocomplete-background-selected, #02A99A)}.search-resources-input .autocomplete-results-wrapper p.hovered:not(.selected),.search-resources-input .autocomplete-results-wrapper p:hover:not(.selected){background-color:var(--autocomplete-background, rgba(2, 169, 143, 0.3019607843))}",OntoSearchResourceInput=class{constructor(e){registerInstance(this,e),this.autocompleteService=ServiceProvider.get(AutocompleteService),this.autocompleteContextService=ServiceProvider.get(AutocompleteContextService),this.autocompleteStorageService=ServiceProvider.get(AutocompleteStorageService),this.resourceSearchStorageService=ServiceProvider.get(ResourceSearchStorageService),this.toastrService=ServiceProvider.get(OntoToastrService),this.eventService=ServiceProvider.get(EventService),this.namespaceContextService=ServiceProvider.get(NamespacesContextService),this.subscriptions=new SubscriptionList,this.autocompleteWarningShown=!1,this.skipValidation=!1,this.isHidden=!1,this.isAutocompleteEnabled=!1,this.handleInput=e=>{const t=e.target;t.value?(this.setInputValue(t.value),this.checkForAutocomplete()):this.clearInput()},this.clearInput=()=>{this.setInputValue(""),this.preserveSearch&&this.resourceSearchStorageService.clearStoredSearch()},this.onKeyDown=e=>{switch(e.key){case"Enter":this.onEnter(e);break;case"Escape":this.onEscape();break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowDown":this.onArrowDown(e)}}}onVisibilityChange(e){var t;e?null===(t=this.searchResult)||void 0===t||t.clearSuggestions():this.setInputValue(this.resourceSearchStorageService.getInputValue())}connectedCallback(){this.onAutocompleteEnabledChange(),this.onNamespaceChange(),this.loadInputFromStorage()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){var e,t,o;return h("section",{key:"c038af36fa4270f35dab06147536206eab600ce5",class:"search-resources-input"},h("div",{key:"d9b3044c17de9765bd3cbc724ab76bb13e823136",class:"input-row"},h("span",{key:"297d9e5f94d414f227349b79f26f277e3c246c39",class:"input-wrapper"},h("input",{key:"65db17686344b92e8fb59cba15e48538da26c07e",value:this.inputValue,id:this.context,type:"text",autocomplete:"off",placeholder:`${TranslationService.translate("rdf_search.labels.search")}...`,ref:e=>this.inputRef=e,onKeyDown:this.onKeyDown,"data-test":this.context,onInput:this.handleInput}),(null===(e=this.inputValue)||void 0===e?void 0:e.length)?h("i",{onClick:this.clearInput,"tooltip-content":TranslationService.translate("rdf_search.tooltips.clear"),"tooltip-placement":OntoTooltipPlacement.BOTTOM,class:"ri-close-line clear-input"}):""),null===(t=this.buttonConfig)||void 0===t?void 0:t.getButtons().getItems().map(e=>h("button",{key:e.label,onClick:this.handleButtonClick(e),class:e.selected?"selected":""},e.label))),h("span",{key:"cfb1aa194945352f33b786eb7bf2bae98c6e9ea2",class:"hint"},TranslationService.translate("rdf_search.labels.hint")),h("section",{key:"e17c4e528f8c05ed983df81e2c364356170dac12",class:"autocomplete-results-wrapper","data-test":"onto-autocomplete-results"},null===(o=this.searchResult)||void 0===o?void 0:o.getSuggestions().getItems().map(e=>h("p",{key:e.getId(),onClick:this.onSuggestionClick(e),"data-test":"onto-autocomplete-suggestion",onMouseMove:this.hoverSuggestion(e),class:`${e.isHovered()?"hovered":""} ${e.isSelected()?"selected":""}`,innerHTML:e.getDescription()}))))}handleButtonClick(e){return()=>this.buttonConfig=this.buttonConfig.selectButton(e)}loadAutocompleteResults(){var e;this.inputValue?this.isAutocompleteEnabled&&this.autocompleteService.search(this.inputValue).then(e=>{this.onResultsReceived(e)}):null===(e=this.searchResult)||void 0===e||e.clearSuggestions()}hoverSuggestion(e){return()=>this.searchResult=this.searchResult.hoverSuggestion(e)}onAutocompleteEnabledChange(){this.isAutocompleteEnabled=this.autocompleteStorageService.isEnabled(),this.subscriptions.add(this.autocompleteContextService.onAutocompleteEnabledChanged(e=>{this.isAutocompleteEnabled=null!=e?e:this.isAutocompleteEnabled}))}checkForAutocomplete(){if(this.inputValue.length>0&&!this.isAutocompleteEnabled&&!this.autocompleteWarningShown){this.autocompleteWarningShown=!0;const e=TranslationService.translate("rdf_search.toasts.autocomplete_is_off");this.toastrService.warning(`<a class="no-underline" style="font-weight: 500">${e}</a>`,{onClick:navigateTo("autocomplete"),removeOnClick:!0})}}onSuggestionClick(e){return t=>{e.setOverrideToVisual(t.ctrlKey||t.metaKey),this.searchRdfResource(e)}}searchRdfResource(e){e.getType()===SuggestionType.PREFIX?this.expandPrefix(e):(this.notifyRdfResourceSelected(e),this.preserveSearch&&this.resourceSearchStorageService.setLastSelected(e))}notifyRdfResourceSelected(e){var t;this.searchResult=null===(t=this.searchResult)||void 0===t?void 0:t.selectSuggestion(e),this.eventService.emit({NAME:ResourceSearchConstants.SUGGESTION_SELECTED_EVENT,payload:new SuggestionSelectedPayload(e,this.context)})}expandPrefix(e){this.setInputValue(this.namespaces.getByPrefix(e.getValue())),this.inputRef.focus()}setInputValue(e){this.inputValue=e,this.preserveSearch&&this.resourceSearchStorageService.setInputValue(this.inputValue),this.loadAutocompleteResults()}onNamespaceChange(){this.subscriptions.add(this.namespaceContextService.onNamespacesChanged(e=>{this.namespaces=e}))}onEnter(e){var t;let o=null===(t=this.searchResult)||void 0===t?void 0:t.getHoveredSuggestion();o||(o=new Suggestion({value:UriUtil.removeAngleBrackets(this.inputValue),type:SuggestionType.URI})),o.setOverrideToVisual(e.ctrlKey||e.metaKey),this.validateAndSearch(o)}onArrowUp(e){this.searchResult=this.searchResult.hoverPreviousSuggestion(),this.displaySuggestion(e)}onArrowDown(e){this.searchResult=this.searchResult.hoverNextSuggestion(),this.displaySuggestion(e)}displaySuggestion(e){e.preventDefault(),this.inputRef.value=this.searchResult.getHoveredSuggestion().getValue(),this.scrollToSuggestionBySelector("p.hovered")}getSuggestionValue(e){return e.getType()===SuggestionType.PREFIX?this.namespaces.getByPrefix(e.getValue()):e.getValue()}scrollToSuggestionBySelector(e,t){HtmlUtil.waitForElement(e).then(()=>{HtmlUtil.scrollElementIntoView(e,t)})}validateAndSearch(e){if(!this.skipValidation){if(!e.getValue())return void this.toastrService.error(TranslationService.translate("rdf_search.toasts.empty_input"));if(!UriUtil.isValidUri(this.getSuggestionValue(e)))return void this.toastrService.error(TranslationService.translate("rdf_search.toasts.invalid_uri"))}this.searchRdfResource(e)}onEscape(){this.preserveSearch||this.clearInput()}loadInputFromStorage(){this.preserveSearch&&(this.inputValue=this.resourceSearchStorageService.getInputValue()||"")}onResultsReceived(e){const t=null==e?void 0:e.getByValue(this.resourceSearchStorageService.getLastSelectedValue());t&&this.preserveSearch?(e.hoverSuggestion(t),this.searchResult=e.selectSuggestion(t),this.scrollToSuggestionBySelector("p.hovered.selected",{block:"start"})):(this.searchResult=e.hoverFirstSuggestion(),this.scrollToSuggestionBySelector("p.hovered",{block:"start"}))}static get watchers(){return{isHidden:["onVisibilityChange"]}}};OntoSearchResourceInput.style=ontoSearchResourceInputCss;const ontoUserLoginCss=":root{--onto-user-login-color:var(--gw-secondary-base, var(--base-text-color))}.onto-user-login{position:relative;width:fit-content}.onto-user-login button{display:flex;color:var(--onto-user-login-color);flex-direction:row;line-height:1.5;font-weight:400;font-size:1rem;text-align:center;user-select:none;border:1px solid transparent;padding:0.4em 1rem;cursor:pointer;white-space:nowrap;place-items:center;transition:all 0.15s ease-out}.onto-user-login button .user-login-label{padding:0 0.4rem}.onto-user-login button:hover{background-color:#d4d4d4;border-color:#d4d4d4}.onto-user-login button:hover .ri-user-fill{transform:scale(1.2)}.onto-user-login button:focus{outline:none}.onto-user-login button i{color:var(--user-menu-primary-color);line-height:0.75;font-size:1.2em;transition:0.15s ease-out}.onto-user-login button i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);font-size:1.1em;transition:all 0.2s ease-in}",OntoUserLogin=class{constructor(e){registerInstance(this,e)}render(){return h("section",{key:"010f4db017da2ab91bc79de27658d255de92d5f4",class:"onto-user-login"},h("button",{key:"f3e4019d86f6950a57186bb73dbfd60d1bc03362",onClick:navigateTo("login")},h("i",{key:"42a5ef90e9b768c8d283cdd8c3e6fb2160c33f16",class:"icon-arrow-right"}),h("translate-label",{key:"9f61abfd1f3be13bca10d1d6db4d774accbb2f85",class:"user-login-label",labelKey:"user_menu.login"})))}};OntoUserLogin.style=ontoUserLoginCss;const ontoUserMenuCss=".onto-user-menu{position:relative;width:fit-content}.onto-user-menu button{display:flex;flex-direction:row;line-height:1.5;font-weight:400;font-size:1rem;text-align:center;user-select:none;border:1px solid transparent;padding:0.4em 1rem;cursor:pointer;white-space:nowrap;place-items:center;transition:all 0.15s ease-out;background-color:var(--gw-button-secondary-background);color:var(--gw-button-secondary-color)}.onto-user-menu button:hover{background-color:var(--gw-button-secondary-hover-background);color:var(--gw-button-secondary-hover-color)}.onto-user-menu button:hover .ri-user-line{transform:scale(1.2)}.onto-user-menu button:focus{outline:none}.onto-user-menu button.open{color:white;background-color:var(--gw-primary-base);border-color:var(--gw-primary-base)}.onto-user-menu button.open .ri-user-line{color:var(--icon-on-primary-color, rgba(255, 255, 255, 0.8))}.onto-user-menu button.open:hover .ri-user-line{transform:scale(1.2)}.onto-user-menu button .username{padding:0 5px}.onto-user-menu button i{color:var(--gw-primary-base);transition:0.15s ease-out}.onto-user-menu button i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);font-size:1.1em;transition:all 0.2s ease-in}.onto-user-menu .onto-user-menu-dropdown{position:absolute;z-index:1000;display:flex;flex-direction:column;cursor:pointer;text-decoration:none;right:0;min-width:7rem;font-size:1rem;width:100%;color:var(--gw-primary-contrast-color);background-color:var(--gw-primary-base)}.onto-user-menu .onto-user-menu-dropdown translate-label{padding:0.4rem 1rem;user-select:none;white-space:nowrap;font-weight:400}.onto-user-menu .onto-user-menu-dropdown translate-label:hover,.onto-user-menu .onto-user-menu-dropdown translate-label:focus{background-color:rgba(0, 0, 0, 0.1)}",OntoUserMenu=class{constructor(e){registerInstance(this,e),this.logout=()=>{ServiceProvider.get(AuthenticationService).logout()},this.toggleDropdown=()=>{this.isOpen=!this.isOpen},this.handleOutsideClick=e=>{this.isOpen&&!this.hostElement.contains(e.target)&&(this.isOpen=!1)}}connectedCallback(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}render(){var e;return h("section",{key:"294141ded29aca49a790c51e791262d4626b80ab",class:"onto-user-menu"},h("div",{key:"1e7c1a6ea8e9766840b5c72c7ceecdfaf838c865",class:"dropdown-toggle-wrapper",onClick:this.toggleDropdown},h("button",{key:"413bb997a92cb55ef56ee7ae45463e10c176540c",class:this.isOpen?"open":""},h("i",{key:"2c5806a5a49429b709753a9a009146b578b191ed",class:"ri-user-line ri-lg"}),h("span",{key:"1a59a9218b7a680c47d77c6e016659721d17aea4",class:"username"},this.user.username),h("i",{key:"dea9929dc6bd6280336fe3a7cc1d062d4c9f54c3",class:"ri-arrow-down-s-line "+(this.isOpen?"rotate-180":"")})),this.isOpen?h("section",{class:"onto-user-menu-dropdown"},h("translate-label",{onClick:navigateTo("settings"),labelKey:"user_menu.my_settings"}),(null===(e=this.securityConfig)||void 0===e?void 0:e.hasExternalAuthUser)?"":h("translate-label",{onClick:this.logout,labelKey:"user_menu.logout"})):""))}get hostElement(){return getElement(this)}};OntoUserMenu.style=ontoUserMenuCss;export{OntoLanguageSelector as onto_language_selector,OntoLicenseAlert as onto_license_alert,OntoOperationsNotification as onto_operations_notification,OntoRdfSearch as onto_rdf_search,OntoRepositorySelector as onto_repository_selector,OntoSearchIcon as onto_search_icon,OntoSearchResourceInput as onto_search_resource_input,OntoUserLogin as onto_user_login,OntoUserMenu as onto_user_menu};
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-I_gcXFWK.js";import{D as DropdownItem,R as ResourceSearchConstants}from"./resource-search-constants-CapzAxJp.js";import{ServiceProvider,LanguageService,LanguageContextService,navigateTo,MapperProvider,OperationGroupSummaryListMapper,OperationStatus,OperationGroup,SubscriptionList,EventService,ResourceSearchStorageService,UriUtil,SearchButtonConfig,SearchButton,openInNewTab,RepositoryContextService,AutocompleteService,AutocompleteContextService,AutocompleteStorageService,OntoToastrService,NamespacesContextService,SuggestionType,SuggestionSelectedPayload,Suggestion,AuthenticationService}from"@ontotext/workbench-api";import{D as DropdownItemAlignment}from"./dropdown-item-alignment-DghTf3pJ.js";import{O as OntoTooltipPlacement}from"./onto-tooltip-placement-D_J2-9CG.js";import{T as TranslationService}from"./translation.service-nljGIprK.js";import{H as HtmlUtil}from"./html-util-C8DO915D.js";const ontoLanguageSelectorCss=":host{display:block}onto-language-selector{display:block}onto-language-selector .onto-dropdown{height:100%}onto-language-selector .onto-dropdown.open .onto-dropdown-button{height:fit-content}onto-language-selector .onto-dropdown.closed .onto-dropdown-button{background-color:transparent}onto-language-selector .onto-dropdown.closed .onto-dropdown-button .icon-translation{font-size:1.5em}onto-language-selector .onto-dropdown.closed .onto-dropdown-button:hover{background-color:var(--gw-button-secondary-hover-background)}",OntoLanguageSelector=class{constructor(e){registerInstance(this,e),this.languageService=ServiceProvider.get(LanguageService),this.languageContextService=ServiceProvider.get(LanguageContextService),this.items=[],this.dropdownAlignment=DropdownItemAlignment.LEFT}connectedCallback(){this.onLanguageChangeSubscription=this.languageContextService.onSelectedLanguageChanged(e=>this.changeLanguage(e)),this.items=this.getLanguageDropdownOptions()}disconnectedCallback(){this.onLanguageChangeSubscription&&this.onLanguageChangeSubscription()}render(){var e,t;return h(Host,{key:"faabdc9c474b053c32f4ae2c45cd79bd6166a255"},h("onto-dropdown",{key:"e15d2c8478c85c3a37c99d22f91602ea17730e67",class:"onto-language-selector",onValueChanged:this.valueChangeHandler(),dropdownButtonNameLabelKey:this.currentLanguage?void 0:"language_selector.toggle_menu.label",dropdownButtonName:null!==(e=this.currentLanguage)&&void 0!==e?e:void 0,dropdownButtonTooltipLabelKey:this.currentLanguage?"language_selector.toggle_menu.tooltip":"language_selector.toggle_menu.label",dropdownAlignment:null!==(t=this.dropdownAlignment)&&void 0!==t?t:DropdownItemAlignment.RIGHT,dropdownTooltipTrigger:"mouseenter focus",iconClass:"icon-translation",items:this.items,"auto-close":!0}))}valueChangeHandler(){return e=>this.onSelectedLanguageChanged(e)}changeLanguage(e){let t=e;t||(t=this.languageService.getDefaultLanguage()),this.currentLanguage=t,this.items=this.getLanguageDropdownOptions()}onSelectedLanguageChanged(e){this.languageContextService.updateSelectedLanguage(e.detail)}getLanguageDropdownOptions(){return this.languageService.getSupportedLanguages().map(e=>{const t=this.currentLanguage===e?"icon-tick":"";return(new DropdownItem).setNameLabelKey(`language_selector.language.${e}.label`).setTooltipLabelKey(`language_selector.language.${e}.tooltip.`+(this.currentLanguage===e?"selected":"not_selected")).setIconClass(t).setCssClass(e).setValue(e).setDropdownTooltipTrigger("mouseenter focus")})}};OntoLanguageSelector.style=ontoLanguageSelectorCss;const ontoLicenseAlertCss=":host{display:block}.onto-license-alert{animation:fade-button 2s infinite;--fade-color:var(--gw-error-light);border:1px solid transparent !important}.onto-license-alert:hover{text-decoration:none;background-color:var(--gw-error-light) !important;border-color:var(--gw-error-light) !important}.onto-license-alert:hover span{transform:scale(1.2)}.onto-license-alert span{transition:transform 0.15s ease-out}.onto-license-alert .icon-warning{margin-right:0.2em;line-height:0.75;font-size:1.4em;display:inline-block;vertical-align:middle}",OntoLicenseAlert=class{constructor(e){registerInstance(this,e)}render(){var e;return h(Host,{key:"0067db786bd82713daab8282753d3f93aec0ec38","tooltip-content":null===(e=this.license)||void 0===e?void 0:e.message,"tooltip-placement":OntoTooltipPlacement.BOTTOM,"data-test":"onto-license-alert"},h("button",{key:"b85276c21bc7686e7d9b00ba5123aa73b5013a19",class:"onto-license-alert onto-btn",onClick:navigateTo("license")},h("span",{key:"7e3d93a7afe21e6b2a4b7706205c5aac60f3fde2",class:"icon-warning"}),h("translate-label",{key:"42f0bfeefdf7d758f5d2ad3f473f1b24f777f1dc",labelKey:"license_alert.label"})))}};OntoLicenseAlert.style=ontoLicenseAlertCss;const ontoOperationsNotificationCss=".operations-statuses{position:relative}.operations-statuses .operations-statuses-dropdown-toggle{display:flex;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border:1px solid transparent;padding:0.4rem 1rem;font-size:1rem;gap:0.75em;transition:all 0.15s ease-out}.operations-statuses .operations-statuses-dropdown-toggle:hover{background-color:#d4d4d4;border-color:#d4d4d4}.operations-statuses .operations-statuses-dropdown-toggle:hover i:not(.ri-arrow-down-s-line){transform:scale(1.2)}.operations-statuses .operations-statuses-dropdown-toggle:focus{outline:none}.operations-statuses .operations-statuses-dropdown-toggle.open{background-color:#bbb !important;border-color:#bbb !important}.operations-statuses .operations-statuses-dropdown-toggle .operation-status-header{display:flex}.operations-statuses .operations-statuses-dropdown-toggle .operation-status-header .running-operation-count{color:white;padding:1px 2px;line-height:1;align-self:center;top:-1em;font-size:60%}.operations-statuses .operations-dropdown{position:absolute;right:0;z-index:1000;border:none;background-color:var(--gw-primary-base, #9e2b0a);border-radius:0;list-style:none;padding:0;-moz-transition:all 150ms ease-out;-o-transition:all 150ms ease-out;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.operations-statuses .operations-dropdown .operations-statuses-content{display:flex;flex-direction:column;background-color:#bbb;margin:0}.operations-statuses .operations-dropdown .operations-statuses-content li:first-child{margin-top:5px}.operations-statuses .operations-dropdown .operations-statuses-content li:last-child{margin-bottom:5px}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content{display:flex;flex-direction:row;margin:5px 10px;align-items:center;justify-content:start;cursor:pointer;text-decoration:none;width:auto;gap:0.5em;background-color:var(--gw-button-secondary-background);border-color:var(--gw-button-secondary-border-color)}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content i{width:8.33%}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-number{min-width:50px;display:block}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-number .operation-status-running-operation-count{display:block;width:100%;color:white;border-radius:2px;padding:3px 2px 2px;text-align:center;font-size:75%;background-color:var(--gw-info-dark, #004177) !important}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-status-content>*{padding:0}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content .operation-status-label{width:66.66%;padding-left:5px;line-height:0;text-align:start}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content:hover{text-decoration:none;background-color:var(--gw-button-secondary-hover-background);border-color:var(--gw-button-secondary-hover-border-color)}.operations-statuses .operations-dropdown .operations-statuses-content .operation-status-content:hover i{transform:scale(1.2)}.operations-statuses .status-information{color:var(--gw-message-info-color, #004177) !important}.operations-statuses .status-warning{color:var(--gw-message-warning-color, #7e2308) !important}.operations-statuses .status-critical{color:var(--gw-message-error-color, #a31425) !important}.operations-statuses i{padding-left:3px;padding-right:3px;font-size:1.1em;line-height:1.6rem !important;align-content:center;transition:transform 0.15s ease-out}.operations-statuses i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);transition:all 0.2s ease-in}.operations-statuses .icon-import{font-size:21px}",operationGroupToIcon={[OperationGroup.BACKUP]:"ri-archive-line",[OperationGroup.QUERY]:"ri-arrow-left-right-line",[OperationGroup.CLUSTER]:"ri-organization-chart",[OperationGroup.IMPORT]:"icon-import"},operationStatusToWarningClass={[OperationStatus.WARNING]:"status-warning",[OperationStatus.INFORMATION]:"status-information",[OperationStatus.CRITICAL]:"status-critical"},operationStatusToFadeClass={[OperationStatus.WARNING]:"onto-btn-fade-warning",[OperationStatus.CRITICAL]:"onto-btn-fade-danger"},OntoOperationsNotification=class{constructor(e){registerInstance(this,e),this.isOpen=!1,this.toggleDropdown=e=>{e.stopPropagation(),this.isOpen=!this.isOpen}}handleOutsideClick(){this.isOpen&&(this.isOpen=!1)}render(){var e;return this.operationGroups=MapperProvider.get(OperationGroupSummaryListMapper).mapToModel(this.activeOperations.toOperationsGroupSummary()),h("section",{key:"095aef34c3a9ba5b5bf39e581946b36f5610df9d",class:"operations-statuses"},h("button",{key:"e7cb1898eb6bfd222ae51c895e8c72078940da6e",class:`operations-statuses-dropdown-toggle ${this.isOpen?"open":"closed"} ${null!==(e=operationStatusToFadeClass[this.activeOperations.status])&&void 0!==e?e:""}`,onClick:this.toggleDropdown},this.operationGroups.getItems().map(e=>h("section",{key:e.id,class:"operation-status-header"},h("i",{class:`${operationGroupToIcon[e.group]} ${operationStatusToWarningClass[e.status]}`}),e.totalOperations?h("sup",{class:"running-operation-count tag-info"},e.totalOperations):"")),h("i",{key:"247f4f98e3d91d851e978d73413c5d00101f2d0b",class:"ri-arrow-down-s-line "+(this.isOpen?"rotate-180":"")})),this.isOpen&&h("ul",{key:"8121c8133a185d2271526d4cca11ee318bc06b99",class:"operations-dropdown"},h("section",{key:"3d53bcbbef30e807e4b139db673d32868facd82b",class:"operations-statuses-content"},this.activeOperations.allRunningOperations.getItems().map(e=>h("li",{key:e.id},h("a",{class:`operation-status-content onto-btn no-underline ${operationStatusToWarningClass[e.status]}`,target:"_blank",onClick:navigateTo(e.href)},h("i",{class:operationGroupToIcon[e.group]}),h("span",{class:"operation-status-label"},h("translate-label",{labelKey:`operations_notification.links.${e.labelKey}`})),h("span",{class:"operation-number"},e.count?h("span",{class:"operation-status-running-operation-count"},e.count):"")))))))}get el(){return getElement(this)}};OntoOperationsNotification.style=ontoOperationsNotificationCss;const ontoRdfSearchCss=".onto-rdf-search{display:flex;align-items:center;font-size:1.4em;height:auto}.onto-rdf-search .search-area{white-space:nowrap;text-align:start;font-weight:300;max-width:100vw;position:fixed;right:3em;z-index:1;display:block;width:60vw;-webkit-transition:top 0.3s ease-in, opacity 0.5s ease;transition:top 0.3s ease-in, opacity 0.5s ease;box-shadow:0 3px 6px rgba(0, 0, 0, 0.1);border-radius:0;margin-bottom:1em;padding:1.6rem;border:1px solid rgba(0, 0, 0, 0.125);color:var(--gw-dialog-color);background-color:var(--gw-dialog-background)}.onto-rdf-search .search-area.visible{top:40px;opacity:1}.onto-rdf-search .search-area.invisible{top:-550px;opacity:0}.onto-rdf-search .search-area .close-btn{display:block;position:absolute;top:0;right:0;font-size:1.5rem}.onto-rdf-search i{cursor:pointer;color:var(--gw-primary-base);transition:all 0.15s ease-out}.onto-rdf-search i.ri-search-line,.onto-rdf-search i.close-btn{padding:0.5rem 0.8rem}.onto-rdf-search i:hover{transform:scale(1.2)}",OntoRdfSearch=class{constructor(e){registerInstance(this,e),this.subscriptions=new SubscriptionList,this.eventService=ServiceProvider.get(EventService),this.resourceSearchStorageService=ServiceProvider.get(ResourceSearchStorageService),this.RDF_CONTEXT="rdfSearchContext",this.isOpen=!1,this.redirectUrl=UriUtil.RESOURCE_URL}handleClick(e){var t;this.isOpen&&((null===(t=this.rdfSearchRef)||void 0===t?void 0:t.contains(e.target))||(this.isOpen=!1))}connectedCallback(){this.onSuggestionSelected()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}componentDidRender(){this.focusSearchInput()}componentDidLoad(){this.buttonConfig=this.createButtonConfig()}render(){return h("section",{key:"fb63b11874e6049ea060d7f8bf2b9ce00a2bc78c",ref:e=>this.rdfSearchRef=e,class:"onto-rdf-search",onKeyDown:this.onKeyDown(),"data-test":"onto-rdf-search-component"},h("section",{key:"1c7f6a7e9951011e1c62e2f24c912c8c2813c404",class:"search-area "+(this.isOpen?"visible":"invisible")},h("i",{key:"e6f8e37067378b674c1ff4ad8ac105cd472972a5",onClick:this.setIsOpen(!1),"tooltip-content":TranslationService.translate("rdf_search.tooltips.close_search_area"),"tooltip-placement":OntoTooltipPlacement.BOTTOM,"data-test":"onto-rdf-resource-search-close-btn",class:"ri-close-line close-btn"}),h("onto-search-resource-input",{key:"a2b41801185618be5658c27bce1e4a05a3820dc7",buttonConfig:this.buttonConfig,preserveSearch:!0,isHidden:!this.isOpen,"data-test":"onto-rdf-resource-search-input",context:this.RDF_CONTEXT})),this.isOpen?"":h("onto-search-icon",{onClick:this.setIsOpen(!0)}))}setIsOpen(e){return()=>{this.isOpen=e,this.isOpen&&this.loadSelectedViewFromStorage()}}createButtonConfig(){return new SearchButtonConfig({isRadio:!0,buttons:[this.createSearchButton(ResourceSearchConstants.TABLE_VIEW,"rdf_search.buttons.table",()=>{this.redirectUrl=UriUtil.RESOURCE_URL,this.resourceSearchStorageService.setSelectedView(ResourceSearchConstants.TABLE_VIEW)},!0),this.createSearchButton(ResourceSearchConstants.VISUAL_VIEW,"rdf_search.buttons.visual",()=>{this.redirectUrl=UriUtil.GRAPHS_VISUALIZATIONS_URL,this.resourceSearchStorageService.setSelectedView(ResourceSearchConstants.VISUAL_VIEW)},!1)]})}createSearchButton(e,t,o,r){return new SearchButton({label:TranslationService.translate(t),id:e,callback:o,selected:r})}onSuggestionSelected(){this.subscriptions.add(this.eventService.subscribe(ResourceSearchConstants.SUGGESTION_SELECTED_EVENT,e=>{if(e.getContext()===this.RDF_CONTEXT){const t=e.getSuggestion().getOverrideToVisual()?UriUtil.GRAPHS_VISUALIZATIONS_URL:this.redirectUrl;openInNewTab(UriUtil.createAutocompleteRedirect(t,e.getSuggestion().getValue()))}}))}onKeyDown(){return e=>{"Escape"===e.key&&(this.isOpen=!1)}}focusSearchInput(){this.isOpen&&HtmlUtil.focusElement(`#${this.RDF_CONTEXT}`)}loadSelectedViewFromStorage(){const e=this.resourceSearchStorageService.getSelectedView();if(e){const t=this.buttonConfig.getButtons().find(t=>t.id===e);t&&(this.buttonConfig=this.buttonConfig.selectButton(t))}}};OntoRdfSearch.style=ontoRdfSearchCss;const RepositorySelection=({repository:e,defaultToggleButtonName:t,location:o})=>{var r;return h("div",{class:e?"repository-selection active-repository":"repository-selection no-selected-repository","data-test":"repository-selection"},e&&h("i",{class:"button-icon icon-repo-"+e.type})," ",null!==(r=null==e?void 0:e.id)&&void 0!==r?r:t,o)},ontoRepositorySelectorCss=":host{display:block}.onto-repository-selector .onto-dropdown.closed .onto-dropdown-button{background-color:var(--gw-button-secondary-background);color:var(--gw-button-secondary-background)}.onto-repository-selector .onto-dropdown.closed .onto-dropdown-button:hover{background-color:var(--gw-button-secondary-hover-background);color:var(--gw-button-secondary-hover-color)}.onto-repository-selector .repository-selector-dropdown-item{display:flex;align-items:center;gap:0.4em}.onto-repository-selector .repository-selector-dropdown-item .item-icon{font-size:1.4em}.onto-repository-selector .repository-selector-dropdown-item .item-label{line-height:0.75em;display:inline-block;vertical-align:middle;text-align:left}.onto-repository-selector .repository-selector-dropdown-item .item-label .repository-id{line-height:0.75em}.onto-repository-selector .repository-selector-dropdown-item .item-label .repository-location{font-weight:300;font-size:0.75em;margin-top:0.4em;display:inline-block;max-width:120px;text-overflow:ellipsis;overflow:hidden}.tippy-box[data-theme=light-border]{border-radius:0}.tippy-box[data-theme=light-border].tippy-box[data-placement*=left]>.tippy-arrow:before{border-left-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=left]>.tippy-arrow:after{border-left-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=top]>.tippy-arrow:before{border-top-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=top]>.tippy-arrow:after{border-top-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=right]>.tippy-arrow:before{border-right-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=right]>.tippy-arrow:after{border-right-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=bottom]>.tippy-arrow:before{border-bottom-color:var(--gw-dialog-background)}.tippy-box[data-theme=light-border].tippy-box[data-placement*=bottom]>.tippy-arrow:after{border-bottom-color:var(--gw-dialog-border-color)}.tippy-box[data-theme=light-border] .tippy-content{padding:0;color:var(--gw-dialog-color);border:1px solid var(--gw-dialog-border-color);box-shadow:var(--gw-dialog-shadow-1-offset-x) var(--gw-dialog-shadow-1-offset-y) var(--gw-dialog-shadow-1-blur) var(--gw-dialog-shadow-1-spread) var(--gw-dialog-shadow-1-color)}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-title{font-size:1rem;font-weight:400;padding:8px 14px;background-color:var(--gw-dialog-background);border-bottom:var(--gw-dialog-border-color) 1px solid}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-title .value{word-wrap:break-word}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-content{background-color:var(--gw-dialog-background);padding:1.5rem 0.5rem;display:flex;flex-direction:column;gap:0.8em;font-weight:400;font-size:0.875rem}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row{display:flex;flex-direction:row;justify-content:space-between}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row.total{margin-top:1.2em}.tippy-box[data-theme=light-border] .tippy-content .repository-tooltip-row .value{margin-left:0.6em}",OntoRepositorySelector=class{constructor(e){registerInstance(this,e),this.repositoryContextService=ServiceProvider.get(RepositoryContextService),this.subscriptions=[]}onItemsChanged(e){(null==e?void 0:e.length)?this.dropdownItems=this.attachTooltipsToItems(this.items):this.dropdownItems=[]}connectedCallback(){var e;this.subscriptions.push(...this.subscribeToTranslationChanged()),(null===(e=this.items)||void 0===e?void 0:e.length)?this.dropdownItems=this.attachTooltipsToItems(this.items):this.dropdownItems=[]}disconnectedCallback(){this.subscriptions.forEach(e=>e())}render(){const e=h(RepositorySelection,{key:"bf5de32d81929056bbdf4c16a228cbe3dd7d2cdf",repository:this.currentRepository,defaultToggleButtonName:this.getButtonLabel(),location:this.getLocation()});return h(Host,{key:"ad2c4f2fee7b98d840bf0881ec571d7279dcdea5"},h("onto-dropdown",Object.assign({key:"442ac676b56db755c45caf45fd0216ed050334ba",class:"onto-repository-selector","data-test":"onto-repository-selector",onValueChanged:this.onValueChanged(),dropdownButtonName:e,dropdownButtonTooltip:this.createTooltipFunctionForRepository(this.currentRepository)},this.currentRepository?{dropdownButtonGuideSelector:`repository-id-${this.currentRepository.id}`}:{},{dropdownTooltipTrigger:"mouseenter focus",dropdownAlignment:DropdownItemAlignment.RIGHT,tooltipPlacement:this.tooltipAlignment,tooltipTheme:"light-border",items:this.dropdownItems,"auto-close":!0})))}attachTooltipsToItems(e){return e?e.map(e=>e.setTooltip(this.createTooltipFunctionForRepository(e.value))):[]}tooltipAlignment(e){return e?OntoTooltipPlacement.LEFT:OntoTooltipPlacement.BOTTOM}onValueChanged(){return e=>this.onRepositoryChanged(e.detail)}createTooltipFunctionForRepository(e){return async()=>{if(!e)return"";const t=await this.repositorySizeInfoFetcher(e);return this.buildRepositoryTooltipHtml(e,t)}}buildRepositoryTooltipHtml(e,t){let o=`\n <div class="repository-tooltip-title">\n <span class="label">${TranslationService.translate("repository-selector.tooltip.repository")}</span>\n <span class="value">${e.id}</span>\n </div>\n <div class="repository-tooltip-content">\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.location")}:</div>\n <div class="value">${e.location?e.location:TranslationService.translate("repository-selector.tooltip.local")}</div>\n </div>\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.type")}:</div>\n <div class="value">${TranslationService.translate("repository-selector.tooltip.types."+(e.type||"unknown"))}</div>\n </div>\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.access")}:</div>\n <div class="value">${TranslationService.translate(this.canWriteRepo(e)?"repository-selector.tooltip.accesses.read_write":"repository-selector.tooltip.accesses.read")}</div>\n </div>`;return o+=this.buildRepositorySizeInfoHtml(t),o+="</div>",o}buildRepositorySizeInfoHtml(e){if(!e||e.total<0)return"";let t=`\n <div class="repository-tooltip-row total">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.total")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.total)}</div>\n </div>`;if(e.explicit>=0&&(t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.explicit")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.explicit)}</div>\n </div>`),e.inferred>=0&&(t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.inferred")}:</div>\n <div class="value">${this.totalTripletsFormatter.format(e.inferred)}</div>\n </div>`),e.total>=0){let o="-";e.explicit>0&&(o=this.totalTripletsFormatter.format(e.total/e.explicit)),t+=`\n <div class="repository-tooltip-row">\n <div class="label">${TranslationService.translate("repository-selector.tooltip.repository-size.expansion_ratio")}:</div>\n <div class="value">${o}</div>\n </div>`}return t}subscribeToTranslationChanged(){return[TranslationService.onTranslate("repository-selector.btn.toggle",[],e=>{this.defaultToggleButtonName=e}),TranslationService.onTranslate("repository-selector.btn.no_repositories",[],e=>{this.noRepositoriesButtonMessage=e})]}onRepositoryChanged(e){this.repositoryContextService.updateSelectedRepository(e)}getLocation(){var e;return(null===(e=this.currentRepository)||void 0===e?void 0:e.location)?`@${UriUtil.shortenIri(this.currentRepository.location)}`:""}getButtonLabel(){var e;return(null===(e=this.items)||void 0===e?void 0:e.length)?this.defaultToggleButtonName:this.noRepositoriesButtonMessage}static get watchers(){return{items:["onItemsChanged"]}}};OntoRepositorySelector.style=ontoRepositorySelectorCss;const ontoSearchIconCss=".onto-search-icon{cursor:pointer;color:var(--gw-primary-base, #9e2b0a);transition:all 0.15s ease-out;font-size:1.6rem}.onto-search-icon.ri-search-line{padding:0.5rem 0.8rem}.onto-search-icon:hover{transform:scale(1.2)}",OntoSearchIcon=class{constructor(e){registerInstance(this,e),this.tooltipKey="rdf_search.labels.search",this.subscriptions=new SubscriptionList}connectedCallback(){this.onTooltipChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return h("i",{key:"33ac85ef454f5a8de8e24217d92950219df84f7a","tooltip-content":this.tooltipLabel,"tooltip-placement":OntoTooltipPlacement.BOTTOM,class:"onto-search-icon ri-search-line"})}onTooltipChange(){this.subscriptions.add(TranslationService.onTranslate(this.tooltipKey,[],e=>this.tooltipLabel=e))}};OntoSearchIcon.style=ontoSearchIconCss;const ontoSearchResourceInputCss=".search-resources-input{padding-right:20px}.search-resources-input .input-row{gap:3px;display:flex;flex-wrap:wrap}.search-resources-input .input-row .input-wrapper{position:relative;display:flex;flex:1;min-width:20vw}.search-resources-input .input-row .input-wrapper input{min-width:inherit;flex:1;padding:0.5rem 0.75rem;font-size:1rem;line-height:1.25;color:var(--gw-form-field-color);background-color:var(--gw-form-field-background);background-image:none;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid var(--gw-form-field-border-color)}.search-resources-input .input-row .input-wrapper input:focus{outline:0;color:var(--gw-form-field-color);border-color:var(--gw-form-field-focus-border-color)}.search-resources-input .input-row i.ri-close-line{position:absolute;right:10px;top:7px;z-index:10;font-size:1.6rem}.search-resources-input .input-row button{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;transition:all 0.15s ease-out;user-select:none;border:1px solid transparent;padding:0.5rem 1rem;font-size:1rem;color:var(--gw-button-secondary-color);background-color:var(--gw-button-secondary-background)}.search-resources-input .input-row button.selected{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color)}.search-resources-input .input-row button:focus{outline:none}.search-resources-input .input-row button:hover:not(.selected){background-color:var(--gw-button-secondary-hover-background);border-color:var(--gw-button-secondary-hover-color)}.search-resources-input .hint{font-size:0.8rem;color:#818a91}.search-resources-input .autocomplete-results-wrapper{margin-top:6px;max-height:204px;overflow:auto}.search-resources-input .autocomplete-results-wrapper p{font-size:1.1rem;line-height:1.5;color:var(--gw-autocomplete-option-color);background-color:var(--gw-autocomplete-background);margin-bottom:0;padding:5px 25px;cursor:pointer}.search-resources-input .autocomplete-results-wrapper p b{color:var(--gw-secondary-base, #003663)}.search-resources-input .autocomplete-results-wrapper p.selected{background-color:var(--autocomplete-background-selected, #02A99A)}.search-resources-input .autocomplete-results-wrapper p.hovered:not(.selected),.search-resources-input .autocomplete-results-wrapper p:hover:not(.selected){background-color:var(--autocomplete-background, rgba(2, 169, 143, 0.3019607843))}",OntoSearchResourceInput=class{constructor(e){registerInstance(this,e),this.autocompleteService=ServiceProvider.get(AutocompleteService),this.autocompleteContextService=ServiceProvider.get(AutocompleteContextService),this.autocompleteStorageService=ServiceProvider.get(AutocompleteStorageService),this.resourceSearchStorageService=ServiceProvider.get(ResourceSearchStorageService),this.toastrService=ServiceProvider.get(OntoToastrService),this.eventService=ServiceProvider.get(EventService),this.namespaceContextService=ServiceProvider.get(NamespacesContextService),this.subscriptions=new SubscriptionList,this.autocompleteWarningShown=!1,this.skipValidation=!1,this.isHidden=!1,this.isAutocompleteEnabled=!1,this.handleInput=e=>{const t=e.target;t.value?(this.setInputValue(t.value),this.checkForAutocomplete()):this.clearInput()},this.clearInput=()=>{this.setInputValue(""),this.preserveSearch&&this.resourceSearchStorageService.clearStoredSearch()},this.onKeyDown=e=>{switch(e.key){case"Enter":this.onEnter(e);break;case"Escape":this.onEscape();break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowDown":this.onArrowDown(e)}}}onVisibilityChange(e){var t;e?null===(t=this.searchResult)||void 0===t||t.clearSuggestions():this.setInputValue(this.resourceSearchStorageService.getInputValue())}connectedCallback(){this.onAutocompleteEnabledChange(),this.onNamespaceChange(),this.loadInputFromStorage()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){var e,t,o;return h("section",{key:"c038af36fa4270f35dab06147536206eab600ce5",class:"search-resources-input"},h("div",{key:"d9b3044c17de9765bd3cbc724ab76bb13e823136",class:"input-row"},h("span",{key:"297d9e5f94d414f227349b79f26f277e3c246c39",class:"input-wrapper"},h("input",{key:"65db17686344b92e8fb59cba15e48538da26c07e",value:this.inputValue,id:this.context,type:"text",autocomplete:"off",placeholder:`${TranslationService.translate("rdf_search.labels.search")}...`,ref:e=>this.inputRef=e,onKeyDown:this.onKeyDown,"data-test":this.context,onInput:this.handleInput}),(null===(e=this.inputValue)||void 0===e?void 0:e.length)?h("i",{onClick:this.clearInput,"tooltip-content":TranslationService.translate("rdf_search.tooltips.clear"),"tooltip-placement":OntoTooltipPlacement.BOTTOM,class:"ri-close-line clear-input"}):""),null===(t=this.buttonConfig)||void 0===t?void 0:t.getButtons().getItems().map(e=>h("button",{key:e.label,onClick:this.handleButtonClick(e),class:e.selected?"selected":""},e.label))),h("span",{key:"cfb1aa194945352f33b786eb7bf2bae98c6e9ea2",class:"hint"},TranslationService.translate("rdf_search.labels.hint")),h("section",{key:"e17c4e528f8c05ed983df81e2c364356170dac12",class:"autocomplete-results-wrapper","data-test":"onto-autocomplete-results"},null===(o=this.searchResult)||void 0===o?void 0:o.getSuggestions().getItems().map(e=>h("p",{key:e.getId(),onClick:this.onSuggestionClick(e),"data-test":"onto-autocomplete-suggestion",onMouseMove:this.hoverSuggestion(e),class:`${e.isHovered()?"hovered":""} ${e.isSelected()?"selected":""}`,innerHTML:e.getDescription()}))))}handleButtonClick(e){return()=>this.buttonConfig=this.buttonConfig.selectButton(e)}loadAutocompleteResults(){var e;this.inputValue?this.isAutocompleteEnabled&&this.autocompleteService.search(this.inputValue).then(e=>{this.onResultsReceived(e)}):null===(e=this.searchResult)||void 0===e||e.clearSuggestions()}hoverSuggestion(e){return()=>this.searchResult=this.searchResult.hoverSuggestion(e)}onAutocompleteEnabledChange(){this.isAutocompleteEnabled=this.autocompleteStorageService.isEnabled(),this.subscriptions.add(this.autocompleteContextService.onAutocompleteEnabledChanged(e=>{this.isAutocompleteEnabled=null!=e?e:this.isAutocompleteEnabled}))}checkForAutocomplete(){if(this.inputValue.length>0&&!this.isAutocompleteEnabled&&!this.autocompleteWarningShown){this.autocompleteWarningShown=!0;const e=TranslationService.translate("rdf_search.toasts.autocomplete_is_off");this.toastrService.warning(`<a class="no-underline" style="font-weight: 500">${e}</a>`,{onClick:navigateTo("autocomplete"),removeOnClick:!0})}}onSuggestionClick(e){return t=>{e.setOverrideToVisual(t.ctrlKey||t.metaKey),this.searchRdfResource(e)}}searchRdfResource(e){e.getType()===SuggestionType.PREFIX?this.expandPrefix(e):(this.notifyRdfResourceSelected(e),this.preserveSearch&&this.resourceSearchStorageService.setLastSelected(e))}notifyRdfResourceSelected(e){var t;this.searchResult=null===(t=this.searchResult)||void 0===t?void 0:t.selectSuggestion(e),this.eventService.emit({NAME:ResourceSearchConstants.SUGGESTION_SELECTED_EVENT,payload:new SuggestionSelectedPayload(e,this.context)})}expandPrefix(e){this.setInputValue(this.namespaces.getByPrefix(e.getValue())),this.inputRef.focus()}setInputValue(e){this.inputValue=e,this.preserveSearch&&this.resourceSearchStorageService.setInputValue(this.inputValue),this.loadAutocompleteResults()}onNamespaceChange(){this.subscriptions.add(this.namespaceContextService.onNamespacesChanged(e=>{this.namespaces=e}))}onEnter(e){var t;let o=null===(t=this.searchResult)||void 0===t?void 0:t.getHoveredSuggestion();o||(o=new Suggestion({value:UriUtil.removeAngleBrackets(this.inputValue),type:SuggestionType.URI})),o.setOverrideToVisual(e.ctrlKey||e.metaKey),this.validateAndSearch(o)}onArrowUp(e){this.searchResult=this.searchResult.hoverPreviousSuggestion(),this.displaySuggestion(e)}onArrowDown(e){this.searchResult=this.searchResult.hoverNextSuggestion(),this.displaySuggestion(e)}displaySuggestion(e){e.preventDefault(),this.inputRef.value=this.searchResult.getHoveredSuggestion().getValue(),this.scrollToSuggestionBySelector("p.hovered")}getSuggestionValue(e){return e.getType()===SuggestionType.PREFIX?this.namespaces.getByPrefix(e.getValue()):e.getValue()}scrollToSuggestionBySelector(e,t){HtmlUtil.waitForElement(e).then(()=>{HtmlUtil.scrollElementIntoView(e,t)})}validateAndSearch(e){if(!this.skipValidation){if(!e.getValue())return void this.toastrService.error(TranslationService.translate("rdf_search.toasts.empty_input"));if(!UriUtil.isValidUri(this.getSuggestionValue(e)))return void this.toastrService.error(TranslationService.translate("rdf_search.toasts.invalid_uri"))}this.searchRdfResource(e)}onEscape(){this.preserveSearch||this.clearInput()}loadInputFromStorage(){this.preserveSearch&&(this.inputValue=this.resourceSearchStorageService.getInputValue()||"")}onResultsReceived(e){const t=null==e?void 0:e.getByValue(this.resourceSearchStorageService.getLastSelectedValue());t&&this.preserveSearch?(e.hoverSuggestion(t),this.searchResult=e.selectSuggestion(t),this.scrollToSuggestionBySelector("p.hovered.selected",{block:"start"})):(this.searchResult=e.hoverFirstSuggestion(),this.scrollToSuggestionBySelector("p.hovered",{block:"start"}))}static get watchers(){return{isHidden:["onVisibilityChange"]}}};OntoSearchResourceInput.style=ontoSearchResourceInputCss;const ontoUserLoginCss=":root{--onto-user-login-color:var(--gw-secondary-base, var(--base-text-color))}.onto-user-login{position:relative;width:fit-content}.onto-user-login button{display:flex;color:var(--onto-user-login-color);flex-direction:row;line-height:1.5;font-weight:400;font-size:1rem;text-align:center;user-select:none;border:1px solid transparent;padding:0.4em 1rem;cursor:pointer;white-space:nowrap;place-items:center;transition:all 0.15s ease-out}.onto-user-login button .user-login-label{padding:0 0.4rem}.onto-user-login button:hover{background-color:#d4d4d4;border-color:#d4d4d4}.onto-user-login button:hover .ri-user-fill{transform:scale(1.2)}.onto-user-login button:focus{outline:none}.onto-user-login button i{color:var(--user-menu-primary-color);line-height:0.75;font-size:1.2em;transition:0.15s ease-out}.onto-user-login button i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);font-size:1.1em;transition:all 0.2s ease-in}",OntoUserLogin=class{constructor(e){registerInstance(this,e)}render(){return h("section",{key:"010f4db017da2ab91bc79de27658d255de92d5f4",class:"onto-user-login"},h("button",{key:"f3e4019d86f6950a57186bb73dbfd60d1bc03362",onClick:navigateTo("login")},h("i",{key:"42a5ef90e9b768c8d283cdd8c3e6fb2160c33f16",class:"icon-arrow-right"}),h("translate-label",{key:"9f61abfd1f3be13bca10d1d6db4d774accbb2f85",class:"user-login-label",labelKey:"user_menu.login"})))}};OntoUserLogin.style=ontoUserLoginCss;const ontoUserMenuCss=".onto-user-menu{position:relative;width:fit-content}.onto-user-menu button{display:flex;flex-direction:row;line-height:1.5;font-weight:400;font-size:1rem;text-align:center;user-select:none;border:1px solid transparent;padding:0.4em 1rem;cursor:pointer;white-space:nowrap;place-items:center;transition:all 0.15s ease-out;background-color:var(--gw-button-secondary-background);color:var(--gw-button-secondary-color)}.onto-user-menu button:hover{background-color:var(--gw-button-secondary-hover-background);color:var(--gw-button-secondary-hover-color)}.onto-user-menu button:hover .ri-user-line{transform:scale(1.2)}.onto-user-menu button:focus{outline:none}.onto-user-menu button.open{color:white;background-color:var(--gw-primary-base);border-color:var(--gw-primary-base)}.onto-user-menu button.open .ri-user-line{color:var(--icon-on-primary-color, rgba(255, 255, 255, 0.8))}.onto-user-menu button.open:hover .ri-user-line{transform:scale(1.2)}.onto-user-menu button .username{padding:0 5px}.onto-user-menu button i{color:var(--gw-primary-base);transition:0.15s ease-out}.onto-user-menu button i.ri-arrow-down-s-line{color:rgba(0, 0, 0, 0.35);font-size:1.1em;transition:all 0.2s ease-in}.onto-user-menu .onto-user-menu-dropdown{position:absolute;z-index:1000;display:flex;flex-direction:column;cursor:pointer;text-decoration:none;right:0;min-width:7rem;font-size:1rem;width:100%;color:var(--gw-primary-contrast-color);background-color:var(--gw-primary-base)}.onto-user-menu .onto-user-menu-dropdown translate-label{padding:0.4rem 1rem;user-select:none;white-space:nowrap;font-weight:400}.onto-user-menu .onto-user-menu-dropdown translate-label:hover,.onto-user-menu .onto-user-menu-dropdown translate-label:focus{background-color:rgba(0, 0, 0, 0.1)}",OntoUserMenu=class{constructor(e){registerInstance(this,e),this.logout=()=>{ServiceProvider.get(AuthenticationService).logout()},this.toggleDropdown=()=>{this.isOpen=!this.isOpen},this.handleOutsideClick=e=>{this.isOpen&&!this.hostElement.contains(e.target)&&(this.isOpen=!1)}}connectedCallback(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}render(){var e;return h("section",{key:"294141ded29aca49a790c51e791262d4626b80ab",class:"onto-user-menu"},h("div",{key:"1e7c1a6ea8e9766840b5c72c7ceecdfaf838c865",class:"dropdown-toggle-wrapper",onClick:this.toggleDropdown},h("button",{key:"413bb997a92cb55ef56ee7ae45463e10c176540c",class:this.isOpen?"open":""},h("i",{key:"2c5806a5a49429b709753a9a009146b578b191ed",class:"ri-user-line ri-lg"}),h("span",{key:"1a59a9218b7a680c47d77c6e016659721d17aea4",class:"username"},this.user.username),h("i",{key:"dea9929dc6bd6280336fe3a7cc1d062d4c9f54c3",class:"ri-arrow-down-s-line "+(this.isOpen?"rotate-180":"")})),this.isOpen?h("section",{class:"onto-user-menu-dropdown"},h("translate-label",{onClick:navigateTo("settings"),labelKey:"user_menu.my_settings"}),(null===(e=this.securityConfig)||void 0===e?void 0:e.hasExternalAuthUser)?"":h("translate-label",{onClick:this.logout,labelKey:"user_menu.logout"})):""))}get hostElement(){return getElement(this)}};OntoUserMenu.style=ontoUserMenuCss;export{OntoLanguageSelector as onto_language_selector,OntoLicenseAlert as onto_license_alert,OntoOperationsNotification as onto_operations_notification,OntoRdfSearch as onto_rdf_search,OntoRepositorySelector as onto_repository_selector,OntoSearchIcon as onto_search_icon,OntoSearchResourceInput as onto_search_resource_input,OntoUserLogin as onto_user_login,OntoUserMenu as onto_user_menu};
|
package/dist/shared-components/shared-components/{p-79cc3329.entry.js → p-46732fef.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,a as o,c as i,F as n,g as s}from"./p-I_gcXFWK.js";import{SubscriptionList as r,ServiceProvider as a,SecurityContextService as l,LicenseContextService as h,CookieService as c,ProductInfoContextService as p,LicenseService as d,WindowService as m,CookieConsent as b,MonitoringService as u,RepositoryContextService as g,RepositoryLocationContextService as v,RepositoryService as f,OntoToastrService as y,NamespacesService as w,NamespacesContextService as x,LanguageService as k,FibonacciGenerator as C,AuthenticationService as I,EventService as M,isHomePage as z,getCurrentRoute as T,EventName as S,LanguageContextService as L,RepositoryList as A,ObjectUtil as D,getPathName as N,UriUtil as R,openInNewTab as j,navigate as O,navigateTo as _,ToastMessageList as P,ToastrConfig as F,ToastType as E}from"@ontotext/workbench-api";import{T as H,L as G,s as K}from"./p-nljGIprK.js";import{H as W}from"./p-C8DO915D.js";import{R as $,D as J}from"./p-CapzAxJp.js";import{T as Y}from"./p-DzOPDgzQ.js";import"./p-D_J2-9CG.js";const Z=class{constructor(e){t(this,e),this.subscriptions=new r,this.currentYear=(new Date).getFullYear(),this.securityContextService=a.get(l),this.licenseContextService=a.get(h),this.cookieService=a.get(c)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var t,i,s,n;return e(o,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},e("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},e("a",{key:"e81e156b6b691a0a05275ee399ccf26438ba5729",href:"http://graphdb.ontotext.com",target:"_blank",rel:"noopener noreferrer"},"GraphDB")," ",null===(t=this.productInfo)||void 0===t?void 0:t.productVersion," • ",e("a",{key:"018b1772807248dfd83e0c2ca57fde6bd848e9c9",href:"http://rdf4j.org",target:"_blank",rel:"noopener noreferrer"},"RDF4J")," ",null===(i=this.productInfo)||void 0===i?void 0:i.sesame," • Connectors ",null===(s=this.productInfo)||void 0===s?void 0:s.connectors," • Workbench ",null===(n=this.productInfo)||void 0===n?void 0:n.workbench," • © 2002–",this.currentYear," ",e("a",{key:"20e70771852b0c504e86e36a1b9fdb9b61d5963c",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",e("translate-label",{key:"8df55b8d224ae50ca9de3fd038c0285ee01b4ff3",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&e("onto-cookie-consent",{key:"80f9c1af70db76ef4c6680dacf7022eb1262f049"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(a.get(p).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return a.get(d).isTrackableLicense()&&!m.getWindow().wbDevMode}subscribeToUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.setCookieConsentVisibility()}))}setCookieConsentVisibility(){var e;const t=this.securityContextService.getAuthenticatedUser();this.shouldShowCookieConsent=this.isTrackingAllowed()&&!new b(null===(e=null==t?void 0:t.appSettings)||void 0===e?void 0:e.COOKIE_CONSENT).policyAccepted}subscribeToLicenseChange(){this.subscriptions.add(this.licenseContextService.onLicenseChanged(()=>{this.setCookieConsentVisibility()}))}};Z.style=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}";const B=({repository:t})=>e("div",{class:"repository-selector-dropdown-item"},e("i",{class:"item-icon icon-repo-"+t.type}),e("div",{class:"item-label"},e("div",{class:"repository-id"},t.id),e("div",{class:"repository-location"},t.location?t.location:"Local"))),U=class{constructor(e){t(this,e),this.monitoringService=a.get(u),this.repositoryContextService=a.get(g),this.repositoryLocationContextService=a.get(v),this.repositoryService=a.get(f),this.securityContextService=a.get(l),this.toastrService=a.get(y),this.namespacesService=a.get(w),this.namespaceContextService=a.get(x),this.languageService=a.get(k),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new C,this.authService=a.get(I),this.eventService=a.get(M),this.shouldShowSearch=!0,this.isHomePage=z(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new r,this.skipUpdateActiveOperationsTimes=0,this.canWriteRepo=e=>this.canWriteRepoInLocation(e),this.repositorySizeInfoFetcher=e=>this.repositoryService.getRepositorySizeInfo(e),this.showViewResourceMessage=e=>{e.stopPropagation(),this.toastrService.info(H.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,W.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:$.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=T(),this.startOperationPolling()}render(){var t,i,s,n,r,a;return e(o,{key:"8222e10554a901e025c47424aea4b6294f240ea4"},e("div",{key:"8a0b771d5dbddcb7acff61e7a436d2e4a097277f",class:"header-component"},e("onto-search-icon",{key:"d24c7f1be0241391078cc730a1ef2a5a86172e8f",class:"rdf-search-button",onClick:this.showViewResourceMessage,"data-test":"onto-show-view-resource-message",style:{display:this.shouldShowSearch&&this.isHomePage?"block":"none"}}),e("onto-rdf-search",{key:"b75323ddf445ea121fd6067723bf8550b861f4e5","data-test":"onto-open-rdf-search-button",style:{display:this.shouldShowSearch&&!this.isHomePage?"block":"none"}}),(null===(t=this.activeOperations)||void 0===t?void 0:t.allRunningOperations.getItems().length)?e("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(i=this.license)||void 0===i?void 0:i.valid)?e("onto-license-alert",{license:this.license}):"",e("onto-repository-selector",{key:"25a3345c6482a2794032b161a78bc98204aff061",currentRepository:this.currentRepository,items:this.repositoryItems,repositorySizeInfoFetcher:this.repositorySizeInfoFetcher,totalTripletsFormatter:this.totalTripletsFormatter,canWriteRepo:this.canWriteRepo}),(null===(s=this.securityConfig)||void 0===s?void 0:s.enabled)&&(null===(n=this.securityConfig)||void 0===n?void 0:n.userLoggedIn)?e("onto-user-menu",{user:this.user,securityConfig:this.securityConfig}):"",(null===(r=this.securityConfig)||void 0===r?void 0:r.enabled)&&!(null===(a=this.securityConfig)||void 0===a?void 0:a.userLoggedIn)&&"login"!==this.currentRoute?e("onto-user-login",null):"",e("onto-language-selector",{key:"16cba1ff6d691fe0b7442d88940ec9f9ee22aebd","dropdown-alignment":"right"})))}subscribeToEvents(){this.subscribeToSecurityContextChange(),this.subscribeToRepositoryListChanged(),this.subscribeToLicenseChange(),this.subscribeToRepositoryChange(),this.subscribeToActiveRepositoryLocationChange(),this.subscribeToActiveRepoLoadingChange(),this.subscribeToNavigationEnd(),this.subscribeToLanguageChanged(),this.subscribeToAuthenticatedUserChange()}subscribeToRepositoryListChanged(){return this.repositoryContextService.onRepositoryListChanged(e=>{(null==e?void 0:e.getItems().length)?this.initOnRepositoryListChanged(e):this.resetOnMissingRepositories()})}subscribeToLicenseChange(){this.subscriptions.add(a.get(h).onLicenseChanged(e=>{this.license=e}))}subscribeToRepositoryChange(){this.subscriptions.add(this.repositoryContextService.onSelectedRepositoryChanged(e=>{this.currentRepository=e,this.shouldShowSearch=this.shouldShowRdfSearch(),this.loadNamespaces(),this.updateRepositoryItems()}))}subscribeToSecurityContextChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(e=>{this.user=e})),this.subscriptions.add(this.securityContextService.onSecurityConfigChanged(e=>{this.securityConfig=e}))}subscribeToAuthenticatedUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.updateRepositoryItems()}))}subscribeToActiveRepositoryLocationChange(){this.subscriptions.add(this.repositoryLocationContextService.onActiveLocationChanged(()=>{this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToActiveRepoLoadingChange(){this.subscriptions.add(this.repositoryLocationContextService.onIsLoadingChanged(e=>{this.isActiveLocationLoading=e,this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(S.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=z(),this.currentRoute=T()}))}subscribeToLanguageChanged(){this.subscriptions.add(a.get(L).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new A,this.currentRepository=void 0}initOnRepositoryListChanged(e){this.repositoryList=e,this.updateRepositoryItems()}updateRepositoryItems(){this.repositoryItems=this.getRepositoriesDropdownItems()}getRepositoriesDropdownItems(){var t;if(!(null===(t=this.repositoryList)||void 0===t?void 0:t.getItems().length))return[];let o;return this.repositoryList.sortByLocationAndId(),o=this.currentRepository?this.repositoryList.filterByRepository([this.currentRepository]):this.repositoryList.getItems(),o.filter(e=>this.authService.canReadRepo(e)||this.authService.canReadGqlRepo(e)).map(t=>(new J).setName(e(B,{repository:t})).setValue(t).setDropdownTooltipTrigger("mouseenter focus").setGuideSelector(`repository-id-${t.id}`))}canWriteRepoInLocation(e){return!0}loadNamespaces(){this.currentRepository&&this.authService.canReadRepo(this.currentRepository)&&this.namespacesService.getNamespaces(this.currentRepository.id).then(e=>this.namespaceContextService.updateNamespaces(e))}startOperationPolling(){clearInterval(this.pollingInterval),this.pollingInterval=m.getWindow().setInterval(()=>{this.authService.isAuthenticated()?this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.currentRepository&&this.monitoringService.getOperations(this.currentRepository.id).then(e=>{D.deepEqual(this.activeOperations,e)||(this.activeOperations=e),this.fibonacciGenerator.reset(),this.skipUpdateActiveOperationsTimes=0}).catch(()=>{this.activeOperations=void 0,this.skipUpdateActiveOperationsTimes=this.fibonacciGenerator.next()}):this.activeOperations=void 0},this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL)}stopOperationPolling(){clearInterval(this.pollingInterval),this.activeOperations=void 0}shouldShowRdfSearch(){return!!this.currentRepository&&(!this.isActiveLocationLoading||"/repository"===N())&&this.authService.canReadRepo(this.currentRepository)}setupTotalRepositoryFormater(e){e||(e=this.languageService.getDefaultLanguage()),this.totalTripletsFormatter=new Intl.NumberFormat(e,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})}};U.style=":host{display:block}.header-component>*{height:100%}.header-component{display:flex;justify-content:flex-end;align-items:stretch;gap:0.25em;margin-right:2em;font-size:1.1em;padding-bottom:0.5rem}";class Q{constructor(e){this.type="navbarToggled",this.payload=e}}class q{constructor(e=[]){this._items=e}hasParent(e){return this._items.some(t=>e===t.label)}getModel(){const e=t=>{const o=t.children.map(e);return new V(Object.assign(Object.assign({},t),{children:o}))};return this._items.map(e)}addItem(e){this._items.push(e)}getSelectedRootItem(){return this._items.find(e=>e.selected)}isParentOpened(e){var t;return!!(null===(t=this.getParentItem(e))||void 0===t?void 0:t.open)}getTopLevelItem(e){return this._items.find(t=>t.label===e)}getParentItem(e){return this._items.find(t=>t.label===e.parent)}deselectAll(){this.walk(e=>{e.selected=!1})}closeAll(){this.walk(e=>{e.open=!1})}deselectItem(e){e.selected=!1}selectItem(e){e.label?e.selected=!0:this.selectItem(e.parentModel)}hasSelectedSubmenu(e){return!!e.children&&e.children.some(e=>this.hasSelection(e))}hasSelection(e){return!!e.selected||!!e.children&&e.children.some(e=>this.hasSelection(e))}closeOpened(){const e=this._items.find(e=>e.open);e&&(this.hasSelectedSubmenu(e)&&this.selectItem(e),e.open=!1)}open(e){this.walk(e=>{e.open=!1}),this.openItemAndParent(e)}openItemAndParent(e){e.parentModel&&this.openItemAndParent(e.parentModel),e.open=!0}closeOtherParents(e){const t=e.parent;this.walk(e=>{e.label!==t&&(e.open=!1)})}highlightSelected(){const e=this.getSelectedItem();(null==e?void 0:e.hasParent)&&this.selectItem(this.getParentItem(e))}unhighlightSelected(){const e=this.getSelectedRootItem();e&&e.children.length&&e.open&&this.deselectItem(e)}getSelectedItem(){let e=null;const t=o=>{if(o.selected)return e=o,!0;if(o.children)for(const e of o.children)if(t(e))return!0;return!1};return this._items.some(t),e}expandSelected(){const e=this.getSelectedItem();e&&this.open(e.hasParent?this.getParentItem(e):e)}initSelected(e){this.walk(t=>{var o;let i=e;(null===(o=t.href)||void 0===o?void 0:o.includes("*"))&&(i=this.getWildcardPath(e,t.href)),t.href===i&&(t.hasParent&&this.open(t),this.selectItem(t))})}getWildcardPath(e,t){const o=e.split("/"),i=t.split("/");if(o.length!==i.length)return e;const s=[];for(let t=0;t<i.length;t++)if("*"===i[t])s.push("*");else{if(i[t]!==o[t])return e;s.push(i[t])}return s.join("/")}sorted(){return this._items.filter(e=>e.children).forEach(e=>{e.children.sort(q.compare)}),this._items.sort(q.compare),this}static compare(e,t){return e.order-t.order}walk(e){this.walkRecursively(this.items,e)}walkRecursively(e,t){e.forEach(e=>{var o;t(e),(null===(o=e.children)||void 0===o?void 0:o.length)&&this.walkRecursively(e.children,t)})}get items(){return this._items}}class V{constructor(e){var t;this._selected=!1,this._open=!1,this._order=e.order,this._label=e.label,this._labelKey=e.labelKey,this._href=e.href,this._children=[...null!==(t=e.children)&&void 0!==t?t:[]],this._hasParent=e.hasParent,this._parent=e.parent,this._selected=e.selected,this._open=e.open,this._documentationHref=e.documentationHref,this._hrefFun=e.hrefFun,this._editions=e.editions,this._icon=e.icon,this._role=e.role,this._guideSelector=e.guideSelector,this._testSelector=e.testSelector,this._shouldShow=e.shouldShow,this._parentModel=e.parentModel}addChild(e){this.children.push(e),e.setParent(this)}addChildren(...e){e.forEach(e=>{this.addChild(e)})}hasSubmenus(){return"#"===this._href}get parent(){return this._parent}set parent(e){this._parent=e}get order(){return this._order}set order(e){this._order=e}get label(){return this._label}set label(e){this._label=e}get labelKey(){return this._labelKey}set labelKey(e){this._labelKey=e}get documentationHref(){return this._documentationHref}set documentationHref(e){this._documentationHref=e}get href(){return this._href}set href(e){this._href=e}get children(){return this._children}set children(e){this._children=e}get hasParent(){return this._hasParent}set hasParent(e){this._hasParent=e}get selected(){return this._selected}set selected(e){this._selected=e}get open(){return this._open}set open(e){this._open=e}get hrefFun(){return this._hrefFun}set hrefFun(e){this._hrefFun=e}get editions(){return this._editions}set editions(e){this._editions=e}get icon(){return this._icon}set icon(e){this._icon=e}get role(){return this._role}set role(e){this._role=e}get guideSelector(){return this._guideSelector}set guideSelector(e){this._guideSelector=e}get testSelector(){return this._testSelector}set testSelector(e){this._testSelector=e}get parentModel(){return this._parentModel}set parentModel(e){this._parentModel=e}get shouldShow(){return this._shouldShow}set shouldShow(e){this._shouldShow=e}setParent(e){this.parentModel=e,this.hasParent=!!e}}const X=G.logger;class tt{static map(e,t){const o=new q;return tt.setTopLevelMenuItems(e,o,t),tt.setSubmenuItems(e,o,t),o.sorted()}static setTopLevelMenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>!e.parent&&e.shouldShow).forEach(e=>{t.hasParent(e.label)?X.warn("Doubled parent definition: ",e):t.addItem(this.toMenuItemModel(e,void 0,o,e.children))})})}static setSubmenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>e.parent&&e.shouldShow).forEach(e=>{const i=t.getTopLevelItem(e.parent);null==i||i.addChildren(this.toMenuItemModel(e,i,o,e.children))})})}static toMenuItemModel(e,t,o,i=[]){let s;e.documentationHref&&(s=R.resolveDocumentationUrl(null==o?void 0:o.shortVersion,e.documentationHref));const n=new V({label:e.label,labelKey:e.labelKey,href:s||e.href,documentationHref:e.documentationHref,hrefFun:e.hrefFun,order:e.order,role:e.role,editions:e.editions,icon:e.icon,guideSelector:e.guideSelector,hasParent:!!t,parentModel:t,parent:e.parent,selected:!1,shouldShow:e.shouldShow,testSelector:e.testSelector}),r=i.map(e=>this.toMenuItemModel(e,n,o,e.children));return n.addChildren(...r),n}}const et="menu.buttons.expand",ot="menu.buttons.collapse",it="menu.logo.link.title",nt=class{constructor(e){t(this,e),this.navbarToggled=i(this,"navbarToggled"),this.productInfoContextService=a.get(p),this.subscriptions=new r,this.resizeHandler=()=>this.adjustAllSubmenus(this.hostElement),this.SUBMENU_VERTICAL_MARGIN=8,this.MIN_SUBMENU_HEIGHT=100,this.labels={[et]:H.translate(et),[ot]:H.translate(ot),[it]:H.translate(it)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new Q(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=tt.map(e||[],this.productInfo);t.initSelected(T()),this.menuModel=t}select(e,t){e.preventDefault(),this.clearAllOpenedSubmenuStyles(),t.hasSubmenus()||(e.ctrlKey?j(t.href):O(t.href)),t.children.length?t.open?(this.menuModel.closeAll(),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.selectItem(t)):(this.menuModel.closeOpened(),this.menuModel.open(t),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.deselectItem(t)):this.menuModel.closeOtherParents(t),this.isCollapsed&&this.menuModel.isParentOpened(t)&&this.menuModel.closeOpened(),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement)}subscribeToNavigationEnd(){this.subscriptions.add(a.get(M).subscribe(S.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),z()||this.menuModel.initSelected(T()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement))}toggleNavbar(){this.isCollapsed?(this.isCollapsedByUser=!1,this.menuModel.expandSelected(),this.menuModel.unhighlightSelected(),this.expandNavbar(),this.clearAllOpenedSubmenuStyles()):(this.isCollapsedByUser=!0,this.menuModel.highlightSelected(),this.menuModel.closeOpened(),this.collapseNavbar(),this.clearAllOpenedSubmenuStyles()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement),this.navbarToggled.emit(new Q(this.isCollapsed))}collapseNavbar(){this.hostElement.querySelector(".navbar-component").classList.add("collapsed"),this.isCollapsed=!0}expandNavbar(){this.isCollapsedByUser||(this.hostElement.querySelector(".navbar-component").classList.remove("collapsed"),this.isCollapsed=!1)}refreshNavbar(){var e;(null===(e=this.menuModel)||void 0===e?void 0:e.items)&&(this.menuModel=new q(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(H.onTranslate(e,[],t=>{this.labels[e]=t,this.onLanguageChanged()}))}toggleNavbarHandler(){return()=>this.toggleNavbar()}adjustSubmenuMaxHeight(e,t=this.SUBMENU_VERTICAL_MARGIN){if(!e||"function"!=typeof e.getBoundingClientRect)return;const o=e.closest(".menu-element");if(!o)return;const i=e.getBoundingClientRect(),s=o.getBoundingClientRect(),n=window.innerHeight,r=s.top-t+s.height,a=n-s.bottom+s.height-t;let l,c=!1;a>=i.height?l=a:r>=i.height?(l=r,c=!0):a>r?(l=a,c=!1):(l=r,c=!0),c?(e.style.bottom="0",e.style.top="auto"):(e.style.top="0",e.style.bottom="auto"),e.style.maxHeight=`${Math.max(this.MIN_SUBMENU_HEIGHT,l)}px`,e.style.overflowY="auto"}adjustAllSubmenus(e,t=this.SUBMENU_VERTICAL_MARGIN){requestAnimationFrame(()=>{e&&"function"==typeof e.querySelectorAll&&this.getAllOpenedSubmenus(e).forEach(e=>this.adjustSubmenuMaxHeight(e,t))})}getAllOpenedSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component.collapsed .menu-element.open .sub-menu"))}getAllSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component .menu-element .sub-menu"))}clearAllOpenedSubmenuStyles(){this.getAllSubmenus(this.hostElement).forEach(e=>{e.style.maxHeight="",e.style.overflowY="",e.style.top="",e.style.bottom=""})}componentWillLoad(){this.init(this.menuItems)}connectedCallback(){this.subscribeToNavigationEnd(),this.subscribeToProductInfoChanges(),this.onTranslate(et),this.onTranslate(ot),this.onTranslate(it),window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){this.subscriptions.unsubscribeAll(),window.removeEventListener("resize",this.resizeHandler)}handleSelectMenuItem(e){return t=>{this.select(t,e)}}render(){if(this.menuModel)return e(o,null,e("ul",{class:"navbar-component"},e("li",{class:"brand"},e("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[et]:this.labels[ot],onClick:this.toggleNavbarHandler()},e("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),e("a",{class:"menu-element-root home-page",onClick:_("./")},e("svg",{class:"big-logo"},e("desc",null,this.labels[it]),e("use",{href:"assets/graphdb-logo.svg#Layer_1"})),e("svg",{class:"small-logo"},e("desc",null,this.labels[it]),e("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(t=>e("li",{key:t.labelKey,class:{"menu-element":!0,open:t.open},"data-test":t.testSelector,"guide-selector":t.guideSelector},t.children.length>0&&e(n,null,e("div",{class:{"menu-element-root":!0,active:t.selected},onClick:this.handleSelectMenuItem(t)},e("span",{class:`menu-item-icon ${t.icon}`})," ",e("translate-label",{class:"menu-item",labelKey:t.labelKey})),e("ul",{class:"sub-menu"},e("li",{key:t.labelKey,class:"submenu-title"},e("translate-label",{labelKey:t.labelKey})),t.children.map(t=>e("li",{key:t.labelKey,class:{"sub-menu-item":!0,active:t.selected},"data-test":t.testSelector,"guide-selector":t.guideSelector},e("a",t.documentationHref?{class:"sub-menu-link external-link",href:t.href,target:"_blank",rel:"noopener noreferrer"}:{class:"sub-menu-link",href:t.href,onClick:this.handleSelectMenuItem(t)},e("translate-label",{class:"menu-item",labelKey:t.labelKey}),t.icon&&e("span",{class:`text-muted ${t.icon}`})))))),0===t.children.length&&e("a",{class:{"menu-element-root":!0,active:t.selected},href:t.href,onClick:this.handleSelectMenuItem(t)},e("span",{class:`menu-item-icon ${t.icon}`})," ",e("translate-label",{class:"menu-item",labelKey:t.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return s(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};nt.style=':host{display:block}.navbar-component{width:15rem;position:fixed;font-weight:400;z-index:1010;margin:0;padding:0;-moz-transition:width 0.2s ease-in;-o-transition:width 0.2s ease-in;-webkit-transition:width 0.2s ease-in;transition:width 0.2s ease-in;height:100%;overflow-y:auto;overflow-x:hidden}@media screen and (max-height: 475px){.navbar-component.collapsed{position:absolute}}.navbar-component li{list-style:none;cursor:pointer}.navbar-component li a{text-decoration:none}.navbar-component li a.sub-menu-link:not([href=""]):not([tabindex]):hover{text-decoration:none !important}.navbar-component .sub-menu-item a.sub-menu-link:not([href]) translate-label.menu-item{padding-right:3.5px}.navbar-component a.sub-menu-link:not([href]):hover .menu-item,.navbar-component a.sub-menu-link[href=""]:hover .menu-item{text-decoration-line:underline !important}.navbar-component li .menu-element-root:hover,.navbar-component .sub-menu li:hover{text-decoration-line:none !important}.navbar-component li .menu-element-root:hover .menu-item-icon,.navbar-component .menu-element.open .menu-item-icon{transform:scale(1.1)}.navbar-component .menu-element.open .sub-menu .menu-item-icon{transform:scale(0.5)}.navbar-component .menu-element{position:relative}.navbar-component .menu-element-root{padding:0.8em 2.5em 0.8em 0.8em;display:block;line-height:2.5rem;position:relative;z-index:100;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.navbar-component .menu-item-icon{font-size:2.5rem;width:2.5rem;vertical-align:middle;text-align:center;transform:scale(0.9);display:inline-block;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;pointer-events:none}.navbar-component .menu-element-root .menu-item{pointer-events:none}.navbar-component .menu-element-root.active,.navbar-component .menu-element-root.active:hover{background-color:var(--gw-sidenav-submenuitem-active-background);color:#ffffff}.navbar-component .active .menu-item-icon{transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .sub-menu{position:relative;padding:0;z-index:110}.navbar-component .sub-menu li{display:none}.navbar-component .sub-menu li a{padding:0.5em 0.8em;display:block}.navbar-component .sub-menu li.active a{font-weight:500}.navbar-component .menu-element.open ul li{display:block}.navbar-component .menu-element ul:before,.rdf-list ul.datasource:before{font-family:"icomoon", sans-serif !important;content:"\\e921";display:block;font-size:1.5em;position:absolute;top:-3.3rem;right:1rem;-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;pointer-events:none}.navbar-component .menu-element.open ul:before,.rdf-list ul.open.datasource:before{transform:rotate(180deg)}.navbar-component.collapsed{width:4.375rem;overflow:visible;height:auto}.navbar-component.collapsed .menu-element.open .sub-menu{position:absolute;top:0;left:4.375rem;width:15rem}.navbar-component.collapsed .menu-element .menu-item,.navbar-component.collapsed .menu-element .sub-menu li{display:none}.navbar-component.collapsed .menu-element.open .menu-item,.navbar-component.collapsed .menu-element.open .sub-menu li{display:block}.navbar-component.collapsed .menu-element.open .menu-element-root .menu-item{display:none}.navbar-component.collapsed .menu-element-root{overflow:visible}.navbar-component .menu-element.open ul li.submenu-title,.navbar-component .submenu-title{display:none}.navbar-component.collapsed .menu-element.open ul li.submenu-title{display:block;font-size:1.2em;font-weight:500;text-overflow:ellipsis;overflow:hidden;padding:0.5em 0.8rem 0.2em 0;margin-left:0.8rem;margin-bottom:0.5em}.navbar-component.collapsed .menu-element.open .sub-menu.align-bottom{bottom:0;top:auto}.navbar-component.collapsed .menu-element ul:before{display:none}.navbar-component.collapsed .brand a{padding:0.4rem}.navbar-component.collapsed .small-logo,.navbar-component .big-logo{display:block}.navbar-component .small-logo,.navbar-component.collapsed .big-logo{display:none}.navbar-component .brand{background-color:var(--gw-sidenav-logo-background)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.toggle-menu{display:block;position:absolute;top:0;right:0;font-size:0.8em;line-height:1.5;padding:0 0.3em;z-index:10;cursor:pointer;background-color:var(--gw-sidenav-collapsebutton-background);color:var(--gw-sidenav-collapsebutton-color)}.toggle-menu:hover{color:var(--gw-sidenav-collapsebutton-hover-color);background-color:var(--gw-sidenav-collapsebutton-hover-background)}.toggle-menu [class^=icon-]{transition:all 0.2s ease-in;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.navbar-component .menu-element .menu-element-root{background-color:var(--gw-sidenav-item-background);color:var(--gw-sidenav-item-color)}.navbar-component .menu-element .menu-element-root:hover{background-color:var(--gw-sidenav-item-hover-background);color:var(--gw-sidenav-item-hover-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon{color:var(--gw-sidenav-item-icon-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon:hover{color:var(--gw-sidenav-item-hover-icon-color)}.navbar-component .menu-element.open .menu-element-root{background-color:var(--gw-sidenav-item-selected-background);color:var(--gw-sidenav-item-selected-color)}.navbar-component .menu-element .menu-element-root.active{background-color:var(--gw-sidenav-item-active-background);color:var(--gw-sidenav-item-active-color)}.navbar-component .menu-element .menu-element-root.active .menu-item-icon{color:var(--gw-sidenav-item-active-icon-color)}.navbar-component .menu-element .sub-menu-item,.navbar-component .menu-element .sub-menu{background-color:var(--gw-sidenav-submenuitem-background);color:var(--gw-sidenav-submenuitem-color)}.navbar-component .menu-element .sub-menu-item:hover{background-color:var(--gw-sidenav-submenuitem-hover-background);color:var(--gw-sidenav-submenuitem-hover-color)}.navbar-component .menu-element .sub-menu-item.active,.navbar-component .menu-element .sub-menu-item.active .sub-menu-link{background-color:var(--gw-sidenav-submenuitem-active-background);color:var(--gw-sidenav-submenuitem-active-color)}';const st={[E.INFO]:"ri-information-2-fill",[E.SUCCESS]:"ri-checkbox-circle-line",[E.WARNING]:"ri-message-line",[E.ERROR]:"ri-alert-line"},rt=class{constructor(e){t(this,e),this.toasts=new P([]),this.toastToTimeout=new Map,this.config=F.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var t;return e("section",{key:"57fcc0103bbc130bee6043a37c7c3539b8eb3c5a",style:{display:this.toasts.isEmpty()?"none":"flex"},class:`onto-toastr-container ${this.config.position}`},null===(t=this.toasts)||void 0===t?void 0:t.getItems().map(t=>e("div",{class:`onto-toast ${t.type}`,key:t.id,onMouseEnter:this.onToastMouseEnter(t),onMouseLeave:this.onToastMouseLeave(t)},e("i",{class:`${st[t.type]}`}),e("span",{onClick:this.handleToastClick(t),class:"toast-message",innerHTML:K(t.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=m.getWindow().setTimeout(()=>{this.toasts.remove(e),this.clearToastTimeout(e)},(null===(t=e.config)||void 0===t?void 0:t.timeout)||this.config.timeout);this.toastToTimeout.set(e,o)}updateToastrReference(){this.toasts=new P(this.toasts.getItems())}clearToastTimeout(e){const t=this.toastToTimeout.get(e);clearTimeout(t),this.toastToTimeout.delete(e),this.updateToastrReference()}handleToastClick(e){return t=>{var o,i;(null===(o=e.config)||void 0===o?void 0:o.onClick)&&e.config.onClick(t),(null===(i=e.config)||void 0===i?void 0:i.removeOnClick)&&(this.toasts.remove(e),this.clearToastTimeout(e))}}};rt.style=".onto-toastr-container{position:fixed;z-index:9999999;pointer-events:auto;flex-direction:column}.onto-toastr-container.bottom-right{bottom:12px;right:12px}.onto-toastr-container.bottom-left{bottom:12px;left:12px}.onto-toastr-container .onto-toast{display:flex;align-items:center;border-radius:0;box-shadow:0 0 12px rgba(0, 0, 0, 0.3);position:relative;width:450px;padding:25px 0;color:white;margin-bottom:5px;overflow-wrap:break-word}.onto-toastr-container .onto-toast:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.onto-toastr-container .onto-toast.warning{color:var(--gw-toast-warn-color);background-color:var(--gw-toast-warn-background);border-color:var(--gw-toast-warn-border-color)}.onto-toastr-container .onto-toast.success{background-color:var(--gw-toast-success-background);border-color:var(--gw-toast-success-border-color);color:var(--gw-toast-success-color)}.onto-toastr-container .onto-toast.error{background-color:var(--gw-toast-error-background);border-color:var(--gw-toast-error-border-color);color:var(--gw-toast-error-color)}.onto-toastr-container .onto-toast.info{background-color:var(--gw-toast-info-background);border-color:var(--gw-toast-info-border-color);color:var(--gw-toast-info-color)}.onto-toastr-container .onto-toast i{font-size:1.8rem;padding:0 20px;color:inherit}.onto-toastr-container .onto-toast i:hover{transform:none}.onto-toastr-container .onto-toast .toast-message{font-size:1.2rem;opacity:1;max-width:370px}";const at=class{constructor(e){t(this,e),this.clearTooltipsForRemovedElements=e=>{for(const t of e)for(const e of Array.from(t.removedNodes))if(this.removeTooltipFromNode(e))return},this.removeTooltipFromNode=e=>{if(e instanceof HTMLElement){if(Y.getTooltipInstance(e))return Y.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=Y.getTooltipTarget(e.target);if(!t)return;const o=Y.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=Y.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=Y.getTooltipInstance(t);e&&"manual"===e.props.trigger&&Y.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return e(o,{key:"9b797bae73df060bdecef74fb84a90fb61ac6eef"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};at.style='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light-border]{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#333;box-shadow:0 4px 14px -2px rgba(0,8,16,.08)}.tippy-box[data-theme~=light-border]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light-border]>.tippy-arrow:after,.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{content:"";position:absolute;z-index:-1}.tippy-box[data-theme~=light-border]>.tippy-arrow:after{border-color:transparent;border-style:solid}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after{border-top-color:rgba(0,8,16,.2);border-width:7px 7px 0;top:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg{top:16px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after{top:17px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff;bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after{border-bottom-color:rgba(0,8,16,.2);border-width:0 7px 7px;bottom:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after{bottom:17px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after{border-left-color:rgba(0,8,16,.2);border-width:7px 0 7px 7px;left:17px;top:1px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg{left:11px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after{left:12px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff;right:16px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after{border-width:7px 7px 7px 0;right:17px;top:1px;border-right-color:rgba(0,8,16,.2)}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg{right:11px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after{right:12px}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);background-size:16px 6px;width:16px;height:6px}:host{display:block}.tippy-box[data-theme=onto-tooltip]{color:var(--gw-tooltip-color);background-color:var(--gw-tooltip-background);border-radius:0}.tippy-box[data-theme=onto-tooltip] .tippy-arrow{color:var(--gw-tooltip-background)}';export{Z as onto_footer,U as onto_header,nt as onto_navbar,rt as onto_toastr,at as onto_tooltip};
|
|
1
|
+
import{r as t,h as e,a as o,c as i,F as n,g as s}from"./p-I_gcXFWK.js";import{SubscriptionList as r,ServiceProvider as a,SecurityContextService as l,LicenseContextService as h,CookieService as c,ProductInfoContextService as p,LicenseService as d,WindowService as m,CookieConsent as b,MonitoringService as u,RepositoryContextService as g,RepositoryLocationContextService as v,RepositoryService as f,OntoToastrService as y,NamespacesService as w,NamespacesContextService as x,LanguageService as k,FibonacciGenerator as C,AuthenticationService as I,EventService as M,isHomePage as z,getCurrentRoute as T,EventName as S,LanguageContextService as L,RepositoryList as A,ObjectUtil as D,getPathName as N,UriUtil as R,openInNewTab as j,navigate as O,navigateTo as _,ToastMessageList as P,ToastrConfig as F,ToastType as E}from"@ontotext/workbench-api";import{T as H,L as G,s as K}from"./p-nljGIprK.js";import{H as W}from"./p-C8DO915D.js";import{R as $,D as J}from"./p-CapzAxJp.js";import{T as Y}from"./p-DzOPDgzQ.js";import"./p-D_J2-9CG.js";const Z=class{constructor(e){t(this,e),this.subscriptions=new r,this.currentYear=(new Date).getFullYear(),this.securityContextService=a.get(l),this.licenseContextService=a.get(h),this.cookieService=a.get(c)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var t,i,n,s;return e(o,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},e("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},e("a",{key:"e81e156b6b691a0a05275ee399ccf26438ba5729",href:"http://graphdb.ontotext.com",target:"_blank",rel:"noopener noreferrer"},"GraphDB")," ",null===(t=this.productInfo)||void 0===t?void 0:t.productVersion," • ",e("a",{key:"018b1772807248dfd83e0c2ca57fde6bd848e9c9",href:"http://rdf4j.org",target:"_blank",rel:"noopener noreferrer"},"RDF4J")," ",null===(i=this.productInfo)||void 0===i?void 0:i.sesame," • Connectors ",null===(n=this.productInfo)||void 0===n?void 0:n.connectors," • Workbench ",null===(s=this.productInfo)||void 0===s?void 0:s.workbench," • © 2002–",this.currentYear," ",e("a",{key:"20e70771852b0c504e86e36a1b9fdb9b61d5963c",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",e("translate-label",{key:"8df55b8d224ae50ca9de3fd038c0285ee01b4ff3",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&e("onto-cookie-consent",{key:"80f9c1af70db76ef4c6680dacf7022eb1262f049"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(a.get(p).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return a.get(d).isTrackableLicense()&&!m.getWindow().wbDevMode}subscribeToUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.setCookieConsentVisibility()}))}setCookieConsentVisibility(){var e;const t=this.securityContextService.getAuthenticatedUser();this.shouldShowCookieConsent=this.isTrackingAllowed()&&!new b(null===(e=null==t?void 0:t.appSettings)||void 0===e?void 0:e.COOKIE_CONSENT).policyAccepted}subscribeToLicenseChange(){this.subscriptions.add(this.licenseContextService.onLicenseChanged(()=>{this.setCookieConsentVisibility()}))}};Z.style=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}";const B=({repository:t})=>e("div",{class:"repository-selector-dropdown-item"},e("i",{class:"item-icon icon-repo-"+t.type}),e("div",{class:"item-label"},e("div",{class:"repository-id"},t.id),e("div",{class:"repository-location"},t.location?t.location:"Local"))),U=class{constructor(e){t(this,e),this.monitoringService=a.get(u),this.repositoryContextService=a.get(g),this.repositoryLocationContextService=a.get(v),this.repositoryService=a.get(f),this.securityContextService=a.get(l),this.toastrService=a.get(y),this.namespacesService=a.get(w),this.namespaceContextService=a.get(x),this.languageService=a.get(k),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new C,this.authService=a.get(I),this.eventService=a.get(M),this.shouldShowSearch=!0,this.isHomePage=z(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new r,this.skipUpdateActiveOperationsTimes=0,this.canWriteRepo=e=>this.canWriteRepoInLocation(e),this.repositorySizeInfoFetcher=e=>this.repositoryService.getRepositorySizeInfo(e),this.showViewResourceMessage=e=>{e.stopPropagation(),this.toastrService.info(H.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,W.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:$.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=T(),this.startOperationPolling()}render(){var t,i,n,s,r,a;return e(o,{key:"8222e10554a901e025c47424aea4b6294f240ea4"},e("div",{key:"8a0b771d5dbddcb7acff61e7a436d2e4a097277f",class:"header-component"},e("onto-search-icon",{key:"d24c7f1be0241391078cc730a1ef2a5a86172e8f",class:"rdf-search-button",onClick:this.showViewResourceMessage,"data-test":"onto-show-view-resource-message",style:{display:this.shouldShowSearch&&this.isHomePage?"block":"none"}}),e("onto-rdf-search",{key:"b75323ddf445ea121fd6067723bf8550b861f4e5","data-test":"onto-open-rdf-search-button",style:{display:this.shouldShowSearch&&!this.isHomePage?"block":"none"}}),(null===(t=this.activeOperations)||void 0===t?void 0:t.allRunningOperations.getItems().length)?e("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(i=this.license)||void 0===i?void 0:i.valid)?e("onto-license-alert",{license:this.license}):"",e("onto-repository-selector",{key:"25a3345c6482a2794032b161a78bc98204aff061",currentRepository:this.currentRepository,items:this.repositoryItems,repositorySizeInfoFetcher:this.repositorySizeInfoFetcher,totalTripletsFormatter:this.totalTripletsFormatter,canWriteRepo:this.canWriteRepo}),(null===(n=this.securityConfig)||void 0===n?void 0:n.enabled)&&(null===(s=this.securityConfig)||void 0===s?void 0:s.userLoggedIn)?e("onto-user-menu",{user:this.user,securityConfig:this.securityConfig}):"",(null===(r=this.securityConfig)||void 0===r?void 0:r.enabled)&&!(null===(a=this.securityConfig)||void 0===a?void 0:a.userLoggedIn)&&"login"!==this.currentRoute?e("onto-user-login",null):"",e("onto-language-selector",{key:"16cba1ff6d691fe0b7442d88940ec9f9ee22aebd","dropdown-alignment":"right"})))}subscribeToEvents(){this.subscribeToSecurityContextChange(),this.subscribeToRepositoryListChanged(),this.subscribeToLicenseChange(),this.subscribeToRepositoryChange(),this.subscribeToActiveRepositoryLocationChange(),this.subscribeToActiveRepoLoadingChange(),this.subscribeToNavigationEnd(),this.subscribeToLanguageChanged(),this.subscribeToAuthenticatedUserChange()}subscribeToRepositoryListChanged(){return this.repositoryContextService.onRepositoryListChanged(e=>{(null==e?void 0:e.getItems().length)?this.initOnRepositoryListChanged(e):this.resetOnMissingRepositories()})}subscribeToLicenseChange(){this.subscriptions.add(a.get(h).onLicenseChanged(e=>{this.license=e}))}subscribeToRepositoryChange(){this.subscriptions.add(this.repositoryContextService.onSelectedRepositoryChanged(e=>{this.currentRepository=e,this.shouldShowSearch=this.shouldShowRdfSearch(),this.loadNamespaces(),this.updateRepositoryItems()}))}subscribeToSecurityContextChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(e=>{this.user=e})),this.subscriptions.add(this.securityContextService.onSecurityConfigChanged(e=>{this.securityConfig=e}))}subscribeToAuthenticatedUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.updateRepositoryItems()}))}subscribeToActiveRepositoryLocationChange(){this.subscriptions.add(this.repositoryLocationContextService.onActiveLocationChanged(()=>{this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToActiveRepoLoadingChange(){this.subscriptions.add(this.repositoryLocationContextService.onIsLoadingChanged(e=>{this.isActiveLocationLoading=e,this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(S.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=z(),this.currentRoute=T()}))}subscribeToLanguageChanged(){this.subscriptions.add(a.get(L).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new A,this.currentRepository=void 0}initOnRepositoryListChanged(e){this.repositoryList=e,this.updateRepositoryItems()}updateRepositoryItems(){this.repositoryItems=this.getRepositoriesDropdownItems()}getRepositoriesDropdownItems(){var t;if(!(null===(t=this.repositoryList)||void 0===t?void 0:t.getItems().length))return[];let o;return this.repositoryList.sortByLocationAndId(),o=this.currentRepository?this.repositoryList.filterByRepository([this.currentRepository]):this.repositoryList.getItems(),o.filter(e=>this.authService.canReadRepo(e)||this.authService.canReadGqlRepo(e)).map(t=>(new J).setName(e(B,{repository:t})).setValue(t).setDropdownTooltipTrigger("mouseenter focus").setGuideSelector(`repository-id-${t.id}`))}canWriteRepoInLocation(e){return!0}loadNamespaces(){this.currentRepository&&this.authService.canReadRepo(this.currentRepository)&&this.namespacesService.getNamespaces(this.currentRepository.id).then(e=>this.namespaceContextService.updateNamespaces(e))}startOperationPolling(){clearInterval(this.pollingInterval),this.pollingInterval=m.getWindow().setInterval(()=>{this.authService.isAuthenticated()?this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.currentRepository&&this.monitoringService.getOperations(this.currentRepository.id).then(e=>{D.deepEqual(this.activeOperations,e)||(this.activeOperations=e),this.fibonacciGenerator.reset(),this.skipUpdateActiveOperationsTimes=0}).catch(()=>{this.activeOperations=void 0,this.skipUpdateActiveOperationsTimes=this.fibonacciGenerator.next()}):this.activeOperations=void 0},this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL)}stopOperationPolling(){clearInterval(this.pollingInterval),this.activeOperations=void 0}shouldShowRdfSearch(){return!!this.currentRepository&&(!this.isActiveLocationLoading||"/repository"===N())&&this.authService.canReadRepo(this.currentRepository)}setupTotalRepositoryFormater(e){e||(e=this.languageService.getDefaultLanguage()),this.totalTripletsFormatter=new Intl.NumberFormat(e,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})}};U.style=":host{display:block}.header-component>*{height:100%}.header-component{display:flex;justify-content:flex-end;align-items:stretch;gap:0.25em;margin-right:2em;font-size:1.1em;padding-bottom:0.5rem}";class Q{constructor(e){this.type="navbarToggled",this.payload=e}}class q{constructor(e=[]){this._items=e}hasParent(e){return this._items.some(t=>e===t.label)}getModel(){const e=t=>{const o=t.children.map(e);return new V(Object.assign(Object.assign({},t),{children:o}))};return this._items.map(e)}addItem(e){this._items.push(e)}getSelectedRootItem(){return this._items.find(e=>e.selected)}isParentOpened(e){var t;return!!(null===(t=this.getParentItem(e))||void 0===t?void 0:t.open)}getTopLevelItem(e){return this._items.find(t=>t.label===e)}getParentItem(e){return this._items.find(t=>t.label===e.parent)}deselectAll(){this.walk(e=>{e.selected=!1})}closeAll(){this.walk(e=>{e.open=!1})}deselectItem(e){e.selected=!1}selectItem(e){e.label?e.selected=!0:this.selectItem(e.parentModel)}hasSelectedSubmenu(e){return!!e.children&&e.children.some(e=>this.hasSelection(e))}hasSelection(e){return!!e.selected||!!e.children&&e.children.some(e=>this.hasSelection(e))}closeOpened(){const e=this._items.find(e=>e.open);e&&(this.hasSelectedSubmenu(e)&&this.selectItem(e),e.open=!1)}open(e){this.walk(e=>{e.open=!1}),this.openItemAndParent(e)}openItemAndParent(e){e.parentModel&&this.openItemAndParent(e.parentModel),e.open=!0}closeOtherParents(e){const t=e.parent;this.walk(e=>{e.label!==t&&(e.open=!1)})}highlightSelected(){const e=this.getSelectedItem();(null==e?void 0:e.hasParent)&&this.selectItem(this.getParentItem(e))}unhighlightSelected(){const e=this.getSelectedRootItem();e&&e.children.length&&e.open&&this.deselectItem(e)}getSelectedItem(){let e=null;const t=o=>{if(o.selected)return e=o,!0;if(o.children)for(const e of o.children)if(t(e))return!0;return!1};return this._items.some(t),e}expandSelected(){const e=this.getSelectedItem();e&&this.open(e.hasParent?this.getParentItem(e):e)}initSelected(e){this.walk(t=>{var o;let i=e;(null===(o=t.href)||void 0===o?void 0:o.includes("*"))&&(i=this.getWildcardPath(e,t.href)),t.href===i&&(t.hasParent&&this.open(t),this.selectItem(t))})}getWildcardPath(e,t){const o=e.split("/"),i=t.split("/");if(o.length!==i.length)return e;const n=[];for(let t=0;t<i.length;t++)if("*"===i[t])n.push("*");else{if(i[t]!==o[t])return e;n.push(i[t])}return n.join("/")}sorted(){return this._items.filter(e=>e.children).forEach(e=>{e.children.sort(q.compare)}),this._items.sort(q.compare),this}static compare(e,t){return e.order-t.order}walk(e){this.walkRecursively(this.items,e)}walkRecursively(e,t){e.forEach(e=>{var o;t(e),(null===(o=e.children)||void 0===o?void 0:o.length)&&this.walkRecursively(e.children,t)})}get items(){return this._items}}class V{constructor(e){var t;this._selected=!1,this._open=!1,this._order=e.order,this._label=e.label,this._labelKey=e.labelKey,this._href=e.href,this._children=[...null!==(t=e.children)&&void 0!==t?t:[]],this._hasParent=e.hasParent,this._parent=e.parent,this._selected=e.selected,this._open=e.open,this._documentationHref=e.documentationHref,this._hrefFun=e.hrefFun,this._editions=e.editions,this._icon=e.icon,this._role=e.role,this._guideSelector=e.guideSelector,this._testSelector=e.testSelector,this._shouldShow=e.shouldShow,this._parentModel=e.parentModel}addChild(e){this.children.push(e),e.setParent(this)}addChildren(...e){e.forEach(e=>{this.addChild(e)})}hasSubmenus(){return"#"===this._href}get parent(){return this._parent}set parent(e){this._parent=e}get order(){return this._order}set order(e){this._order=e}get label(){return this._label}set label(e){this._label=e}get labelKey(){return this._labelKey}set labelKey(e){this._labelKey=e}get documentationHref(){return this._documentationHref}set documentationHref(e){this._documentationHref=e}get href(){return this._href}set href(e){this._href=e}get children(){return this._children}set children(e){this._children=e}get hasParent(){return this._hasParent}set hasParent(e){this._hasParent=e}get selected(){return this._selected}set selected(e){this._selected=e}get open(){return this._open}set open(e){this._open=e}get hrefFun(){return this._hrefFun}set hrefFun(e){this._hrefFun=e}get editions(){return this._editions}set editions(e){this._editions=e}get icon(){return this._icon}set icon(e){this._icon=e}get role(){return this._role}set role(e){this._role=e}get guideSelector(){return this._guideSelector}set guideSelector(e){this._guideSelector=e}get testSelector(){return this._testSelector}set testSelector(e){this._testSelector=e}get parentModel(){return this._parentModel}set parentModel(e){this._parentModel=e}get shouldShow(){return this._shouldShow}set shouldShow(e){this._shouldShow=e}setParent(e){this.parentModel=e,this.hasParent=!!e}}const X=G.logger;class tt{static map(e,t){const o=new q;return tt.setTopLevelMenuItems(e,o,t),tt.setSubmenuItems(e,o,t),o.sorted()}static setTopLevelMenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>!e.parent&&e.shouldShow).forEach(e=>{t.hasParent(e.label)?X.warn("Doubled parent definition: ",e):t.addItem(this.toMenuItemModel(e,void 0,o,e.children))})})}static setSubmenuItems(e,t,o){e.forEach(e=>{e.items.filter(e=>e.parent&&e.shouldShow).forEach(e=>{const i=t.getTopLevelItem(e.parent);null==i||i.addChildren(this.toMenuItemModel(e,i,o,e.children))})})}static toMenuItemModel(e,t,o,i=[]){let n;e.documentationHref&&(n=R.resolveDocumentationUrl(null==o?void 0:o.shortVersion,e.documentationHref));const s=new V({label:e.label,labelKey:e.labelKey,href:n||e.href,documentationHref:e.documentationHref,hrefFun:e.hrefFun,order:e.order,role:e.role,editions:e.editions,icon:e.icon,guideSelector:e.guideSelector,hasParent:!!t,parentModel:t,parent:e.parent,selected:!1,shouldShow:e.shouldShow,testSelector:e.testSelector}),r=i.map(e=>this.toMenuItemModel(e,s,o,e.children));return s.addChildren(...r),s}}const et="menu.buttons.expand",ot="menu.buttons.collapse",it="menu.logo.link.title",nt=class{constructor(e){t(this,e),this.navbarToggled=i(this,"navbarToggled"),this.productInfoContextService=a.get(p),this.subscriptions=new r,this.resizeHandler=()=>this.adjustAllSubmenus(this.hostElement),this.SUBMENU_VERTICAL_MARGIN=8,this.MIN_SUBMENU_HEIGHT=100,this.labels={[et]:H.translate(et),[ot]:H.translate(ot),[it]:H.translate(it)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new Q(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=tt.map(e||[],this.productInfo);t.initSelected(T()),this.menuModel=t}select(e,t){e.preventDefault(),this.clearAllOpenedSubmenuStyles(),t.hasSubmenus()||(e.ctrlKey?j(t.href):O(t.href)),t.children.length?t.open?(this.menuModel.closeAll(),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.selectItem(t)):(this.menuModel.closeOpened(),this.menuModel.open(t),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.deselectItem(t)):this.menuModel.closeOtherParents(t),this.isCollapsed&&this.menuModel.isParentOpened(t)&&this.menuModel.closeOpened(),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement)}subscribeToNavigationEnd(){this.subscriptions.add(a.get(M).subscribe(S.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),z()||this.menuModel.initSelected(T()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement))}toggleNavbar(){this.isCollapsed?(this.isCollapsedByUser=!1,this.menuModel.expandSelected(),this.menuModel.unhighlightSelected(),this.expandNavbar(),this.clearAllOpenedSubmenuStyles()):(this.isCollapsedByUser=!0,this.menuModel.highlightSelected(),this.menuModel.closeOpened(),this.collapseNavbar(),this.clearAllOpenedSubmenuStyles()),this.refreshNavbar(),this.adjustAllSubmenus(this.hostElement),this.navbarToggled.emit(new Q(this.isCollapsed))}collapseNavbar(){this.hostElement.querySelector(".navbar-component").classList.add("collapsed"),this.isCollapsed=!0}expandNavbar(){this.isCollapsedByUser||(this.hostElement.querySelector(".navbar-component").classList.remove("collapsed"),this.isCollapsed=!1)}refreshNavbar(){var e;(null===(e=this.menuModel)||void 0===e?void 0:e.items)&&(this.menuModel=new q(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(H.onTranslate(e,[],t=>{this.labels[e]=t,this.onLanguageChanged()}))}toggleNavbarHandler(){return()=>this.toggleNavbar()}adjustSubmenuMaxHeight(e,t=this.SUBMENU_VERTICAL_MARGIN){if(!e||"function"!=typeof e.getBoundingClientRect)return;const o=e.closest(".menu-element");if(!o)return;const i=e.getBoundingClientRect(),n=o.getBoundingClientRect(),s=window.innerHeight,r=n.top-t+n.height,a=s-n.bottom+n.height-t;let l,c=!1;a>=i.height?l=a:r>=i.height?(l=r,c=!0):a>r?(l=a,c=!1):(l=r,c=!0),c?(e.style.bottom="0",e.style.top="auto"):(e.style.top="0",e.style.bottom="auto"),e.style.maxHeight=`${Math.max(this.MIN_SUBMENU_HEIGHT,l)}px`,e.style.overflowY="auto"}adjustAllSubmenus(e,t=this.SUBMENU_VERTICAL_MARGIN){requestAnimationFrame(()=>{e&&"function"==typeof e.querySelectorAll&&this.getAllOpenedSubmenus(e).forEach(e=>this.adjustSubmenuMaxHeight(e,t))})}getAllOpenedSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component.collapsed .menu-element.open .sub-menu"))}getAllSubmenus(e){return Array.from(e.querySelectorAll(".navbar-component .menu-element .sub-menu"))}clearAllOpenedSubmenuStyles(){this.getAllSubmenus(this.hostElement).forEach(e=>{e.style.maxHeight="",e.style.overflowY="",e.style.top="",e.style.bottom=""})}componentWillLoad(){this.init(this.menuItems)}connectedCallback(){this.subscribeToNavigationEnd(),this.subscribeToProductInfoChanges(),this.onTranslate(et),this.onTranslate(ot),this.onTranslate(it),window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){this.subscriptions.unsubscribeAll(),window.removeEventListener("resize",this.resizeHandler)}handleSelectMenuItem(e){return t=>{this.select(t,e)}}render(){if(this.menuModel)return e(o,null,e("ul",{class:"navbar-component"},e("li",{class:"brand"},e("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[et]:this.labels[ot],onClick:this.toggleNavbarHandler()},e("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),e("a",{class:"menu-element-root home-page",onClick:_("./")},e("svg",{class:"big-logo"},e("desc",null,this.labels[it]),e("use",{href:"assets/graphdb-logo.svg#Layer_1"})),e("svg",{class:"small-logo"},e("desc",null,this.labels[it]),e("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(t=>e("li",{key:t.labelKey,class:{"menu-element":!0,open:t.open},"data-test":t.testSelector,"guide-selector":t.guideSelector},t.children.length>0&&e(n,null,e("div",{class:{"menu-element-root":!0,active:t.selected},onClick:this.handleSelectMenuItem(t)},e("span",{class:`menu-item-icon ${t.icon}`})," ",e("translate-label",{class:"menu-item",labelKey:t.labelKey})),e("ul",{class:"sub-menu"},e("li",{key:t.labelKey,class:"submenu-title"},e("translate-label",{labelKey:t.labelKey})),t.children.map(t=>e("li",{key:t.labelKey,class:{"sub-menu-item":!0,active:t.selected},"data-test":t.testSelector,"guide-selector":t.guideSelector},e("a",t.documentationHref?{class:"sub-menu-link external-link",href:t.href,target:"_blank",rel:"noopener noreferrer"}:{class:"sub-menu-link",href:t.href,onClick:this.handleSelectMenuItem(t)},e("translate-label",{class:"menu-item",labelKey:t.labelKey}),t.icon&&e("span",{class:`text-muted ${t.icon}`})))))),0===t.children.length&&e("a",{class:{"menu-element-root":!0,active:t.selected},href:t.href,onClick:this.handleSelectMenuItem(t)},e("span",{class:`menu-item-icon ${t.icon}`})," ",e("translate-label",{class:"menu-item",labelKey:t.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return s(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};nt.style=':host{display:block}.navbar-component{width:15rem;position:fixed;font-weight:400;z-index:1010;margin:0;padding:0;-moz-transition:width 0.2s ease-in;-o-transition:width 0.2s ease-in;-webkit-transition:width 0.2s ease-in;transition:width 0.2s ease-in;height:100%;overflow-y:auto;overflow-x:hidden}@media screen and (max-height: 475px){.navbar-component.collapsed{position:absolute}}.navbar-component li{list-style:none;cursor:pointer}.navbar-component li a{text-decoration:none}.navbar-component li a.sub-menu-link:not([href=""]):not([tabindex]):hover{text-decoration:none !important}.navbar-component .sub-menu-item a.sub-menu-link:not([href]) translate-label.menu-item{padding-right:3.5px}.navbar-component a.sub-menu-link:not([href]):hover .menu-item,.navbar-component a.sub-menu-link[href=""]:hover .menu-item{text-decoration-line:underline !important}.navbar-component li .menu-element-root:hover,.navbar-component .sub-menu li:hover{text-decoration-line:none !important}.navbar-component li .menu-element-root:hover .menu-item-icon,.navbar-component .menu-element.open .menu-item-icon{transform:scale(1.1)}.navbar-component .menu-element.open .sub-menu .menu-item-icon{transform:scale(0.5)}.navbar-component .menu-element{position:relative}.navbar-component .menu-element-root{padding:0.8em 2.5em 0.8em 0.8em;display:block;line-height:2.5rem;position:relative;z-index:100;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.navbar-component .menu-item-icon{font-size:2.5rem;width:2.5rem;vertical-align:middle;text-align:center;transform:scale(0.9);display:inline-block;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;pointer-events:none}.navbar-component .menu-element-root .menu-item{pointer-events:none}.navbar-component .menu-element-root.active,.navbar-component .menu-element-root.active:hover{background-color:var(--gw-sidenav-submenuitem-active-background);color:#ffffff}.navbar-component .active .menu-item-icon{transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .sub-menu{position:relative;padding:0;z-index:110}.navbar-component .sub-menu li{display:none}.navbar-component .sub-menu li a{padding:0.5em 0.8em;display:block}.navbar-component .sub-menu li.active a{font-weight:500}.navbar-component .menu-element.open ul li{display:block}.navbar-component .menu-element ul:before,.rdf-list ul.datasource:before{font-family:"icomoon", sans-serif !important;content:"\\e921";display:block;font-size:1.5em;position:absolute;top:-3.3rem;right:1rem;-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;pointer-events:none}.navbar-component .menu-element.open ul:before,.rdf-list ul.open.datasource:before{transform:rotate(180deg)}.navbar-component.collapsed{width:4.375rem;overflow:visible;height:auto}.navbar-component.collapsed .menu-element.open .sub-menu{position:absolute;top:0;left:4.375rem;width:15rem}.navbar-component.collapsed .menu-element .menu-item,.navbar-component.collapsed .menu-element .sub-menu li{display:none}.navbar-component.collapsed .menu-element.open .menu-item,.navbar-component.collapsed .menu-element.open .sub-menu li{display:block}.navbar-component.collapsed .menu-element.open .menu-element-root .menu-item{display:none}.navbar-component.collapsed .menu-element-root{overflow:visible}.navbar-component .menu-element.open ul li.submenu-title,.navbar-component .submenu-title{display:none}.navbar-component.collapsed .menu-element.open ul li.submenu-title{display:block;font-size:1.2em;font-weight:500;text-overflow:ellipsis;overflow:hidden;padding:0.5em 0.8rem 0.2em 0;margin-left:0.8rem;margin-bottom:0.5em}.navbar-component.collapsed .menu-element.open .sub-menu.align-bottom{bottom:0;top:auto}.navbar-component.collapsed .menu-element ul:before{display:none}.navbar-component.collapsed .brand a{padding:0.4rem}.navbar-component.collapsed .small-logo,.navbar-component .big-logo{display:block}.navbar-component .small-logo,.navbar-component.collapsed .big-logo{display:none}.navbar-component .brand{background-color:var(--gw-sidenav-logo-background)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.toggle-menu{display:block;position:absolute;top:0;right:0;font-size:0.8em;line-height:1.5;padding:0 0.3em;z-index:10;cursor:pointer;background-color:var(--gw-sidenav-collapsebutton-background);color:var(--gw-sidenav-collapsebutton-color)}.toggle-menu:hover{color:var(--gw-sidenav-collapsebutton-hover-color);background-color:var(--gw-sidenav-collapsebutton-hover-background)}.toggle-menu [class^=icon-]{transition:all 0.2s ease-in;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.navbar-component .menu-element .menu-element-root{background-color:var(--gw-sidenav-menuitem-background);color:var(--gw-sidenav-menuitem-color)}.navbar-component .menu-element .menu-element-root:hover{background-color:var(--gw-sidenav-menuitem-hover-background);color:var(--gw-sidenav-menuitem-hover-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon{color:var(--gw-sidenav-menuitem-icon-color)}.navbar-component .menu-element .menu-element-root .menu-item-icon:hover{color:var(--gw-sidenav-menuitem-hover-icon-color)}.navbar-component .menu-element.open .menu-element-root{background-color:var(--gw-sidenav-menuitem-selected-background);color:var(--gw-sidenav-menuitem-selected-color)}.navbar-component .menu-element .menu-element-root.active{background-color:var(--gw-sidenav-menuitem-active-background);color:var(--gw-sidenav-menuitem-active-color)}.navbar-component .menu-element .menu-element-root.active .menu-item-icon{color:var(--gw-sidenav-menuitem-active-icon-color)}.navbar-component .menu-element .sub-menu-item,.navbar-component .menu-element .sub-menu{background-color:var(--gw-sidenav-submenuitem-background);color:var(--gw-sidenav-submenuitem-color)}.navbar-component .menu-element .sub-menu-item:hover{background-color:var(--gw-sidenav-submenuitem-hover-background);color:var(--gw-sidenav-submenuitem-hover-color)}.navbar-component .menu-element .sub-menu-item.active,.navbar-component .menu-element .sub-menu-item.active .sub-menu-link{background-color:var(--gw-sidenav-submenuitem-active-background);color:var(--gw-sidenav-submenuitem-active-color)}';const st={[E.INFO]:"ri-information-2-fill",[E.SUCCESS]:"ri-checkbox-circle-line",[E.WARNING]:"ri-message-line",[E.ERROR]:"ri-alert-line"},rt=class{constructor(e){t(this,e),this.toasts=new P([]),this.toastToTimeout=new Map,this.config=F.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var t;return e("section",{key:"57fcc0103bbc130bee6043a37c7c3539b8eb3c5a",style:{display:this.toasts.isEmpty()?"none":"flex"},class:`onto-toastr-container ${this.config.position}`},null===(t=this.toasts)||void 0===t?void 0:t.getItems().map(t=>e("div",{class:`onto-toast ${t.type}`,key:t.id,onMouseEnter:this.onToastMouseEnter(t),onMouseLeave:this.onToastMouseLeave(t)},e("i",{class:`${st[t.type]}`}),e("span",{onClick:this.handleToastClick(t),class:"toast-message",innerHTML:K(t.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=m.getWindow().setTimeout(()=>{this.toasts.remove(e),this.clearToastTimeout(e)},(null===(t=e.config)||void 0===t?void 0:t.timeout)||this.config.timeout);this.toastToTimeout.set(e,o)}updateToastrReference(){this.toasts=new P(this.toasts.getItems())}clearToastTimeout(e){const t=this.toastToTimeout.get(e);clearTimeout(t),this.toastToTimeout.delete(e),this.updateToastrReference()}handleToastClick(e){return t=>{var o,i;(null===(o=e.config)||void 0===o?void 0:o.onClick)&&e.config.onClick(t),(null===(i=e.config)||void 0===i?void 0:i.removeOnClick)&&(this.toasts.remove(e),this.clearToastTimeout(e))}}};rt.style=".onto-toastr-container{position:fixed;z-index:9999999;pointer-events:auto;flex-direction:column}.onto-toastr-container.bottom-right{bottom:12px;right:12px}.onto-toastr-container.bottom-left{bottom:12px;left:12px}.onto-toastr-container .onto-toast{display:flex;align-items:center;border-radius:0;box-shadow:0 0 12px rgba(0, 0, 0, 0.3);position:relative;width:450px;padding:25px 0;color:white;margin-bottom:5px;overflow-wrap:break-word}.onto-toastr-container .onto-toast:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.onto-toastr-container .onto-toast.warning{color:var(--gw-toast-warn-color);background-color:var(--gw-toast-warn-background);border-color:var(--gw-toast-warn-border-color)}.onto-toastr-container .onto-toast.success{background-color:var(--gw-toast-success-background);border-color:var(--gw-toast-success-border-color);color:var(--gw-toast-success-color)}.onto-toastr-container .onto-toast.error{background-color:var(--gw-toast-error-background);border-color:var(--gw-toast-error-border-color);color:var(--gw-toast-error-color)}.onto-toastr-container .onto-toast.info{background-color:var(--gw-toast-info-background);border-color:var(--gw-toast-info-border-color);color:var(--gw-toast-info-color)}.onto-toastr-container .onto-toast i{font-size:1.8rem;padding:0 20px;color:inherit}.onto-toastr-container .onto-toast i:hover{transform:none}.onto-toastr-container .onto-toast .toast-message{font-size:1.2rem;opacity:1;max-width:370px}";const at=class{constructor(e){t(this,e),this.clearTooltipsForRemovedElements=e=>{for(const t of e)for(const e of Array.from(t.removedNodes))if(this.removeTooltipFromNode(e))return},this.removeTooltipFromNode=e=>{if(e instanceof HTMLElement){if(Y.getTooltipInstance(e))return Y.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=Y.getTooltipTarget(e.target);if(!t)return;const o=Y.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=Y.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=Y.getTooltipInstance(t);e&&"manual"===e.props.trigger&&Y.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return e(o,{key:"9b797bae73df060bdecef74fb84a90fb61ac6eef"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};at.style='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light-border]{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#333;box-shadow:0 4px 14px -2px rgba(0,8,16,.08)}.tippy-box[data-theme~=light-border]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light-border]>.tippy-arrow:after,.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{content:"";position:absolute;z-index:-1}.tippy-box[data-theme~=light-border]>.tippy-arrow:after{border-color:transparent;border-style:solid}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after{border-top-color:rgba(0,8,16,.2);border-width:7px 7px 0;top:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg{top:16px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after{top:17px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff;bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after{border-bottom-color:rgba(0,8,16,.2);border-width:0 7px 7px;bottom:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after{bottom:17px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after{border-left-color:rgba(0,8,16,.2);border-width:7px 0 7px 7px;left:17px;top:1px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg{left:11px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after{left:12px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff;right:16px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after{border-width:7px 7px 7px 0;right:17px;top:1px;border-right-color:rgba(0,8,16,.2)}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg{right:11px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after{right:12px}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);background-size:16px 6px;width:16px;height:6px}:host{display:block}.tippy-box[data-theme=onto-tooltip]{color:var(--gw-tooltip-color);background-color:var(--gw-tooltip-background);border-radius:0}.tippy-box[data-theme=onto-tooltip] .tippy-arrow{color:var(--gw-tooltip-background)}';export{Z as onto_footer,U as onto_header,nt as onto_navbar,rt as onto_toastr,at as onto_tooltip};
|