@telia-ace/widget-components-widget-header-flamingo 1.1.76-rc.20 → 1.1.76-rc.22

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/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-9af56567.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-59f31482.js")))};module.exports=r;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const t = async (e) => {
2
- e.registerComponent("widget-header", import("./widget-header-4ebcdda5.mjs"));
2
+ e.registerComponent("widget-header", import("./widget-header-57db7d27.mjs"));
3
3
  };
4
4
  export {
5
5
  t as default
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.1.76-rc.20",
3
+ "version": "1.1.76-rc.22",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
- "@telia-ace/widget-core-flamingo": "1.1.76-rc.20",
6
+ "@telia-ace/widget-core-flamingo": "1.1.76-rc.22",
7
7
  "@teliads/components": "^22.1.1",
8
8
  "@teliads/icons": "^8.4.0",
9
9
  "@lit-labs/motion": "^1.0.6",
@@ -2712,7 +2712,7 @@ ne.styles = j`
2712
2712
  }
2713
2713
 
2714
2714
  :host(.embedded) {
2715
- padding: 40px !important;
2715
+ padding: 40px 20px 20px 40px !important;
2716
2716
  }
2717
2717
 
2718
2718
  @media screen and (max-device-width: 800px) {
@@ -3593,7 +3593,18 @@ class qi extends Yi {
3593
3593
  this.optionsIsVisible = !this.optionsIsVisible;
3594
3594
  }
3595
3595
  _onMinimizeClick() {
3596
- this.application.trigger && this.application.trigger.toggleActive();
3596
+ this.application.trigger ? this.application.trigger.toggleActive() : this.notify("widget-minimize", {
3597
+ widgetId: this.application.id
3598
+ });
3599
+ }
3600
+ notify(t, e = {}) {
3601
+ window != null && window.parent && window.parent.postMessage(
3602
+ {
3603
+ type: t,
3604
+ data: e
3605
+ },
3606
+ "*"
3607
+ );
3597
3608
  }
3598
3609
  connectedCallback() {
3599
3610
  super.connectedCallback(), document.addEventListener("click", this._onClickOutside);
@@ -332,7 +332,7 @@
332
332
  }
333
333
 
334
334
  :host(.embedded) {
335
- padding: 40px !important;
335
+ padding: 40px 20px 20px 40px !important;
336
336
  }
337
337
 
338
338
  @media screen and (max-device-width: 800px) {
@@ -442,7 +442,7 @@
442
442
  :host {
443
443
  display: block;
444
444
  }
445
- `];oe([_({attribute:!0})],at.prototype,"name",2);oe([H()],at.prototype,"widget",2);oe([H()],at.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",T);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ki);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",at);const kn=()=>crypto.randomUUID();class On{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new kt,this.id=kn(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Tn{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new On(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(t){this._options=this._options.filter(e=>e.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=ks(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}const D={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let B,Oi,Tt,Ti=!1,wt=!1,ae=!1,y=!1,Ue=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Pi=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},Pn=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ln=i=>Promise.resolve(i),In=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Li=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Un(i,n),l=Rn(t,o),c=Mn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Rn=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){lt(s)}},Un=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,Mn=i=>Pn?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Me="http://www.w3.org/1999/xlink",M=(i,t="")=>()=>{},je=new WeakMap,jn=(i,t,e)=>{let s=At.get(i);In&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,At.set(i,s)},Hn=(i,t,e,s)=>{let n=Ii(t,e),r=At.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=je.get(i),a;o||je.set(i,o=new Set),o.has(n)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Nn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=M("attachStyles",t.$tagName$),r=Hn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Ii=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Dn=i=>pr.map(t=>t(i)).find(t=>!!t),He={},Bn="http://www.w3.org/2000/svg",zn="http://www.w3.org/1999/xhtml",Wn=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),F=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=u=>{for(let d=0;d<u.length;d++)s=u[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!le(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?xt(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const u=t.className||t.class;u&&(t.class=typeof u!="object"?u:Object.keys(u).filter(d=>u[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Yn);const h=xt(i,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=r,h},xt=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},ce={},Fn=i=>i&&i.$tag$===ce,Yn={forEach:(i,t)=>i.map(Ne).forEach(t),map:(i,t)=>i.map(Ne).map(t).map(qn)},Ne=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),qn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),F(i.vtag,e,...i.vchildren||[])}const t=xt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},De=(i,t,e,s,n,r)=>{if(e!==s){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Be(e),h=Be(s);l.remove(...c.filter(u=>u&&!h.includes(u))),l.add(...h.filter(u=>u&&!c.includes(u)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),s&&m.ael(i,t,s,!1);else{const l=le(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let h=s??"";t==="list"?o=!1:(e==null||i[t]!=h)&&(i[t]=h)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Me,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Me,t,s):i.setAttribute(t,s))}}},Gn=/\s/,Be=i=>i?i.split(Gn):[],Ri=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||He,o=t.$attrs$||He;for(s in r)s in o||De(n,s,r[s],void 0,e,t.$flags$);for(s in o)De(n,s,r[s],o[s],e,t.$flags$)},St=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Ti||(ae=!0,n.$tag$==="slot"&&(B&&s.classList.add(B+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=A.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=A.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=A.createElementNS(y?Bn:zn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Ri(null,n,y),Wn(B)&&o["s-si"]!==B&&o.classList.add(o["s-si"]=B),n.$children$)for(r=0;r<n.$children$.length;++r)a=St(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Oi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Tt&&n["s-ol"]&&(ji(n).insertBefore(n,he(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ae=!0),t&&nt(n,t)}m.$flags$&=-2},Ui=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=St(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,he(t))))},Mi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Di(s),wt=!0,n["s-ol"]?n["s-ol"].remove():nt(n,!0),n.remove())},Zn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],u=s.length-1,d=s[0],f=s[u],v,g;for(;n<=l&&r<=u;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--u];else if(ut(c,d))z(c,d),c=t[++n],d=s[++r];else if(ut(h,f))z(h,f),h=t[--l],f=s[--u];else if(ut(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),z(c,f),i.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],f=s[--u];else if(ut(h,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(h.$elm$.parentNode,!1),z(h,d),i.insertBefore(h.$elm$,c.$elm$),h=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?v=St(t&&t[r],e,o,i):(z(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=St(t&&t[r],e,r,i),d=s[++r]),v&&ji(c.$elm$).insertBefore(v,he(c.$elm$))}n>l?Ui(i,s[u+1]==null?null:s[u+1].$elm$,e,s,r,u):r>u&&Mi(t,n,l)},ut=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,he=i=>i&&i["s-ol"]||i,ji=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ri(i,t,y),s!==null&&n!==null?Zn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Ui(e,null,t,n,0,n.length-1)):s!==null&&Mi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Hi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Hi(e)}},x=[],Ni=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ze(e,n)?(r=x.find(h=>h.$nodeToRelocate$===e),wt=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(h=>{ze(h.$nodeToRelocate$,e["s-sn"])&&(r=x.find(u=>u.$nodeToRelocate$===e),r&&!h.$slotRefNode$&&(h.$slotRefNode$=r.$slotRefNode$))})):x.some(h=>h.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Ni(t)}},ze=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Di=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Di)},Kn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||xt(null,null),r=Fn(t)?t:F(null,null,t);Tt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,B=e["s-sc"],Oi=e["s-cr"],Ti=(s.$flags$&1)!==0,wt=!1,z(n,r);{if(m.$flags$|=1,ae){Ni(r.$elm$);let o,a,l,c,h,u,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(u=l["s-nr"],u&&u["s-sn"]===a["s-sn"]&&c===u.parentNode&&(u=u.nextSibling,!u||!u["s-nr"])){h=u;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}wt&&Hi(r.$elm$),m.$flags$&=-2,x.length=0}},Xn=i=>i,Qn=(i,t,e)=>{const s=Xn(i);return{emit:n=>Jn(s,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},Jn=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},Vn=(i,t)=>{},Bi=(i,t)=>(i.$flags$|=16,Vn(i,i.$ancestorComponent$),$r(()=>tr(i,t))),tr=(i,t)=>{const e=i.$hostElement$,s=M("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=Y(n,"componentWillLoad"):r=Y(n,"componentWillUpdate"),r=We(r,()=>Y(n,"componentWillRender")),s(),We(r,()=>er(i,n,t))},er=async(i,t,e)=>{const s=i.$hostElement$,n=M("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Nn(i);const r=M("render",i.$cmpMeta$.$tagName$);ir(i,t,s),r(),n(),sr(i)},ir=(i,t,e)=>{try{Ue=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(D.hasRenderFn||D.reflect)&&(D.vdomRender||D.reflect)&&(D.hydrateServerSide||Kn(i,t))}catch(a){lt(a,i.$hostElement$)}return Ue=null,null},sr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=M("postUpdate",t),n=e;i.$ancestorComponent$,Y(n,"componentDidRender"),i.$flags$&64?(Y(n,"componentDidUpdate"),s()):(i.$flags$|=64,Y(n,"componentDidLoad"),s())},Y=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){lt(s)}},We=(i,t)=>i&&i.then?i.then(t):t(),nr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,rr=(i,t)=>Lt(i).$instanceValues$.get(t),or=(i,t,e,s)=>{const n=Lt(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=nr(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const u=s.$watchers$[t];u&&u.map(d=>{try{l[d](e,o,t)}catch(f){lt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Bi(n,!1)}}}},ar=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return rr(this,r)},set(a){or(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},lr=async(i,t,e,s,n)=>{if(!(t.$flags$&32)&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Dn(i)]);const a=Ii(e,t.$modeName$);if(!At.has(a)){const l=M("registerStyles",e.$tagName$);jn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Bi(t,!0))()},cr=i=>{},hr=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,s=M("connectedCallback",e.$tagName$);t.$flags$&1?(Li(i,t,e.$listeners$),cr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&ur(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),lr(i,t,e)),s()}},ur=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},dr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},zi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){fr(this,e)},connectedCallback(){hr(this),s&&s.call(this)},disconnectedCallback(){dr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,ar(i,e)},Wi=new WeakMap,Lt=i=>Wi.get(i),fr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Li(i,e,t.$listeners$),Wi.set(i,e)},Fe=(i,t)=>t in i,lt=(i,t)=>(0,console.error)(i,t),At=new Map,pr=[],Ye=[],Fi=[],gr=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?vr(Zt):m.raf(Zt))},qe=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){lt(e)}i.length=0},Zt=()=>{qe(Ye),qe(Fi),(Gt=Ye.length>0)&&m.raf(Zt)},vr=i=>Ln().then(i),$r=gr(Fi,!0),mr=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},yr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function br(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=br(new Date)}}const wr="telia-vst{display:none}",xr=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Qn(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return F(ce,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,xr);break}})}Yi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Sr(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Ar(){return Kt().vocadsIconsRegistered}const Cr=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",Er=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ar()&&this.name){const i=Sr();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=mr({content:yr(i),attributes:t,title:this.allyTitle});return F(ce,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function kr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Er);break;case"telia-vst":customElements.get(t)||Yi();break}})}kr();var Or=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Pr=(i,t,e,s)=>{for(var n=s>1?void 0:s?Tr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&Or(t,e,n),n};const qi=Ei(S);class It extends qi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Tn(this),this.optionsRef=bt(),this.optionsTriggerRef=bt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}_onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}_onMinimizeClick(){this.application.trigger&&this.application.trigger.toggleActive()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var a,l,c;const t=this.application.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=this.application.settings.components.conversation,o=(c=(l=r==null?void 0:r.properties)==null?void 0:l.chat)==null?void 0:c.isThirdPartyWidget;return b` <div class="widget-header">
445
+ `];oe([_({attribute:!0})],at.prototype,"name",2);oe([H()],at.prototype,"widget",2);oe([H()],at.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",T);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ki);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",at);const kn=()=>crypto.randomUUID();class On{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new kt,this.id=kn(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Tn{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new On(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(t){this._options=this._options.filter(e=>e.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=ks(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}const D={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let B,Oi,Tt,Ti=!1,wt=!1,ae=!1,y=!1,Ue=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Pi=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},Pn=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ln=i=>Promise.resolve(i),In=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Li=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Un(i,n),l=Rn(t,o),c=Mn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Rn=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){lt(s)}},Un=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,Mn=i=>Pn?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Me="http://www.w3.org/1999/xlink",M=(i,t="")=>()=>{},je=new WeakMap,jn=(i,t,e)=>{let s=At.get(i);In&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,At.set(i,s)},Hn=(i,t,e,s)=>{let n=Ii(t,e),r=At.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=je.get(i),a;o||je.set(i,o=new Set),o.has(n)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Nn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=M("attachStyles",t.$tagName$),r=Hn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Ii=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Dn=i=>pr.map(t=>t(i)).find(t=>!!t),He={},Bn="http://www.w3.org/2000/svg",zn="http://www.w3.org/1999/xhtml",Wn=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),F=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=u=>{for(let d=0;d<u.length;d++)s=u[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!le(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?xt(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const u=t.className||t.class;u&&(t.class=typeof u!="object"?u:Object.keys(u).filter(d=>u[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Yn);const h=xt(i,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=r,h},xt=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},ce={},Fn=i=>i&&i.$tag$===ce,Yn={forEach:(i,t)=>i.map(Ne).forEach(t),map:(i,t)=>i.map(Ne).map(t).map(qn)},Ne=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),qn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),F(i.vtag,e,...i.vchildren||[])}const t=xt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},De=(i,t,e,s,n,r)=>{if(e!==s){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Be(e),h=Be(s);l.remove(...c.filter(u=>u&&!h.includes(u))),l.add(...h.filter(u=>u&&!c.includes(u)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),s&&m.ael(i,t,s,!1);else{const l=le(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let h=s??"";t==="list"?o=!1:(e==null||i[t]!=h)&&(i[t]=h)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Me,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Me,t,s):i.setAttribute(t,s))}}},Gn=/\s/,Be=i=>i?i.split(Gn):[],Ri=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||He,o=t.$attrs$||He;for(s in r)s in o||De(n,s,r[s],void 0,e,t.$flags$);for(s in o)De(n,s,r[s],o[s],e,t.$flags$)},St=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Ti||(ae=!0,n.$tag$==="slot"&&(B&&s.classList.add(B+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=A.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=A.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=A.createElementNS(y?Bn:zn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Ri(null,n,y),Wn(B)&&o["s-si"]!==B&&o.classList.add(o["s-si"]=B),n.$children$)for(r=0;r<n.$children$.length;++r)a=St(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Oi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Tt&&n["s-ol"]&&(ji(n).insertBefore(n,he(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ae=!0),t&&nt(n,t)}m.$flags$&=-2},Ui=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=St(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,he(t))))},Mi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Di(s),wt=!0,n["s-ol"]?n["s-ol"].remove():nt(n,!0),n.remove())},Zn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],u=s.length-1,d=s[0],f=s[u],v,g;for(;n<=l&&r<=u;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--u];else if(ut(c,d))z(c,d),c=t[++n],d=s[++r];else if(ut(h,f))z(h,f),h=t[--l],f=s[--u];else if(ut(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),z(c,f),i.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],f=s[--u];else if(ut(h,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(h.$elm$.parentNode,!1),z(h,d),i.insertBefore(h.$elm$,c.$elm$),h=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?v=St(t&&t[r],e,o,i):(z(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=St(t&&t[r],e,r,i),d=s[++r]),v&&ji(c.$elm$).insertBefore(v,he(c.$elm$))}n>l?Ui(i,s[u+1]==null?null:s[u+1].$elm$,e,s,r,u):r>u&&Mi(t,n,l)},ut=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,he=i=>i&&i["s-ol"]||i,ji=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ri(i,t,y),s!==null&&n!==null?Zn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Ui(e,null,t,n,0,n.length-1)):s!==null&&Mi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Hi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Hi(e)}},x=[],Ni=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ze(e,n)?(r=x.find(h=>h.$nodeToRelocate$===e),wt=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(h=>{ze(h.$nodeToRelocate$,e["s-sn"])&&(r=x.find(u=>u.$nodeToRelocate$===e),r&&!h.$slotRefNode$&&(h.$slotRefNode$=r.$slotRefNode$))})):x.some(h=>h.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Ni(t)}},ze=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Di=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Di)},Kn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||xt(null,null),r=Fn(t)?t:F(null,null,t);Tt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,B=e["s-sc"],Oi=e["s-cr"],Ti=(s.$flags$&1)!==0,wt=!1,z(n,r);{if(m.$flags$|=1,ae){Ni(r.$elm$);let o,a,l,c,h,u,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(u=l["s-nr"],u&&u["s-sn"]===a["s-sn"]&&c===u.parentNode&&(u=u.nextSibling,!u||!u["s-nr"])){h=u;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}wt&&Hi(r.$elm$),m.$flags$&=-2,x.length=0}},Xn=i=>i,Qn=(i,t,e)=>{const s=Xn(i);return{emit:n=>Jn(s,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},Jn=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},Vn=(i,t)=>{},Bi=(i,t)=>(i.$flags$|=16,Vn(i,i.$ancestorComponent$),$r(()=>tr(i,t))),tr=(i,t)=>{const e=i.$hostElement$,s=M("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=Y(n,"componentWillLoad"):r=Y(n,"componentWillUpdate"),r=We(r,()=>Y(n,"componentWillRender")),s(),We(r,()=>er(i,n,t))},er=async(i,t,e)=>{const s=i.$hostElement$,n=M("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Nn(i);const r=M("render",i.$cmpMeta$.$tagName$);ir(i,t,s),r(),n(),sr(i)},ir=(i,t,e)=>{try{Ue=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(D.hasRenderFn||D.reflect)&&(D.vdomRender||D.reflect)&&(D.hydrateServerSide||Kn(i,t))}catch(a){lt(a,i.$hostElement$)}return Ue=null,null},sr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=M("postUpdate",t),n=e;i.$ancestorComponent$,Y(n,"componentDidRender"),i.$flags$&64?(Y(n,"componentDidUpdate"),s()):(i.$flags$|=64,Y(n,"componentDidLoad"),s())},Y=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){lt(s)}},We=(i,t)=>i&&i.then?i.then(t):t(),nr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,rr=(i,t)=>Lt(i).$instanceValues$.get(t),or=(i,t,e,s)=>{const n=Lt(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=nr(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const u=s.$watchers$[t];u&&u.map(d=>{try{l[d](e,o,t)}catch(f){lt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Bi(n,!1)}}}},ar=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return rr(this,r)},set(a){or(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},lr=async(i,t,e,s,n)=>{if(!(t.$flags$&32)&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Dn(i)]);const a=Ii(e,t.$modeName$);if(!At.has(a)){const l=M("registerStyles",e.$tagName$);jn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Bi(t,!0))()},cr=i=>{},hr=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,s=M("connectedCallback",e.$tagName$);t.$flags$&1?(Li(i,t,e.$listeners$),cr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&ur(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),lr(i,t,e)),s()}},ur=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},dr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},zi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){fr(this,e)},connectedCallback(){hr(this),s&&s.call(this)},disconnectedCallback(){dr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,ar(i,e)},Wi=new WeakMap,Lt=i=>Wi.get(i),fr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Li(i,e,t.$listeners$),Wi.set(i,e)},Fe=(i,t)=>t in i,lt=(i,t)=>(0,console.error)(i,t),At=new Map,pr=[],Ye=[],Fi=[],gr=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?vr(Zt):m.raf(Zt))},qe=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){lt(e)}i.length=0},Zt=()=>{qe(Ye),qe(Fi),(Gt=Ye.length>0)&&m.raf(Zt)},vr=i=>Ln().then(i),$r=gr(Fi,!0),mr=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},yr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function br(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=br(new Date)}}const wr="telia-vst{display:none}",xr=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Qn(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return F(ce,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,xr);break}})}Yi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Sr(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Ar(){return Kt().vocadsIconsRegistered}const Cr=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",Er=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ar()&&this.name){const i=Sr();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=mr({content:yr(i),attributes:t,title:this.allyTitle});return F(ce,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function kr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Er);break;case"telia-vst":customElements.get(t)||Yi();break}})}kr();var Or=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Pr=(i,t,e,s)=>{for(var n=s>1?void 0:s?Tr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&Or(t,e,n),n};const qi=Ei(S);class It extends qi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Tn(this),this.optionsRef=bt(),this.optionsTriggerRef=bt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}_onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}_onMinimizeClick(){this.application.trigger?this.application.trigger.toggleActive():this.notify("widget-minimize",{widgetId:this.application.id})}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var a,l,c;const t=this.application.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=this.application.settings.components.conversation,o=(c=(l=r==null?void 0:r.properties)==null?void 0:l.chat)==null?void 0:c.isThirdPartyWidget;return b` <div class="widget-header">
446
446
  ${e?b` <img
447
447
  src=${e}
448
448
  class="logotype"
@@ -12,6 +12,7 @@ export declare class WidgetHeader extends WidgetElement {
12
12
  removeOption(option: WidgetHeaderOption): void;
13
13
  private _onToggleOptionsMenuClick;
14
14
  private _onMinimizeClick;
15
+ notify(type: string, data?: Record<string, any>): void;
15
16
  connectedCallback(): void;
16
17
  disconnectedCallback(): void;
17
18
  private _onClickOutside;