mealz-components 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/assets/{OperatorSubscriber-Da2IK3Yo.js → OperatorSubscriber-BPZabEAm.js} +1 -1
  2. package/dist/assets/{Subject-CfKiwe_U.js → Subject-CZHNlEkK.js} +1 -1
  3. package/dist/assets/async-B_IhBgzg.js +1 -0
  4. package/dist/assets/lit-element-4gw3YGga.js +19 -0
  5. package/dist/assets/{mapOneOrManyArgs-BZ6laeGM.js → mapOneOrManyArgs-2FiDGdaS.js} +1 -1
  6. package/dist/assets/no-shadow-element-CaVIVF-o.js +1 -0
  7. package/dist/assets/session-handler-BPS5vj92.js +1 -0
  8. package/dist/catalog/catalog-breadcrumb/catalog-breadcrumb.min.js +1 -1
  9. package/dist/catalog/catalog-category/catalog-category.min.js +1 -1
  10. package/dist/catalog/catalog-favorites/catalog-favorites.css +1 -1
  11. package/dist/catalog/catalog-favorites/catalog-favorites.min.js +1 -1
  12. package/dist/catalog/catalog-history/catalog-history.css +1 -0
  13. package/dist/catalog/catalog-history/catalog-history.min.js +1 -0
  14. package/dist/catalog/catalog-home/catalog-home.css +1 -1
  15. package/dist/catalog/catalog-home/catalog-home.min.js +1 -1
  16. package/dist/catalog/catalog-list/catalog-list.min.js +1 -1
  17. package/dist/catalog/catalog-load-more.min.js +1 -1
  18. package/dist/catalog/catalog-tabs/catalog-tabs.css +1 -0
  19. package/dist/catalog/catalog-tabs/catalog-tabs.min.js +1 -0
  20. package/dist/catalog/catalog-toolbar/catalog-toolbar.css +1 -1
  21. package/dist/catalog/catalog-toolbar/catalog-toolbar.min.js +1 -1
  22. package/dist/catalog/catalog.css +1 -1
  23. package/dist/catalog/my-meals-button/my-meals-button.min.js +1 -1
  24. package/dist/drawer/drawer.css +1 -0
  25. package/dist/drawer/drawer.min.js +11 -0
  26. package/dist/history-order/history-order.css +1 -0
  27. package/dist/history-order/history-order.min.js +1 -0
  28. package/dist/like-button/like-button.min.js +1 -1
  29. package/dist/promotions-banner/promotions-banner.css +1 -0
  30. package/dist/recipe-card/recipe-card.css +1 -1
  31. package/dist/recipe-card/recipe-card.min.js +1 -1
  32. package/dist/recipe-card-cta/recipe-card-cta.css +1 -1
  33. package/dist/recipe-card-cta/recipe-card-cta.min.js +1 -1
  34. package/dist/recipe-pricing/recipe-pricing.css +1 -1
  35. package/dist/recipe-pricing/recipe-pricing.min.js +1 -1
  36. package/dist/recipe-promotion-badge/recipe-promotion-badge.css +1 -0
  37. package/dist/store-locator/store-locator.min.js +11 -9
  38. package/package.json +14 -4
  39. package/dist/assets/async-wibIXa2g.js +0 -1
  40. package/dist/assets/lit-element-DxqnJI-a.js +0 -19
  41. package/dist/assets/no-shadow-element-D8CgOZBZ.js +0 -1
@@ -1,3 +1,3 @@
1
1
  var _=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])},_(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function z(r,e,t,i){function o(n){return n instanceof t?n:new t(function(u){u(n)})}return new(t||(t=Promise))(function(n,u){function s(l){try{c(i.next(l))}catch(b){u(b)}}function a(l){try{c(i.throw(l))}catch(b){u(b)}}function c(l){l.done?n(l.value):o(l.value).then(s,a)}c((i=i.apply(r,e||[])).next())})}function N(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,o,n,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(c){return function(l){return a([c,l])}}function a(c){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(t=0)),t;)try{if(i=1,o&&(n=c[0]&2?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[c[0]&2,n.value]),c[0]){case 0:case 1:n=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,o=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){t.label=c[1];break}if(c[0]===6&&t.label<n[1]){t.label=n[1],n=c;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(c);break}n[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(l){c=[6,l],o=0}finally{i=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function m(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i=t.call(r),o,n=[],u;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)n.push(o.value)}catch(s){u={error:s}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(u)throw u.error}}return n}function E(r,e,t){if(t||arguments.length===2)for(var i=0,o=e.length,n;i<o;i++)(n||!(i in e))&&(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return r.concat(n||Array.prototype.slice.call(e))}function P(r){return this instanceof P?(this.v=r,this):new P(r)}function tt(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(r,e||[]),o,n=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",u),o[Symbol.asyncIterator]=function(){return this},o;function u(f){return function(h){return Promise.resolve(h).then(f,b)}}function s(f,h){i[f]&&(o[f]=function(p){return new Promise(function(Y,D){n.push([f,p,Y,D])>1||a(f,p)})},h&&(o[f]=h(o[f])))}function a(f,h){try{c(i[f](h))}catch(p){d(n[0][3],p)}}function c(f){f.value instanceof P?Promise.resolve(f.value.v).then(l,b):d(n[0][2],f)}function l(f){a("next",f)}function b(f){a("throw",f)}function d(f,h){f(h),n.shift(),n.length&&a(n[0][0],n[0][1])}}function rt(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof m=="function"?m(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=r[n]&&function(u){return new Promise(function(s,a){u=r[n](u),o(s,a,u.done,u.value)})}}function o(n,u,s,a){Promise.resolve(a).then(function(c){n({value:c,done:s})},u)}}function y(r){return typeof r=="function"}function B(r){var e=function(i){Error.call(i),i.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var S=B(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
2
2
  `+t.map(function(i,o){return o+1+") "+i.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=t}});function I(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var T=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,i,o,n;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var s=m(u),a=s.next();!a.done;a=s.next()){var c=a.value;c.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else u.remove(this);var l=this.initialTeardown;if(y(l))try{l()}catch(p){n=p instanceof S?p.errors:[p]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var d=m(b),f=d.next();!f.done;f=d.next()){var h=f.value;try{j(h)}catch(p){n=n??[],p instanceof S?n=E(E([],g(n)),g(p.errors)):n.push(p)}}}catch(p){i={error:p}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}if(n)throw new S(n)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)j(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&I(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&I(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),et=T.EMPTY;function F(r){return r instanceof T||r&&"closed"in r&&y(r.remove)&&y(r.add)&&y(r.unsubscribe)}function j(r){y(r)?r():r.unsubscribe()}var R={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},M={setTimeout:function(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setTimeout.apply(void 0,E([r,e],g(t)))},clearTimeout:function(r){var e=M.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(r)},delegate:void 0};function C(r){M.setTimeout(function(){throw r})}function U(){}function G(r){r()}var A=function(r){O(e,r);function e(t){var i=r.call(this)||this;return i.isStopped=!1,t?(i.destination=t,F(t)&&t.add(i)):i.destination=L,i}return e.create=function(t,i,o){return new x(t,i,o)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(T),H=Function.prototype.bind;function w(r,e){return H.call(r,e)}var V=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(i){v(i)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(i){v(i)}else v(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){v(t)}},r}(),x=function(r){O(e,r);function e(t,i,o){var n=r.call(this)||this,u;if(y(t)||!t)u={next:t??void 0,error:i??void 0,complete:o??void 0};else{var s;n&&R.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=function(){return n.unsubscribe()},u={next:t.next&&w(t.next,s),error:t.error&&w(t.error,s),complete:t.complete&&w(t.complete,s)}):u=t}return n.destination=new V(u),n}return e}(A);function v(r){C(r)}function q(r){throw r}var L={closed:!0,next:U,error:q,complete:U},J=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K(r){return r}function Q(r){return r.length===0?K:r.length===1?r[0]:function(t){return r.reduce(function(i,o){return o(i)},t)}}var nt=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var o=this,n=X(e)?e:new x(e,t,i);return G(function(){var u=o,s=u.operator,a=u.source;n.add(s?s.call(n,a):a?o._subscribe(n):o._trySubscribe(n))}),n},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var i=this;return t=k(t),new t(function(o,n){var u=new x({next:function(s){try{e(s)}catch(a){n(a),u.unsubscribe()}},error:n,complete:o});i.subscribe(u)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[J]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Q(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=k(e),new e(function(i,o){var n;t.subscribe(function(u){return n=u},function(u){return o(u)},function(){return i(n)})})},r.create=function(e){return new r(e)},r}();function k(r){var e;return(e=r??R.Promise)!==null&&e!==void 0?e:Promise}function W(r){return r&&y(r.next)&&y(r.error)&&y(r.complete)}function X(r){return r&&r instanceof A||W(r)&&F(r)}function Z(r){return y(r==null?void 0:r.lift)}function it(r){return function(e){if(Z(e))return e.lift(function(t){try{return r(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ot(r,e,t,i,o){return new $(r,e,t,i,o)}var $=function(r){O(e,r);function e(t,i,o,n,u,s){var a=r.call(this,t)||this;return a.onFinalize=u,a.shouldUnsubscribe=s,a._next=i?function(c){try{i(c)}catch(l){t.error(l)}}:r.prototype._next,a._error=n?function(c){try{n(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._error,a._complete=o?function(){try{o()}catch(c){t.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,a}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;r.prototype.unsubscribe.call(this),!i&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(A);export{et as E,nt as O,T as S,g as _,O as a,E as b,ot as c,I as d,K as e,J as f,tt as g,N as h,y as i,P as j,m as k,z as l,rt as m,B as n,it as o,G as p,C as r};
3
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function I(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var T=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,i,o,n;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var s=m(u),a=s.next();!a.done;a=s.next()){var c=a.value;c.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else u.remove(this);var l=this.initialTeardown;if(y(l))try{l()}catch(p){n=p instanceof S?p.errors:[p]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var d=m(b),f=d.next();!f.done;f=d.next()){var h=f.value;try{j(h)}catch(p){n=n??[],p instanceof S?n=E(E([],g(n)),g(p.errors)):n.push(p)}}}catch(p){i={error:p}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}if(n)throw new S(n)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)j(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&I(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&I(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),et=T.EMPTY;function F(r){return r instanceof T||r&&"closed"in r&&y(r.remove)&&y(r.add)&&y(r.unsubscribe)}function j(r){y(r)?r():r.unsubscribe()}var R={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},M={setTimeout:function(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return setTimeout.apply(void 0,E([r,e],g(t)))},clearTimeout:function(r){var e=M.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(r)},delegate:void 0};function C(r){M.setTimeout(function(){throw r})}function U(){}function G(r){r()}var A=function(r){O(e,r);function e(t){var i=r.call(this)||this;return i.isStopped=!1,t?(i.destination=t,F(t)&&t.add(i)):i.destination=L,i}return e.create=function(t,i,o){return new x(t,i,o)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(T),H=Function.prototype.bind;function w(r,e){return H.call(r,e)}var V=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(i){v(i)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(i){v(i)}else v(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){v(t)}},r}(),x=function(r){O(e,r);function e(t,i,o){var n=r.call(this)||this,u;if(y(t)||!t)u={next:t??void 0,error:i??void 0,complete:o??void 0};else{var s;n&&R.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=function(){return n.unsubscribe()},u={next:t.next&&w(t.next,s),error:t.error&&w(t.error,s),complete:t.complete&&w(t.complete,s)}):u=t}return n.destination=new V(u),n}return e}(A);function v(r){C(r)}function q(r){throw r}var L={closed:!0,next:U,error:q,complete:U},J=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K(r){return r}function Q(r){return r.length===0?K:r.length===1?r[0]:function(t){return r.reduce(function(i,o){return o(i)},t)}}var nt=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var o=this,n=X(e)?e:new x(e,t,i);return G(function(){var u=o,s=u.operator,a=u.source;n.add(s?s.call(n,a):a?o._subscribe(n):o._trySubscribe(n))}),n},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var i=this;return t=k(t),new t(function(o,n){var u=new x({next:function(s){try{e(s)}catch(a){n(a),u.unsubscribe()}},error:n,complete:o});i.subscribe(u)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[J]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Q(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=k(e),new e(function(i,o){var n;t.subscribe(function(u){return n=u},function(u){return o(u)},function(){return i(n)})})},r.create=function(e){return new r(e)},r}();function k(r){var e;return(e=r??R.Promise)!==null&&e!==void 0?e:Promise}function W(r){return r&&y(r.next)&&y(r.error)&&y(r.complete)}function X(r){return r&&r instanceof A||W(r)&&F(r)}function Z(r){return y(r==null?void 0:r.lift)}function it(r){return function(e){if(Z(e))return e.lift(function(t){try{return r(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ot(r,e,t,i,o){return new $(r,e,t,i,o)}var $=function(r){O(e,r);function e(t,i,o,n,u,s){var a=r.call(this,t)||this;return a.onFinalize=u,a.shouldUnsubscribe=s,a._next=i?function(c){try{i(c)}catch(l){t.error(l)}}:r.prototype._next,a._error=n?function(c){try{n(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._error,a._complete=o?function(){try{o()}catch(c){t.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,a}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;r.prototype.unsubscribe.call(this),!i&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(A);export{et as E,nt as O,T as S,g as _,O as a,E as b,ot as c,I as d,J as e,tt as f,N as g,P as h,y as i,m as j,z as k,rt as l,B as m,G as n,it as o,K as p,C as r};
@@ -1 +1 @@
1
- import{n as d,a as h,p as a,E as p,S as b,d as _,O as l,k as y}from"./OperatorSubscriber-Da2IK3Yo.js";var S=d(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),w=function(s){h(o,s);function o(){var r=s.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var t=new c(this,this);return t.operator=r,t},o.prototype._throwIfClosed=function(){if(this.closed)throw new S},o.prototype.next=function(r){var t=this;a(function(){var e,u;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var n=y(t.currentObservers),i=n.next();!i.done;i=n.next()){var v=i.value;v.next(r)}}catch(f){e={error:f}}finally{try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(e)throw e.error}}}})},o.prototype.error=function(r){var t=this;a(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=r;for(var e=t.observers;e.length;)e.shift().error(r)}})},o.prototype.complete=function(){var r=this;a(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var t=r.observers;t.length;)t.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var t=this,e=this,u=e.hasError,n=e.isStopped,i=e.observers;return u||n?p:(this.currentObservers=null,i.push(r),new b(function(){t.currentObservers=null,_(i,r)}))},o.prototype._checkFinalizedStatuses=function(r){var t=this,e=t.hasError,u=t.thrownError,n=t.isStopped;e?r.error(u):n&&r.complete()},o.prototype.asObservable=function(){var r=new l;return r.source=this,r},o.create=function(r,t){return new c(r,t)},o}(l),c=function(s){h(o,s);function o(r,t){var e=s.call(this)||this;return e.destination=r,e.source=t,e}return o.prototype.next=function(r){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.next)===null||e===void 0||e.call(t,r)},o.prototype.error=function(r){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.error)===null||e===void 0||e.call(t,r)},o.prototype.complete=function(){var r,t;(t=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||t===void 0||t.call(r)},o.prototype._subscribe=function(r){var t,e;return(e=(t=this.source)===null||t===void 0?void 0:t.subscribe(r))!==null&&e!==void 0?e:p},o}(w);export{w as S};
1
+ import{m as d,a as h,E as p,S as b,d as _,O as l,n as a,j as y}from"./OperatorSubscriber-BPZabEAm.js";var S=d(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),w=function(s){h(o,s);function o(){var r=s.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var t=new c(this,this);return t.operator=r,t},o.prototype._throwIfClosed=function(){if(this.closed)throw new S},o.prototype.next=function(r){var t=this;a(function(){var e,u;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var n=y(t.currentObservers),i=n.next();!i.done;i=n.next()){var v=i.value;v.next(r)}}catch(f){e={error:f}}finally{try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(e)throw e.error}}}})},o.prototype.error=function(r){var t=this;a(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=r;for(var e=t.observers;e.length;)e.shift().error(r)}})},o.prototype.complete=function(){var r=this;a(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var t=r.observers;t.length;)t.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var t=this,e=this,u=e.hasError,n=e.isStopped,i=e.observers;return u||n?p:(this.currentObservers=null,i.push(r),new b(function(){t.currentObservers=null,_(i,r)}))},o.prototype._checkFinalizedStatuses=function(r){var t=this,e=t.hasError,u=t.thrownError,n=t.isStopped;e?r.error(u):n&&r.complete()},o.prototype.asObservable=function(){var r=new l;return r.source=this,r},o.create=function(r,t){return new c(r,t)},o}(l),c=function(s){h(o,s);function o(r,t){var e=s.call(this)||this;return e.destination=r,e.source=t,e}return o.prototype.next=function(r){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.next)===null||e===void 0||e.call(t,r)},o.prototype.error=function(r){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.error)===null||e===void 0||e.call(t,r)},o.prototype.complete=function(){var r,t;(t=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||t===void 0||t.call(r)},o.prototype._subscribe=function(r){var t,e;return(e=(t=this.source)===null||t===void 0?void 0:t.subscribe(r))!==null&&e!==void 0?e:p},o}(w);export{w as S};
@@ -0,0 +1 @@
1
+ import{a as c,S as l,b as a,_ as d,d as f}from"./OperatorSubscriber-BPZabEAm.js";var v={now:function(){return Date.now()},delegate:void 0},p=function(n){c(i,n);function i(t,e){return n.call(this)||this}return i.prototype.schedule=function(t,e){return this},i}(l),h={setInterval:function(n,i){for(var t=[],e=2;e<arguments.length;e++)t[e-2]=arguments[e];return setInterval.apply(void 0,a([n,i],d(t)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},y=function(n){c(i,n);function i(t,e){var r=n.call(this,t,e)||this;return r.scheduler=t,r.work=e,r.pending=!1,r}return i.prototype.schedule=function(t,e){var r;if(e===void 0&&(e=0),this.closed)return this;this.state=t;var s=this.id,u=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(u,s,e)),this.pending=!0,this.delay=e,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(u,this.id,e),this},i.prototype.requestAsyncId=function(t,e,r){return r===void 0&&(r=0),h.setInterval(t.flush.bind(t,this),r)},i.prototype.recycleAsyncId=function(t,e,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return e;e!=null&&h.clearInterval(e)},i.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype._execute=function(t,e){var r=!1,s;try{this.work(t)}catch(u){r=!0,s=u||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},i.prototype.unsubscribe=function(){if(!this.closed){var t=this,e=t.id,r=t.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,f(s,this),e!=null&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},i}(p),o=function(){function n(i,t){t===void 0&&(t=n.now),this.schedulerActionCtor=i,this.now=t}return n.prototype.schedule=function(i,t,e){return t===void 0&&(t=0),new this.schedulerActionCtor(this,i).schedule(e,t)},n.now=v.now,n}(),A=function(n){c(i,n);function i(t,e){e===void 0&&(e=o.now);var r=n.call(this,t,e)||this;return r.actions=[],r._active=!1,r}return i.prototype.flush=function(t){var e=this.actions;if(this._active){e.push(t);return}var r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}},i}(o),w=new A(y),g=w;export{g as a,w as b};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const T=globalThis,D=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),V=new WeakMap;let tt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(D&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=V.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&V.set(e,t))}return t}toString(){return this.cssText}};const ot=n=>new tt(typeof n=="string"?n:n+"",void 0,I),wt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,o)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[o+1],n[0]);return new tt(e,n,I)},ht=(n,t)=>{if(D)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=T.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)}},W=D?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ot(e)})(n):n;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:at,defineProperty:lt,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:pt,getPrototypeOf:$t}=Object,f=globalThis,q=f.trustedTypes,ut=q?q.emptyScript:"",M=f.reactiveElementPolyfillSupport,b=(n,t)=>n,B={toAttribute(n,t){switch(t){case Boolean:n=n?ut:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},et=(n,t)=>!at(n,t),J={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:et};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=J){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&lt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=ct(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return i==null?void 0:i.call(this)},set(r){const l=i==null?void 0:i.call(this);o.call(this,r),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??J}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=$t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,s=[...dt(e),...pt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(W(i))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ht(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:B).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const r=s.getPropertyOptions(i),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((o=r.converter)==null?void 0:o.fromAttribute)!==void 0?r.converter:B;this._$Em=i,this[i]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??et)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,r]of i)r.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,M==null||M({ReactiveElement:y}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.0.4");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const C=globalThis,N=C.trustedTypes,K=N?N.createPolicy("lit-html",{createHTML:n=>n}):void 0,st="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+_,_t=`<${it}>`,g=document,w=()=>g.createComment(""),P=n=>n===null||typeof n!="object"&&typeof n!="function",j=Array.isArray,ft=n=>j(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",k=`[
14
+ \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,F=/>/g,A=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,nt=/^(?:script|style|textarea|title)$/i,At=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),Pt=At(1),v=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),X=new WeakMap,m=g.createTreeWalker(g,129);function rt(n,t){if(!j(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return K!==void 0?K.createHTML(t):t}const mt=(n,t)=>{const e=n.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",r=S;for(let l=0;l<e;l++){const h=n[l];let c,p,a=-1,$=0;for(;$<h.length&&(r.lastIndex=$,p=r.exec(h),p!==null);)$=r.lastIndex,r===S?p[1]==="!--"?r=Z:p[1]!==void 0?r=F:p[2]!==void 0?(nt.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=A):p[3]!==void 0&&(r=A):r===A?p[0]===">"?(r=i??S,a=-1):p[1]===void 0?a=-2:(a=r.lastIndex-p[2].length,c=p[1],r=p[3]===void 0?A:p[3]==='"'?Q:G):r===Q||r===G?r=A:r===Z||r===F?r=S:(r=A,i=void 0);const u=r===A&&n[l+1].startsWith("/>")?" ":"";o+=r===S?h+_t:a>=0?(s.push(c),h.slice(0,a)+st+h.slice(a)+_+u):h+_+(a===-2?l:u)}return[rt(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const l=t.length-1,h=this.parts,[c,p]=mt(t,e);if(this.el=U.createElement(c,s),m.currentNode=this.el.content,e===2||e===3){const a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(i=m.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const a of i.getAttributeNames())if(a.endsWith(st)){const $=p[r++],u=i.getAttribute(a).split(_),H=/([.?@])?(.*)/.exec($);h.push({type:1,index:o,name:H[2],strings:u,ctor:H[1]==="."?yt:H[1]==="?"?vt:H[1]==="@"?Et:R}),i.removeAttribute(a)}else a.startsWith(_)&&(h.push({type:6,index:o}),i.removeAttribute(a));if(nt.test(i.tagName)){const a=i.textContent.split(_),$=a.length-1;if($>0){i.textContent=N?N.emptyScript:"";for(let u=0;u<$;u++)i.append(a[u],w()),m.nextNode(),h.push({type:2,index:++o});i.append(a[$],w())}}}else if(i.nodeType===8)if(i.data===it)h.push({type:2,index:o});else{let a=-1;for(;(a=i.data.indexOf(_,a+1))!==-1;)h.push({type:7,index:o}),a+=_.length-1}o++}}static createElement(t,e){const s=g.createElement("template");return s.innerHTML=t,s}}function E(n,t,e=n,s){var r,l;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const o=P(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(n,i._$AS(n,t.values),i,s)),t}class gt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??g).importNode(e,!0);m.currentNode=i;let o=m.nextNode(),r=0,l=0,h=s[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new x(o,o.nextSibling,this,t):h.type===1?c=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(c=new St(o,this,t)),this._$AV.push(c),h=s[++l]}r!==(h==null?void 0:h.index)&&(o=m.nextNode(),r++)}return m.currentNode=g,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),P(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(rt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const r=new gt(i,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=X.get(t.strings);return e===void 0&&X.set(t.strings,e=new U(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(w()),this.O(w()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(o===void 0)t=E(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{const l=t;let h,c;for(t=o[0],h=0;h<o.length-1;h++)c=E(this,l[s+h],e,h),c===v&&(c=this._$AH[h]),r||(r=!P(c)||c!==this._$AH[h]),c===d?t=d:t!==d&&(t+=(c??"")+o[h+1]),this._$AH[h]=c}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class vt extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Et extends R{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??d)===v)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const L=C.litHtmlPolyfillSupport;L==null||L(U,x),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.2.1");const bt=(n,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(w(),o),o,void 0,e??{})}return i._$AI(n),i};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */class O extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}}var Y;O._$litElement$=!0,O.finalized=!0,(Y=globalThis.litElementHydrateSupport)==null||Y.call(globalThis,{LitElement:O});const z=globalThis.litElementPolyfillSupport;z==null||z({LitElement:O});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");export{et as f,wt as i,O as r,B as u,Pt as x};
@@ -1 +1 @@
1
- import{i as u,f as d,g as m,h as v,j as f,O as i,r as h,k as w,l as S,m as A,o as I,c as b,b as p,_ as x}from"./OperatorSubscriber-Da2IK3Yo.js";function D(e){return e&&u(e.schedule)}var O=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function k(e){return u(e==null?void 0:e.then)}function g(e){return u(e[d])}function L(e){return Symbol.asyncIterator&&u(e==null?void 0:e[Symbol.asyncIterator])}function R(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function T(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var E=T();function P(e){return u(e==null?void 0:e[E])}function _(e){return m(this,arguments,function(){var n,t,a,o;return v(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,f(n.read())];case 3:return t=s.sent(),a=t.value,o=t.done,o?[4,f(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,f(a)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function G(e){return u(e==null?void 0:e.getReader)}function H(e){if(e instanceof i)return e;if(e!=null){if(g(e))return F(e);if(O(e))return Y(e);if(k(e))return j(e);if(L(e))return y(e);if(P(e))return M(e);if(G(e))return U(e)}throw R(e)}function F(e){return new i(function(r){var n=e[d]();if(u(n.subscribe))return n.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Y(e){return new i(function(r){for(var n=0;n<e.length&&!r.closed;n++)r.next(e[n]);r.complete()})}function j(e){return new i(function(r){e.then(function(n){r.closed||(r.next(n),r.complete())},function(n){return r.error(n)}).then(null,h)})}function M(e){return new i(function(r){var n,t;try{for(var a=w(e),o=a.next();!o.done;o=a.next()){var s=o.value;if(r.next(s),r.closed)return}}catch(l){n={error:l}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}r.complete()})}function y(e){return new i(function(r){V(e,r).catch(function(n){return r.error(n)})})}function U(e){return y(_(e))}function V(e,r){var n,t,a,o;return S(this,void 0,void 0,function(){var s,l;return v(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=A(e),c.label=1;case 1:return[4,n.next()];case 2:if(t=c.sent(),!!t.done)return[3,4];if(s=t.value,r.next(s),r.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),a={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),t&&!t.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function J(e,r,n,t,a){t===void 0&&(t=0),a===void 0&&(a=!1);var o=r.schedule(function(){n(),a?e.add(this.schedule(null,t)):this.unsubscribe()},t);if(e.add(o),!a)return o}function q(e,r){return I(function(n,t){var a=0;n.subscribe(b(t,function(o){t.next(e.call(r,o,a++))}))})}var z=Array.isArray;function B(e,r){return z(r)?e.apply(void 0,p([],x(r))):e(r)}function K(e){return q(function(r){return B(e,r)})}export{K as a,O as b,D as c,E as d,J as e,g as f,k as g,L as h,H as i,P as j,G as k,R as l,q as m,_ as r};
1
+ import{i as u,e as d,f as m,g as v,h as f,O as i,r as h,j as w,k as S,l as A,o as I,c as b,b as p,_ as x}from"./OperatorSubscriber-BPZabEAm.js";function D(e){return e&&u(e.schedule)}var O=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function k(e){return u(e==null?void 0:e.then)}function g(e){return u(e[d])}function L(e){return Symbol.asyncIterator&&u(e==null?void 0:e[Symbol.asyncIterator])}function R(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function T(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var E=T();function P(e){return u(e==null?void 0:e[E])}function _(e){return m(this,arguments,function(){var n,t,a,o;return v(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,f(n.read())];case 3:return t=s.sent(),a=t.value,o=t.done,o?[4,f(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,f(a)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function G(e){return u(e==null?void 0:e.getReader)}function H(e){if(e instanceof i)return e;if(e!=null){if(g(e))return F(e);if(O(e))return Y(e);if(k(e))return j(e);if(L(e))return y(e);if(P(e))return M(e);if(G(e))return U(e)}throw R(e)}function F(e){return new i(function(r){var n=e[d]();if(u(n.subscribe))return n.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Y(e){return new i(function(r){for(var n=0;n<e.length&&!r.closed;n++)r.next(e[n]);r.complete()})}function j(e){return new i(function(r){e.then(function(n){r.closed||(r.next(n),r.complete())},function(n){return r.error(n)}).then(null,h)})}function M(e){return new i(function(r){var n,t;try{for(var a=w(e),o=a.next();!o.done;o=a.next()){var s=o.value;if(r.next(s),r.closed)return}}catch(l){n={error:l}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}r.complete()})}function y(e){return new i(function(r){V(e,r).catch(function(n){return r.error(n)})})}function U(e){return y(_(e))}function V(e,r){var n,t,a,o;return S(this,void 0,void 0,function(){var s,l;return v(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=A(e),c.label=1;case 1:return[4,n.next()];case 2:if(t=c.sent(),!!t.done)return[3,4];if(s=t.value,r.next(s),r.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=c.sent(),a={error:l},[3,11];case 6:return c.trys.push([6,,9,10]),t&&!t.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function J(e,r,n,t,a){t===void 0&&(t=0),a===void 0&&(a=!1);var o=r.schedule(function(){n(),a?e.add(this.schedule(null,t)):this.unsubscribe()},t);if(e.add(o),!a)return o}function q(e,r){return I(function(n,t){var a=0;n.subscribe(b(t,function(o){t.next(e.call(r,o,a++))}))})}var z=Array.isArray;function B(e,r){return z(r)?e.apply(void 0,p([],x(r))):e(r)}function K(e){return q(function(r){return B(e,r)})}export{K as a,O as b,D as c,E as d,J as e,g as f,k as g,L as h,H as i,P as j,G as k,R as l,q as m,_ as r};
@@ -0,0 +1 @@
1
+ import{r as e}from"./lit-element-4gw3YGga.js";class o extends e{createRenderRoot(){return this}}export{o as N};
@@ -0,0 +1 @@
1
+ function n(e){e&&window.mealzInternal.user.setSessionId(e)}export{n as h};
@@ -1 +1 @@
1
- import{t as s}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{N as n}from"../../assets/no-shadow-element-D8CgOZBZ.js";var b=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u=(o,r,t,a)=>{for(var e=a>1?void 0:a?p(r,t):r,l=o.length-1,c;l>=0;l--)(c=o[l])&&(e=(a?c(r,t,e):c(e))||e);return a&&e&&b(r,t,e),e};let m=class extends n{connectedCallback(){super.connectedCallback()}render(){}};m=u([s("mealz-catalog-breadcrumb")],m);customElements.get("mealz-catalog-breadcrumb")||customElements.define("mealz-catalog-breadcrumb",m);
1
+ import{t as s}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{N as n}from"../../assets/no-shadow-element-CaVIVF-o.js";var b=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u=(o,r,t,a)=>{for(var e=a>1?void 0:a?p(r,t):r,l=o.length-1,c;l>=0;l--)(c=o[l])&&(e=(a?c(r,t,e):c(e))||e);return a&&e&&b(r,t,e),e};let m=class extends n{connectedCallback(){super.connectedCallback()}render(){}};m=u([s("mealz-catalog-breadcrumb")],m);customElements.get("mealz-catalog-breadcrumb")||customElements.define("mealz-catalog-breadcrumb",m);
@@ -1 +1 @@
1
- import{t as p}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{C as d}from"../catalog-load-more.min.js";import"../../assets/no-shadow-element-D8CgOZBZ.js";import"../../assets/OperatorSubscriber-Da2IK3Yo.js";import"../../assets/mapOneOrManyArgs-BZ6laeGM.js";import"../../assets/async-wibIXa2g.js";var g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,u=(r,t,s,a)=>{for(var e=a>1?void 0:a?m(t,s):t,o=r.length-1,i;o>=0;o--)(i=r[o])&&(e=(a?i(t,s,e):i(e))||e);return a&&e&&g(t,s,e),e};let l=class extends d{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const r=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!r||(this.recipeCardListHTML=this.querySelector(".mealz-catalog__list"),!this.recipeCardListHTML))return;const{batchSize:t,packageId:s,posId:a,loadMoreURL:e,displayRecipeVariant:o,search:i,sessionId:n}=JSON.parse(r);this.loadMoreRecipesOnScroll({displayRecipeVariant:o,loadMoreURL:e,sessionId:n,pageSize:t,storeId:a,packageId:s,search:i,listHTML:this.recipeCardListHTML}),this.removeAttribute("starting-data")}reloadPage(){location.reload()}};l=u([p("mealz-catalog-category")],l);customElements.get("mealz-catalog-category")||customElements.define("mealz-catalog-category",l);
1
+ import{t as p}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as d}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-BPS5vj92.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";var g=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u=(r,t,s,a)=>{for(var e=a>1?void 0:a?h(t,s):t,o=r.length-1,i;o>=0;o--)(i=r[o])&&(e=(a?i(t,s,e):i(e))||e);return a&&e&&g(t,s,e),e};let l=class extends d{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback()}render(){var n;const r=(n=this.attributes["starting-data"])==null?void 0:n.value;if(!r||(this.recipeCardListHTML=this.querySelector(".mealz-catalog__list"),!this.recipeCardListHTML))return;const{batchSize:t,packageId:s,posId:a,loadMoreURL:e,displayRecipeVariant:o,search:i,sessionId:c}=JSON.parse(r);m(c),this.loadMoreRecipesOnScroll({displayRecipeVariant:o,loadMoreURL:e,sessionId:c,pageSize:t,storeId:a,packageId:s,search:i,listHTML:this.recipeCardListHTML}),this.removeAttribute("starting-data")}reloadPage(){location.reload()}};l=u([p("mealz-catalog-category")],l);customElements.get("mealz-catalog-category")||customElements.define("mealz-catalog-category",l);
@@ -1 +1 @@
1
- .mealz-catalog-favorites .mealz-catalog-favorites__list__loader{font-size:20px;text-align:center}.mealz-catalog-favorites .hidden{display:none}
1
+ .mealz-catalog-favorites .mealz-catalog-favorites__list__loader{font-size:20px;text-align:center}.mealz-catalog-favorites .hidden{display:none}.mealz-catalog-favorites .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
@@ -1 +1 @@
1
- import{t as d}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{C as g}from"../catalog-load-more.min.js";import"../../assets/no-shadow-element-D8CgOZBZ.js";import"../../assets/OperatorSubscriber-Da2IK3Yo.js";import"../../assets/mapOneOrManyArgs-BZ6laeGM.js";import"../../assets/async-wibIXa2g.js";var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,m=(e,t,a,o)=>{for(var s=o>1?void 0:o?u(t,a):t,i=e.length-1,r;i>=0;i--)(r=e[i])&&(s=(o?r(t,a,s):r(s))||s);return o&&s&&p(t,a,s),s};let l=class extends g{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.user.isAuthenticated().subscribe(e=>{this.isLogged=e,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const e=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!e)return;const t=this.querySelector(".mealz-catalog__list");if(!t)return;const{pageSize:a,storeId:o,loadMoreURL:s,displayRecipeVariant:i,search:r,sessionId:n}=JSON.parse(e);this.loadMoreRecipesOnScroll({displayRecipeVariant:i,loadMoreURL:s,sessionId:n,pageSize:a,storeId:o,packageId:null,search:r,listHTML:t}),this.removeAttribute("starting-data")}updateDOM(){const e=this.querySelector(".mealz-catalog-favorites__list__loader"),t=this.querySelector(".mealz-catalog-favorites__list__not-logged"),a=this.querySelector(".mealz-catalog-favorites__list__logged");!e||!t||!a||(e.classList.add("hidden"),t.classList.toggle("hidden",this.isLogged),a.classList.toggle("hidden",!this.isLogged))}};l=m([d("mealz-catalog-favorites")],l);customElements.get("mealz-catalog-favorites")||customElements.define("mealz-catalog-favorites",l);
1
+ import{t as g}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as u}from"../catalog-load-more.min.js";import{h}from"../../assets/session-handler-BPS5vj92.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";var p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,f=(e,t,a,i)=>{for(var s=i>1?void 0:i?m(t,a):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(s=(i?r(t,a,s):r(s))||s);return i&&s&&p(t,a,s),s};let l=class extends u{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.user.isAuthenticated().subscribe(e=>{this.isLogged=e,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback()}render(){var n;const e=(n=this.attributes["starting-data"])==null?void 0:n.value;if(!e||(this.favorites=this.querySelector(".mealz-catalog-favorites__list"),!this.favorites))return;this.subscriptions.push(window.mealzInternal.user.isAuthenticated().subscribe(d=>{this.isLogged=d,this.updateDOM()}));const t=this.querySelector(".mealz-catalog__list");if(!t)return;const{pageSize:a,storeId:i,loadMoreURL:s,displayRecipeVariant:o,search:r,sessionId:c}=JSON.parse(e);h(c),this.loadMoreRecipesOnScroll({displayRecipeVariant:o,loadMoreURL:s,sessionId:c,pageSize:a,storeId:i,packageId:null,search:r,listHTML:t}),this.removeAttribute("starting-data")}updateDOM(){const e=this.querySelector(".mealz-catalog-favorites__list__loader"),t=this.querySelector(".mealz-catalog-favorites__list__not-logged"),a=this.querySelector(".mealz-catalog-favorites__list__logged");!e||!t||!a||(e.classList.add("hidden"),t.classList.toggle("hidden",this.isLogged),a.classList.toggle("hidden",!this.isLogged))}};l=f([g("mealz-catalog-favorites")],l);customElements.get("mealz-catalog-favorites")||customElements.define("mealz-catalog-favorites",l);
@@ -0,0 +1 @@
1
+ .mealz-catalog-history .mealz-catalog-favorites__list__loader{font-size:20px;text-align:center}.mealz-catalog-history .hidden{display:none}@media (min-width: 375px) and (max-width: 712px){.mealz-catalog-history .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--m-catalog-card-width, 308px))}}.mealz-catalog-history .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
@@ -0,0 +1 @@
1
+ import{t as d}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as m}from"../catalog-load-more.min.js";import{h as p}from"../../assets/session-handler-BPS5vj92.js";import{M as h}from"../../drawer/drawer.min.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,w=(o,r,t,a)=>{for(var e=a>1?void 0:a?f(r,t):r,i=o.length-1,s;i>=0;i--)(s=o[i])&&(e=(a?s(r,t,e):s(e))||e);return a&&e&&u(r,t,e),e};let l=class extends m{connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const o=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!o||(this.historyOrderListHTML=this.querySelector(".mealz-catalog__list"),!this.historyOrderListHTML))return;const{pageSize:r,storeId:t,loadMoreURL:a,sessionId:e,drawerDataURL:i}=JSON.parse(o);p(e),this.loadMoreRecipesOnScroll({displayRecipeVariant:"",loadMoreURL:a,sessionId:e,pageSize:r,storeId:t,packageId:null,search:"",listHTML:this.historyOrderListHTML});const n=new URL(window.location.href).searchParams.get("order");n&&this.initializeDrawer(i,n,e,t),this.removeAttribute("starting-data")}initializeDrawer(o,r,t,a){let e=document.querySelector("mealz-drawer");e||(e=new h,document.body.appendChild(e)),e.openDrawer(),e.loadDrawerData(o,r,t,a)}};l=w([d("mealz-catalog-history")],l);customElements.get("mealz-catalog-history")||customElements.define("mealz-catalog-history",l);
@@ -1 +1 @@
1
- .mealz-catalog-home{width:100%;position:relative;background-color:var(--miam-ds-color-neutral-white, #fff)}.mealz-catalog-home .mealz-catalog-home__header{display:flex;height:250px;border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}@media (max-width: 607px){.mealz-catalog-home .mealz-catalog-home__header{flex-direction:column;height:auto}.mealz-catalog-home .mealz-catalog-home__header .mealz-catalog-home__header-right{padding:0}}.mealz-catalog-home .mealz-catalog-home__header-left{display:flex;justify-content:center;align-items:center;flex:1;max-width:548px}.mealz-catalog-home .mealz-catalog-home__header-left .mealz-catalog__title{font-size:40px;line-height:120%}@media (max-width: 607px){.mealz-catalog-home .mealz-catalog-home__header-left{justify-content:left;padding:16px}.mealz-catalog-home .mealz-catalog-home__header-left .mealz-catalog__title{font-size:24px}}.mealz-catalog-home .mealz-catalog-home__header-right{flex:1;background-repeat:no-repeat;background-size:cover;background-image:url(https://storage.googleapis.com/assets.miam.tech/pictures/catalog_settings/coursesu/2-banner/2-banner_1200x215.jpg)}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom{display:flex;justify-content:space-between;gap:16px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom .mealz-catalog-home__category__link{display:flex;align-items:center;color:var(--miam-ds-color-primary, #24748F);white-space:nowrap;gap:8px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom .mealz-catalog-home__category__link img{width:16px;height:16px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content{position:relative;overflow:hidden;padding:16px 0;width:100%;height:var(--mealz-recipe-card-height, 500px);box-sizing:content-box;display:flex;flex-direction:row;flex-wrap:wrap;transition-duration:.5s;gap:16px}@media (max-width: 1023px){.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content{height:320px;overflow-x:scroll;flex-wrap:nowrap;scrollbar-width:none;-ms-overflow-style:none}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content::-webkit-scrollbar{display:none}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-recipe-card{width:240px;height:320px}}@media (max-width: 1023px){.mealz-catalog-home .mealz-catalog__content{padding:0 0 0 24px}.mealz-catalog-home .mealz-catalog__category-title-container{padding-right:24px}}@media (max-width: 700px){.mealz-catalog-home .mealz-catalog__content{padding:0 0 0 16px}.mealz-catalog-home .mealz-catalog__category-title-container{padding-right:16px}}
1
+ .mealz-catalog-home{width:100%;position:relative;background-color:var(--miam-ds-color-neutral-white, #fff)}.mealz-catalog-home .mealz-catalog-home__header{display:flex;height:250px;border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}@media (max-width: 607px){.mealz-catalog-home .mealz-catalog-home__header{flex-direction:column;height:auto}.mealz-catalog-home .mealz-catalog-home__header .mealz-catalog-home__header-right{padding:0}}.mealz-catalog-home .mealz-catalog-home__promotions-banner{display:none;justify-content:center;margin-bottom:24px}.mealz-catalog-home .mealz-catalog-home__header-left{display:flex;justify-content:center;align-items:center;flex:1;max-width:548px}.mealz-catalog-home .mealz-catalog-home__header-left .mealz-catalog__title{font-size:40px;line-height:120%}@media (max-width: 607px){.mealz-catalog-home .mealz-catalog-home__header-left{justify-content:left;padding:16px}.mealz-catalog-home .mealz-catalog-home__header-left .mealz-catalog__title{font-size:24px}}.mealz-catalog-home .mealz-catalog-home__header-right{flex:1;background-repeat:no-repeat;background-size:cover;background-image:url(https://storage.googleapis.com/assets.miam.tech/pictures/catalog_settings/coursesu/2-banner/2-banner_1200x215.jpg)}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom{display:flex;justify-content:space-between;gap:16px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom .mealz-catalog-home__category__link{display:flex;align-items:center;color:var(--miam-ds-color-primary, #24748F);white-space:nowrap;gap:8px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__header-bottom .mealz-catalog-home__category__link img{width:16px;height:16px}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content{position:relative;overflow:hidden;padding:16px 0;width:100%;height:var(--mealz-recipe-card-height, 500px);box-sizing:content-box;display:flex;flex-direction:row;flex-wrap:wrap;transition-duration:.5s;gap:16px}@media (max-width: 1023px){.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content{height:320px;overflow-x:scroll;flex-wrap:nowrap;scrollbar-width:none;-ms-overflow-style:none}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-catalog-home__category__content::-webkit-scrollbar{display:none}.mealz-catalog-home .mealz-catalog-home__categories .mealz-catalog-home__category .mealz-recipe-card{width:240px;height:320px}}@media (max-width: 1023px){.mealz-catalog-home .mealz-catalog__content{padding:0 0 0 24px}.mealz-catalog-home .mealz-catalog__category-title-container{padding-right:24px}}@media (max-width: 700px){.mealz-catalog-home .mealz-catalog__content{padding:0 0 0 16px}.mealz-catalog-home .mealz-catalog__category-title-container{padding-right:16px}}
@@ -1 +1 @@
1
- import{t as l}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{N as i}from"../../assets/no-shadow-element-D8CgOZBZ.js";var m=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p=(a,e,r,s)=>{for(var t=s>1?void 0:s?u(e,r):e,o=a.length-1,n;o>=0;o--)(n=a[o])&&(t=(s?n(e,r,t):n(t))||t);return s&&t&&m(e,r,t),t};let c=class extends i{constructor(){super(...arguments),this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(a=>a.unsubscribe())}render(){var e;(e=this.attributes["starting-data"])!=null&&e.value&&this.removeAttribute("starting-data")}reloadPage(){location.reload()}};c=p([l("mealz-catalog-home")],c);customElements.get("mealz-catalog-home")||customElements.define("mealz-catalog-home",c);
1
+ import{t as c}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{h as l}from"../../assets/session-handler-BPS5vj92.js";import{N as d}from"../../assets/no-shadow-element-CaVIVF-o.js";var h=Object.defineProperty,m=Object.getOwnPropertyDescriptor,g=(t,e,s,r)=>{for(var a=r>1?void 0:r?m(e,s):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(r?i(e,s,a):i(a))||a);return r&&a&&h(e,s,a),a};let n=class extends d{constructor(){super(...arguments),this.categories=[],this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe())}render(){var a;const t=(a=this.attributes["starting-data"])==null?void 0:a.value;if(!t)return;const{categories:e,path:s,sessionId:r}=JSON.parse(t);l(r),this.analyticsPath=s,this.categories=e,this.addEventListeners(),this.removeAttribute("starting-data")}addEventListeners(){Array.from(this.getElementsByClassName("mealz-catalog__link")).forEach((e,s)=>{e==null||e.addEventListener("click",()=>{this.sendCategoryDisplay(s)})})}reloadPage(){location.reload()}sendCategoryDisplay(t){var e;window.mealzInternal.analytics.sendEvent("category.display",this.analyticsPath,{category_id:(e=this.categories[Math.floor(t/2)])==null?void 0:e.id})}};n=g([c("mealz-catalog-home")],n);customElements.get("mealz-catalog-home")||customElements.define("mealz-catalog-home",n);
@@ -1 +1 @@
1
- import{t as n}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{C as p}from"../catalog-load-more.min.js";import"../../assets/no-shadow-element-D8CgOZBZ.js";import"../../assets/OperatorSubscriber-Da2IK3Yo.js";import"../../assets/mapOneOrManyArgs-BZ6laeGM.js";import"../../assets/async-wibIXa2g.js";var d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,g=(r,t,s,a)=>{for(var e=a>1?void 0:a?m(t,s):t,i=r.length-1,l;i>=0;i--)(l=r[i])&&(e=(a?l(t,s,e):l(e))||e);return a&&e&&d(t,s,e),e};let o=class extends p{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const r=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!r||(this.recipeCardListHTML=this.querySelector(".mealz-catalog__list"),!this.recipeCardListHTML))return;const{pageSize:t,storeId:s,loadMoreURL:a,displayRecipeVariant:e,search:i,sessionId:l}=JSON.parse(r);this.loadMoreRecipesOnScroll({displayRecipeVariant:e,loadMoreURL:a,sessionId:l,pageSize:t,storeId:s,packageId:null,search:i,listHTML:this.recipeCardListHTML}),this.removeAttribute("starting-data")}reloadPage(){location.reload()}};o=g([n("mealz-catalog-list")],o);customElements.get("mealz-catalog-list")||customElements.define("mealz-catalog-list",o);
1
+ import{t as p}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as d}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-BPS5vj92.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";var g=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h=(r,t,s,a)=>{for(var e=a>1?void 0:a?u(t,s):t,i=r.length-1,o;i>=0;i--)(o=r[i])&&(e=(a?o(t,s,e):o(e))||e);return a&&e&&g(t,s,e),e};let l=class extends d{connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>this.reloadPage()))}disconnectedCallback(){super.disconnectedCallback()}render(){var n;const r=(n=this.attributes["starting-data"])==null?void 0:n.value;if(!r||(this.recipeCardListHTML=this.querySelector(".mealz-catalog__list"),!this.recipeCardListHTML))return;const{pageSize:t,storeId:s,loadMoreURL:a,displayRecipeVariant:e,search:i,promotions:o,sessionId:c}=JSON.parse(r);m(c),this.loadMoreRecipesOnScroll({displayRecipeVariant:e,loadMoreURL:a,sessionId:c,pageSize:t,storeId:s,packageId:null,search:i,listHTML:this.recipeCardListHTML,promotions:o}),this.removeAttribute("starting-data")}reloadPage(){location.reload()}};l=h([p("mealz-catalog-list")],l);customElements.get("mealz-catalog-list")||customElements.define("mealz-catalog-list",l);
@@ -1 +1 @@
1
- import{N as _}from"../assets/no-shadow-element-D8CgOZBZ.js";import{c as w,i as p,o as C,_ as T,O as x}from"../assets/OperatorSubscriber-Da2IK3Yo.js";import{i as L,m as k,a as D,b as H,c as I}from"../assets/mapOneOrManyArgs-BZ6laeGM.js";import{a as O,b as z}from"../assets/async-wibIXa2g.js";import"../assets/lit-element-DxqnJI-a.js";function S(n){return n instanceof Date&&!isNaN(n)}function A(n,e,i,t,a,o,c,d){var s=[],r=0,u=0,f=!1,h=function(){f&&!s.length&&!r&&e.complete()},E=function(m){return r<t?g(m):s.push(m)},g=function(m){r++;var v=!1;L(i(m,u++)).subscribe(w(e,function(l){e.next(l)},function(){v=!0},void 0,function(){if(v)try{r--;for(var l=function(){var y=s.shift();c||g(y)};s.length&&r<t;)l();h()}catch(y){e.error(y)}}))};return n.subscribe(w(e,E,function(){f=!0,h()})),function(){}}function R(n,e,i){return i===void 0&&(i=1/0),p(e)?R(function(t,a){return k(function(o,c){return e(t,o,a,c)})(L(n(t,a)))},i):(typeof e=="number"&&(i=e),C(function(t,a){return A(t,a,n,i)}))}var V=["addListener","removeListener"],$=["addEventListener","removeEventListener"],F=["on","off"];function M(n,e,i,t){if(p(i)&&(t=i,i=void 0),t)return M(n,e,i).pipe(D(t));var a=T(j(n)?$.map(function(d){return function(s){return n[d](e,s,i)}}):N(n)?V.map(b(n,e)):q(n)?F.map(b(n,e)):[],2),o=a[0],c=a[1];if(!o&&H(n))return R(function(d){return M(d,e,i)})(L(n));if(!o)throw new TypeError("Invalid event target");return new x(function(d){var s=function(){for(var r=[],u=0;u<arguments.length;u++)r[u]=arguments[u];return d.next(1<r.length?r:r[0])};return o(s),function(){return c(s)}})}function b(n,e){return function(i){return function(t){return n[i](e,t)}}}function N(n){return p(n.addListener)&&p(n.removeListener)}function q(n){return p(n.on)&&p(n.off)}function j(n){return p(n.addEventListener)&&p(n.removeEventListener)}function B(n,e,i){i===void 0&&(i=O);var t=-1;return e!=null&&(I(e)?i=e:t=e),new x(function(a){var o=S(n)?+n-i.now():n;o<0&&(o=0);var c=0;return i.schedule(function(){a.closed||(a.next(c++),0<=t?this.schedule(void 0,t):a.complete())},o)})}function G(n,e){return C(function(i,t){var a=e??{},o=a.leading,c=o===void 0?!0:o,d=a.trailing,s=d===void 0?!1:d,r=!1,u=null,f=null,h=!1,E=function(){f==null||f.unsubscribe(),f=null,s&&(v(),h&&t.complete())},g=function(){f=null,h&&t.complete()},m=function(l){return f=L(n(l)).subscribe(w(t,E,g))},v=function(){if(r){r=!1;var l=u;u=null,t.next(l),!h&&m(l)}};i.subscribe(w(t,function(l){r=!0,u=l,!(f&&!f.closed)&&(c?v():m(l))},function(){h=!0,!(s&&r&&f&&!f.closed)&&t.complete()}))})}function J(n,e,i){e===void 0&&(e=z);var t=B(n,e);return G(function(){return t},i)}const P=300;class Z extends _{constructor(){super(...arguments),this.noMoreData=!1,this.isLoading=!1,this.page=2,this.subscriptions=[]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}loadMoreRecipesOnScroll({displayRecipeVariant:e,loadMoreURL:i,sessionId:t,pageSize:a,storeId:o,packageId:c,search:d,listHTML:s}){const r=M(window,"scroll");this.subscriptions.push(r.pipe(J(100)).subscribe(()=>{!this.noMoreData&&!this.isLoading&&window.innerHeight+Math.round(window.scrollY)+P>=document.body.offsetHeight&&this.getMoreRecipeCards({displayRecipeVariant:e,loadMoreURL:i,sessionId:t,pageSize:a,storeId:o,packageId:c,search:d,listHTML:s})}))}buildHeaders(e){return{authorization:`user_id ${localStorage.getItem("_miam/userId")}`,"language-id":window.mealzInternal.user.getLanguage(),"supplier-token":window.mealzInternal.supplier.getToken(),"session-id":e}}async getMoreRecipeCards({displayRecipeVariant:e,loadMoreURL:i,sessionId:t,pageSize:a,storeId:o,packageId:c,search:d,listHTML:s}){this.isLoading=!0;const r=new URLSearchParams;r.append("display_recipe_variant",e),r.append("size",a.toString()),r.append("page",this.page.toString()),c&&r.append("category_id",c),o&&r.append("store_id",o),d&&r.append("search",d);try{const u=await fetch(i+"?"+r,{method:"GET",headers:this.buildHeaders(t)});if(!u.ok)throw new Error(`Load more request failed with status: ${u.status}`);const f=await u.text();this.appendRecipesToList(f,s,a)}catch(u){console.error(u),this.isLoading=!1}}appendRecipesToList(e,i,t){this.checkIfMoreRecipes(e,t),i.insertAdjacentHTML("beforeend",e),this.isLoading=!1,this.page++}checkIfMoreRecipes(e,i){const t=e.match(/<mealz-recipe-card(?=\s|>)/gi);(t?t.length:0)<i&&(this.noMoreData=!0)}}export{Z as C};
1
+ import{N as T}from"../assets/no-shadow-element-CaVIVF-o.js";import{c as E,i as h,o as C,_ as k,O as _}from"../assets/OperatorSubscriber-BPZabEAm.js";import{i as L,m as I,a as R,b as H,c as D}from"../assets/mapOneOrManyArgs-2FiDGdaS.js";import{a as z,b as O}from"../assets/async-B_IhBgzg.js";import"../assets/lit-element-4gw3YGga.js";function S(i){return i instanceof Date&&!isNaN(i)}function A(i,e,t,n,r,l,u,f){var d=[],o=0,a=0,s=!1,m=function(){s&&!d.length&&!o&&e.complete()},w=function(p){return o<n?g(p):d.push(p)},g=function(p){o++;var v=!1;L(t(p,a++)).subscribe(E(e,function(c){e.next(c)},function(){v=!0},void 0,function(){if(v)try{o--;for(var c=function(){var y=d.shift();u||g(y)};d.length&&o<n;)c();m()}catch(y){e.error(y)}}))};return i.subscribe(E(e,w,function(){s=!0,m()})),function(){}}function x(i,e,t){return t===void 0&&(t=1/0),h(e)?x(function(n,r){return I(function(l,u){return e(n,l,r,u)})(L(i(n,r)))},t):(typeof e=="number"&&(t=e),C(function(n,r){return A(n,r,i,t)}))}var N=["addListener","removeListener"],$=["addEventListener","removeEventListener"],q=["on","off"];function M(i,e,t,n){if(h(t)&&(n=t,t=void 0),n)return M(i,e,t).pipe(R(n));var r=k(j(i)?$.map(function(f){return function(d){return i[f](e,d,t)}}):F(i)?N.map(b(i,e)):V(i)?q.map(b(i,e)):[],2),l=r[0],u=r[1];if(!l&&H(i))return x(function(f){return M(f,e,t)})(L(i));if(!l)throw new TypeError("Invalid event target");return new _(function(f){var d=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return f.next(1<o.length?o:o[0])};return l(d),function(){return u(d)}})}function b(i,e){return function(t){return function(n){return i[t](e,n)}}}function F(i){return h(i.addListener)&&h(i.removeListener)}function V(i){return h(i.on)&&h(i.off)}function j(i){return h(i.addEventListener)&&h(i.removeEventListener)}function B(i,e,t){t===void 0&&(t=z);var n=-1;return e!=null&&(D(e)?t=e:n=e),new _(function(r){var l=S(i)?+i-t.now():i;l<0&&(l=0);var u=0;return t.schedule(function(){r.closed||(r.next(u++),0<=n?this.schedule(void 0,n):r.complete())},l)})}function G(i,e){return C(function(t,n){var r=e??{},l=r.leading,u=l===void 0?!0:l,f=r.trailing,d=f===void 0?!1:f,o=!1,a=null,s=null,m=!1,w=function(){s==null||s.unsubscribe(),s=null,d&&(v(),m&&n.complete())},g=function(){s=null,m&&n.complete()},p=function(c){return s=L(i(c)).subscribe(E(n,w,g))},v=function(){if(o){o=!1;var c=a;a=null,n.next(c),!m&&p(c)}};t.subscribe(E(n,function(c){o=!0,a=c,!(s&&!s.closed)&&(u?v():p(c))},function(){m=!0,!(d&&o&&s&&!s.closed)&&n.complete()}))})}function J(i,e,t){e===void 0&&(e=O);var n=B(i,e);return G(function(){return n},t)}const P=300;class Z extends T{constructor(){super(...arguments),this.noMoreData=!1,this.isLoading=!1,this.page=2,this.loaderElement=null,this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.createLoader()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.removeLoader()}loadMoreRecipesOnScroll({displayRecipeVariant:e,loadMoreURL:t,sessionId:n,pageSize:r,storeId:l,packageId:u,search:f,listHTML:d,promotions:o=!1}){const a=M(window,"scroll");this.subscriptions.push(a.pipe(J(100)).subscribe(()=>{!this.noMoreData&&!this.isLoading&&window.innerHeight+Math.round(window.scrollY)+P>=document.body.offsetHeight&&this.getMoreRecipes({loadMoreURL:t,sessionId:n,pageSize:r,storeId:l,displayRecipeVariant:e,packageId:u,search:f,promotions:o,listHTML:d})}))}buildHeaders(e){const t={"language-id":window.mealzInternal.user.getLanguage(),"supplier-token":window.mealzInternal.supplier.getToken(),"session-id":e},n=localStorage.getItem("_miam/userId");return n?t.authorization=`user_id ${n}`:t["authless-id"]=localStorage.getItem("_miam/authlessId"),t}async getMoreRecipes({loadMoreURL:e,sessionId:t,pageSize:n,storeId:r,displayRecipeVariant:l,packageId:u,search:f,promotions:d,listHTML:o}){this.isLoading=!0,this.toggleLoader(!0);const a=new URLSearchParams;a.append("size",n.toString()),a.append("page",this.page.toString()),l&&a.append("display_recipe_variant",l),u&&a.append("category_id",u),r&&a.append("store_id",r),f&&a.append("search",f),d&&a.append("promotions",d);try{const s=await fetch(e+"?"+a,{method:"GET",headers:this.buildHeaders(t)});if(!s.ok)throw new Error(`Load more request failed with status: ${s.status}`);const m=await s.text();this.appendRecipesToList(m,o,n)}catch(s){console.error(s),this.isLoading=!1}}appendRecipesToList(e,t,n){this.checkIfMoreRecipes(e,n),t.insertAdjacentHTML("beforeend",e),this.isLoading=!1,this.toggleLoader(!1),this.page++}checkIfMoreRecipes(e,t){const n=e.match(/<mealz-recipe-card(?=\s|>)/gi)||e.match(/<mealz-history-order(?=\s|>)/gi);(n?n.length:0)<t&&(this.noMoreData=!0)}createLoader(){const e=this.querySelector(".mealz-catalog__content");!this.loaderElement&&e&&(this.loaderElement=document.createElement("div"),this.loaderElement.className="miam-ds-loader",this.loaderElement.style.display="none",e.appendChild(this.loaderElement))}removeLoader(){this.loaderElement&&this.loaderElement.parentElement&&(this.loaderElement.parentElement.removeChild(this.loaderElement),this.loaderElement=null)}toggleLoader(e){this.loaderElement&&(this.loaderElement.style.display=e?"block":"none")}}export{Z as C};
@@ -0,0 +1 @@
1
+ .mealz-catalog-tabs{position:relative;display:flex;box-sizing:border-box;width:100%;padding:24px 80px 0;background-color:var(--miam-ds-color-neutral-white, #FFF);transition:padding .3s ease}.mealz-catalog-tabs .mealz-catalog-tabs__item{display:flex;align-items:center;gap:4px;text-decoration:none}.mealz-catalog-tabs .mealz-catalog-tabs__item.inactive span{color:var(--miam-ds-color-neutral-black, #0F191F);opacity:.7}@media (max-width: 1023px){.mealz-catalog-tabs{padding:24px 24px 0}}@media (max-width: 700px){.mealz-catalog-tabs{padding:24px 0 0}.mealz-catalog-tabs .mealz-catalog-tabs__item{width:100%;justify-content:center;display:flex}}
@@ -0,0 +1 @@
1
+ import{t as n}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{N as m}from"../../assets/no-shadow-element-CaVIVF-o.js";var b=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=(r,a,l,t)=>{for(var e=t>1?void 0:t?p(a,l):a,c=r.length-1,s;c>=0;c--)(s=r[c])&&(e=(t?s(a,l,e):s(e))||e);return t&&e&&b(a,l,e),e};let o=class extends m{connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){}};o=d([n("mealz-catalog-tabs")],o);customElements.get("mealz-catalog-tabs")||customElements.define("mealz-catalog-tabs",o);
@@ -1 +1 @@
1
- .mealz-catalog-toolbar{position:relative;display:flex;box-sizing:border-box;justify-content:space-between;z-index:10;width:-webkit-fill-available;padding:24px 80px;background-color:var(--miam-ds-color-neutral-white, #FFF);transition:padding .3s ease}.mealz-catalog-toolbar .mealz-recipe-catalog__toolbar-container-anchor{width:100%}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container{display:flex;flex-direction:row;align-items:center;flex:1;max-width:600px;gap:16px;margin-right:24px}@media (max-width: 700px){.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container{margin-right:0}}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button img{width:20px;height:20px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button.hidden{display:none}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{background-color:var(--miam-ds-color-background-primary, #FFF);border:1px solid var(--miam-ds-color-border, #D6E1EC);border-radius:6px;width:480px;font-size:14px;display:flex;align-items:center;padding:8px;box-sizing:border-box}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input{border:transparent;background:transparent;flex:1;text-overflow:ellipsis}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input::placeholder{color:var(--miam-ds-color-text-disabled, #8c96a2);opacity:1}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input:focus{outline:transparent}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button{margin-right:8px;padding:unset}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button:hover{border-color:transparent}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button img{height:24px;width:24px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button{width:24px;height:24px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button img{cursor:pointer;min-width:15px;min-height:15px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:16px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences:not(.ghost):not(.hidden),.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites:not(.ghost):not(.hidden),.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal:not(.ghost):not(.hidden){text-decoration:none;display:flex;gap:4px;padding:8px 12px;background:var(--miam-ds-color-primary-100, #E4EAEC);color:var(--miam-ds-color-neutral-black, #1F3543);border-radius:90px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button img{width:16px;height:16px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.hidden{display:none}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences{position:relative}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__filter-badge{height:18px;width:18px;display:flex;justify-content:center;align-items:center;background-color:var(--miam-ds-color-primary-900, #10323F);color:var(--m-catalog-redpoint-text-color, #FAFCFE);border-radius:var(--m-border-radius-circle, 50%);font-size:12px;line-height:18px}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter:not(.full) .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter:not(.full) .mealz-catalog-toolbar__loader,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences:not(.full) .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences:not(.full) .mealz-catalog-toolbar__loader{position:absolute;right:6px;top:6px}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .mealz-catalog-toolbar__loader .mealz-loader,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__loader .mealz-loader{margin:0;height:12px;width:12px;border-top:var(--m-loader-thickness, 5px) solid var(--miam-ds-color-primary-900, #10323F)}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .hidden,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .hidden{display:none}@media (max-width: 1024px){.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{width:auto;flex:1}}@media (max-width: 700px){.mealz-catalog-toolbar:not(.sticking){flex-direction:column-reverse;gap:24px}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__searchbar-container{border-bottom:unset;justify-content:space-between;max-width:unset}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container{justify-content:space-between}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal{border-radius:40px;padding:12px 16px;flex:1}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences:hover,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites:hover,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal:hover{background-color:var(--miam-ds-color-primary-200, #C6D4D9)}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences.hidden,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites.hidden,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal.hidden{display:flex;color:#8c96a2}}.mealz-catalog-toolbar.sticking{position:fixed;top:0;border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);padding:16px 40px}@media (max-width: 700px){.mealz-catalog-toolbar.sticking{padding:8px}}@media (max-width: 700px){.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container{gap:12px}}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .miam-ds-button img{width:24px;height:24px}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__preferences-label,.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__favorites .mealz-catalog-toolbar__controls__favorites-label{display:none}@media (max-width: 1023px){.mealz-catalog-toolbar{padding:24px}}@media (max-width: 700px){.mealz-catalog-toolbar{padding:24px 16px}}@media (min-width: 700px){.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__preferences-label{display:none}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__favorites .mealz-catalog-toolbar__controls__favorites-label{display:none}}.mealz-catalog-toolbar.sticking:not(.home-page) .mealz-catalog-toolbar__searchbar-container{max-width:initial;justify-content:space-between}.mealz-catalog-toolbar.sticking:not(.home-page) .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{display:none}
1
+ .mealz-catalog-toolbar{position:relative;display:flex;box-sizing:border-box;justify-content:space-between;width:-moz-available;width:-webkit-fill-available;width:fill-available;padding:24px 80px;background-color:var(--miam-ds-color-neutral-white, #FFF);transition:padding .3s ease}.mealz-catalog-toolbar .mealz-recipe-catalog__toolbar-container-anchor{width:100%}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container{display:flex;flex-direction:row;align-items:center;flex:1;max-width:600px;gap:16px;margin-right:24px}@media (max-width: 700px){.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container{margin-right:0}}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button img{width:20px;height:20px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button.hidden{display:none}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{background-color:var(--miam-ds-color-background-primary, #FFF);border:1px solid var(--miam-ds-color-border, #D6E1EC);border-radius:6px;width:480px;font-size:14px;display:flex;align-items:center;padding:8px;box-sizing:border-box}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input{border:transparent;background:transparent;flex:1;text-overflow:ellipsis}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input::placeholder{color:var(--miam-ds-color-text-disabled, #8c96a2);opacity:1}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar input:focus{outline:transparent}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button{margin-right:8px;padding:unset}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button:hover{border-color:transparent}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar .miam-ds-button img{height:24px;width:24px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button{width:24px;height:24px}.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-recipe-toolbar__return-button img{cursor:pointer;min-width:15px;min-height:15px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:16px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences:not(.ghost):not(.hidden),.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites:not(.ghost):not(.hidden),.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal:not(.ghost):not(.hidden){text-decoration:none;display:flex;gap:4px;padding:8px 12px;background:var(--miam-ds-color-primary-100, #E4EAEC);color:var(--miam-ds-color-neutral-black, #1F3543);border-radius:90px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button img{width:16px;height:16px}.mealz-catalog-toolbar .mealz-catalog-toolbar__buttons-container .miam-ds-button.hidden{display:none}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences{position:relative}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__filter-badge{height:18px;width:18px;display:flex;justify-content:center;align-items:center;background-color:var(--miam-ds-color-primary-900, #10323F);color:var(--m-catalog-redpoint-text-color, #FAFCFE);border-radius:var(--m-border-radius-circle, 50%);font-size:12px;line-height:18px}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter:not(.full) .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter:not(.full) .mealz-catalog-toolbar__loader,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences:not(.full) .mealz-catalog-toolbar__controls__filter-badge,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences:not(.full) .mealz-catalog-toolbar__loader{position:absolute;right:6px;top:6px}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .mealz-catalog-toolbar__loader .mealz-loader,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__loader .mealz-loader{margin:0;height:12px;width:12px;border-top:var(--m-loader-thickness, 5px) solid var(--miam-ds-color-primary-900, #10323F)}.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__filter .hidden,.mealz-catalog-toolbar .mealz-catalog-toolbar__controls__preferences .hidden{display:none}@media (max-width: 1024px){.mealz-catalog-toolbar .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{width:auto;flex:1}}@media (max-width: 700px){.mealz-catalog-toolbar:not(.sticking){flex-direction:column-reverse;gap:24px}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__searchbar-container{border-bottom:unset;justify-content:space-between;max-width:unset}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container{justify-content:space-between}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal{border-radius:40px;padding:12px 16px;flex:1}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences:hover,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites:hover,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal:hover{background-color:var(--miam-ds-color-primary-200, #C6D4D9)}.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__preferences.hidden,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__favorites.hidden,.mealz-catalog-toolbar:not(.sticking) .mealz-catalog-toolbar__buttons-container .miam-ds-button.mealz-catalog-toolbar__controls__personal.hidden{display:flex;color:#8c96a2}}.mealz-catalog-toolbar.sticking{position:fixed;top:0;z-index:10;border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);padding:16px 40px}@media (max-width: 700px){.mealz-catalog-toolbar.sticking{padding:8px}}@media (max-width: 700px){.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container{gap:12px}}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .miam-ds-button img{width:24px;height:24px}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__preferences-label,.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__favorites .mealz-catalog-toolbar__controls__favorites-label{display:none}@media (max-width: 1023px){.mealz-catalog-toolbar{padding:24px}}@media (max-width: 700px){.mealz-catalog-toolbar{padding:24px 16px}}@media (min-width: 700px){.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__preferences .mealz-catalog-toolbar__controls__preferences-label{display:none}.mealz-catalog-toolbar.sticking .mealz-catalog-toolbar__buttons-container .mealz-catalog-toolbar__controls__favorites .mealz-catalog-toolbar__controls__favorites-label{display:none}}.mealz-catalog-toolbar.sticking:not(.home-page) .mealz-catalog-toolbar__searchbar-container{max-width:initial;justify-content:space-between}.mealz-catalog-toolbar.sticking:not(.home-page) .mealz-catalog-toolbar__searchbar-container .mealz-catalog-toolbar__searchbar{display:none}
@@ -1 +1 @@
1
- import{t as l}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{N as c}from"../../assets/no-shadow-element-D8CgOZBZ.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,s,r)=>{for(var a=r>1?void 0:r?d(e,s):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(r?i(e,s,a):i(a))||a);return r&&a&&h(e,s,a),a};let n=class extends c{constructor(){super(...arguments),this.subscriptions=[],this.supplierHeaderHeight=0,this.searchUrl="",this.path=""}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.getStickyHeaderHeight().subscribe(t=>{this.supplierHeaderHeight=t,this.setStickyObserver()}),window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>{const t=this.preferencesButton.querySelector(".mealz-catalog-toolbar__controls__filter-badge"),e=this.preferencesButton.querySelector(".mealz-catalog-toolbar__loader");t&&t.classList.add("hidden"),e&&e.classList.remove("hidden")}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe()),this.toolbarObserver.unobserve(this.anchorElement)}render(){var r;const t=(r=this.attributes["starting-data"])==null?void 0:r.value;if(!t)return;const{searchUrl:e,path:s}=JSON.parse(t);this.searchUrl=e,this.path=s,this.findElementsInDocument(),this.addEveryEventListeners(),this.removeAttribute("starting-data")}firstUpdated(){this.setStickyObserver()}setStickyObserver(){var e;if(this.toolbar=document.querySelector(".mealz-catalog-toolbar"),this.anchorElement=document.querySelector(".mealz-catalog-toolbar__anchor"),!this.anchorElement||!this.toolbar)return;const t={rootMargin:`-${this.supplierHeaderHeight}px 0px 0px 0px`,threshold:1};(e=this.toolbarObserver)==null||e.unobserve(this),setTimeout(()=>this.setStickyToolbarStyle(),50),this.toolbarObserver=new IntersectionObserver(()=>{this.setStickyToolbarStyle()},t),this.toolbarObserver.observe(this.anchorElement)}setStickyToolbarStyle(){const e=this.anchorElement.getBoundingClientRect().top<this.supplierHeaderHeight;this.anchorElement.style.height=e?this.toolbar.clientHeight+"px":"0px",this.toolbar.classList.toggle("sticking",e),this.toolbar.style.top=(e?this.supplierHeaderHeight:0)+"px",this.updateDOM(e)}findElementsInDocument(){this.preferencesButton=this.querySelector(".mealz-catalog-toolbar__controls__preferences"),this.favoritesButton=this.querySelector(".mealz-catalog-toolbar__controls__favorites"),this.searchButton=this.querySelector(".mealz-catalog-toolbar__searchbar-button"),this.searchInput=this.querySelector(".mealz-catalog-toolbar__searchbar-input"),this.backButton=this.querySelector(".mealz-recipe-toolbar__return-button")}addEveryEventListeners(){var t;this.addClickListener(this.preferencesButton,this.openPreferences.bind(this)),this.addClickListener(this.searchButton,this.performSearch.bind(this)),this.addClickListener(this.favoritesButton,this.sendFavoritesDisplay.bind(this)),(t=this.searchInput)==null||t.addEventListener("keypress",e=>{e.key==="Enter"&&this.performSearch()})}addClickListener(t,e){t==null||t.addEventListener("click",s=>{s.stopPropagation(),e()})}performSearch(){const t=this.searchInput.value.trim();if(!t)return;const e=this.searchUrl.includes("?")?"&":"?";window.location.href=`${this.searchUrl}${e}search=${encodeURIComponent(t)}`}updateDOM(t){var r;const e=t?["ghost","square"]:["full"],s=t?["full"]:["ghost","square"];this.toggleClasses(this.favoritesButton,e,s),this.toggleClasses(this.preferencesButton,e,s),(r=this.backButton)==null||r.classList.toggle("hidden",!t)}toggleClasses(t,e,s){t==null||t.classList.remove(...s),t==null||t.classList.add(...e)}openPreferences(){window.mealzInternal.analytics.sendEvent("preferences.display",this.path,{}),window.mealzInternal.catalog.openPreferences()}sendFavoritesDisplay(){window.mealzInternal.analytics.sendEvent("liked.display",this.path,{})}};n=p([l("mealz-catalog-toolbar")],n);customElements.get("mealz-catalog-toolbar")||customElements.define("mealz-catalog-toolbar",n);
1
+ import{t as l}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{N as c}from"../../assets/no-shadow-element-CaVIVF-o.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,s,r)=>{for(var a=r>1?void 0:r?d(e,s):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(r?i(e,s,a):i(a))||a);return r&&a&&h(e,s,a),a};let n=class extends c{constructor(){super(...arguments),this.subscriptions=[],this.supplierHeaderHeight=0,this.searchUrl="",this.path=""}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.getStickyHeaderHeight().subscribe(t=>{this.supplierHeaderHeight=t,this.setStickyObserver()}),window.mealzInternal.catalog.preferencesModalChanged().subscribe(()=>{const t=this.preferencesButton.querySelector(".mealz-catalog-toolbar__controls__filter-badge"),e=this.preferencesButton.querySelector(".mealz-catalog-toolbar__loader");t&&t.classList.add("hidden"),e&&e.classList.remove("hidden")}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe()),this.toolbarObserver.unobserve(this.anchorElement)}render(){var r;const t=(r=this.attributes["starting-data"])==null?void 0:r.value;if(!t)return;const{searchUrl:e,path:s}=JSON.parse(t);this.searchUrl=e,this.path=s,this.findElementsInDocument(),this.addEveryEventListeners(),this.removeAttribute("starting-data")}firstUpdated(){this.setStickyObserver()}setStickyObserver(){var e;if(this.toolbar=document.querySelector(".mealz-catalog-toolbar"),this.anchorElement=document.querySelector(".mealz-catalog-toolbar__anchor"),!this.anchorElement||!this.toolbar)return;const t={rootMargin:`-${this.supplierHeaderHeight}px 0px 0px 0px`,threshold:1};(e=this.toolbarObserver)==null||e.unobserve(this),setTimeout(()=>this.setStickyToolbarStyle(),50),this.toolbarObserver=new IntersectionObserver(()=>{this.setStickyToolbarStyle()},t),this.toolbarObserver.observe(this.anchorElement)}setStickyToolbarStyle(){const e=this.anchorElement.getBoundingClientRect().top<this.supplierHeaderHeight;this.anchorElement.style.height=e?this.toolbar.clientHeight+"px":"0px",this.toolbar.classList.toggle("sticking",e),this.toolbar.style.top=(e?this.supplierHeaderHeight:0)+"px",this.updateDOM(e)}findElementsInDocument(){this.preferencesButton=this.querySelector(".mealz-catalog-toolbar__controls__preferences"),this.favoritesButton=this.querySelector(".mealz-catalog-toolbar__controls__favorites"),this.searchButton=this.querySelector(".mealz-catalog-toolbar__searchbar-button"),this.searchInput=this.querySelector(".mealz-catalog-toolbar__searchbar-input"),this.backButton=this.querySelector(".mealz-recipe-toolbar__return-button")}addEveryEventListeners(){var t;this.addClickListener(this.preferencesButton,this.openPreferences.bind(this)),this.addClickListener(this.searchButton,this.performSearch.bind(this)),this.addClickListener(this.favoritesButton,this.sendFavoritesDisplay.bind(this)),(t=this.searchInput)==null||t.addEventListener("keypress",e=>{e.key==="Enter"&&this.performSearch()})}addClickListener(t,e){t==null||t.addEventListener("click",s=>{s.stopPropagation(),e()})}performSearch(){const t=this.searchInput.value.trim();if(!t)return;const e=this.searchUrl.includes("?")?"&":"?";window.location.href=`${this.searchUrl}${e}search=${encodeURIComponent(t)}`}updateDOM(t){var r;const e=t?["ghost","square"]:["full"],s=t?["full"]:["ghost","square"];this.toggleClasses(this.favoritesButton,e,s),this.toggleClasses(this.preferencesButton,e,s),(r=this.backButton)==null||r.classList.toggle("hidden",!t)}toggleClasses(t,e,s){t==null||t.classList.remove(...s),t==null||t.classList.add(...e)}openPreferences(){window.mealzInternal.analytics.sendEvent("preferences.display",this.path,{}),window.mealzInternal.catalog.openPreferences()}sendFavoritesDisplay(){window.mealzInternal.analytics.sendEvent("liked.display",this.path,{})}};n=p([l("mealz-catalog-toolbar")],n);customElements.get("mealz-catalog-toolbar")||customElements.define("mealz-catalog-toolbar",n);
@@ -1 +1 @@
1
- .mealz-catalog__title{color:#0f191f}.mealz-catalog__title-container{display:flex;align-items:center;gap:12px}.mealz-catalog__content,.mealz-catalog__title-container{padding:0 80px;box-sizing:border-box}.mealz-catalog__content .mealz-catalog__category-title-container,.mealz-catalog__title-container .mealz-catalog__category-title-container{display:flex;flex-direction:column;gap:4px}.mealz-catalog__content .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]),.mealz-catalog__title-container .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]){width:18px;height:18px;background-color:var(--miam-ds-color-primary-100, #E4EAEC)}.mealz-catalog__content .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]) img,.mealz-catalog__title-container .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]) img{cursor:pointer;width:13px;height:13px}.mealz-catalog__content .mealz-catalog__link,.mealz-catalog__title-container .mealz-catalog__link{cursor:pointer;width:fit-content;text-decoration:none}.mealz-catalog__content .mealz-catalog__link:hover,.mealz-catalog__title-container .mealz-catalog__link:hover{text-decoration:underline}.mealz-catalog__content .mealz-catalog__subtitle,.mealz-catalog__title-container .mealz-catalog__subtitle{margin:0;color:var(--miam-ds-color-neutral-500, #687787)}.mealz-catalog__content .mealz-catalog__list__empty,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged,.mealz-catalog__title-container .mealz-catalog__list__empty,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:36px;margin-bottom:8px;gap:36px}.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog__list__empty__icon,.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__icon,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog__list__empty__icon,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__icon,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog-favorites__list__not-logged__icon{width:200px;height:150px}.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog__list__empty__title,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__title,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog__list__empty__title,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__title{display:block;text-align:center;white-space:pre-line}.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{display:grid;grid-template-columns:repeat(auto-fill,var(--m-catalog-card-width, 308px));justify-content:center;gap:16px;position:relative;width:100%;box-sizing:border-box;padding-bottom:16px}@media (min-width: 375px) and (max-width: 712px){.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{grid-template-columns:repeat(auto-fill,calc((100% - 16px)/2))}.mealz-catalog__content .mealz-recipe-card,.mealz-catalog__title-container .mealz-recipe-card{width:100%;height:272px}}@media (max-width: 374px){.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{grid-template-columns:repeat(auto-fill,100%)}.mealz-catalog__content .mealz-recipe-card,.mealz-catalog__title-container .mealz-recipe-card{width:100%;height:272px}}@media (max-width: 1023px){.mealz-catalog__content,.mealz-catalog__title-container{padding:0 24px}}@media (max-width: 700px){.mealz-catalog__content,.mealz-catalog__title-container{padding:0 16px}}.mealz-loader{margin-top:80px;margin-bottom:16px;margin-left:calc(50% - 40px);height:80px;width:80px;border:var(--m-loader-thickness) solid var(--m-color-grey);border-top:var(--m-loader-thickness) solid var(--m-color-ternary);border-radius:var(--m-border-radius-circle);animation:.5s linear infinite miam-loader-spin}@keyframes miam-loader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}p.miam-ds-text,h1.miam-ds-text,h2.miam-ds-text,h3.miam-ds-text,h4.miam-ds-text{margin:0}
1
+ .mealz-catalog__title{color:#0f191f}.mealz-catalog__title-container{display:flex;align-items:center;gap:12px}.mealz-catalog__content,.mealz-catalog__title-container{padding:0 80px;box-sizing:border-box}.mealz-catalog__content .mealz-catalog__category-title-container,.mealz-catalog__title-container .mealz-catalog__category-title-container{display:flex;flex-direction:column;gap:4px}.mealz-catalog__content .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]),.mealz-catalog__title-container .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]){width:18px;height:18px;background-color:var(--miam-ds-color-primary-100, #E4EAEC)}.mealz-catalog__content .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]) img,.mealz-catalog__title-container .mealz-catalog__title-icon:not(.ghost):not(.disabled):not([disabled]) img{cursor:pointer;width:13px;height:13px}.mealz-catalog__content .mealz-catalog__link,.mealz-catalog__title-container .mealz-catalog__link{cursor:pointer;width:fit-content;text-decoration:none}.mealz-catalog__content .mealz-catalog__link:hover,.mealz-catalog__title-container .mealz-catalog__link:hover{text-decoration:underline}.mealz-catalog__content .mealz-catalog__subtitle,.mealz-catalog__title-container .mealz-catalog__subtitle{margin:0;color:var(--miam-ds-color-neutral-500, #687787)}.mealz-catalog__content .mealz-catalog__list__empty,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged,.mealz-catalog__title-container .mealz-catalog__list__empty,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-top:36px;margin-bottom:8px;gap:36px}.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog__list__empty__icon,.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__icon,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog__list__empty__icon,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog-favorites__list__not-logged__icon,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__icon,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog-favorites__list__not-logged__icon{width:200px;height:150px}.mealz-catalog__content .mealz-catalog__list__empty .mealz-catalog__list__empty__title,.mealz-catalog__content .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__title,.mealz-catalog__title-container .mealz-catalog__list__empty .mealz-catalog__list__empty__title,.mealz-catalog__title-container .mealz-catalog-favorites__list__not-logged .mealz-catalog__list__empty__title{display:block;text-align:center;white-space:pre-line}.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{display:grid;grid-template-columns:repeat(auto-fill,var(--m-catalog-card-width, 308px));justify-content:center;gap:16px;position:relative;width:100%;box-sizing:border-box;padding-bottom:16px}.mealz-catalog__content .mealz-catalog-history__empty,.mealz-catalog__title-container .mealz-catalog-history__empty{display:flex;flex-direction:column;justify-content:center;align-items:center}.mealz-catalog__content .mealz-catalog-history__empty .mealz-catalog-history__empty__title,.mealz-catalog__title-container .mealz-catalog-history__empty .mealz-catalog-history__empty__title{margin:16px 0}.mealz-catalog__content .mealz-catalog-history__empty .mealz-catalog-history__empty__button,.mealz-catalog__title-container .mealz-catalog-history__empty .mealz-catalog-history__empty__button{text-decoration:none}@media (min-width: 375px) and (max-width: 712px){.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{grid-template-columns:repeat(auto-fill,calc((100% - 16px)/2))}.mealz-catalog__content .mealz-recipe-card,.mealz-catalog__title-container .mealz-recipe-card{width:100%;height:272px}}@media (max-width: 374px){.mealz-catalog__content .mealz-catalog__list,.mealz-catalog__title-container .mealz-catalog__list{grid-template-columns:repeat(auto-fill,100%)}.mealz-catalog__content .mealz-recipe-card,.mealz-catalog__title-container .mealz-recipe-card{width:100%;height:272px}}.mealz-catalog__content .miam-ds-loader,.mealz-catalog__title-container .miam-ds-loader{justify-self:center}@media (max-width: 1023px){.mealz-catalog__content,.mealz-catalog__title-container{padding:0 24px}}@media (max-width: 700px){.mealz-catalog__content,.mealz-catalog__title-container{padding:0 16px}}.mealz-loader{margin-top:80px;margin-bottom:16px;margin-left:calc(50% - 40px);height:80px;width:80px;border:var(--m-loader-thickness) solid var(--m-color-grey);border-top:var(--m-loader-thickness) solid var(--m-color-ternary);border-radius:var(--m-border-radius-circle);animation:.5s linear infinite miam-loader-spin}@keyframes miam-loader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}p.miam-ds-text,h1.miam-ds-text,h2.miam-ds-text,h3.miam-ds-text,h4.miam-ds-text{margin:0}
@@ -1 +1 @@
1
- import{t as l}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-DxqnJI-a.js";import{N as u}from"../../assets/no-shadow-element-D8CgOZBZ.js";var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,m=(t,e,s,n)=>{for(var i=n>1?void 0:n?h(e,s):e,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&c(e,s,i),i};let r=class extends u{constructor(){super(...arguments),this.analyticsPath="",this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealz.basket.recipeCount().subscribe(t=>{this.recipesCount=t,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe())}render(){var e;if(this.button=this.querySelector(".mealz-my-meals-button"),!this.button)return;const t=(e=this.attributes["starting-data"])==null?void 0:e.value;if(t){const{path:s}=JSON.parse(t);this.analyticsPath=s,this.removeAttribute("starting-data")}this.button.addEventListener("click",s=>{s.stopPropagation(),this.toggle()})}toggle(){window.mealz.basket.openPreview(this.analyticsPath)}updateDOM(){var e;if(!this.button)return;this.recipesCount?this.button.classList.remove("hidden"):this.button.classList.add("hidden");const t=(e=this.button.querySelector(".mealz-my-meals-button__text"))==null?void 0:e.firstElementChild;t&&(t.innerHTML=`${this.recipesCount||0}`)}};r=m([l("mealz-my-meals-button")],r);customElements.get("mealz-my-meals-button")||customElements.define("mealz-my-meals-button",r);
1
+ import{t as l}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{N as u}from"../../assets/no-shadow-element-CaVIVF-o.js";var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,m=(t,e,s,n)=>{for(var i=n>1?void 0:n?h(e,s):e,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&c(e,s,i),i};let r=class extends u{constructor(){super(...arguments),this.analyticsPath="",this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealz.basket.recipeCount().subscribe(t=>{this.recipesCount=t,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe())}render(){var e;if(this.button=this.querySelector(".mealz-my-meals-button"),!this.button)return;const t=(e=this.attributes["starting-data"])==null?void 0:e.value;if(t){const{path:s}=JSON.parse(t);this.analyticsPath=s,this.removeAttribute("starting-data")}this.button.addEventListener("click",s=>{s.stopPropagation(),this.toggle()})}toggle(){window.mealz.basket.openPreview(this.analyticsPath)}updateDOM(){var e;if(!this.button)return;this.recipesCount?this.button.classList.remove("hidden"):this.button.classList.add("hidden");const t=(e=this.button.querySelector(".mealz-my-meals-button__text"))==null?void 0:e.firstElementChild;t&&(t.innerHTML=`${this.recipesCount||0}`)}};r=m([l("mealz-my-meals-button")],r);customElements.get("mealz-my-meals-button")||customElements.define("mealz-my-meals-button",r);
@@ -0,0 +1 @@
1
+ mealz-drawer.hidden{display:none}.mealz-no-scroll{overflow:hidden}.mealz-shadow-overlay{position:fixed;background:var(--miam-ds-color-neutral-black);animation-name:show;animation-duration:.3s;opacity:.6;animation-timing-function:ease-in-out;z-index:calc(var(--m-z-index-modal-overlay) - 1);top:0;left:0;width:100vw;height:100dvh;-webkit-tap-highlight-color:transparent;@keyframes show{0%{opacity:0}to{opacity:.6}}}.mealz-drawer{z-index:calc(var(--m-z-index-modal) - 1);position:fixed;overflow:hidden;background-color:var(--miam-ds-color-background-primary);display:flex;flex-direction:column;animation-duration:.5s;animation-timing-function:cubic-bezier(.75,0,.2,1);height:100%;width:480px;top:0;right:0}.mealz-drawer.with-header .mealz-drawer__content{margin-top:24px;margin-bottom:24px}.mealz-drawer.without-header .mealz-drawer__header .mealz-drawer__title{display:none}.mealz-drawer.without-header .mealz-drawer__header .mealz-drawer__close-icon{position:absolute;top:0;right:0;z-index:calc(var(--m-z-index-position-absolute-high) - 1)}.mealz-drawer .mealz-drawer__header{display:flex;flex-direction:row;justify-content:space-between;padding:16px;align-items:center;border-bottom:1px solid var(--miam-ds-color-neutral-200, #d9dde1)}.mealz-drawer .mealz-drawer__header .mealz-drawer__title{font-weight:900;overflow:hidden;text-overflow:ellipsis;align-self:center}.mealz-drawer .mealz-drawer__header .mealz-drawer__close-icon{padding:16px;background:center / 24px no-repeat url(https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg)}.mealz-drawer .mealz-drawer__content-container{height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--miam-ds-color-primary-100),var(--miam-ds-color-primary);box-sizing:border-box}.mealz-drawer .mealz-drawer__content{width:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--miam-ds-color-primary-100),var(--miam-ds-color-primary);padding:0 16px;display:grid;grid-template-columns:repeat(auto-fill,min(218px,calc((100% - 12px)/2)));gap:12px;box-sizing:border-box;justify-content:center}@media (min-width: 375px) and (max-width: 480px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,min(165px,calc((100% - 12px)/2)))}}@media (max-width: 375px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,100%)}}@media (min-width: 1023px){@media (max-height: 1000px){.mealz-drawer{width:650px}}@media (max-height: 800px){.mealz-drawer{width:450px}}}
@@ -0,0 +1,11 @@
1
+ import{t as d}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{N as c}from"../assets/no-shadow-element-CaVIVF-o.js";var u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,w=(e,t,r,s)=>{for(var a=s>1?void 0:s?h(t,r):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(a=(s?i(t,r,a):i(a))||a);return s&&a&&u(t,r,a),a};let l=class extends c{constructor(){super(...arguments),this.isMealzInternalReady=!1}connectedCallback(){super.connectedCallback(),this.classList.add("hidden"),this.checkMealzInternalStatus()}disconnectedCallback(){super.disconnectedCallback()}render(){this.innerHTML=this.createDrawerHTML(),this.addEventListeners()}checkMealzInternalStatus(e=0){var t,r,s,a;if((r=(t=window.mealzInternal)==null?void 0:t.supplier)!=null&&r.getToken()&&((a=(s=window.mealzInternal)==null?void 0:s.user)!=null&&a.getLanguage())){this.isMealzInternalReady=!0;return}else e>50&&console.warn("Unable to find the supplier token or user language. Please verify the configuration."),setTimeout(()=>this.checkMealzInternalStatus(e+1),100)}createDrawerHTML(){return`
2
+ <div class="mealz-shadow-overlay"></div>
3
+ <div class="mealz-drawer">
4
+ <div class="mealz-drawer__header">
5
+ <div class="mealz-drawer__title miam-ds-text size-l weight-xxl">
6
+ <span></span>
7
+ </div>
8
+ <div class="mealz-drawer__close-icon miam-ds-button ghost square"></div>
9
+ </div>
10
+ <div class="mealz-drawer__content-container"></div>
11
+ </div>`}addEventListeners(){const e=this.querySelector(".mealz-drawer__close-icon"),t=this.querySelector(".mealz-shadow-overlay");e&&t&&(e.addEventListener("click",this.closeDrawer.bind(this)),t.addEventListener("click",this.closeDrawer.bind(this)))}async openDrawer(){this.classList.remove("hidden"),document.body.classList.add("mealz-no-scroll")}closeDrawer(){const e=new URL(window.location.href);e.searchParams.delete("order"),window.history.pushState({},"",e.toString()),document.body.classList.remove("mealz-no-scroll"),this.classList.add("hidden"),this.updateDrawerContent("","",!1)}updateDrawerContent(e,t,r){const s=this.querySelector(".mealz-drawer__content-container"),a=this.querySelector(".mealz-drawer__title span"),n=this.querySelector(".mealz-drawer");s&&(s.innerHTML=e),a&&(a.textContent=t||""),n&&(n.classList.toggle("without-header",r),n.classList.toggle("with-header",!r))}async fetchDrawerData(e,t,r,s){const a=new URLSearchParams;a.append("order",t.toString()),s&&a.append("store_id",s);const n=await this.buildHeaders(r);return await(await fetch(e+"?"+a,{method:"GET",headers:n})).text()}async loadDrawerData(e,t,r,s){const a=await this.fetchDrawerData(e,t,r,s),n=this.parseStartingData(a);if(n){const{title:i,noHeaderMode:o}=n;this.updateDrawerContent(a,i,o)}}parseStartingData(e){const r=new DOMParser().parseFromString(e,"text/html").querySelector("[starting-data]");if(!r)return null;const s=r.getAttribute("starting-data");if(!s)return null;const a=JSON.parse(s);return r.removeAttribute("starting-data"),a}async buildHeaders(e){if(!this.isMealzInternalReady)return await new Promise(s=>setTimeout(s,100)),this.buildHeaders(e);const t={"language-id":window.mealzInternal.user.getLanguage(),"supplier-token":window.mealzInternal.supplier.getToken(),"session-id":e},r=localStorage.getItem("_miam/userId");return r?t.authorization=`user_id ${r}`:t["authless-id"]=localStorage.getItem("_miam/authlessId"),t}};l=w([d("mealz-drawer")],l);customElements.get("mealz-drawer")||customElements.define("mealz-drawer",l);document.addEventListener("DOMContentLoaded",()=>{if(!document.querySelector("mealz-drawer")){const t=new l;document.body.appendChild(t)}});export{l as M};
@@ -0,0 +1 @@
1
+ .mealz-history-order{display:flex;flex-direction:column;gap:12px;width:284px;height:108px;border:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);border-radius:12px;padding:12px;cursor:pointer}.mealz-history-order .mealz-history-order__container{display:flex;flex-direction:inherit;gap:12px;width:100%;height:100%}.mealz-history-order .mealz-history-order__container .mealz-avatars-group{width:fit-content}.mealz-history-order .mealz-history-order__container .mealz-avatars-group .mealz-avatar{width:62px;height:62px;border:2px solid var(--miam-ds-color-neutral-white, #fff)}.mealz-history-order .mealz-history-order__container .mealz-avatars-group .mealz-avatar:not(:first-child){margin-left:-24px}.mealz-history-order .mealz-history-order__container .mealz-avatars-group .mealz-avatar__overflow{background-color:#f7f8f9;display:flex;justify-content:center;align-items:center}.mealz-history-order .mealz-history-order__container .mealz-avatars-group .mealz-avatar__overflow span{color:var(--miam-ds-color-neutral-black, #0F191F);opacity:.7}.mealz-history-order .mealz-history-order__container .mealz-history-order__bottom{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:12px}.mealz-history-order .mealz-history-order__container .mealz-history-order__bottom .miam-ds-button{padding:8px 16px;background-color:#eff1f3}.mealz-history-order .mealz-history-order__container .mealz-history-order__bottom span{line-height:16px}@media (max-width: 426px){.mealz-history-order{width:auto;height:auto}.mealz-history-order .mealz-history-order__bottom-date span{display:block}}
@@ -0,0 +1 @@
1
+ import{t as n}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{N as l}from"../assets/no-shadow-element-CaVIVF-o.js";import{M as c}from"../drawer/drawer.min.js";var h=Object.defineProperty,m=Object.getOwnPropertyDescriptor,u=(a,e,i,o)=>{for(var r=o>1?void 0:o?m(e,i):e,s=a.length-1,t;s>=0;s--)(t=a[s])&&(r=(o?t(e,i,r):t(r))||r);return o&&r&&h(e,i,r),r};let d=class extends l{connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){var s;if(this.historyOrderHTML=this.querySelector(".mealz-history-order"),!this.historyOrderHTML)return;const a=(s=this.attributes["starting-data"])==null?void 0:s.value;if(!a)return;const{orderId:e,drawerDataURL:i,sessionId:o,storeId:r}=JSON.parse(a);this.historyOrderHTML.addEventListener("click",()=>{this.updateURLWithOrder(e);let t=document.querySelector("mealz-drawer");t||(t=new c,document.body.appendChild(t)),t.openDrawer(),t.loadDrawerData(i,e,o,r)}),this.removeAttribute("starting-data")}updateURLWithOrder(a){const e=new URL(window.location.href);e.searchParams.set("order",a),window.history.pushState({},"",e.toString())}};d=u([n("mealz-history-order")],d);customElements.get("mealz-history-order")||customElements.define("mealz-history-order",d);
@@ -1 +1 @@
1
- import{t as c}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-DxqnJI-a.js";import{N as o}from"../assets/no-shadow-element-D8CgOZBZ.js";var u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(t,i,l,s)=>{for(var e=s>1?void 0:s?h(i,l):i,a=t.length-1,r;a>=0;a--)(r=t[a])&&(e=(s?r(i,l,e):r(e))||e);return s&&e&&u(i,l,e),e};let n=class extends o{constructor(){super(...arguments),this.liked=null,this.recipeLikeId="",this.recipeId="",this.analyticsPath="",this.subscriptions=[]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe())}render(){this.button=this.querySelector(".mealz-like-button"),this.button&&(this.getInitialStatus(),this.button.addEventListener("click",t=>{t.stopPropagation(),this.toggle()}),this.subscriptions.push(window.mealzInternal.recipes.recipeLikeUpdated().subscribe(({id:t,isPast:i})=>{t===this.recipeId&&(this.liked=!i,this.updateDOM())})))}getInitialStatus(){var a;const t=(a=this.attributes["starting-data"])==null?void 0:a.value;if(!t)return;const{id:i,recipeId:l,liked:s,path:e}=JSON.parse(t);this.recipeLikeId=i,this.recipeId=l,this.liked=s!==void 0?s:!1,this.analyticsPath=e,this.removeAttribute("starting-data")}async toggle(){window.mealzInternal.recipes.updateRecipeLike(this.recipeLikeId,this.recipeId,this.liked,this.analyticsPath)}updateDOM(){this.button.querySelector(".mealz-like-button__icon").classList.toggle("fill",this.liked),this.button.querySelectorAll(".mealz-like-button__icon img").forEach(t=>t.classList.toggle("active"))}};n=d([c("mealz-like-button")],n);customElements.get("mealz-like-button")||customElements.define("mealz-like-button",n);
1
+ import{t as c}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{N as o}from"../assets/no-shadow-element-CaVIVF-o.js";var u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(t,i,l,s)=>{for(var e=s>1?void 0:s?h(i,l):i,a=t.length-1,r;a>=0;a--)(r=t[a])&&(e=(s?r(i,l,e):r(e))||e);return s&&e&&u(i,l,e),e};let n=class extends o{constructor(){super(...arguments),this.liked=null,this.recipeLikeId="",this.recipeId="",this.analyticsPath="",this.subscriptions=[]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(t=>t.unsubscribe())}render(){this.button=this.querySelector(".mealz-like-button"),this.button&&(this.getInitialStatus(),this.button.addEventListener("click",t=>{t.stopPropagation(),this.toggle()}),this.subscriptions.push(window.mealzInternal.recipes.recipeLikeUpdated().subscribe(({id:t,isPast:i})=>{t===this.recipeId&&(this.liked=!i,this.updateDOM())})))}getInitialStatus(){var a;const t=(a=this.attributes["starting-data"])==null?void 0:a.value;if(!t)return;const{id:i,recipeId:l,liked:s,path:e}=JSON.parse(t);this.recipeLikeId=i,this.recipeId=l,this.liked=s!==void 0?s:!1,this.analyticsPath=e,this.removeAttribute("starting-data")}async toggle(){window.mealzInternal.recipes.updateRecipeLike(this.recipeLikeId,this.recipeId,this.liked,this.analyticsPath)}updateDOM(){this.button.querySelector(".mealz-like-button__icon").classList.toggle("fill",this.liked),this.button.querySelectorAll(".mealz-like-button__icon img").forEach(t=>t.classList.toggle("active"))}};n=d([c("mealz-like-button")],n);customElements.get("mealz-like-button")||customElements.define("mealz-like-button",n);
@@ -0,0 +1 @@
1
+ mealz-promotions-banner{position:relative;max-width:480px;width:100%;margin:0 16px;box-sizing:border-box}mealz-promotions-banner .mealz-promotions-banner__badge{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);padding:4px 8px;border-radius:999px;color:var(--miam-ds-color-neutral-white, #fff);background-color:#e02d2d}mealz-promotions-banner .mealz-promotions-banner_button{text-align:center;padding:12px;display:block;width:100%;border-radius:8px;border:none;cursor:pointer;background:var(--miam-ds-color-neutral-50, #F7F8F9);text-decoration:underline;color:inherit}
@@ -1 +1 @@
1
- .mealz-recipe-card{--mealz-recipe-card-width: 308px;--mealz-recipe-card-height: 500px;--mealz-price-font-size: 20px;--mealz-price-subline-font-size: 16px;--mealz-cta-button-padding: 8px;--mealz-bottom-padding: 12px;--mealz-top-margin: 12px;--mealz-bottom-height: 64px;--mealz-recipe-card-direction: column}.mealz-recipe-card.horizontal{--mealz-recipe-card-width: 100%;--mealz-recipe-card-height: 188px;--mealz-recipe-card-direction: row;--mealz-bottom-padding: 8px;--mealz-top-margin: 8px}.mealz-recipe-card.vertical-small{--mealz-recipe-card-width: 163px;--mealz-recipe-card-height: 272px;--mealz-price-font-size: 16px;--mealz-price-subline-font-size: 14px;--mealz-bottom-padding: 8px;--mealz-bottom-height: 56px;--mealz-top-margin: 8px}.mealz-recipe-card{position:relative;display:flex;width:var(--mealz-recipe-card-width, 308px);height:var(--mealz-recipe-card-height, 500px);flex-direction:column;align-items:flex-start;flex-shrink:0;border-radius:8px;overflow:hidden;cursor:pointer}.mealz-recipe-card .mealz-recipe-card__container{display:flex;flex-direction:var(--mealz-recipe-card-direction, column);height:100%;width:100%;flex-shrink:0;align-self:stretch}.mealz-recipe-card .mealz-recipe-card__container:hover .mealz-recipe-card__top .mealz-recipe-card__picture img{transform:scale(1.1)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top{position:relative;flex:1;height:calc(100% - var(--mealz-bottom-height, 64px))}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__picture{width:100%;height:100%;overflow:hidden}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__picture img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__gradient{position:absolute;width:100%;height:100%;top:0;left:0;background:linear-gradient(180deg,#0000 43.67%,#0006 91.33%)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding:var(--mealz-bottom-padding, 12px);box-sizing:border-box}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__title{color:var(--miam-ds-color-neutral-white, #FFF);text-shadow:0px 2px 8px rgba(0,0,0,.15);text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter{display:flex;padding:4px 8px;align-items:center;gap:4px;border-radius:100px;background:var(--miam-ds-color-neutral-white, #FFF);color:var(--miam-ds-color-neutral-black, #3F3735);height:fit-content;flex-shrink:0}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter p{line-height:100%}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter img{width:16px;height:16px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container{display:flex;flex-direction:row-reverse;justify-content:space-between;margin:var(--mealz-top-margin, 12px)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .miam-recipe-card__actions__icon.hidden{display:none}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__like .miam-like-button{border-radius:48px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__like .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon{height:16px;width:16px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__sponsor-container{display:flex;padding:8px 12px;background-color:#fff;border-radius:100px;width:auto;height:auto;box-sizing:border-box}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__sponsor-container .mealz-recipe-card__sponsor-picture{width:auto;height:auto;max-width:80px;max-height:40px;object-fit:contain}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom{display:flex;width:100%;height:var(--mealz-bottom-height, 64px);flex-direction:column;align-items:flex-start;justify-content:center;box-sizing:border-box;padding:var(--mealz-bottom-padding, 12px);border-radius:0 0 8px 8px;background-color:var(--miam-ds-color-neutral-white, #FFF);border-right:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);border-left:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__infos{display:flex;flex-direction:column;align-items:flex-start}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta{display:flex;flex-direction:row;gap:16px;align-items:center}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta .mealz-recipe-card__cta-button{padding:var(--mealz-cta-button-padding, 12px 16px)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time{display:flex;flex-direction:row;color:var(--miam-ds-color-text-disabled, #8C96A2);gap:12px;margin-bottom:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__difficulty,.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__time{display:flex}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__difficulty img,.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__time img{margin-right:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__price{color:var(--miam-ds-color-primary-500, #24748F);line-height:100%;margin-right:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__actions__replace{display:flex;flex:1;justify-content:space-between;align-items:center}.mealz-recipe-card.horizontal{border:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}.mealz-recipe-card.horizontal .mealz-recipe-card__top{flex:inherit;height:inherit;width:50%}.mealz-recipe-card.horizontal .mealz-recipe-card__top .mealz-recipe-card__gradient{display:none}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom{height:inherit;justify-content:space-between;border:none}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom .mealz-recipe-card__actions{flex-wrap:wrap}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta{flex:1;justify-content:flex-end}.mealz-recipe-card.horizontal.variant-3 .mealz-recipe-card__content .mealz-recipe-card__top-container{flex-direction:inherit}.mealz-recipe-card.horizontal.variant-2 .mealz-recipe-card__content .mealz-recipe-card__top-container .miam-recipe-card__actions__icon.hidden{display:inherit}
1
+ .mealz-recipe-card{--mealz-recipe-card-width: 308px;--mealz-recipe-card-height: 500px;--mealz-price-font-size: 20px;--mealz-price-subline-font-size: 16px;--mealz-cta-button-padding: 8px;--mealz-bottom-padding: 12px;--mealz-top-margin: 12px;--mealz-bottom-height: 64px;--mealz-recipe-card-direction: column}.mealz-recipe-card.horizontal{--mealz-recipe-card-width: 100%;--mealz-recipe-card-height: 188px;--mealz-recipe-card-direction: row;--mealz-bottom-padding: 8px;--mealz-top-margin: 8px}.mealz-recipe-card.vertical-small{--mealz-recipe-card-width: 163px;--mealz-recipe-card-height: 272px;--mealz-price-font-size: 16px;--mealz-price-subline-font-size: 14px;--mealz-bottom-padding: 8px;--mealz-bottom-height: 56px;--mealz-top-margin: 8px}.mealz-recipe-card{position:relative;display:flex;width:var(--mealz-recipe-card-width, 308px);height:var(--mealz-recipe-card-height, 500px);flex-direction:column;align-items:flex-start;flex-shrink:0;border-radius:8px;overflow:hidden;cursor:pointer}.mealz-recipe-card .mealz-recipe-card__container{display:flex;flex-direction:var(--mealz-recipe-card-direction, column);height:100%;width:100%;flex-shrink:0;align-self:stretch}.mealz-recipe-card .mealz-recipe-card__container:hover .mealz-recipe-card__top .mealz-recipe-card__picture img{transform:scale(1.1)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top{position:relative;flex:1;height:calc(100% - var(--mealz-bottom-height, 64px))}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__picture{width:100%;height:100%;overflow:hidden}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__picture img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__gradient{position:absolute;width:100%;height:100%;top:0;left:0;background:linear-gradient(180deg,#0000 43.67%,#0006 91.33%)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding:var(--mealz-bottom-padding, 12px);box-sizing:border-box}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__title{color:var(--miam-ds-color-neutral-white, #FFF);text-shadow:0px 2px 8px rgba(0,0,0,.15);text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter{display:flex;padding:4px 8px;align-items:center;gap:4px;border-radius:100px;background:var(--miam-ds-color-neutral-white, #FFF);color:var(--miam-ds-color-neutral-black, #3F3735);height:fit-content;flex-shrink:0}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter p{line-height:100%}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__picture__bottom .mealz-recipe-card__counter img{width:16px;height:16px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container{display:flex;flex-direction:row-reverse;justify-content:space-between;margin:var(--mealz-top-margin, 12px)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__actions__icon.hidden{display:none}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__like .miam-like-button{border-radius:48px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__like .miam-like-button.miam-ds-button.primary.reverse.square.small .miam-like-button__icon{height:16px;width:16px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card_sponso_and_promo_badge,.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__badge-container{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__sponsor-container{display:flex;padding:8px 12px;background-color:#fff;border-radius:100px;width:auto;height:auto;box-sizing:border-box}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__top .mealz-recipe-card__content .mealz-recipe-card__sponsor-container .mealz-recipe-card__sponsor-picture{width:auto;height:auto;max-width:80px;max-height:40px;object-fit:contain}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom{display:flex;width:100%;height:var(--mealz-bottom-height, 64px);flex-direction:column;align-items:flex-start;justify-content:center;box-sizing:border-box;padding:var(--mealz-bottom-padding, 12px);border-radius:0 0 8px 8px;background-color:var(--miam-ds-color-neutral-white, #FFF);border-right:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);border-bottom:1px solid var(--miam-ds-color-neutral-200, #D9DDE1);border-left:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions{position:relative;display:flex;justify-content:space-between;align-items:center;align-self:stretch}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__price-and-promotion .mealz-recipe-card__bottom-promotion{display:inherit;position:absolute;bottom:40px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__price-and-promotion .mealz-recipe-card__bottom-promotion .mealz-recipe-promotion-badge{align-items:center;padding:4px 8px;gap:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__price-and-promotion .mealz-recipe-card__bottom-promotion .mealz-recipe-promotion-badge .mealz-recipe-promotion-badge__icon{width:16px;height:16px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta{display:flex;flex-direction:row;gap:16px;align-items:center}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta .mealz-recipe-card__cta-button{padding:var(--mealz-cta-button-padding, 12px 16px)}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta .mealz-recipe-card-cta{padding:8px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time{display:flex;flex-direction:row;color:var(--miam-ds-color-text-disabled, #8C96A2);gap:12px;margin-bottom:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__difficulty,.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__time{display:flex}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__difficulty img,.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__difficulty-and-time .mealz-recipe-card__time img{margin-right:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__price{color:var(--miam-ds-color-primary-500, #24748F);line-height:100%;margin-right:4px}.mealz-recipe-card .mealz-recipe-card__container .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__actions__replace{display:flex;flex:1;justify-content:space-between;align-items:center}.mealz-recipe-card.variant-4{width:100%;height:272px}@media (max-width: 480px){.mealz-recipe-card.variant-4{height:224px}}.mealz-recipe-card.horizontal{border:1px solid var(--miam-ds-color-neutral-200, #D9DDE1)}.mealz-recipe-card.horizontal .mealz-recipe-card__top{flex:inherit;height:inherit;width:50%}.mealz-recipe-card.horizontal .mealz-recipe-card__top .mealz-recipe-card__gradient{display:none}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom{height:inherit;justify-content:space-between;border:none}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom .mealz-recipe-card__actions{flex-wrap:wrap}.mealz-recipe-card.horizontal .mealz-recipe-card__bottom .mealz-recipe-card__actions .mealz-recipe-card__cta{flex:1;justify-content:flex-end}.mealz-recipe-card.horizontal.variant-3 .mealz-recipe-card__content .mealz-recipe-card__top-container{flex-direction:inherit}.mealz-recipe-card.horizontal.variant-2 .mealz-recipe-card__content .mealz-recipe-card__top-container .mealz-recipe-card__actions__icon.hidden{display:inherit}
@@ -1 +1 @@
1
- import{t as u}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-DxqnJI-a.js";import{N as m}from"../assets/no-shadow-element-D8CgOZBZ.js";import{S as b}from"../assets/Subject-CfKiwe_U.js";import{b as f}from"../assets/async-wibIXa2g.js";import{o as v,c as w}from"../assets/OperatorSubscriber-Da2IK3Yo.js";function I(t,e){return e===void 0&&(e=f),v(function(n,s){var i=null,r=null,c=null,h=function(){if(i){i.unsubscribe(),i=null;var a=r;r=null,s.next(a)}};function l(){var a=c+t,d=e.now();if(d<a){i=this.schedule(void 0,a-d),s.add(i);return}h()}n.subscribe(w(s,function(a){r=a,c=e.now(),i||(i=e.schedule(l,t),s.add(i))},function(){h(),s.complete()},void 0,function(){r=i=null}))})}class g{constructor(){this.condition=!0,this.threshold=0,this.debounce=0}}class p{constructor(e,n,s={}){this.element=e,this.callback=n,this.params=s,this.intersectionSubject=new b,this.params={...new g,...s};let i={root:null,rootMargin:"0px",threshold:this.params.threshold};this.observer=new IntersectionObserver(r=>{r.forEach(c=>this.intersectionSubject.next(c))},i),this.connect()}connect(){this.intersectionSubject.pipe(I(this.params.debounce)).subscribe(e=>this.handleIntersection(e)),this.observer.observe(this.element)}disconnect(){this.observer&&this.observer.disconnect(),this.intersectionSubject.complete()}handleIntersection(e){this.params.condition&&e.isIntersecting&&this.callback()}}var C=Object.defineProperty,y=Object.getOwnPropertyDescriptor,S=(t,e,n,s)=>{for(var i=s>1?void 0:s?y(e,n):e,r=t.length-1,c;r>=0;r--)(c=t[r])&&(i=(s?c(e,n,i):c(i))||i);return s&&i&&C(e,n,i),i};let o=class extends m{constructor(){super(...arguments),this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.listenInView(),this.subscriptions.push(window.mealzInternal.recipes.guestsUpdated().subscribe(async({recipeId:t,guests:e})=>{this.updatedRecipeId=t,this.updatedGuests=e,this.updateDOM()}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),this.subscriptions.forEach(n=>n.unsubscribe()),(t=this.priceViewportObserver)==null||t.disconnect(),(e=this.analyticsViewportObserver)==null||e.disconnect()}render(){this.recipeCardTop=this.querySelector(".mealz-recipe-card__top"),this.recipeCardCta=this.querySelector(".mealz-recipe-card__cta"),!(!this.recipeCardTop||!this.recipeCardCta)&&(this.getInitialStatus(),this.recipeCardTop.addEventListener("click",()=>this.recipeCardTopClick()),this.recipeCardCta.addEventListener("click",()=>this.recipeCardCtaClick()))}listenInView(){this.priceViewportObserver=new p(this,()=>{this.handleIntersection()}),this.analyticsViewportObserver=new p(this,()=>{this.sendAnalyticsShow()},{threshold:.8,debounce:1e3})}handleIntersection(){var t;this.recipePricing=this.querySelector("mealz-recipe-pricing"),this.recipePricing&&((t=this.recipePricing)==null||t.fetchPrice(this.posId,"DEFAULT",this.guests),this.priceViewportObserver.disconnect())}getInitialStatus(){var c;const t=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!t)return;const{id:e,guests:n,posId:s,path:i,categoryId:r}=JSON.parse(t);this.posId=s,this.recipeId=e,this.analyticsPath=i,this.categoryId=r,this.guests=n,this.removeAttribute("starting-data")}recipeCardTopClick(){window.mealzInternal.recipes.openDetails(this.recipeId,this.guests,this.analyticsPath,this.categoryId)}recipeCardCtaClick(){window.mealzInternal.recipes.openDetails(this.recipeId,this.guests,this.analyticsPath,this.categoryId)}updateDOM(){if(this.recipeId!==this.updatedRecipeId)return;const t=this.querySelector(".mealz-recipe-card__counter p");t&&(this.guests=this.updatedGuests,t.innerHTML=this.guests.toString())}sendAnalyticsShow(){window.mealzInternal.analytics.sendEvent("recipe.show",this.analyticsPath,{recipe_id:this.recipeId,category_id:this.categoryId})}};o=S([u("mealz-recipe-card")],o);customElements.get("mealz-recipe-card")||customElements.define("mealz-recipe-card",o);
1
+ import{t as u}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{h as b}from"../assets/session-handler-BPS5vj92.js";import{N as m}from"../assets/no-shadow-element-CaVIVF-o.js";import{S as f}from"../assets/Subject-CZHNlEkK.js";import{b as I}from"../assets/async-B_IhBgzg.js";import{o as v,c as w}from"../assets/OperatorSubscriber-BPZabEAm.js";function g(t,e){return e===void 0&&(e=I),v(function(n,s){var i=null,r=null,c=null,o=function(){if(i){i.unsubscribe(),i=null;var a=r;r=null,s.next(a)}};function h(){var a=c+t,p=e.now();if(p<a){i=this.schedule(void 0,a-p),s.add(i);return}o()}n.subscribe(w(s,function(a){r=a,c=e.now(),i||(i=e.schedule(h,t),s.add(i))},function(){o(),s.complete()},void 0,function(){r=i=null}))})}class C{constructor(){this.condition=!0,this.threshold=0,this.debounce=0}}class l{constructor(e,n,s={}){this.element=e,this.callback=n,this.params=s,this.intersectionSubject=new f,this.subscriptions=[],this.params={...new C,...s};let i={root:null,rootMargin:"0px",threshold:this.params.threshold};this.observer=new IntersectionObserver(r=>{r.forEach(c=>this.intersectionSubject.next(c))},i),this.connect()}connect(){this.subscriptions.push(this.intersectionSubject.pipe(g(this.params.debounce)).subscribe(e=>this.handleIntersection(e))),this.observer.observe(this.element)}disconnect(){this.observer&&this.observer.disconnect(),this.intersectionSubject.complete(),this.subscriptions.forEach(e=>e.unsubscribe())}handleIntersection(e){this.params.condition&&e.isIntersecting&&this.callback()}}var y=Object.defineProperty,S=Object.getOwnPropertyDescriptor,O=(t,e,n,s)=>{for(var i=s>1?void 0:s?S(e,n):e,r=t.length-1,c;r>=0;r--)(c=t[r])&&(i=(s?c(e,n,i):c(i))||i);return s&&i&&y(e,n,i),i};let d=class extends m{constructor(){super(...arguments),this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.listenInView(),this.subscriptions.push(window.mealzInternal.recipes.guestsUpdated().subscribe(async({recipeId:t,guests:e})=>{this.updatedRecipeId=t,this.updatedGuests=e,this.updateDOM()}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),this.subscriptions.forEach(n=>n.unsubscribe()),(t=this.priceViewportObserver)==null||t.disconnect(),(e=this.analyticsViewportObserver)==null||e.disconnect()}render(){this.recipeCardTop=this.querySelector(".mealz-recipe-card__top"),this.recipeCardCta=this.querySelector(".mealz-recipe-card__cta"),this.recipeCardTop&&(this.getInitialStatus(),this.recipeCardTop.addEventListener("click",()=>this.recipeCardTopClick()),this.recipeCardCta&&this.recipeCardCta.addEventListener("click",()=>this.recipeCardCtaClick()))}listenInView(){this.priceViewportObserver=new l(this,()=>{this.handleIntersection()}),this.analyticsViewportObserver=new l(this,()=>{this.sendAnalyticsShow()},{threshold:.8,debounce:1e3})}handleIntersection(){var t;this.recipePricing=this.querySelector("mealz-recipe-pricing"),this.recipePricing&&((t=this.recipePricing)==null||t.fetchPrice(this.posId,"DEFAULT",this.guests),this.priceViewportObserver.disconnect())}getInitialStatus(){var h;const t=(h=this.attributes["starting-data"])==null?void 0:h.value;if(!t)return;const{id:e,guests:n,posId:s,path:i,categoryId:r,initialTabIndex:c,sessionId:o}=JSON.parse(t);this.posId=s,this.recipeId=e,this.analyticsPath=i,this.categoryId=r,this.guests=n,this.initialTabIndex=c,b(o),this.removeAttribute("starting-data")}recipeCardTopClick(){window.mealzInternal.recipes.openDetails(this.recipeId,this.guests,this.initialTabIndex,this.analyticsPath,this.categoryId)}recipeCardCtaClick(){window.mealzInternal.recipes.openDetails(this.recipeId,this.guests,this.initialTabIndex,this.analyticsPath,this.categoryId)}updateDOM(){if(this.recipeId!==this.updatedRecipeId)return;const t=this.querySelector(".mealz-recipe-card__counter p");t&&(this.guests=this.updatedGuests,t.innerHTML=this.guests.toString())}sendAnalyticsShow(){window.mealzInternal.analytics.sendEvent("recipe.show",this.analyticsPath,{recipe_id:this.recipeId,category_id:this.categoryId})}};d=O([u("mealz-recipe-card")],d);customElements.get("mealz-recipe-card")||customElements.define("mealz-recipe-card",d);
@@ -1 +1 @@
1
- mealz-recipe-card-cta .miam-ds-button.secondary:hover:not(.loading):not(.disabled):not([disabled]){background-color:transparent;color:var(--miam-ds-color-primary, #24748F))}mealz-recipe-card-cta .mealz-recipe-card-cta:not(.in-basket) img.in-basket{display:none}mealz-recipe-card-cta .mealz-recipe-card-cta.in-basket img:not(.in-basket){display:none}
1
+ mealz-recipe-card-cta .miam-ds-button.secondary:hover:not(.loading):not(.disabled):not([disabled]){background-color:transparent;color:var(--miam-ds-color-primary, #24748F)}mealz-recipe-card-cta .mealz-recipe-card-cta:not(.in-basket) img.in-basket{display:none}mealz-recipe-card-cta .mealz-recipe-card-cta.in-basket img:not(.in-basket){display:none}
@@ -1 +1 @@
1
- import{t as p}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-DxqnJI-a.js";import{N as l}from"../assets/no-shadow-element-D8CgOZBZ.js";var o=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u=(e,s,i,a)=>{for(var t=a>1?void 0:a?d(s,i):s,r=e.length-1,c;r>=0;r--)(c=e[r])&&(t=(a?c(s,i,t):c(t))||t);return a&&t&&o(s,i,t),t};let n=class extends l{constructor(){super(...arguments),this.subscriptions=[]}async connectedCallback(){super.connectedCallback(),this.getInitialStatus()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){this.recipeCta=this.querySelector(".mealz-recipe-card-cta"),this.recipeCta&&this.subscriptions.push(window.mealzInternal.basket.recipePricesInBasket$().subscribe(e=>{this.updateDOM(e.map(s=>s.id).includes(this.recipeId))}))}getInitialStatus(){var e;this.recipeId=(e=this.attributes["starting-data"])==null?void 0:e.value,this.removeAttribute("starting-data")}updateDOM(e){e?(this.recipeCta.classList.replace("primary","secondary"),this.recipeCta.classList.add("in-basket")):(this.recipeCta.classList.replace("secondary","primary"),this.recipeCta.classList.remove("in-basket"))}};n=u([p("mealz-recipe-card-cta")],n);customElements.get("mealz-recipe-card-cta")||customElements.define("mealz-recipe-card-cta",n);
1
+ import{t as p}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{N as l}from"../assets/no-shadow-element-CaVIVF-o.js";var o=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u=(e,s,i,a)=>{for(var t=a>1?void 0:a?d(s,i):s,r=e.length-1,c;r>=0;r--)(c=e[r])&&(t=(a?c(s,i,t):c(t))||t);return a&&t&&o(s,i,t),t};let n=class extends l{constructor(){super(...arguments),this.subscriptions=[]}async connectedCallback(){super.connectedCallback(),this.getInitialStatus()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){this.recipeCta=this.querySelector(".mealz-recipe-card-cta"),this.recipeCta&&this.subscriptions.push(window.mealzInternal.basket.recipePricesInBasket$().subscribe(e=>{this.updateDOM(e.map(s=>s.id).includes(this.recipeId))}))}getInitialStatus(){var e;this.recipeId=(e=this.attributes["starting-data"])==null?void 0:e.value,this.removeAttribute("starting-data")}updateDOM(e){e?(this.recipeCta.classList.replace("primary","secondary"),this.recipeCta.classList.add("in-basket")):(this.recipeCta.classList.replace("secondary","primary"),this.recipeCta.classList.remove("in-basket"))}};n=u([p("mealz-recipe-card-cta")],n);customElements.get("mealz-recipe-card-cta")||customElements.define("mealz-recipe-card-cta",n);
@@ -1 +1 @@
1
- .mealz-recipe-pricing{max-width:70px}.mealz-recipe-pricing .mealz-recipe-pricing__wrapper .mealz-recipe-pricing__wrapper__subline{color:#1f354380;font-weight:500;line-height:100%}.mealz-recipe-pricing .hidden{display:none}.mealz-recipe-pricing .active{display:block}.mealz-recipe-pricing__loading{width:70px;height:24px;border-radius:.25rem;animation:skeleton-loading 1s linear infinite alternate}@keyframes skeleton-loading{0%{background-color:#c2cfd6}to{background-color:#f0f3f5}}
1
+ .mealz-recipe-pricing{line-height:100%;max-width:70px}.mealz-recipe-pricing .mealz-recipe-pricing__wrapper .mealz-recipe-pricing__wrapper__subline{color:#1f354380;font-weight:500;line-height:100%}.mealz-recipe-pricing .hidden{display:none}.mealz-recipe-pricing .active{display:block}.mealz-recipe-pricing__loading{width:70px;height:24px;border-radius:.25rem;animation:skeleton-loading 1s linear infinite alternate}@keyframes skeleton-loading{0%{background-color:#c2cfd6}to{background-color:#f0f3f5}}
@@ -1 +1 @@
1
- import{t as k}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-DxqnJI-a.js";import{N as A}from"../assets/no-shadow-element-D8CgOZBZ.js";import{a as D,i as P,o as h,c as v,O as l,e as S}from"../assets/OperatorSubscriber-Da2IK3Yo.js";import{S as j}from"../assets/Subject-CfKiwe_U.js";import{c as z,e as u,i as d,d as C,r as E,f as F,b as V,g as q,h as M,j as N,k as R,l as B,a as J}from"../assets/mapOneOrManyArgs-BZ6laeGM.js";var W=function(e){D(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(j);function b(e){return e[e.length-1]}function $(e){return P(b(e))?e.pop():void 0}function G(e){return z(b(e))?e.pop():void 0}function O(e,t){return t===void 0&&(t=0),h(function(n,r){n.subscribe(v(r,function(i){return u(r,e,function(){return r.next(i)},t)},function(){return u(r,e,function(){return r.complete()},t)},function(i){return u(r,e,function(){return r.error(i)},t)}))})}function w(e,t){return t===void 0&&(t=0),h(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function H(e,t){return d(e).pipe(w(t),O(t))}function K(e,t){return d(e).pipe(w(t),O(t))}function T(e,t){return new l(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function U(e,t){return new l(function(n){var r;return u(n,t,function(){r=e[C](),u(n,t,function(){var i,a,c;try{i=r.next(),a=i.value,c=i.done}catch(o){n.error(o);return}c?n.complete():n.next(a)},0,!0)}),function(){return P(r==null?void 0:r.return)&&r.return()}})}function _(e,t){if(!e)throw new Error("Iterable cannot be null");return new l(function(n){u(n,t,function(){var r=e[Symbol.asyncIterator]();u(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Q(e,t){return _(E(e),t)}function X(e,t){if(e!=null){if(F(e))return H(e,t);if(V(e))return T(e,t);if(q(e))return K(e,t);if(M(e))return _(e,t);if(N(e))return U(e,t);if(R(e))return Q(e,t)}throw B(e)}function I(e,t){return t?X(e,t):d(e)}var Y=Array.isArray,Z=Object.getPrototypeOf,ee=Object.prototype,te=Object.keys;function re(e){if(e.length===1){var t=e[0];if(Y(t))return{args:t,keys:null};if(ne(t)){var n=te(t);return{args:n.map(function(r){return t[r]}),keys:n}}}return{args:e,keys:null}}function ne(e){return e&&typeof e=="object"&&Z(e)===ee}function ie(e,t){return e.reduce(function(n,r,i){return n[r]=t[i],n},{})}function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=G(e),r=$(e),i=re(e),a=i.args,c=i.keys;if(a.length===0)return I([],n);var o=new l(ce(a,n,c?function(s){return ie(c,s)}:S));return r?o.pipe(J(r)):o}function ce(e,t,n){return n===void 0&&(n=S),function(r){y(t,function(){for(var i=e.length,a=new Array(i),c=i,o=i,s=function(m){y(t,function(){var x=I(e[m],t),g=!1;x.subscribe(v(r,function(L){a[m]=L,g||(g=!0,o--),o||r.next(n(a.slice()))},function(){--c||r.complete()}))},r)},p=0;p<i;p++)s(p)},r)}}function y(e,t,n){e?u(n,e,t):t()}function oe(e){return h(function(t,n){var r=!1,i=0;t.subscribe(v(n,function(a){return(r||(r=!e(a,i++)))&&n.next(a)}))})}var se=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,le=(e,t,n,r)=>{for(var i=r>1?void 0:r?ue(t,n):t,a=e.length-1,c;a>=0;a--)(c=e[a])&&(i=(r?c(t,n,i):c(i))||i);return r&&i&&se(t,n,i),i};let f=class extends A{constructor(){super(...arguments),this.formattedPrice="",this.rendered=new W(!1),this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.recipes.guestsUpdated().subscribe(e=>{e.recipeId===this.recipeId&&(this.serves=e.guests)}),ae([this.rendered,window.mealzInternal.basket.recipePricesInBasket$()]).pipe(oe(([e,t])=>!e||!t)).subscribe(([e,t])=>{this.recipePricingValue=t.find(r=>r.id===this.recipeId);const n=this.recipePricingValue?(this.recipePricingValue.price/this.serves).toString():this.pricePerServe;this.applyCurrencyDisplay(n),this.showPrice()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}fetchPrice(e,t,n){var c,o;let r=(c=this.recipePricing)==null?void 0:c.querySelector(".mealz-recipe-pricing__wrapper");const i=(o=this.attributes["starting-data"])==null?void 0:o.value;if(!i){r==null||r.classList.replace("active","hidden");return}const a=JSON.parse(i);this.removeAttribute("starting-data"),a.pricePerServe===null&&(r==null||r.classList.replace("active","hidden"),this.subscriptions.push(window.mealzInternal.recipes.fetchPricing(this.recipeId,e,t,n).subscribe(s=>{s!=null&&s.price_per_serve&&(r==null||r.classList.replace("hidden","active"),this.applyCurrencyDisplay(s.price_per_serve))})))}render(){this.recipePricing=this.querySelector(".mealz-recipe-pricing"),this.recipePricing&&(this.rendered.next(!0),this.getInitialStatus())}getInitialStatus(){var i;const e=(i=this.attributes["starting-data"])==null?void 0:i.value;if(!e)return;const{recipeId:t,pricePerServe:n,serves:r}=JSON.parse(e);this.recipeId=t,this.pricePerServe=(n==null?void 0:n.toString())??null,this.serves=r,this.applyCurrencyDisplay(this.pricePerServe)}applyCurrencyDisplay(e){let t=parseFloat(e);this.formattedPrice=t.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2}),this.updateDOM()}showPrice(){var n,r;let e=(n=this.recipePricing)==null?void 0:n.querySelector(".mealz-recipe-pricing__loading"),t=(r=this.recipePricing)==null?void 0:r.querySelector(".mealz-recipe-pricing__wrapper");e&&e.classList.contains("active")&&(e.classList.replace("active","hidden"),t.classList.replace("hidden","active"))}updateDOM(){var t;const e=(t=this.recipePricing)==null?void 0:t.querySelector(".mealz-recipe-pricing__wrapper__price");e&&(e.innerHTML=this.formattedPrice+" €")}};f=le([k("mealz-recipe-pricing")],f);customElements.get("mealz-recipe-pricing")||customElements.define("mealz-recipe-pricing",f);
1
+ import{t as k}from"../assets/custom-element-BhZVzxrc.js";import"../assets/lit-element-4gw3YGga.js";import{N as A}from"../assets/no-shadow-element-CaVIVF-o.js";import{a as D,i as P,o as h,c as v,O as l,p as S}from"../assets/OperatorSubscriber-BPZabEAm.js";import{S as j}from"../assets/Subject-CZHNlEkK.js";import{c as z,e as u,i as d,d as C,r as E,f as F,b as V,g as q,h as M,j as N,k as R,l as B,a as J}from"../assets/mapOneOrManyArgs-2FiDGdaS.js";var W=function(e){D(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(j);function b(e){return e[e.length-1]}function $(e){return P(b(e))?e.pop():void 0}function G(e){return z(b(e))?e.pop():void 0}function O(e,t){return t===void 0&&(t=0),h(function(n,r){n.subscribe(v(r,function(i){return u(r,e,function(){return r.next(i)},t)},function(){return u(r,e,function(){return r.complete()},t)},function(i){return u(r,e,function(){return r.error(i)},t)}))})}function w(e,t){return t===void 0&&(t=0),h(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function H(e,t){return d(e).pipe(w(t),O(t))}function K(e,t){return d(e).pipe(w(t),O(t))}function T(e,t){return new l(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function U(e,t){return new l(function(n){var r;return u(n,t,function(){r=e[C](),u(n,t,function(){var i,a,c;try{i=r.next(),a=i.value,c=i.done}catch(o){n.error(o);return}c?n.complete():n.next(a)},0,!0)}),function(){return P(r==null?void 0:r.return)&&r.return()}})}function _(e,t){if(!e)throw new Error("Iterable cannot be null");return new l(function(n){u(n,t,function(){var r=e[Symbol.asyncIterator]();u(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Q(e,t){return _(E(e),t)}function X(e,t){if(e!=null){if(F(e))return H(e,t);if(V(e))return T(e,t);if(q(e))return K(e,t);if(M(e))return _(e,t);if(N(e))return U(e,t);if(R(e))return Q(e,t)}throw B(e)}function I(e,t){return t?X(e,t):d(e)}var Y=Array.isArray,Z=Object.getPrototypeOf,ee=Object.prototype,te=Object.keys;function re(e){if(e.length===1){var t=e[0];if(Y(t))return{args:t,keys:null};if(ne(t)){var n=te(t);return{args:n.map(function(r){return t[r]}),keys:n}}}return{args:e,keys:null}}function ne(e){return e&&typeof e=="object"&&Z(e)===ee}function ie(e,t){return e.reduce(function(n,r,i){return n[r]=t[i],n},{})}function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=G(e),r=$(e),i=re(e),a=i.args,c=i.keys;if(a.length===0)return I([],n);var o=new l(ce(a,n,c?function(s){return ie(c,s)}:S));return r?o.pipe(J(r)):o}function ce(e,t,n){return n===void 0&&(n=S),function(r){y(t,function(){for(var i=e.length,a=new Array(i),c=i,o=i,s=function(m){y(t,function(){var x=I(e[m],t),g=!1;x.subscribe(v(r,function(L){a[m]=L,g||(g=!0,o--),o||r.next(n(a.slice()))},function(){--c||r.complete()}))},r)},p=0;p<i;p++)s(p)},r)}}function y(e,t,n){e?u(n,e,t):t()}function oe(e){return h(function(t,n){var r=!1,i=0;t.subscribe(v(n,function(a){return(r||(r=!e(a,i++)))&&n.next(a)}))})}var se=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,le=(e,t,n,r)=>{for(var i=r>1?void 0:r?ue(t,n):t,a=e.length-1,c;a>=0;a--)(c=e[a])&&(i=(r?c(t,n,i):c(i))||i);return r&&i&&se(t,n,i),i};let f=class extends A{constructor(){super(...arguments),this.formattedPrice="",this.rendered=new W(!1),this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.recipes.guestsUpdated().subscribe(e=>{e.recipeId===this.recipeId&&(this.serves=e.guests)}),ae([this.rendered,window.mealzInternal.basket.recipePricesInBasket$()]).pipe(oe(([e,t])=>!e||!t)).subscribe(([e,t])=>{this.recipePricingValue=t.find(r=>r.id===this.recipeId);const n=this.recipePricingValue?(this.recipePricingValue.price/this.serves).toString():this.pricePerServe;this.applyCurrencyDisplay(n),this.showPrice()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}fetchPrice(e,t,n){var c,o;let r=(c=this.recipePricing)==null?void 0:c.querySelector(".mealz-recipe-pricing__wrapper");const i=(o=this.attributes["starting-data"])==null?void 0:o.value;if(!i){r==null||r.classList.replace("active","hidden");return}const a=JSON.parse(i);this.removeAttribute("starting-data"),a.pricePerServe===null&&(r==null||r.classList.replace("active","hidden"),this.subscriptions.push(window.mealzInternal.recipes.fetchPricing(this.recipeId,e,t,n).subscribe(s=>{s!=null&&s.price_per_serve&&(r==null||r.classList.replace("hidden","active"),this.applyCurrencyDisplay(s.price_per_serve))})))}render(){this.recipePricing=this.querySelector(".mealz-recipe-pricing"),this.recipePricing&&(this.rendered.next(!0),this.getInitialStatus())}getInitialStatus(){var i;const e=(i=this.attributes["starting-data"])==null?void 0:i.value;if(!e)return;const{recipeId:t,pricePerServe:n,serves:r}=JSON.parse(e);this.recipeId=t,this.pricePerServe=(n==null?void 0:n.toString())??null,this.serves=r,this.applyCurrencyDisplay(this.pricePerServe)}applyCurrencyDisplay(e){let t=parseFloat(e);this.formattedPrice=t.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2}),this.updateDOM()}showPrice(){var n,r;let e=(n=this.recipePricing)==null?void 0:n.querySelector(".mealz-recipe-pricing__loading"),t=(r=this.recipePricing)==null?void 0:r.querySelector(".mealz-recipe-pricing__wrapper");e&&e.classList.contains("active")&&(e.classList.replace("active","hidden"),t.classList.replace("hidden","active"))}updateDOM(){var t;const e=(t=this.recipePricing)==null?void 0:t.querySelector(".mealz-recipe-pricing__wrapper__price");e&&(e.innerHTML=this.formattedPrice+" €")}};f=le([k("mealz-recipe-pricing")],f);customElements.get("mealz-recipe-pricing")||customElements.define("mealz-recipe-pricing",f);
@@ -0,0 +1 @@
1
+ .mealz-recipe-promotion-badge{display:flex;padding:4px 12px;border-radius:999px;color:var(--miam-ds-color-neutral-white, #fff);background-color:#e02d2d;gap:8px}.mealz-recipe-promotion-badge .mealz-recipe-promotion-badge__icon{width:24px;height:24px}
@@ -1,4 +1,4 @@
1
- import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";import{t as f}from"../assets/custom-element-BhZVzxrc.js";/**
1
+ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";import{t as b}from"../assets/custom-element-BhZVzxrc.js";/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -14,7 +14,7 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */function y(t,e){return(s,i,o)=>{const a=r=>{var p;return((p=r.renderRoot)==null?void 0:p.querySelector(t))??null};return w(s,i,{get(){return a(this)}})}}class S{get extId(){return this.attributes["ext-id"]}}var L=Object.defineProperty,C=Object.getOwnPropertyDescriptor,d=(t,e,s,i)=>{for(var o=i>1?void 0:i?C(e,s):e,a=t.length-1,r;a>=0;a--)(r=t[a])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&L(e,s,o),o};let l=class extends b{constructor(){var t,e,s,i,o,a;super(...arguments),this.selectedRadius=50,this.getByAddress=(e=(t=window.mealz)==null?void 0:t.pos)==null?void 0:e.getByAddress,this.getByCoordinates=(i=(s=window.mealz)==null?void 0:s.pos)==null?void 0:i.getByCoordinates,this.getAffiliateSuppliers=(a=(o=window.mealz)==null?void 0:o.supplier)==null?void 0:a.getAffiliateSuppliers,this._posList=[],this._markers=[],this._searchingPos=!1,this._searchSubmitted=!1,this._previousSearchMethod=()=>{},this._suppliers=[],this._selectedSuppliers=[],this._showPosList=!1,this._posSelected=!1,this.subscriptions=[]}set geolocationCoordinates(t){var e,s;this._geolocationCoordinates=t,(e=t==null?void 0:t.coords)!=null&&e.latitude&&((s=t==null?void 0:t.coords)!=null&&s.longitude)&&this.setGeolocation()}get geolocationCoordinates(){return this._geolocationCoordinates}_nameOfStore(t){return`${t.supplier.attributes.name} - ${t.attributes.name}`}connectedCallback(){super.connectedCallback(),this.initLeaflet(),this.fetchSuppliers()}disconnectedCallback(){this.subscriptions.forEach(t=>t.unsubscribe()),super.disconnectedCallback(),this._leafletCss.remove(),this._miamDs.remove(),this._leafletJs.remove()}render(){if(this.show)return this.posSelectionTemplate()}firstUpdated(){this._posSelected=!1,this.loadMap(),this.geolocationTimeout(),this.listenFormSubmit()}posSelectionTemplate(){return n`
17
+ */function y(t,e){return(s,i,o)=>{const a=r=>{var p;return((p=r.renderRoot)==null?void 0:p.querySelector(t))??null};return w(s,i,{get(){return a(this)}})}}class S{get extId(){return this.attributes["ext-id"]}}var C=Object.defineProperty,L=Object.getOwnPropertyDescriptor,d=(t,e,s,i)=>{for(var o=i>1?void 0:i?L(e,s):e,a=t.length-1,r;a>=0;a--)(r=t[a])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&C(e,s,o),o};let l=class extends f{constructor(){var t,e,s,i,o,a;super(...arguments),this.selectedRadius=50,this.getByAddress=(e=(t=window.mealz)==null?void 0:t.pos)==null?void 0:e.getByAddress,this.getByCoordinates=(i=(s=window.mealz)==null?void 0:s.pos)==null?void 0:i.getByCoordinates,this.getAffiliateSuppliers=(a=(o=window.mealz)==null?void 0:o.supplier)==null?void 0:a.getAffiliateSuppliers,this._posList=[],this._markers=[],this._searchingPos=!1,this._searchSubmitted=!1,this._previousSearchMethod=()=>{},this._suppliers=[],this._selectedSuppliers=[],this._showPosList=!1,this._posSelected=!1,this.subscriptions=[]}set geolocationCoordinates(t){var e,s;this._geolocationCoordinates=t,(e=t==null?void 0:t.coords)!=null&&e.latitude&&((s=t==null?void 0:t.coords)!=null&&s.longitude)&&this.setGeolocation()}get geolocationCoordinates(){return this._geolocationCoordinates}_nameOfStore(t){return`${t.supplier.attributes.name} - ${t.attributes.name}`}connectedCallback(){super.connectedCallback(),this.initLeaflet(),this.fetchSuppliers(),this.initEvents()}disconnectedCallback(){this.subscriptions.forEach(t=>t.unsubscribe()),super.disconnectedCallback(),this._leafletCss.remove(),this._miamDs.remove(),this._leafletJs.remove()}render(){if(this.show)return this.posSelectionTemplate()}firstUpdated(){this._posSelected=!1,this.loadMap(),this.geolocationTimeout(),this.listenFormSubmit()}posSelectionTemplate(){return n`
18
18
  <div class="wrapper miam-ds-body">
19
19
  <div class="pos-selection">
20
20
  <div class="title">
@@ -32,7 +32,8 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
32
32
  </form>
33
33
  ${this.posListTemplate()}
34
34
  ${this._posList.length>0?n`
35
- <div id="mobile-buttons-wrapper" class="${this._showPosList?"mobile-buttons-wrapper__see-map":"mobile-buttons-wrapper__see-list"}">
35
+ <div id="mobile-buttons-wrapper"
36
+ class="${this._showPosList?"mobile-buttons-wrapper__see-map":"mobile-buttons-wrapper__see-list"}">
36
37
  <button @click=${()=>this.togglePosList(this._showPosList)}
37
38
  class="miam-ds-button primary hide-pos-button">
38
39
  ${this.getButtonLabel()}
@@ -61,7 +62,7 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
61
62
  ${t.name}
62
63
  </option>`)}
63
64
  </select>
64
- </div>`}supplierSelected(t){t.target.value?this._selectedSuppliers[0]=t.target.value:this._selectedSuppliers=[],this._previousSearchMethod(!0)}posListTemplate(){if(this._searchingPos)return n`
65
+ </div>`}supplierSelected(t){t.target.value?this._selectedSuppliers[0]=t.target.value:this._selectedSuppliers=[];const e=this._suppliers.find(s=>s.id===t.target.value);e?this._filterEvent.detail.supplierName=e.name:this._filterEvent.detail.supplierName="",this.dispatchEvent(this._filterEvent),this._previousSearchMethod(!0)}posListTemplate(){if(this._searchingPos)return n`
65
66
  <div class="pos-loader">
66
67
  <div class="miam-ds-loader"></div>
67
68
  </div>
@@ -84,14 +85,15 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
84
85
  <div class="bottom">
85
86
  <button @click=${()=>this.dispatchPos(e)}
86
87
  class="miam-ds-button primary select-pos-button"
87
- ?disabled= ${this._posSelected}>
88
- ${this._posSelected?n`<div class="miam-ds-loader"></div>`:"Sélectionner"}
88
+ ?disabled=${this._posSelected}>
89
+ ${this._posSelected?n`
90
+ <div class="miam-ds-loader"></div>`:"Sélectionner"}
89
91
  </button>
90
92
  </div>
91
93
  </div>
92
94
  `)}
93
95
  </div>
94
- `}getButtonLabel(){if(this._showPosList)return"Voir la carte";const t=this._posList.length;return t===1?"Voir le magasin":`Voir les ${t} magasins`}setAddress(t=!1){!this._addressInput.value||this._addressInput.value.length<3||this._searchingPos||!t&&this._prevAddress===this._addressInput.value+", France"||(this.shadowRoot.getElementById("pos-list"),this._previousSearchMethod=this.setAddress,this._prevAddress=this._addressInput.value+", France",this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByAddress(this._prevAddress,this.selectedRadius,this._selectedSuppliers).subscribe(e=>{this.setPosList(e),this.setNewLocation(),this.dispatchSearch(this._prevAddress,e.data.length),this._searchingPos=!1,this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()})))}setGeolocation(t=!1){this._prevAddress="",this._previousSearchMethod=this.setGeolocation,this.getPosByCoordinates()}getPosByCoordinates(){this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByCoordinates(this.geolocationCoordinates.coords.latitude,this.geolocationCoordinates.coords.longitude,this.selectedRadius,this._selectedSuppliers).subscribe(t=>{this._addressInput.value="",this.setPosList(t),this._searchingPos=!1,this.setNewLocation(),this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()}))}setPosList(t){this._posList=t.data.map(e=>{const s=Object.assign(new S,e);return s.supplier=t.included.find(i=>i.id===s.relationships.supplier.data.id),s}).sort((e,s)=>e.attributes.name.includes("onoprix")?-1:s.attributes.name.includes("onoprix")?1:0)}dispatchPos(t){this._posSelected=!0,this.requestUpdate();const e={detail:{posId:t.id,posExtId:t.extId,supplierId:t.supplier.id,supplierName:t.supplier.attributes.name,posName:this._nameOfStore(t)},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("posIdChange",e))}dispatchShow(t){const e={detail:{show:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("showChange",e))}dispatchSearch(t,e){const s={detail:{searchTerm:t,storesFoundCount:e},bubbles:!0,composed:!0};console.debug("[MealzComponents] dispatchEvent searchChange",s),this.dispatchEvent(new CustomEvent("searchChange",s))}initLeaflet(){this._leafletCss=document.createElement("link"),this._leafletCss.setAttribute("rel","stylesheet"),this._leafletCss.setAttribute("href","https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),this._leafletCss.setAttribute("integrity","sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="),this._leafletCss.setAttribute("crossorigin",""),this._leafletJs=document.createElement("script"),this._leafletJs.setAttribute("src","https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"),this._leafletJs.setAttribute("integrity","sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="),this._leafletJs.setAttribute("crossorigin",""),this._miamDs=document.createElement("link"),this._miamDs.setAttribute("rel","stylesheet"),this._miamDs.setAttribute("href","https://unpkg.com/miam-ds@1.2.4/miam-ds.min.css"),this.shadowRoot.appendChild(this._miamDs),this.shadowRoot.appendChild(this._leafletCss),document.head.appendChild(this._leafletJs)}waitForLeaflet(t){let i=50;console.debug("[Map] Checking for window.L");const o=setInterval(()=>{window.L!==void 0||i===0?(clearInterval(o),window.L!==void 0?(console.debug("[Map] window.L is defined"),t(!0)):(console.error("[Map] Failed to load Leaflet after",50*100,"ms"),t(!1))):i--},100)}initMap(){this._map&&(this._map.off(),this._map.remove()),this.setNewLocation(),window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",{maxZoom:19,attribution:"Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."}).addTo(this._map)}loadMap(){this.waitForLeaflet(t=>{t&&this.initMap()})}fetchSuppliers(){this.subscriptions.push(this.getAffiliateSuppliers().subscribe(t=>{this._suppliers=t.map(e=>({id:e.id,name:e.attributes.name})),this.requestUpdate()}))}setNewLocation(){var e;const t=this.shadowRoot.getElementById("map");t&&(this._map?(this._markers.forEach(s=>{this._map.removeLayer(s)}),this._markers=[],this._map.panTo(this.getCoordinates())):this._map=(e=window.L)==null?void 0:e.map(t).setView(this.getCoordinates(),13),this.addMarkers())}getCoordinates(){return this._posList.length<1?[48.866667,2.333333]:[this._posList[0].attributes.latitude,this._posList[0].attributes.longitude]}addMarkers(){this._posList.length>0&&this._posList.forEach((t,e)=>{this._markers.push(window.L.marker([t.attributes.latitude,t.attributes.longitude],{icon:this.buildIcon(t.supplier)}).addTo(this._map));let s=window.L.popup({content:`
96
+ `}getButtonLabel(){if(this._showPosList)return"Voir la carte";const t=this._posList.length;return t===1?"Voir le magasin":`Voir les ${t} magasins`}setAddress(t=!1){!this._addressInput.value||this._addressInput.value.length<3||this._searchingPos||!t&&this._prevAddress===this._addressInput.value+", France"||(this.shadowRoot.getElementById("pos-list"),this._previousSearchMethod=this.setAddress,this._prevAddress=this._addressInput.value+", France",this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByAddress(this._prevAddress,this.selectedRadius,this._selectedSuppliers).subscribe(e=>{this.setPosList(e),this.setNewLocation(),this.dispatchSearch(this._prevAddress,e.data.length),this._searchingPos=!1,this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()})))}setGeolocation(t=!1){this._prevAddress="",this._previousSearchMethod=this.setGeolocation,this.getPosByCoordinates()}getPosByCoordinates(){this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByCoordinates(this.geolocationCoordinates.coords.latitude,this.geolocationCoordinates.coords.longitude,this.selectedRadius,this._selectedSuppliers).subscribe(t=>{this._addressInput.value="",this.setPosList(t),this._searchingPos=!1,this.setNewLocation(),this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()}))}setPosList(t){this._posList=t.data.map(e=>{const s=Object.assign(new S,e);return s.supplier=t.included.find(i=>i.id===s.relationships.supplier.data.id),s}).sort((e,s)=>e.attributes.name.includes("onoprix")?-1:s.attributes.name.includes("onoprix")?1:0)}dispatchPos(t){this._posSelected=!0,this.requestUpdate();const e={detail:{posId:t.id,posExtId:t.extId,supplierId:t.supplier.id,supplierName:t.supplier.attributes.name,posName:this._nameOfStore(t)},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("posIdChange",e))}dispatchShow(t){const e={detail:{show:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("showChange",e))}dispatchSearch(t,e){const s={detail:{searchTerm:t,storesFoundCount:e},bubbles:!0,composed:!0};console.debug("[MealzComponents] dispatchEvent searchChange",s),this.dispatchEvent(new CustomEvent("searchChange",s))}initLeaflet(){this._leafletCss=document.createElement("link"),this._leafletCss.setAttribute("rel","stylesheet"),this._leafletCss.setAttribute("href","https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),this._leafletCss.setAttribute("integrity","sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="),this._leafletCss.setAttribute("crossorigin",""),this._leafletJs=document.createElement("script"),this._leafletJs.setAttribute("src","https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"),this._leafletJs.setAttribute("integrity","sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="),this._leafletJs.setAttribute("crossorigin",""),this._miamDs=document.createElement("link"),this._miamDs.setAttribute("rel","stylesheet"),this._miamDs.setAttribute("href","https://unpkg.com/miam-ds@1.2.4/miam-ds.min.css"),this.shadowRoot.appendChild(this._miamDs),this.shadowRoot.appendChild(this._leafletCss),document.head.appendChild(this._leafletJs)}waitForLeaflet(t){let i=50;console.debug("[Map] Checking for window.L");const o=setInterval(()=>{window.L!==void 0||i===0?(clearInterval(o),window.L!==void 0?(console.debug("[Map] window.L is defined"),t(!0)):(console.error("[Map] Failed to load Leaflet after",50*100,"ms"),t(!1))):i--},100)}initMap(){this._map&&(this._map.off(),this._map.remove()),this.setNewLocation(),window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",{maxZoom:19,attribution:"Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."}).addTo(this._map)}loadMap(){this.waitForLeaflet(t=>{t&&this.initMap()})}initEvents(){this._filterEvent=new CustomEvent("filterChange",{detail:{supplierName:""},bubbles:!0,composed:!0})}fetchSuppliers(){this.subscriptions.push(this.getAffiliateSuppliers().subscribe(t=>{this._suppliers=t.map(e=>({id:e.id,name:e.attributes.name})),this.requestUpdate()}))}setNewLocation(){var e;const t=this.shadowRoot.getElementById("map");t&&(this._map?(this._markers.forEach(s=>{this._map.removeLayer(s)}),this._markers=[],this._map.panTo(this.getCoordinates())):this._map=(e=window.L)==null?void 0:e.map(t).setView(this.getCoordinates(),13),this.addMarkers())}getCoordinates(){return this._posList.length<1?[48.866667,2.333333]:[this._posList[0].attributes.latitude,this._posList[0].attributes.longitude]}addMarkers(){this._posList.length>0&&this._posList.forEach((t,e)=>{this._markers.push(window.L.marker([t.attributes.latitude,t.attributes.longitude],{icon:this.buildIcon(t.supplier)}).addTo(this._map));let s=window.L.popup({content:`
95
97
  <div class="pos-item">
96
98
  <div class="top">
97
99
  <img class="pos-img" src="${t.supplier.attributes.logo}" alt="${t.supplier.attributes.name}"/>
@@ -104,7 +106,7 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
104
106
  <button id="select" class="miam-ds-button primary select-pos-button">Sélectionner</button>
105
107
  </div>
106
108
  </div>
107
- `});this._markers[e].bindPopup(s).on("popupopen",i=>{i.target.getPopup().getElement().querySelector("#select").addEventListener("click",()=>{this.dispatchPos(t)})})})}buildIcon(t){return window.L.icon({iconUrl:t.attributes.logo||"https://cdn-icons-png.flaticon.com/512/3515/3515146.png",shadowUrl:"https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",iconSize:[32,32],shadowSize:[44,53],iconAnchor:[16,45],shadowAnchor:[22,45],popupAnchor:[0,-55]})}togglePosList(t){this._showPosList=!t;const e=this.shadowRoot.getElementById("pos-list");e&&(t?e.style.display="none":e.style.display="flex",this.requestUpdate())}geolocationTimeout(){setTimeout(()=>{this.geolocationCoordinates===void 0&&(this.geolocationCoordinates={})},2e4)}listenFormSubmit(){this.shadowRoot.getElementById("store-locator-form").addEventListener("submit",e=>{e.preventDefault(),this.setAddress()})}};l.styles=[g`
109
+ `});this._markers[e].bindPopup(s).on("popupopen",i=>{i.target.getPopup().getElement().querySelector("#select").addEventListener("click",()=>{this.dispatchPos(t)})})})}buildIcon(t){return window.L.icon({iconUrl:t.attributes.logo||"https://cdn-icons-png.flaticon.com/512/3515/3515146.png",shadowUrl:"https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",iconSize:[32,32],shadowSize:[44,53],iconAnchor:[16,45],shadowAnchor:[22,45],popupAnchor:[0,-55]})}togglePosList(t){this._showPosList=!t;const e=this.shadowRoot.getElementById("pos-list"),s={bubbles:!0,composed:!0};e&&(t?(e.style.display="none",this.dispatchEvent(new CustomEvent("mapSelected",s))):(e.style.display="flex",this.dispatchEvent(new CustomEvent("listSelected",s))),this.requestUpdate())}geolocationTimeout(){setTimeout(()=>{this.geolocationCoordinates===void 0&&(this.geolocationCoordinates={})},2e4)}listenFormSubmit(){this.shadowRoot.getElementById("store-locator-form").addEventListener("submit",e=>{e.preventDefault(),this.setAddress()})}};l.styles=[g`
108
110
  :host {
109
111
  display: block;
110
112
  height: 100%;
@@ -411,4 +413,4 @@ import{u,f as m,i as g,h as b,k as n}from"../assets/lit-element-DxqnJI-a.js";imp
411
413
  top: 0;
412
414
  }
413
415
  }
414
- `];d([c({type:Boolean})],l.prototype,"show",2);d([c({type:Number})],l.prototype,"selectedRadius",2);d([c({type:GeolocationPosition})],l.prototype,"geolocationCoordinates",1);d([c()],l.prototype,"getByAddress",2);d([c()],l.prototype,"getByCoordinates",2);d([c()],l.prototype,"getAffiliateSuppliers",2);d([v()],l.prototype,"_geolocationCoordinates",2);d([y("input")],l.prototype,"_addressInput",2);l=d([f("mealz-store-locator")],l);customElements.get("mealz-store-locator")||customElements.define("mealz-store-locator",l);
416
+ `];d([c({type:Boolean})],l.prototype,"show",2);d([c({type:Number})],l.prototype,"selectedRadius",2);d([c({type:GeolocationPosition})],l.prototype,"geolocationCoordinates",1);d([c()],l.prototype,"getByAddress",2);d([c()],l.prototype,"getByCoordinates",2);d([c()],l.prototype,"getAffiliateSuppliers",2);d([v()],l.prototype,"_geolocationCoordinates",2);d([y("input")],l.prototype,"_addressInput",2);l=d([b("mealz-store-locator")],l);customElements.get("mealz-store-locator")||customElements.define("mealz-store-locator",l);
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "mealz-components",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "main": "./dist/mealz-components.js",
6
6
  "module": "./dist/mealz-components.js",
7
+ "scripts": {
8
+ "build": "vite build",
9
+ "build:watch": "vite build --watch",
10
+ "lint": "eslint"
11
+ },
7
12
  "exports": {
8
13
  ".": {
9
14
  "import": "./dist/mealz-components.js",
@@ -28,8 +33,13 @@
28
33
  "rxjs": "^7.8.1"
29
34
  },
30
35
  "devDependencies": {
31
- "@types/node": "^20.11.30",
32
- "typescript": "^5.4.2",
33
- "vite": "^5.1.6"
36
+ "@types/node": "^22.10.2",
37
+ "@typescript-eslint/eslint-plugin": "^8.18.1",
38
+ "@typescript-eslint/parser": "^8.18.1",
39
+ "eslint": "^9.17.0",
40
+ "eslint-config-prettier": "^9.1.0",
41
+ "eslint-plugin-jsdoc": "^50.6.1",
42
+ "typescript": "^5.7.2",
43
+ "vite": "^6.0.5"
34
44
  }
35
45
  }
@@ -1 +0,0 @@
1
- import{a as h,S as o,b as a,_ as d,d as f}from"./OperatorSubscriber-Da2IK3Yo.js";var v={now:function(){return Date.now()},delegate:void 0},p=function(n){h(i,n);function i(e,t){return n.call(this)||this}return i.prototype.schedule=function(e,t){return this},i}(o),c={setInterval:function(n,i){for(var e=[],t=2;t<arguments.length;t++)e[t-2]=arguments[t];return setInterval.apply(void 0,a([n,i],d(e)))},clearInterval:function(n){var i=c.delegate;return((i==null?void 0:i.clearInterval)||clearInterval)(n)},delegate:void 0},y=function(n){h(i,n);function i(e,t){var r=n.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}return i.prototype.schedule=function(e,t){var r;if(t===void 0&&(t=0),this.closed)return this;this.state=e;var s=this.id,u=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(u,s,t)),this.pending=!0,this.delay=t,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(u,this.id,t),this},i.prototype.requestAsyncId=function(e,t,r){return r===void 0&&(r=0),c.setInterval(e.flush.bind(e,this),r)},i.prototype.recycleAsyncId=function(e,t,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return t;t!=null&&c.clearInterval(t)},i.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype._execute=function(e,t){var r=!1,s;try{this.work(e)}catch(u){r=!0,s=u||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},i.prototype.unsubscribe=function(){if(!this.closed){var e=this,t=e.id,r=e.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,f(s,this),t!=null&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},i}(p),l=function(){function n(i,e){e===void 0&&(e=n.now),this.schedulerActionCtor=i,this.now=e}return n.prototype.schedule=function(i,e,t){return e===void 0&&(e=0),new this.schedulerActionCtor(this,i).schedule(t,e)},n.now=v.now,n}(),A=function(n){h(i,n);function i(e,t){t===void 0&&(t=l.now);var r=n.call(this,e,t)||this;return r.actions=[],r._active=!1,r}return i.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}},i}(l),g=new A(y),b=g;export{b as a,g as b};
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const T=globalThis,I=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),V=new WeakMap;let tt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==B)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(I&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=V.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&V.set(e,t))}return t}toString(){return this.cssText}};const ot=n=>new tt(typeof n=="string"?n:n+"",void 0,B),Pt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,o)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[o+1],n[0]);return new tt(e,n,B)},ht=(n,t)=>{if(I)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=T.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)}},W=I?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ot(e)})(n):n;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:at,defineProperty:lt,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:pt,getPrototypeOf:ut}=Object,f=globalThis,q=f.trustedTypes,$t=q?q.emptyScript:"",M=f.reactiveElementPolyfillSupport,b=(n,t)=>n,j={toAttribute(n,t){switch(t){case Boolean:n=n?$t:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},et=(n,t)=>!at(n,t),K={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:et};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&lt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=ct(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return i==null?void 0:i.call(this)},set(r){const l=i==null?void 0:i.call(this);o.call(this,r),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??K}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=ut(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,s=[...dt(e),...pt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(W(i))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ht(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:j).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const r=s.getPropertyOptions(i),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((o=r.converter)==null?void 0:o.fromAttribute)!==void 0?r.converter:j;this._$Em=i,this[i]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??et)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,r]of i)r.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,M==null||M({ReactiveElement:y}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.0.4");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const w=globalThis,N=w.trustedTypes,Z=N?N.createPolicy("lit-html",{createHTML:n=>n}):void 0,st="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+_,_t=`<${it}>`,g=document,P=()=>g.createComment(""),C=n=>n===null||typeof n!="object"&&typeof n!="function",D=Array.isArray,ft=n=>D(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",k=`[
14
- \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,J=/>/g,A=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,nt=/^(?:script|style|textarea|title)$/i,At=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),Ct=At(1),v=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Y=new WeakMap,m=g.createTreeWalker(g,129);function rt(n,t){if(!D(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Z!==void 0?Z.createHTML(t):t}const mt=(n,t)=>{const e=n.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",r=S;for(let l=0;l<e;l++){const h=n[l];let c,p,a=-1,u=0;for(;u<h.length&&(r.lastIndex=u,p=r.exec(h),p!==null);)u=r.lastIndex,r===S?p[1]==="!--"?r=F:p[1]!==void 0?r=J:p[2]!==void 0?(nt.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=A):p[3]!==void 0&&(r=A):r===A?p[0]===">"?(r=i??S,a=-1):p[1]===void 0?a=-2:(a=r.lastIndex-p[2].length,c=p[1],r=p[3]===void 0?A:p[3]==='"'?Q:G):r===Q||r===G?r=A:r===F||r===J?r=S:(r=A,i=void 0);const $=r===A&&n[l+1].startsWith("/>")?" ":"";o+=r===S?h+_t:a>=0?(s.push(c),h.slice(0,a)+st+h.slice(a)+_+$):h+_+(a===-2?l:$)}return[rt(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const l=t.length-1,h=this.parts,[c,p]=mt(t,e);if(this.el=U.createElement(c,s),m.currentNode=this.el.content,e===2||e===3){const a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(i=m.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const a of i.getAttributeNames())if(a.endsWith(st)){const u=p[r++],$=i.getAttribute(a).split(_),O=/([.?@])?(.*)/.exec(u);h.push({type:1,index:o,name:O[2],strings:$,ctor:O[1]==="."?yt:O[1]==="?"?vt:O[1]==="@"?Et:R}),i.removeAttribute(a)}else a.startsWith(_)&&(h.push({type:6,index:o}),i.removeAttribute(a));if(nt.test(i.tagName)){const a=i.textContent.split(_),u=a.length-1;if(u>0){i.textContent=N?N.emptyScript:"";for(let $=0;$<u;$++)i.append(a[$],P()),m.nextNode(),h.push({type:2,index:++o});i.append(a[u],P())}}}else if(i.nodeType===8)if(i.data===it)h.push({type:2,index:o});else{let a=-1;for(;(a=i.data.indexOf(_,a+1))!==-1;)h.push({type:7,index:o}),a+=_.length-1}o++}}static createElement(t,e){const s=g.createElement("template");return s.innerHTML=t,s}}function E(n,t,e=n,s){var r,l;if(t===v)return t;let i=s!==void 0?(r=e.o)==null?void 0:r[s]:e.l;const o=C(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,s)),s!==void 0?(e.o??(e.o=[]))[s]=i:e.l=i),i!==void 0&&(t=E(n,i._$AS(n,t.values),i,s)),t}class gt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??g).importNode(e,!0);m.currentNode=i;let o=m.nextNode(),r=0,l=0,h=s[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new x(o,o.nextSibling,this,t):h.type===1?c=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(c=new St(o,this,t)),this._$AV.push(c),h=s[++l]}r!==(h==null?void 0:h.index)&&(o=m.nextNode(),r++)}return m.currentNode=g,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),C(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&C(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(rt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const r=new gt(i,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=Y.get(t.strings);return e===void 0&&Y.set(t.strings,e=new U(t)),e}k(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(P()),this.O(P()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(o===void 0)t=E(this,t,e,0),r=!C(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{const l=t;let h,c;for(t=o[0],h=0;h<o.length-1;h++)c=E(this,l[s+h],e,h),c===v&&(c=this._$AH[h]),r||(r=!C(c)||c!==this._$AH[h]),c===d?t=d:t!==d&&(t+=(c??"")+o[h+1]),this._$AH[h]=c}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class vt extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Et extends R{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??d)===v)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const z=w.litHtmlPolyfillSupport;z==null||z(U,x),(w.litHtmlVersions??(w.litHtmlVersions=[])).push("3.2.0");const bt=(n,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(P(),o),o,void 0,e??{})}return i._$AI(n),i};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */class H extends y{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return v}}var X;H._$litElement$=!0,H.finalized=!0,(X=globalThis.litElementHydrateSupport)==null||X.call(globalThis,{LitElement:H});const L=globalThis.litElementPolyfillSupport;L==null||L({LitElement:H});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");export{et as f,H as h,Pt as i,Ct as k,j as u};
@@ -1 +0,0 @@
1
- import{h as e}from"./lit-element-DxqnJI-a.js";class r extends e{createRenderRoot(){return this}}export{r as N};