@kartverket/geonorge-web-components 4.0.10 → 4.0.12
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/DownloadItem.js +1 -1
- package/DownloadItem.js.map +1 -1
- package/GeonorgeFooter.js +1 -1
- package/GeonorgeFooter.js.map +1 -1
- package/GnShortcutButton.js +1 -1
- package/GnShortcutButton.js.map +1 -1
- package/MainMenu.js +1 -1
- package/MainMenu.js.map +1 -1
- package/MainNavigation.js +1 -1
- package/MainNavigation.js.map +1 -1
- package/MainSearchField.js +1 -1
- package/MainSearchField.js.map +1 -1
- package/MapItem.js +1 -1
- package/MapItem.js.map +1 -1
- package/UserAccount.js +1 -1
- package/UserAccount.js.map +1 -1
- package/config.d.ts +9 -0
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/MainMenu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.MainMenu=t())}(self,(()=>(()=>{var e={1753(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var i=n(5052),o=n.n(i),r=n(164),s=n.n(r)()(o());s.push([e.id,'*{box-sizing:border-box}button.menu-toggle-button{border:none;background-color:rgba(0,0,0,0);color:#403f3f;cursor:pointer;width:40px;height:32px;display:flex;gap:6px;align-items:center}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:98px;background-color:rgba(0,0,0,0);color:#403f3f}}button.menu-toggle-button.open{background-color:rgba(0,0,0,0)}button.menu-toggle-button span{padding:2px 1px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none;font-weight:500;vertical-align:middle;font-family:"Open Sans",sans-serif;font-size:14px}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;vertical-align:middle}button.menu-toggle-button:hover{color:#1073bc}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#fff;margin:auto;position:relative;top:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042;font-size:15px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0.hierarchy-level-1>li>a{font-weight:normal}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#fff;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:normal;font-family:"Open Sans",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}',"",{version:3,sources:["webpack://./stories/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAKA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,8BAAA,CACA,aAAA,CACA,cAAA,CACA,UAAA,C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AEJ,6FACI,+BAAA,CACA,eAAA,CACA,oBAAA,CACA,mBAAA,CACA,aAAA,CAEJ,8FACI,SAAA,CACA,iGACI,kBAAA,CAMJ,+GACI,kBAAA,CAOxB,gDK5JJ,0CL6JQ,CK5JR,wCL4JQ,CK3JR,6CL2JQ,CK1JR,qCL0JQ,CACA,gBAAA,CACA,qBAAA,CACA,YAAA,CACA,eAAA,CACA,qDACI,eAAA,CAEJ,yGAEI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,kBAAA,CACA,kCEjLD,CFkLC,eAAA,CACA,qHACI,yBAAA,CAEJ,6IACI,6BAAA",sourcesContent:['@use "../../../style/mixins/border-radius";\n@use "../../../style/mixins/box-shadow";\n@use "../../../style/mixins/breakpoints";\n@use "../../../style/mixins/transition";\n@use "../../../style/variables/typography";\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n border: none;\n background-color: transparent;\n color: #403f3f;\n cursor: pointer;\n width: 40px;\n height: 32px;\n display: flex;\n gap: 6px;\n align-items: center;\n\n @include breakpoints.breakpoint(phablet) {\n width: 45px;\n height: 37px;\n }\n @include breakpoints.breakpoint(laptop) {\n width: 98px;\n background-color: transparent;\n color: #403f3f;\n }\n &.open {\n background-color: transparent;\n }\n span {\n padding: 2px 1px;\n vertical-align: middle;\n &.menu-title {\n display: none;\n font-weight: 500;\n vertical-align: middle;\n font-family: typography.$default-font;\n font-size: 14px;\n @include breakpoints.breakpoint(laptop) {\n display: inline-block;\n }\n }\n &.hidden {\n display: none;\n }\n }\n svg {\n height: 24px;\n width: 24px;\n vertical-align: middle;\n }\n &:hover {\n color: #1073bc;\n }\n}\n.menu-wrapper {\n position: absolute;\n left: 0;\n width: 100%;\n\n .menu-container {\n @include border-radius.border-radius(0 0 3px 3px);\n box-sizing: border-box;\n width: 100%;\n background-color: #fff;\n margin: auto;\n position: relative;\n top: 56px;\n @include breakpoints.breakpoint(phablet) {\n top: 15px;\n }\n\n @include breakpoints.breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoints.breakpoint(laptop) {\n width: 970px;\n }\n @include breakpoints.breakpoint(desktop) {\n width: 1170px;\n }\n @media print {\n display: none;\n }\n\n &.open {\n @include box-shadow.box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\n height: auto;\n }\n .menu-item-list-container {\n @include transition.transition(max-height 0.3s ease-in-out);\n overflow: hidden;\n max-height: 0;\n &.open {\n max-height: 300px;\n overflow: auto;\n @include breakpoints.breakpoint(phablet) {\n max-height: 450px;\n }\n @include breakpoints.breakpoint(laptop) {\n max-height: 300px;\n }\n }\n\n .menuItemList {\n list-style: none;\n margin: 15px;\n color: #414042;\n font-size: 15px;\n &:first-child {\n padding: 15px 0 0;\n }\n a {\n color: #414042;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n &.hierarchy-level-0 {\n display: flex;\n flex-wrap: wrap;\n > li {\n flex: 1 0 100%;\n @include breakpoints.breakpoint(phablet) {\n flex: 1 0 50%;\n }\n @include breakpoints.breakpoint(laptop) {\n flex: 1;\n }\n > a {\n border-bottom: 1px solid #b6afa8;\n font-weight: 700;\n padding-bottom: 0.75em;\n margin-bottom: 0.75em;\n display: block;\n }\n > ul {\n padding: 0;\n li {\n margin-bottom: 12px;\n }\n }\n }\n &.hierarchy-level-1 {\n > li {\n > a {\n font-weight: normal;\n }\n }\n }\n }\n }\n }\n .menu-actions-row {\n @include transition.transition(max-height 0.3s ease-in-out);\n text-align: right;\n background-color: white;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a,\n button {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: #414042;\n cursor: pointer;\n border: none;\n font-size: 16px;\n font-weight: normal;\n font-family: typography.$default-font;\n background: none;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\n }\n }\n}\n','@use "../variables/breakpoints";\n\n@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: breakpoints.$screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: breakpoints.$screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: breakpoints.$screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: breakpoints.$screen-phablet) {\n @content;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\n',"@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},1095(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});const i='<template>\n <button id="menu-toggle-button" class="menu-toggle-button">\n \n <span id="menu-icon"></span>\n <span id="close-icon"></span>\n <span id="menu-title" class="menu-title">\n Meny\n </span>\n </button>\n <div id="menu-wrapper" class="menu-wrapper">\n <div id="menu-container" class="menu-container open">\n <div id="menu-item-list-container" class="menu-item-list-container"></div>\n <div id="menu-actions-row" class="menu-actions-row"></div>\n </div>\n </div>\n</template>'},164(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);i&&s[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},5052(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},8631(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(169),r=n(6999),s=n(2466);t.Component=e=>t=>{var n;const a=e.tag||s.toKebabCase(t.prototype.constructor.name),u=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>s.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[s.toCamelCase(e)]=n);const o=this.constructor.watchAttributes;if(o&&o[e]){const i=o[e];this.__connected&&"function"==typeof this[i]&&this[i]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,o.addEventListeners(this),r.initializeProps(this)}))}render(){return i(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(a)||customElements.define(a,u),u}},3704(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},3365(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},3128(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8631),t),o(n(3704),t),o(n(3365),t),o(n(169),t),o(n(6999),t),o(n(3982),t),o(n(8861),t),o(n(1063),t)},169(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const i=n(2466);t.Listen=(e,t)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[i]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const i=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;i&&i.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(o){const r=e||i.toDotCase(n);t.dispatchEvent(new CustomEvent(r,o))}}}})}},6999(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const i=n(2466);t.Prop=()=>(e,t)=>{const n=i.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const o=this.props[t];this.props[t]=i.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,o,e,!1)}else this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const i=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(i)})(e)){if(t)if(null==t[i.toKebabCase(n)])t[i.toKebabCase(n)]="";else{const o=e.props[n]||e.getAttribute(i.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:o})}e.constructor.propsInit[n]&&(e.hasAttribute(i.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},3982(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const i=n(2466);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},8861(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2466(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},1063(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const i=n(2466);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[i.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},5429(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M160-240q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h640q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240H160Zm0-200q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-200q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h640q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H160Z"></path></svg>'},3437(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"></path></svg>'},8914(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchDropdownSearchResults=t.fetchMenuItems=t.getGeonorgeMenuUrl=t.deleteShortcutItem=t.postShortcutItem=t.fetchShortcutItem=t.getMinSideShortcutUrl=t.getMinSideShortcutApiUrl=t.getKartkatalogApiUrl=void 0,t.getKartkatalogApiUrl=e=>`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no/api`,t.getMinSideShortcutApiUrl=(e,t)=>`https://minside.${"dev"===e||"test"===e?e+".":""}geonorge.no/api/shortcut${(null==t?void 0:t.length)?`?${new URLSearchParams({url:t}).toString()}`:""}`,t.getMinSideShortcutUrl=e=>`https://minside.${"dev"===e||"test"===e?e+".":""}geonorge.no/shortcuts`,t.fetchShortcutItem=(...e)=>n(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e,i),r={method:"GET",headers:new Headers({Authorization:`Bearer ${n}`})};try{return fetch(o,r).then((e=>200===e.status?e.json().then((e=>e)):null))}catch(e){return console.error("Error fetching shortcut items:",e),null}})),t.postShortcutItem=(...e)=>n(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e),r={method:"POST",headers:new Headers({Authorization:`Bearer ${n}`,"Content-Type":"application/json"}),body:JSON.stringify(i)};return fetch(o,r).then((e=>e.json())).then((e=>e))})),t.deleteShortcutItem=(...e)=>n(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e),r={method:"DELETE",headers:new Headers({Authorization:`Bearer ${n}`,"Content-Type":"application/json"}),body:JSON.stringify(i)};return fetch(o,r)})),t.getGeonorgeMenuUrl=(e,t)=>"dev"===t?"https://dev.geonorge.no/menu.xml":`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${"en"===e?"en/":""}api/menu/get?omitLinks=1`,t.fetchMenuItems=(e="no",n="")=>{const i=(0,t.getGeonorgeMenuUrl)(e,n);return fetch(i).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(...e)=>n(void 0,[...e],void 0,(function*(e="",i="no",o=""){const r={dataset:`search?text=${e=e.toString()}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,series:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,service:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,servicelayer:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,software:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,articles:`articles?text=${e}`},s={headers:new Headers({"Accept-Language":i})};return e&&e.length?yield Promise.all(Object.keys(r).map((e=>n(void 0,void 0,void 0,(function*(){const n=(0,t.getKartkatalogApiUrl)(o);return fetch(`${n}/${r[e]}&limit=5`,s).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},5979(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeInnerHTML=t.addGlobalStylesheet=t.getDocumentHeading=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.getDocumentHeading=()=>{let e=document.querySelector("heading-text");return e||(e=document.querySelector("h1:not(.sb-nopreview_heading.sb-heading)")),e},t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)},t.removeInnerHTML=e=>{for(;e.firstChild&&e.contains(e.firstChild);)e.removeChild(e.firstChild)}},761(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainMenu=void 0;const c=n(3128),l=u(n(5429)),d=u(n(3437)),p=n(8914),h=n(5979);let m=class extends c.CustomElement{constructor(){super(),this.hideMenuContainer=()=>{this.showmenu=!1},this.renderMenuItems=(e,t=0,n=1)=>{const i=e.map((e=>{const i=e.SubMenuItem&&e.SubMenuItem.length?e.SubMenuItem:null;return`<li><a href="${e.Url}" tabindex="${this.showmenu?null:"-1"}">${e.Name}</a>${i&&t+1<=n?this.renderMenuItems(i,t+1,n):""}</li>`})).join("");return`<ul class="menuItemList hierarchy-level-${t}">${i}</ul>`},this.clickOutsideMenuContainer=this.clickOutsideMenuContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.menuButton=(0,c.getShadowRootElement)(this,"#menu-toggle-button"),this.menuTitle=(0,c.getShadowRootElement)(this,"#menu-title"),this.menuIcon=(0,c.getShadowRootElement)(this,"#menu-icon"),this.closeIcon=(0,c.getShadowRootElement)(this,"#close-icon"),this.menuContainer=(0,c.getShadowRootElement)(this,"#menu-container"),this.menuItemListContainer=(0,c.getShadowRootElement)(this,"#menu-item-list-container"),this.menuActionsRow=(0,c.getShadowRootElement)(this,"#menu-actions-row"),this.menuIcon.innerHTML=l.default,this.closeIcon.innerHTML=d.default,this.showmenu?this.menuIcon.classList.add("hidden"):this.closeIcon.classList.add("hidden"),(0,p.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny"),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.signinurl&&this.signouturl&&this.addAuthenticationLinks(),this.englishurl&&this.norwegianurl&&this.addLanguageSelectLinks(),document.addEventListener("click",this.clickOutsideMenuContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMenuContainer)}clickOutsideMenuContainer(e){const t=e.composedPath()[0];t.closest("#menu-container"),t.closest("#menu-container")||t.closest("#menu-toggle-button")||this.hideMenuContainer()}addAuthenticationLinks(e=!1){let t;if(!(this.signouturl&&this.signinurl||e))return"";e?(t=document.createElement("button"),t.addEventListener("click",(()=>{this.isloggedin?this.onSignOutClick.emit():this.onSignInClick.emit()}))):(t=document.createElement("a"),t.href=this.isloggedin?this.signouturl:this.signinurl);for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("button"),t.addEventListener("click",(()=>{"en"===this.language?this.onNorwegianLanguageSelect.emit():this.onEnglishLanguageSelect.emit()}))):(t=document.createElement("a"),t.href="en"===this.language?this.norwegianurl:this.englishurl),t.innerText="en"===this.language?"Norsk":"English",t.id="language-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}buttonClicked(e){this.showmenu=!this.showmenu}hasAuthenticationFunctionChanged(){this.hasAuthenticationFunction&&this.addAuthenticationLinks(!0)}isLoggedInChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction)}hasLanguageSelectFunctionsChanged(){this.hasLanguageSelectFunctions&&this.addLanguageSelectLinks(!0)}languageChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction),this.addLanguageSelectLinks(this.hasLanguageSelectFunctions),(0,p.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny")}showMenuChanged(){this.showmenu?this.menuContainer.classList.add("open"):this.menuContainer.classList.remove("open"),this.showmenu?this.menuButton.classList.add("open"):this.menuButton.classList.remove("open"),this.showmenu?this.menuItemListContainer.classList.add("open"):this.menuItemListContainer.classList.remove("open"),this.showmenu?this.menuActionsRow.classList.add("open"):this.menuActionsRow.classList.remove("open"),this.showmenu?this.menuIcon.classList.add("hidden"):this.menuIcon.classList.remove("hidden"),this.showmenu?this.closeIcon.classList.remove("hidden"):this.closeIcon.classList.add("hidden"),(0,h.getFocusableElementsInsideElement)(this.menuContainer).forEach((e=>{this.showmenu?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1")}))}menuItemsChanged(){this.menuitems&&this.menuitems.length&&(this.menuItemListContainer.innerHTML=this.renderMenuItems(this.menuitems))}static setup(e,t){const n=(0,c.getElement)(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};t.MainMenu=m,m.elementSelector="main-menu",s([(0,c.Prop)()],m.prototype,"id",void 0),s([(0,c.Prop)()],m.prototype,"language",void 0),s([(0,c.Prop)()],m.prototype,"environment",void 0),s([(0,c.Prop)()],m.prototype,"signinurl",void 0),s([(0,c.Prop)()],m.prototype,"signouturl",void 0),s([(0,c.Prop)()],m.prototype,"norwegianurl",void 0),s([(0,c.Prop)()],m.prototype,"englishurl",void 0),s([(0,c.Toggle)()],m.prototype,"isloggedin",void 0),s([(0,c.Toggle)()],m.prototype,"showmenu",void 0),s([(0,c.Toggle)()],m.prototype,"hasAuthenticationFunction",void 0),s([(0,c.Toggle)()],m.prototype,"hasLanguageSelectFunctions",void 0),s([(0,c.Prop)()],m.prototype,"menuitems",void 0),s([(0,c.Dispatch)("onSignInClick")],m.prototype,"onSignInClick",void 0),s([(0,c.Dispatch)("onSignOutClick")],m.prototype,"onSignOutClick",void 0),s([(0,c.Dispatch)("onNorwegianLanguageSelect")],m.prototype,"onNorwegianLanguageSelect",void 0),s([(0,c.Dispatch)("onEnglishLanguageSelect")],m.prototype,"onEnglishLanguageSelect",void 0),s([(0,c.Listen)("click","#menu-toggle-button")],m.prototype,"buttonClicked",null),s([(0,c.Watch)("hasauthenticationfunction")],m.prototype,"hasAuthenticationFunctionChanged",null),s([(0,c.Watch)("isloggedin")],m.prototype,"isLoggedInChanged",null),s([(0,c.Watch)("haslanguageselectfunctions")],m.prototype,"hasLanguageSelectFunctionsChanged",null),s([(0,c.Watch)("language")],m.prototype,"languageChanged",null),s([(0,c.Watch)("showmenu")],m.prototype,"showMenuChanged",null),s([(0,c.Watch)("menuitems")],m.prototype,"menuItemsChanged",null),t.MainMenu=m=s([(0,c.Component)({tag:"main-menu",template:Promise.resolve().then((()=>a(n(1095)))),style:Promise.resolve().then((()=>a(n(1753))))})],m)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(761)})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.MainMenu=t())}(self,(()=>(()=>{var e={1753(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var i=n(5052),o=n.n(i),r=n(164),s=n.n(r)()(o());s.push([e.id,'*{box-sizing:border-box}button.menu-toggle-button{border:none;background-color:rgba(0,0,0,0);color:#403f3f;cursor:pointer;width:40px;height:32px;display:flex;gap:6px;align-items:center}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:98px;background-color:rgba(0,0,0,0);color:#403f3f}}button.menu-toggle-button.open{background-color:rgba(0,0,0,0)}button.menu-toggle-button span{padding:2px 1px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none;font-weight:500;vertical-align:middle;font-family:"Open Sans",sans-serif;font-size:14px}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;vertical-align:middle}button.menu-toggle-button:hover{color:#1073bc}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#fff;margin:auto;position:relative;top:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042;font-size:15px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0.hierarchy-level-1>li>a{font-weight:normal}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#fff;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:normal;font-family:"Open Sans",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}',"",{version:3,sources:["webpack://./stories/main-navigation/main-menu/main-menu.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_border-radius.scss","webpack://./style/mixins/_box-shadow.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAKA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,8BAAA,CACA,aAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,OAAA,CACA,kBAAA,CCFI,0BDPR,0BAYQ,UAAA,CACA,WAAA,CAAA,CCdA,yBDCR,0BAgBQ,UAAA,CACA,8BAAA,CACA,aAAA,CAAA,CAEJ,+BACI,8BAAA,CAEJ,+BACI,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CACA,eAAA,CACA,qBAAA,CACA,kCEvCG,CFwCH,cAAA,CChCJ,yBD2BA,0CAOQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,qBAAA,CAEJ,gCACI,aAAA,CAGR,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BG9DF,iCH+D2C,CG9D3C,yBH8D2C,CACrC,qBAAA,CACA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../style/mixins/box-shadow";\n@use "../../../style/mixins/breakpoints";\n@use "../../../style/mixins/transition";\n@use "../../../style/variables/typography";\n* {\n box-sizing: border-box;\n}\n\nbutton.menu-toggle-button {\n border: none;\n background-color: transparent;\n color: #403f3f;\n cursor: pointer;\n width: 40px;\n height: 32px;\n display: flex;\n gap: 6px;\n align-items: center;\n\n @include breakpoints.breakpoint(phablet) {\n width: 45px;\n height: 37px;\n }\n @include breakpoints.breakpoint(laptop) {\n width: 98px;\n background-color: transparent;\n color: #403f3f;\n }\n &.open {\n background-color: transparent;\n }\n span {\n padding: 2px 1px;\n vertical-align: middle;\n &.menu-title {\n display: none;\n font-weight: 500;\n vertical-align: middle;\n font-family: typography.$default-font;\n font-size: 14px;\n @include breakpoints.breakpoint(laptop) {\n display: inline-block;\n }\n }\n &.hidden {\n display: none;\n }\n }\n svg {\n height: 24px;\n width: 24px;\n vertical-align: middle;\n }\n &:hover {\n color: #1073bc;\n }\n}\n.menu-wrapper {\n position: absolute;\n left: 0;\n width: 100%;\n\n .menu-container {\n @include border-radius.border-radius(0 0 3px 3px);\n box-sizing: border-box;\n width: 100%;\n background-color: #fff;\n margin: auto;\n position: relative;\n top: 56px;\n @include breakpoints.breakpoint(phablet) {\n top: 15px;\n }\n\n @include breakpoints.breakpoint(tablet) {\n width: 750px;\n }\n @include breakpoints.breakpoint(laptop) {\n width: 970px;\n }\n @include breakpoints.breakpoint(desktop) {\n width: 1170px;\n }\n @media print {\n display: none;\n }\n\n &.open {\n @include box-shadow.box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\n height: auto;\n }\n .menu-item-list-container {\n @include transition.transition(max-height 0.3s ease-in-out);\n overflow: hidden;\n max-height: 0;\n &.open {\n max-height: 300px;\n overflow: auto;\n @include breakpoints.breakpoint(phablet) {\n max-height: 450px;\n }\n @include breakpoints.breakpoint(laptop) {\n max-height: 300px;\n }\n }\n\n .menuItemList {\n list-style: none;\n margin: 15px;\n color: #414042;\n font-size: 15px;\n &:first-child {\n padding: 15px 0 0;\n }\n a {\n color: #414042;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n &.hierarchy-level-0 {\n display: flex;\n flex-wrap: wrap;\n > li {\n flex: 1 0 100%;\n @include breakpoints.breakpoint(phablet) {\n flex: 1 0 50%;\n }\n @include breakpoints.breakpoint(laptop) {\n flex: 1;\n }\n > a {\n border-bottom: 1px solid #b6afa8;\n font-weight: 700;\n padding-bottom: 0.75em;\n margin-bottom: 0.75em;\n display: block;\n }\n > ul {\n padding: 0;\n li {\n margin-bottom: 12px;\n }\n }\n }\n &.hierarchy-level-1 {\n > li {\n > a {\n font-weight: normal;\n }\n }\n }\n }\n }\n }\n .menu-actions-row {\n @include transition.transition(max-height 0.3s ease-in-out);\n text-align: right;\n background-color: white;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a,\n button {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: #414042;\n cursor: pointer;\n border: none;\n font-size: 16px;\n font-weight: normal;\n font-family: typography.$default-font;\n background: none;\n &:hover {\n text-decoration: underline;\n }\n &:not(:first-child) {\n border-left: 1px solid #b6afa8;\n }\n }\n }\n }\n}\n','@use "../variables/breakpoints";\n\n@mixin breakpoint($point) {\n @if $point == desktop {\n @media (min-width: breakpoints.$screen-desktop) {\n @content;\n }\n } @else if $point == laptop {\n @media (min-width: breakpoints.$screen-laptop) {\n @content;\n }\n } @else if $point == tablet {\n @media (min-width: breakpoints.$screen-tablet) {\n @content;\n }\n } @else if $point == phablet {\n @media (min-width: breakpoints.$screen-phablet) {\n @content;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\n',"@mixin border-radius($radius) {\n -webkit-border-radius: $radius;\n border-radius: $radius;\n}\n\n// Single side border-radius\n\n@mixin border-top-radius($radius) {\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}\n@mixin border-right-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-top-right-radius: $radius;\n border-top-right-radius: $radius;\n}\n@mixin border-bottom-radius($radius) {\n -webkit-border-bottom-right-radius: $radius;\n border-bottom-right-radius: $radius;\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n}\n@mixin border-left-radius($radius) {\n -webkit-border-bottom-left-radius: $radius;\n border-bottom-left-radius: $radius;\n -webkit-border-top-left-radius: $radius;\n border-top-left-radius: $radius;\n}","\ufeff@mixin box-shadow($shadows...) {\n -webkit-box-shadow: $shadows;\n -moz-box-shadow: $shadows;\n box-shadow: $shadows;\n}\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},1095(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});const i='<template>\n <button id="menu-toggle-button" class="menu-toggle-button">\n \n <span id="menu-icon"></span>\n <span id="close-icon"></span>\n <span id="menu-title" class="menu-title">\n Meny\n </span>\n </button>\n <div id="menu-wrapper" class="menu-wrapper">\n <div id="menu-container" class="menu-container open">\n <div id="menu-item-list-container" class="menu-item-list-container"></div>\n <div id="menu-actions-row" class="menu-actions-row"></div>\n </div>\n </div>\n</template>'},164(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);i&&s[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},5052(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},8631(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(169),r=n(6999),s=n(2466);t.Component=e=>t=>{var n;const a=e.tag||s.toKebabCase(t.prototype.constructor.name),u=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>s.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,i=!0){if(t!=n){i&&(this[s.toCamelCase(e)]=n);const o=this.constructor.watchAttributes;if(o&&o[e]){const i=o[e];this.__connected&&"function"==typeof this[i]&&this[i]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return i(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,o.addEventListeners(this),r.initializeProps(this)}))}render(){return i(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return i(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return i(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(a)||customElements.define(a,u),u}},3704(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},3365(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},3128(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8631),t),o(n(3704),t),o(n(3365),t),o(n(169),t),o(n(6999),t),o(n(3982),t),o(n(8861),t),o(n(1063),t)},169(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const i=n(2466);t.Listen=(e,t)=>(n,i)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[i]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const i=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;i&&i.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(o){const r=e||i.toDotCase(n);t.dispatchEvent(new CustomEvent(r,o))}}}})}},6999(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const i=n(2466);t.Prop=()=>(e,t)=>{const n=i.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const o=this.props[t];this.props[t]=i.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,o,e,!1)}else this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const i=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(i)})(e)){if(t)if(null==t[i.toKebabCase(n)])t[i.toKebabCase(n)]="";else{const o=e.props[n]||e.getAttribute(i.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:o})}e.constructor.propsInit[n]&&(e.hasAttribute(i.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},3982(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const i=n(2466);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(i.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},8861(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2466(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},1063(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const i=n(2466);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[i.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},5429(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M160-240q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h640q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240H160Zm0-200q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-200q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h640q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H160Z"></path></svg>'},3437(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"></path></svg>'},8914(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchDropdownSearchResults=t.fetchMenuItems=t.getGeonorgeMenuUrl=t.deleteShortcutItem=t.postShortcutItem=t.fetchShortcutItem=t.getMinSideShortcutUrl=t.getMinSideShortcutApiUrl=t.getKartkatalogApiUrl=void 0;const o=n(8245);t.getKartkatalogApiUrl=e=>{const t=(0,o.getConfig)();return t.kartkatalogApiUrl?t.kartkatalogApiUrl:`https://kartkatalog.${"dev"===e||"test"===e?e+".":""}geonorge.no/api`},t.getMinSideShortcutApiUrl=(e,t)=>{const n=(0,o.getConfig)(),i=(null==t?void 0:t.length)?`?${new URLSearchParams({url:t}).toString()}`:"";return n.minsideUrl?`${n.minsideUrl}/api/shortcut${i}`:`https://minside.${"dev"===e||"test"===e?e+".":""}geonorge.no/api/shortcut${i}`},t.getMinSideShortcutUrl=e=>{const t=(0,o.getConfig)();return t.minsideUrl?`${t.minsideUrl}/shortcuts`:`https://minside.${"dev"===e||"test"===e?e+".":""}geonorge.no/shortcuts`},t.fetchShortcutItem=(...e)=>i(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e,i),r={method:"GET",headers:new Headers({Authorization:`Bearer ${n}`})};try{return fetch(o,r).then((e=>200===e.status?e.json().then((e=>e)):null))}catch(e){return console.error("Error fetching shortcut items:",e),null}})),t.postShortcutItem=(...e)=>i(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e),r={method:"POST",headers:new Headers({Authorization:`Bearer ${n}`,"Content-Type":"application/json"}),body:JSON.stringify(i)};return fetch(o,r).then((e=>e.json())).then((e=>e))})),t.deleteShortcutItem=(...e)=>i(void 0,[...e],void 0,(function*(e="",n,i){const o=(0,t.getMinSideShortcutApiUrl)(e),r={method:"DELETE",headers:new Headers({Authorization:`Bearer ${n}`,"Content-Type":"application/json"}),body:JSON.stringify(i)};return fetch(o,r)})),t.getGeonorgeMenuUrl=(e,t)=>{const n=(0,o.getConfig)(),i="en"===e?"en/":"";return n.geonorgeUrl?`${n.geonorgeUrl}/${i}api/menu/get?omitLinks=1`:"dev"===t?"https://dev.geonorge.no/menu.xml":`https://www.${"dev"===t||"test"===t?"test.":""}geonorge.no/${i}api/menu/get?omitLinks=1`},t.fetchMenuItems=(e="no",n="")=>{const i=(0,t.getGeonorgeMenuUrl)(e,n);return fetch(i).then((e=>e.json())).then((e=>e))},t.fetchDropdownSearchResults=(...e)=>i(void 0,[...e],void 0,(function*(e="",n="no",o=""){const r={dataset:`search?text=${e=e.toString()}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,series:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,service:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,servicelayer:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,software:`search?text=${e}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,articles:`articles?text=${e}`},s={headers:new Headers({"Accept-Language":n})};return e&&e.length?yield Promise.all(Object.keys(r).map((e=>i(void 0,void 0,void 0,(function*(){const n=(0,t.getKartkatalogApiUrl)(o);return fetch(`${n}/${r[e]}&limit=5`,s).then((e=>e.json())).then((t=>Object.assign(Object.assign({},t),{searchResultsType:e})))}))))):null}))},8245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.configure=void 0;let n={};t.configure=e=>{n=Object.assign(Object.assign({},n),e)},t.getConfig=()=>n},5979(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeInnerHTML=t.addGlobalStylesheet=t.getDocumentHeading=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.getDocumentHeading=()=>{let e=document.querySelector("heading-text");return e||(e=document.querySelector("h1:not(.sb-nopreview_heading.sb-heading)")),e},t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)},t.removeInnerHTML=e=>{for(;e.firstChild&&e.contains(e.firstChild);)e.removeChild(e.firstChild)}},761(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MainMenu=void 0;const c=n(3128),l=u(n(5429)),d=u(n(3437)),p=n(8914),h=n(5979);let m=class extends c.CustomElement{constructor(){super(),this.hideMenuContainer=()=>{this.showmenu=!1},this.renderMenuItems=(e,t=0,n=1)=>{const i=e.map((e=>{const i=e.SubMenuItem&&e.SubMenuItem.length?e.SubMenuItem:null;return`<li><a href="${e.Url}" tabindex="${this.showmenu?null:"-1"}">${e.Name}</a>${i&&t+1<=n?this.renderMenuItems(i,t+1,n):""}</li>`})).join("");return`<ul class="menuItemList hierarchy-level-${t}">${i}</ul>`},this.clickOutsideMenuContainer=this.clickOutsideMenuContainer.bind(this)}setup(e){this.connect(e.container),e.id&&(this.id=e.id)}connectedCallback(){this.menuButton=(0,c.getShadowRootElement)(this,"#menu-toggle-button"),this.menuTitle=(0,c.getShadowRootElement)(this,"#menu-title"),this.menuIcon=(0,c.getShadowRootElement)(this,"#menu-icon"),this.closeIcon=(0,c.getShadowRootElement)(this,"#close-icon"),this.menuContainer=(0,c.getShadowRootElement)(this,"#menu-container"),this.menuItemListContainer=(0,c.getShadowRootElement)(this,"#menu-item-list-container"),this.menuActionsRow=(0,c.getShadowRootElement)(this,"#menu-actions-row"),this.menuIcon.innerHTML=l.default,this.closeIcon.innerHTML=d.default,this.showmenu?this.menuIcon.classList.add("hidden"):this.closeIcon.classList.add("hidden"),(0,p.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny"),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.signinurl&&this.signouturl&&this.addAuthenticationLinks(),this.englishurl&&this.norwegianurl&&this.addLanguageSelectLinks(),document.addEventListener("click",this.clickOutsideMenuContainer)}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideMenuContainer)}clickOutsideMenuContainer(e){const t=e.composedPath()[0];t.closest("#menu-container"),t.closest("#menu-container")||t.closest("#menu-toggle-button")||this.hideMenuContainer()}addAuthenticationLinks(e=!1){let t;if(!(this.signouturl&&this.signinurl||e))return"";e?(t=document.createElement("button"),t.addEventListener("click",(()=>{this.isloggedin?this.onSignOutClick.emit():this.onSignInClick.emit()}))):(t=document.createElement("a"),t.href=this.isloggedin?this.signouturl:this.signinurl);for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}addLanguageSelectLinks(e=!1){let t;if(!(this.norwegianurl&&this.englishurl||e))return"";e?(t=document.createElement("button"),t.addEventListener("click",(()=>{"en"===this.language?this.onNorwegianLanguageSelect.emit():this.onEnglishLanguageSelect.emit()}))):(t=document.createElement("a"),t.href="en"===this.language?this.norwegianurl:this.englishurl),t.innerText="en"===this.language?"Norsk":"English",t.id="language-toggle-element";for(const e of this.menuActionsRow.children)e.getAttribute("id")===t.id&&e.remove();this.showmenu||t.setAttribute("tabindex","-1"),this.menuActionsRow.appendChild(t)}buttonClicked(e){this.showmenu=!this.showmenu}hasAuthenticationFunctionChanged(){this.hasAuthenticationFunction&&this.addAuthenticationLinks(!0)}isLoggedInChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction)}hasLanguageSelectFunctionsChanged(){this.hasLanguageSelectFunctions&&this.addLanguageSelectLinks(!0)}languageChanged(){this.addAuthenticationLinks(this.hasAuthenticationFunction),this.addLanguageSelectLinks(this.hasLanguageSelectFunctions),(0,p.fetchMenuItems)(this.language,this.environment).then((e=>{this.menuitems=e})),this.menuTitle&&(this.menuTitle.innerText="en"===this.language?"Menu":"Meny"),this.menuButton.setAttribute("aria-label","en"===this.language?"Show menu":"Vis meny")}showMenuChanged(){this.showmenu?this.menuContainer.classList.add("open"):this.menuContainer.classList.remove("open"),this.showmenu?this.menuButton.classList.add("open"):this.menuButton.classList.remove("open"),this.showmenu?this.menuItemListContainer.classList.add("open"):this.menuItemListContainer.classList.remove("open"),this.showmenu?this.menuActionsRow.classList.add("open"):this.menuActionsRow.classList.remove("open"),this.showmenu?this.menuIcon.classList.add("hidden"):this.menuIcon.classList.remove("hidden"),this.showmenu?this.closeIcon.classList.remove("hidden"):this.closeIcon.classList.add("hidden"),(0,h.getFocusableElementsInsideElement)(this.menuContainer).forEach((e=>{this.showmenu?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1")}))}menuItemsChanged(){this.menuitems&&this.menuitems.length&&(this.menuItemListContainer.innerHTML=this.renderMenuItems(this.menuitems))}static setup(e,t){const n=(0,c.getElement)(e);t.onClick&&n.addEventListener("menuButtonClick",t.onClick),t.active&&(n.showmenu=t.active)}};t.MainMenu=m,m.elementSelector="main-menu",s([(0,c.Prop)()],m.prototype,"id",void 0),s([(0,c.Prop)()],m.prototype,"language",void 0),s([(0,c.Prop)()],m.prototype,"environment",void 0),s([(0,c.Prop)()],m.prototype,"signinurl",void 0),s([(0,c.Prop)()],m.prototype,"signouturl",void 0),s([(0,c.Prop)()],m.prototype,"norwegianurl",void 0),s([(0,c.Prop)()],m.prototype,"englishurl",void 0),s([(0,c.Toggle)()],m.prototype,"isloggedin",void 0),s([(0,c.Toggle)()],m.prototype,"showmenu",void 0),s([(0,c.Toggle)()],m.prototype,"hasAuthenticationFunction",void 0),s([(0,c.Toggle)()],m.prototype,"hasLanguageSelectFunctions",void 0),s([(0,c.Prop)()],m.prototype,"menuitems",void 0),s([(0,c.Dispatch)("onSignInClick")],m.prototype,"onSignInClick",void 0),s([(0,c.Dispatch)("onSignOutClick")],m.prototype,"onSignOutClick",void 0),s([(0,c.Dispatch)("onNorwegianLanguageSelect")],m.prototype,"onNorwegianLanguageSelect",void 0),s([(0,c.Dispatch)("onEnglishLanguageSelect")],m.prototype,"onEnglishLanguageSelect",void 0),s([(0,c.Listen)("click","#menu-toggle-button")],m.prototype,"buttonClicked",null),s([(0,c.Watch)("hasauthenticationfunction")],m.prototype,"hasAuthenticationFunctionChanged",null),s([(0,c.Watch)("isloggedin")],m.prototype,"isLoggedInChanged",null),s([(0,c.Watch)("haslanguageselectfunctions")],m.prototype,"hasLanguageSelectFunctionsChanged",null),s([(0,c.Watch)("language")],m.prototype,"languageChanged",null),s([(0,c.Watch)("showmenu")],m.prototype,"showMenuChanged",null),s([(0,c.Watch)("menuitems")],m.prototype,"menuItemsChanged",null),t.MainMenu=m=s([(0,c.Component)({tag:"main-menu",template:Promise.resolve().then((()=>a(n(1095)))),style:Promise.resolve().then((()=>a(n(1753))))})],m)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(761)})()));
|
|
2
2
|
//# sourceMappingURL=MainMenu.js.map
|
package/MainMenu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainMenu.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAY,SAAIC,IAC3E,CATD,CASGK,MAAM,I,oGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,6iJAA8iJ,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,+DAA+D,6CAA6C,+CAA+C,+CAA+C,4CAA4C,6CAA6C,MAAQ,GAAG,SAAW,09CAA09C,eAAiB,CAAC,+8KAAy9K,ukBAAykB,6GAAiH,28BAA28B,4IAAuI,ygCAAogC,WAAa,MAE7od,S,yDCPA,2kB,sBCMAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAE5EC,GAAWN,EAAuBK,GAC9BE,IACFD,GAAW,KAETD,EAAK,KACPC,GAAW,KAETD,EAAK,KACPC,GAAW,KAENA,CACT,IAAGI,KAAK,GACV,EAGAT,EAAKU,EAAI,SAAWC,EAASC,EAAOC,EAA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eAAevH,EAAS6R,EAAK,CAAEE,YAAY,EAAM9L,IAAK2L,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAK1J,IAAU/E,OAAOZ,UAAUsP,eAAe7K,KAAK4K,EAAK1J,GCClF6I,EAAoBe,EAAKlS,IACH,oBAAXmS,QAA0BA,OAAOC,aAC1C7O,OAAOgE,eAAevH,EAASmS,OAAOC,YAAa,CAAElK,MAAO,WAE7D3E,OAAOgE,eAAevH,EAAS,aAAc,CAAEkI,OAAO,GAAO,ECFpCiJ,EAAoB,I","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.scss","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/burgerG.svg","webpack://geonorge/./assets/svg/close-icon-black.svg","webpack://geonorge/./functions/apiHelpers.ts","webpack://geonorge/./functions/guiHelpers.ts","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"MainMenu\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*{box-sizing:border-box}button.menu-toggle-button{border:none;background-color:rgba(0,0,0,0);color:#403f3f;cursor:pointer;width:40px;height:32px;display:flex;gap:6px;align-items:center}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:98px;background-color:rgba(0,0,0,0);color:#403f3f}}button.menu-toggle-button.open{background-color:rgba(0,0,0,0)}button.menu-toggle-button span{padding:2px 1px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none;font-weight:500;vertical-align:middle;font-family:\"Open Sans\",sans-serif;font-size:14px}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;vertical-align:middle}button.menu-toggle-button:hover{color:#1073bc}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#fff;margin:auto;position:relative;top:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042;font-size:15px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0.hierarchy-level-1>li>a{font-weight:normal}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#fff;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:normal;font-family:\"Open Sans\",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/main-navigation/main-menu/main-menu.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/variables/_typography.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_box-shadow.scss\",\"webpack://./style/mixins/_transition.scss\"],\"names\":[],\"mappings\":\"AAKA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,8BAAA,CACA,aAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,OAAA,CACA,kBAAA,CCFI,0BDPR,0BAYQ,UAAA,CACA,WAAA,CAAA,CCdA,yBDCR,0BAgBQ,UAAA,CACA,8BAAA,CACA,aAAA,CAAA,CAEJ,+BACI,8BAAA,CAEJ,+BACI,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CACA,eAAA,CACA,qBAAA,CACA,kCEvCG,CFwCH,cAAA,CChCJ,yBD2BA,0CAOQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI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CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,kBAAA,CACA,kCEjLD,CFkLC,eAAA,CACA,qHACI,yBAAA,CAEJ,6IACI,6BAAA\",\"sourcesContent\":[\"@use \\\"../../../style/mixins/border-radius\\\";\\n@use \\\"../../../style/mixins/box-shadow\\\";\\n@use \\\"../../../style/mixins/breakpoints\\\";\\n@use \\\"../../../style/mixins/transition\\\";\\n@use \\\"../../../style/variables/typography\\\";\\n* {\\n box-sizing: border-box;\\n}\\n\\nbutton.menu-toggle-button {\\n border: none;\\n background-color: transparent;\\n color: #403f3f;\\n cursor: pointer;\\n width: 40px;\\n height: 32px;\\n display: flex;\\n gap: 6px;\\n align-items: center;\\n\\n @include breakpoints.breakpoint(phablet) {\\n width: 45px;\\n height: 37px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n width: 98px;\\n background-color: transparent;\\n color: #403f3f;\\n }\\n &.open {\\n background-color: transparent;\\n }\\n span {\\n padding: 2px 1px;\\n vertical-align: middle;\\n &.menu-title {\\n display: none;\\n font-weight: 500;\\n vertical-align: middle;\\n font-family: typography.$default-font;\\n font-size: 14px;\\n @include breakpoints.breakpoint(laptop) {\\n display: inline-block;\\n }\\n }\\n &.hidden {\\n display: none;\\n }\\n }\\n svg {\\n height: 24px;\\n width: 24px;\\n vertical-align: middle;\\n }\\n &:hover {\\n color: #1073bc;\\n }\\n}\\n.menu-wrapper {\\n position: absolute;\\n left: 0;\\n width: 100%;\\n\\n .menu-container {\\n @include border-radius.border-radius(0 0 3px 3px);\\n box-sizing: border-box;\\n width: 100%;\\n background-color: #fff;\\n margin: auto;\\n position: relative;\\n top: 56px;\\n @include breakpoints.breakpoint(phablet) {\\n top: 15px;\\n }\\n\\n @include breakpoints.breakpoint(tablet) {\\n width: 750px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n width: 970px;\\n }\\n @include breakpoints.breakpoint(desktop) {\\n width: 1170px;\\n }\\n @media print {\\n display: none;\\n }\\n\\n &.open {\\n @include box-shadow.box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\\n height: auto;\\n }\\n .menu-item-list-container {\\n @include transition.transition(max-height 0.3s ease-in-out);\\n overflow: hidden;\\n max-height: 0;\\n &.open {\\n max-height: 300px;\\n overflow: auto;\\n @include breakpoints.breakpoint(phablet) {\\n max-height: 450px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n max-height: 300px;\\n }\\n }\\n\\n .menuItemList {\\n list-style: none;\\n margin: 15px;\\n color: #414042;\\n font-size: 15px;\\n &:first-child {\\n padding: 15px 0 0;\\n }\\n a {\\n color: #414042;\\n text-decoration: none;\\n &:hover {\\n text-decoration: underline;\\n }\\n }\\n &.hierarchy-level-0 {\\n display: flex;\\n flex-wrap: wrap;\\n > li {\\n flex: 1 0 100%;\\n @include breakpoints.breakpoint(phablet) {\\n flex: 1 0 50%;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n flex: 1;\\n }\\n > a {\\n border-bottom: 1px solid #b6afa8;\\n font-weight: 700;\\n padding-bottom: 0.75em;\\n margin-bottom: 0.75em;\\n display: block;\\n }\\n > ul {\\n padding: 0;\\n li {\\n margin-bottom: 12px;\\n }\\n }\\n }\\n &.hierarchy-level-1 {\\n > li {\\n > a {\\n font-weight: normal;\\n }\\n }\\n }\\n }\\n }\\n }\\n .menu-actions-row {\\n @include transition.transition(max-height 0.3s ease-in-out);\\n text-align: right;\\n background-color: white;\\n max-height: 0;\\n overflow: hidden;\\n &.open {\\n max-height: 56px;\\n }\\n a,\\n button {\\n display: inline-block;\\n padding: 0.25em 1em 0.25em 1.1em;\\n margin: 15px 0;\\n text-decoration: none;\\n color: #414042;\\n cursor: pointer;\\n border: none;\\n font-size: 16px;\\n font-weight: normal;\\n font-family: typography.$default-font;\\n background: none;\\n &:hover {\\n text-decoration: underline;\\n }\\n &:not(:first-child) {\\n border-left: 1px solid #b6afa8;\\n }\\n }\\n }\\n }\\n}\\n\",\"@use \\\"../variables/breakpoints\\\";\\n\\n@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: breakpoints.$screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: breakpoints.$screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: breakpoints.$screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: breakpoints.$screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"$default-font: \\\"Open Sans\\\", sans-serif;\\n$header-font: \\\"Raleway\\\", sans-serif;\\n$default-font-size: 15px;\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\",\"@mixin transition($transition...) {\\n -moz-transition: $transition;\\n -o-transition: $transition;\\n -webkit-transition: $transition;\\n transition: $transition;\\n}\\n\\n@mixin transition-property($property...) {\\n -moz-transition-property: $property;\\n -o-transition-property: $property;\\n -webkit-transition-property: $property;\\n transition-property: $property;\\n}\\n\\n@mixin transition-duration($duration...) {\\n -moz-transition-property: $duration;\\n -o-transition-property: $duration;\\n -webkit-transition-property: $duration;\\n transition-property: $duration;\\n}\\n\\n@mixin transition-timing-function($timing...) {\\n -moz-transition-timing-function: $timing;\\n -o-transition-timing-function: $timing;\\n -webkit-transition-timing-function: $timing;\\n transition-timing-function: $timing;\\n}\\n\\n@mixin transition-delay($delay...) {\\n -moz-transition-delay: $delay;\\n -o-transition-delay: $delay;\\n -webkit-transition-delay: $delay;\\n transition-delay: $delay;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <button id=\\\"menu-toggle-button\\\" class=\\\"menu-toggle-button\\\">\\n \\n <span id=\\\"menu-icon\\\"></span>\\n <span id=\\\"close-icon\\\"></span>\\n <span id=\\\"menu-title\\\" class=\\\"menu-title\\\">\\n Meny\\n </span>\\n </button>\\n <div id=\\\"menu-wrapper\\\" class=\\\"menu-wrapper\\\">\\n <div id=\\\"menu-container\\\" class=\\\"menu-container open\\\">\\n <div id=\\\"menu-item-list-container\\\" class=\\\"menu-item-list-container\\\"></div>\\n <div id=\\\"menu-actions-row\\\" class=\\\"menu-actions-row\\\"></div>\\n </div>\\n </div>\\n</template>\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"M160-240q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h640q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240H160Zm0-200q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-200q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h640q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H160Z\\\"></path></svg>\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\\\"></path></svg>\"","export const getKartkatalogApiUrl = (environment: string) => {\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n return `https://kartkatalog.${environmentSlug}geonorge.no/api`;\n};\n\nexport const getMinSideShortcutApiUrl = (environment: string, shortcutUrl?: string) => {\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n const urlParameterString = shortcutUrl?.length ? `?${new URLSearchParams({ url: shortcutUrl }).toString()}` : \"\";\n return `https://minside.${environmentSlug}geonorge.no/api/shortcut${urlParameterString}`;\n};\nexport const getMinSideShortcutUrl = (environment: string) => {\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n return `https://minside.${environmentSlug}geonorge.no/shortcuts`;\n};\n\nexport const fetchShortcutItem = async (environment: string = \"\", token: string, shortcutUrl: string) => {\n const apiUrl = getMinSideShortcutApiUrl(environment, shortcutUrl);\n const fetchOptions = {\n method: \"GET\",\n headers: new Headers({\n Authorization: `Bearer ${token}`\n })\n };\n try {\n return fetch(apiUrl, fetchOptions).then((res) => {\n if (res.status === 200) {\n return res.json().then((shortcutItem) => {\n return shortcutItem;\n });\n } else {\n return null;\n }\n });\n } catch (error) {\n console.error(\"Error fetching shortcut items:\", error);\n return null;\n }\n};\n\nexport const postShortcutItem = async (\n environment: string = \"\",\n token: string,\n shortcutItem: { name: string; url: string }\n) => {\n const apiUrl = getMinSideShortcutApiUrl(environment);\n const fetchOptions = {\n method: \"POST\",\n headers: new Headers({\n Authorization: `Bearer ${token}`,\n \"Content-Type\": \"application/json\"\n }),\n body: JSON.stringify(shortcutItem)\n };\n return fetch(apiUrl, fetchOptions)\n .then((res) => res.json())\n .then((shortcutItem) => {\n return shortcutItem;\n });\n};\n\nexport const deleteShortcutItem = async (environment: string = \"\", token: string, shortcutItem: { url: string }) => {\n const apiUrl = getMinSideShortcutApiUrl(environment);\n const fetchOptions = {\n method: \"DELETE\",\n headers: new Headers({\n Authorization: `Bearer ${token}`,\n \"Content-Type\": \"application/json\"\n }),\n body: JSON.stringify(shortcutItem)\n };\n return fetch(apiUrl, fetchOptions);\n};\n\nexport const getGeonorgeMenuUrl = (language: string, environment: string) => {\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? \"test.\" : \"\";\n const selectedLanguageSlug = language === \"en\" ? \"en/\" : \"\";\n if (environment === \"dev\") return `https://dev.geonorge.no/menu.xml`;\n else return `https://www.${environmentSlug}geonorge.no/${selectedLanguageSlug}api/menu/get?omitLinks=1`;\n};\n\nexport const fetchMenuItems = (language: string = \"no\", environment: string = \"\") => {\n const apiUrl = getGeonorgeMenuUrl(language, environment);\n return fetch(apiUrl)\n .then((res) => res.json())\n .then((menuItems) => {\n return menuItems;\n });\n};\n\nexport const fetchDropdownSearchResults = async (\n searchString: string = \"\",\n language: string = \"no\",\n environment: string = \"\"\n) => {\n searchString = searchString.toString();\n const urlParameterStrings = {\n dataset: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,\n series: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,\n service: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,\n servicelayer: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,\n software: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,\n articles: `articles?text=${searchString}`\n };\n const fetchOptions = {\n headers: new Headers({\n \"Accept-Language\": language\n })\n };\n const limitParameterString = \"limit=5\";\n\n return searchString && searchString.length\n ? await Promise.all(\n Object.keys(urlParameterStrings).map(async (searchResultsType) => {\n const kartkatalogApiUrl = getKartkatalogApiUrl(environment);\n let urlParameterString = urlParameterStrings[searchResultsType];\n return fetch(`${kartkatalogApiUrl}/${urlParameterString}&${limitParameterString}`, fetchOptions)\n .then((res) => res.json())\n .then((searchResults) => {\n return {\n ...searchResults,\n searchResultsType\n };\n });\n })\n )\n : null;\n};\n","export const getFocusableElementsInsideElement = (element: HTMLElement) => {\n return element.querySelectorAll('button, [href], input, [tabindex=\"0\"]');\n};\n\nexport const getDocumentHeading = () => {\n let documentHeading = document.querySelector(\"heading-text\") as HTMLElement | null; // This assumes that the heading is wrapped in a custom element called \"heading-text\"\n if (!documentHeading) {\n documentHeading = document.querySelector(\"h1:not(.sb-nopreview_heading.sb-heading)\") as HTMLElement | null; // Exclude the heading used by Storybook\n }\n return documentHeading;\n};\n\nexport const addGlobalStylesheet = (styleElementId: string, styles: string) => {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", styleElementId);\n style.textContent = styles;\n if (!document.getElementById(styleElementId)) {\n document.head.appendChild(style);\n }\n};\n\nexport const removeInnerHTML = (element: HTMLElement) => {\n while (element.firstChild) {\n if (element.contains(element.firstChild)) {\n element.removeChild(element.firstChild);\n } else {\n // If not a child, break to avoid infinite loop\n break;\n }\n }\n};\n","// Dependencies\nimport {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\n// Assets\nimport MenuIcon from '../../../assets/svg/burgerG.svg';\nimport CloseIcon from '../../../assets/svg/close-icon-black.svg';\n\n// Functions\nimport { fetchMenuItems } from '../../../functions/apiHelpers';\nimport { getFocusableElementsInsideElement } from '../../../functions/guiHelpers';\nimport { setCookie } from '../../../functions/cookieHelpers';\n\n\ninterface MainMenuOptions extends CustomElementOptions {\n active?: boolean,\n onClick?: () => void,\n onSignInClick?: () => void,\n onSignOutClick?: () => void,\n onNorwegianLanguageSelect?: () => void,\n onEnglishLanguageSelect?: () => void\n}\n\ninterface MenuItem extends Object {\n Name: string,\n SubMenuItem: Array<MenuItem>,\n Url: string\n}\n\n@Component({\n tag: 'main-menu',\n template: import('./main-menu.html'),\n style: import('./main-menu.scss')\n})\n\nexport class MainMenu extends CustomElement {\n private static readonly elementSelector = 'main-menu';\n private menuButton: HTMLButtonElement;\n private menuTitle: HTMLSpanElement;\n private menuIcon: HTMLSpanElement;\n private closeIcon: HTMLSpanElement;\n private menuContainer: HTMLElement;\n private menuItemListContainer: HTMLElement;\n private menuActionsRow: HTMLElement;\n\n @Prop() id: string;\n @Prop() language: string;\n @Prop() environment: string;\n @Prop() signinurl: string;\n @Prop() signouturl: string;\n @Prop() norwegianurl: string;\n @Prop() englishurl: string;\n @Toggle() isloggedin: boolean;\n @Toggle() showmenu: boolean;\n @Toggle() hasAuthenticationFunction: boolean;\n @Toggle() hasLanguageSelectFunctions: boolean;\n @Prop() menuitems: Array<MenuItem>;\n @Dispatch('onSignInClick') onSignInClick: DispatchEmitter;\n @Dispatch('onSignOutClick') onSignOutClick: DispatchEmitter;\n @Dispatch('onNorwegianLanguageSelect') onNorwegianLanguageSelect: DispatchEmitter;\n @Dispatch('onEnglishLanguageSelect') onEnglishLanguageSelect: DispatchEmitter;\n\n\n constructor() {\n super();\n this.clickOutsideMenuContainer = this.clickOutsideMenuContainer.bind(this);\n }\n\n setup(options?: MainMenuOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.menuButton = getShadowRootElement(this, '#menu-toggle-button');\n this.menuTitle = getShadowRootElement(this, '#menu-title');\n this.menuIcon = getShadowRootElement(this, '#menu-icon');\n this.closeIcon = getShadowRootElement(this, '#close-icon');\n this.menuContainer = getShadowRootElement(this, '#menu-container');\n this.menuItemListContainer = getShadowRootElement(this, '#menu-item-list-container');\n this.menuActionsRow = getShadowRootElement(this, '#menu-actions-row');\n this.menuIcon.innerHTML = MenuIcon;\n this.closeIcon.innerHTML = CloseIcon;\n\n this.showmenu ? this.menuIcon.classList.add('hidden') : this.closeIcon.classList.add('hidden');\n\n fetchMenuItems(this.language, this.environment).then(menuItems => {\n this.menuitems = menuItems;\n });\n\n this.menuButton.setAttribute('aria-label', this.language === 'en' ? 'Show menu' : 'Vis meny');\n\n if (this.menuTitle) {\n this.menuTitle.innerText = this.language === 'en' ? 'Menu' : 'Meny';\n }\n\n const hasAuthenticationUrls = this.signinurl && this.signouturl;\n if (hasAuthenticationUrls) {\n this.addAuthenticationLinks();\n }\n\n const supportsLanguages = this.englishurl && this.norwegianurl;\n if (supportsLanguages) {\n this.addLanguageSelectLinks();\n\n }\n document.addEventListener('click', this.clickOutsideMenuContainer);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.clickOutsideMenuContainer);\n }\n\n hideMenuContainer = () => {\n this.showmenu = false;\n }\n\n\n clickOutsideMenuContainer(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n targetElement.closest('#menu-container');\n if (targetElement.closest('#menu-container') || targetElement.closest('#menu-toggle-button')) return\n this.hideMenuContainer();\n }\n\n renderMenuItems = (menuItems: Array<MenuItem>, hierarchyLevel: number = 0, maxHierarchyLevel: number = 1) => {\n const menuItemsListElement = menuItems.map((menuItem: MenuItem) => {\n const subItems = menuItem.SubMenuItem && menuItem.SubMenuItem.length ? menuItem.SubMenuItem : null;\n const menuItemElement = `<a href=\"${menuItem.Url}\" tabindex=\"${this.showmenu ? null : '-1'}\">${menuItem.Name}</a>`;\n const subItemElements = subItems && hierarchyLevel + 1 <= maxHierarchyLevel ? this.renderMenuItems(subItems, hierarchyLevel + 1, maxHierarchyLevel) : '';\n return `<li>${menuItemElement}${subItemElements}</li>`;\n }).join('');\n return `<ul class=\"menuItemList hierarchy-level-${hierarchyLevel}\">${menuItemsListElement}</ul>`;\n }\n\n addAuthenticationLinks(hasAuthenticationFunction = false) {\n let loginToggleElement;\n const hasAuthenticationLinks = this.signouturl && this.signinurl;\n\n if (!hasAuthenticationLinks && !hasAuthenticationFunction) {\n return '';\n }\n\n if (hasAuthenticationFunction) {\n loginToggleElement = document.createElement(\"button\");\n loginToggleElement.addEventListener(\"click\", () => {\n this.isloggedin ? this.onSignOutClick.emit() : this.onSignInClick.emit();\n });\n } else {\n loginToggleElement = document.createElement(\"a\");\n loginToggleElement.href = this.isloggedin ? this.signouturl : this.signinurl;\n }\n\n // Remove previously added login toggle element if exists\n for (const childElement of this.menuActionsRow.children) {\n if (childElement.getAttribute('id') === loginToggleElement.id) {\n childElement.remove()\n }\n }\n\n if (!this.showmenu){\n loginToggleElement.setAttribute('tabindex', '-1');\n }\n\n // Add login toggle element\n this.menuActionsRow.appendChild(loginToggleElement);\n }\n\n addLanguageSelectLinks(hasLanguageSelectFunctions = false) {\n let languageToggleElement;\n const hasLanguageSelectLinks = this.norwegianurl && this.englishurl;\n\n if (!hasLanguageSelectLinks && !hasLanguageSelectFunctions) {\n return '';\n }\n\n if (hasLanguageSelectFunctions) {\n languageToggleElement = document.createElement(\"button\");\n languageToggleElement.addEventListener(\"click\", () => {\n this.language === 'en' ? this.onNorwegianLanguageSelect.emit() : this.onEnglishLanguageSelect.emit();\n });\n } else {\n languageToggleElement = document.createElement(\"a\");\n languageToggleElement.href = this.language === 'en' ? this.norwegianurl : this.englishurl;\n }\n\n languageToggleElement.innerText = this.language === 'en' ? 'Norsk' : 'English';\n languageToggleElement.id = 'language-toggle-element';\n\n // Remove previously added language toggle element if exists\n for (const childElement of this.menuActionsRow.children) {\n if (childElement.getAttribute('id') === languageToggleElement.id) {\n childElement.remove()\n }\n }\n\n if (!this.showmenu){\n languageToggleElement.setAttribute('tabindex', '-1');\n }\n\n // Add language toggle element\n this.menuActionsRow.appendChild(languageToggleElement);\n }\n\n @Listen('click', '#menu-toggle-button')\n buttonClicked(event: MouseEvent) {\n this.showmenu = !this.showmenu;\n }\n\n @Watch('hasauthenticationfunction')\n hasAuthenticationFunctionChanged() {\n if (this.hasAuthenticationFunction) {\n this.addAuthenticationLinks(true);\n }\n }\n\n @Watch('isloggedin') \n isLoggedInChanged() {\n this.addAuthenticationLinks(this.hasAuthenticationFunction); \n }\n\n @Watch('haslanguageselectfunctions')\n hasLanguageSelectFunctionsChanged() {\n if (this.hasLanguageSelectFunctions) {\n this.addLanguageSelectLinks(true);\n }\n }\n\n @Watch('language')\n languageChanged() {\n this.addAuthenticationLinks(this.hasAuthenticationFunction);\n this.addLanguageSelectLinks(this.hasLanguageSelectFunctions);\n fetchMenuItems(this.language, this.environment).then(menuItems => {\n this.menuitems = menuItems;\n });\n if (this.menuTitle) {\n this.menuTitle.innerText = this.language === 'en' ? 'Menu' : 'Meny';\n }\n this.menuButton.setAttribute('aria-label', this.language === 'en' ? 'Show menu' : 'Vis meny');\n }\n\n @Watch('showmenu')\n showMenuChanged() {\n this.showmenu ? this.menuContainer.classList.add('open') : this.menuContainer.classList.remove('open');\n this.showmenu ? this.menuButton.classList.add('open') : this.menuButton.classList.remove('open');\n this.showmenu ? this.menuItemListContainer.classList.add('open') : this.menuItemListContainer.classList.remove('open');\n this.showmenu ? this.menuActionsRow.classList.add('open') : this.menuActionsRow.classList.remove('open');\n this.showmenu ? this.menuIcon.classList.add('hidden') : this.menuIcon.classList.remove('hidden');\n this.showmenu ? this.closeIcon.classList.remove('hidden') : this.closeIcon.classList.add('hidden');\n const focusableMenuContainerElements = getFocusableElementsInsideElement(this.menuContainer);\n focusableMenuContainerElements.forEach(focusableElement => {\n if (!this.showmenu){\n focusableElement.setAttribute('tabindex', '-1');\n } else {\n focusableElement.removeAttribute('tabindex');\n }\n });\n }\n\n @Watch('menuitems')\n menuItemsChanged() {\n if (this.menuitems && this.menuitems.length) {\n this.menuItemListContainer.innerHTML = this.renderMenuItems(this.menuitems);\n }\n }\n\n public static setup(selector: string, options: MainMenuOptions) {\n const element = getElement<MainMenu>(selector);\n\n if (options.onClick) {\n element.addEventListener('menuButtonClick', options.onClick);\n }\n if (options.active) {\n element.showmenu = options.active;\n }\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(761);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","getKartkatalogApiUrl","environment","getMinSideShortcutApiUrl","shortcutUrl","URLSearchParams","url","getMinSideShortcutUrl","fetchShortcutItem","token","apiUrl","fetchOptions","method","headers","Headers","Authorization","fetch","then","res","status","json","shortcutItem","error","postShortcutItem","body","deleteShortcutItem","getGeonorgeMenuUrl","language","fetchMenuItems","menuItems","fetchDropdownSearchResults","searchString","urlParameterStrings","dataset","series","service","servicelayer","software","articles","all","searchResultsType","kartkatalogApiUrl","searchResults","getFocusableElementsInsideElement","element","querySelectorAll","getDocumentHeading","documentHeading","addGlobalStylesheet","styleElementId","styles","textContent","getElementById","head","removeInnerHTML","contains","removeChild","MainMenu","hideMenuContainer","showmenu","renderMenuItems","hierarchyLevel","maxHierarchyLevel","menuItemsListElement","menuItem","subItems","SubMenuItem","Url","Name","clickOutsideMenuContainer","bind","setup","container","menuButton","menuTitle","menuIcon","closeIcon","menuContainer","menuItemListContainer","menuActionsRow","classList","add","menuitems","innerText","signinurl","signouturl","addAuthenticationLinks","englishurl","norwegianurl","addLanguageSelectLinks","disconnectedCallback","removeEventListener","event","targetElement","composedPath","closest","hasAuthenticationFunction","loginToggleElement","isloggedin","onSignOutClick","onSignInClick","href","childElement","remove","hasLanguageSelectFunctions","languageToggleElement","onNorwegianLanguageSelect","onEnglishLanguageSelect","buttonClicked","hasAuthenticationFunctionChanged","isLoggedInChanged","hasLanguageSelectFunctionsChanged","languageChanged","showMenuChanged","focusableElement","menuItemsChanged","onClick","active","elementSelector","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"MainMenu.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAY,SAAIC,IAC3E,CATD,CASGK,MAAM,I,oGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,6iJAA8iJ,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,+DAA+D,6CAA6C,+CAA+C,+CAA+C,4CAA4C,6CAA6C,MAAQ,GAAG,SAAW,09CAA09C,eAAiB,CAAC,+8KAAy9K,ukBAAykB,6GAAiH,28BAA28B,4IAAuI,ygCAAogC,WAAa,MAE7od,S,yDCPA,2kB,sBCMAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAA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AAAA,OAAM,a,oCAcP,IADC,IAAAA,OAAM,a,oCAmBP,IADC,IAAAA,OAAM,c,gDAlOEiE,EAAQ,IANpB,IAAAtL,WAAU,CACPG,IAAK,YACLiC,SAAU,QAAF,wBAAS,SACjBkB,MAAO,QAAF,wBAAS,YAGLgI,E,GCrCT8D,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBnQ,IAAjBoQ,EACH,OAAOA,EAAa7R,QAGrB,IAAIC,EAASyR,EAAyBE,GAAY,CACjDrR,GAAIqR,EAEJ5R,QAAS,CAAC,GAOX,OAHA8R,EAAoBF,GAAUxK,KAAKnH,EAAOD,QAASC,EAAQA,EAAOD,QAAS2R,GAGpE1R,EAAOD,OACf,C,OCrBA2R,EAAoBI,EAAK9R,IACxB,IAAI+R,EAAS/R,GAAUA,EAAOgS,WAC7B,IAAOhS,EAAiB,QACxB,IAAM,EAEP,OADA0R,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdL,EAAoBO,EAAI,CAAClS,EAASoS,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAEtS,EAASqS,IAC5E9O,OAAOgE,eAAevH,EAASqS,EAAK,CAAEE,YAAY,EAAMtM,IAAKmM,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAKlK,IAAU/E,OAAOZ,UAAU8P,eAAerL,KAAKoL,EAAKlK,GCClFqJ,EAAoBe,EAAK1S,IACH,oBAAX2S,QAA0BA,OAAOC,aAC1CrP,OAAOgE,eAAevH,EAAS2S,OAAOC,YAAa,CAAE1K,MAAO,WAE7D3E,OAAOgE,eAAevH,EAAS,aAAc,CAAEkI,OAAO,GAAO,ECFpCyJ,EAAoB,I","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.scss","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/burgerG.svg","webpack://geonorge/./assets/svg/close-icon-black.svg","webpack://geonorge/./functions/apiHelpers.ts","webpack://geonorge/./functions/config.ts","webpack://geonorge/./functions/guiHelpers.ts","webpack://geonorge/./stories/main-navigation/main-menu/main-menu.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"MainMenu\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*{box-sizing:border-box}button.menu-toggle-button{border:none;background-color:rgba(0,0,0,0);color:#403f3f;cursor:pointer;width:40px;height:32px;display:flex;gap:6px;align-items:center}@media(min-width: 37.5em){button.menu-toggle-button{width:45px;height:37px}}@media(min-width: 992px){button.menu-toggle-button{width:98px;background-color:rgba(0,0,0,0);color:#403f3f}}button.menu-toggle-button.open{background-color:rgba(0,0,0,0)}button.menu-toggle-button span{padding:2px 1px;vertical-align:middle}button.menu-toggle-button span.menu-title{display:none;font-weight:500;vertical-align:middle;font-family:\"Open Sans\",sans-serif;font-size:14px}@media(min-width: 992px){button.menu-toggle-button span.menu-title{display:inline-block}}button.menu-toggle-button span.hidden{display:none}button.menu-toggle-button svg{height:24px;width:24px;vertical-align:middle}button.menu-toggle-button:hover{color:#1073bc}.menu-wrapper{position:absolute;left:0;width:100%}.menu-wrapper .menu-container{-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;box-sizing:border-box;width:100%;background-color:#fff;margin:auto;position:relative;top:56px}@media(min-width: 37.5em){.menu-wrapper .menu-container{top:15px}}@media(min-width: 768px){.menu-wrapper .menu-container{width:750px}}@media(min-width: 992px){.menu-wrapper .menu-container{width:970px}}@media(min-width: 1200px){.menu-wrapper .menu-container{width:1170px}}@media print{.menu-wrapper .menu-container{display:none}}.menu-wrapper .menu-container.open{-webkit-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);-moz-box-shadow:0 5px 5px -2px rgba(0,0,0,.26);box-shadow:0 5px 5px -2px rgba(0,0,0,.26);height:auto}.menu-wrapper .menu-container .menu-item-list-container{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;overflow:hidden;max-height:0}.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px;overflow:auto}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:450px}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container.open{max-height:300px}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList{list-style:none;margin:15px;color:#414042;font-size:15px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList:first-child{padding:15px 0 0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a{color:#414042;text-decoration:none}.menu-wrapper .menu-container .menu-item-list-container .menuItemList a:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0{display:flex;flex-wrap:wrap}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 100%}@media(min-width: 37.5em){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1 0 50%}}@media(min-width: 992px){.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li{flex:1}}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>a{border-bottom:1px solid #b6afa8;font-weight:700;padding-bottom:.75em;margin-bottom:.75em;display:block}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul{padding:0}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0>li>ul li{margin-bottom:12px}.menu-wrapper .menu-container .menu-item-list-container .menuItemList.hierarchy-level-0.hierarchy-level-1>li>a{font-weight:normal}.menu-wrapper .menu-container .menu-actions-row{-moz-transition:max-height .3s ease-in-out;-o-transition:max-height .3s ease-in-out;-webkit-transition:max-height .3s ease-in-out;transition:max-height .3s ease-in-out;text-align:right;background-color:#fff;max-height:0;overflow:hidden}.menu-wrapper .menu-container .menu-actions-row.open{max-height:56px}.menu-wrapper .menu-container .menu-actions-row a,.menu-wrapper .menu-container .menu-actions-row button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:#414042;cursor:pointer;border:none;font-size:16px;font-weight:normal;font-family:\"Open Sans\",sans-serif;background:none}.menu-wrapper .menu-container .menu-actions-row a:hover,.menu-wrapper .menu-container .menu-actions-row button:hover{text-decoration:underline}.menu-wrapper .menu-container .menu-actions-row a:not(:first-child),.menu-wrapper .menu-container .menu-actions-row button:not(:first-child){border-left:1px solid #b6afa8}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/main-navigation/main-menu/main-menu.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/variables/_typography.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_box-shadow.scss\",\"webpack://./style/mixins/_transition.scss\"],\"names\":[],\"mappings\":\"AAKA,EACI,qBAAA,CAGJ,0BACI,WAAA,CACA,8BAAA,CACA,aAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,OAAA,CACA,kBAAA,CCFI,0BDPR,0BAYQ,UAAA,CACA,WAAA,CAAA,CCdA,yBDCR,0BAgBQ,UAAA,CACA,8BAAA,CACA,aAAA,CAAA,CAEJ,+BACI,8BAAA,CAEJ,+BACI,eAAA,CACA,qBAAA,CACA,0CACI,YAAA,CACA,eAAA,CACA,qBAAA,CACA,kCEvCG,CFwCH,cAAA,CChCJ,yBD2BA,0CAOQ,oBAAA,CAAA,CAGR,sCACI,YAAA,CAGR,8BACI,WAAA,CACA,UAAA,CACA,qBAAA,CAEJ,gCACI,aAAA,CAGR,cACI,iBAAA,CACA,MAAA,CACA,UAAA,CAEA,8BG9DF,iCH+D2C,CG9D3C,yBH8D2C,CACrC,qBAAA,CACA,UAAA,CACA,qBAAA,CACA,WAAA,CACA,iBAAA,CACA,QAAA,CCtDA,0BD+CJ,8BASQ,QAAA,CAAA,CC5DJ,yBDmDJ,8BAaQ,WAAA,CAAA,CCpEJ,yBDuDJ,8BAgBQ,WAAA,CAAA,CC3EJ,0BD2DJ,8BAmBQ,YAAA,CAAA,CAEJ,aArBJ,8BAsBQ,YAAA,CAAA,CAGJ,mCIvFJ,iDJwFQ,CIvFR,8CJuFQ,CItFR,yCJsFQ,CACA,WAAA,CAEJ,wDK3FJ,0CL4FQ,CK3FR,wCL2FQ,CK1FR,6CL0FQ,CKzFR,qCLyFQ,CACA,eAAA,CACA,YAAA,CACA,6DACI,gBAAA,CACA,aAAA,CClFR,0BDgFI,6DAIQ,gBAAA,CAAA,CC5FZ,yBDwFI,6DAOQ,gBAAA,CAAA,CAIR,sEACI,eAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,kFACI,gBAAA,CAEJ,wEACI,aAAA,CACA,oBAAA,CACA,8EACI,yBAAA,CAGR,wFACI,YAAA,CACA,cAAA,CACA,2FACI,aAAA,CC9GhB,0BD6GY,2FAGQ,YAAA,CAAA,CCxHpB,yBDqHY,2FAMQ,MAAA,CAAA,CAEJ,6FACI,+BAAA,CACA,eAAA,CACA,oBAAA,CACA,mBAAA,CACA,aAAA,CAEJ,8FACI,SAAA,CACA,iGACI,kBAAA,CAMJ,+GACI,kBAAA,CAOxB,gDK5JJ,0CL6JQ,CK5JR,wCL4JQ,CK3JR,6CL2JQ,CK1JR,qCL0JQ,CACA,gBAAA,CACA,qBAAA,CACA,YAAA,CACA,eAAA,CACA,qDACI,eAAA,CAEJ,yGAEI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,cAAA,CACA,kBAAA,CACA,kCEjLD,CFkLC,eAAA,CACA,qHACI,yBAAA,CAEJ,6IACI,6BAAA\",\"sourcesContent\":[\"@use \\\"../../../style/mixins/border-radius\\\";\\n@use \\\"../../../style/mixins/box-shadow\\\";\\n@use \\\"../../../style/mixins/breakpoints\\\";\\n@use \\\"../../../style/mixins/transition\\\";\\n@use \\\"../../../style/variables/typography\\\";\\n* {\\n box-sizing: border-box;\\n}\\n\\nbutton.menu-toggle-button {\\n border: none;\\n background-color: transparent;\\n color: #403f3f;\\n cursor: pointer;\\n width: 40px;\\n height: 32px;\\n display: flex;\\n gap: 6px;\\n align-items: center;\\n\\n @include breakpoints.breakpoint(phablet) {\\n width: 45px;\\n height: 37px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n width: 98px;\\n background-color: transparent;\\n color: #403f3f;\\n }\\n &.open {\\n background-color: transparent;\\n }\\n span {\\n padding: 2px 1px;\\n vertical-align: middle;\\n &.menu-title {\\n display: none;\\n font-weight: 500;\\n vertical-align: middle;\\n font-family: typography.$default-font;\\n font-size: 14px;\\n @include breakpoints.breakpoint(laptop) {\\n display: inline-block;\\n }\\n }\\n &.hidden {\\n display: none;\\n }\\n }\\n svg {\\n height: 24px;\\n width: 24px;\\n vertical-align: middle;\\n }\\n &:hover {\\n color: #1073bc;\\n }\\n}\\n.menu-wrapper {\\n position: absolute;\\n left: 0;\\n width: 100%;\\n\\n .menu-container {\\n @include border-radius.border-radius(0 0 3px 3px);\\n box-sizing: border-box;\\n width: 100%;\\n background-color: #fff;\\n margin: auto;\\n position: relative;\\n top: 56px;\\n @include breakpoints.breakpoint(phablet) {\\n top: 15px;\\n }\\n\\n @include breakpoints.breakpoint(tablet) {\\n width: 750px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n width: 970px;\\n }\\n @include breakpoints.breakpoint(desktop) {\\n width: 1170px;\\n }\\n @media print {\\n display: none;\\n }\\n\\n &.open {\\n @include box-shadow.box-shadow(0 5px 5px -2px rgba(0, 0, 0, 0.26));\\n height: auto;\\n }\\n .menu-item-list-container {\\n @include transition.transition(max-height 0.3s ease-in-out);\\n overflow: hidden;\\n max-height: 0;\\n &.open {\\n max-height: 300px;\\n overflow: auto;\\n @include breakpoints.breakpoint(phablet) {\\n max-height: 450px;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n max-height: 300px;\\n }\\n }\\n\\n .menuItemList {\\n list-style: none;\\n margin: 15px;\\n color: #414042;\\n font-size: 15px;\\n &:first-child {\\n padding: 15px 0 0;\\n }\\n a {\\n color: #414042;\\n text-decoration: none;\\n &:hover {\\n text-decoration: underline;\\n }\\n }\\n &.hierarchy-level-0 {\\n display: flex;\\n flex-wrap: wrap;\\n > li {\\n flex: 1 0 100%;\\n @include breakpoints.breakpoint(phablet) {\\n flex: 1 0 50%;\\n }\\n @include breakpoints.breakpoint(laptop) {\\n flex: 1;\\n }\\n > a {\\n border-bottom: 1px solid #b6afa8;\\n font-weight: 700;\\n padding-bottom: 0.75em;\\n margin-bottom: 0.75em;\\n display: block;\\n }\\n > ul {\\n padding: 0;\\n li {\\n margin-bottom: 12px;\\n }\\n }\\n }\\n &.hierarchy-level-1 {\\n > li {\\n > a {\\n font-weight: normal;\\n }\\n }\\n }\\n }\\n }\\n }\\n .menu-actions-row {\\n @include transition.transition(max-height 0.3s ease-in-out);\\n text-align: right;\\n background-color: white;\\n max-height: 0;\\n overflow: hidden;\\n &.open {\\n max-height: 56px;\\n }\\n a,\\n button {\\n display: inline-block;\\n padding: 0.25em 1em 0.25em 1.1em;\\n margin: 15px 0;\\n text-decoration: none;\\n color: #414042;\\n cursor: pointer;\\n border: none;\\n font-size: 16px;\\n font-weight: normal;\\n font-family: typography.$default-font;\\n background: none;\\n &:hover {\\n text-decoration: underline;\\n }\\n &:not(:first-child) {\\n border-left: 1px solid #b6afa8;\\n }\\n }\\n }\\n }\\n}\\n\",\"@use \\\"../variables/breakpoints\\\";\\n\\n@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: breakpoints.$screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: breakpoints.$screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: breakpoints.$screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: breakpoints.$screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"$default-font: \\\"Open Sans\\\", sans-serif;\\n$header-font: \\\"Raleway\\\", sans-serif;\\n$default-font-size: 15px;\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\",\"@mixin transition($transition...) {\\n -moz-transition: $transition;\\n -o-transition: $transition;\\n -webkit-transition: $transition;\\n transition: $transition;\\n}\\n\\n@mixin transition-property($property...) {\\n -moz-transition-property: $property;\\n -o-transition-property: $property;\\n -webkit-transition-property: $property;\\n transition-property: $property;\\n}\\n\\n@mixin transition-duration($duration...) {\\n -moz-transition-property: $duration;\\n -o-transition-property: $duration;\\n -webkit-transition-property: $duration;\\n transition-property: $duration;\\n}\\n\\n@mixin transition-timing-function($timing...) {\\n -moz-transition-timing-function: $timing;\\n -o-transition-timing-function: $timing;\\n -webkit-transition-timing-function: $timing;\\n transition-timing-function: $timing;\\n}\\n\\n@mixin transition-delay($delay...) {\\n -moz-transition-delay: $delay;\\n -o-transition-delay: $delay;\\n -webkit-transition-delay: $delay;\\n transition-delay: $delay;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <button id=\\\"menu-toggle-button\\\" class=\\\"menu-toggle-button\\\">\\n \\n <span id=\\\"menu-icon\\\"></span>\\n <span id=\\\"close-icon\\\"></span>\\n <span id=\\\"menu-title\\\" class=\\\"menu-title\\\">\\n Meny\\n </span>\\n </button>\\n <div id=\\\"menu-wrapper\\\" class=\\\"menu-wrapper\\\">\\n <div id=\\\"menu-container\\\" class=\\\"menu-container open\\\">\\n <div id=\\\"menu-item-list-container\\\" class=\\\"menu-item-list-container\\\"></div>\\n <div id=\\\"menu-actions-row\\\" class=\\\"menu-actions-row\\\"></div>\\n </div>\\n </div>\\n</template>\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"M160-240q-17 0-28.5-11.5T120-280q0-17 11.5-28.5T160-320h640q17 0 28.5 11.5T840-280q0 17-11.5 28.5T800-240H160Zm0-200q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-200q-17 0-28.5-11.5T120-680q0-17 11.5-28.5T160-720h640q17 0 28.5 11.5T840-680q0 17-11.5 28.5T800-640H160Z\\\"></path></svg>\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\\\"></path></svg>\"","import { getConfig } from './config';\n\nexport const getKartkatalogApiUrl = (environment: string) => {\n const config = getConfig();\n if (config.kartkatalogApiUrl) return config.kartkatalogApiUrl;\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n return `https://kartkatalog.${environmentSlug}geonorge.no/api`;\n};\n\nexport const getMinSideShortcutApiUrl = (environment: string, shortcutUrl?: string) => {\n const config = getConfig();\n const urlParameterString = shortcutUrl?.length ? `?${new URLSearchParams({ url: shortcutUrl }).toString()}` : \"\";\n if (config.minsideUrl) return `${config.minsideUrl}/api/shortcut${urlParameterString}`;\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n return `https://minside.${environmentSlug}geonorge.no/api/shortcut${urlParameterString}`;\n};\nexport const getMinSideShortcutUrl = (environment: string) => {\n const config = getConfig();\n if (config.minsideUrl) return `${config.minsideUrl}/shortcuts`;\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? environment + \".\" : \"\";\n return `https://minside.${environmentSlug}geonorge.no/shortcuts`;\n};\n\nexport const fetchShortcutItem = async (environment: string = \"\", token: string, shortcutUrl: string) => {\n const apiUrl = getMinSideShortcutApiUrl(environment, shortcutUrl);\n const fetchOptions = {\n method: \"GET\",\n headers: new Headers({\n Authorization: `Bearer ${token}`\n })\n };\n try {\n return fetch(apiUrl, fetchOptions).then((res) => {\n if (res.status === 200) {\n return res.json().then((shortcutItem) => {\n return shortcutItem;\n });\n } else {\n return null;\n }\n });\n } catch (error) {\n console.error(\"Error fetching shortcut items:\", error);\n return null;\n }\n};\n\nexport const postShortcutItem = async (\n environment: string = \"\",\n token: string,\n shortcutItem: { name: string; url: string }\n) => {\n const apiUrl = getMinSideShortcutApiUrl(environment);\n const fetchOptions = {\n method: \"POST\",\n headers: new Headers({\n Authorization: `Bearer ${token}`,\n \"Content-Type\": \"application/json\"\n }),\n body: JSON.stringify(shortcutItem)\n };\n return fetch(apiUrl, fetchOptions)\n .then((res) => res.json())\n .then((shortcutItem) => {\n return shortcutItem;\n });\n};\n\nexport const deleteShortcutItem = async (environment: string = \"\", token: string, shortcutItem: { url: string }) => {\n const apiUrl = getMinSideShortcutApiUrl(environment);\n const fetchOptions = {\n method: \"DELETE\",\n headers: new Headers({\n Authorization: `Bearer ${token}`,\n \"Content-Type\": \"application/json\"\n }),\n body: JSON.stringify(shortcutItem)\n };\n return fetch(apiUrl, fetchOptions);\n};\n\nexport const getGeonorgeMenuUrl = (language: string, environment: string) => {\n const config = getConfig();\n const selectedLanguageSlug = language === \"en\" ? \"en/\" : \"\";\n if (config.geonorgeUrl) return `${config.geonorgeUrl}/${selectedLanguageSlug}api/menu/get?omitLinks=1`;\n const environmentSlug = environment === \"dev\" || environment === \"test\" ? \"test.\" : \"\";\n if (environment === \"dev\") return `https://dev.geonorge.no/menu.xml`;\n else return `https://www.${environmentSlug}geonorge.no/${selectedLanguageSlug}api/menu/get?omitLinks=1`;\n};\n\nexport const fetchMenuItems = (language: string = \"no\", environment: string = \"\") => {\n const apiUrl = getGeonorgeMenuUrl(language, environment);\n return fetch(apiUrl)\n .then((res) => res.json())\n .then((menuItems) => {\n return menuItems;\n });\n};\n\nexport const fetchDropdownSearchResults = async (\n searchString: string = \"\",\n language: string = \"no\",\n environment: string = \"\"\n) => {\n searchString = searchString.toString();\n const urlParameterStrings = {\n dataset: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=dataset`,\n series: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=series`,\n service: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=service`,\n servicelayer: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=servicelayer`,\n software: `search?text=${searchString}&facets%5B1%5Dname=type&facets%5B1%5Dvalue=software`,\n articles: `articles?text=${searchString}`\n };\n const fetchOptions = {\n headers: new Headers({\n \"Accept-Language\": language\n })\n };\n const limitParameterString = \"limit=5\";\n\n return searchString && searchString.length\n ? await Promise.all(\n Object.keys(urlParameterStrings).map(async (searchResultsType) => {\n const kartkatalogApiUrl = getKartkatalogApiUrl(environment);\n let urlParameterString = urlParameterStrings[searchResultsType];\n return fetch(`${kartkatalogApiUrl}/${urlParameterString}&${limitParameterString}`, fetchOptions)\n .then((res) => res.json())\n .then((searchResults) => {\n return {\n ...searchResults,\n searchResultsType\n };\n });\n })\n )\n : null;\n};\n","export interface GeonorgeConfig {\n kartkatalogUrl?: string;\n kartkatalogApiUrl?: string;\n minsideUrl?: string;\n geonorgeUrl?: string;\n nedlastingUrl?: string;\n}\n\nlet currentConfig: GeonorgeConfig = {};\n\nexport const configure = (config: Partial<GeonorgeConfig>) => {\n currentConfig = { ...currentConfig, ...config };\n};\n\nexport const getConfig = (): GeonorgeConfig => currentConfig;\n","export const getFocusableElementsInsideElement = (element: HTMLElement) => {\n return element.querySelectorAll('button, [href], input, [tabindex=\"0\"]');\n};\n\nexport const getDocumentHeading = () => {\n let documentHeading = document.querySelector(\"heading-text\") as HTMLElement | null; // This assumes that the heading is wrapped in a custom element called \"heading-text\"\n if (!documentHeading) {\n documentHeading = document.querySelector(\"h1:not(.sb-nopreview_heading.sb-heading)\") as HTMLElement | null; // Exclude the heading used by Storybook\n }\n return documentHeading;\n};\n\nexport const addGlobalStylesheet = (styleElementId: string, styles: string) => {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", styleElementId);\n style.textContent = styles;\n if (!document.getElementById(styleElementId)) {\n document.head.appendChild(style);\n }\n};\n\nexport const removeInnerHTML = (element: HTMLElement) => {\n while (element.firstChild) {\n if (element.contains(element.firstChild)) {\n element.removeChild(element.firstChild);\n } else {\n // If not a child, break to avoid infinite loop\n break;\n }\n }\n};\n","// Dependencies\nimport {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\n// Assets\nimport MenuIcon from '../../../assets/svg/burgerG.svg';\nimport CloseIcon from '../../../assets/svg/close-icon-black.svg';\n\n// Functions\nimport { fetchMenuItems } from '../../../functions/apiHelpers';\nimport { getFocusableElementsInsideElement } from '../../../functions/guiHelpers';\nimport { setCookie } from '../../../functions/cookieHelpers';\n\n\ninterface MainMenuOptions extends CustomElementOptions {\n active?: boolean,\n onClick?: () => void,\n onSignInClick?: () => void,\n onSignOutClick?: () => void,\n onNorwegianLanguageSelect?: () => void,\n onEnglishLanguageSelect?: () => void\n}\n\ninterface MenuItem extends Object {\n Name: string,\n SubMenuItem: Array<MenuItem>,\n Url: string\n}\n\n@Component({\n tag: 'main-menu',\n template: import('./main-menu.html'),\n style: import('./main-menu.scss')\n})\n\nexport class MainMenu extends CustomElement {\n private static readonly elementSelector = 'main-menu';\n private menuButton: HTMLButtonElement;\n private menuTitle: HTMLSpanElement;\n private menuIcon: HTMLSpanElement;\n private closeIcon: HTMLSpanElement;\n private menuContainer: HTMLElement;\n private menuItemListContainer: HTMLElement;\n private menuActionsRow: HTMLElement;\n\n @Prop() id: string;\n @Prop() language: string;\n @Prop() environment: string;\n @Prop() signinurl: string;\n @Prop() signouturl: string;\n @Prop() norwegianurl: string;\n @Prop() englishurl: string;\n @Toggle() isloggedin: boolean;\n @Toggle() showmenu: boolean;\n @Toggle() hasAuthenticationFunction: boolean;\n @Toggle() hasLanguageSelectFunctions: boolean;\n @Prop() menuitems: Array<MenuItem>;\n @Dispatch('onSignInClick') onSignInClick: DispatchEmitter;\n @Dispatch('onSignOutClick') onSignOutClick: DispatchEmitter;\n @Dispatch('onNorwegianLanguageSelect') onNorwegianLanguageSelect: DispatchEmitter;\n @Dispatch('onEnglishLanguageSelect') onEnglishLanguageSelect: DispatchEmitter;\n\n\n constructor() {\n super();\n this.clickOutsideMenuContainer = this.clickOutsideMenuContainer.bind(this);\n }\n\n setup(options?: MainMenuOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.menuButton = getShadowRootElement(this, '#menu-toggle-button');\n this.menuTitle = getShadowRootElement(this, '#menu-title');\n this.menuIcon = getShadowRootElement(this, '#menu-icon');\n this.closeIcon = getShadowRootElement(this, '#close-icon');\n this.menuContainer = getShadowRootElement(this, '#menu-container');\n this.menuItemListContainer = getShadowRootElement(this, '#menu-item-list-container');\n this.menuActionsRow = getShadowRootElement(this, '#menu-actions-row');\n this.menuIcon.innerHTML = MenuIcon;\n this.closeIcon.innerHTML = CloseIcon;\n\n this.showmenu ? this.menuIcon.classList.add('hidden') : this.closeIcon.classList.add('hidden');\n\n fetchMenuItems(this.language, this.environment).then(menuItems => {\n this.menuitems = menuItems;\n });\n\n this.menuButton.setAttribute('aria-label', this.language === 'en' ? 'Show menu' : 'Vis meny');\n\n if (this.menuTitle) {\n this.menuTitle.innerText = this.language === 'en' ? 'Menu' : 'Meny';\n }\n\n const hasAuthenticationUrls = this.signinurl && this.signouturl;\n if (hasAuthenticationUrls) {\n this.addAuthenticationLinks();\n }\n\n const supportsLanguages = this.englishurl && this.norwegianurl;\n if (supportsLanguages) {\n this.addLanguageSelectLinks();\n\n }\n document.addEventListener('click', this.clickOutsideMenuContainer);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.clickOutsideMenuContainer);\n }\n\n hideMenuContainer = () => {\n this.showmenu = false;\n }\n\n\n clickOutsideMenuContainer(event: MouseEvent) {\n const targetElement = event.composedPath()[0] as Element;\n targetElement.closest('#menu-container');\n if (targetElement.closest('#menu-container') || targetElement.closest('#menu-toggle-button')) return\n this.hideMenuContainer();\n }\n\n renderMenuItems = (menuItems: Array<MenuItem>, hierarchyLevel: number = 0, maxHierarchyLevel: number = 1) => {\n const menuItemsListElement = menuItems.map((menuItem: MenuItem) => {\n const subItems = menuItem.SubMenuItem && menuItem.SubMenuItem.length ? menuItem.SubMenuItem : null;\n const menuItemElement = `<a href=\"${menuItem.Url}\" tabindex=\"${this.showmenu ? null : '-1'}\">${menuItem.Name}</a>`;\n const subItemElements = subItems && hierarchyLevel + 1 <= maxHierarchyLevel ? this.renderMenuItems(subItems, hierarchyLevel + 1, maxHierarchyLevel) : '';\n return `<li>${menuItemElement}${subItemElements}</li>`;\n }).join('');\n return `<ul class=\"menuItemList hierarchy-level-${hierarchyLevel}\">${menuItemsListElement}</ul>`;\n }\n\n addAuthenticationLinks(hasAuthenticationFunction = false) {\n let loginToggleElement;\n const hasAuthenticationLinks = this.signouturl && this.signinurl;\n\n if (!hasAuthenticationLinks && !hasAuthenticationFunction) {\n return '';\n }\n\n if (hasAuthenticationFunction) {\n loginToggleElement = document.createElement(\"button\");\n loginToggleElement.addEventListener(\"click\", () => {\n this.isloggedin ? this.onSignOutClick.emit() : this.onSignInClick.emit();\n });\n } else {\n loginToggleElement = document.createElement(\"a\");\n loginToggleElement.href = this.isloggedin ? this.signouturl : this.signinurl;\n }\n\n // Remove previously added login toggle element if exists\n for (const childElement of this.menuActionsRow.children) {\n if (childElement.getAttribute('id') === loginToggleElement.id) {\n childElement.remove()\n }\n }\n\n if (!this.showmenu){\n loginToggleElement.setAttribute('tabindex', '-1');\n }\n\n // Add login toggle element\n this.menuActionsRow.appendChild(loginToggleElement);\n }\n\n addLanguageSelectLinks(hasLanguageSelectFunctions = false) {\n let languageToggleElement;\n const hasLanguageSelectLinks = this.norwegianurl && this.englishurl;\n\n if (!hasLanguageSelectLinks && !hasLanguageSelectFunctions) {\n return '';\n }\n\n if (hasLanguageSelectFunctions) {\n languageToggleElement = document.createElement(\"button\");\n languageToggleElement.addEventListener(\"click\", () => {\n this.language === 'en' ? this.onNorwegianLanguageSelect.emit() : this.onEnglishLanguageSelect.emit();\n });\n } else {\n languageToggleElement = document.createElement(\"a\");\n languageToggleElement.href = this.language === 'en' ? this.norwegianurl : this.englishurl;\n }\n\n languageToggleElement.innerText = this.language === 'en' ? 'Norsk' : 'English';\n languageToggleElement.id = 'language-toggle-element';\n\n // Remove previously added language toggle element if exists\n for (const childElement of this.menuActionsRow.children) {\n if (childElement.getAttribute('id') === languageToggleElement.id) {\n childElement.remove()\n }\n }\n\n if (!this.showmenu){\n languageToggleElement.setAttribute('tabindex', '-1');\n }\n\n // Add language toggle element\n this.menuActionsRow.appendChild(languageToggleElement);\n }\n\n @Listen('click', '#menu-toggle-button')\n buttonClicked(event: MouseEvent) {\n this.showmenu = !this.showmenu;\n }\n\n @Watch('hasauthenticationfunction')\n hasAuthenticationFunctionChanged() {\n if (this.hasAuthenticationFunction) {\n this.addAuthenticationLinks(true);\n }\n }\n\n @Watch('isloggedin') \n isLoggedInChanged() {\n this.addAuthenticationLinks(this.hasAuthenticationFunction); \n }\n\n @Watch('haslanguageselectfunctions')\n hasLanguageSelectFunctionsChanged() {\n if (this.hasLanguageSelectFunctions) {\n this.addLanguageSelectLinks(true);\n }\n }\n\n @Watch('language')\n languageChanged() {\n this.addAuthenticationLinks(this.hasAuthenticationFunction);\n this.addLanguageSelectLinks(this.hasLanguageSelectFunctions);\n fetchMenuItems(this.language, this.environment).then(menuItems => {\n this.menuitems = menuItems;\n });\n if (this.menuTitle) {\n this.menuTitle.innerText = this.language === 'en' ? 'Menu' : 'Meny';\n }\n this.menuButton.setAttribute('aria-label', this.language === 'en' ? 'Show menu' : 'Vis meny');\n }\n\n @Watch('showmenu')\n showMenuChanged() {\n this.showmenu ? this.menuContainer.classList.add('open') : this.menuContainer.classList.remove('open');\n this.showmenu ? this.menuButton.classList.add('open') : this.menuButton.classList.remove('open');\n this.showmenu ? this.menuItemListContainer.classList.add('open') : this.menuItemListContainer.classList.remove('open');\n this.showmenu ? this.menuActionsRow.classList.add('open') : this.menuActionsRow.classList.remove('open');\n this.showmenu ? this.menuIcon.classList.add('hidden') : this.menuIcon.classList.remove('hidden');\n this.showmenu ? this.closeIcon.classList.remove('hidden') : this.closeIcon.classList.add('hidden');\n const focusableMenuContainerElements = getFocusableElementsInsideElement(this.menuContainer);\n focusableMenuContainerElements.forEach(focusableElement => {\n if (!this.showmenu){\n focusableElement.setAttribute('tabindex', '-1');\n } else {\n focusableElement.removeAttribute('tabindex');\n }\n });\n }\n\n @Watch('menuitems')\n menuItemsChanged() {\n if (this.menuitems && this.menuitems.length) {\n this.menuItemListContainer.innerHTML = this.renderMenuItems(this.menuitems);\n }\n }\n\n public static setup(selector: string, options: MainMenuOptions) {\n const element = getElement<MainMenu>(selector);\n\n if (options.onClick) {\n element.addEventListener('menuButtonClick', options.onClick);\n }\n if (options.active) {\n element.showmenu = options.active;\n }\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(761);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","getKartkatalogApiUrl","environment","config","getConfig","kartkatalogApiUrl","getMinSideShortcutApiUrl","shortcutUrl","urlParameterString","URLSearchParams","url","minsideUrl","getMinSideShortcutUrl","fetchShortcutItem","token","apiUrl","fetchOptions","method","headers","Headers","Authorization","fetch","then","res","status","json","shortcutItem","error","postShortcutItem","body","deleteShortcutItem","getGeonorgeMenuUrl","language","selectedLanguageSlug","geonorgeUrl","fetchMenuItems","menuItems","fetchDropdownSearchResults","searchString","urlParameterStrings","dataset","series","service","servicelayer","software","articles","all","searchResultsType","searchResults","currentConfig","configure","getFocusableElementsInsideElement","element","querySelectorAll","getDocumentHeading","documentHeading","addGlobalStylesheet","styleElementId","styles","textContent","getElementById","head","removeInnerHTML","contains","removeChild","MainMenu","hideMenuContainer","showmenu","renderMenuItems","hierarchyLevel","maxHierarchyLevel","menuItemsListElement","menuItem","subItems","SubMenuItem","Url","Name","clickOutsideMenuContainer","bind","setup","container","menuButton","menuTitle","menuIcon","closeIcon","menuContainer","menuItemListContainer","menuActionsRow","classList","add","menuitems","innerText","signinurl","signouturl","addAuthenticationLinks","englishurl","norwegianurl","addLanguageSelectLinks","disconnectedCallback","removeEventListener","event","targetElement","composedPath","closest","hasAuthenticationFunction","loginToggleElement","isloggedin","onSignOutClick","onSignInClick","href","childElement","remove","hasLanguageSelectFunctions","languageToggleElement","onNorwegianLanguageSelect","onEnglishLanguageSelect","buttonClicked","hasAuthenticationFunctionChanged","isLoggedInChanged","hasLanguageSelectFunctionsChanged","languageChanged","showMenuChanged","focusableElement","menuItemsChanged","onClick","active","elementSelector","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|