@htmlbricks/hb-navbar 0.17.22 → 0.17.23

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-navbar",
3
3
  "displayName": "Svelte Navbar WebComponent",
4
4
  "description": "Svelte Navbar WebComponent",
5
- "version": "0.17.22",
5
+ "version": "0.17.23",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -30,7 +30,7 @@
30
30
  "prepublish": "npm run build:release"
31
31
  },
32
32
  "devDependencies": {
33
- "@htmlbricks/hb-jsutils": "^0.17.22",
33
+ "@htmlbricks/hb-jsutils": "^0.17.23",
34
34
  "@htmlbricks/manifester": "^0.0.22",
35
35
  "@rollup/plugin-alias": "^3.1.2",
36
36
  "@rollup/plugin-commonjs": "^18.0.0",
@@ -70,7 +70,7 @@
70
70
  "typescript-transform-paths": "^2.2.3"
71
71
  },
72
72
  "dependencies": {
73
- "@htmlbricks/hb-dropdown-simple": "^0.17.22"
73
+ "@htmlbricks/hb-dropdown-simple": "^0.17.23"
74
74
  },
75
75
  "keywords": [
76
76
  "svelte",
@@ -78,5 +78,5 @@
78
78
  "webcomponents"
79
79
  ],
80
80
  "contributors": [],
81
- "gitHead": "3d12dbf149e68b0ddac1ac33c5a7c8826ec00776"
81
+ "gitHead": "26f06d3b6e3956e80f72abd81fc8d427180b3ff7"
82
82
  }
@@ -249,5 +249,5 @@
249
249
  },
250
250
  "iifePath": "release/release.js",
251
251
  "repoName": "@htmlbricks/hb-navbar",
252
- "version": "0.17.22"
252
+ "version": "0.17.23"
253
253
  }
@@ -1,2 +1,2 @@
1
- var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let a,s;function l(t,n){return a||(a=document.createElement("a")),a.href=n,t===a.href}function c(t,n){t.appendChild(n)}function u(t,n,e){t.insertBefore(n,e||null)}function d(t){t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function h(){return f(" ")}function m(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function g(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function v(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:g(t,n,e)}function y(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function $(t){const n={};for(const e of t)n[e.name]=e.value;return n}function b(t){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}function x(){const t=w();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],E=[],k=[],C=[],L=Promise.resolve();let D=!1;function T(t){k.push(t)}const A=new Set;let N=0;function O(){const t=s;do{for(;N<_.length;){const t=_[N];N++,b(t),S(t.$$)}for(b(null),_.length=0,N=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];A.has(n)||(A.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();D=!1,A.clear(),b(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(T)}}const P=new Set;function j(t,n){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function z(i,a,l,c,u,p,f,h=[-1]){const m=s;b(i);const g=i.$$={fragment:null,ctx:null,props:p,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};f&&f(g.root);let v=!1;if(g.ctx=l?l(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&j(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();a.intro&&((y=i.$$.fragment)&&y.i&&(P.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,on_mount:l,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,i),a||T((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(T)}(i,a.target,a.anchor,a.customElement),O()}var y,$;b(m)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.17.22";var R,F=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script"))try{var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(R={exports:{}},R.exports),R.exports),I={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,W=/\n/g,B=/^\s*/,U=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,G=/^\s+|\s+$/g,Q="";function X(t){return t?t.replace(G,Q):Q}var Y=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(W);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),c(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(B)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;Q!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,Q===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function p(){var t=i(),n=l(U);if(n){if(d(),!l(q))return s("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return l(V),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=p();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};function Z(n){let e,o,r;return{c(){e=p("button"),e.textContent="☰",y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=m(e,"click",n[11]),o=!0)},p:t,d(t){t&&d(e),o=!1,r()}}}function tt(t){let n,e;return{c(){n=p("img"),y(n,"height","30px"),y(n,"vertical-align","middle"),g(n,"alt",""),l(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!l(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,a,s;return{c(){n=p("hb-dropdown-simple"),e=p("span"),o=p("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),l(o.src,r=t[2].imgUri)||g(o,"src",r),g(e,"slot","dropdownbutton"),v(n,"style",t[4]),v(n,"list",i=JSON.stringify(t[2].list)),v(n,"position","right")},m(r,i){u(r,n,i),c(n,e),c(e,o),a||(s=m(n,"dropDownClick",t[14]),a=!0)},p(t,e){4&e&&!l(o.src,r=t[2].imgUri)&&g(o,"src",r),16&e&&v(n,"style",t[4]),4&e&&i!==(i=JSON.stringify(t[2].list))&&v(n,"list",i)},d(t){t&&d(n),a=!1,s()}}}function et(n){let e,r,i,a,s,l,v,$,b,w,x,_,E,k,C,L,D,T,A,N,O,S,P,j=!n[3]&&Z(n),z=n[1]&&tt(n),M=n[2]&&nt(n);return{c(){e=p("nav"),r=p("div"),i=p("div"),a=p("div"),j&&j.c(),s=h(),l=p("span"),l.innerHTML='<slot name="left-slot"></slot>',v=h(),$=p("div"),b=p("div"),w=p("span"),x=p("slot"),z&&z.c(),_=h(),E=f(n[0]),k=h(),C=p("slot"),L=h(),D=p("div"),T=p("div"),A=p("div"),N=p("slot"),O=h(),M&&M.c(),this.c=t,y(l,"cursor","pointer"),g(a,"id","left_side_content"),g(a,"class","side"),y(i,"padding-left","10px"),g(r,"id","left_side"),g(r,"class","navitem"),g(r,"part","left-slot"),g(x,"name","brand"),y(w,"cursor","pointer"),g(C,"name","center-slot"),g(b,"class","side"),y(b,"margin","auto"),y(b,"max-width","100%"),g($,"id","center_side"),g($,"part","center-slot"),g($,"class","navitem"),g(N,"name","right-slot"),g(A,"class","side"),g(T,"id","rigth_side_content"),g(D,"id","rigth_side"),g(D,"part","right-slot"),g(D,"class","navitem"),g(e,"id","navbar")},m(t,o){u(t,e,o),c(e,r),c(r,i),c(i,a),j&&j.m(a,null),c(a,s),c(a,l),c(e,v),c(e,$),c($,b),c(b,w),c(w,x),z&&z.m(x,null),c(x,_),c(x,E),c(b,k),c(b,C),c(e,L),c(e,D),c(D,T),c(T,A),c(A,N),c(A,O),M&&M.m(A,null),S||(P=[m(l,"click",n[12]),m(w,"click",n[13])],S=!0)},p(t,[n]){t[3]?j&&(j.d(1),j=null):j?j.p(t,n):(j=Z(t),j.c(),j.m(a,s)),t[1]?z?z.p(t,n):(z=tt(t),z.c(),z.m(x,_)):z&&(z.d(1),z=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(E,t[0]),t[2]?M?M.p(t,n):(M=nt(t),M.c(),M.m(A,null)):M&&(M.d(1),M=null)},i:t,o:t,d(t){t&&d(e),j&&j.d(),z&&z.d(),M&&M.d(),S=!1,o(P)}}}function ot(t,n,e){let o,r,{style:i}=n,a="",{id:s}=n,{companybrandname:l}=n,{companylogouri:c}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:p}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const f=w(),h=x();function m(t,n){h(t,n),f.dispatchEvent&&f.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,m("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,s=t.id),"companybrandname"in t&&e(0,l=t.companybrandname),"companylogouri"in t&&e(1,c=t.companylogouri),"switchopen"in t&&e(8,u=t.switchopen),"usermenu"in t&&e(2,d=t.usermenu),"noburger"in t&&e(3,p=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(e(10,o=Y(i)),e(4,a=F.getChildStyleToPass(o,null==I?void 0:I.vars))),l||e(0,l=""),c||e(1,c=""),s||e(7,s=""),u&&"no"!==u?r=!0:(e(8,u=""),r=!1),p||e(3,p=null),d?"string"==typeof d&&e(2,d=JSON.parse(d)):e(2,d=null))},[l,c,d,p,a,m,g,s,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",t.detail.key)]}class rt extends M{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block}.side{position:relative;z-index:1;max-width:33%}#navbar{background-color:#f1f1f1;position:relative;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;color:black}</style>',z(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},ot,et,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",rt),rt}();
1
+ var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let a,s;function l(t,n){return a||(a=document.createElement("a")),a.href=n,t===a.href}function c(t,n){t.appendChild(n)}function u(t,n,e){t.insertBefore(n,e||null)}function d(t){t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function h(){return f(" ")}function m(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function g(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function v(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:g(t,n,e)}function y(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function $(t){const n={};for(const e of t)n[e.name]=e.value;return n}function b(t){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}function x(){const t=w();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],E=[],k=[],C=[],L=Promise.resolve();let D=!1;function T(t){k.push(t)}const A=new Set;let N=0;function O(){const t=s;do{for(;N<_.length;){const t=_[N];N++,b(t),S(t.$$)}for(b(null),_.length=0,N=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];A.has(n)||(A.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();D=!1,A.clear(),b(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(T)}}const P=new Set;function j(t,n){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function z(i,a,l,c,u,p,f,h=[-1]){const m=s;b(i);const g=i.$$={fragment:null,ctx:null,props:p,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};f&&f(g.root);let v=!1;if(g.ctx=l?l(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&j(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();a.intro&&((y=i.$$.fragment)&&y.i&&(P.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,on_mount:l,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,i),a||T((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(T)}(i,a.target,a.anchor,a.customElement),O()}var y,$;b(m)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.17.23";var R,F=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script"))try{var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(R={exports:{}},R.exports),R.exports),I={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,W=/\n/g,B=/^\s*/,U=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,G=/^\s+|\s+$/g,Q="";function X(t){return t?t.replace(G,Q):Q}var Y=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(W);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),c(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(B)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;Q!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,Q===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function p(){var t=i(),n=l(U);if(n){if(d(),!l(q))return s("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return l(V),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=p();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};function Z(n){let e,o,r;return{c(){e=p("button"),e.textContent="☰",y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=m(e,"click",n[11]),o=!0)},p:t,d(t){t&&d(e),o=!1,r()}}}function tt(t){let n,e;return{c(){n=p("img"),y(n,"height","30px"),y(n,"vertical-align","middle"),g(n,"alt",""),l(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!l(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,a,s;return{c(){n=p("hb-dropdown-simple"),e=p("span"),o=p("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),l(o.src,r=t[2].imgUri)||g(o,"src",r),g(e,"slot","dropdownbutton"),v(n,"style",t[4]),v(n,"list",i=JSON.stringify(t[2].list)),v(n,"position","right")},m(r,i){u(r,n,i),c(n,e),c(e,o),a||(s=m(n,"dropDownClick",t[14]),a=!0)},p(t,e){4&e&&!l(o.src,r=t[2].imgUri)&&g(o,"src",r),16&e&&v(n,"style",t[4]),4&e&&i!==(i=JSON.stringify(t[2].list))&&v(n,"list",i)},d(t){t&&d(n),a=!1,s()}}}function et(n){let e,r,i,a,s,l,v,$,b,w,x,_,E,k,C,L,D,T,A,N,O,S,P,j=!n[3]&&Z(n),z=n[1]&&tt(n),M=n[2]&&nt(n);return{c(){e=p("nav"),r=p("div"),i=p("div"),a=p("div"),j&&j.c(),s=h(),l=p("span"),l.innerHTML='<slot name="left-slot"></slot>',v=h(),$=p("div"),b=p("div"),w=p("span"),x=p("slot"),z&&z.c(),_=h(),E=f(n[0]),k=h(),C=p("slot"),L=h(),D=p("div"),T=p("div"),A=p("div"),N=p("slot"),O=h(),M&&M.c(),this.c=t,y(l,"cursor","pointer"),g(a,"id","left_side_content"),g(a,"class","side"),y(i,"padding-left","10px"),g(r,"id","left_side"),g(r,"class","navitem"),g(r,"part","left-slot"),g(x,"name","brand"),y(w,"cursor","pointer"),g(C,"name","center-slot"),g(b,"class","side"),y(b,"margin","auto"),y(b,"max-width","100%"),g($,"id","center_side"),g($,"part","center-slot"),g($,"class","navitem"),g(N,"name","right-slot"),g(A,"class","side"),g(T,"id","rigth_side_content"),g(D,"id","rigth_side"),g(D,"part","right-slot"),g(D,"class","navitem"),g(e,"id","navbar")},m(t,o){u(t,e,o),c(e,r),c(r,i),c(i,a),j&&j.m(a,null),c(a,s),c(a,l),c(e,v),c(e,$),c($,b),c(b,w),c(w,x),z&&z.m(x,null),c(x,_),c(x,E),c(b,k),c(b,C),c(e,L),c(e,D),c(D,T),c(T,A),c(A,N),c(A,O),M&&M.m(A,null),S||(P=[m(l,"click",n[12]),m(w,"click",n[13])],S=!0)},p(t,[n]){t[3]?j&&(j.d(1),j=null):j?j.p(t,n):(j=Z(t),j.c(),j.m(a,s)),t[1]?z?z.p(t,n):(z=tt(t),z.c(),z.m(x,_)):z&&(z.d(1),z=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(E,t[0]),t[2]?M?M.p(t,n):(M=nt(t),M.c(),M.m(A,null)):M&&(M.d(1),M=null)},i:t,o:t,d(t){t&&d(e),j&&j.d(),z&&z.d(),M&&M.d(),S=!1,o(P)}}}function ot(t,n,e){let o,r,{style:i}=n,a="",{id:s}=n,{companybrandname:l}=n,{companylogouri:c}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:p}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const f=w(),h=x();function m(t,n){h(t,n),f.dispatchEvent&&f.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,m("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,s=t.id),"companybrandname"in t&&e(0,l=t.companybrandname),"companylogouri"in t&&e(1,c=t.companylogouri),"switchopen"in t&&e(8,u=t.switchopen),"usermenu"in t&&e(2,d=t.usermenu),"noburger"in t&&e(3,p=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(e(10,o=Y(i)),e(4,a=F.getChildStyleToPass(o,null==I?void 0:I.vars))),l||e(0,l=""),c||e(1,c=""),s||e(7,s=""),u&&"no"!==u?r=!0:(e(8,u=""),r=!1),p||e(3,p=null),d?"string"==typeof d&&e(2,d=JSON.parse(d)):e(2,d=null))},[l,c,d,p,a,m,g,s,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",t.detail.key)]}class rt extends M{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block}.side{position:relative;z-index:1;max-width:33%}#navbar{background-color:#f1f1f1;position:relative;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;color:black}</style>',z(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},ot,et,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",rt),rt}();
2
2
  //# sourceMappingURL=release.js.map