@telia-ace/widget-core-flamingo 1.1.72-rc.2 → 1.1.72-rc.3

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var gt=function(s,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},gt(s,t)};function F(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gt(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function mt(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],i=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&i>=s.length&&(s=void 0),{value:s&&s[i++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var i=e.call(s),r,n=[],o;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)n.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return n}function X(s,t,e){if(e||arguments.length===2)for(var i=0,r=t.length,n;i<r;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return s.concat(n||Array.prototype.slice.call(t))}function w(s){return typeof s=="function"}function Qt(s){var t=function(i){Error.call(i),i.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ot=Qt(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
2
2
  `+e.map(function(i,r){return r+1+") "+i.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=e}});function vt(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var it=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,i,r,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=mt(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(y){t={error:y}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(w(l))try{l()}catch(y){n=y instanceof ot?y.errors:[y]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=mt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Ot(g)}catch(y){n=n??[],y instanceof ot?n=X(X([],J(n)),J(y.errors)):n.push(y)}}}catch(y){i={error:y}}finally{try{u&&!u.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}if(n)throw new ot(n)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ot(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&vt(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),te=it.EMPTY;function ee(s){return s instanceof it||s&&"closed"in s&&w(s.remove)&&w(s.add)&&w(s.unsubscribe)}function Ot(s){w(s)?s():s.unsubscribe()}var ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yt={setTimeout:function(s,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r=yt.delegate;return r!=null&&r.setTimeout?r.setTimeout.apply(r,X([s,t],J(e))):setTimeout.apply(void 0,X([s,t],J(e)))},clearTimeout:function(s){var t=yt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(s)},delegate:void 0};function Ee(s){yt.setTimeout(function(){throw s})}function Tt(){}function G(s){s()}var se=function(s){F(t,s);function t(e){var i=s.call(this)||this;return i.isStopped=!1,e?(i.destination=e,ee(e)&&e.add(i)):i.destination=Ie,i}return t.create=function(e,i,r){return new bt(e,i,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(it),Pe=Function.prototype.bind;function at(s,t){return Pe.call(s,t)}var Oe=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){q(i)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){q(i)}else q(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){q(e)}},s}(),bt=function(s){F(t,s);function t(e,i,r){var n=s.call(this)||this,o;if(w(e)||!e)o={next:e??void 0,error:i??void 0,complete:r??void 0};else{var a;n&&ie.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&at(e.next,a),error:e.error&&at(e.error,a),complete:e.complete&&at(e.complete,a)}):o=e}return n.destination=new Oe(o),n}return t}(se);function q(s){Ee(s)}function Te(s){throw s}var Ie={closed:!0,next:Tt,error:Te,complete:Tt},Re=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Me(s){return s}function Ue(s){return s.length===0?Me:s.length===1?s[0]:function(e){return s.reduce(function(i,r){return r(i)},e)}}var It=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,i){var r=this,n=Ne(t)?t:new bt(t,e,i);return G(function(){var o=r,a=o.operator,c=o.source;n.add(a?a.call(n,c):c?r._subscribe(n):r._trySubscribe(n))}),n},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var i=this;return e=Rt(e),new e(function(r,n){var o=new bt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:r});i.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[Re]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ue(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Rt(t),new t(function(i,r){var n;e.subscribe(function(o){return n=o},function(o){return r(o)},function(){return i(n)})})},s.create=function(t){return new s(t)},s}();function Rt(s){var t;return(t=s??ie.Promise)!==null&&t!==void 0?t:Promise}function ke(s){return s&&w(s.next)&&w(s.error)&&w(s.complete)}function Ne(s){return s&&s instanceof se||ke(s)&&ee(s)}var je=Qt(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),wt=function(s){F(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var i=new Mt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new je},t.prototype.next=function(e){var i=this;G(function(){var r,n;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=mt(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){r={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var i=this;G(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var r=i.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;G(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var i=this,r=this,n=r.hasError,o=r.isStopped,a=r.observers;return n||o?te:(this.currentObservers=null,a.push(e),new it(function(){i.currentObservers=null,vt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,r=i.hasError,n=i.thrownError,o=i.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new It;return e.source=this,e},t.create=function(e,i){return new Mt(e,i)},t}(It),Mt=function(s){F(t,s);function t(e,i){var r=s.call(this)||this;return r.destination=e,r.source=i,r}return t.prototype.next=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,e)},t.prototype.error=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&r!==void 0?r:te},t}(wt),re=function(s){F(t,s);function t(e){var i=s.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=s.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,r=e.thrownError,n=e._value;if(i)throw r;return this._throwIfClosed(),n},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(wt),ne=(s=>(s.Loading="loading",s.Ready="ready",s))(ne||{});class $t{constructor(t,e){this.state=new re("loading"),this.resolvers=new Map,this.name=t,this.environment=e,this.state.next("ready")}setState(t){this.state.next(t)}async register(t,e){this.resolvers.set(t,e)}async get(t){return this.resolvers.get(t)}}/**
3
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function vt(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var it=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,i,r,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=mt(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(y){t={error:y}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(w(l))try{l()}catch(y){n=y instanceof ot?y.errors:[y]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=mt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Ot(g)}catch(y){n=n??[],y instanceof ot?n=X(X([],J(n)),J(y.errors)):n.push(y)}}}catch(y){i={error:y}}finally{try{u&&!u.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}if(n)throw new ot(n)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ot(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&vt(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),te=it.EMPTY;function ee(s){return s instanceof it||s&&"closed"in s&&w(s.remove)&&w(s.add)&&w(s.unsubscribe)}function Ot(s){w(s)?s():s.unsubscribe()}var ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yt={setTimeout:function(s,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r=yt.delegate;return r!=null&&r.setTimeout?r.setTimeout.apply(r,X([s,t],J(e))):setTimeout.apply(void 0,X([s,t],J(e)))},clearTimeout:function(s){var t=yt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(s)},delegate:void 0};function Ee(s){yt.setTimeout(function(){throw s})}function Tt(){}function G(s){s()}var se=function(s){F(t,s);function t(e){var i=s.call(this)||this;return i.isStopped=!1,e?(i.destination=e,ee(e)&&e.add(i)):i.destination=Ie,i}return t.create=function(e,i,r){return new bt(e,i,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(it),Pe=Function.prototype.bind;function at(s,t){return Pe.call(s,t)}var Oe=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){q(i)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){q(i)}else q(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){q(e)}},s}(),bt=function(s){F(t,s);function t(e,i,r){var n=s.call(this)||this,o;if(w(e)||!e)o={next:e??void 0,error:i??void 0,complete:r??void 0};else{var a;n&&ie.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&at(e.next,a),error:e.error&&at(e.error,a),complete:e.complete&&at(e.complete,a)}):o=e}return n.destination=new Oe(o),n}return t}(se);function q(s){Ee(s)}function Te(s){throw s}var Ie={closed:!0,next:Tt,error:Te,complete:Tt},Re=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ne(s){return s}function Ue(s){return s.length===0?Ne:s.length===1?s[0]:function(e){return s.reduce(function(i,r){return r(i)},e)}}var It=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,i){var r=this,n=Me(t)?t:new bt(t,e,i);return G(function(){var o=r,a=o.operator,c=o.source;n.add(a?a.call(n,c):c?r._subscribe(n):r._trySubscribe(n))}),n},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var i=this;return e=Rt(e),new e(function(r,n){var o=new bt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:r});i.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[Re]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ue(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Rt(t),new t(function(i,r){var n;e.subscribe(function(o){return n=o},function(o){return r(o)},function(){return i(n)})})},s.create=function(t){return new s(t)},s}();function Rt(s){var t;return(t=s??ie.Promise)!==null&&t!==void 0?t:Promise}function ke(s){return s&&w(s.next)&&w(s.error)&&w(s.complete)}function Me(s){return s&&s instanceof se||ke(s)&&ee(s)}var je=Qt(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),wt=function(s){F(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var i=new Nt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new je},t.prototype.next=function(e){var i=this;G(function(){var r,n;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=mt(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){r={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var i=this;G(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var r=i.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;G(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var i=this,r=this,n=r.hasError,o=r.isStopped,a=r.observers;return n||o?te:(this.currentObservers=null,a.push(e),new it(function(){i.currentObservers=null,vt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,r=i.hasError,n=i.thrownError,o=i.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new It;return e.source=this,e},t.create=function(e,i){return new Nt(e,i)},t}(It),Nt=function(s){F(t,s);function t(e,i){var r=s.call(this)||this;return r.destination=e,r.source=i,r}return t.prototype.next=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,e)},t.prototype.error=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&r!==void 0?r:te},t}(wt),re=function(s){F(t,s);function t(e){var i=s.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=s.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,r=e.thrownError,n=e._value;if(i)throw r;return this._throwIfClosed(),n},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(wt),ne=(s=>(s.Loading="loading",s.Ready="ready",s))(ne||{});class $t{constructor(t,e){this.state=new re("loading"),this.resolvers=new Map,this.name=t,this.environment=e,this.state.next("ready")}setState(t){this.state.next(t)}async register(t,e){this.resolvers.set(t,e)}async get(t){return this.resolvers.get(t)}}/**
4
4
  * @license
5
5
  * Copyright 2019 Google LLC
6
6
  * SPDX-License-Identifier: BSD-3-Clause
7
- */const Z=globalThis,_t=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,At=Symbol(),Ut=new WeakMap;let oe=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==At)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(_t&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const He=s=>new oe(typeof s=="string"?s:s+"",void 0,At),M=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,r,n)=>i+(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.")})(r)+s[n+1],s[0]);return new oe(e,s,At)},Le=(s,t)=>{if(_t)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=Z.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},kt=_t?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return He(e)})(s):s;/**
7
+ */const Z=globalThis,_t=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,At=Symbol(),Ut=new WeakMap;let oe=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==At)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(_t&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const He=s=>new oe(typeof s=="string"?s:s+"",void 0,At),N=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,r,n)=>i+(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.")})(r)+s[n+1],s[0]);return new oe(e,s,At)},Le=(s,t)=>{if(_t)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=Z.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},kt=_t?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return He(e)})(s):s;/**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const{is:Be,defineProperty:De,getOwnPropertyDescriptor:We,getOwnPropertyNames:ze,getOwnPropertySymbols:Fe,getPrototypeOf:Ve}=Object,x=globalThis,Nt=x.trustedTypes,Ye=Nt?Nt.emptyScript:"",ct=x.reactiveElementPolyfillSupport,j=(s,t)=>s,Q={toAttribute(s,t){switch(t){case Boolean:s=s?Ye:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},xt=(s,t)=>!Be(s,t),jt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:xt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=jt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&De(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=We(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const a=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;const t=Ve(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const e=this.properties,i=[...ze(e),...Fe(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(kt(r))}else t!==void 0&&e.push(kt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Le(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var n;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:Q;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??xt)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[j("elementProperties")]=new Map,T[j("finalized")]=new Map,ct==null||ct({ReactiveElement:T}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.0.4");/**
11
+ */const{is:De,defineProperty:Be,getOwnPropertyDescriptor:ze,getOwnPropertyNames:We,getOwnPropertySymbols:Fe,getPrototypeOf:Ve}=Object,x=globalThis,Mt=x.trustedTypes,Ye=Mt?Mt.emptyScript:"",ct=x.reactiveElementPolyfillSupport,j=(s,t)=>s,Q={toAttribute(s,t){switch(t){case Boolean:s=s?Ye:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},xt=(s,t)=>!De(s,t),jt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:xt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=jt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Be(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=ze(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const a=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;const t=Ve(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const e=this.properties,i=[...We(e),...Fe(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(kt(r))}else t!==void 0&&e.push(kt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Le(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var n;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:Q;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??xt)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[j("elementProperties")]=new Map,T[j("finalized")]=new Map,ct==null||ct({ReactiveElement:T}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.0.4");/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
15
- */const H=globalThis,tt=H.trustedTypes,Ht=tt?tt.createPolicy("lit-html",{createHTML:s=>s}):void 0,ae="$lit$",A=`lit$${(Math.random()+"").slice(9)}$`,ce="?"+A,qe=`<${ce}>`,P=document,B=()=>P.createComment(""),D=s=>s===null||typeof s!="object"&&typeof s!="function",he=Array.isArray,Ke=s=>he(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ht=`[
16
- \f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Bt=/>/g,C=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Dt=/'/g,Wt=/"/g,le=/^(?:script|style|textarea|title)$/i,Ge=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),I=Ge(1),O=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),zt=new WeakMap,E=P.createTreeWalker(P,129);function pe(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ht!==void 0?Ht.createHTML(t):t}const Ze=(s,t)=>{const e=s.length-1,i=[];let r,n=t===2?"<svg>":"",o=N;for(let a=0;a<e;a++){const c=s[a];let h,l,p=-1,f=0;for(;f<c.length&&(o.lastIndex=f,l=o.exec(c),l!==null);)f=o.lastIndex,o===N?l[1]==="!--"?o=Lt:l[1]!==void 0?o=Bt:l[2]!==void 0?(le.test(l[2])&&(r=RegExp("</"+l[2],"g")),o=C):l[3]!==void 0&&(o=C):o===C?l[0]===">"?(o=r??N,p=-1):l[1]===void 0?p=-2:(p=o.lastIndex-l[2].length,h=l[1],o=l[3]===void 0?C:l[3]==='"'?Wt:Dt):o===Wt||o===Dt?o=C:o===Lt||o===Bt?o=N:(o=C,r=void 0);const u=o===C&&s[a+1].startsWith("/>")?" ":"";n+=o===N?c+qe:p>=0?(i.push(h),c.slice(0,p)+ae+c.slice(p)+A+u):c+A+(p===-2?a:u)}return[pe(s,n+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class W{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[h,l]=Ze(t,e);if(this.el=W.createElement(h,i),E.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=E.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(ae)){const f=l[o++],u=r.getAttribute(p).split(A),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Xe:g[1]==="?"?Qe:g[1]==="@"?ti:st}),r.removeAttribute(p)}else p.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(le.test(r.tagName)){const p=r.textContent.split(A),f=p.length-1;if(f>0){r.textContent=tt?tt.emptyScript:"";for(let u=0;u<f;u++)r.append(p[u],B()),E.nextNode(),c.push({type:2,index:++n});r.append(p[f],B())}}}else if(r.nodeType===8)if(r.data===ce)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf(A,p+1))!==-1;)c.push({type:7,index:n}),p+=A.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function R(s,t,e=s,i){var o,a;if(t===O)return t;let r=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=D(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=R(s,r._$AS(s,t.values),r,i)),t}class Je{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??P).importNode(e,!0);E.currentNode=r;let n=E.nextNode(),o=0,a=0,c=i[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new V(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new ei(n,this,t)),this._$AV.push(h),c=i[++a]}o!==(c==null?void 0:c.index)&&(n=E.nextNode(),o++)}return E.currentNode=P,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class V{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=R(this,t,e),D(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ke(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==d&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=W.createElement(pe(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Je(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new W(t)),e}k(t){he(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new V(this.S(B()),this.S(B()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class st{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(n===void 0)t=R(this,t,e,0),o=!D(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const a=t;let c,h;for(t=n[0],c=0;c<n.length-1;c++)h=R(this,a[i+c],e,c),h===O&&(h=this._$AH[c]),o||(o=!D(h)||h!==this._$AH[c]),h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Xe extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Qe extends st{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class ti extends st{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??d)===O)return;const i=this._$AH,r=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class ei{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){R(this,t)}}const lt=H.litHtmlPolyfillSupport;lt==null||lt(W,V),(H.litHtmlVersions??(H.litHtmlVersions=[])).push("3.1.2");const ii=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new V(t.insertBefore(B(),n),n,void 0,e??{})}return r._$AI(s),r};/**
15
+ */const H=globalThis,tt=H.trustedTypes,Ht=tt?tt.createPolicy("lit-html",{createHTML:s=>s}):void 0,ae="$lit$",A=`lit$${(Math.random()+"").slice(9)}$`,ce="?"+A,qe=`<${ce}>`,P=document,D=()=>P.createComment(""),B=s=>s===null||typeof s!="object"&&typeof s!="function",he=Array.isArray,Ke=s=>he(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ht=`[
16
+ \f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Dt=/>/g,C=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
17
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Bt=/'/g,zt=/"/g,le=/^(?:script|style|textarea|title)$/i,Ge=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),I=Ge(1),O=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Wt=new WeakMap,E=P.createTreeWalker(P,129);function pe(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ht!==void 0?Ht.createHTML(t):t}const Ze=(s,t)=>{const e=s.length-1,i=[];let r,n=t===2?"<svg>":"",o=M;for(let a=0;a<e;a++){const c=s[a];let h,l,p=-1,f=0;for(;f<c.length&&(o.lastIndex=f,l=o.exec(c),l!==null);)f=o.lastIndex,o===M?l[1]==="!--"?o=Lt:l[1]!==void 0?o=Dt:l[2]!==void 0?(le.test(l[2])&&(r=RegExp("</"+l[2],"g")),o=C):l[3]!==void 0&&(o=C):o===C?l[0]===">"?(o=r??M,p=-1):l[1]===void 0?p=-2:(p=o.lastIndex-l[2].length,h=l[1],o=l[3]===void 0?C:l[3]==='"'?zt:Bt):o===zt||o===Bt?o=C:o===Lt||o===Dt?o=M:(o=C,r=void 0);const u=o===C&&s[a+1].startsWith("/>")?" ":"";n+=o===M?c+qe:p>=0?(i.push(h),c.slice(0,p)+ae+c.slice(p)+A+u):c+A+(p===-2?a:u)}return[pe(s,n+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class z{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[h,l]=Ze(t,e);if(this.el=z.createElement(h,i),E.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=E.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(ae)){const f=l[o++],u=r.getAttribute(p).split(A),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Xe:g[1]==="?"?Qe:g[1]==="@"?ti:st}),r.removeAttribute(p)}else p.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(le.test(r.tagName)){const p=r.textContent.split(A),f=p.length-1;if(f>0){r.textContent=tt?tt.emptyScript:"";for(let u=0;u<f;u++)r.append(p[u],D()),E.nextNode(),c.push({type:2,index:++n});r.append(p[f],D())}}}else if(r.nodeType===8)if(r.data===ce)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf(A,p+1))!==-1;)c.push({type:7,index:n}),p+=A.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function R(s,t,e=s,i){var o,a;if(t===O)return t;let r=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=B(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=R(s,r._$AS(s,t.values),r,i)),t}class Je{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??P).importNode(e,!0);E.currentNode=r;let n=E.nextNode(),o=0,a=0,c=i[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new V(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new ei(n,this,t)),this._$AV.push(h),c=i[++a]}o!==(c==null?void 0:c.index)&&(n=E.nextNode(),o++)}return E.currentNode=P,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class V{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=R(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ke(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=z.createElement(pe(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Je(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Wt.get(t.strings);return e===void 0&&Wt.set(t.strings,e=new z(t)),e}k(t){he(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new V(this.S(D()),this.S(D()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class st{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(n===void 0)t=R(this,t,e,0),o=!B(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const a=t;let c,h;for(t=n[0],c=0;c<n.length-1;c++)h=R(this,a[i+c],e,c),h===O&&(h=this._$AH[c]),o||(o=!B(h)||h!==this._$AH[c]),h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Xe extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Qe extends st{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class ti extends st{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??d)===O)return;const i=this._$AH,r=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class ei{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){R(this,t)}}const lt=H.litHtmlPolyfillSupport;lt==null||lt(z,V),(H.litHtmlVersions??(H.litHtmlVersions=[])).push("3.1.2");const ii=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new V(t.insertBefore(D(),n),n,void 0,e??{})}return r._$AI(s),r};/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
@@ -26,7 +26,7 @@
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function U(s){return m({...s,state:!0,attribute:!1})}var ni=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(s,t,e,i)=>{for(var r=i>1?void 0:i?oi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&ni(t,e,r),r};class rt extends _{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),d}}rt.styles=[M`
29
+ */function U(s){return m({...s,state:!0,attribute:!1})}var ni=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(s,t,e,i)=>{for(var r=i>1?void 0:i?oi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&ni(t,e,r),r};class rt extends _{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),d}}rt.styles=[N`
30
30
  :host {
31
31
  position: fixed;
32
32
  display: flex;
@@ -115,7 +115,7 @@
115
115
  </svg>
116
116
  </span>
117
117
  </button>
118
- </div>`}}b.styles=[M`
118
+ </div>`}}b.styles=[N`
119
119
  :host {
120
120
  --voca-rem-multiplier: 0.625;
121
121
  --trigger-label-bg: #f5e0ff;
@@ -224,7 +224,7 @@
224
224
  .trigger-label:hover {
225
225
  opacity: 0.8;
226
226
  }
227
- `];Y([m({attribute:!1})],b.prototype,"application",2);Y([U()],b.prototype,"active",2);Y([U()],b.prototype,"triggerVisible",2);Y([U()],b.prototype,"loaded",2);Y([U()],b.prototype,"icon",2);var _i=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,S=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ai(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&_i(t,e,r),r};const ye=s=>{class t extends s{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(i){this.properties=i}writeLayout(i){this.layout=i}writeContext(i){this.context=i}addChild(i){i.parent=this,this.nodes.push(i)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),this.application.mountComponent(this)}}return t.styles=[M`
227
+ `];Y([m({attribute:!1})],b.prototype,"application",2);Y([U()],b.prototype,"active",2);Y([U()],b.prototype,"triggerVisible",2);Y([U()],b.prototype,"loaded",2);Y([U()],b.prototype,"icon",2);var _i=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,S=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ai(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&_i(t,e,r),r};const ye=s=>{class t extends s{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(i){this.properties=i}writeLayout(i){this.layout=i}writeContext(i){this.context=i}addChild(i){i.parent=this,this.nodes.push(i)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),this.application.mountComponent(this)}}return t.styles=[N`
228
228
  :host {
229
229
  font-family: var(--font-family);
230
230
  grid-column: span var(--width);
@@ -236,7 +236,7 @@
236
236
  * {
237
237
  box-sizing: border-box;
238
238
  }
239
- `],S([m()],t.prototype,"properties",2),S([m()],t.prototype,"context",2),S([m()],t.prototype,"layout",2),S([m()],t.prototype,"name",2),S([m()],t.prototype,"type",2),S([m({attribute:!1})],t.prototype,"application",2),S([m({attribute:!1})],t.prototype,"parent",2),t};class Et extends ye(_){render(){return I`Non resolved component`}}Et.styles=[M`
239
+ `],S([m()],t.prototype,"properties",2),S([m()],t.prototype,"context",2),S([m()],t.prototype,"layout",2),S([m()],t.prototype,"name",2),S([m()],t.prototype,"type",2),S([m({attribute:!1})],t.prototype,"application",2),S([m({attribute:!1})],t.prototype,"parent",2),t};class Et extends ye(_){render(){return I`Non resolved component`}}Et.styles=[N`
240
240
  :host {
241
241
  display: block;
242
242
  }
@@ -264,9 +264,9 @@
264
264
  * @license
265
265
  * Copyright 2017 Google LLC
266
266
  * SPDX-License-Identifier: BSD-3-Clause
267
- */function Pi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Jt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var n;return(n=i.get(this))==null||n.setValue(r),t.set.call(this,r)},init(r){var n;return(n=i.get(this))==null||n.setValue(r),r}};{t.constructor.addInitializer(o=>{i.set(o,new Jt(o,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get:function(){return o.get(this)},set:function(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set:function(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var Oi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ii=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ti(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&Oi(t,e,r),r};const be="application";class nt extends _{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=me()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ge(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,r;const t=this.application.settings.components.conversation;return((r=(i=t==null?void 0:t.properties)==null?void 0:i.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===$.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")),I`<div class="widget-container" ${ve(this.wrapperRef)}>
268
- ${xi(this.nodes,n=>n)}
269
- </div>`}}nt.styles=M`
267
+ */function Pi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Jt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var n;return(n=i.get(this))==null||n.setValue(r),t.set.call(this,r)},init(r){var n;return(n=i.get(this))==null||n.setValue(r),r}};{t.constructor.addInitializer(o=>{i.set(o,new Jt(o,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get:function(){return o.get(this)},set:function(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set:function(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var Oi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ii=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ti(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&Oi(t,e,r),r};const be="application";class nt extends _{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=me()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ge(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===$.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")),I`<div class="widget-container" ${ve(this.wrapperRef)}>
268
+ ${xi(this.nodes,t=>t)}
269
+ </div>`}}nt.styles=N`
270
270
  :host {
271
271
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
272
272
  --spacing-xs: 0.2rem;
@@ -313,10 +313,6 @@
313
313
  inset: 0 0 95px 0;
314
314
  height: 100%;
315
315
  }
316
- :host(.third-party) {
317
- inset: 0 0 95px 0;
318
- height: 100vh;
319
- }
320
316
  }
321
317
  @media screen and (min-width: 801px) {
322
318
  :host(.floating) {
@@ -325,14 +321,6 @@
325
321
  width: 400px;
326
322
  height: 700px;
327
323
  }
328
- :host(.third-party) {
329
- max-width: 1000px;
330
- height: 100vh;
331
- position: relative;
332
- left: 50%;
333
- transform: translateX(-50%);
334
- margin: -10px 0;
335
- }
336
324
  :host(.floating.bottom-right) {
337
325
  inset: auto 20px 95px auto;
338
326
  }
@@ -358,8 +346,6 @@
358
346
  background-color: var(--primary-background);
359
347
  padding: var(--spacing-sm);
360
348
  border: var(--widget-border, none);
361
- border-left: 1px solid #00000054;
362
- border-right: 1px solid #00000054;
363
349
  }
364
350
  @keyframes slideDown {
365
351
  from {
@@ -390,8 +376,8 @@
390
376
  animation: slideDown 0.3s linear;
391
377
  pointer-events: none;
392
378
  }
393
- `;Ii([m({attribute:!1}),Pi({context:be})],nt.prototype,"application",2);class Ri{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},r=(a,c,h,l)=>{h.forEach(p=>{const f=i(p),u=l[f.definitionId];if(!u){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=f.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&r(a,g,u.children,l))})},{entry:n,components:o}=t;return r(this,this.root,[n],o),this.root}createRoot(){return new nt}createNode(t,e){const i=this.resolveComponent(e);if(!i)return console.warn(`Unable to resolve component: ${e}`),new Et;const r=new i;return r.type=e,r.name=t,r}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const $e=class{constructor(){this.components=new Map}getComponent(s){const t=this.components.get(s);return t||console.warn(`Unable to resolve component: ${s}. You most likely forgot to register the required plugin.`),t}registerComponent(s,t){this.components.set(s,t)}async loadComponents(){const s=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(s)}defineAsWebComponent(s,t){const e=$e.ResolveWebComponentName(s);customElements.get(e)||customElements.define(e,t)}};let we=$e;we.ResolveWebComponentName=s=>`ace-${s}`;var v=(s=>(s.Mandatory="mandatory",s.Preferences="preferences",s.Analytics="analytics",s))(v||{});class _e{constructor(t,e,i){this.widgetId=t,this.storage=e==="localStorage"?window.localStorage:window.sessionStorage,this.policy=i}set(t,e,i){if(this.policy[i]){const r={value:e,category:i};this.storage.setItem(this._prefixKey(t),JSON.stringify(r))}else console.warn(`Storage policy does not allow storing items in category: ${i}`)}get(t){const e=this.storage.getItem(this._prefixKey(t));if(!e)return null;try{const i=JSON.parse(e);return this.policy[i.category]?i.value:(console.warn(`Storage policy does not allow retrieving items from category: ${i.category}`),null)}catch{return null}}removeItem(t){this.storage.removeItem(this._prefixKey(t))}updatePolicy(t){this.policy=t}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}}class Mi{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}class Ui{constructor(t){this.widget=t,this.name=t.name}open(){this.widget.appendToDOM()}close(){this.widget.hide()}hideTriggerButton(){var t;(t=this.widget.trigger)==null||t.hideTrigger()}showTriggerButton(){var t;(t=this.widget.trigger)==null||t.showTrigger()}}class Ae{constructor(t,e,i,r,n){this.id=t,this.name=e,this.container=i,this.settings=r,this.options=n,this.platform=new Ri,this.texts=new Mi,this.renderStrategy=$.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new we,this.components=[],this.trigger=null,this.api=new Ui(this),this.renderStrategy=this.options.renderStrategy||$.Inline,this.triggerIcon=this.options.triggerIcon;const o={[v.Mandatory]:!0,[v.Preferences]:!0,[v.Analytics]:!0};this.storage=new _e(this.id,"sessionStorage",o),typeof n.autoActivate=="boolean"&&(this.autoActivate=n.autoActivate),n.anchor&&(this.anchor=n.anchor),this.container.register("$settings",r),this.texts.loadTexts(r.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ne.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().appendChild(t)}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root)),this.storage.set("open","true",v.Mandatory)}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded")),this.storage.set("open","false",v.Mandatory)}mute(){this.storage.set("muteAudioNotifications","true",v.Mandatory)}unmute(){this.storage.set("muteAudioNotifications","false",v.Mandatory)}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===$.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new rt,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}render(){if(this.renderStrategy===$.Trigger){const t=new b;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const ki=s=>new z(s),xe=class{constructor(s=xe.endpoint){this._endpoint=s}async getSite(s){const e=await(await fetch(s)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let r=$.Inline;return i.renderStrategy==="Trigger"&&(r=$.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:r,autoActivate:i.autoActivate,anchor:i.anchor,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(s){const e=await(await fetch(`${this._endpoint}/widget/${s}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let z=xe;z.endpoint="https://widgets.ace.teliacompany.net/api";class Ni{constructor(t){this.site=t}storagePolicy(t){var i;(((i=this.site.environment)==null?void 0:i.applications)||[]).forEach(r=>{if(r.storage){const n={[v.Analytics]:t.includes("analytics"),[v.Mandatory]:t.includes("mandatory"),[v.Preferences]:t.includes("preferences")};r.storage.updatePolicy(n)}})}}class Ce{constructor(){this.applications=[],this.container=new $t("environment",this),this.bootstrapped=!1,this.site=null,this.widgetAPIHandlers=new Map,this.siteConfigurationHandlers=[],setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate(),this.siteConfigurationHandlers.forEach(t=>{this.site&&t(this.site.api)});for(const[t,e]of this.widgetAPIHandlers)e.forEach(i=>{i()});this.bootstrapped=!0}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const i=this.applications.find(r=>r.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}configure(t){if(!this.site||!this.bootstrapped){this.siteConfigurationHandlers.push(t);return}t(this.site.api)}widget(t,e){const i=this.applications.find(r=>r.name===t);if(!i){const r=this.widgetAPIHandlers.get(t)||[];r.push(()=>{const n=this.applications.find(o=>o.name===t);e(n==null?void 0:n.api)}),this.widgetAPIHandlers.set(t,r);return}e(i==null?void 0:i.api)}registerApp(t,e,i,r){const n=new $t(e,this),o=new Ae(t,e,n,i,r);this.applications.push(o)}registerSite(t){this.site=t}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class Se{constructor(t){this.configurations=[],this.httpClient=new z,this.api=new Ni(this),this.httpClient=new z,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new Ce,this.addGlobal(this.environment);for await(const i of this.configurations){const r=await this.httpClient.getWidget(i.widgetId);r&&((e=this.environment)==null||e.registerApp(i.widgetId,r.name,r.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),this.environment.registerSite(this),await this.environment.bootstrap()}addGlobal(t){const e=globalThis.widgets;((e==null?void 0:e._w)||[]).forEach(([i,r])=>{t.widget(i,r)}),((e==null?void 0:e._c)||[]).forEach(i=>{t.configure(i)}),globalThis.widgets=t}}var ji=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Pt=(s,t,e,i)=>{for(var r=i>1?void 0:i?Hi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&ji(t,e,r),r};class k extends _{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return d;if(this.widget.renderStrategy===$.Trigger){const t=new b;return t.application=this.widget,t}return this.widget.render()}}k.styles=[M`
379
+ `;Ii([m({attribute:!1}),Pi({context:be})],nt.prototype,"application",2);class Ri{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},r=(a,c,h,l)=>{h.forEach(p=>{const f=i(p),u=l[f.definitionId];if(!u){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=f.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&r(a,g,u.children,l))})},{entry:n,components:o}=t;return r(this,this.root,[n],o),this.root}createRoot(){return new nt}createNode(t,e){const i=this.resolveComponent(e);if(!i)return console.warn(`Unable to resolve component: ${e}`),new Et;const r=new i;return r.type=e,r.name=t,r}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const $e=class{constructor(){this.components=new Map}getComponent(s){const t=this.components.get(s);return t||console.warn(`Unable to resolve component: ${s}. You most likely forgot to register the required plugin.`),t}registerComponent(s,t){this.components.set(s,t)}async loadComponents(){const s=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(s)}defineAsWebComponent(s,t){const e=$e.ResolveWebComponentName(s);customElements.get(e)||customElements.define(e,t)}};let we=$e;we.ResolveWebComponentName=s=>`ace-${s}`;var v=(s=>(s.Necessary="necessary",s.Functional="functional",s.Analytics="analytics",s))(v||{});class _e{constructor(t,e,i){this.disallowedKeys=[],this.widgetId=t,this.storage=e==="localStorage"?window.localStorage:window.sessionStorage,this.policy=i}set(t,e,i){if(!this.disallowedKeys.includes(t))if(this.policy[i]){const r={value:e,category:i};this.storage.setItem(this._prefixKey(t),JSON.stringify(r))}else console.warn(`Storage policy does not allow storing items in category: ${i}`)}get(t){const e=this.storage.getItem(this._prefixKey(t));if(!e)return null;try{const i=JSON.parse(e);return this.policy[i.category]?i.value:(console.warn(`Storage policy does not allow retrieving items from category: ${i.category}`),null)}catch{return null}}removeItem(t){this.storage.removeItem(this._prefixKey(t))}updatePolicy(t){this.policy=t}disallowKey(t){this.disallowedKeys.includes(t)||this.disallowedKeys.push(t),this.removeItem(t)}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}}class Ni{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}class Ui{constructor(t){this.widget=t,this.name=t.name}open(){this.widget.appendToDOM()}close(){this.widget.hide()}}class Ae{constructor(t,e,i,r,n){this.id=t,this.name=e,this.container=i,this.settings=r,this.options=n,this.platform=new Ri,this.texts=new Ni,this.renderStrategy=$.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new we,this.components=[],this.trigger=null,this.api=new Ui(this),this.renderStrategy=this.options.renderStrategy||$.Inline,this.triggerIcon=this.options.triggerIcon;const o={[v.Necessary]:!0,[v.Functional]:!0,[v.Analytics]:!0};this.storage=new _e(this.id,"sessionStorage",o),typeof n.autoActivate=="boolean"&&(this.autoActivate=n.autoActivate),n.anchor&&(this.anchor=n.anchor),this.container.register("$settings",r),this.texts.loadTexts(r.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ne.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().appendChild(t)}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root)),this.storage.set("open",!0,v.Necessary)}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded")),this.storage.set("open",!1,v.Necessary)}mute(){this.storage.set("muteAudioNotifications",!0,v.Necessary)}unmute(){this.storage.set("muteAudioNotifications",!1,v.Necessary)}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===$.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new rt,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}render(){if(this.renderStrategy===$.Trigger){const t=new b;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const ki=s=>new W(s),xe=class{constructor(s=xe.endpoint){this._endpoint=s}async getSite(s){const e=await(await fetch(s)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let r=$.Inline;return i.renderStrategy==="Trigger"&&(r=$.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:r,autoActivate:i.autoActivate,anchor:i.anchor,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(s){const e=await(await fetch(`${this._endpoint}/widget/${s}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let W=xe;W.endpoint="https://widgets.ace.teliacompany.net/api";class Mi{constructor(t){this.site=t}storagePolicy(t){var i;(((i=this.site.environment)==null?void 0:i.applications)||[]).forEach(r=>{if(r.storage){const n={[v.Analytics]:t.includes("analytics"),[v.Necessary]:t.includes("necessary"),[v.Functional]:t.includes("functional")};r.storage.updatePolicy(n)}})}disallowStorageKey(t){var e;(((e=this.site.environment)==null?void 0:e.applications)||[]).forEach(i=>{i.storage&&i.storage.disallowKey(t)})}}class Ce{constructor(){this.applications=[],this.container=new $t("environment",this),this.bootstrapped=!1,this.site=null,this.widgetAPIHandlers=new Map,this.siteConfigurationHandlers=[],setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate(),this.siteConfigurationHandlers.forEach(t=>{this.site&&t(this.site.api)});for(const[t,e]of this.widgetAPIHandlers)e.forEach(i=>{i()});this.bootstrapped=!0}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const i=this.applications.find(r=>r.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}configure(t){if(!this.site||!this.bootstrapped){this.siteConfigurationHandlers.push(t);return}t(this.site.api)}widget(t,e){const i=this.applications.find(r=>r.name===t);if(!i){const r=this.widgetAPIHandlers.get(t)||[];r.push(()=>{const n=this.applications.find(o=>o.name===t);e(n==null?void 0:n.api)}),this.widgetAPIHandlers.set(t,r);return}e(i==null?void 0:i.api)}registerApp(t,e,i,r){const n=new $t(e,this),o=new Ae(t,e,n,i,r);this.applications.push(o)}registerSite(t){this.site=t}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class Se{constructor(t){this.configurations=[],this.httpClient=new W,this.api=new Mi(this),this.httpClient=new W,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new Ce,this.addGlobal(this.environment);for await(const i of this.configurations){const r=await this.httpClient.getWidget(i.widgetId);r&&((e=this.environment)==null||e.registerApp(i.widgetId,r.name,r.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),this.environment.registerSite(this),await this.environment.bootstrap()}addGlobal(t){const e=globalThis.widgets;((e==null?void 0:e._w)||[]).forEach(([i,r])=>{t.widget(i,r)}),((e==null?void 0:e._c)||[]).forEach(i=>{t.configure(i)}),globalThis.widgets=t}}var ji=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Pt=(s,t,e,i)=>{for(var r=i>1?void 0:i?Hi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&ji(t,e,r),r};class k extends _{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return d;if(this.widget.renderStrategy===$.Trigger){const t=new b;return t.application=this.widget,t}return this.widget.render()}}k.styles=[N`
394
380
  :host {
395
381
  display: block;
396
382
  }
397
- `];Pt([m({attribute:!0})],k.prototype,"name",2);Pt([U()],k.prototype,"widget",2);Pt([U()],k.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",rt);customElements.get("ace-trigger")||customElements.define("ace-trigger",b);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Et);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",nt);customElements.get("ace-widget")||customElements.define("ace-widget",k);const Li=async(s,t)=>{await new Se(s).bootstrap(t)};exports.AceWidget=k;exports.Application=Ae;exports.Container=$t;exports.Environment=Ce;exports.HttpClient=z;exports.Site=Se;exports.StorageCategory=v;exports.StorageService=_e;exports.Trigger=b;exports.WidgetComponent=ye;exports.applicationContext=be;exports.bootstrap=Li;exports.createHttpClient=ki;
383
+ `];Pt([m({attribute:!0})],k.prototype,"name",2);Pt([U()],k.prototype,"widget",2);Pt([U()],k.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",rt);customElements.get("ace-trigger")||customElements.define("ace-trigger",b);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Et);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",nt);customElements.get("ace-widget")||customElements.define("ace-widget",k);const Li=async(s,t)=>{await new Se(s).bootstrap(t)};exports.AceWidget=k;exports.Application=Ae;exports.Container=$t;exports.Environment=Ce;exports.HttpClient=W;exports.Site=Se;exports.StorageCategory=v;exports.StorageService=_e;exports.Trigger=b;exports.WidgetComponent=ye;exports.applicationContext=be;exports.bootstrap=Li;exports.createHttpClient=ki;
package/index.mjs CHANGED
@@ -514,7 +514,7 @@ var Ie = Qt(function(s) {
514
514
  s.prototype.next.call(this, this._value = e);
515
515
  }, t;
516
516
  }($t), ne = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(ne || {});
517
- class Ut {
517
+ class Nt {
518
518
  constructor(t, e) {
519
519
  this.state = new re(
520
520
  "loading"
@@ -539,7 +539,7 @@ class Ut {
539
539
  * Copyright 2019 Google LLC
540
540
  * SPDX-License-Identifier: BSD-3-Clause
541
541
  */
542
- const G = globalThis, wt = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Mt = /* @__PURE__ */ new WeakMap();
542
+ const G = globalThis, wt = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
543
543
  let oe = class {
544
544
  constructor(t, e, i) {
545
545
  if (this._$cssResult$ = !0, i !== _t)
@@ -551,7 +551,7 @@ let oe = class {
551
551
  const e = this.t;
552
552
  if (wt && t === void 0) {
553
553
  const i = e !== void 0 && e.length === 1;
554
- i && (t = Mt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Mt.set(e, t));
554
+ i && (t = Ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ut.set(e, t));
555
555
  }
556
556
  return t;
557
557
  }
@@ -559,7 +559,7 @@ let oe = class {
559
559
  return this.cssText;
560
560
  }
561
561
  };
562
- const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), U = (s, ...t) => {
562
+ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), N = (s, ...t) => {
563
563
  const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => {
564
564
  if (o._$cssResult$ === !0)
565
565
  return o.cssText;
@@ -568,7 +568,7 @@ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), U = (s,
568
568
  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.");
569
569
  })(r) + s[n + 1], s[0]);
570
570
  return new oe(e, s, _t);
571
- }, Ue = (s, t) => {
571
+ }, Ne = (s, t) => {
572
572
  if (wt)
573
573
  s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
574
574
  else
@@ -587,10 +587,10 @@ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), U = (s,
587
587
  * Copyright 2017 Google LLC
588
588
  * SPDX-License-Identifier: BSD-3-Clause
589
589
  */
590
- const { is: Me, defineProperty: ke, getOwnPropertyDescriptor: Ne, getOwnPropertyNames: je, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, x = globalThis, Nt = x.trustedTypes, Be = Nt ? Nt.emptyScript : "", ct = x.reactiveElementPolyfillSupport, N = (s, t) => s, X = { toAttribute(s, t) {
590
+ const { is: Ue, defineProperty: ke, getOwnPropertyDescriptor: Me, getOwnPropertyNames: je, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, x = globalThis, Mt = x.trustedTypes, De = Mt ? Mt.emptyScript : "", ct = x.reactiveElementPolyfillSupport, M = (s, t) => s, X = { toAttribute(s, t) {
591
591
  switch (t) {
592
592
  case Boolean:
593
- s = s ? Be : null;
593
+ s = s ? De : null;
594
594
  break;
595
595
  case Object:
596
596
  case Array:
@@ -615,7 +615,7 @@ const { is: Me, defineProperty: ke, getOwnPropertyDescriptor: Ne, getOwnProperty
615
615
  }
616
616
  }
617
617
  return e;
618
- } }, At = (s, t) => !Me(s, t), jt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
618
+ } }, At = (s, t) => !Ue(s, t), jt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
619
619
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), x.litPropertyMetadata ?? (x.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
620
620
  let T = class extends HTMLElement {
621
621
  static addInitializer(t) {
@@ -631,7 +631,7 @@ let T = class extends HTMLElement {
631
631
  }
632
632
  }
633
633
  static getPropertyDescriptor(t, e, i) {
634
- const { get: r, set: n } = Ne(this.prototype, t) ?? { get() {
634
+ const { get: r, set: n } = Me(this.prototype, t) ?? { get() {
635
635
  return this[e];
636
636
  }, set(o) {
637
637
  this[e] = o;
@@ -647,15 +647,15 @@ let T = class extends HTMLElement {
647
647
  return this.elementProperties.get(t) ?? jt;
648
648
  }
649
649
  static _$Ei() {
650
- if (this.hasOwnProperty(N("elementProperties")))
650
+ if (this.hasOwnProperty(M("elementProperties")))
651
651
  return;
652
652
  const t = Le(this);
653
653
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
654
654
  }
655
655
  static finalize() {
656
- if (this.hasOwnProperty(N("finalized")))
656
+ if (this.hasOwnProperty(M("finalized")))
657
657
  return;
658
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
658
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
659
659
  const e = this.properties, i = [...je(e), ...He(e)];
660
660
  for (const r of i)
661
661
  this.createProperty(r, e[r]);
@@ -711,7 +711,7 @@ let T = class extends HTMLElement {
711
711
  }
712
712
  createRenderRoot() {
713
713
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
714
- return Ue(t, this.constructor.elementStyles), t;
714
+ return Ne(t, this.constructor.elementStyles), t;
715
715
  }
716
716
  connectedCallback() {
717
717
  var t;
@@ -828,15 +828,15 @@ let T = class extends HTMLElement {
828
828
  firstUpdated(t) {
829
829
  }
830
830
  };
831
- T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[N("elementProperties")] = /* @__PURE__ */ new Map(), T[N("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: T }), (x.reactiveElementVersions ?? (x.reactiveElementVersions = [])).push("2.0.4");
831
+ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[M("elementProperties")] = /* @__PURE__ */ new Map(), T[M("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: T }), (x.reactiveElementVersions ?? (x.reactiveElementVersions = [])).push("2.0.4");
832
832
  /**
833
833
  * @license
834
834
  * Copyright 2017 Google LLC
835
835
  * SPDX-License-Identifier: BSD-3-Clause
836
836
  */
837
- const j = globalThis, Q = j.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + A, De = `<${ce}>`, P = document, L = () => P.createComment(""), B = (s) => s === null || typeof s != "object" && typeof s != "function", he = Array.isArray, ze = (s) => he(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
838
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Bt = />/g, C = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
839
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Dt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), I = We(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
837
+ const j = globalThis, Q = j.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + A, Be = `<${ce}>`, P = document, L = () => P.createComment(""), D = (s) => s === null || typeof s != "object" && typeof s != "function", he = Array.isArray, ze = (s) => he(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
838
+ \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Dt = />/g, C = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
839
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), I = We(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
840
840
  function pe(s, t) {
841
841
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
842
842
  throw Error("invalid template strings array");
@@ -849,19 +849,19 @@ const Fe = (s, t) => {
849
849
  const c = s[a];
850
850
  let h, l, p = -1, f = 0;
851
851
  for (; f < c.length && (o.lastIndex = f, l = o.exec(c), l !== null); )
852
- f = o.lastIndex, o === k ? l[1] === "!--" ? o = Lt : l[1] !== void 0 ? o = Bt : l[2] !== void 0 ? (le.test(l[2]) && (r = RegExp("</" + l[2], "g")), o = C) : l[3] !== void 0 && (o = C) : o === C ? l[0] === ">" ? (o = r ?? k, p = -1) : l[1] === void 0 ? p = -2 : (p = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? C : l[3] === '"' ? zt : Dt) : o === zt || o === Dt ? o = C : o === Lt || o === Bt ? o = k : (o = C, r = void 0);
852
+ f = o.lastIndex, o === k ? l[1] === "!--" ? o = Lt : l[1] !== void 0 ? o = Dt : l[2] !== void 0 ? (le.test(l[2]) && (r = RegExp("</" + l[2], "g")), o = C) : l[3] !== void 0 && (o = C) : o === C ? l[0] === ">" ? (o = r ?? k, p = -1) : l[1] === void 0 ? p = -2 : (p = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? C : l[3] === '"' ? zt : Bt) : o === zt || o === Bt ? o = C : o === Lt || o === Dt ? o = k : (o = C, r = void 0);
853
853
  const u = o === C && s[a + 1].startsWith("/>") ? " " : "";
854
- n += o === k ? c + De : p >= 0 ? (i.push(h), c.slice(0, p) + ae + c.slice(p) + A + u) : c + A + (p === -2 ? a : u);
854
+ n += o === k ? c + Be : p >= 0 ? (i.push(h), c.slice(0, p) + ae + c.slice(p) + A + u) : c + A + (p === -2 ? a : u);
855
855
  }
856
856
  return [pe(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
857
857
  };
858
- class D {
858
+ class B {
859
859
  constructor({ strings: t, _$litType$: e }, i) {
860
860
  let r;
861
861
  this.parts = [];
862
862
  let n = 0, o = 0;
863
863
  const a = t.length - 1, c = this.parts, [h, l] = Fe(t, e);
864
- if (this.el = D.createElement(h, i), E.currentNode = this.el.content, e === 2) {
864
+ if (this.el = B.createElement(h, i), E.currentNode = this.el.content, e === 2) {
865
865
  const p = this.el.content.firstChild;
866
866
  p.replaceWith(...p.childNodes);
867
867
  }
@@ -904,7 +904,7 @@ function R(s, t, e = s, i) {
904
904
  if (t === O)
905
905
  return t;
906
906
  let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
907
- const n = B(t) ? void 0 : t._$litDirective$;
907
+ const n = D(t) ? void 0 : t._$litDirective$;
908
908
  return (r == null ? void 0 : r.constructor) !== n && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = R(s, r._$AS(s, t.values), r, i)), t;
909
909
  }
910
910
  class Ve {
@@ -956,7 +956,7 @@ class W {
956
956
  return this._$AB;
957
957
  }
958
958
  _$AI(t, e = this) {
959
- t = R(this, t, e), B(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ze(t) ? this.k(t) : this._(t);
959
+ t = R(this, t, e), D(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ze(t) ? this.k(t) : this._(t);
960
960
  }
961
961
  S(t) {
962
962
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -965,11 +965,11 @@ class W {
965
965
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
966
966
  }
967
967
  _(t) {
968
- this._$AH !== d && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
968
+ this._$AH !== d && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
969
969
  }
970
970
  $(t) {
971
971
  var n;
972
- const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(pe(i.h, i.h[0]), this.options)), i);
972
+ const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(pe(i.h, i.h[0]), this.options)), i);
973
973
  if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
974
974
  this._$AH.p(e);
975
975
  else {
@@ -979,7 +979,7 @@ class W {
979
979
  }
980
980
  _$AC(t) {
981
981
  let e = Wt.get(t.strings);
982
- return e === void 0 && Wt.set(t.strings, e = new D(t)), e;
982
+ return e === void 0 && Wt.set(t.strings, e = new B(t)), e;
983
983
  }
984
984
  k(t) {
985
985
  he(this._$AH) || (this._$AH = [], this._$AR());
@@ -1015,12 +1015,12 @@ class st {
1015
1015
  const n = this.strings;
1016
1016
  let o = !1;
1017
1017
  if (n === void 0)
1018
- t = R(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
1018
+ t = R(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
1019
1019
  else {
1020
1020
  const a = t;
1021
1021
  let c, h;
1022
1022
  for (t = n[0], c = 0; c < n.length - 1; c++)
1023
- h = R(this, a[i + c], e, c), h === O && (h = this._$AH[c]), o || (o = !B(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
1023
+ h = R(this, a[i + c], e, c), h === O && (h = this._$AH[c]), o || (o = !D(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
1024
1024
  }
1025
1025
  o && !r && this.j(t);
1026
1026
  }
@@ -1071,7 +1071,7 @@ class Ge {
1071
1071
  }
1072
1072
  }
1073
1073
  const lt = j.litHtmlPolyfillSupport;
1074
- lt == null || lt(D, W), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.1.2");
1074
+ lt == null || lt(B, W), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.1.2");
1075
1075
  const Ze = (s, t, e) => {
1076
1076
  const i = (e == null ? void 0 : e.renderBefore) ?? t;
1077
1077
  let r = i._$litPart$;
@@ -1153,7 +1153,7 @@ function m(s) {
1153
1153
  * Copyright 2017 Google LLC
1154
1154
  * SPDX-License-Identifier: BSD-3-Clause
1155
1155
  */
1156
- function M(s) {
1156
+ function U(s) {
1157
1157
  return m({ ...s, state: !0, attribute: !1 });
1158
1158
  }
1159
1159
  var Qe = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ei = (s, t, e, i) => {
@@ -1174,7 +1174,7 @@ class rt extends w {
1174
1174
  }
1175
1175
  }
1176
1176
  rt.styles = [
1177
- U`
1177
+ N`
1178
1178
  :host {
1179
1179
  position: fixed;
1180
1180
  display: flex;
@@ -1709,7 +1709,7 @@ class _ extends w {
1709
1709
  }
1710
1710
  }
1711
1711
  _.styles = [
1712
- U`
1712
+ N`
1713
1713
  :host {
1714
1714
  --voca-rem-multiplier: 0.625;
1715
1715
  --trigger-label-bg: #f5e0ff;
@@ -1824,16 +1824,16 @@ F([
1824
1824
  m({ attribute: !1 })
1825
1825
  ], _.prototype, "application", 2);
1826
1826
  F([
1827
- M()
1827
+ U()
1828
1828
  ], _.prototype, "active", 2);
1829
1829
  F([
1830
- M()
1830
+ U()
1831
1831
  ], _.prototype, "triggerVisible", 2);
1832
1832
  F([
1833
- M()
1833
+ U()
1834
1834
  ], _.prototype, "loaded", 2);
1835
1835
  F([
1836
- M()
1836
+ U()
1837
1837
  ], _.prototype, "icon", 2);
1838
1838
  var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, S = (s, t, e, i) => {
1839
1839
  for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
@@ -1866,7 +1866,7 @@ const yi = (s) => {
1866
1866
  }
1867
1867
  return t.styles = [
1868
1868
  // (superClass as unknown as typeof LitElement).styles ?? [],
1869
- U`
1869
+ N`
1870
1870
  :host {
1871
1871
  font-family: var(--font-family);
1872
1872
  grid-column: span var(--width);
@@ -1901,7 +1901,7 @@ class St extends yi(w) {
1901
1901
  }
1902
1902
  }
1903
1903
  St.styles = [
1904
- U`
1904
+ N`
1905
1905
  :host {
1906
1906
  display: block;
1907
1907
  }
@@ -2077,14 +2077,12 @@ class nt extends w {
2077
2077
  this.applyBranding(), this.applyStyles();
2078
2078
  }
2079
2079
  render() {
2080
- var i, r;
2081
- const t = this.application.settings.components.conversation;
2082
- return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === b.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")), I`<div class="widget-container" ${ve(this.wrapperRef)}>
2083
- ${bi(this.nodes, (n) => n)}
2080
+ return this.application.renderStrategy === b.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")), I`<div class="widget-container" ${ve(this.wrapperRef)}>
2081
+ ${bi(this.nodes, (t) => t)}
2084
2082
  </div>`;
2085
2083
  }
2086
2084
  }
2087
- nt.styles = U`
2085
+ nt.styles = N`
2088
2086
  :host {
2089
2087
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
2090
2088
  --spacing-xs: 0.2rem;
@@ -2131,10 +2129,6 @@ nt.styles = U`
2131
2129
  inset: 0 0 95px 0;
2132
2130
  height: 100%;
2133
2131
  }
2134
- :host(.third-party) {
2135
- inset: 0 0 95px 0;
2136
- height: 100vh;
2137
- }
2138
2132
  }
2139
2133
  @media screen and (min-width: 801px) {
2140
2134
  :host(.floating) {
@@ -2143,14 +2137,6 @@ nt.styles = U`
2143
2137
  width: 400px;
2144
2138
  height: 700px;
2145
2139
  }
2146
- :host(.third-party) {
2147
- max-width: 1000px;
2148
- height: 100vh;
2149
- position: relative;
2150
- left: 50%;
2151
- transform: translateX(-50%);
2152
- margin: -10px 0;
2153
- }
2154
2140
  :host(.floating.bottom-right) {
2155
2141
  inset: auto 20px 95px auto;
2156
2142
  }
@@ -2176,8 +2162,6 @@ nt.styles = U`
2176
2162
  background-color: var(--primary-background);
2177
2163
  padding: var(--spacing-sm);
2178
2164
  border: var(--widget-border, none);
2179
- border-left: 1px solid #00000054;
2180
- border-right: 1px solid #00000054;
2181
2165
  }
2182
2166
  @keyframes slideDown {
2183
2167
  from {
@@ -2295,19 +2279,20 @@ const ye = class {
2295
2279
  };
2296
2280
  let be = ye;
2297
2281
  be.ResolveWebComponentName = (s) => `ace-${s}`;
2298
- var y = /* @__PURE__ */ ((s) => (s.Mandatory = "mandatory", s.Preferences = "preferences", s.Analytics = "analytics", s))(y || {});
2282
+ var y = /* @__PURE__ */ ((s) => (s.Necessary = "necessary", s.Functional = "functional", s.Analytics = "analytics", s))(y || {});
2299
2283
  class Oi {
2300
2284
  constructor(t, e, i) {
2301
- this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i;
2285
+ this.disallowedKeys = [], this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i;
2302
2286
  }
2303
2287
  set(t, e, i) {
2304
- if (this.policy[i]) {
2305
- const r = { value: e, category: i };
2306
- this.storage.setItem(this._prefixKey(t), JSON.stringify(r));
2307
- } else
2308
- console.warn(
2309
- `Storage policy does not allow storing items in category: ${i}`
2310
- );
2288
+ if (!this.disallowedKeys.includes(t))
2289
+ if (this.policy[i]) {
2290
+ const r = { value: e, category: i };
2291
+ this.storage.setItem(this._prefixKey(t), JSON.stringify(r));
2292
+ } else
2293
+ console.warn(
2294
+ `Storage policy does not allow storing items in category: ${i}`
2295
+ );
2311
2296
  }
2312
2297
  get(t) {
2313
2298
  const e = this.storage.getItem(this._prefixKey(t));
@@ -2328,6 +2313,9 @@ class Oi {
2328
2313
  updatePolicy(t) {
2329
2314
  this.policy = t;
2330
2315
  }
2316
+ disallowKey(t) {
2317
+ this.disallowedKeys.includes(t) || this.disallowedKeys.push(t), this.removeItem(t);
2318
+ }
2331
2319
  _prefixKey(t) {
2332
2320
  return `ace_${this.widgetId.substring(0, 7)}-${t}`;
2333
2321
  }
@@ -2357,21 +2345,13 @@ class Ii {
2357
2345
  close() {
2358
2346
  this.widget.hide();
2359
2347
  }
2360
- hideTriggerButton() {
2361
- var t;
2362
- (t = this.widget.trigger) == null || t.hideTrigger();
2363
- }
2364
- showTriggerButton() {
2365
- var t;
2366
- (t = this.widget.trigger) == null || t.showTrigger();
2367
- }
2368
2348
  }
2369
2349
  class Ri {
2370
2350
  constructor(t, e, i, r, n) {
2371
2351
  this.id = t, this.name = e, this.container = i, this.settings = r, this.options = n, this.platform = new Pi(), this.texts = new Ti(), this.renderStrategy = b.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new be(), this.components = [], this.trigger = null, this.api = new Ii(this), this.renderStrategy = this.options.renderStrategy || b.Inline, this.triggerIcon = this.options.triggerIcon;
2372
2352
  const o = {
2373
- [y.Mandatory]: !0,
2374
- [y.Preferences]: !0,
2353
+ [y.Necessary]: !0,
2354
+ [y.Functional]: !0,
2375
2355
  [y.Analytics]: !0
2376
2356
  };
2377
2357
  this.storage = new Oi(this.id, "sessionStorage", o), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", r), this.texts.loadTexts(r.texts || {});
@@ -2396,23 +2376,19 @@ class Ri {
2396
2376
  return this.plugins.push(t), this;
2397
2377
  }
2398
2378
  appendToDOM() {
2399
- this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", "true", y.Mandatory);
2379
+ this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", !0, y.Necessary);
2400
2380
  }
2401
2381
  hide() {
2402
- this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", "false", y.Mandatory);
2382
+ this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", !1, y.Necessary);
2403
2383
  }
2404
2384
  mute() {
2405
- this.storage.set(
2406
- "muteAudioNotifications",
2407
- "true",
2408
- y.Mandatory
2409
- );
2385
+ this.storage.set("muteAudioNotifications", !0, y.Necessary);
2410
2386
  }
2411
2387
  unmute() {
2412
2388
  this.storage.set(
2413
2389
  "muteAudioNotifications",
2414
- "false",
2415
- y.Mandatory
2390
+ !1,
2391
+ y.Necessary
2416
2392
  );
2417
2393
  }
2418
2394
  registerComponent(t, e) {
@@ -2482,7 +2458,7 @@ const Fi = (s) => new et(s), $e = class {
2482
2458
  };
2483
2459
  let et = $e;
2484
2460
  et.endpoint = "https://widgets.ace.teliacompany.net/api";
2485
- class Ui {
2461
+ class Ni {
2486
2462
  constructor(t) {
2487
2463
  this.site = t;
2488
2464
  }
@@ -2492,17 +2468,23 @@ class Ui {
2492
2468
  if (r.storage) {
2493
2469
  const n = {
2494
2470
  [y.Analytics]: t.includes("analytics"),
2495
- [y.Mandatory]: t.includes("mandatory"),
2496
- [y.Preferences]: t.includes("preferences")
2471
+ [y.Necessary]: t.includes("necessary"),
2472
+ [y.Functional]: t.includes("functional")
2497
2473
  };
2498
2474
  r.storage.updatePolicy(n);
2499
2475
  }
2500
2476
  });
2501
2477
  }
2478
+ disallowStorageKey(t) {
2479
+ var e;
2480
+ (((e = this.site.environment) == null ? void 0 : e.applications) || []).forEach((i) => {
2481
+ i.storage && i.storage.disallowKey(t);
2482
+ });
2483
+ }
2502
2484
  }
2503
- class Mi {
2485
+ class Ui {
2504
2486
  constructor() {
2505
- this.applications = [], this.container = new Ut("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
2487
+ this.applications = [], this.container = new Nt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
2506
2488
  this.notifyWidgetsOfCreation();
2507
2489
  }, 1e3);
2508
2490
  }
@@ -2553,7 +2535,7 @@ class Mi {
2553
2535
  e(i == null ? void 0 : i.api);
2554
2536
  }
2555
2537
  registerApp(t, e, i, r) {
2556
- const n = new Ut(e, this), o = new Ri(t, e, n, i, r);
2538
+ const n = new Nt(e, this), o = new Ri(t, e, n, i, r);
2557
2539
  this.applications.push(o);
2558
2540
  }
2559
2541
  registerSite(t) {
@@ -2567,7 +2549,7 @@ class Mi {
2567
2549
  }
2568
2550
  class ki {
2569
2551
  constructor(t) {
2570
- this.configurations = [], this.httpClient = new et(), this.api = new Ui(this), this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
2552
+ this.configurations = [], this.httpClient = new et(), this.api = new Ni(this), this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
2571
2553
  }
2572
2554
  async load(t) {
2573
2555
  const e = await this.httpClient.getSite(t);
@@ -2592,7 +2574,7 @@ class ki {
2592
2574
  }
2593
2575
  async bootstrap(t) {
2594
2576
  var e;
2595
- this.url && await this.load(this.url), this.environment = new Mi(), this.addGlobal(this.environment);
2577
+ this.url && await this.load(this.url), this.environment = new Ui(), this.addGlobal(this.environment);
2596
2578
  for await (const i of this.configurations) {
2597
2579
  const r = await this.httpClient.getWidget(i.widgetId);
2598
2580
  r && ((e = this.environment) == null || e.registerApp(
@@ -2618,10 +2600,10 @@ class ki {
2618
2600
  }), globalThis.widgets = t;
2619
2601
  }
2620
2602
  }
2621
- var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
2603
+ var Mi = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
2622
2604
  for (var r = i > 1 ? void 0 : i ? ji(t, e) : t, n = s.length - 1, o; n >= 0; n--)
2623
2605
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
2624
- return i && r && Ni(t, e, r), r;
2606
+ return i && r && Mi(t, e, r), r;
2625
2607
  };
2626
2608
  class V extends w {
2627
2609
  constructor() {
@@ -2656,7 +2638,7 @@ class V extends w {
2656
2638
  }
2657
2639
  }
2658
2640
  V.styles = [
2659
- U`
2641
+ N`
2660
2642
  :host {
2661
2643
  display: block;
2662
2644
  }
@@ -2666,10 +2648,10 @@ Et([
2666
2648
  m({ attribute: !0 })
2667
2649
  ], V.prototype, "name", 2);
2668
2650
  Et([
2669
- M()
2651
+ U()
2670
2652
  ], V.prototype, "widget", 2);
2671
2653
  Et([
2672
- M()
2654
+ U()
2673
2655
  ], V.prototype, "status", 2);
2674
2656
  customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", rt);
2675
2657
  customElements.get("ace-trigger") || customElements.define("ace-trigger", _);
@@ -2682,8 +2664,8 @@ const Vi = async (s, t) => {
2682
2664
  export {
2683
2665
  V as AceWidget,
2684
2666
  Ri as Application,
2685
- Ut as Container,
2686
- Mi as Environment,
2667
+ Nt as Container,
2668
+ Ui as Environment,
2687
2669
  et as HttpClient,
2688
2670
  ki as Site,
2689
2671
  y as StorageCategory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.72-rc.2",
3
+ "version": "1.1.72-rc.3",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",
@@ -3,4 +3,5 @@ export declare class SiteAPI {
3
3
  private site;
4
4
  constructor(site: Site);
5
5
  storagePolicy(policies: string[]): void;
6
+ disallowStorageKey(key: string): void;
6
7
  }
@@ -1,16 +1,18 @@
1
1
  export declare enum StorageCategory {
2
- Mandatory = "mandatory",
3
- Preferences = "preferences",
2
+ Necessary = "necessary",
3
+ Functional = "functional",
4
4
  Analytics = "analytics"
5
5
  }
6
6
  export declare class StorageService {
7
7
  private storage;
8
8
  private policy;
9
9
  private widgetId;
10
+ private disallowedKeys;
10
11
  constructor(widgetId: string, storageType: 'localStorage' | 'sessionStorage', policy: Record<StorageCategory, boolean>);
11
12
  set<T>(key: string, value: T, category: StorageCategory): void;
12
13
  get<T>(key: string): T | null;
13
14
  removeItem(key: string): void;
14
15
  updatePolicy(newPolicy: Record<StorageCategory, boolean>): void;
16
+ disallowKey(key: string): void;
15
17
  private _prefixKey;
16
18
  }
@@ -5,6 +5,4 @@ export declare class WidgetAPI {
5
5
  constructor(widget: Application);
6
6
  open(): void;
7
7
  close(): void;
8
- hideTriggerButton(): void;
9
- showTriggerButton(): void;
10
8
  }