`}drawHeader(){var t;const e=(t=this.config)==null?void 0:t.navigation;return e?_``:""}render(){return _`${this.drawHeader()} ${this.drawMobileMenu()}`}},N=new WeakMap,H=new WeakMap,L=new WeakMap,Se);R.styles=Ne`
+ */const xe=st(class extends ot{constructor(r){var e;if(super(r),r.type!==rt.ATTRIBUTE||r.name!=="class"||((e=r.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var i,n;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((i=this.st)!=null&&i.has(s))&&this.it.add(s);return this.render(e)}const t=r.element.classList;for(const s of this.it)s in e||(t.remove(s),this.it.delete(s));for(const s in e){const o=!!e[s];o===this.it.has(s)||(n=this.st)!=null&&n.has(s)||(o?(t.add(s),this.it.add(s)):(t.remove(s),this.it.delete(s)))}return T}});function at(r){for(var e=[],t=0;t=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){n+=r[s++];continue}break}if(!n)throw new TypeError("Missing parameter name at ".concat(t));e.push({type:"NAME",index:t,value:n}),t=s;continue}if(i==="("){var l=1,a="",s=t+1;if(r[s]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s)?(?!\?)/g,i=0,n=t.exec(r.source);n;)e.push({name:n[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),n=t.exec(r.source);return r}function ut(r,e,t){var i=r.map(function(n){return Ue(n,e,t).source});return new RegExp("(?:".concat(i.join("|"),")"),Oe(t))}function pt(r,e,t){return ft(lt(r,t),e,t)}function ft(r,e,t){t===void 0&&(t={});for(var i=t.strict,n=i===void 0?!1:i,s=t.start,o=s===void 0?!0:s,l=t.end,a=l===void 0?!0:l,h=t.encode,c=h===void 0?function(re){return re}:h,d=t.delimiter,f=d===void 0?"/#?":d,p=t.endsWith,$=p===void 0?"":p,M="[".concat(U($),"]|$"),b="[".concat(U(f),"]"),m=o?"^":"",z=0,I=r;z-1:E===void 0;n||(m+="(?:".concat(b,"(?=").concat(M,"))?")),ne||(m+="(?=".concat(b,"|").concat(M,")"))}return new RegExp(m,Oe(t))}function Ue(r,e,t){return r instanceof RegExp?dt(r,e):Array.isArray(r)?ut(r,e,t):pt(r,e,t)}var gt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,J=(r,e,t,i)=>{for(var n=i>1?void 0:i?mt(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&>(e,t,n),n};async function vt(r){return fetch(r).then(e=>e.json())}var N,H,L,Se;let R=(Se=class extends W{constructor(){super(...arguments);G(this,N,void 0);G(this,H,void 0);G(this,L,void 0);S(this,N,"https://qgis.github.io/qgis-uni-navigation/nav-config.json"),S(this,H,1024),S(this,L,""),this.config=null,this.logo=null}get src(){return X(this,N)}set src(e){S(this,N,e)}get breakpoint(){return X(this,H)}set breakpoint(e){S(this,H,e)}get locationPrefix(){return X(this,L)}set locationPrefix(e){S(this,L,e)}async connectedCallback(){super.connectedCallback();const e=await vt(this.src);this.config=e,this.getAttribute("data-screen")!=="mobile"&&(this.handleWindowResize(),window.addEventListener("resize",this.handleWindowResize.bind(this)))}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize.bind(this)),super.disconnectedCallback()}handleWindowResize(){if(!this.breakpoint)return;window.innerWidth`:""}checkActive(e){return e?!!ct(e,{decode:decodeURIComponent})(window.location.pathname):!1}drawMenu(e=[],t=!0){return e?_`${e.map(i=>{switch(i.type){case"link":const n=i.settings.href.startsWith("https"),s=xe({link:!0,active:this.checkActive(i.settings.activeTest),external:n});if(n)return _`${i.settings.name}`;const o=this.locationPrefix+i.settings.href;return _`${i.settings.name}`;case"menu":const l=xe({menu:!0,"top-level":t});return _`