@telia-ace/widget-conversational-hub 1.1.121-rc.0 → 1.1.121-rc.2

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.
Files changed (3) hide show
  1. package/index.js +8 -8
  2. package/index.mjs +56 -56
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";var xa=Object.defineProperty;var wa=(n,e,t)=>e in n?xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e,t)=>wa(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class Ss{constructor(){this.registeredProviders=new Map}static async getInstance(e){let t=await e.get("conversation");return t||(t=new Ss,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}}var ss=function(n,e){return ss=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])},ss(n,e)};function at(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ss(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ka(n,e,t,s){function i(r){return r instanceof t?r:new t(function(o){o(r)})}return new(t||(t=Promise))(function(r,o){function a(u){try{c(s.next(u))}catch(p){o(p)}}function l(u){try{c(s.throw(u))}catch(p){o(p)}}function c(u){u.done?r(u.value):i(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})}function Br(n,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(t=0)),t;)try{if(s=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){t.label=c[1];break}if(c[0]===6&&t.label<r[1]){t.label=r[1],r=c;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(c);break}r[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(n,t)}catch(u){c=[6,u],i=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function nt(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],s=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ne(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var s=t.call(n),i,r=[],o;try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return r}function st(n,e,t){if(t||arguments.length===2)for(var s=0,i=e.length,r;s<i;s++)(r||!(s in e))&&(r||(r=Array.prototype.slice.call(e,0,s)),r[s]=e[s]);return n.concat(r||Array.prototype.slice.call(e))}function Qe(n){return this instanceof Qe?(this.v=n,this):new Qe(n)}function Sa(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,p)}}function a(g,m){s[g]&&(i[g]=function(y){return new Promise(function(ce,J){r.push([g,y,ce,J])>1||l(g,y)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(s[g](m))}catch(y){d(r[0][3],y)}}function c(g){g.value instanceof Qe?Promise.resolve(g.value.v).then(u,p):d(r[0][2],g)}function u(g){l("next",g)}function p(g){l("throw",g)}function d(g,m){g(m),r.shift(),r.length&&l(r[0][0],r[0][1])}}function _a(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof nt=="function"?nt(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(o){return new Promise(function(a,l){o=n[r](o),i(a,l,o.done,o.value)})}}function i(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}}function E(n){return typeof n=="function"}function Fr(n){var e=function(s){Error.call(s),s.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var jn=Fr(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
2
2
  `+t.map(function(s,i){return i+1+") "+s.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=t}});function is(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var yn=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,s,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=nt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(y){e={error:y}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(E(u))try{u()}catch(y){r=y instanceof jn?y.errors:[y]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=nt(p),g=d.next();!g.done;g=d.next()){var m=g.value;try{Ni(m)}catch(y){r=r??[],y instanceof jn?r=st(st([],Ne(r)),Ne(y.errors)):r.push(y)}}}catch(y){s={error:y}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(s)throw s.error}}}if(r)throw new jn(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Ni(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&is(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&is(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}(),jr=yn.EMPTY;function qr(n){return n instanceof yn||n&&"closed"in n&&E(n.remove)&&E(n.add)&&E(n.unsubscribe)}function Ni(n){E(n)?n():n.unsubscribe()}var Ea={Promise:void 0},Aa={setTimeout:function(n,e){for(var t=[],s=2;s<arguments.length;s++)t[s-2]=arguments[s];return setTimeout.apply(void 0,st([n,e],Ne(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Wr(n){Aa.setTimeout(function(){throw n})}function en(){}function Kt(n){n()}var _s=function(n){at(e,n);function e(t){var s=n.call(this)||this;return s.isStopped=!1,t?(s.destination=t,qr(t)&&t.add(s)):s.destination=Ra,s}return e.create=function(t,s,i){return new rs(t,s,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(yn),Ca=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(s){Wt(s)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(s){Wt(s)}else Wt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Wt(t)}},n}(),rs=function(n){at(e,n);function e(t,s,i){var r=n.call(this)||this,o;return E(t)||!t?o={next:t??void 0,error:s??void 0,complete:i??void 0}:o=t,r.destination=new Ca(o),r}return e}(_s);function Wt(n){Wr(n)}function Ta(n){throw n}var Ra={closed:!0,next:en,error:Ta,complete:en},Es=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Lt(n){return n}function La(n){return n.length===0?Lt:n.length===1?n[0]:function(t){return n.reduce(function(s,i){return i(s)},t)}}var X=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,s){var i=this,r=Pa(e)?e:new rs(e,t,s);return Kt(function(){var o=i,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var s=this;return t=Di(t),new t(function(i,r){var o=new rs({next:function(a){try{e(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:i});s.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[Es]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return La(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Di(e),new e(function(s,i){var r;t.subscribe(function(o){return r=o},function(o){return i(o)},function(){return s(r)})})},n.create=function(e){return new n(e)},n}();function Di(n){var e;return(e=n??Ea.Promise)!==null&&e!==void 0?e:Promise}function Oa(n){return n&&E(n.next)&&E(n.error)&&E(n.complete)}function Pa(n){return n&&n instanceof _s||Oa(n)&&qr(n)}function Ia(n){return E(n==null?void 0:n.lift)}function ye(n){return function(e){if(Ia(e))return e.lift(function(t){try{return n(t,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function V(n,e,t,s,i){return new Ma(n,e,t,s,i)}var Ma=function(n){at(e,n);function e(t,s,i,r,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=r?function(c){try{r(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(_s),Na=Fr(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),I=function(n){at(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var s=new Ui(this,this);return s.operator=t,s},e.prototype._throwIfClosed=function(){if(this.closed)throw new Na},e.prototype.next=function(t){var s=this;Kt(function(){var i,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=nt(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var s=this;Kt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=t;for(var i=s.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;Kt(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var s=t.observers;s.length;)s.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var s=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?jr:(this.currentObservers=null,a.push(t),new yn(function(){s.currentObservers=null,is(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var s=this,i=s.hasError,r=s.thrownError,o=s.isStopped;i?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new X;return t.source=this,t},e.create=function(t,s){return new Ui(t,s)},e}(X),Ui=function(n){at(e,n);function e(t,s){var i=n.call(this)||this;return i.destination=t,i.source=s,i}return e.prototype.next=function(t){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.next)===null||i===void 0||i.call(s,t)},e.prototype.error=function(t){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.error)===null||i===void 0||i.call(s,t)},e.prototype.complete=function(){var t,s;(s=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||s===void 0||s.call(t)},e.prototype._subscribe=function(t){var s,i;return(i=(s=this.source)===null||s===void 0?void 0:s.subscribe(t))!==null&&i!==void 0?i:jr},e}(I),F=function(n){at(e,n);function e(t){var s=n.call(this)||this;return s._value=t,s}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var s=n.prototype._subscribe.call(this,t);return!s.closed&&t.next(this._value),s},e.prototype.getValue=function(){var t=this,s=t.hasError,i=t.thrownError,r=t._value;if(s)throw i;return this._throwIfClosed(),r},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e}(I),Ot=new X(function(n){return n.complete()});function Da(n){return n&&E(n.schedule)}function As(n){return n[n.length-1]}function Gr(n){return E(As(n))?n.pop():void 0}function Cs(n){return Da(As(n))?n.pop():void 0}function Ua(n,e){return typeof As(n)=="number"?n.pop():e}var Ts=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Zr(n){return E(n==null?void 0:n.then)}function Yr(n){return E(n[Es])}function Xr(n){return Symbol.asyncIterator&&E(n==null?void 0:n[Symbol.asyncIterator])}function Kr(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function za(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vr=za();function Qr(n){return E(n==null?void 0:n[Vr])}function Jr(n){return Sa(this,arguments,function(){var t,s,i,r;return Br(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Qe(t.read())];case 3:return s=o.sent(),i=s.value,r=s.done,r?[4,Qe(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Qe(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eo(n){return E(n==null?void 0:n.getReader)}function le(n){if(n instanceof X)return n;if(n!=null){if(Yr(n))return Ha(n);if(Ts(n))return Ba(n);if(Zr(n))return Fa(n);if(Xr(n))return to(n);if(Qr(n))return ja(n);if(eo(n))return qa(n)}throw Kr(n)}function Ha(n){return new X(function(e){var t=n[Es]();if(E(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ba(n){return new X(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Fa(n){return new X(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Wr)})}function ja(n){return new X(function(e){var t,s;try{for(var i=nt(n),r=i.next();!r.done;r=i.next()){var o=r.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{r&&!r.done&&(s=i.return)&&s.call(i)}finally{if(t)throw t.error}}e.complete()})}function to(n){return new X(function(e){Wa(n,e).catch(function(t){return e.error(t)})})}function qa(n){return to(Jr(n))}function Wa(n,e){var t,s,i,r;return ka(this,void 0,void 0,function(){var o,a;return Br(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=_a(n),l.label=1;case 1:return[4,t.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),i={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=t.return)?[4,r.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ke(n,e,t,s,i){s===void 0&&(s=0),i===void 0&&(i=!1);var r=e.schedule(function(){t(),i?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(r),!i)return r}function no(n,e){return e===void 0&&(e=0),ye(function(t,s){t.subscribe(V(s,function(i){return ke(s,n,function(){return s.next(i)},e)},function(){return ke(s,n,function(){return s.complete()},e)},function(i){return ke(s,n,function(){return s.error(i)},e)}))})}function so(n,e){return e===void 0&&(e=0),ye(function(t,s){s.add(n.schedule(function(){return t.subscribe(s)},e))})}function Ga(n,e){return le(n).pipe(so(e),no(e))}function Za(n,e){return le(n).pipe(so(e),no(e))}function Ya(n,e){return new X(function(t){var s=0;return e.schedule(function(){s===n.length?t.complete():(t.next(n[s++]),t.closed||this.schedule())})})}function Xa(n,e){return new X(function(t){var s;return ke(t,e,function(){s=n[Vr](),ke(t,e,function(){var i,r,o;try{i=s.next(),r=i.value,o=i.done}catch(a){t.error(a);return}o?t.complete():t.next(r)},0,!0)}),function(){return E(s==null?void 0:s.return)&&s.return()}})}function io(n,e){if(!n)throw new Error("Iterable cannot be null");return new X(function(t){ke(t,e,function(){var s=n[Symbol.asyncIterator]();ke(t,e,function(){s.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function Ka(n,e){return io(Jr(n),e)}function Va(n,e){if(n!=null){if(Yr(n))return Ga(n,e);if(Ts(n))return Ya(n,e);if(Zr(n))return Za(n,e);if(Xr(n))return io(n,e);if(Qr(n))return Xa(n,e);if(eo(n))return Ka(n,e)}throw Kr(n)}function $n(n,e){return e?Va(n,e):le(n)}function os(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n);return $n(n,t)}function tn(n,e){return ye(function(t,s){var i=0;t.subscribe(V(s,function(r){s.next(n.call(e,r,i++))}))})}var Qa=Array.isArray;function Ja(n,e){return Qa(e)?n.apply(void 0,st([],Ne(e))):n(e)}function ro(n){return tn(function(e){return Ja(n,e)})}var el=Array.isArray,tl=Object.getPrototypeOf,nl=Object.prototype,sl=Object.keys;function il(n){if(n.length===1){var e=n[0];if(el(e))return{args:e,keys:null};if(rl(e)){var t=sl(e);return{args:t.map(function(s){return e[s]}),keys:t}}}return{args:n,keys:null}}function rl(n){return n&&typeof n=="object"&&tl(n)===nl}function ol(n,e){return n.reduce(function(t,s,i){return t[s]=e[i],t},{})}function al(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n),s=Gr(n),i=il(n),r=i.args,o=i.keys;if(r.length===0)return $n([],t);var a=new X(ll(r,t,o?function(l){return ol(o,l)}:Lt));return s?a.pipe(ro(s)):a}function ll(n,e,t){return t===void 0&&(t=Lt),function(s){zi(e,function(){for(var i=n.length,r=new Array(i),o=i,a=i,l=function(u){zi(e,function(){var p=$n(n[u],e),d=!1;p.subscribe(V(s,function(g){r[u]=g,d||(d=!0,a--),a||s.next(t(r.slice()))},function(){--o||s.complete()}))},s)},c=0;c<i;c++)l(c)},s)}}function zi(n,e,t){n?ke(t,n,e):e()}function cl(n,e,t,s,i,r,o,a){var l=[],c=0,u=0,p=!1,d=function(){p&&!l.length&&!c&&e.complete()},g=function(y){return c<s?m(y):l.push(y)},m=function(y){c++;var ce=!1;le(t(y,u++)).subscribe(V(e,function(J){e.next(J)},function(){ce=!0},void 0,function(){if(ce)try{c--;for(var J=function(){var xe=l.shift();o||m(xe)};l.length&&c<s;)J();d()}catch(xe){e.error(xe)}}))};return n.subscribe(V(e,g,function(){p=!0,d()})),function(){}}function Rs(n,e,t){return t===void 0&&(t=1/0),E(e)?Rs(function(s,i){return tn(function(r,o){return e(s,r,i,o)})(le(n(s,i)))},t):(typeof e=="number"&&(t=e),ye(function(s,i){return cl(s,i,n,t)}))}function ul(n){return n===void 0&&(n=1/0),Rs(Lt,n)}var hl=["addListener","removeListener"],dl=["addEventListener","removeEventListener"],pl=["on","off"];function nn(n,e,t,s){if(E(t)&&(s=t,t=void 0),s)return nn(n,e,t).pipe(ro(s));var i=Ne(ml(n)?dl.map(function(a){return function(l){return n[a](e,l,t)}}):fl(n)?hl.map(Hi(n,e)):gl(n)?pl.map(Hi(n,e)):[],2),r=i[0],o=i[1];if(!r&&Ts(n))return Rs(function(a){return nn(a,e,t)})(le(n));if(!r)throw new TypeError("Invalid event target");return new X(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(l),function(){return o(l)}})}function Hi(n,e){return function(t){return function(s){return n[t](e,s)}}}function fl(n){return E(n.addListener)&&E(n.removeListener)}function gl(n){return E(n.on)&&E(n.off)}function ml(n){return E(n.addEventListener)&&E(n.removeEventListener)}function vl(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n),s=Ua(n,1/0),i=n;return i.length?i.length===1?le(i[0]):ul(s)($n(i,t)):Ot}function bl(n,e){return ye(function(t,s){var i=0;t.subscribe(V(s,function(r){return n.call(e,r,i++)&&s.next(r)}))})}function Ie(n){return n<=0?function(){return Ot}:ye(function(e,t){var s=0;e.subscribe(V(t,function(i){++s<=n&&(t.next(i),n<=s&&t.complete())}))})}function Je(n,e){return ye(function(t,s){var i=null,r=0,o=!1,a=function(){return o&&!i&&s.complete()};t.subscribe(V(s,function(l){i==null||i.unsubscribe();var c=0,u=r++;le(n(l,u)).subscribe(i=V(s,function(p){return s.next(e?e(l,p,u,c++):p)},function(){i=null,a()}))},function(){o=!0,a()}))})}function as(n){return ye(function(e,t){le(n).subscribe(V(t,function(){return t.complete()},en)),!t.closed&&e.subscribe(t)})}function ls(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Gr(n);return ye(function(s,i){for(var r=n.length,o=new Array(r),a=n.map(function(){return!1}),l=!1,c=function(p){le(n[p]).subscribe(V(i,function(d){o[p]=d,!l&&!a[p]&&(a[p]=!0,(l=a.every(Lt))&&(a=null))},en))},u=0;u<r;u++)c(u);s.subscribe(V(i,function(p){if(l){var d=st([p],Ne(o));i.next(t?t.apply(void 0,st([],Ne(d))):d)}}))})}var ve=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(ve||{});const yl=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),oo=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():yl();function Bi(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,s=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,i=n.match(t)||[],r=[];let o;for(;(o=s.exec(n))!==null;)r.push(o[1]);return i.filter(l=>!r.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function cs(n){if(n.includes("aceChatGuideTitle"))return $l(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const s=ao(t);if(!s)return t;const i=50;if(s.length>i){const r=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=s.match(r);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),p=i-a.length;let d=c;u&&u.length<p&&c.length>p?d=c.substring(0,p-u.length-4)+".../"+u:d=c.substring(0,p-3)+"...";const g=`${a}${d}`;return us(t,g)}return us(t,s)})}function ao(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function us(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function $l(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const s=ao(t);if(!s)return t;const i=s.split("?").pop(),o=new URLSearchParams(i).get("aceChatGuideTitle");return o?us(t,o):t})}class Pt{constructor(e,t,s){this.type=e,this.sender=t,this.messages=s,this.status="delivered",this.didUpdate=new I,this.actions$=new I,this.remove$=new I,this.timestamp=Date.now(),this.id=oo()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class xl{constructor(e){this.name=e,this.print$=new I}print(e,t="html",s=this.name){const i=new Pt(ve.Agent,{name:s},[{items:[[t,{content:e}]]}]);return this.print$.next(i),i}subscribe(){return this.print$.asObservable()}}class wl{constructor(e){this.name=e,this.print$=new I}print(e){const t=new Pt(ve.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class kl{constructor(){this.print$=new I,this.name="system"}print(e){const t=new Pt(ve.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class Sl{constructor(e,t){this.name=e,this.component=t,this.print$=new I,this.typingState$=new F(!1),this.complete$=new I,this.system=this.createSystem(),this.rehydrate$=new I,this.saveToCurrentSession$=new I,this.showChatOverlay$=new F(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(Ie(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(ve.User,e.text)}print(e,t){const s=new Pt(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(s)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new xl(e);return t.subscribe().subscribe(s=>{this.playNotification(),this.printEntry(s)}),t}createUser(e){const t=new wl(e);return t.subscribe().subscribe(s=>{this.printEntry(s)}),t}createSystem(){const e=new kl;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(i=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
3
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function is(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var yn=(function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,s,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=nt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(y){e={error:y}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(E(u))try{u()}catch(y){r=y instanceof jn?y.errors:[y]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=nt(p),g=d.next();!g.done;g=d.next()){var m=g.value;try{Ni(m)}catch(y){r=r??[],y instanceof jn?r=st(st([],Ne(r)),Ne(y.errors)):r.push(y)}}}catch(y){s={error:y}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(s)throw s.error}}}if(r)throw new jn(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Ni(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&is(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&is(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=(function(){var e=new n;return e.closed=!0,e})(),n})(),jr=yn.EMPTY;function qr(n){return n instanceof yn||n&&"closed"in n&&E(n.remove)&&E(n.add)&&E(n.unsubscribe)}function Ni(n){E(n)?n():n.unsubscribe()}var Ea={Promise:void 0},Aa={setTimeout:function(n,e){for(var t=[],s=2;s<arguments.length;s++)t[s-2]=arguments[s];return setTimeout.apply(void 0,st([n,e],Ne(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Wr(n){Aa.setTimeout(function(){throw n})}function en(){}function Kt(n){n()}var _s=(function(n){at(e,n);function e(t){var s=n.call(this)||this;return s.isStopped=!1,t?(s.destination=t,qr(t)&&t.add(s)):s.destination=Ra,s}return e.create=function(t,s,i){return new rs(t,s,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(yn),Ca=(function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(s){Wt(s)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(s){Wt(s)}else Wt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Wt(t)}},n})(),rs=(function(n){at(e,n);function e(t,s,i){var r=n.call(this)||this,o;return E(t)||!t?o={next:t??void 0,error:s??void 0,complete:i??void 0}:o=t,r.destination=new Ca(o),r}return e})(_s);function Wt(n){Wr(n)}function Ta(n){throw n}var Ra={closed:!0,next:en,error:Ta,complete:en},Es=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Lt(n){return n}function La(n){return n.length===0?Lt:n.length===1?n[0]:function(t){return n.reduce(function(s,i){return i(s)},t)}}var X=(function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,s){var i=this,r=Pa(e)?e:new rs(e,t,s);return Kt(function(){var o=i,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?i._subscribe(r):i._trySubscribe(r))}),r},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var s=this;return t=Di(t),new t(function(i,r){var o=new rs({next:function(a){try{e(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:i});s.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[Es]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return La(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Di(e),new e(function(s,i){var r;t.subscribe(function(o){return r=o},function(o){return i(o)},function(){return s(r)})})},n.create=function(e){return new n(e)},n})();function Di(n){var e;return(e=n??Ea.Promise)!==null&&e!==void 0?e:Promise}function Oa(n){return n&&E(n.next)&&E(n.error)&&E(n.complete)}function Pa(n){return n&&n instanceof _s||Oa(n)&&qr(n)}function Ia(n){return E(n==null?void 0:n.lift)}function ye(n){return function(e){if(Ia(e))return e.lift(function(t){try{return n(t,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function V(n,e,t,s,i){return new Ma(n,e,t,s,i)}var Ma=(function(n){at(e,n);function e(t,s,i,r,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=r?function(c){try{r(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e})(_s),Na=Fr(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),I=(function(n){at(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var s=new Ui(this,this);return s.operator=t,s},e.prototype._throwIfClosed=function(){if(this.closed)throw new Na},e.prototype.next=function(t){var s=this;Kt(function(){var i,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=nt(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var s=this;Kt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=t;for(var i=s.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;Kt(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var s=t.observers;s.length;)s.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var s=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?jr:(this.currentObservers=null,a.push(t),new yn(function(){s.currentObservers=null,is(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var s=this,i=s.hasError,r=s.thrownError,o=s.isStopped;i?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new X;return t.source=this,t},e.create=function(t,s){return new Ui(t,s)},e})(X),Ui=(function(n){at(e,n);function e(t,s){var i=n.call(this)||this;return i.destination=t,i.source=s,i}return e.prototype.next=function(t){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.next)===null||i===void 0||i.call(s,t)},e.prototype.error=function(t){var s,i;(i=(s=this.destination)===null||s===void 0?void 0:s.error)===null||i===void 0||i.call(s,t)},e.prototype.complete=function(){var t,s;(s=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||s===void 0||s.call(t)},e.prototype._subscribe=function(t){var s,i;return(i=(s=this.source)===null||s===void 0?void 0:s.subscribe(t))!==null&&i!==void 0?i:jr},e})(I),F=(function(n){at(e,n);function e(t){var s=n.call(this)||this;return s._value=t,s}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var s=n.prototype._subscribe.call(this,t);return!s.closed&&t.next(this._value),s},e.prototype.getValue=function(){var t=this,s=t.hasError,i=t.thrownError,r=t._value;if(s)throw i;return this._throwIfClosed(),r},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e})(I),Ot=new X(function(n){return n.complete()});function Da(n){return n&&E(n.schedule)}function As(n){return n[n.length-1]}function Gr(n){return E(As(n))?n.pop():void 0}function Cs(n){return Da(As(n))?n.pop():void 0}function Ua(n,e){return typeof As(n)=="number"?n.pop():e}var Ts=(function(n){return n&&typeof n.length=="number"&&typeof n!="function"});function Zr(n){return E(n==null?void 0:n.then)}function Yr(n){return E(n[Es])}function Xr(n){return Symbol.asyncIterator&&E(n==null?void 0:n[Symbol.asyncIterator])}function Kr(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function za(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vr=za();function Qr(n){return E(n==null?void 0:n[Vr])}function Jr(n){return Sa(this,arguments,function(){var t,s,i,r;return Br(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Qe(t.read())];case 3:return s=o.sent(),i=s.value,r=s.done,r?[4,Qe(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Qe(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eo(n){return E(n==null?void 0:n.getReader)}function le(n){if(n instanceof X)return n;if(n!=null){if(Yr(n))return Ha(n);if(Ts(n))return Ba(n);if(Zr(n))return Fa(n);if(Xr(n))return to(n);if(Qr(n))return ja(n);if(eo(n))return qa(n)}throw Kr(n)}function Ha(n){return new X(function(e){var t=n[Es]();if(E(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ba(n){return new X(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Fa(n){return new X(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Wr)})}function ja(n){return new X(function(e){var t,s;try{for(var i=nt(n),r=i.next();!r.done;r=i.next()){var o=r.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{r&&!r.done&&(s=i.return)&&s.call(i)}finally{if(t)throw t.error}}e.complete()})}function to(n){return new X(function(e){Wa(n,e).catch(function(t){return e.error(t)})})}function qa(n){return to(Jr(n))}function Wa(n,e){var t,s,i,r;return ka(this,void 0,void 0,function(){var o,a;return Br(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=_a(n),l.label=1;case 1:return[4,t.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),i={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=t.return)?[4,r.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ke(n,e,t,s,i){s===void 0&&(s=0),i===void 0&&(i=!1);var r=e.schedule(function(){t(),i?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(r),!i)return r}function no(n,e){return e===void 0&&(e=0),ye(function(t,s){t.subscribe(V(s,function(i){return ke(s,n,function(){return s.next(i)},e)},function(){return ke(s,n,function(){return s.complete()},e)},function(i){return ke(s,n,function(){return s.error(i)},e)}))})}function so(n,e){return e===void 0&&(e=0),ye(function(t,s){s.add(n.schedule(function(){return t.subscribe(s)},e))})}function Ga(n,e){return le(n).pipe(so(e),no(e))}function Za(n,e){return le(n).pipe(so(e),no(e))}function Ya(n,e){return new X(function(t){var s=0;return e.schedule(function(){s===n.length?t.complete():(t.next(n[s++]),t.closed||this.schedule())})})}function Xa(n,e){return new X(function(t){var s;return ke(t,e,function(){s=n[Vr](),ke(t,e,function(){var i,r,o;try{i=s.next(),r=i.value,o=i.done}catch(a){t.error(a);return}o?t.complete():t.next(r)},0,!0)}),function(){return E(s==null?void 0:s.return)&&s.return()}})}function io(n,e){if(!n)throw new Error("Iterable cannot be null");return new X(function(t){ke(t,e,function(){var s=n[Symbol.asyncIterator]();ke(t,e,function(){s.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function Ka(n,e){return io(Jr(n),e)}function Va(n,e){if(n!=null){if(Yr(n))return Ga(n,e);if(Ts(n))return Ya(n,e);if(Zr(n))return Za(n,e);if(Xr(n))return io(n,e);if(Qr(n))return Xa(n,e);if(eo(n))return Ka(n,e)}throw Kr(n)}function $n(n,e){return e?Va(n,e):le(n)}function os(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n);return $n(n,t)}function tn(n,e){return ye(function(t,s){var i=0;t.subscribe(V(s,function(r){s.next(n.call(e,r,i++))}))})}var Qa=Array.isArray;function Ja(n,e){return Qa(e)?n.apply(void 0,st([],Ne(e))):n(e)}function ro(n){return tn(function(e){return Ja(n,e)})}var el=Array.isArray,tl=Object.getPrototypeOf,nl=Object.prototype,sl=Object.keys;function il(n){if(n.length===1){var e=n[0];if(el(e))return{args:e,keys:null};if(rl(e)){var t=sl(e);return{args:t.map(function(s){return e[s]}),keys:t}}}return{args:n,keys:null}}function rl(n){return n&&typeof n=="object"&&tl(n)===nl}function ol(n,e){return n.reduce(function(t,s,i){return t[s]=e[i],t},{})}function al(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n),s=Gr(n),i=il(n),r=i.args,o=i.keys;if(r.length===0)return $n([],t);var a=new X(ll(r,t,o?function(l){return ol(o,l)}:Lt));return s?a.pipe(ro(s)):a}function ll(n,e,t){return t===void 0&&(t=Lt),function(s){zi(e,function(){for(var i=n.length,r=new Array(i),o=i,a=i,l=function(u){zi(e,function(){var p=$n(n[u],e),d=!1;p.subscribe(V(s,function(g){r[u]=g,d||(d=!0,a--),a||s.next(t(r.slice()))},function(){--o||s.complete()}))},s)},c=0;c<i;c++)l(c)},s)}}function zi(n,e,t){n?ke(t,n,e):e()}function cl(n,e,t,s,i,r,o,a){var l=[],c=0,u=0,p=!1,d=function(){p&&!l.length&&!c&&e.complete()},g=function(y){return c<s?m(y):l.push(y)},m=function(y){c++;var ce=!1;le(t(y,u++)).subscribe(V(e,function(J){e.next(J)},function(){ce=!0},void 0,function(){if(ce)try{c--;for(var J=function(){var xe=l.shift();o||m(xe)};l.length&&c<s;)J();d()}catch(xe){e.error(xe)}}))};return n.subscribe(V(e,g,function(){p=!0,d()})),function(){}}function Rs(n,e,t){return t===void 0&&(t=1/0),E(e)?Rs(function(s,i){return tn(function(r,o){return e(s,r,i,o)})(le(n(s,i)))},t):(typeof e=="number"&&(t=e),ye(function(s,i){return cl(s,i,n,t)}))}function ul(n){return n===void 0&&(n=1/0),Rs(Lt,n)}var hl=["addListener","removeListener"],dl=["addEventListener","removeEventListener"],pl=["on","off"];function nn(n,e,t,s){if(E(t)&&(s=t,t=void 0),s)return nn(n,e,t).pipe(ro(s));var i=Ne(ml(n)?dl.map(function(a){return function(l){return n[a](e,l,t)}}):fl(n)?hl.map(Hi(n,e)):gl(n)?pl.map(Hi(n,e)):[],2),r=i[0],o=i[1];if(!r&&Ts(n))return Rs(function(a){return nn(a,e,t)})(le(n));if(!r)throw new TypeError("Invalid event target");return new X(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return r(l),function(){return o(l)}})}function Hi(n,e){return function(t){return function(s){return n[t](e,s)}}}function fl(n){return E(n.addListener)&&E(n.removeListener)}function gl(n){return E(n.on)&&E(n.off)}function ml(n){return E(n.addEventListener)&&E(n.removeEventListener)}function vl(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Cs(n),s=Ua(n,1/0),i=n;return i.length?i.length===1?le(i[0]):ul(s)($n(i,t)):Ot}function bl(n,e){return ye(function(t,s){var i=0;t.subscribe(V(s,function(r){return n.call(e,r,i++)&&s.next(r)}))})}function Ie(n){return n<=0?function(){return Ot}:ye(function(e,t){var s=0;e.subscribe(V(t,function(i){++s<=n&&(t.next(i),n<=s&&t.complete())}))})}function Je(n,e){return ye(function(t,s){var i=null,r=0,o=!1,a=function(){return o&&!i&&s.complete()};t.subscribe(V(s,function(l){i==null||i.unsubscribe();var c=0,u=r++;le(n(l,u)).subscribe(i=V(s,function(p){return s.next(e?e(l,p,u,c++):p)},function(){i=null,a()}))},function(){o=!0,a()}))})}function as(n){return ye(function(e,t){le(n).subscribe(V(t,function(){return t.complete()},en)),!t.closed&&e.subscribe(t)})}function ls(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Gr(n);return ye(function(s,i){for(var r=n.length,o=new Array(r),a=n.map(function(){return!1}),l=!1,c=function(p){le(n[p]).subscribe(V(i,function(d){o[p]=d,!l&&!a[p]&&(a[p]=!0,(l=a.every(Lt))&&(a=null))},en))},u=0;u<r;u++)c(u);s.subscribe(V(i,function(p){if(l){var d=st([p],Ne(o));i.next(t?t.apply(void 0,st([],Ne(d))):d)}}))})}var ve=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(ve||{});const yl=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),oo=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():yl();function Bi(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,s=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,i=n.match(t)||[],r=[];let o;for(;(o=s.exec(n))!==null;)r.push(o[1]);return i.filter(l=>!r.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function cs(n){if(n.includes("aceChatGuideTitle"))return $l(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const s=ao(t);if(!s)return t;const i=50;if(s.length>i){const r=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=s.match(r);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),p=i-a.length;let d=c;u&&u.length<p&&c.length>p?d=c.substring(0,p-u.length-4)+".../"+u:d=c.substring(0,p-3)+"...";const g=`${a}${d}`;return us(t,g)}return us(t,s)})}function ao(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function us(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function $l(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const s=ao(t);if(!s)return t;const i=s.split("?").pop(),o=new URLSearchParams(i).get("aceChatGuideTitle");return o?us(t,o):t})}class Pt{constructor(e,t,s){this.type=e,this.sender=t,this.messages=s,this.status="delivered",this.didUpdate=new I,this.actions$=new I,this.remove$=new I,this.timestamp=Date.now(),this.id=oo()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class xl{constructor(e){this.name=e,this.print$=new I}print(e,t="html",s=this.name){const i=new Pt(ve.Agent,{name:s},[{items:[[t,{content:e}]]}]);return this.print$.next(i),i}subscribe(){return this.print$.asObservable()}}class wl{constructor(e){this.name=e,this.print$=new I}print(e){const t=new Pt(ve.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class kl{constructor(){this.print$=new I,this.name="system"}print(e){const t=new Pt(ve.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class Sl{constructor(e,t){this.name=e,this.component=t,this.print$=new I,this.typingState$=new F(!1),this.complete$=new I,this.system=this.createSystem(),this.rehydrate$=new I,this.saveToCurrentSession$=new I,this.showChatOverlay$=new F(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(Ie(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(ve.User,e.text)}print(e,t){const s=new Pt(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(s)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new xl(e);return t.subscribe().subscribe(s=>{this.playNotification(),this.printEntry(s)}),t}createUser(e){const t=new wl(e);return t.subscribe().subscribe(s=>{this.printEntry(s)}),t}createSystem(){const e=new kl;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(i=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
4
4
  * @license
5
5
  * Copyright 2019 Google LLC
6
6
  * SPDX-License-Identifier: BSD-3-Clause
7
- */const Vt=globalThis,Ls=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Os=Symbol(),Fi=new WeakMap;let lo=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Os)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ls&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Fi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Fi.set(t,e))}return e}toString(){return this.cssText}};const _l=n=>new lo(typeof n=="string"?n:n+"",void 0,Os),Z=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new lo(t,n,Os)},El=(n,e)=>{if(Ls)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=Vt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)}},ji=Ls?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return _l(t)})(n):n;/**
7
+ */const Vt=globalThis,Ls=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Os=Symbol(),Fi=new WeakMap;let lo=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Os)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ls&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Fi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Fi.set(t,e))}return e}toString(){return this.cssText}};const _l=n=>new lo(typeof n=="string"?n:n+"",void 0,Os),Z=(n,...e)=>{const t=n.length===1?n[0]:e.reduce(((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1]),n[0]);return new lo(t,n,Os)},El=(n,e)=>{if(Ls)n.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),i=Vt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)}},ji=Ls?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return _l(t)})(n):n;/**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const{is:Al,defineProperty:Cl,getOwnPropertyDescriptor:Tl,getOwnPropertyNames:Rl,getOwnPropertySymbols:Ll,getPrototypeOf:Ol}=Object,Se=globalThis,qi=Se.trustedTypes,Pl=qi?qi.emptyScript:"",qn=Se.reactiveElementPolyfillSupport,$t=(n,e)=>n,sn={toAttribute(n,e){switch(e){case Boolean:n=n?Pl:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ps=(n,e)=>!Al(n,e),Wi={attribute:!0,type:String,converter:sn,reflect:!1,useDefault:!1,hasChanged:Ps};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Se.litPropertyMetadata??(Se.litPropertyMetadata=new WeakMap);let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Wi){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Cl(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:r}=Tl(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);r==null||r.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Wi}static _$Ei(){if(this.hasOwnProperty($t("elementProperties")))return;const e=Ol(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty($t("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty($t("properties"))){const t=this.properties,s=[...Rl(t),...Ll(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(ji(i))}else e!==void 0&&t.push(ji(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return El(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var r;const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:sn).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r,o;const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:sn;this._$Em=i;const c=l.fromAttribute(t,a.type);this[i]=c??((o=this._$Ej)==null?void 0:o.get(i))??c,this._$Em=null}}requestUpdate(e,t,s){var i;if(e!==void 0){const r=this.constructor,o=this[e];if(s??(s=r.getPropertyOptions(e)),!((s.hasChanged??Ps)(o,t)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[$t("elementProperties")]=new Map,Ye[$t("finalized")]=new Map,qn==null||qn({ReactiveElement:Ye}),(Se.reactiveElementVersions??(Se.reactiveElementVersions=[])).push("2.1.1");/**
11
+ */const{is:Al,defineProperty:Cl,getOwnPropertyDescriptor:Tl,getOwnPropertyNames:Rl,getOwnPropertySymbols:Ll,getPrototypeOf:Ol}=Object,Se=globalThis,qi=Se.trustedTypes,Pl=qi?qi.emptyScript:"",qn=Se.reactiveElementPolyfillSupport,$t=(n,e)=>n,sn={toAttribute(n,e){switch(e){case Boolean:n=n?Pl:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ps=(n,e)=>!Al(n,e),Wi={attribute:!0,type:String,converter:sn,reflect:!1,useDefault:!1,hasChanged:Ps};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Se.litPropertyMetadata??(Se.litPropertyMetadata=new WeakMap);let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Wi){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Cl(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:r}=Tl(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);r==null||r.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Wi}static _$Ei(){if(this.hasOwnProperty($t("elementProperties")))return;const e=Ol(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty($t("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty($t("properties"))){const t=this.properties,s=[...Rl(t),...Ll(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(ji(i))}else e!==void 0&&t.push(ji(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return El(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)}))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var r;const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:sn).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r,o;const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:sn;this._$Em=i;const c=l.fromAttribute(t,a.type);this[i]=c??((o=this._$Ej)==null?void 0:o.get(i))??c,this._$Em=null}}requestUpdate(e,t,s){var i;if(e!==void 0){const r=this.constructor,o=this[e];if(s??(s=r.getPropertyOptions(e)),!((s.hasChanged??Ps)(o,t)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach((i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)})),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[$t("elementProperties")]=new Map,Ye[$t("finalized")]=new Map,qn==null||qn({ReactiveElement:Ye}),(Se.reactiveElementVersions??(Se.reactiveElementVersions=[])).push("2.1.1");/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
@@ -22,7 +22,7 @@
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const Xc=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e)}):customElements.define(n,e)};/**
25
+ */const Xc=n=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(n,e)})):customElements.define(n,e)};/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
@@ -50,7 +50,7 @@
50
50
  * @license
51
51
  * Copyright 2018 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
- */const rt=En(class extends zs{constructor(n){var e;if(super(n),n.type!==_n.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var s,i;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(i=this.nt)!=null&&i.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return _e}});var su=Object.defineProperty,iu=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&su(e,t,i),i};const Qs=class Qs extends M{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),x}};Qs.styles=[Z`
53
+ */const rt=En(class extends zs{constructor(n){var e;if(super(n),n.type!==_n.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter((e=>n[e])).join(" ")+" "}update(n,[e]){var s,i;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(e)}const t=n.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(i=this.nt)!=null&&i.has(r)||(o?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return _e}});var su=Object.defineProperty,iu=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&su(e,t,i),i};const Qs=class Qs extends M{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),x}};Qs.styles=[Z`
54
54
  :host {
55
55
  position: fixed;
56
56
  display: flex;
@@ -66,7 +66,7 @@
66
66
  bottom: 20px;
67
67
  left: 20px;
68
68
  }
69
- `];let hn=Qs;iu([T({attribute:!0})],hn.prototype,"anchor");const ru=new WeakMap;let dr=0;const Xn=new Map,pr=new WeakSet,fr=()=>new Promise(n=>requestAnimationFrame(n)),ou=[{transform:"translateX(100%) scale(0)",opacity:0}],au=[{opacity:0}],gr=[{opacity:0},{opacity:1}],mr=(n,e)=>{const t=n-e;return t===0?void 0:t},vr=(n,e)=>{const t=n/e;return t===1?void 0:t},Kn={left:(n,e)=>{const t=mr(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=mr(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const s=vr(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const s=vr(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},lu={duration:333,easing:"ease-in-out"},cu=["left","top","width","height","opacity","color","background"],br=new WeakMap;class uu extends Po{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===_n.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return x}getController(){return ru.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var i;const s=this.u===void 0;return s&&(this.u=(i=e.options)==null?void 0:i.host,this.u.addController(this),this.u.updateComplete.then(r=>this.t=!0),this.element=e.element,br.set(this.element,this)),this.optionsOrCallback=t,(s||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=cu),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach(i=>{const r=t[i]??(Kn[i]?void 0:s[i]),o=Number(r);e[i]=isNaN(o)?r+"":o}),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((s,i)=>{if(Array.isArray(s)){if(Array.isArray(i)&&i.length===s.length&&s.every((r,o)=>r===i[o]))return!1}else if(i===s)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await fr;const t=this.O(),s=this.j(this.options.keyframeOptions,t),i=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,i,t);this.log("measured",[this.A,i,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Xn.get(this.options.inId);if(r){Xn.delete(this.options.inId);const{from:o,to:a}=this.N(r,i,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,dr++,e.forEach(l=>l.zIndex=dr)}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Xn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await fr(),(t=this.i)==null?void 0:t.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,o=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,s;e&&((s=(t=this.options).onComplete)==null||s.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const s=br.get(t);s&&!s.isDisabled()&&s&&e.push(s)}return e}get isHostRendered(){const e=pr.has(this.u);return e||this.u.updateComplete.then(()=>{pr.add(this.u)}),e}j(e,t=this.O()){const s={...lu};return t.forEach(i=>Object.assign(s,i.options.keyframeOptions)),Object.assign(s,e),s}N(e,t,s){e={...e},t={...t};const i=s.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return i.length>0&&(i.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,s=!1){const i={},r={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Kn){const p=Kn[l];if(c===void 0||u===void 0)continue;const d=p(c,u);d.transform!==void 0&&(a[l]=d.value,o=!0,i.transform=`${i.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(i,d.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,i[l]=c,r[l]=u)}return i.transformOrigin=r.transformOrigin=s?"center center":"top left",this.animatingProperties=a,o?[i,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),s=!0,this.webAnimation=this.element.animate(e,t);const i=this.getController();i==null||i.add(this);try{await this.webAnimation.finished}catch{}i==null||i.remove(this)}return this.didFinish(s),s}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const gs=En(uu),pe=(n,e,t)=>{n&&t.style.setProperty(e,n)},Io=(n,e)=>{var t,s,i,r,o,a,l,c,u;pe((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),pe((s=n.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",e),pe((i=n.colors)==null?void 0:i.secondaryBackground,"--secondary-background",e),pe((r=n.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),pe((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),pe((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),pe((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),pe((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),pe((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var hu=Object.defineProperty,Nt=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&hu(e,t,i),i};const Js=class Js extends M{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=re(),this.widgetActive$=new F(!1),this.componentIsDestroyed$=new I}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Io(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return w` <img src=${t} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return x;const i=async u=>Xl,{type:r,content:o}=s;switch(r){case"Telia":{const u=await i();return u?w`<telia-icon
69
+ `];let hn=Qs;iu([T({attribute:!0})],hn.prototype,"anchor");const ru=new WeakMap;let dr=0;const Xn=new Map,pr=new WeakSet,fr=()=>new Promise((n=>requestAnimationFrame(n))),ou=[{transform:"translateX(100%) scale(0)",opacity:0}],au=[{opacity:0}],gr=[{opacity:0},{opacity:1}],mr=(n,e)=>{const t=n-e;return t===0?void 0:t},vr=(n,e)=>{const t=n/e;return t===1?void 0:t},Kn={left:(n,e)=>{const t=mr(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=mr(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const s=vr(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const s=vr(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},lu={duration:333,easing:"ease-in-out"},cu=["left","top","width","height","opacity","color","background"],br=new WeakMap;class uu extends Po{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===_n.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return x}getController(){return ru.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var i;const s=this.u===void 0;return s&&(this.u=(i=e.options)==null?void 0:i.host,this.u.addController(this),this.u.updateComplete.then((r=>this.t=!0)),this.element=e.element,br.set(this.element,this)),this.optionsOrCallback=t,(s||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=cu),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const r=t[i]??(Kn[i]?void 0:s[i]),o=Number(r);e[i]=isNaN(o)?r+"":o})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((s,i)=>{if(Array.isArray(s)){if(Array.isArray(i)&&i.length===s.length&&s.every(((r,o)=>r===i[o])))return!1}else if(i===s)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await fr;const t=this.O(),s=this.j(this.options.keyframeOptions,t),i=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,i,t);this.log("measured",[this.A,i,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Xn.get(this.options.inId);if(r){Xn.delete(this.options.inId);const{from:o,to:a}=this.N(r,i,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,dr++,e.forEach((l=>l.zIndex=dr))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Xn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await fr(),(t=this.i)==null?void 0:t.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,o=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,s;e&&((s=(t=this.options).onComplete)==null||s.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const s=br.get(t);s&&!s.isDisabled()&&s&&e.push(s)}return e}get isHostRendered(){const e=pr.has(this.u);return e||this.u.updateComplete.then((()=>{pr.add(this.u)})),e}j(e,t=this.O()){const s={...lu};return t.forEach((i=>Object.assign(s,i.options.keyframeOptions))),Object.assign(s,e),s}N(e,t,s){e={...e},t={...t};const i=s.map((a=>a.animatingProperties)).filter((a=>a!==void 0));let r=1,o=1;return i.length>0&&(i.forEach((a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)})),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,s=!1){const i={},r={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Kn){const p=Kn[l];if(c===void 0||u===void 0)continue;const d=p(c,u);d.transform!==void 0&&(a[l]=d.value,o=!0,i.transform=`${i.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(i,d.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,i[l]=c,r[l]=u)}return i.transformOrigin=r.transformOrigin=s?"center center":"top left",this.animatingProperties=a,o?[i,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),s=!0,this.webAnimation=this.element.animate(e,t);const i=this.getController();i==null||i.add(this);try{await this.webAnimation.finished}catch{}i==null||i.remove(this)}return this.didFinish(s),s}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const gs=En(uu),pe=(n,e,t)=>{n&&t.style.setProperty(e,n)},Io=(n,e)=>{var t,s,i,r,o,a,l,c,u;pe((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),pe((s=n.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",e),pe((i=n.colors)==null?void 0:i.secondaryBackground,"--secondary-background",e),pe((r=n.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),pe((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),pe((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),pe((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),pe((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),pe((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var hu=Object.defineProperty,Nt=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&hu(e,t,i),i};const Js=class Js extends M{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=re(),this.widgetActive$=new F(!1),this.componentIsDestroyed$=new I}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Io(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return w` <img src=${t} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return x;const i=async u=>Xl,{type:r,content:o}=s;switch(r){case"Telia":{const u=await i();return u?w`<telia-icon
70
70
  class="trigger-icon"
71
71
  svg=${u.svg}
72
72
  size="lg"
@@ -294,11 +294,11 @@
294
294
  * @license
295
295
  * Copyright 2017 Google LLC
296
296
  * SPDX-License-Identifier: BSD-3-Clause
297
- */function mu({context:n}){return(e,t)=>{const s=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(i){return s.get(this).setValue(i),e.set.call(this,i)},init(i){return s.set(this,new $r(this,{context:n,initialValue:i})),i}};{e.constructor.addInitializer(o=>{s.set(o,new $r(o,{context:n}))});const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}/**
297
+ */function mu({context:n}){return(e,t)=>{const s=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(i){return s.get(this).setValue(i),e.set.call(this,i)},init(i){return s.set(this,new $r(this,{context:n,initialValue:i})),i}};{e.constructor.addInitializer((o=>{s.set(o,new $r(o,{context:n}))}));const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}/**
298
298
  * @license
299
299
  * Copyright 2022 Google LLC
300
300
  * SPDX-License-Identifier: BSD-3-Clause
301
- */function vu({context:n,subscribe:e}){return(t,s)=>{typeof s=="object"?s.addInitializer(function(){new yr(this,{context:n,callback:i=>{t.set.call(this,i)},subscribe:e})}):t.constructor.addInitializer(i=>{new yr(i,{context:n,callback:r=>{i[s]=r},subscribe:e})})}}var bu=Object.defineProperty,Do=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&bu(e,t,i),i};const Uo="application",ti=class ti extends M{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=re(),this.fullscreen=!1,this.isReady=new F(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Io(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([s,i])=>{t.style.setProperty(`--${s}`,i)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var s,i;const e=this.application.settings.components.conversation;return((i=(s=e==null?void 0:e.properties)==null?void 0:s.chat)==null?void 0:i.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Hs.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),w`<div class="widget-container" ${oe(this.wrapperRef)}>
301
+ */function vu({context:n,subscribe:e}){return(t,s)=>{typeof s=="object"?s.addInitializer((function(){new yr(this,{context:n,callback:i=>{t.set.call(this,i)},subscribe:e})})):t.constructor.addInitializer((i=>{new yr(i,{context:n,callback:r=>{i[s]=r},subscribe:e})}))}}var bu=Object.defineProperty,Do=(n,e,t,s)=>{for(var i=void 0,r=n.length-1,o;r>=0;r--)(o=n[r])&&(i=o(e,t,i)||i);return i&&bu(e,t,i),i};const Uo="application",ti=class ti extends M{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=re(),this.fullscreen=!1,this.isReady=new F(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Io(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([s,i])=>{t.style.setProperty(`--${s}`,i)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var s,i;const e=this.application.settings.components.conversation;return((i=(s=e==null?void 0:e.properties)==null?void 0:s.chat)==null?void 0:i.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Hs.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),w`<div class="widget-container" ${oe(this.wrapperRef)}>
302
302
  ${pu(this.nodes,r=>r)}
303
303
  </div>`}};ti.styles=Z`
304
304
  :host {
package/index.mjs CHANGED
@@ -244,7 +244,7 @@ function is(n, e) {
244
244
  0 <= t && n.splice(t, 1);
245
245
  }
246
246
  }
247
- var yn = function() {
247
+ var yn = (function() {
248
248
  function n(e) {
249
249
  this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
250
250
  }
@@ -328,11 +328,11 @@ var yn = function() {
328
328
  }, n.prototype.remove = function(e) {
329
329
  var t = this._finalizers;
330
330
  t && is(t, e), e instanceof n && e._removeParent(this);
331
- }, n.EMPTY = function() {
331
+ }, n.EMPTY = (function() {
332
332
  var e = new n();
333
333
  return e.closed = !0, e;
334
- }(), n;
335
- }(), jr = yn.EMPTY;
334
+ })(), n;
335
+ })(), jr = yn.EMPTY;
336
336
  function qr(n) {
337
337
  return n instanceof yn || n && "closed" in n && E(n.remove) && E(n.add) && E(n.unsubscribe);
338
338
  }
@@ -362,7 +362,7 @@ function en() {
362
362
  function Kt(n) {
363
363
  n();
364
364
  }
365
- var _s = function(n) {
365
+ var _s = (function(n) {
366
366
  at(e, n);
367
367
  function e(t) {
368
368
  var s = n.call(this) || this;
@@ -393,7 +393,7 @@ var _s = function(n) {
393
393
  this.unsubscribe();
394
394
  }
395
395
  }, e;
396
- }(yn), Ca = function() {
396
+ })(yn), Ca = (function() {
397
397
  function n(e) {
398
398
  this.partialObserver = e;
399
399
  }
@@ -424,7 +424,7 @@ var _s = function(n) {
424
424
  Wt(t);
425
425
  }
426
426
  }, n;
427
- }(), rs = function(n) {
427
+ })(), rs = (function(n) {
428
428
  at(e, n);
429
429
  function e(t, s, i) {
430
430
  var r = n.call(this) || this, o;
@@ -435,7 +435,7 @@ var _s = function(n) {
435
435
  } : o = t, r.destination = new Ca(o), r;
436
436
  }
437
437
  return e;
438
- }(_s);
438
+ })(_s);
439
439
  function Wt(n) {
440
440
  Wr(n);
441
441
  }
@@ -447,9 +447,9 @@ var Ra = {
447
447
  next: en,
448
448
  error: Ta,
449
449
  complete: en
450
- }, Es = function() {
450
+ }, Es = (function() {
451
451
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
452
- }();
452
+ })();
453
453
  function Lt(n) {
454
454
  return n;
455
455
  }
@@ -460,7 +460,7 @@ function La(n) {
460
460
  }, t);
461
461
  };
462
462
  }
463
- var X = function() {
463
+ var X = (function() {
464
464
  function n(e) {
465
465
  e && (this._subscribe = e);
466
466
  }
@@ -519,7 +519,7 @@ var X = function() {
519
519
  }, n.create = function(e) {
520
520
  return new n(e);
521
521
  }, n;
522
- }();
522
+ })();
523
523
  function Di(n) {
524
524
  var e;
525
525
  return (e = n ?? Ea.Promise) !== null && e !== void 0 ? e : Promise;
@@ -549,7 +549,7 @@ function ye(n) {
549
549
  function V(n, e, t, s, i) {
550
550
  return new Ma(n, e, t, s, i);
551
551
  }
552
- var Ma = function(n) {
552
+ var Ma = (function(n) {
553
553
  at(e, n);
554
554
  function e(t, s, i, r, o, a) {
555
555
  var l = n.call(this, t) || this;
@@ -584,11 +584,11 @@ var Ma = function(n) {
584
584
  n.prototype.unsubscribe.call(this), !s && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
585
585
  }
586
586
  }, e;
587
- }(_s), Na = Fr(function(n) {
587
+ })(_s), Na = Fr(function(n) {
588
588
  return function() {
589
589
  n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
590
590
  };
591
- }), I = function(n) {
591
+ }), I = (function(n) {
592
592
  at(e, n);
593
593
  function e() {
594
594
  var t = n.call(this) || this;
@@ -667,7 +667,7 @@ var Ma = function(n) {
667
667
  }, e.create = function(t, s) {
668
668
  return new Ui(t, s);
669
669
  }, e;
670
- }(X), Ui = function(n) {
670
+ })(X), Ui = (function(n) {
671
671
  at(e, n);
672
672
  function e(t, s) {
673
673
  var i = n.call(this) || this;
@@ -686,7 +686,7 @@ var Ma = function(n) {
686
686
  var s, i;
687
687
  return (i = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(t)) !== null && i !== void 0 ? i : jr;
688
688
  }, e;
689
- }(I), F = function(n) {
689
+ })(I), F = (function(n) {
690
690
  at(e, n);
691
691
  function e(t) {
692
692
  var s = n.call(this) || this;
@@ -709,7 +709,7 @@ var Ma = function(n) {
709
709
  }, e.prototype.next = function(t) {
710
710
  n.prototype.next.call(this, this._value = t);
711
711
  }, e;
712
- }(I), Ot = new X(function(n) {
712
+ })(I), Ot = new X(function(n) {
713
713
  return n.complete();
714
714
  });
715
715
  function Da(n) {
@@ -727,9 +727,9 @@ function Cs(n) {
727
727
  function Ua(n, e) {
728
728
  return typeof As(n) == "number" ? n.pop() : e;
729
729
  }
730
- var Ts = function(n) {
730
+ var Ts = (function(n) {
731
731
  return n && typeof n.length == "number" && typeof n != "function";
732
- };
732
+ });
733
733
  function Zr(n) {
734
734
  return E(n == null ? void 0 : n.then);
735
735
  }
@@ -1484,14 +1484,14 @@ let lo = class {
1484
1484
  }
1485
1485
  };
1486
1486
  const _l = (n) => new lo(typeof n == "string" ? n : n + "", void 0, Os), Z = (n, ...e) => {
1487
- const t = n.length === 1 ? n[0] : e.reduce((s, i, r) => s + ((o) => {
1487
+ const t = n.length === 1 ? n[0] : e.reduce(((s, i, r) => s + ((o) => {
1488
1488
  if (o._$cssResult$ === !0) return o.cssText;
1489
1489
  if (typeof o == "number") return o;
1490
1490
  throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1491
- })(i) + n[r + 1], n[0]);
1491
+ })(i) + n[r + 1]), n[0]);
1492
1492
  return new lo(t, n, Os);
1493
1493
  }, El = (n, e) => {
1494
- if (Ls) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
1494
+ if (Ls) n.adoptedStyleSheets = e.map(((t) => t instanceof CSSStyleSheet ? t : t.styleSheet));
1495
1495
  else for (const t of e) {
1496
1496
  const s = document.createElement("style"), i = Vt.litNonce;
1497
1497
  i !== void 0 && s.setAttribute("nonce", i), s.textContent = t.cssText, n.appendChild(s);
@@ -1603,7 +1603,7 @@ let Ye = class extends HTMLElement {
1603
1603
  }
1604
1604
  _$Ev() {
1605
1605
  var e;
1606
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
1606
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach(((t) => t(this)));
1607
1607
  }
1608
1608
  addController(e) {
1609
1609
  var t;
@@ -1624,19 +1624,19 @@ let Ye = class extends HTMLElement {
1624
1624
  }
1625
1625
  connectedCallback() {
1626
1626
  var e;
1627
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
1627
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach(((t) => {
1628
1628
  var s;
1629
1629
  return (s = t.hostConnected) == null ? void 0 : s.call(t);
1630
- });
1630
+ }));
1631
1631
  }
1632
1632
  enableUpdating(e) {
1633
1633
  }
1634
1634
  disconnectedCallback() {
1635
1635
  var e;
1636
- (e = this._$EO) == null || e.forEach((t) => {
1636
+ (e = this._$EO) == null || e.forEach(((t) => {
1637
1637
  var s;
1638
1638
  return (s = t.hostDisconnected) == null ? void 0 : s.call(t);
1639
- });
1639
+ }));
1640
1640
  }
1641
1641
  attributeChangedCallback(e, t, s) {
1642
1642
  this._$AK(e, s);
@@ -1701,10 +1701,10 @@ let Ye = class extends HTMLElement {
1701
1701
  let e = !1;
1702
1702
  const t = this._$AL;
1703
1703
  try {
1704
- e = this.shouldUpdate(t), e ? (this.willUpdate(t), (s = this._$EO) == null || s.forEach((i) => {
1704
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), (s = this._$EO) == null || s.forEach(((i) => {
1705
1705
  var r;
1706
1706
  return (r = i.hostUpdate) == null ? void 0 : r.call(i);
1707
- }), this.update(t)) : this._$EM();
1707
+ })), this.update(t)) : this._$EM();
1708
1708
  } catch (i) {
1709
1709
  throw e = !1, this._$EM(), i;
1710
1710
  }
@@ -1714,10 +1714,10 @@ let Ye = class extends HTMLElement {
1714
1714
  }
1715
1715
  _$AE(e) {
1716
1716
  var t;
1717
- (t = this._$EO) == null || t.forEach((s) => {
1717
+ (t = this._$EO) == null || t.forEach(((s) => {
1718
1718
  var i;
1719
1719
  return (i = s.hostUpdated) == null ? void 0 : i.call(s);
1720
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
1720
+ })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
1721
1721
  }
1722
1722
  _$EM() {
1723
1723
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -1732,7 +1732,7 @@ let Ye = class extends HTMLElement {
1732
1732
  return !0;
1733
1733
  }
1734
1734
  update(e) {
1735
- this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
1735
+ this._$Eq && (this._$Eq = this._$Eq.forEach(((t) => this._$ET(t, this[t])))), this._$EM();
1736
1736
  }
1737
1737
  updated(e) {
1738
1738
  }
@@ -2649,9 +2649,9 @@ Yc();
2649
2649
  * SPDX-License-Identifier: BSD-3-Clause
2650
2650
  */
2651
2651
  const Xc = (n) => (e, t) => {
2652
- t !== void 0 ? t.addInitializer(() => {
2652
+ t !== void 0 ? t.addInitializer((() => {
2653
2653
  customElements.define(n, e);
2654
- }) : customElements.define(n, e);
2654
+ })) : customElements.define(n, e);
2655
2655
  };
2656
2656
  /**
2657
2657
  * @license
@@ -2827,12 +2827,12 @@ const rt = En(class extends zs {
2827
2827
  if (super(n), n.type !== _n.ATTRIBUTE || n.name !== "class" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2828
2828
  }
2829
2829
  render(n) {
2830
- return " " + Object.keys(n).filter((e) => n[e]).join(" ") + " ";
2830
+ return " " + Object.keys(n).filter(((e) => n[e])).join(" ") + " ";
2831
2831
  }
2832
2832
  update(n, [e]) {
2833
2833
  var s, i;
2834
2834
  if (this.st === void 0) {
2835
- this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter((r) => r !== "")));
2835
+ this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter(((r) => r !== ""))));
2836
2836
  for (const r in e) e[r] && !((s = this.nt) != null && s.has(r)) && this.st.add(r);
2837
2837
  return this.render(e);
2838
2838
  }
@@ -2887,7 +2887,7 @@ iu([
2887
2887
  ], hn.prototype, "anchor");
2888
2888
  const ru = /* @__PURE__ */ new WeakMap();
2889
2889
  let dr = 0;
2890
- const Xn = /* @__PURE__ */ new Map(), pr = /* @__PURE__ */ new WeakSet(), fr = () => new Promise((n) => requestAnimationFrame(n)), ou = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], au = [{ opacity: 0 }], gr = [{ opacity: 0 }, { opacity: 1 }], mr = (n, e) => {
2890
+ const Xn = /* @__PURE__ */ new Map(), pr = /* @__PURE__ */ new WeakSet(), fr = () => new Promise(((n) => requestAnimationFrame(n))), ou = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], au = [{ opacity: 0 }], gr = [{ opacity: 0 }, { opacity: 1 }], mr = (n, e) => {
2891
2891
  const t = n - e;
2892
2892
  return t === 0 ? void 0 : t;
2893
2893
  }, vr = (n, e) => {
@@ -2917,9 +2917,9 @@ class uu extends Po {
2917
2917
  }
2918
2918
  createFinished() {
2919
2919
  var e;
2920
- (e = this.resolveFinished) == null || e.call(this), this.finished = new Promise((t) => {
2920
+ (e = this.resolveFinished) == null || e.call(this), this.finished = new Promise(((t) => {
2921
2921
  this.l = t;
2922
- });
2922
+ }));
2923
2923
  }
2924
2924
  async resolveFinished() {
2925
2925
  var e;
@@ -2938,7 +2938,7 @@ class uu extends Po {
2938
2938
  update(e, [t]) {
2939
2939
  var i;
2940
2940
  const s = this.u === void 0;
2941
- return s && (this.u = (i = e.options) == null ? void 0 : i.host, this.u.addController(this), this.u.updateComplete.then((r) => this.t = !0), this.element = e.element, br.set(this.element, this)), this.optionsOrCallback = t, (s || typeof t != "function") && this.p(t), this.render(t);
2941
+ return s && (this.u = (i = e.options) == null ? void 0 : i.host, this.u.addController(this), this.u.updateComplete.then(((r) => this.t = !0)), this.element = e.element, br.set(this.element, this)), this.optionsOrCallback = t, (s || typeof t != "function") && this.p(t), this.render(t);
2942
2942
  }
2943
2943
  p(e) {
2944
2944
  e = e ?? {};
@@ -2947,16 +2947,16 @@ class uu extends Po {
2947
2947
  }
2948
2948
  m() {
2949
2949
  const e = {}, t = this.element.getBoundingClientRect(), s = getComputedStyle(this.element);
2950
- return this.options.properties.forEach((i) => {
2950
+ return this.options.properties.forEach(((i) => {
2951
2951
  const r = t[i] ?? (Kn[i] ? void 0 : s[i]), o = Number(r);
2952
2952
  e[i] = isNaN(o) ? r + "" : o;
2953
- }), e;
2953
+ })), e;
2954
2954
  }
2955
2955
  v() {
2956
2956
  let e, t = !0;
2957
2957
  return this.options.guard && (e = this.options.guard(), t = ((s, i) => {
2958
2958
  if (Array.isArray(s)) {
2959
- if (Array.isArray(i) && i.length === s.length && s.every((r, o) => r === i[o])) return !1;
2959
+ if (Array.isArray(i) && i.length === s.length && s.every(((r, o) => r === i[o]))) return !1;
2960
2960
  } else if (i === s) return !1;
2961
2961
  return !0;
2962
2962
  })(e, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && t && this.element.isConnected, this.h && (this._ = Array.isArray(e) ? Array.from(e) : e), this.h;
@@ -2977,7 +2977,7 @@ class uu extends Po {
2977
2977
  if (r) {
2978
2978
  Xn.delete(this.options.inId);
2979
2979
  const { from: o, to: a } = this.N(r, i, t);
2980
- e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, dr++, e.forEach((l) => l.zIndex = dr);
2980
+ e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, dr++, e.forEach(((l) => l.zIndex = dr));
2981
2981
  } else this.options.in && (e = [...this.options.in, {}]);
2982
2982
  }
2983
2983
  this.animate(e, s);
@@ -3027,21 +3027,21 @@ class uu extends Po {
3027
3027
  }
3028
3028
  get isHostRendered() {
3029
3029
  const e = pr.has(this.u);
3030
- return e || this.u.updateComplete.then(() => {
3030
+ return e || this.u.updateComplete.then((() => {
3031
3031
  pr.add(this.u);
3032
- }), e;
3032
+ })), e;
3033
3033
  }
3034
3034
  j(e, t = this.O()) {
3035
3035
  const s = { ...lu };
3036
- return t.forEach((i) => Object.assign(s, i.options.keyframeOptions)), Object.assign(s, e), s;
3036
+ return t.forEach(((i) => Object.assign(s, i.options.keyframeOptions))), Object.assign(s, e), s;
3037
3037
  }
3038
3038
  N(e, t, s) {
3039
3039
  e = { ...e }, t = { ...t };
3040
- const i = s.map((a) => a.animatingProperties).filter((a) => a !== void 0);
3040
+ const i = s.map(((a) => a.animatingProperties)).filter(((a) => a !== void 0));
3041
3041
  let r = 1, o = 1;
3042
- return i.length > 0 && (i.forEach((a) => {
3042
+ return i.length > 0 && (i.forEach(((a) => {
3043
3043
  a.width && (r /= a.width), a.height && (o /= a.height);
3044
- }), e.left !== void 0 && t.left !== void 0 && (e.left = r * e.left, t.left = r * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
3044
+ })), e.left !== void 0 && t.left !== void 0 && (e.left = r * e.left, t.left = r * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
3045
3045
  }
3046
3046
  calculateKeyframes(e, t, s = !1) {
3047
3047
  const i = {}, r = {};
@@ -3616,9 +3616,9 @@ function mu({ context: n }) {
3616
3616
  return s.set(this, new $r(this, { context: n, initialValue: i })), i;
3617
3617
  } };
3618
3618
  {
3619
- e.constructor.addInitializer((o) => {
3619
+ e.constructor.addInitializer(((o) => {
3620
3620
  s.set(o, new $r(o, { context: n }));
3621
- });
3621
+ }));
3622
3622
  const i = Object.getOwnPropertyDescriptor(e, t);
3623
3623
  let r;
3624
3624
  if (i === void 0) {
@@ -3645,15 +3645,15 @@ function mu({ context: n }) {
3645
3645
  */
3646
3646
  function vu({ context: n, subscribe: e }) {
3647
3647
  return (t, s) => {
3648
- typeof s == "object" ? s.addInitializer(function() {
3648
+ typeof s == "object" ? s.addInitializer((function() {
3649
3649
  new yr(this, { context: n, callback: (i) => {
3650
3650
  t.set.call(this, i);
3651
3651
  }, subscribe: e });
3652
- }) : t.constructor.addInitializer((i) => {
3652
+ })) : t.constructor.addInitializer(((i) => {
3653
3653
  new yr(i, { context: n, callback: (r) => {
3654
3654
  i[s] = r;
3655
3655
  }, subscribe: e });
3656
- });
3656
+ }));
3657
3657
  };
3658
3658
  }
3659
3659
  var bu = Object.defineProperty, Do = (n, e, t, s) => {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversational-hub",
3
- "version": "1.1.121-rc.0",
3
+ "version": "1.1.121-rc.2",
4
4
  "dependencies": {
5
- "@telia-ace/widget-conversation-flamingo": "1.1.120",
5
+ "@telia-ace/widget-conversation-flamingo": "1.1.121-rc.2",
6
6
  "rxjs": "^7.8.2",
7
- "@telia-ace/widget-core-flamingo": "1.1.120",
7
+ "@telia-ace/widget-core-flamingo": "1.1.121-rc.2",
8
8
  "lit": "^3.0.2",
9
9
  "@lit/context": "^1.1.4"
10
10
  },