graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 40.8 kB
JavaScript
export const __webpack_id__=7815;export const __webpack_ids__=[7815];export const __webpack_modules__={7815:(e,t,o)=>{o.r(t),o.d(t,{onto_footer:()=>c,onto_header:()=>d,onto_navbar:()=>S,onto_toastr:()=>x,onto_tooltip:()=>C});var i=o(87848),s=o(57154),n=o(79939),r=o(81491),a=o(87050),l=o(90835);o(44123);const c=class{constructor(e){(0,i.r)(this,e),this.subscriptions=new s.SubscriptionList,this.currentYear=(new Date).getFullYear(),this.securityContextService=s.ServiceProvider.get(s.SecurityContextService),this.licenseContextService=s.ServiceProvider.get(s.LicenseContextService),this.cookieService=s.ServiceProvider.get(s.CookieService)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var e,t,o,s;return(0,i.h)(i.a,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},(0,i.h)("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},(0,i.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," • ",(0,i.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===(s=this.productInfo)||void 0===s?void 0:s.workbench," • © 2002–",this.currentYear," ",(0,i.h)("a",{key:"20e70771852b0c504e86e36a1b9fdb9b61d5963c",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",(0,i.h)("translate-label",{key:"8df55b8d224ae50ca9de3fd038c0285ee01b4ff3",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&(0,i.h)("onto-cookie-consent",{key:"80f9c1af70db76ef4c6680dacf7022eb1262f049"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(s.ServiceProvider.get(s.ProductInfoContextService).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return s.ServiceProvider.get(s.LicenseService).isTrackableLicense()&&!s.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 s.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()}))}};c.style=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}";const h=({repository:e})=>(0,i.h)("div",{class:"repository-selector-dropdown-item"},(0,i.h)("i",{class:"item-icon icon-repo-"+e.type}),(0,i.h)("div",{class:"item-label"},(0,i.h)("div",{class:"repository-id"},e.id),(0,i.h)("div",{class:"repository-location"},e.location?e.location:"Local"))),d=class{constructor(e){(0,i.r)(this,e),this.monitoringService=s.ServiceProvider.get(s.MonitoringService),this.repositoryContextService=s.ServiceProvider.get(s.RepositoryContextService),this.repositoryLocationContextService=s.ServiceProvider.get(s.RepositoryLocationContextService),this.repositoryService=s.ServiceProvider.get(s.RepositoryService),this.securityContextService=s.ServiceProvider.get(s.SecurityContextService),this.toastrService=s.ServiceProvider.get(s.OntoToastrService),this.namespacesService=s.ServiceProvider.get(s.NamespacesService),this.namespaceContextService=s.ServiceProvider.get(s.NamespacesContextService),this.languageService=s.ServiceProvider.get(s.LanguageService),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new s.FibonacciGenerator,this.authService=s.ServiceProvider.get(s.AuthenticationService),this.eventService=s.ServiceProvider.get(s.EventService),this.shouldShowSearch=!0,this.isHomePage=(0,s.isHomePage)(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new s.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(n.T.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,r.H.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:a.R.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=(0,s.getCurrentRoute)(),this.startOperationPolling()}render(){var e,t,o,s,n,r;return(0,i.h)(i.a,{key:"8222e10554a901e025c47424aea4b6294f240ea4"},(0,i.h)("div",{key:"8a0b771d5dbddcb7acff61e7a436d2e4a097277f",class:"header-component"},(0,i.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"}}),(0,i.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)?(0,i.h)("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(t=this.license)||void 0===t?void 0:t.valid)?(0,i.h)("onto-license-alert",{license:this.license}):"",(0,i.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===(s=this.securityConfig)||void 0===s?void 0:s.userLoggedIn)?(0,i.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?(0,i.h)("onto-user-login",null):"",(0,i.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(s.ServiceProvider.get(s.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(s.EventName.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=(0,s.isHomePage)(),this.currentRoute=(0,s.getCurrentRoute)()}))}subscribeToLanguageChanged(){this.subscriptions.add(s.ServiceProvider.get(s.LanguageContextService).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new s.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 a.D).setName((0,i.h)(h,{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=s.WindowService.getWindow().setInterval(()=>{this.authService.isAuthenticated()?this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.currentRepository&&this.monitoringService.getOperations(this.currentRepository.id).then(e=>{s.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"===(0,s.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})}};d.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 p{constructor(e){this.type="navbarToggled",this.payload=e}}class u{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 m(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 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(u.compare)}),this._items.sort(u.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 m{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 b=n.L.logger;class g{static map(e,t){const o=new u;return g.setTopLevelMenuItems(e,o,t),g.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)?b.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=s.UriUtil.resolveDocumentationUrl(null==o?void 0:o.shortVersion,e.documentationHref));const r=new m({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}),a=i.map(e=>this.toMenuItemModel(e,r,o,e.children));return r.addChildren(...a),r}}const v="menu.buttons.expand",f="menu.buttons.collapse",y="menu.logo.link.title",S=class{constructor(e){(0,i.r)(this,e),this.navbarToggled=(0,i.c)(this,"navbarToggled"),this.productInfoContextService=s.ServiceProvider.get(s.ProductInfoContextService),this.subscriptions=new s.SubscriptionList,this.resizeHandler=()=>this.adjustAllSubmenus(this.hostElement),this.SUBMENU_VERTICAL_MARGIN=8,this.MIN_SUBMENU_HEIGHT=100,this.labels={[v]:n.T.translate(v),[f]:n.T.translate(f),[y]:n.T.translate(y)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new p(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=g.map(e||[],this.productInfo);t.initSelected((0,s.getCurrentRoute)()),this.menuModel=t}select(e,t){e.preventDefault(),this.clearAllOpenedSubmenuStyles(),t.hasSubmenus()||(0,s.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(s.ServiceProvider.get(s.EventService).subscribe(s.EventName.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),(0,s.isHomePage)()||this.menuModel.initSelected((0,s.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 p(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 u(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(n.T.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(v),this.onTranslate(f),this.onTranslate(y),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(0,i.h)(i.a,null,(0,i.h)("ul",{class:"navbar-component"},(0,i.h)("li",{class:"brand"},(0,i.h)("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[v]:this.labels[f],onClick:this.toggleNavbarHandler()},(0,i.h)("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),(0,i.h)("a",{class:"menu-element-root home-page",onClick:(0,s.navigateTo)("./")},(0,i.h)("svg",{class:"big-logo"},(0,i.h)("desc",null,this.labels[y]),(0,i.h)("use",{href:"assets/graphdb-logo.svg#Layer_1"})),(0,i.h)("svg",{class:"small-logo"},(0,i.h)("desc",null,this.labels[y]),(0,i.h)("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(e=>(0,i.h)("li",{key:e.labelKey,class:{"menu-element":!0,open:e.open},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.children.length>0&&(0,i.h)(i.F,null,(0,i.h)("div",{class:{"menu-element-root":!0,active:e.selected},onClick:this.handleSelectMenuItem(e)},(0,i.h)("span",{class:`menu-item-icon ${e.icon}`})," ",(0,i.h)("translate-label",{class:"menu-item",labelKey:e.labelKey})),(0,i.h)("ul",{class:"sub-menu"},(0,i.h)("li",{key:e.labelKey,class:"submenu-title"},(0,i.h)("translate-label",{labelKey:e.labelKey})),e.children.map(e=>(0,i.h)("li",{key:e.labelKey,class:{"sub-menu-item":!0,active:e.selected},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.documentationHref?(0,i.h)("a",{class:"sub-menu-link external-link",href:e.href,target:"_blank",rel:"noopener noreferrer"},(0,i.h)("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&(0,i.h)("span",{class:`text-muted ${e.icon}`})):(0,i.h)("a",{class:"sub-menu-link",href:e.href,onClick:this.handleSelectMenuItem(e)},(0,i.h)("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&(0,i.h)("span",{class:`text-muted ${e.icon}`})))))),0===e.children.length&&(0,i.h)("a",{class:{"menu-element-root":!0,active:e.selected},href:e.href,onClick:this.handleSelectMenuItem(e)},(0,i.h)("span",{class:`menu-item-icon ${e.icon}`})," ",(0,i.h)("translate-label",{class:"menu-item",labelKey:e.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return(0,i.g)(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};S.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{color:var(--gw-sidenav-menuitem-icon-color);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:not([href]):not([tabindex]),.navbar-component a:not([href]):not([tabindex]):focus,.navbar-component a:not([href]):not([tabindex]):hover{color:var(--gw-sidenav-menuitem-icon-color)}.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{background-color:var(--gw-sidenav-menuitem-background);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;color:var(--gw-sidenav-menuitem-color);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;color:var(--gw-sidenav-menuitem-icon-color);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:var(--gw-sidenav-menuitem-active-color)}.navbar-component .active .menu-item-icon{color:var(--gw-sidenav-menuitem-active-icon-color);transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand{background-color:var(--gw-sidenav-logo-background)}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .menu-element.open,.navbar-component.collapsed .menu-element:hover{background-color:var(--gw-sidenav-submenuitem-highlight-background)}.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;color:var(--gw-sidenav-submenuitem-color)}.navbar-component .sub-menu li.active a{background-color:var(--gw-sidenav-submenuitem-active-background);font-weight:500;color:var(--gw-sidenav-submenuitem-active-color)}.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)}.toggle-menu{display:block;position:absolute;top:0;right:0;color:var(--gw-sidenav-collapsebutton-color);font-size:0.8em;line-height:1.5;padding:0 0.3em;background-color:var(--gw-sidenav-collapsebutton-background);z-index:10;cursor:pointer}.toggle-menu:hover{color:var(--gw-sidenav-collapsebutton-hover-color);background-color:var(--gw-sidenav-collapsebutton-hover-background)}.toggle-menu [class^=icon-]{-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;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.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;background-color:var(--gw-sidenav-submenuitem-highlight-background);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;color:var(--gw-sidenav-submenuitem-color);margin-left:0.8rem;margin-bottom:0.5em}.navbar-component .sub-menu li.submenu-title:hover{background-color:transparent}.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}';const w={[s.ToastType.INFO]:"fa-circle-info",[s.ToastType.SUCCESS]:"fa-circle-check",[s.ToastType.WARNING]:"fa-message-lines",[s.ToastType.ERROR]:"fa-triangle-exclamation"},x=class{constructor(e){(0,i.r)(this,e),this.toasts=new s.ToastMessageList([]),this.toastToTimeout=new Map,this.config=s.ToastrConfig.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var e;return(0,i.h)("section",{key:"82f87d92df2a596a810484d829b155cd74383013",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=>(0,i.h)("div",{class:`onto-toast ${e.type}`,key:e.id,onMouseEnter:this.onToastMouseEnter(e),onMouseLeave:this.onToastMouseLeave(e)},(0,i.h)("i",{class:`fa-regular ${w[e.type]}`}),(0,i.h)("span",{onClick:this.handleToastClick(e),class:"toast-message",innerHTML:(0,n.s)(e.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=s.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 s.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))}}};x.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{background-color:var(--gw-toast-warn-background, #A92B0A)}.onto-toastr-container .onto-toast.success{background-color:var(--gw-toast-success-background, #01544D)}.onto-toastr-container .onto-toast.error{background-color:var(--gw-toast-error-background, #B71C1C)}.onto-toastr-container .onto-toast.info{background-color:var(--gw-toast-info-background, #004177)}.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 C=class{constructor(e){(0,i.r)(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(l.T.getTooltipInstance(e))return l.T.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=l.T.getTooltipTarget(e.target);if(!t)return;const o=l.T.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=l.T.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=l.T.getTooltipInstance(t);e&&"manual"===e.props.trigger&&l.T.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return(0,i.h)(i.a,{key:"9b797bae73df060bdecef74fb84a90fb61ac6eef"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};C.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)}'},81491:(e,t,o)=>{o.d(t,{H:()=>s});const i='button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';class s{static setDocumentBodyOverflow(e){const t=document.body.style.overflow;return document.body.style.overflow=e,t}static hideDocumentBodyOverflow(){return s.setDocumentBodyOverflow("hidden")}static focusNextElement(e,t=i){const o=Array.from(e.querySelectorAll(t));if(o.length>0){const e=o.indexOf(document.activeElement),t=o[(e+1)%o.length];t&&t.focus()}}static focusPreviousElement(e,t=i){const o=Array.from(e.querySelectorAll(t));if(o.length>0){const e=o.indexOf(document.activeElement),t=o[(e-1+o.length)%o.length];t&&t.focus()}}static preventLeavingDialog(e,t){"Tab"===t.key&&(t.preventDefault(),t.shiftKey?s.focusPreviousElement(e):s.focusNextElement(e))}static focusElement(e){const t=document.querySelector(e);null==t||t.focus()}static scrollElementIntoView(e,t={block:"nearest"}){const o=document.querySelector(e);o&&o.scrollIntoView(t)}static waitForElement(e){return new Promise((t,o)=>{const i=new MutationObserver(()=>{try{const o=document.querySelector(e);o&&(i.disconnect(),t(o))}catch(e){i.disconnect(),o(e)}});i.observe(document.body,{subtree:!0,childList:!0,attributes:!0})})}}},87050:(e,t,o)=>{o.d(t,{D:()=>i,R:()=>s});class i{constructor(){this._dropdownTooltipTrigger="manual"}get name(){return this._name}setName(e){return this._name=e,this}get nameLabelKey(){return this._nameLabelKey}setNameLabelKey(e){return this._nameLabelKey=e,this}get tooltip(){return this._tooltip}setTooltip(e){return this._tooltip=e,this}get tooltipLabelKey(){return this._tooltipLabelKey}setTooltipLabelKey(e){return this._tooltipLabelKey=e,this}get iconClass(){return this._iconClass}setIconClass(e){return this._iconClass=e,this}get value(){return this._value}setValue(e){return this._value=e,this}get dropdownTooltipTrigger(){return this._dropdownTooltipTrigger}setDropdownTooltipTrigger(e){return this._dropdownTooltipTrigger=e,this}get cssClass(){return this._cssClass}setCssClass(e){return this._cssClass=e,this}get guideSelector(){return this._guideSelector}setGuideSelector(e){return this._guideSelector=e,this}}var s;!function(e){e.SUGGESTION_SELECTED_EVENT="suggestion-selected-event",e.TABLE_VIEW="table",e.VISUAL_VIEW="visual",e.RDF_SEARCH_ICON_CLICKED="rdfSearchIconClicked"}(s||(s={}))}};
//# sourceMappingURL=7815.683f89ab170521aa8b16.bundle.js.map