@micro-lc/preview 0.5.0-rc1 → 0.5.0-rc3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/website/development/index.js +5 -2
- package/website/index.js +1 -1
package/dist/index.js
CHANGED
@@ -79,14 +79,14 @@ class PostChannel {
|
|
79
79
|
if (import.meta.env.MODE !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') {
|
80
80
|
console.assert(to !== this.__window);
|
81
81
|
}
|
82
|
-
if ((import.meta.env.MODE !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') && keys[message.type] !== DebugMessage.Skip) {
|
82
|
+
if ( /* (import.meta.env.MODE !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') && */keys[message.type] !== DebugMessage.Skip) {
|
83
83
|
const color = this.__randomColor;
|
84
84
|
const background = `${color}22`;
|
85
85
|
const style = { background, color };
|
86
86
|
const hasTop = this.__window.top !== this.__window;
|
87
87
|
console.groupCollapsed(`%c Msg from ${this.__window.origin} ${hasTop ? '(inner)' : '(top)'} `, Object.entries(style).map(([key, val]) => `${key}: ${val}`).join('; '));
|
88
88
|
console.info(`window '${this.__window.origin}' is sending a message of type %c ${message.type} `, 'background: lightgreen; color: darkgreen');
|
89
|
-
console.log('to', to
|
89
|
+
console.log('to', to);
|
90
90
|
console.log(message.content);
|
91
91
|
console.groupEnd();
|
92
92
|
}
|
package/package.json
CHANGED
@@ -4817,14 +4817,17 @@ class PostChannel {
|
|
4817
4817
|
{
|
4818
4818
|
console.assert(to !== this.__window);
|
4819
4819
|
}
|
4820
|
-
if (
|
4820
|
+
if (
|
4821
|
+
/* ("development" !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') && */
|
4822
|
+
keys[message.type] !== 1
|
4823
|
+
) {
|
4821
4824
|
const color = this.__randomColor;
|
4822
4825
|
const background = `${color}22`;
|
4823
4826
|
const style = { background, color };
|
4824
4827
|
const hasTop = this.__window.top !== this.__window;
|
4825
4828
|
console.groupCollapsed(`%c Msg from ${this.__window.origin} ${hasTop ? "(inner)" : "(top)"} `, Object.entries(style).map(([key, val]) => `${key}: ${val}`).join("; "));
|
4826
4829
|
console.info(`window '${this.__window.origin}' is sending a message of type %c ${message.type} `, "background: lightgreen; color: darkgreen");
|
4827
|
-
console.log("to", to
|
4830
|
+
console.log("to", to);
|
4828
4831
|
console.log(message.content);
|
4829
4832
|
console.groupEnd();
|
4830
4833
|
}
|
package/website/index.js
CHANGED
@@ -8,6 +8,6 @@
|
|
8
8
|
//# sourceURL=`+l.r),l.b=yt=Q($),l.S=void 0}const Ei=/\n\/\/# source(Mapping)?URL=([^\n]+)\s*((;|\/\/[^#][^\n]*)\s*)*$/,xi=/^(text|application)\/(x-)?javascript(;|$)/,Oi=/^(text|application)\/json(;|$)/,Ii=/^(text|application)\/css(;|$)/,Ci=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;let Ut=[],Bn=0;function Li(){if(++Bn>100)return new Promise(l=>Ut.push(l))}function Ti(){Bn--,Ut.length&&Ut.shift()()}async function Dn(l,p,b){if(V&&!p.integrity)throw Error(`No integrity for ${l}${De(b)}.`);const A=Li();A&&await A;try{var k=await f(l,p)}catch($){throw $.message=`Unable to fetch ${l}${De(b)} - see network log for details.
|
9
9
|
`+$.message,$}finally{Ti()}if(!k.ok)throw Error(`${k.status} ${k.statusText} ${k.url}${De(b)}`);return k}async function Vn(l,p,b){const A=await Dn(l,p,b),k=A.headers.get("content-type");if(xi.test(k))return{r:A.url,s:await A.text(),t:"js"};if(Oi.test(k))return{r:A.url,s:`export default ${await A.text()}`,t:"json"};if(Ii.test(k))return{r:A.url,s:`var s=new CSSStyleSheet();s.replaceSync(${JSON.stringify((await A.text()).replace(Ci,($,E="",O,T)=>`url(${E}${An(O||T,l)}${E})`))});export default s;`,t:"css"};throw Error(`Unsupported Content-Type "${k}" loading ${l}${De(b)}. Modules must be served with a valid MIME type like application/javascript.`)}function qn(l,p,b,A){let k=Ye[l];if(k&&!A)return k;if(k={u:l,r:A?l:void 0,f:void 0,S:void 0,L:void 0,a:void 0,d:void 0,b:void 0,s:void 0,n:!1,t:null,m:null},Ye[l]){let $=0;for(;Ye[k.u+ ++$];);k.u+=$}return Ye[k.u]=k,k.f=(async()=>{if(!A){let $;if({r:k.r,s:A,t:$}=await(Gt[l]||Vn(l,p,b)),$&&!s){if($==="css"&&!F||$==="json"&&!q)throw Error(`${$}-modules require <script type="esms-options">{ "polyfillEnable": ["${$}-modules"] }<\/script>`);($==="css"&&!pt||$==="json"&&!dt)&&(k.n=!0)}}try{k.a=$i(A,k.u)}catch($){Lt($),k.a=[[],[],!1]}return k.S=A,k})(),k.L=k.f.then(async()=>{let $=p;k.d=(await Promise.all(k.a[0].map(async({n:E,d:O})=>{if((O>=0&&!Ve||O===-2&&!mt)&&(k.n=!0),O!==-1||!E)return;const{r:T,b:x}=await Rn(E,k.r||k.u);if(x&&(!Te||ht)&&(k.n=!0),O===-1)return ve&&ve(T)?{b:T}:($.integrity&&($=Object.assign({},$,{integrity:void 0})),qn(T,$,k.r).f)}))).filter(E=>E)}),k}function Bt(l=!1){if(!l)for(const p of document.querySelectorAll(s?"link[rel=modulepreload-shim]":"link[rel=modulepreload]"))Xn(p);for(const p of document.querySelectorAll(s?"script[type=importmap-shim]":"script[type=importmap]"))Jn(p);if(!l)for(const p of document.querySelectorAll(s?"script[type=module-shim]":"script[type=module]"))Qn(p)}function Dt(l){const p={};return l.integrity&&(p.integrity=l.integrity),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?p.credentials="include":l.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}let Gn=Promise.resolve(),Vt=1;function Yn(){--Vt===0&&!C&&(s||!Pe)&&document.dispatchEvent(new Event("DOMContentLoaded"))}e&&document.addEventListener("DOMContentLoaded",async()=>{await ze,Yn()});let Je=1;function qt(){--Je===0&&!C&&(s||!Pe)&&document.dispatchEvent(new Event("readystatechange"))}const zn=l=>l.nextSibling||l.parentNode&&zn(l.parentNode),Kn=(l,p)=>l.ep||!p&&(!l.src&&!l.innerHTML||!zn(l))||l.getAttribute("noshim")!==null||!(l.ep=!0);function Jn(l,p=Je>0){if(!Kn(l,p)){if(l.src){if(!s)return;bi()}Ke&&(bt=bt.then(async()=>{$e=Sn(l.src?await(await Dn(l.src,Dt(l))).json():JSON.parse(l.innerHTML),l.src||ie,$e)}).catch(b=>{console.log(b),b instanceof SyntaxError&&(b=new Error(`Unable to parse import map ${b.message} in: ${l.src||l.innerHTML}`)),Lt(b)}),s||(Ke=!1))}}function Qn(l,p=Je>0){if(Kn(l,p))return;const b=l.getAttribute("async")===null&&Je>0,A=Vt>0;b&&Je++,A&&Vt++;const k=Hn(l.src||ie,Dt(l),!l.src&&l.innerHTML,!s,b&&Gn).then(()=>{s&&l.dispatchEvent(new Event("load"))}).catch(Lt);b&&(Gn=k.then(qt)),A&&k.then(Yn)}const Gt={};function Xn(l){l.ep||(l.ep=!0,!Gt[l.href]&&(Gt[l.href]=Vn(l.href,Dt(l))))}})();var ln=function(t,e){return ln=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},ln(t,e)};function ue(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ln(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function ro(t,e,n,r){function o(s){return s instanceof n?s:new n(function(c){c(s)})}return new(n||(n=Promise))(function(s,c){function h(g){try{d(r.next(g))}catch(w){c(w)}}function f(g){try{d(r.throw(g))}catch(w){c(w)}}function d(g){g.done?s(g.value):o(g.value).then(h,f)}d((r=r.apply(t,e||[])).next())})}function Ir(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(d){return function(g){return f([d,g])}}function f(d){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(g){d=[6,g],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Le(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ae(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(h){c={error:h}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return s}function ce(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}function Me(t){return this instanceof Me?(this.v=t,this):new Me(t)}function io(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),o,s=[];return o={},c("next"),c("throw"),c("return"),o[Symbol.asyncIterator]=function(){return this},o;function c(S){r[S]&&(o[S]=function(I){return new Promise(function(R,C){s.push([S,I,R,C])>1||h(S,I)})})}function h(S,I){try{f(r[S](I))}catch(R){w(s[0][3],R)}}function f(S){S.value instanceof Me?Promise.resolve(S.value.v).then(d,g):w(s[0][2],S)}function d(S){h("next",S)}function g(S){h("throw",S)}function w(S,I){S(I),s.shift(),s.length&&h(s[0][0],s[0][1])}}function oo(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Le=="function"?Le(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=t[s]&&function(c){return new Promise(function(h,f){c=t[s](c),o(h,f,c.done,c.value)})}}function o(s,c,h,f){Promise.resolve(f).then(function(d){s({value:d,done:h})},c)}}function U(t){return typeof t=="function"}function vn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var tn=vn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
10
10
|
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
11
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function rt(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var me=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,o,s;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var h=Le(c),f=h.next();!f.done;f=h.next()){var d=f.value;d.remove(this)}}catch(C){e={error:C}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}else c.remove(this);var g=this.initialTeardown;if(U(g))try{g()}catch(C){s=C instanceof tn?C.errors:[C]}var w=this._finalizers;if(w){this._finalizers=null;try{for(var S=Le(w),I=S.next();!I.done;I=S.next()){var R=I.value;try{ir(R)}catch(C){s=s??[],C instanceof tn?s=ce(ce([],ae(s)),ae(C.errors)):s.push(C)}}}catch(C){r={error:C}}finally{try{I&&!I.done&&(o=S.return)&&o.call(S)}finally{if(r)throw r.error}}}if(s)throw new tn(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ir(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&rt(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&rt(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Cr=me.EMPTY;function Lr(t){return t instanceof me||t&&"closed"in t&&U(t.remove)&&U(t.add)&&U(t.unsubscribe)}function ir(t){U(t)?t():t.unsubscribe()}var Tr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},un={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=un.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,ce([t,e],ae(n))):setTimeout.apply(void 0,ce([t,e],ae(n)))},clearTimeout:function(t){var e=un.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Pr(t){un.setTimeout(function(){throw t})}function or(){}function At(t){t()}var bn=function(t){ue(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Lr(n)&&n.add(r)):r.destination=lo,r}return e.create=function(n,r,o){return new fn(n,r,o)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(me),so=Function.prototype.bind;function nn(t,e){return so.call(t,e)}var ao=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){gt(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){gt(r)}else gt(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){gt(n)}},t}(),fn=function(t){ue(e,t);function e(n,r,o){var s=t.call(this)||this,c;if(U(n)||!n)c={next:n??void 0,error:r??void 0,complete:o??void 0};else{var h;s&&Tr.useDeprecatedNextContext?(h=Object.create(n),h.unsubscribe=function(){return s.unsubscribe()},c={next:n.next&&nn(n.next,h),error:n.error&&nn(n.error,h),complete:n.complete&&nn(n.complete,h)}):c=n}return s.destination=new ao(c),s}return e}(bn);function gt(t){Pr(t)}function co(t){throw t}var lo={closed:!0,next:or,error:co,complete:or},yn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _n(t){return t}function uo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Rr(t)}function Rr(t){return t.length===0?_n:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var ee=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var o=this,s=ho(e)?e:new fn(e,n,r);return At(function(){var c=o,h=c.operator,f=c.source;s.add(h?h.call(s,f):f?o._subscribe(s):o._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=sr(n),new n(function(o,s){var c=new fn({next:function(h){try{e(h)}catch(f){s(f),c.unsubscribe()}},error:s,complete:o});r.subscribe(c)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[yn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Rr(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=sr(e),new e(function(r,o){var s;n.subscribe(function(c){return s=c},function(c){return o(c)},function(){return r(s)})})},t.create=function(e){return new t(e)},t}();function sr(t){var e;return(e=t??Tr.Promise)!==null&&e!==void 0?e:Promise}function fo(t){return t&&U(t.next)&&U(t.error)&&U(t.complete)}function ho(t){return t&&t instanceof bn||fo(t)&&Lr(t)}function po(t){return U(t==null?void 0:t.lift)}function fe(t){return function(e){if(po(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function le(t,e,n,r,o){return new mo(t,e,n,r,o)}var mo=function(t){ue(e,t);function e(n,r,o,s,c,h){var f=t.call(this,n)||this;return f.onFinalize=c,f.shouldUnsubscribe=h,f._next=r?function(d){try{r(d)}catch(g){n.error(g)}}:t.prototype._next,f._error=s?function(d){try{s(d)}catch(g){n.error(g)}finally{this.unsubscribe()}}:t.prototype._error,f._complete=o?function(){try{o()}catch(d){n.error(d)}finally{this.unsubscribe()}}:t.prototype._complete,f}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(bn),vo=vn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),It=function(t){ue(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new ar(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new vo},e.prototype.next=function(n){var r=this;At(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Le(r.currentObservers),h=c.next();!h.done;h=c.next()){var f=h.value;f.next(n)}}catch(d){o={error:d}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}}})},e.prototype.error=function(n){var r=this;At(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},e.prototype.complete=function(){var n=this;At(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,c=o.isStopped,h=o.observers;return s||c?Cr:(this.currentObservers=null,h.push(n),new me(function(){r.currentObservers=null,rt(h,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,c=r.isStopped;o?n.error(s):c&&n.complete()},e.prototype.asObservable=function(){var n=new ee;return n.source=this,n},e.create=function(n,r){return new ar(n,r)},e}(ee),ar=function(t){ue(e,t);function e(n,r){var o=t.call(this)||this;return o.destination=n,o.source=r,o}return e.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},e.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:Cr},e}(It),cr=function(t){ue(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(It),wn={now:function(){return(wn.delegate||Date).now()},delegate:void 0},Ie=function(t){ue(e,t);function e(n,r,o){n===void 0&&(n=1/0),r===void 0&&(r=1/0),o===void 0&&(o=wn);var s=t.call(this)||this;return s._bufferSize=n,s._windowTime=r,s._timestampProvider=o,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,n),s._windowTime=Math.max(1,r),s}return e.prototype.next=function(n){var r=this,o=r.isStopped,s=r._buffer,c=r._infiniteTimeWindow,h=r._timestampProvider,f=r._windowTime;o||(s.push(n),!c&&s.push(h.now()+f)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),o=this,s=o._infiniteTimeWindow,c=o._buffer,h=c.slice(),f=0;f<h.length&&!n.closed;f+=s?1:2)n.next(h[f]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,o=n._timestampProvider,s=n._buffer,c=n._infiniteTimeWindow,h=(c?1:2)*r;if(r<1/0&&h<s.length&&s.splice(0,s.length-h),!c){for(var f=o.now(),d=0,g=1;g<s.length&&s[g]<=f;g+=2)d=g;d&&s.splice(0,d+1)}},e}(It),bo=function(t){ue(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(me),St={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=St.delegate;return o!=null&&o.setInterval?o.setInterval.apply(o,ce([t,e],ae(n))):setInterval.apply(void 0,ce([t,e],ae(n)))},clearInterval:function(t){var e=St.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},yo=function(t){ue(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.scheduler=n,o.work=r,o.pending=!1,o}return e.prototype.schedule=function(n,r){var o;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var s=this.id,c=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(c,s,r)),this.pending=!0,this.delay=r,this.id=(o=this.id)!==null&&o!==void 0?o:this.requestAsyncId(c,this.id,r),this},e.prototype.requestAsyncId=function(n,r,o){return o===void 0&&(o=0),St.setInterval(n.flush.bind(n,this),o)},e.prototype.recycleAsyncId=function(n,r,o){if(o===void 0&&(o=0),o!=null&&this.delay===o&&this.pending===!1)return r;r!=null&&St.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(n,r);if(o)return o;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var o=!1,s;try{this.work(n)}catch(c){o=!0,s=c||new Error("Scheduled action threw falsy error")}if(o)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,o=n.scheduler,s=o.actions;this.work=this.state=this.scheduler=null,this.pending=!1,rt(s,this),r!=null&&(this.id=this.recycleAsyncId(o,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bo),lr=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=wn.now,t}(),_o=function(t){ue(e,t);function e(n,r){r===void 0&&(r=lr.now);var o=t.call(this,n,r)||this;return o.actions=[],o._active=!1,o}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var o;this._active=!0;do if(o=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,o){for(;n=r.shift();)n.unsubscribe();throw o}},e}(lr),gn=new _o(yo),wo=gn,go=new ee(function(t){return t.complete()});function jr(t){return t&&U(t.schedule)}function Mr(t){return t[t.length-1]}function ko(t){return U(Mr(t))?t.pop():void 0}function Nr(t){return jr(Mr(t))?t.pop():void 0}var Fr=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Hr(t){return U(t==null?void 0:t.then)}function Wr(t){return U(t[yn])}function Ur(t){return Symbol.asyncIterator&&U(t==null?void 0:t[Symbol.asyncIterator])}function Br(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function $o(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Dr=$o();function Vr(t){return U(t==null?void 0:t[Dr])}function qr(t){return io(this,arguments,function(){var n,r,o,s;return Ir(this,function(c){switch(c.label){case 0:n=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,Me(n.read())];case 3:return r=c.sent(),o=r.value,s=r.done,s?[4,Me(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,Me(o)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Gr(t){return U(t==null?void 0:t.getReader)}function ct(t){if(t instanceof ee)return t;if(t!=null){if(Wr(t))return Ao(t);if(Fr(t))return So(t);if(Hr(t))return Eo(t);if(Ur(t))return Yr(t);if(Vr(t))return xo(t);if(Gr(t))return Oo(t)}throw Br(t)}function Ao(t){return new ee(function(e){var n=t[yn]();if(U(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function So(t){return new ee(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Eo(t){return new ee(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Pr)})}function xo(t){return new ee(function(e){var n,r;try{for(var o=Le(t),s=o.next();!s.done;s=o.next()){var c=s.value;if(e.next(c),e.closed)return}}catch(h){n={error:h}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()})}function Yr(t){return new ee(function(e){Io(t,e).catch(function(n){return e.error(n)})})}function Oo(t){return Yr(qr(t))}function Io(t,e){var n,r,o,s;return ro(this,void 0,void 0,function(){var c,h;return Ir(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),n=oo(t),f.label=1;case 1:return[4,n.next()];case 2:if(r=f.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return h=f.sent(),o={error:h},[3,11];case 6:return f.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:f.sent(),f.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function re(t,e,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var s=e.schedule(function(){n(),o?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(s),!o)return s}function zr(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(le(r,function(o){return re(r,t,function(){return r.next(o)},e)},function(){return re(r,t,function(){return r.complete()},e)},function(o){return re(r,t,function(){return r.error(o)},e)}))})}function Kr(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Co(t,e){return ct(t).pipe(Kr(e),zr(e))}function Lo(t,e){return ct(t).pipe(Kr(e),zr(e))}function To(t,e){return new ee(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Po(t,e){return new ee(function(n){var r;return re(n,e,function(){r=t[Dr](),re(n,e,function(){var o,s,c;try{o=r.next(),s=o.value,c=o.done}catch(h){n.error(h);return}c?n.complete():n.next(s)},0,!0)}),function(){return U(r==null?void 0:r.return)&&r.return()}})}function Jr(t,e){if(!t)throw new Error("Iterable cannot be null");return new ee(function(n){re(n,e,function(){var r=t[Symbol.asyncIterator]();re(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function Ro(t,e){return Jr(qr(t),e)}function jo(t,e){if(t!=null){if(Wr(t))return Co(t,e);if(Fr(t))return To(t,e);if(Hr(t))return Lo(t,e);if(Ur(t))return Jr(t,e);if(Vr(t))return Po(t,e);if(Gr(t))return Ro(t,e)}throw Br(t)}function lt(t,e){return e?jo(t,e):ct(t)}function Mo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Nr(t);return lt(t,n)}var No=vn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function kt(t,e){var n=typeof e=="object";return new Promise(function(r,o){var s=!1,c;t.subscribe({next:function(h){c=h,s=!0},error:o,complete:function(){s?r(c):n?r(e.defaultValue):o(new No)}})})}function Fo(t){return t instanceof Date&&!isNaN(t)}function ge(t,e){return fe(function(n,r){var o=0;n.subscribe(le(r,function(s){r.next(t.call(e,s,o++))}))})}var Ho=Array.isArray;function Wo(t,e){return Ho(e)?t.apply(void 0,ce([],ae(e))):t(e)}function Uo(t){return ge(function(e){return Wo(t,e)})}function Bo(t,e,n){return n===void 0&&(n=_n),function(r){ur(e,function(){for(var o=t.length,s=new Array(o),c=o,h=o,f=function(g){ur(e,function(){var w=lt(t[g],e),S=!1;w.subscribe(le(r,function(I){s[g]=I,S||(S=!0,h--),h||r.next(n(s.slice()))},function(){--c||r.complete()}))},r)},d=0;d<o;d++)f(d)},r)}}function ur(t,e,n){t?re(n,t,e):e()}function Do(t,e,n,r,o,s,c,h){var f=[],d=0,g=0,w=!1,S=function(){w&&!f.length&&!d&&e.complete()},I=function(C){return d<r?R(C):f.push(C)},R=function(C){s&&e.next(C),d++;var V=!1;ct(n(C,g++)).subscribe(le(e,function(N){o==null||o(N),s?I(N):e.next(N)},function(){V=!0},void 0,function(){if(V)try{d--;for(var N=function(){var j=f.shift();c?re(e,c,function(){return R(j)}):R(j)};f.length&&d<r;)N();S()}catch(j){e.error(j)}}))};return t.subscribe(le(e,I,function(){w=!0,S()})),function(){h==null||h()}}function Fe(t,e,n){return n===void 0&&(n=1/0),U(e)?Fe(function(r,o){return ge(function(s,c){return e(r,s,o,c)})(ct(t(r,o)))},n):(typeof e=="number"&&(n=e),fe(function(r,o){return Do(r,o,t,n)}))}function hn(t,e,n){t===void 0&&(t=0),n===void 0&&(n=wo);var r=-1;return e!=null&&(jr(e)?n=e:r=e),new ee(function(o){var s=Fo(t)?+t-n.now():t;s<0&&(s=0);var c=0;return n.schedule(function(){o.closed||(o.next(c++),0<=r?this.schedule(void 0,r):o.complete())},s)})}function Vo(t,e){return t===void 0&&(t=0),e===void 0&&(e=gn),t<0&&(t=0),hn(t,t,e)}var qo=Array.isArray;function Go(t){return t.length===1&&qo(t[0])?t[0]:t}function Ce(t,e){return fe(function(n,r){var o=0;n.subscribe(le(r,function(s){return t.call(e,s,o++)&&r.next(s)}))})}function Yo(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=(e=Nr(r))!==null&&e!==void 0?e:gn,c=(n=r[0])!==null&&n!==void 0?n:null,h=r[1]||1/0;return fe(function(f,d){var g=[],w=!1,S=function(C){var V=C.buffer,N=C.subs;N.unsubscribe(),rt(g,C),d.next(V),w&&I()},I=function(){if(g){var C=new me;d.add(C);var V=[],N={buffer:V,subs:C};g.push(N),re(C,s,function(){return S(N)},t)}};c!==null&&c>=0?re(d,s,I,c,!0):w=!0,I();var R=le(d,function(C){var V,N,j=g.slice();try{for(var F=Le(j),q=F.next();!q.done;q=F.next()){var ft=q.value,ie=ft.buffer;ie.push(C),h<=ie.length&&S(ft)}}catch(Q){V={error:Q}}finally{try{q&&!q.done&&(N=F.return)&&N.call(F)}finally{if(V)throw V.error}}},function(){for(;g!=null&&g.length;)d.next(g.shift().buffer);R==null||R.unsubscribe(),d.complete(),d.unsubscribe()},void 0,function(){return g=null});f.subscribe(R)})}function Qr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ko(t);return n?uo(Qr.apply(void 0,ce([],ae(t))),Uo(n)):fe(function(r,o){Bo(ce([r],ae(Go(t))))(o)})}function zo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Qr.apply(void 0,ce([],ae(t)))}function Ko(t,e){return U(e)?Fe(t,e,1):Fe(t,1)}function Et(t){return t<=0?function(){return go}:fe(function(e,n){var r=0;e.subscribe(le(n,function(o){++r<=t&&(n.next(o),t<=r&&n.complete())}))})}function Jo(){return fe(function(t,e){var n,r=!1;t.subscribe(le(e,function(o){var s=n;n=o,r&&e.next([s,o]),r=!0}))})}function Qo(t,e,n){var r=U(t)||e||n?{next:t,error:e,complete:n}:t;return r?fe(function(o,s){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var h=!0;o.subscribe(le(s,function(f){var d;(d=r.next)===null||d===void 0||d.call(r,f),s.next(f)},function(){var f;h=!1,(f=r.complete)===null||f===void 0||f.call(r),s.complete()},function(f){var d;h=!1,(d=r.error)===null||d===void 0||d.call(r,f),s.error(f)},function(){var f,d;h&&((f=r.unsubscribe)===null||f===void 0||f.call(r)),(d=r.finalize)===null||d===void 0||d.call(r)}))}):_n}var Xo=Object.defineProperty,Zo=(t,e,n)=>e in t?Xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_e=(t,e,n)=>(Zo(t,typeof e!="symbol"?e+"":e,n),n);let es=class{constructor(e){_e(this,"_input"),_e(this,"_length"),_e(this,"_idx",0),_e(this,"_mode",0),_e(this,"_literals",[]),_e(this,"_variables",[]),_e(this,"_braketCount",0),_e(this,"_done",!1),this._input=e,this._length=e.length}concatToLastLiteral(e){this._literals.push(this._literals.pop().concat(e))}concatToLastVariable(e){this._variables.push(this._variables.pop().concat(e))}get(){const e=[...this._literals],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._variables}}run(){for(this._length===0&&this._literals.push("");this._idx<this._length;){const e=this._input.charAt(this._idx);switch(this._mode){case 0:{this._literals.length===0&&this._literals.push(""),e==="{"&&this._idx+1!==this._length&&this._input.charAt(this._idx+1)==="{"?(this._literals.push(""),this._variables.push(""),this._mode=1,this._idx+=1):this.concatToLastLiteral(e);break}case 1:e==="}"&&this._input.charAt(this._idx+1)==="}"?(this._mode=0,this._idx+=1):this.concatToLastVariable(e);break}this._idx+=1}this._mode===1&&(this._literals.pop(),this.concatToLastLiteral(`{{${this._variables.pop()}`)),this._done=!0}};const ts=t=>{const e=t.trim();if(!(e.startsWith("[")&&e.endsWith("]")))return!1;const n=e.slice(1).slice(0,-1).trim();return Number.parseInt(n).toString(10)===n},ns=t=>Number.parseInt(t.trim().slice(1).slice(0,-1).trim());function rs(t,e,n){if(!e.trim())return n?`{{${e}}}`:"";const r=e.trim().split(".").reduce((o,s)=>{if(Array.isArray(o)&&ts(s))return o[ns(s)];if(typeof o=="object"&&o!==null&&s in o)return o[s]},{...t});return typeof r=="string"?r:n?`{{${e}}}`:""}function is(t,e,n=!1){const r=new es(t);r.run();const o=r.get();let[s]=o.literals;for(let c=0;c<o.variables.length;c++)s=s.concat(rs(e,o.variables[c],n)).concat(o.literals[c+1]);return s}const os=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>[n,is(r,e)]));var ss=Object.defineProperty,as=(t,e,n)=>e in t?ss(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$t=(t,e,n)=>(as(t,typeof e!="symbol"?e+"":e,n),n);const dn="__mia_preview_id",cs=1e6,Xr={"click-element":1,"ctrl-space":1,"focus-element":0,mousedown:1,mousemove:1,"new-configuration":0,notification:1,options:1,"request-resource":1,"service-worker":1,"set-source-map":0,"tag-info":1,update:1,updated:1},ls=t=>Object.keys(Xr).includes(t);function us(t,e){if(t===null||typeof t!="object"||!("type"in t)||typeof t.type!="string")return!1;const{type:n}=t;if(!n.startsWith(e))return!1;const r=n.substring(e.length);return!!ls(r)}const fs=(t,e)=>({...e,type:`${t}${e.type}`}),hs=(t,e)=>{let{type:n}=e;return n.startsWith(t)&&(n=n.substring(t.length)),{...e,type:n}},kn=()=>{let t="#";for(let e=0;e<3;e++)t+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return t};class ds{constructor(e){$t(this,"__instance"),$t(this,"__handler"),$t(this,"__window"),$t(this,"__randomColor"),this.__instance="",this.__handler=e,this.__window=window,this.__randomColor=kn()}postMessage(e,n,r){if(this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(e!==this.__window),this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&Xr[n.type]!==1){const o=this.__randomColor,c={background:`${o}22`,color:o},h=this.__window.top!==this.__window;console.groupCollapsed(`%c Msg from ${this.__window.origin} ${h?"(inner)":"(top)"} `,Object.entries(c).map(([f,d])=>`${f}: ${d}`).join("; ")),console.info(`window '${this.__window.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log("to",e.document),console.log(n.content),console.groupEnd()}e.postMessage(fs(this.__instance,n),r)}set instance(e){this.__instance=e}get window(){return this.__window}set window(e){this.__window=e}send(e,n,r="*"){this.__window!==e&&this.postMessage(e,n,r)}recv(e,n=null){const r=({data:o,source:s})=>{if((n===null||s===n)&&us(o,this.__instance)){const c=hs(this.__instance,o);this.__handler(c)}};return e.addEventListener("message",r),()=>e.removeEventListener("message",r)}}var ps=Object.defineProperty,ms=(t,e,n)=>e in t?ps(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rn=(t,e,n)=>(ms(t,typeof e!="symbol"?e+"":e,n),n);function vs(){return{configuration:new Ie,focus:new cr(void 0),infos:new Ie,mocks:new Ie,mode:new cr("select"),notification:new Ie,setSourceMap:new Ie,swReady:new Ie(1),updated:new It,uppercaseTags:new Set}}const Zr=t=>{let e=0;const n=t.getValue();return n==="interact"?e="select":n==="select"&&(e="interact"),t.next(e),e},K=vs();function bs(t){switch(t.type){case"options":{const{content:{disableOverlay:e,redirectTo:n,timeout:r}}=t;e&&(Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),K.mode.next("interact")),r!==void 0&&Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:r});const{window:{history:o}}=this;this.window.navigator.serviceWorker.ready.then(()=>n&&o.pushState(o.state,"",n)).catch(()=>{});break}case"ctrl-space":Zr(K.mode);break;case"new-configuration":K.configuration.next({...t.content,type:"reset"});break;case"update":K.configuration.next({...t.content,type:"update"});break;case"focus-element":K.focus.next(t.content);break;case"set-source-map":{const{content:{dictionary:e}}=t;K.setSourceMap.next({...t.content,dictionary:Object.entries(e).reduce((n,[r,o])=>{try{const{href:s}=new URL(r,this.window.location.href),c=typeof o=="string"?{headers:{},query:{},to:o}:o;n[s]={originalFrom:r,...c}}catch{}return n},{})});break}}}class ys{constructor(e){rn(this,"__handler"),rn(this,"__window"),rn(this,"__randomColor"),this.__handler=e,this.__window=window,this.__randomColor=kn()}send(e,n){if(this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"){const r=this.__randomColor,s={background:`${r}22`,color:r};console.groupCollapsed("%c Msg to Service Worker ",Object.entries(s).map(([c,h])=>`${c}: ${h}`).join("; ")),console.info(`window '${this.__window.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log(n.content),console.groupEnd()}e.postMessage(n)}get window(){return this.__window}set window(e){this.__window=e}recv(){const e=({data:r})=>{this.__handler(r)},{__window:{navigator:n}}=this;return n.serviceWorker.addEventListener("message",e),()=>n.serviceWorker.removeEventListener("message",e)}}const _s=t=>{switch(t.type){case"source-map-ack":K.swReady.next(0);break}},se=new ds(bs),xt=new ys(_s),ws="en",gs=(t,e=ws)=>typeof t=="string"?t:t==null?void 0:t[e];function ks(t){return Object.entries(t).reduce((e,[n,r])=>(e[n]=gs(r),e),{})}const He=(...t)=>{},ei=t=>Array.isArray(t)?t:[t],ti=({document:{baseURI:t},location:{href:e}})=>n=>new URL(n,new URL(t,e)),ni=(t,e)=>{let n=e;return e instanceof URL||(n=t(typeof e=="string"?e:e.url)),n},$s=(t,e)=>{const{href:n,origin:r}=e;return t===r?n.substring(t.length):n},As=(t,e,n=0)=>{const{selectors:r}=e;return t.querySelector(r[n])};function Ss(t){return document.querySelector(t)}const Es=(t,e)=>{const n=e.get(t.getAttribute("__mia_preview_id"));if(n){const{css:r,rest:o,subscription:s}=n;o.forEach(c=>{var h;return(h=c.__unfocus_handler)==null?void 0:h.call(c)}),s.unsubscribe(),n.elementToFocus.forEach((c,h)=>{Object.assign(c.style,r[h])})}e.delete(t.getAttribute("__mia_preview_id"))},xs=t=>t!==void 0;function Os(t,e,n){const r=new Map,o=Ss.bind(t),s=e.pipe(Jo(),Qo(([c])=>{var h;if(c!==void 0){const f=As(t,c);f!==null&&((h=f.__unfocus_handler)==null||h.call(f),Es(f,r))}}),ge(([,c])=>c),Ce(xs),ge(c=>{const[h,...f]=c.selectors,d=f.reduce((g,w)=>{var S;const I=o(w);if(I){g.push(I);const R=(S=I.__focus_handler)==null?void 0:S.call(I);R&&"then"in R&&R.catch(He)}return g},[]);return{first:h,next:c,otherElements:d}}),ge(c=>({...c,firstElement:o(c.first)})),Ce(c=>c.firstElement!==null),ge(c=>{var h,f;return{...c,focus:(f=(h=c.firstElement).__focus_handler)==null?void 0:f.call(h)}}),Ko(({focus:c,...h})=>(c&&"then"in c?c:Promise.resolve(c??h.firstElement)).then(d=>({focus:d,...h})).catch(()=>({focus:void 0,...h})))).subscribe(({otherElements:c,next:h,firstElement:f,focus:d})=>{const g=Object.keys(h.style),w=new me,S=ei(d??f).filter(Boolean),I={css:[],elementToFocus:S,rest:c,subscription:w},R=g.reduce((C,V)=>(S.forEach((N,j)=>{var F;C.css[j]=Object.assign((F=C.css[j])!=null?F:{},{[V]:N.style[V]})}),C),I);w.add(n.pipe(Ce(C=>C==="select"),Et(1)).subscribe(()=>{S.forEach(C=>{Object.assign(C.style,h.style)})})),r.set(f.getAttribute("__mia_preview_id"),R)});return()=>s.unsubscribe()}var on;const Ot=window,We=Ot.trustedTypes,fr=We?We.createPolicy("lit-html",{createHTML:t=>t}):void 0,pn="$lit$",we=`lit$${(Math.random()+"").slice(9)}$`,ri="?"+we,Is=`<${ri}>`,Ue=document,it=()=>Ue.createComment(""),ot=t=>t===null||typeof t!="object"&&typeof t!="function",ii=Array.isArray,Cs=t=>ii(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",sn=`[
|
11
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function rt(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var me=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,o,s;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var h=Le(c),f=h.next();!f.done;f=h.next()){var d=f.value;d.remove(this)}}catch(C){e={error:C}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}else c.remove(this);var g=this.initialTeardown;if(U(g))try{g()}catch(C){s=C instanceof tn?C.errors:[C]}var w=this._finalizers;if(w){this._finalizers=null;try{for(var S=Le(w),I=S.next();!I.done;I=S.next()){var R=I.value;try{ir(R)}catch(C){s=s??[],C instanceof tn?s=ce(ce([],ae(s)),ae(C.errors)):s.push(C)}}}catch(C){r={error:C}}finally{try{I&&!I.done&&(o=S.return)&&o.call(S)}finally{if(r)throw r.error}}}if(s)throw new tn(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ir(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&rt(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&rt(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Cr=me.EMPTY;function Lr(t){return t instanceof me||t&&"closed"in t&&U(t.remove)&&U(t.add)&&U(t.unsubscribe)}function ir(t){U(t)?t():t.unsubscribe()}var Tr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},un={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=un.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,ce([t,e],ae(n))):setTimeout.apply(void 0,ce([t,e],ae(n)))},clearTimeout:function(t){var e=un.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Pr(t){un.setTimeout(function(){throw t})}function or(){}function At(t){t()}var bn=function(t){ue(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Lr(n)&&n.add(r)):r.destination=lo,r}return e.create=function(n,r,o){return new fn(n,r,o)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(me),so=Function.prototype.bind;function nn(t,e){return so.call(t,e)}var ao=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){gt(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){gt(r)}else gt(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){gt(n)}},t}(),fn=function(t){ue(e,t);function e(n,r,o){var s=t.call(this)||this,c;if(U(n)||!n)c={next:n??void 0,error:r??void 0,complete:o??void 0};else{var h;s&&Tr.useDeprecatedNextContext?(h=Object.create(n),h.unsubscribe=function(){return s.unsubscribe()},c={next:n.next&&nn(n.next,h),error:n.error&&nn(n.error,h),complete:n.complete&&nn(n.complete,h)}):c=n}return s.destination=new ao(c),s}return e}(bn);function gt(t){Pr(t)}function co(t){throw t}var lo={closed:!0,next:or,error:co,complete:or},yn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _n(t){return t}function uo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Rr(t)}function Rr(t){return t.length===0?_n:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var ee=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var o=this,s=ho(e)?e:new fn(e,n,r);return At(function(){var c=o,h=c.operator,f=c.source;s.add(h?h.call(s,f):f?o._subscribe(s):o._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=sr(n),new n(function(o,s){var c=new fn({next:function(h){try{e(h)}catch(f){s(f),c.unsubscribe()}},error:s,complete:o});r.subscribe(c)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[yn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Rr(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=sr(e),new e(function(r,o){var s;n.subscribe(function(c){return s=c},function(c){return o(c)},function(){return r(s)})})},t.create=function(e){return new t(e)},t}();function sr(t){var e;return(e=t??Tr.Promise)!==null&&e!==void 0?e:Promise}function fo(t){return t&&U(t.next)&&U(t.error)&&U(t.complete)}function ho(t){return t&&t instanceof bn||fo(t)&&Lr(t)}function po(t){return U(t==null?void 0:t.lift)}function fe(t){return function(e){if(po(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function le(t,e,n,r,o){return new mo(t,e,n,r,o)}var mo=function(t){ue(e,t);function e(n,r,o,s,c,h){var f=t.call(this,n)||this;return f.onFinalize=c,f.shouldUnsubscribe=h,f._next=r?function(d){try{r(d)}catch(g){n.error(g)}}:t.prototype._next,f._error=s?function(d){try{s(d)}catch(g){n.error(g)}finally{this.unsubscribe()}}:t.prototype._error,f._complete=o?function(){try{o()}catch(d){n.error(d)}finally{this.unsubscribe()}}:t.prototype._complete,f}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(bn),vo=vn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),It=function(t){ue(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new ar(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new vo},e.prototype.next=function(n){var r=this;At(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Le(r.currentObservers),h=c.next();!h.done;h=c.next()){var f=h.value;f.next(n)}}catch(d){o={error:d}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}}})},e.prototype.error=function(n){var r=this;At(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},e.prototype.complete=function(){var n=this;At(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,c=o.isStopped,h=o.observers;return s||c?Cr:(this.currentObservers=null,h.push(n),new me(function(){r.currentObservers=null,rt(h,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,c=r.isStopped;o?n.error(s):c&&n.complete()},e.prototype.asObservable=function(){var n=new ee;return n.source=this,n},e.create=function(n,r){return new ar(n,r)},e}(ee),ar=function(t){ue(e,t);function e(n,r){var o=t.call(this)||this;return o.destination=n,o.source=r,o}return e.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},e.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:Cr},e}(It),cr=function(t){ue(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(It),wn={now:function(){return(wn.delegate||Date).now()},delegate:void 0},Ie=function(t){ue(e,t);function e(n,r,o){n===void 0&&(n=1/0),r===void 0&&(r=1/0),o===void 0&&(o=wn);var s=t.call(this)||this;return s._bufferSize=n,s._windowTime=r,s._timestampProvider=o,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,n),s._windowTime=Math.max(1,r),s}return e.prototype.next=function(n){var r=this,o=r.isStopped,s=r._buffer,c=r._infiniteTimeWindow,h=r._timestampProvider,f=r._windowTime;o||(s.push(n),!c&&s.push(h.now()+f)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),o=this,s=o._infiniteTimeWindow,c=o._buffer,h=c.slice(),f=0;f<h.length&&!n.closed;f+=s?1:2)n.next(h[f]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,o=n._timestampProvider,s=n._buffer,c=n._infiniteTimeWindow,h=(c?1:2)*r;if(r<1/0&&h<s.length&&s.splice(0,s.length-h),!c){for(var f=o.now(),d=0,g=1;g<s.length&&s[g]<=f;g+=2)d=g;d&&s.splice(0,d+1)}},e}(It),bo=function(t){ue(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(me),St={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=St.delegate;return o!=null&&o.setInterval?o.setInterval.apply(o,ce([t,e],ae(n))):setInterval.apply(void 0,ce([t,e],ae(n)))},clearInterval:function(t){var e=St.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},yo=function(t){ue(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.scheduler=n,o.work=r,o.pending=!1,o}return e.prototype.schedule=function(n,r){var o;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var s=this.id,c=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(c,s,r)),this.pending=!0,this.delay=r,this.id=(o=this.id)!==null&&o!==void 0?o:this.requestAsyncId(c,this.id,r),this},e.prototype.requestAsyncId=function(n,r,o){return o===void 0&&(o=0),St.setInterval(n.flush.bind(n,this),o)},e.prototype.recycleAsyncId=function(n,r,o){if(o===void 0&&(o=0),o!=null&&this.delay===o&&this.pending===!1)return r;r!=null&&St.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(n,r);if(o)return o;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var o=!1,s;try{this.work(n)}catch(c){o=!0,s=c||new Error("Scheduled action threw falsy error")}if(o)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,o=n.scheduler,s=o.actions;this.work=this.state=this.scheduler=null,this.pending=!1,rt(s,this),r!=null&&(this.id=this.recycleAsyncId(o,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(bo),lr=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=wn.now,t}(),_o=function(t){ue(e,t);function e(n,r){r===void 0&&(r=lr.now);var o=t.call(this,n,r)||this;return o.actions=[],o._active=!1,o}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var o;this._active=!0;do if(o=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,o){for(;n=r.shift();)n.unsubscribe();throw o}},e}(lr),gn=new _o(yo),wo=gn,go=new ee(function(t){return t.complete()});function jr(t){return t&&U(t.schedule)}function Mr(t){return t[t.length-1]}function ko(t){return U(Mr(t))?t.pop():void 0}function Nr(t){return jr(Mr(t))?t.pop():void 0}var Fr=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Hr(t){return U(t==null?void 0:t.then)}function Wr(t){return U(t[yn])}function Ur(t){return Symbol.asyncIterator&&U(t==null?void 0:t[Symbol.asyncIterator])}function Br(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function $o(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Dr=$o();function Vr(t){return U(t==null?void 0:t[Dr])}function qr(t){return io(this,arguments,function(){var n,r,o,s;return Ir(this,function(c){switch(c.label){case 0:n=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,Me(n.read())];case 3:return r=c.sent(),o=r.value,s=r.done,s?[4,Me(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,Me(o)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Gr(t){return U(t==null?void 0:t.getReader)}function ct(t){if(t instanceof ee)return t;if(t!=null){if(Wr(t))return Ao(t);if(Fr(t))return So(t);if(Hr(t))return Eo(t);if(Ur(t))return Yr(t);if(Vr(t))return xo(t);if(Gr(t))return Oo(t)}throw Br(t)}function Ao(t){return new ee(function(e){var n=t[yn]();if(U(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function So(t){return new ee(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Eo(t){return new ee(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Pr)})}function xo(t){return new ee(function(e){var n,r;try{for(var o=Le(t),s=o.next();!s.done;s=o.next()){var c=s.value;if(e.next(c),e.closed)return}}catch(h){n={error:h}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()})}function Yr(t){return new ee(function(e){Io(t,e).catch(function(n){return e.error(n)})})}function Oo(t){return Yr(qr(t))}function Io(t,e){var n,r,o,s;return ro(this,void 0,void 0,function(){var c,h;return Ir(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),n=oo(t),f.label=1;case 1:return[4,n.next()];case 2:if(r=f.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return h=f.sent(),o={error:h},[3,11];case 6:return f.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:f.sent(),f.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function re(t,e,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var s=e.schedule(function(){n(),o?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(s),!o)return s}function zr(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(le(r,function(o){return re(r,t,function(){return r.next(o)},e)},function(){return re(r,t,function(){return r.complete()},e)},function(o){return re(r,t,function(){return r.error(o)},e)}))})}function Kr(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Co(t,e){return ct(t).pipe(Kr(e),zr(e))}function Lo(t,e){return ct(t).pipe(Kr(e),zr(e))}function To(t,e){return new ee(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Po(t,e){return new ee(function(n){var r;return re(n,e,function(){r=t[Dr](),re(n,e,function(){var o,s,c;try{o=r.next(),s=o.value,c=o.done}catch(h){n.error(h);return}c?n.complete():n.next(s)},0,!0)}),function(){return U(r==null?void 0:r.return)&&r.return()}})}function Jr(t,e){if(!t)throw new Error("Iterable cannot be null");return new ee(function(n){re(n,e,function(){var r=t[Symbol.asyncIterator]();re(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function Ro(t,e){return Jr(qr(t),e)}function jo(t,e){if(t!=null){if(Wr(t))return Co(t,e);if(Fr(t))return To(t,e);if(Hr(t))return Lo(t,e);if(Ur(t))return Jr(t,e);if(Vr(t))return Po(t,e);if(Gr(t))return Ro(t,e)}throw Br(t)}function lt(t,e){return e?jo(t,e):ct(t)}function Mo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Nr(t);return lt(t,n)}var No=vn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function kt(t,e){var n=typeof e=="object";return new Promise(function(r,o){var s=!1,c;t.subscribe({next:function(h){c=h,s=!0},error:o,complete:function(){s?r(c):n?r(e.defaultValue):o(new No)}})})}function Fo(t){return t instanceof Date&&!isNaN(t)}function ge(t,e){return fe(function(n,r){var o=0;n.subscribe(le(r,function(s){r.next(t.call(e,s,o++))}))})}var Ho=Array.isArray;function Wo(t,e){return Ho(e)?t.apply(void 0,ce([],ae(e))):t(e)}function Uo(t){return ge(function(e){return Wo(t,e)})}function Bo(t,e,n){return n===void 0&&(n=_n),function(r){ur(e,function(){for(var o=t.length,s=new Array(o),c=o,h=o,f=function(g){ur(e,function(){var w=lt(t[g],e),S=!1;w.subscribe(le(r,function(I){s[g]=I,S||(S=!0,h--),h||r.next(n(s.slice()))},function(){--c||r.complete()}))},r)},d=0;d<o;d++)f(d)},r)}}function ur(t,e,n){t?re(n,t,e):e()}function Do(t,e,n,r,o,s,c,h){var f=[],d=0,g=0,w=!1,S=function(){w&&!f.length&&!d&&e.complete()},I=function(C){return d<r?R(C):f.push(C)},R=function(C){s&&e.next(C),d++;var V=!1;ct(n(C,g++)).subscribe(le(e,function(N){o==null||o(N),s?I(N):e.next(N)},function(){V=!0},void 0,function(){if(V)try{d--;for(var N=function(){var j=f.shift();c?re(e,c,function(){return R(j)}):R(j)};f.length&&d<r;)N();S()}catch(j){e.error(j)}}))};return t.subscribe(le(e,I,function(){w=!0,S()})),function(){h==null||h()}}function Fe(t,e,n){return n===void 0&&(n=1/0),U(e)?Fe(function(r,o){return ge(function(s,c){return e(r,s,o,c)})(ct(t(r,o)))},n):(typeof e=="number"&&(n=e),fe(function(r,o){return Do(r,o,t,n)}))}function hn(t,e,n){t===void 0&&(t=0),n===void 0&&(n=wo);var r=-1;return e!=null&&(jr(e)?n=e:r=e),new ee(function(o){var s=Fo(t)?+t-n.now():t;s<0&&(s=0);var c=0;return n.schedule(function(){o.closed||(o.next(c++),0<=r?this.schedule(void 0,r):o.complete())},s)})}function Vo(t,e){return t===void 0&&(t=0),e===void 0&&(e=gn),t<0&&(t=0),hn(t,t,e)}var qo=Array.isArray;function Go(t){return t.length===1&&qo(t[0])?t[0]:t}function Ce(t,e){return fe(function(n,r){var o=0;n.subscribe(le(r,function(s){return t.call(e,s,o++)&&r.next(s)}))})}function Yo(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=(e=Nr(r))!==null&&e!==void 0?e:gn,c=(n=r[0])!==null&&n!==void 0?n:null,h=r[1]||1/0;return fe(function(f,d){var g=[],w=!1,S=function(C){var V=C.buffer,N=C.subs;N.unsubscribe(),rt(g,C),d.next(V),w&&I()},I=function(){if(g){var C=new me;d.add(C);var V=[],N={buffer:V,subs:C};g.push(N),re(C,s,function(){return S(N)},t)}};c!==null&&c>=0?re(d,s,I,c,!0):w=!0,I();var R=le(d,function(C){var V,N,j=g.slice();try{for(var F=Le(j),q=F.next();!q.done;q=F.next()){var ft=q.value,ie=ft.buffer;ie.push(C),h<=ie.length&&S(ft)}}catch(Q){V={error:Q}}finally{try{q&&!q.done&&(N=F.return)&&N.call(F)}finally{if(V)throw V.error}}},function(){for(;g!=null&&g.length;)d.next(g.shift().buffer);R==null||R.unsubscribe(),d.complete(),d.unsubscribe()},void 0,function(){return g=null});f.subscribe(R)})}function Qr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ko(t);return n?uo(Qr.apply(void 0,ce([],ae(t))),Uo(n)):fe(function(r,o){Bo(ce([r],ae(Go(t))))(o)})}function zo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Qr.apply(void 0,ce([],ae(t)))}function Ko(t,e){return U(e)?Fe(t,e,1):Fe(t,1)}function Et(t){return t<=0?function(){return go}:fe(function(e,n){var r=0;e.subscribe(le(n,function(o){++r<=t&&(n.next(o),t<=r&&n.complete())}))})}function Jo(){return fe(function(t,e){var n,r=!1;t.subscribe(le(e,function(o){var s=n;n=o,r&&e.next([s,o]),r=!0}))})}function Qo(t,e,n){var r=U(t)||e||n?{next:t,error:e,complete:n}:t;return r?fe(function(o,s){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var h=!0;o.subscribe(le(s,function(f){var d;(d=r.next)===null||d===void 0||d.call(r,f),s.next(f)},function(){var f;h=!1,(f=r.complete)===null||f===void 0||f.call(r),s.complete()},function(f){var d;h=!1,(d=r.error)===null||d===void 0||d.call(r,f),s.error(f)},function(){var f,d;h&&((f=r.unsubscribe)===null||f===void 0||f.call(r)),(d=r.finalize)===null||d===void 0||d.call(r)}))}):_n}var Xo=Object.defineProperty,Zo=(t,e,n)=>e in t?Xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_e=(t,e,n)=>(Zo(t,typeof e!="symbol"?e+"":e,n),n);let es=class{constructor(e){_e(this,"_input"),_e(this,"_length"),_e(this,"_idx",0),_e(this,"_mode",0),_e(this,"_literals",[]),_e(this,"_variables",[]),_e(this,"_braketCount",0),_e(this,"_done",!1),this._input=e,this._length=e.length}concatToLastLiteral(e){this._literals.push(this._literals.pop().concat(e))}concatToLastVariable(e){this._variables.push(this._variables.pop().concat(e))}get(){const e=[...this._literals],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._variables}}run(){for(this._length===0&&this._literals.push("");this._idx<this._length;){const e=this._input.charAt(this._idx);switch(this._mode){case 0:{this._literals.length===0&&this._literals.push(""),e==="{"&&this._idx+1!==this._length&&this._input.charAt(this._idx+1)==="{"?(this._literals.push(""),this._variables.push(""),this._mode=1,this._idx+=1):this.concatToLastLiteral(e);break}case 1:e==="}"&&this._input.charAt(this._idx+1)==="}"?(this._mode=0,this._idx+=1):this.concatToLastVariable(e);break}this._idx+=1}this._mode===1&&(this._literals.pop(),this.concatToLastLiteral(`{{${this._variables.pop()}`)),this._done=!0}};const ts=t=>{const e=t.trim();if(!(e.startsWith("[")&&e.endsWith("]")))return!1;const n=e.slice(1).slice(0,-1).trim();return Number.parseInt(n).toString(10)===n},ns=t=>Number.parseInt(t.trim().slice(1).slice(0,-1).trim());function rs(t,e,n){if(!e.trim())return n?`{{${e}}}`:"";const r=e.trim().split(".").reduce((o,s)=>{if(Array.isArray(o)&&ts(s))return o[ns(s)];if(typeof o=="object"&&o!==null&&s in o)return o[s]},{...t});return typeof r=="string"?r:n?`{{${e}}}`:""}function is(t,e,n=!1){const r=new es(t);r.run();const o=r.get();let[s]=o.literals;for(let c=0;c<o.variables.length;c++)s=s.concat(rs(e,o.variables[c],n)).concat(o.literals[c+1]);return s}const os=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>[n,is(r,e)]));var ss=Object.defineProperty,as=(t,e,n)=>e in t?ss(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$t=(t,e,n)=>(as(t,typeof e!="symbol"?e+"":e,n),n);const dn="__mia_preview_id",cs=1e6,Xr={"click-element":1,"ctrl-space":1,"focus-element":0,mousedown:1,mousemove:1,"new-configuration":0,notification:1,options:1,"request-resource":1,"service-worker":1,"set-source-map":0,"tag-info":1,update:1,updated:1},ls=t=>Object.keys(Xr).includes(t);function us(t,e){if(t===null||typeof t!="object"||!("type"in t)||typeof t.type!="string")return!1;const{type:n}=t;if(!n.startsWith(e))return!1;const r=n.substring(e.length);return!!ls(r)}const fs=(t,e)=>({...e,type:`${t}${e.type}`}),hs=(t,e)=>{let{type:n}=e;return n.startsWith(t)&&(n=n.substring(t.length)),{...e,type:n}},kn=()=>{let t="#";for(let e=0;e<3;e++)t+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return t};class ds{constructor(e){$t(this,"__instance"),$t(this,"__handler"),$t(this,"__window"),$t(this,"__randomColor"),this.__instance="",this.__handler=e,this.__window=window,this.__randomColor=kn()}postMessage(e,n,r){if(this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(e!==this.__window),Xr[n.type]!==1){const o=this.__randomColor,c={background:`${o}22`,color:o},h=this.__window.top!==this.__window;console.groupCollapsed(`%c Msg from ${this.__window.origin} ${h?"(inner)":"(top)"} `,Object.entries(c).map(([f,d])=>`${f}: ${d}`).join("; ")),console.info(`window '${this.__window.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log("to",e),console.log(n.content),console.groupEnd()}e.postMessage(fs(this.__instance,n),r)}set instance(e){this.__instance=e}get window(){return this.__window}set window(e){this.__window=e}send(e,n,r="*"){this.__window!==e&&this.postMessage(e,n,r)}recv(e,n=null){const r=({data:o,source:s})=>{if((n===null||s===n)&&us(o,this.__instance)){const c=hs(this.__instance,o);this.__handler(c)}};return e.addEventListener("message",r),()=>e.removeEventListener("message",r)}}var ps=Object.defineProperty,ms=(t,e,n)=>e in t?ps(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rn=(t,e,n)=>(ms(t,typeof e!="symbol"?e+"":e,n),n);function vs(){return{configuration:new Ie,focus:new cr(void 0),infos:new Ie,mocks:new Ie,mode:new cr("select"),notification:new Ie,setSourceMap:new Ie,swReady:new Ie(1),updated:new It,uppercaseTags:new Set}}const Zr=t=>{let e=0;const n=t.getValue();return n==="interact"?e="select":n==="select"&&(e="interact"),t.next(e),e},K=vs();function bs(t){switch(t.type){case"options":{const{content:{disableOverlay:e,redirectTo:n,timeout:r}}=t;e&&(Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),K.mode.next("interact")),r!==void 0&&Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:r});const{window:{history:o}}=this;this.window.navigator.serviceWorker.ready.then(()=>n&&o.pushState(o.state,"",n)).catch(()=>{});break}case"ctrl-space":Zr(K.mode);break;case"new-configuration":K.configuration.next({...t.content,type:"reset"});break;case"update":K.configuration.next({...t.content,type:"update"});break;case"focus-element":K.focus.next(t.content);break;case"set-source-map":{const{content:{dictionary:e}}=t;K.setSourceMap.next({...t.content,dictionary:Object.entries(e).reduce((n,[r,o])=>{try{const{href:s}=new URL(r,this.window.location.href),c=typeof o=="string"?{headers:{},query:{},to:o}:o;n[s]={originalFrom:r,...c}}catch{}return n},{})});break}}}class ys{constructor(e){rn(this,"__handler"),rn(this,"__window"),rn(this,"__randomColor"),this.__handler=e,this.__window=window,this.__randomColor=kn()}send(e,n){if(this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"){const r=this.__randomColor,s={background:`${r}22`,color:r};console.groupCollapsed("%c Msg to Service Worker ",Object.entries(s).map(([c,h])=>`${c}: ${h}`).join("; ")),console.info(`window '${this.__window.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log(n.content),console.groupEnd()}e.postMessage(n)}get window(){return this.__window}set window(e){this.__window=e}recv(){const e=({data:r})=>{this.__handler(r)},{__window:{navigator:n}}=this;return n.serviceWorker.addEventListener("message",e),()=>n.serviceWorker.removeEventListener("message",e)}}const _s=t=>{switch(t.type){case"source-map-ack":K.swReady.next(0);break}},se=new ds(bs),xt=new ys(_s),ws="en",gs=(t,e=ws)=>typeof t=="string"?t:t==null?void 0:t[e];function ks(t){return Object.entries(t).reduce((e,[n,r])=>(e[n]=gs(r),e),{})}const He=(...t)=>{},ei=t=>Array.isArray(t)?t:[t],ti=({document:{baseURI:t},location:{href:e}})=>n=>new URL(n,new URL(t,e)),ni=(t,e)=>{let n=e;return e instanceof URL||(n=t(typeof e=="string"?e:e.url)),n},$s=(t,e)=>{const{href:n,origin:r}=e;return t===r?n.substring(t.length):n},As=(t,e,n=0)=>{const{selectors:r}=e;return t.querySelector(r[n])};function Ss(t){return document.querySelector(t)}const Es=(t,e)=>{const n=e.get(t.getAttribute("__mia_preview_id"));if(n){const{css:r,rest:o,subscription:s}=n;o.forEach(c=>{var h;return(h=c.__unfocus_handler)==null?void 0:h.call(c)}),s.unsubscribe(),n.elementToFocus.forEach((c,h)=>{Object.assign(c.style,r[h])})}e.delete(t.getAttribute("__mia_preview_id"))},xs=t=>t!==void 0;function Os(t,e,n){const r=new Map,o=Ss.bind(t),s=e.pipe(Jo(),Qo(([c])=>{var h;if(c!==void 0){const f=As(t,c);f!==null&&((h=f.__unfocus_handler)==null||h.call(f),Es(f,r))}}),ge(([,c])=>c),Ce(xs),ge(c=>{const[h,...f]=c.selectors,d=f.reduce((g,w)=>{var S;const I=o(w);if(I){g.push(I);const R=(S=I.__focus_handler)==null?void 0:S.call(I);R&&"then"in R&&R.catch(He)}return g},[]);return{first:h,next:c,otherElements:d}}),ge(c=>({...c,firstElement:o(c.first)})),Ce(c=>c.firstElement!==null),ge(c=>{var h,f;return{...c,focus:(f=(h=c.firstElement).__focus_handler)==null?void 0:f.call(h)}}),Ko(({focus:c,...h})=>(c&&"then"in c?c:Promise.resolve(c??h.firstElement)).then(d=>({focus:d,...h})).catch(()=>({focus:void 0,...h})))).subscribe(({otherElements:c,next:h,firstElement:f,focus:d})=>{const g=Object.keys(h.style),w=new me,S=ei(d??f).filter(Boolean),I={css:[],elementToFocus:S,rest:c,subscription:w},R=g.reduce((C,V)=>(S.forEach((N,j)=>{var F;C.css[j]=Object.assign((F=C.css[j])!=null?F:{},{[V]:N.style[V]})}),C),I);w.add(n.pipe(Ce(C=>C==="select"),Et(1)).subscribe(()=>{S.forEach(C=>{Object.assign(C.style,h.style)})})),r.set(f.getAttribute("__mia_preview_id"),R)});return()=>s.unsubscribe()}var on;const Ot=window,We=Ot.trustedTypes,fr=We?We.createPolicy("lit-html",{createHTML:t=>t}):void 0,pn="$lit$",we=`lit$${(Math.random()+"").slice(9)}$`,ri="?"+we,Is=`<${ri}>`,Ue=document,it=()=>Ue.createComment(""),ot=t=>t===null||typeof t!="object"&&typeof t!="function",ii=Array.isArray,Cs=t=>ii(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",sn=`[
|
12
12
|
\f\r]`,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hr=/-->/g,dr=/>/g,Oe=RegExp(`>|${sn}(?:([^\\s"'>=/]+)(${sn}*=${sn}*(?:[^
|
13
13
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),pr=/'/g,mr=/"/g,oi=/^(?:script|style|textarea|title)$/i,Ls=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Ts=Ls(1),st=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),vr=new WeakMap,Ne=Ue.createTreeWalker(Ue,129,null,!1),Ps=(t,e)=>{const n=t.length-1,r=[];let o,s=e===2?"<svg>":"",c=nt;for(let f=0;f<n;f++){const d=t[f];let g,w,S=-1,I=0;for(;I<d.length&&(c.lastIndex=I,w=c.exec(d),w!==null);)I=c.lastIndex,c===nt?w[1]==="!--"?c=hr:w[1]!==void 0?c=dr:w[2]!==void 0?(oi.test(w[2])&&(o=RegExp("</"+w[2],"g")),c=Oe):w[3]!==void 0&&(c=Oe):c===Oe?w[0]===">"?(c=o??nt,S=-1):w[1]===void 0?S=-2:(S=c.lastIndex-w[2].length,g=w[1],c=w[3]===void 0?Oe:w[3]==='"'?mr:pr):c===mr||c===pr?c=Oe:c===hr||c===dr?c=nt:(c=Oe,o=void 0);const R=c===Oe&&t[f+1].startsWith("/>")?" ":"";s+=c===nt?d+Is:S>=0?(r.push(g),d.slice(0,S)+pn+d.slice(S)+we+R):d+we+(S===-2?(r.push(void 0),f):R)}const h=s+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[fr!==void 0?fr.createHTML(h):h,r]};class at{constructor({strings:e,_$litType$:n},r){let o;this.parts=[];let s=0,c=0;const h=e.length-1,f=this.parts,[d,g]=Ps(e,n);if(this.el=at.createElement(d,r),Ne.currentNode=this.el.content,n===2){const w=this.el.content,S=w.firstChild;S.remove(),w.append(...S.childNodes)}for(;(o=Ne.nextNode())!==null&&f.length<h;){if(o.nodeType===1){if(o.hasAttributes()){const w=[];for(const S of o.getAttributeNames())if(S.endsWith(pn)||S.startsWith(we)){const I=g[c++];if(w.push(S),I!==void 0){const R=o.getAttribute(I.toLowerCase()+pn).split(we),C=/([.?@])?(.*)/.exec(I);f.push({type:1,index:s,name:C[2],strings:R,ctor:C[1]==="."?js:C[1]==="?"?Ns:C[1]==="@"?Fs:Ct})}else f.push({type:6,index:s})}for(const S of w)o.removeAttribute(S)}if(oi.test(o.tagName)){const w=o.textContent.split(we),S=w.length-1;if(S>0){o.textContent=We?We.emptyScript:"";for(let I=0;I<S;I++)o.append(w[I],it()),Ne.nextNode(),f.push({type:2,index:++s});o.append(w[S],it())}}}else if(o.nodeType===8)if(o.data===ri)f.push({type:2,index:s});else{let w=-1;for(;(w=o.data.indexOf(we,w+1))!==-1;)f.push({type:7,index:s}),w+=we.length-1}s++}}static createElement(e,n){const r=Ue.createElement("template");return r.innerHTML=e,r}}function Be(t,e,n=t,r){var o,s,c,h;if(e===st)return e;let f=r!==void 0?(o=n._$Co)===null||o===void 0?void 0:o[r]:n._$Cl;const d=ot(e)?void 0:e._$litDirective$;return(f==null?void 0:f.constructor)!==d&&((s=f==null?void 0:f._$AO)===null||s===void 0||s.call(f,!1),d===void 0?f=void 0:(f=new d(t),f._$AT(t,n,r)),r!==void 0?((c=(h=n)._$Co)!==null&&c!==void 0?c:h._$Co=[])[r]=f:n._$Cl=f),f!==void 0&&(e=Be(t,f._$AS(t,e.values),f,r)),e}class Rs{constructor(e,n){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var n;const{el:{content:r},parts:o}=this._$AD,s=((n=e==null?void 0:e.creationScope)!==null&&n!==void 0?n:Ue).importNode(r,!0);Ne.currentNode=s;let c=Ne.nextNode(),h=0,f=0,d=o[0];for(;d!==void 0;){if(h===d.index){let g;d.type===2?g=new ut(c,c.nextSibling,this,e):d.type===1?g=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(g=new Hs(c,this,e)),this.u.push(g),d=o[++f]}h!==(d==null?void 0:d.index)&&(c=Ne.nextNode(),h++)}return s}p(e){let n=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class ut{constructor(e,n,r,o){var s;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=o,this._$Cm=(s=o==null?void 0:o.isConnected)===null||s===void 0||s}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Be(this,e,n),ot(e)?e===z||e==null||e===""?(this._$AH!==z&&this._$AR(),this._$AH=z):e!==this._$AH&&e!==st&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Cs(e)?this.k(e):this.g(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}g(e){this._$AH!==z&&ot(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ue.createTextNode(e)),this._$AH=e}$(e){var n;const{values:r,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=at.createElement(o.h,this.options)),o);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===s)this._$AH.p(r);else{const c=new Rs(s,this),h=c.v(this.options);c.p(r),this.T(h),this._$AH=c}}_$AC(e){let n=vr.get(e.strings);return n===void 0&&vr.set(e.strings,n=new at(e)),n}k(e){ii(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,o=0;for(const s of e)o===n.length?n.push(r=new ut(this.S(it()),this.S(it()),this,this.options)):r=n[o],r._$AI(s),o++;o<n.length&&(this._$AR(r&&r._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var n;this._$AM===void 0&&(this._$Cm=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class Ct{constructor(e,n,r,o,s){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,o){const s=this.strings;let c=!1;if(s===void 0)e=Be(this,e,n,0),c=!ot(e)||e!==this._$AH&&e!==st,c&&(this._$AH=e);else{const h=e;let f,d;for(e=s[0],f=0;f<s.length-1;f++)d=Be(this,h[r+f],n,f),d===st&&(d=this._$AH[f]),c||(c=!ot(d)||d!==this._$AH[f]),d===z?e=z:e!==z&&(e+=(d??"")+s[f+1]),this._$AH[f]=d}c&&!o&&this.j(e)}j(e){e===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class js extends Ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===z?void 0:e}}const Ms=We?We.emptyScript:"";class Ns extends Ct{constructor(){super(...arguments),this.type=4}j(e){e&&e!==z?this.element.setAttribute(this.name,Ms):this.element.removeAttribute(this.name)}}class Fs extends Ct{constructor(e,n,r,o,s){super(e,n,r,o,s),this.type=5}_$AI(e,n=this){var r;if((e=(r=Be(this,e,n,0))!==null&&r!==void 0?r:z)===st)return;const o=this._$AH,s=e===z&&o!==z||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,c=e!==z&&(o===z||s);s&&this.element.removeEventListener(this.name,this,o),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class Hs{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}}const br=Ot.litHtmlPolyfillSupport;br==null||br(at,ut),((on=Ot.litHtmlVersions)!==null&&on!==void 0?on:Ot.litHtmlVersions=[]).push("2.7.0");const Ws=(t,e,n)=>{var r,o;const s=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:e;let c=s._$litPart$;if(c===void 0){const h=(o=n==null?void 0:n.renderBefore)!==null&&o!==void 0?o:null;s._$litPart$=c=new ut(e.insertBefore(it(),h),h,void 0,n??{})}return c._$AI(t),c};const Us=t=>{const e=t.charAt(0);return!(e!==t.charAt(t.length-1)||e!=="'"&&e!=='"')};function Bs(t){const e=t.match(/([^.]+)/g);return n=>e.reduce((r,o)=>{let s=o;if(o.startsWith("[")&&o.endsWith("]")){const c=o.slice(1,-1),h=Number.parseInt(c);!Number.isNaN(h)&&h.toString()===c?s=h:(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(s=c.slice(1,-1))}if(s==="")throw new TypeError("42",{cause:t});return typeof r=="object"&&r!==null?r[s]:void 0},n)}function Ds(t,e={}){return t.reduce((n,r,o)=>{const s=r.trim(),c=Number.parseInt(s),h=Number.parseFloat(s);if(s==="")n[o]=s;else if(Us(s))n[o]=s.slice(1,-1);else if(["true","false"].includes(s))n[o]=s==="true";else if(!Number.isNaN(c)&&c.toString()===s)n[o]=c;else if(!Number.isNaN(h)&&h.toString()===s)n[o]=h;else if(s.startsWith("{")||s.startsWith("["))try{n[o]=JSON.parse(s)}catch(f){if(f instanceof SyntaxError)throw new TypeError("43",{cause:f.message})}else n[o]=Bs(s)(e);return n},[])}function si(t){return Array.isArray(t)?t:[t]}function Vs(t){const e=typeof t=="string"?[t]:t;return Array.isArray(e)?e:si(e.uris)}const qs=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Gs(t){return qs.includes(t.tag)}function Ys(t){return Array.isArray(t)?t:[t]}function ai(t,e,n){if(typeof e!="object"){t.push(`${e}`);return}Ys(e).forEach(r=>{if(typeof r!="object"){t.push(`${r}`);return}const{tag:o,attributes:s={},booleanAttributes:c=[],properties:h={}}=r,f=Gs(r),d=`<${o}`,g=f?"/>":">",w=`</${o}>`,S=Object.entries(s).reduce((j,[F,q])=>(j.push(`${F}="${q}"`),j),[]),I=si(c),{override:R,props:C}=Object.entries(h).reduce((j,[F,q])=>(n.has(F)?typeof q=="string"&&(j.override[F]=q):j.props[F]=q,j),{override:{},props:{}}),V=Array.from(n.keys()).map(j=>{var F;return`.${j}=\${${(F=R[j])!=null?F:j}}`}),N=Object.entries(C).reduce((j,[F,q])=>{switch(typeof q){case"object":case"number":case"boolean":j.push(`.${F}=\${${JSON.stringify(q)}}`);break;case"string":j.push(`.${F}=\${"${q}"}`);break}return j},[]);if(t.push([d,S.join(" "),I.join(" "),V.join(" "),N.join(" "),g].join(" ")),!f){const{content:j}=r;j!==void 0&&ai(t,j,n),t.push(w)}})}function zs(t,e=new Set){const n=[];return ai(n,t,e),n.join(" ")}const Ks="modulepreload",Js=function(t,e){return new URL(t,e).href},yr={},Qs=function(e,n,r){if(!n||n.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Js(s,r),s in yr)return;yr[s]=!0;const c=s.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(!!r)for(let g=o.length-1;g>=0;g--){const w=o[g];if(w.href===s&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${h}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Ks,c||(d.as="script",d.crossOrigin=""),d.href=s,document.head.appendChild(d),c)return new Promise((g,w)=>{d.addEventListener("load",g),d.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};function ci(t,...e){Qs(()=>import("./assets/errors-af3a2945.js"),[],import.meta.url).then(({default:n})=>{const r=n[t];r?console.error(r(...e)):console.error(...e)}).catch(n=>{console.error(`[micro-lc][composer]: Dynamic import error while importing logger utils - ${n.message}`)})}function Xs(t){return e=>{ci("0",t,e.message)}}const Zs=Object.freeze(Object.defineProperty({__proto__:null,dynamicImportError:Xs,error:ci},Symbol.toStringTag,{value:"Module"}));var _r=Zs;var ea=Object.defineProperty,ta=(t,e,n)=>e in t?ea(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pe=(t,e,n)=>(ta(t,typeof e!="symbol"?e+"":e,n),n);class na{constructor(e){pe(this,"_i",0),pe(this,"_s"),pe(this,"_l"),pe(this,"_d",!1),pe(this,"_m",0),pe(this,"_st",[]),pe(this,"_n",0),pe(this,"_li",[]),pe(this,"_v",[]),this._s=e,this._l=e.length,e.length===0&&(this._d=!0)}_sw(e){this._m=e}_fst(){this._st=[]}_fn(){this._v.push(this._st.join("")),this._fst()}_fs(){this._li.push(this._st.join("")),this._fst()}_fpn(){this._li.push(this._st.slice(0,-1).join("")),this._fst()}_nx(){const e=this._s.charAt(this._i);switch(this._m){case 1:{e==="{"?(this._n+=1,this._st.push(e)):e==="}"&&this._n===0?(this._fn(),this._sw(0)):e==="}"&&this._n>0?(this._st.push(e),this._n-=1):this._st.push(e);break}case 2:{e==="{"?(this._fpn(),this._sw(1)):(this._sw(0),this._st.push(e));break}case 0:default:{e==="$"&&this._sw(2),this._st.push(e);break}}if(this._i+=1,this._i===this._l){if(this._m===2)this._sw(0);else if(this._m===1)throw new TypeError("41",{cause:`${this._i}`});this._fs(),this._d=!0}}_c(){const e=[...this._li],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._v}}run(){for(;!this._d;)this._nx();return this._c()}}const ra=async(t,e="SHA-1")=>window.crypto.subtle.digest(e,new TextEncoder().encode(t)),an=new Map;async function ia(t){const e=await ra(t).catch(n=>{_r.error("40",t,n.message)});if(!e||!an.has(e)){let n;try{n=new na(t).run(),e&&an.set(e,n)}catch(r){r instanceof TypeError&&_r.error(r.message,t,r.cause);const o=[];Object.defineProperty(o,"raw",{value:o,writable:!1}),n={literals:o,variables:[]}}return n}return an.get(e)}class cn extends Ie{}function oa(){const t=[],e=new Proxy({},{get(n,r,o){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new cn),Reflect.get(n,r,o)}});return new Proxy(new cn,{get(n,r,o){if(r==="pool")return e;const s=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(s)?Reflect.get(n,r,o):(t.at(s)===void 0&&(t[s]=new cn),t[s])}})}async function sa(t,{extraProperties:e,context:n={}}={}){const r=Array.isArray(e)?new Set(e):e,o=zs(t,r),s=await ia(o),c=Ds(s.variables,n),h=Ts(s.literals,...c);return(f,d)=>Ws(h,f,d)}async function aa(t,e=window,n=console.error){var r;let o=[],s,c=Promise.resolve();if(t.sources){const{sources:h}=t;s=!Array.isArray(h)&&typeof h!="string"?(r=h.importmap)!=null?r:{}:{};try{e.importShim.addImportMap(s)}catch(f){n(f)}o=Vs(h),o.length>0&&(c=Promise.all(o.map(f=>e.importShim(f).catch(n))))}return c.then(()=>({...t,sources:{importmap:s,uris:o}}))}async function ca(t,e,n={}){return sa(t.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(o=>(o(e),null))}const la=t=>{var e;return{data:{message:t.message,name:t.name,stack:(e=t.stack)!=null?e:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},li=(t,e)=>se.send(t.parent,{content:la(e),type:"notification"}),ui=t=>"clientX"in t&&"clientY"in t;function wr(t,e){return n=>{ui(n)&&se.send(t.parent,{content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:e})}}const ua=(t,e)=>t.has(e.tagName)&&e.hasAttribute(dn),fa=(t,e)=>{const{document:n}=t;return r=>{let o;if(ui(r)){const{clientX:s,clientY:c}=r;o=n.elementsFromPoint(s,c).reduce((h,f)=>{if(ua(e.uppercaseTags,f)){const d=f.getAttribute(dn);h.ids.push(d),h.selectors.push(`[${dn}="${d}"]`)}return h},{ids:[],selectors:[]})}(e.mode.getValue()==="select"||o===void 0)&&se.send(t.parent,{content:o&&(o.ids.length>0?o:void 0),type:"click-element"})}},ha=t=>e=>{e.ctrlKey&&e.key===" "&&(e.preventDefault(),Zr(t.mode),t.focus.next(void 0))},da=([t,e])=>lt(e.then(n=>[t,n])),pa=([t,e])=>{const n={label:t,properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=e,o=r.then(s=>[e,{__manifest:{...n,...s},tag:t}]).catch(()=>[e,{__manifest:n,tag:t}]);return lt(o)},ma=(t,e)=>lt(e.map(n=>[n,t.whenDefined(n)])).pipe(Fe(da),Fe(pa)),va=500;function $n(t){t instanceof Error&&li(this,t)}function ba(t,e){const n=$n.bind(this);return t.pipe(Fe(([,{__manifest:{label:r,description:o,...s},tag:c}])=>(delete s.mocks,Mo({info:{...ks({description:o,label:r}),...s},tag:c}))),Yo(va),Ce(r=>r.length>0)).subscribe({error:n,next:r=>e(r)})}function ya(t){const e=$n.bind(this);return t.pipe(ge(([,{__manifest:{mocks:n={}},tag:r}])=>[r,n])).subscribe({error:e,next:n=>{K.mocks.next(n)}})}async function fi(t,{addInfo:e,tags:n}){const{subscription:r}=this,o=$n.bind(this);if(t){const s=ma(this.customElements,n);return aa(t,this,o).then(()=>{r.add(ba.call(this,s,e)),r.add(ya.call(this,s))})}}const hi=(t,e)=>{const{document:n}=t;let r=e.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="100%",r.style.width="100%",r.style.overflow="auto",r.style.display="flex",e.appendChild(r)),r};async function mn(t,e){const n=oa(),{proxyWindow:r=this}=this;return ca({content:t,sources:{importmap:{},uris:[]}},hi(this,e),{eventBus:n,proxyWindow:r})}function di(t){hi(this,t).remove()}var _a=Object.defineProperty,wa=(t,e,n)=>e in t?_a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gr=(t,e,n)=>(wa(t,typeof e!="symbol"?e+"":e,n),n);function kr(t,e,n){const{properties:r,attributes:o,booleanAttributes:s=[]}=t,c=Object.assign(Object.fromEntries(ei(s).map(f=>[f,!0])),{...o,...r});return e(c).map(({url:f,method:d="GET",notify:g=!1,handler:w=()=>Promise.resolve(new Response)})=>{var S;const I=os({...f,method:d},c),R=new URL(I.pathname,(S=I.origin)!=null?S:n);return[R.href,d,(C,V)=>w(C,V).finally(()=>{g&&this.notify(pi(d,R))})]})}const ga=(t,e)=>{const{href:n,search:r}=t;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp(`^${e}$`))!==null},ka=(t,e)=>{const{href:n}=t;return n.match(new RegExp(`^${e.replace(/\/$/,"")}/`))!==null};class $a extends Map{constructor(e){super(),gr(this,"notify"),gr(this,"__urlMap",new Map),this.notify=e}add(e,n){var r,o;const{method:s,url:c}=e,h=(r=this.get(s))!=null?r:new Map,f=(o=this.__urlMap.get(s))!=null?o:[];h.set(c,n),f.push(c),this.set(s,h),this.__urlMap.set(s,f)}match(e){var n;const{method:r,url:o}=e,s=this.__urlMap.get(r);if(s===void 0)return;const c=s.reduce((h,f,d,g)=>{if(ga(o,f)||ka(o,f)){if(h===void 0)return d;if(g[h].length<f.length)return d}return h},void 0);if(c!==void 0)return(n=this.get(r))==null?void 0:n.get(s[c])}}const Aa=t=>([e,n,r])=>t.add({method:n,url:e},r);async function $r(t,e,n,r){const o=Aa(t);return Array.isArray(e)?Promise.all(e.map(s=>kr.call(t,s,n,r)).flat().map(o)).then(He):Promise.all(kr.call(t,e,n,r).map(o)).then(He)}var Ar;const Sr=(Ar=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Ar:5e3,Sa=t=>t.includes("-"),Er=t=>({data:{tag:t},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Ea(t,e=[]){const{location:{href:n},fetch:r}=this,o=ti(this),s=new $a(this.notify.bind(this));await Promise.all(e.map(async h=>{var f;let d=()=>[];const g=await Promise.race([kt(hn(Sr)),kt(K.mocks.pipe(Ce(([S])=>S===h),Et(1)))]);if(g===0)this.notify(Er(h));else{const[,{fetch:S}]=g;S!==void 0&&(d=S)}const w=(f=t.get(h))!=null?f:[];return $r(s,w,d,n)})).catch(h=>h instanceof Error&&li(this,h));const c=async(h,f)=>{var d;const g=ni(o,h),w=s.match({method:(d=f==null?void 0:f.method)!=null?d:"GET",url:g});return w!==void 0?w(g,f).then(S=>S):r(h,f)};if(this.proxyWindow){const h=Object.assign(c,{update:async f=>{let d=()=>[];if(Sa(f.tag)){const g=await Promise.race([kt(hn(Sr)),kt(K.mocks.pipe(Ce(([w])=>w===f.tag),Et(1)))]);if(g===0)this.notify(Er(f.tag));else{const[,{fetch:w}]=g;w!==void 0&&(d=w)}}return $r(s,f,d,n)}});this.fetch=h,this.proxyWindow.fetch=h}}function xa(t,e){const{href:n,origin:r,pathname:o}=new URL(t??"",this.location.href);let s=n;return r===this.location.origin&&(s=`{ your domain }${o}`),this.notify({data:{nextUrl:s,target:e??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function Oa(t,e,n){const{href:r,origin:o,pathname:s}=new URL(n);let c=r;o===this.location.origin&&(c=`${s}`),this.notify({data:{nextUrl:c},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Ia(t,e,n){const{href:r,origin:o,pathname:s,search:c}=new URL(n);let h=r;o===this.location.origin&&(h=`${s}${c}`),this.notify({data:{nextUrl:h},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Ca(t){return new Proxy(t,{get:(e,n)=>n==="pushState"?(r,o,s)=>{Oa.call(this,r,o,new URL(s??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,o,s)=>{Ia.call(this,r,o,new URL(s??"",new URL(this.document.baseURI,this.location.href)))}:e[n]})}class xr extends Map{get length(){return this.size}clear(){super.clear()}getItem(e){var n;return(n=super.get(e))!=null?n:null}key(){return null}removeItem(e){super.delete(e)}setItem(e,n){super.set(e,n)}}const La=t=>t.tagName==="A";function Ta(t){const{prototype:{createElement:e}}=Document;return Document.prototype.createElement=function(r,o){const s=e.call(this,r,o);if(La(s)){const c=()=>{var h;return t.notify({data:{href:$s(t.location.origin,new URL(s.href,t.location.href)),target:(h=s.getAttribute("target"))!=null?h:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(s,"click",{get(){return c},set:He})}return s},()=>{Document.prototype.createElement=e}}function Pa(t,e){let n=t.fetch.bind(t);const r={notify:g=>e.next(g)},o=new xr,s=new xr,c=Object.assign(t,r),h=new Proxy(c,{get(g,w,S){if(w==="fetch")return n;if(w==="history")return Ca.call(g,g.history);if(w==="open")return xa.bind(g);if(w==="localStorage")return o;if(w==="sessionStorage")return s;const I=Reflect.get(g,w);return typeof I!="function"?I:function(...C){return Reflect.apply(I,this===S?t:this,C)}},set(g,w,S){return w==="fetch"?(n=S,!0):Reflect.set(g,w,S)}}),f=Object.assign(c,{proxyWindow:h}),d=Ta(f);return{sandbox:f,unpatch:d}}var Ra=Object.defineProperty,ja=(t,e,n)=>e in t?Ra(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Or=(t,e,n)=>(ja(t,typeof e!="symbol"?e+"":e,n),n);function Ma(t,e){const{document:n}=t,r=n.createElement("div"),o="";r.style.display=o,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex=`${cs}`;const s=()=>r.style.display===o,c=()=>s()?r.style.display="none":r.style.display=o,h=e.pipe(Ce(f=>t.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?f==="interact":!0)).subscribe(f=>{switch(f){case"interact":t.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=o;break;case 0:default:c();break}});return n.body.appendChild(r),{cleanup:()=>h.unsubscribe(),overlay:r}}const Na=t=>{const e=t.createElement("div");return e.style.height="inherit",e.style.width="inherit",t.body.appendChild(e),e};function Fa(t){const e=t;return Object.assign(t,{bootstrap:fi.bind(e),mocks:{fetch:new Map},subscription:new me,unmount:di.bind(e),update:mn.bind(e)})}class Ha{constructor(){Or(this,"_results",new Map),Or(this,"_queue",Promise.resolve())}add(e){const r=[...e].map(o=>{let s,c;const h=new Promise((f,d)=>{s=f,c=d});return this._queue=this._queue.then(()=>o()).then(f=>{s(f)}).catch(f=>c(f)),h});return Promise.allSettled(r)}get(e){return this._results.get(e)}}const Wa=t=>e=>{e.forEach(n=>{n.status==="rejected"&&t.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Ua=t=>e=>{t.infos.next(e),e.forEach(({tag:n})=>t.uppercaseTags.add(n.toUpperCase()))},Ba=(t,e,n)=>{const r=new Ha,o=n.configuration.pipe(zo(K.swReady.pipe(Et(1))),ge(([s])=>s)).subscribe(s=>{const{configuration:c}=s,{content:h}=c;let f;if(s.type==="reset"){const{contexts:d,tags:g}=s;f=r.add([()=>di.call(t,e),()=>fi.call(t,c,{addInfo:Ua(n),tags:g}),()=>Ea.call(t,d,s.tags),()=>mn.call(t,h,e).finally(()=>n.updated.next(0))])}else{const{context:d}=s;f=r.add([()=>{var g,w,S;return(S=(g=t.proxyWindow)==null?void 0:(w=g.fetch).update)==null?void 0:S.call(w,d)},()=>mn.call(t,h,e).finally(()=>n.updated.next(0))])}f.then(Wa(n.notification)).catch(He)});return()=>o.unsubscribe()},Da=t=>{const{body:e}=t;e.style.height="100%",e.style.padding="0",e.style.margin="0"},Va=(t,e)=>{const{location:{origin:n,port:r,protocol:o}}=t;return!(n!==e.origin||r!==e.port||o!==e.protocol)},pi=(t,e)=>({data:{method:t,url:e.href.substring(e.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),qa=(t,e)=>{const n=ti(t),{document:r,parent:o}=t;if(o===t)return;const s=t.fetch.bind(t);t.fetch=(c,h)=>{var f;const d=ni(n,c);return Va(r,d)&&e.next(pi((f=h==null?void 0:h.method)!=null?f:"GET",d)),s(c,h)}};function Ga(t,e){Da(t.document),qa(t,e.notification);const{cleanup:n}=Ma(t,e.mode.asObservable()),r=Os(t.document,e.focus.asObservable(),e.mode.asObservable()),o=Na(t.document),s=Fa(t),{sandbox:c,unpatch:h}=Pa(s,e.notification),f=Ba(c,o,e);return{cleanup:()=>{f(),h(),r(),n()},sandboxedWindow:c}}function mi(t,...e){if(this.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"){const n=kn(),o={background:`${n}22`,color:n};console.groupCollapsed(`%c Preview ${this.location.href}`,Object.entries(o).map(([s,c])=>`${s}: ${c}`).join("; ")),console[t](...e),console.groupEnd()}}function Ya(t){const e=mi.bind(this);t.installing?e("info","Service worker installing"):t.waiting?e("info","Service worker installed"):t.active&&e("info","Service worker active")}const za=async t=>{const{navigator:e}=t;if("serviceWorker"in e)return e.serviceWorker.register("./service-worker.js",{scope:"./"}).then(n=>Ya.call(t,n)).catch(n=>console.error(n)),e.serviceWorker.ready.then(n=>{var r;return(r=n.active)!=null?r:Promise.reject(new TypeError("serviceWorker not active"))});mi.call(t,"error","serviceWorker is not available")},Ka=async t=>(se.window=t,xt.window=t,za(t));function Ja(t,e){const n=new me;return e&&n.add(t.setSourceMap.subscribe(r=>xt.send(e,{content:r,type:"set-source-map"}))),n.add(t.updated.subscribe(()=>{se.send(window.parent,{content:{},type:"updated"})})),n.add(t.infos.subscribe(r=>{se.send(window.parent,{content:r,type:"tag-info"})})),n.add(t.notification.subscribe(r=>{se.send(window.parent,{content:r,type:"notification"})})),n.add(t.mode.subscribe(r=>{se.send(window.parent,{content:{mode:r},type:"ctrl-space"})})),()=>n.unsubscribe()}function Qa(t,...e){const n=e.map(({type:r,handler:o})=>(t.addEventListener(r,o),()=>t.removeEventListener(r,o)));return()=>{n.forEach(r=>r())}}function Xa(t,e){t.addEventListener("unload",()=>{t.subscription.unsubscribe(),e.forEach(n=>n())})}(async t=>{const e=await Ka(t);let n=He;const r=se.recv(t,t.top);if(e){const f=xt.recv(),d=Vo(100).subscribe(()=>se.send(t.parent,{content:{status:"ready"},type:"service-worker"}));n=()=>{f(),d.unsubscribe(),xt.send(e,{content:{},type:"unload-client"})}}const o=Ja(K,e),s=Qa(t,{handler:ha(K),type:"keydown"},{handler:wr(t,"mousemove"),type:"mousemove"},{handler:wr(t,"mousedown"),type:"mousedown"},{handler:fa(t,K),type:"mousedown"}),{cleanup:c,sandboxedWindow:h}=Ga(t,K);Xa(h,[c,s,o,n,r])})(window).catch(t=>{throw t});
|