mealz-components 2.0.0-beta.7 → 2.0.0-beta.9

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 (110) hide show
  1. package/dist/add-to-cart-cta/add-to-cart-cta.min.js +1 -1
  2. package/dist/assets/OperatorSubscriber-z_a6lCKk.js +1 -0
  3. package/dist/assets/async-H-Co76Oa.js +1 -0
  4. package/dist/assets/{combineLatest-P4GAEtOW.js → combineLatest-DNi66MsF.js} +1 -1
  5. package/dist/assets/{debounceTime-Bo5F3ux-.js → debounceTime-CIA2MWDj.js} +1 -1
  6. package/dist/assets/delay-0L99jHsb.js +1 -0
  7. package/dist/assets/distinctUntilChanged-Ckq1Syk_.js +1 -0
  8. package/dist/assets/empty-DGYYDWIm.js +1 -0
  9. package/dist/assets/executeSchedule-CTqB8mra.js +1 -0
  10. package/dist/assets/{filter-CEeE8t7I.js → filter-DuHsB8oM.js} +1 -1
  11. package/dist/assets/{from-jBe2xW5a.js → from-Btz8AgkO.js} +1 -1
  12. package/dist/assets/http-BGziD2u2.js +1 -0
  13. package/dist/assets/{innerFrom-CfKCbnvr.js → innerFrom-CVMPVEmB.js} +1 -1
  14. package/dist/assets/{map-C4rf5Jbc.js → map-oxUcVNGT.js} +1 -1
  15. package/dist/assets/mapOneOrManyArgs-Do0PsDok.js +1 -0
  16. package/dist/assets/mealz-sdk-DWLzEfKz.js +1 -0
  17. package/dist/assets/merge-BlKu2J03.js +1 -0
  18. package/dist/assets/mergeAll-DQItozZ-.js +1 -0
  19. package/dist/assets/mergeMap-CMaM5Agw.js +1 -0
  20. package/dist/assets/no-shadow-element-DlGA0h9b.js +21 -0
  21. package/dist/assets/{of-BTA69Qgj.js → of-CH-D5SN9.js} +1 -1
  22. package/dist/assets/price-DcNF55ef.js +1 -0
  23. package/dist/assets/{product-card-DqcKyf1c.js → product-card-Be_9YL6f.js} +1 -1
  24. package/dist/assets/{promotion-badge-BwN2GpDz.js → promotion-badge-2uUuiRau.js} +1 -1
  25. package/dist/assets/{property-leIVgCvV.js → property-Bg80vXcm.js} +1 -1
  26. package/dist/assets/session-handler-BiuedJFx.js +1 -0
  27. package/dist/assets/{skipWhile-DuMEda_n.js → skipWhile-BAgfjfH2.js} +1 -1
  28. package/dist/assets/{state-CccUMzBZ.js → state-bsKs-Mb2.js} +1 -1
  29. package/dist/assets/{store-locator-Crx8huGH.js → store-locator-CKwiyckb.js} +1 -1
  30. package/dist/assets/{switchMap-D8q0hRYH.js → switchMap-vA0vSKy4.js} +1 -1
  31. package/dist/assets/{take-DO4w5a1Y.js → take-BmqRVy-3.js} +1 -1
  32. package/dist/assets/tap-C4xC1M3N.js +1 -0
  33. package/dist/assets/{timer-BOl4bYNY.js → timer-DmQ_oP6s.js} +1 -1
  34. package/dist/assets/{unsafe-html-CmALAWuN.js → unsafe-html-MRC87lfr.js} +1 -1
  35. package/dist/assets/{viewport-listener-RTCBatPv.js → viewport-listener-BuonFDBs.js} +1 -1
  36. package/dist/basket-transfer-modal/basket-transfer-modal.min.js +1 -1
  37. package/dist/catalog/basket-preview/basket-preview.min.js +3 -3
  38. package/dist/catalog/catalog-category/catalog-category.min.js +1 -1
  39. package/dist/catalog/catalog-favorites/catalog-favorites.min.js +1 -1
  40. package/dist/catalog/catalog-history/catalog-history.min.js +1 -1
  41. package/dist/catalog/catalog-home/catalog-home.min.js +1 -1
  42. package/dist/catalog/catalog-list/catalog-list.min.js +1 -1
  43. package/dist/catalog/catalog-load-more.min.js +1 -1
  44. package/dist/catalog/catalog-tabs/catalog-tabs.min.js +1 -1
  45. package/dist/catalog/catalog-toolbar/catalog-toolbar.min.js +1 -1
  46. package/dist/catalog/my-meals-button/my-meals-button.min.js +1 -1
  47. package/dist/counter/counter.min.js +1 -1
  48. package/dist/drawer/drawer.min.js +2 -2
  49. package/dist/drawer-view-swapper/drawer-view-swapper.min.js +1 -1
  50. package/dist/history-drawer/history-drawer.min.js +1 -1
  51. package/dist/history-order/history-order.min.js +1 -1
  52. package/dist/history-order-expanded/history-order-expanded.min.js +1 -1
  53. package/dist/last-order-badge/last-order-badge.min.js +1 -1
  54. package/dist/last-order-modal/last-order-modal.min.js +1 -1
  55. package/dist/like-button/like-button.min.js +1 -1
  56. package/dist/modal/modal.min.js +6 -6
  57. package/dist/onboarding/analytics/onboarding-analytics.min.js +1 -0
  58. package/dist/onboarding/events.min.js +1 -0
  59. package/dist/onboarding/onboarding.css +1 -1
  60. package/dist/onboarding/onboarding.min.js +2 -2
  61. package/dist/order-again/order-again.min.js +1 -1
  62. package/dist/planner/helpers/open-onboarding-modal.min.js +1 -0
  63. package/dist/planner/planner-abandon-modal/planner-abandon-modal.min.js +1 -1
  64. package/dist/planner/planner-budget-gauge/planner-budget-gauge.min.js +1 -1
  65. package/dist/planner/planner-catalog/planner-catalog.min.js +2 -2
  66. package/dist/planner/planner-current-menu/planner-current-menu.css +1 -1
  67. package/dist/planner/planner-current-menu/planner-current-menu.min.js +1 -1
  68. package/dist/planner/planner-current-menu-modal/planner-current-menu-modal.min.js +2 -2
  69. package/dist/planner/planner-dashboard/planner-dashboard.css +1 -1
  70. package/dist/planner/planner-dashboard/planner-dashboard.min.js +1 -1
  71. package/dist/planner/planner-form/planner-form.min.js +1 -1
  72. package/dist/planner/planner-menu-option/planner-menu-option.min.js +1 -1
  73. package/dist/planner/planner-onboarding/planner-onboarding.min.js +1 -1
  74. package/dist/planner/planner-onboarding-modal/planner-onboarding-modal.css +1 -1
  75. package/dist/planner/planner-onboarding-modal/planner-onboarding-modal.min.js +8 -8
  76. package/dist/planner/planner-open-catalog-modal/planner-open-catalog-modal.min.js +2 -2
  77. package/dist/planner/planner-recipe-card/planner-recipe-card.min.js +1 -1
  78. package/dist/planner/planner-recipe-list/planner-recipe-list.min.js +1 -1
  79. package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.min.js +1 -1
  80. package/dist/planner/planner-welcome-modal/planner-welcome-modal.min.js +2 -2
  81. package/dist/planner/to-basket-loader/to-basket-loader.min.js +1 -1
  82. package/dist/preferences/preferences.min.js +1 -1
  83. package/dist/price/price.min.js +1 -1
  84. package/dist/recipe-card/recipe-card.min.js +1 -1
  85. package/dist/recipe-card-cta/recipe-card-cta.min.js +1 -1
  86. package/dist/recipe-details/recipe-details.min.js +112 -112
  87. package/dist/recipe-pricing/recipe-pricing.min.js +1 -1
  88. package/dist/replace-item/replace-item-card/replace-item-card.min.js +1 -1
  89. package/dist/replace-item/replace-item.min.js +1 -1
  90. package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.min.js +4 -4
  91. package/dist/replace-item-planner/replace-item-planner.min.js +2 -2
  92. package/dist/slider-tabs/slider-tabs.min.js +1 -1
  93. package/dist/store-indicator/store-indicator.min.js +2 -2
  94. package/dist/store-locator-drawer/store-locator-drawer.min.js +1 -1
  95. package/package.json +1 -1
  96. package/dist/assets/OperatorSubscriber-EGuECN6g.js +0 -1
  97. package/dist/assets/async-D3oCs_PQ.js +0 -1
  98. package/dist/assets/delay-ILvLVH1b.js +0 -1
  99. package/dist/assets/distinctUntilChanged-BkBiB4M3.js +0 -1
  100. package/dist/assets/empty-Cv-4tfKR.js +0 -1
  101. package/dist/assets/executeSchedule-DfyZaGAH.js +0 -1
  102. package/dist/assets/http-aOzufNsj.js +0 -1
  103. package/dist/assets/mapOneOrManyArgs-DNd_tswl.js +0 -1
  104. package/dist/assets/merge-C-u9uFzU.js +0 -1
  105. package/dist/assets/mergeMap-buGewtOo.js +0 -1
  106. package/dist/assets/no-shadow-element-l9trQfcI.js +0 -21
  107. package/dist/assets/price-BoM226Kw.js +0 -1
  108. package/dist/assets/recipe-BwGs-blm.js +0 -1
  109. package/dist/assets/session-handler-BnuvphmJ.js +0 -1
  110. package/dist/assets/tap-BCGrRktL.js +0 -1
@@ -1,19 +1,19 @@
1
- import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";import{N as u,m as r,D as o,k as s}from"../assets/no-shadow-element-l9trQfcI.js";import{t as h}from"../assets/custom-element-BhZVzxrc.js";import{n as p}from"../assets/property-leIVgCvV.js";import{P as B}from"../assets/price-BoM226Kw.js";import{R as A}from"../assets/recipe-BwGs-blm.js";import{m as w}from"../assets/merge-C-u9uFzU.js";import{m as d}from"../assets/map-C4rf5Jbc.js";import{t as P}from"../assets/take-DO4w5a1Y.js";import{c as D}from"../assets/capitalize-DUAqYmp4.js";import"../counter/counter.min.js";import{G as L}from"../assets/product-card-DqcKyf1c.js";import"../price/price.min.js";import"../assets/promotion-badge-BwN2GpDz.js";import"../store-indicator/store-indicator.min.js";import"../last-order-badge/last-order-badge.min.js";import"../order-again/order-again.min.js";import"../like-button/like-button.min.js";import{L as M}from"../last-order-modal/last-order-modal.min.js";import{a as N}from"../assets/unsafe-html-CmALAWuN.js";import{M as q}from"../planner/planner-onboarding/planner-onboarding.min.js";import{f as I}from"../assets/filter-CEeE8t7I.js";import{t as G}from"../assets/tap-BCGrRktL.js";import{s as T}from"../assets/switchMap-D8q0hRYH.js";import{c as E}from"../assets/combineLatest-P4GAEtOW.js";import"../assets/skipWhile-DuMEda_n.js";import"../assets/OperatorSubscriber-EGuECN6g.js";import"../assets/innerFrom-CfKCbnvr.js";import"../assets/from-jBe2xW5a.js";import"../assets/executeSchedule-DfyZaGAH.js";import"../assets/mapOneOrManyArgs-DNd_tswl.js";import"../assets/of-BTA69Qgj.js";import"../assets/mergeMap-buGewtOo.js";import"../assets/empty-Cv-4tfKR.js";import"../assets/debounceTime-Bo5F3ux-.js";import"../assets/async-D3oCs_PQ.js";import"../assets/delay-ILvLVH1b.js";import"../assets/timer-BOl4bYNY.js";import"../assets/store-locator-Crx8huGH.js";import"../assets/state-CccUMzBZ.js";import"../assets/query-BApjzB0v.js";import"../onboarding/onboarding.min.js";var F=Object.defineProperty,V=Object.getOwnPropertyDescriptor,v=(e,t,a,n)=>{for(var i=n>1?void 0:n?V(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&F(t,a,i),i};let m=class extends u{constructor(){super(),this.noPosDisplay=!1,this.noSupplier=!1,this.recipeId="",this.plannerMode=!1,this.subscriptions=[],this.remainingBasketEntries=[],this.recipePrice={remaining:0,inBasket:0,total:0,totalPerGuest:0},this.priceService=B.getInstance(),this.allIngredientsToBasketLoading=!1,this.inMenu=!1,this.menuUpdateLoading=!1,this.styleURL=new URL("./recipe-details/details-footer/details-footer.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.priceService.initFormatter(),this.analyticsPath=`/recipes/${this.recipeId}/shopping`,this.subscriptions.push(w(r.recipes.remainingBasketEntries$.pipe(d(e=>{this.remainingBasketEntries=e})),r.recipes.recipePrice$.pipe(d(e=>{const t=e.remaining+e.inBasket;this.recipePrice={...e,total:t,totalPerGuest:0}})),r.recipes.allIngredientsToBasketLoading$.pipe(d(e=>{this.allIngredientsToBasketLoading=e})),r.recipes.ingredientToBasketLoading$.pipe(d(e=>{this.ingredientToBasketLoading=e})),r.recipes.updateIngredientFromBasketLoading$.pipe(d(e=>{this.updateIngredientFromBasketLoading=e})),r.recipes.productsLoading$.pipe(d(e=>{this.productsLoading=e})),r.planner.isRecipeInMenu$(this.recipeId).pipe(d(e=>this.inMenu=e)),r.planner.plannerRecipePrice$.pipe(d(e=>{this.recipePrice.totalPerGuest=this.guests>0?e/this.guests:e}))).subscribe(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}closeRecipeDetails(e=!1){r.recipes.displayedRecipe$.next(null),e&&r.basket.basketPreviewState$.next({isOpen:!0,activeTabIndex:r.basket.basketPreviewState$.getValue().activeTabIndex})}continueShopping(){this.closeRecipeDetails(),this.sendContinueEvent()}addToMenu(){var a,n;this.menuUpdateLoading=!0,this.requestUpdate();const e=document.querySelector("mealz-planner-recipe-suggestion");e.recipeId=this.recipeId;const t=document.querySelector("mealz-planner-current-menu");if(!t){const i=(n=(a=r.recipes)==null?void 0:a.productsPlannerByCategory$)==null?void 0:n.value,l=(i==null?void 0:i.toPickProducts)||[];r.planner.addRecipeToMenu(this.recipeId,this.guests,!!r.pos.currentPos().value,l).pipe(P(1)).subscribe(()=>{this.inMenu=!0;const c=document.querySelector("mealz-planner-recipe-list");c==null||c.addRecipeCardToList(this.recipeId),this.menuUpdateLoading=!1,this.requestUpdate()});return}t.addRecipe(this.recipeId,this.guests).subscribe(()=>{this.inMenu=!0,e.addAndSelectNewSuggestion(this.recipe),this.menuUpdateLoading=!1,this.requestUpdate()})}removeFromMenu(){this.menuUpdateLoading=!0,this.requestUpdate();const e=document.querySelector("mealz-planner-recipe-suggestion");if(!e){r.planner.removeRecipeFromMenu(this.recipeId).pipe(P(1)).subscribe(()=>{this.inMenu=!1,this.menuUpdateLoading=!1,this.requestUpdate()});return}e.removeRecipe(this.recipeId).subscribe(()=>{this.inMenu=!1,this.menuUpdateLoading=!1,this.requestUpdate()})}addAllIngredients(){r.recipes.addAllIngredientsToBasket({originPath:this.analyticsPath,props:{}}),this.sendAddAllEvent(),this.recipePrice.inBasket===0&&this.sendAddRecipeEvent()}render(){if(this.noPosDisplay&&!this.plannerMode)return o;const e=this.remainingBasketEntries.length>0&&!this.plannerMode,t=this.plannerMode&&this.noPosDisplay,a=this.plannerMode&&!this.inMenu;return s`
1
+ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";import{_ as re,q as D,t as X,a as ne,b as oe,v as le,N as m,D as c,k as a}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as g}from"../assets/custom-element-BhZVzxrc.js";import{n as p}from"../assets/property-Bg80vXcm.js";import{P as ce}from"../assets/price-DcNF55ef.js";import{m as o}from"../assets/mealz-sdk-DWLzEfKz.js";import{m as Z}from"../assets/merge-BlKu2J03.js";import{m as h}from"../assets/map-oxUcVNGT.js";import{t as F}from"../assets/take-BmqRVy-3.js";import{c as ee}from"../assets/capitalize-DUAqYmp4.js";import"../counter/counter.min.js";import{G as te}from"../assets/product-card-Be_9YL6f.js";import"../price/price.min.js";import"../assets/promotion-badge-2uUuiRau.js";import"../store-indicator/store-indicator.min.js";import"../last-order-badge/last-order-badge.min.js";import"../order-again/order-again.min.js";import"../like-button/like-button.min.js";import{L as de}from"../last-order-modal/last-order-modal.min.js";import{a as pe}from"../assets/unsafe-html-MRC87lfr.js";import{M as ue}from"../planner/planner-onboarding/planner-onboarding.min.js";import{o as se,c as he}from"../assets/OperatorSubscriber-z_a6lCKk.js";import{i as N}from"../assets/innerFrom-CVMPVEmB.js";import{f as j}from"../assets/filter-DuHsB8oM.js";import{t as z}from"../assets/tap-C4xC1M3N.js";import{s as V}from"../assets/switchMap-vA0vSKy4.js";import{c as H}from"../assets/combineLatest-DNi66MsF.js";import{d as me}from"../assets/async-H-Co76Oa.js";import"../assets/skipWhile-BAgfjfH2.js";import"../assets/from-Btz8AgkO.js";import"../assets/executeSchedule-CTqB8mra.js";import"../assets/mapOneOrManyArgs-Do0PsDok.js";import"../assets/of-CH-D5SN9.js";import"../assets/mergeAll-DQItozZ-.js";import"../assets/mergeMap-CMaM5Agw.js";import"../assets/empty-DGYYDWIm.js";import"../assets/debounceTime-CIA2MWDj.js";import"../assets/delay-0L99jHsb.js";import"../assets/timer-DmQ_oP6s.js";import"../assets/store-locator-CKwiyckb.js";import"../assets/state-bsKs-Mb2.js";import"../assets/query-BApjzB0v.js";import"../onboarding/onboarding.min.js";import"../onboarding/events.min.js";import"../onboarding/analytics/onboarding-analytics.min.js";var ge=function(e){re(t,e);function t(i,r,s){i===void 0&&(i=1/0),r===void 0&&(r=1/0),s===void 0&&(s=me);var n=e.call(this)||this;return n._bufferSize=i,n._windowTime=r,n._timestampProvider=s,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=r===1/0,n._bufferSize=Math.max(1,i),n._windowTime=Math.max(1,r),n}return t.prototype.next=function(i){var r=this,s=r.isStopped,n=r._buffer,l=r._infiniteTimeWindow,d=r._timestampProvider,v=r._windowTime;s||(n.push(i),!l&&n.push(d.now()+v)),this._trimBuffer(),e.prototype.next.call(this,i)},t.prototype._subscribe=function(i){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(i),s=this,n=s._infiniteTimeWindow,l=s._buffer,d=l.slice(),v=0;v<d.length&&!i.closed;v+=n?1:2)i.next(d[v]);return this._checkFinalizedStatuses(i),r},t.prototype._trimBuffer=function(){var i=this,r=i._bufferSize,s=i._timestampProvider,n=i._buffer,l=i._infiniteTimeWindow,d=(l?1:2)*r;if(r<1/0&&d<n.length&&n.splice(0,n.length-d),!l){for(var v=s.now(),k=0,u=1;u<n.length&&n[u]<=v;u+=2)k=u;k&&n.splice(0,k+1)}},t}(D);function ve(e){e===void 0&&(e={});var t=e.connector,i=t===void 0?function(){return new D}:t,r=e.resetOnError,s=r===void 0?!0:r,n=e.resetOnComplete,l=n===void 0?!0:n,d=e.resetOnRefCountZero,v=d===void 0?!0:d;return function(k){var u,f,I,E=0,x=!1,C=!1,S=function(){f==null||f.unsubscribe(),f=void 0},L=function(){S(),u=I=void 0,x=C=!1},ae=function(){var P=u;L(),P==null||P.unsubscribe()};return se(function(P,G){E++,!C&&!x&&S();var R=I=I??i();G.add(function(){E--,E===0&&!C&&!x&&(f=B(ae,v))}),R.subscribe(G),!u&&E>0&&(u=new X({next:function(O){return R.next(O)},error:function(O){C=!0,S(),f=B(L,s,O),R.error(O)},complete:function(){x=!0,S(),f=B(L,l),R.complete()}}),N(P).subscribe(u))})(k)}}function B(e,t){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var s=new X({next:function(){s.unsubscribe(),e()}});return N(t.apply(void 0,ne([],oe(i)))).subscribe(s)}}function be(e,t,i){var r,s=!1;return r=e,ve({connector:function(){return new ge(r,t,i)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function w(e){return se(function(t,i){N(e).subscribe(he(i,function(){return i.complete()},le)),!i.closed&&t.subscribe(i)})}var _e=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,y=(e,t,i,r)=>{for(var s=r>1?void 0:r?fe(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=(r?l(t,i,s):l(s))||s);return r&&s&&_e(t,i,s),s};let b=class extends m{constructor(){super(),this.noPosDisplay=!1,this.noSupplier=!1,this.recipeId="",this.plannerMode=!1,this.guests=0,this.recipe=null,this.analyticsPath="",this.subscriptions=[],this.remainingBasketEntries=[],this.recipePrice={remaining:0,inBasket:0,total:0,totalPerGuest:0},this.priceService=ce.getInstance(),this.allIngredientsToBasketLoading=!1,this.ingredientToBasketLoading=!1,this.updateIngredientFromBasketLoading=!1,this.productsLoading=!1,this.inMenu=!1,this.menuUpdateLoading=!1,this.styleURL=new URL("./recipe-details/details-footer/details-footer.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.priceService.initFormatter(),this.analyticsPath=`/recipes/${this.recipeId}/shopping`,this.subscriptions.push(Z(o.recipes.remainingBasketEntries$.pipe(h(e=>{this.remainingBasketEntries=e})),o.recipes.recipePrice$.pipe(h(e=>{const t=e.remaining+e.inBasket;this.recipePrice={...e,total:t,totalPerGuest:0}})),o.recipes.allIngredientsToBasketLoading$.pipe(h(e=>{this.allIngredientsToBasketLoading=e})),o.recipes.ingredientToBasketLoading$.pipe(h(e=>{this.ingredientToBasketLoading=e})),o.recipes.updateIngredientFromBasketLoading$.pipe(h(e=>{this.updateIngredientFromBasketLoading=e})),o.recipes.productsLoading$.pipe(h(e=>{this.productsLoading=e})),o.planner.plannerRecipePrice$.pipe(h(e=>{this.recipePrice.totalPerGuest=this.guests>0?e/this.guests:e}))).subscribe(()=>this.requestUpdate())),this.subscribeIsRecipeInMenu()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.isRecipeInMenuSub&&(this.isRecipeInMenuSub.unsubscribe(),this.isRecipeInMenuSub=void 0)}updated(e){super.updated(e),e.has("recipeId")&&this.subscribeIsRecipeInMenu()}subscribeIsRecipeInMenu(){this.recipeId&&(this.isRecipeInMenuSub&&this.isRecipeInMenuSub.unsubscribe(),this.isRecipeInMenuSub=o.planner.isRecipeInMenu$(this.recipeId).pipe(h(e=>{this.inMenu=e})).subscribe(()=>this.requestUpdate()))}closeRecipeDetails(e=!1){o.recipes.displayedRecipe$.next(null),e&&o.basket.basketPreviewState$.next({isOpen:!0,activeTabIndex:o.basket.basketPreviewState$.getValue().activeTabIndex})}continueShopping(){this.closeRecipeDetails(),this.sendContinueEvent()}addToMenu(){var i,r;this.menuUpdateLoading=!0,this.requestUpdate();const e=document.querySelector("mealz-planner-recipe-suggestion");e&&(e.recipeId=this.recipeId);const t=document.querySelector("mealz-planner-current-menu");if(!t){const s=(r=(i=o.recipes)==null?void 0:i.productsPlannerByCategory$)==null?void 0:r.value,n=(s==null?void 0:s.toPickProducts)||[];o.planner.addRecipeToMenu(this.recipeId,this.guests,!!o.pos.currentPos().value,n).pipe(F(1)).subscribe(()=>{this.inMenu=!0;const l=document.querySelector("mealz-planner-recipe-list");l==null||l.addRecipeCardToList(this.recipeId),this.menuUpdateLoading=!1,this.requestUpdate(),this.closeRecipeDetails()});return}t.addRecipe(this.recipeId,this.guests).subscribe(()=>{this.inMenu=!0,e==null||e.addAndSelectNewSuggestion(this.recipe||void 0),this.menuUpdateLoading=!1,this.requestUpdate(),this.closeRecipeDetails()})}removeFromMenu(){this.menuUpdateLoading=!0,this.requestUpdate();const e=document.querySelector("mealz-planner-recipe-suggestion");if(!e){o.planner.removeRecipeFromMenu(this.recipeId).pipe(F(1)).subscribe(()=>{this.inMenu=!1,this.menuUpdateLoading=!1,this.requestUpdate()});return}e.removeRecipe(this.recipeId).subscribe(()=>{this.inMenu=!1,this.menuUpdateLoading=!1,this.requestUpdate()})}addAllIngredients(){o.recipes.addAllIngredientsToBasket({originPath:this.analyticsPath,props:{}}),this.sendAddAllEvent(),this.recipePrice.inBasket===0&&this.sendAddRecipeEvent()}render(){if(this.noPosDisplay&&!this.plannerMode)return c;const e=this.remainingBasketEntries.length>0&&!this.plannerMode,t=this.plannerMode&&this.noPosDisplay,i=this.plannerMode&&!this.inMenu;return a`
2
2
  <div class="mealz-recipe-details__footer">
3
- ${this.productsLoading&&!this.plannerMode?o:s`
3
+ ${this.productsLoading&&!this.plannerMode?c:a`
4
4
  <!-- ADD TO BASKET CTA -->
5
- ${e||t||a?this.renderAddToBasketButton():s`
5
+ ${e||t||i?this.renderAddToBasketButton():a`
6
6
  <div class="mealz-recipe-details__recipe-is-in-basket-cta-container">
7
7
  ${this.renderBasketActions()}
8
8
  </div>
9
9
  `}
10
10
  `}
11
- ${this.noPosDisplay?o:this.renderPrice()}
12
- </div>`}renderAddToBasketButton(){const e=this.remainingBasketEntries.length;return this.allIngredientsToBasketLoading||this.menuUpdateLoading?s`
11
+ ${this.noPosDisplay?c:this.renderPrice()}
12
+ </div>`}renderAddToBasketButton(){const e=this.remainingBasketEntries.length;return this.allIngredientsToBasketLoading||this.menuUpdateLoading?a`
13
13
  <button class="mealz-recipe-details__add-to-basket-cta mealz-ds-button primary">
14
14
  <div class="mealz-ds-loader"></div>
15
15
  </button>
16
- `:this.plannerMode?s`
16
+ `:this.plannerMode?a`
17
17
  <button
18
18
  class="mealz-recipe-details__add-to-basket-cta mealz-ds-button primary"
19
19
  @click=${()=>this.addToMenu()}
@@ -21,7 +21,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
21
21
  <span class="mealz-ds-text size-s weight-xl">Ajouter au menu</span>
22
22
  <img src="https://storage.googleapis.com/assets.miam.tech/generic/icons/Pot-add_white.svg" alt="add to menu icon" />
23
23
  </button>
24
- `:s`
24
+ `:a`
25
25
  <button
26
26
  class="mealz-recipe-details__add-to-basket-cta mealz-ds-text mealz-ds-button size-m weight-xl primary"
27
27
  @click=${()=>this.addAllIngredients()}
@@ -42,11 +42,11 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
42
42
  </div>
43
43
  </div>
44
44
  </button>
45
- `}renderBasketActions(){return this.menuUpdateLoading?s`
45
+ `}renderBasketActions(){return this.menuUpdateLoading?a`
46
46
  <button class="mealz-ds-button">
47
47
  <div class="mealz-ds-loader"></div>
48
48
  </button>
49
- `:this.plannerMode?s`
49
+ `:this.plannerMode?a`
50
50
  <!-- REMOVE FROM MENU CTA -->
51
51
  <button class="mealz-ds-button" @click=${()=>this.removeFromMenu()}>
52
52
  <img alt="remove icon"
@@ -55,7 +55,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
55
55
  Retirer du menu
56
56
  </span>
57
57
  </button>
58
- `:s`
58
+ `:a`
59
59
  <!-- CONTINUE CTA -->
60
60
  <button
61
61
  class="mealz-ds-button secondary mealz-recipe-details__continue-shopping-cta ${this.noSupplier?"mobile-hidden":""}"
@@ -66,7 +66,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
66
66
  </button>
67
67
 
68
68
  <!-- VIEW BASKET CTA (ONLY IF NO SUPPLIER MODE) -->
69
- ${this.noSupplier?s`
69
+ ${this.noSupplier?a`
70
70
  <button
71
71
  @click=${()=>this.closeRecipeDetails(!0)}
72
72
  class="mealz-ds-button mealz-ds-text size-m weight-xl primary mealz-recipe-details__see-basket-cta">
@@ -77,8 +77,8 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
77
77
  alt="basket icon"
78
78
  src="https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"/>
79
79
  </button>
80
- `:o}
81
- `}renderPrice(){if(this.recipePrice.inBasket<=0&&!this.plannerMode)return;const e=this.ingredientToBasketLoading||this.updateIngredientFromBasketLoading||this.productsLoading,t=this.plannerMode?this.recipePrice.totalPerGuest:this.recipePrice.inBasket;return s`
80
+ `:c}
81
+ `}renderPrice(){if(this.recipePrice.inBasket<=0&&!this.plannerMode)return c;const e=this.ingredientToBasketLoading||this.updateIngredientFromBasketLoading||this.productsLoading,t=this.plannerMode?this.recipePrice.totalPerGuest:this.recipePrice.inBasket;return a`
82
82
  <div class="mealz-recipe-details__price">
83
83
  <div
84
84
  class="mealz-recipe-details__price-label ${this.plannerMode?"":"primary"} mealz-ds-text size-l weight-xxl">
@@ -91,7 +91,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
91
91
  ${this.plannerMode?"par personne":"dans votre panier"}
92
92
  </span>
93
93
  </div>
94
- `}sendAddAllEvent(){r.analytics.sendEvent("entry.add-all",this.analyticsPath,{recipe_id:this.recipeId,entry_count:this.remainingBasketEntries.length})}sendAddRecipeEvent(){r.analytics.sendEvent("recipe.add",this.analyticsPath,{recipe_id:this.recipeId})}sendContinueEvent(){r.analytics.sendEvent("recipe.continue",this.analyticsPath,{recipe_id:this.recipeId})}};v([p({type:Boolean})],m.prototype,"noPosDisplay",2);v([p({type:Boolean})],m.prototype,"noSupplier",2);v([p({type:String})],m.prototype,"recipeId",2);v([p({type:Boolean})],m.prototype,"plannerMode",2);v([p({type:Number})],m.prototype,"guests",2);v([p({type:A})],m.prototype,"recipe",2);m=v([h("mealz-details-footer")],m);customElements.get("mealz-details-footer")||customElements.define("mealz-details-footer",m);var H=Object.getOwnPropertyDescriptor,j=(e,t,a,n)=>{for(var i=n>1?void 0:n?H(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let C=class extends u{constructor(){super(),this.tags=[],this.displayTags=!1,this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-infos/details-infos.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(r.recipes.displayedRecipe$.subscribe(e=>{e&&(this.recipe=e.recipe,this.tags=e.recipe.relationships.tags.data.map(t=>t.attributes.name),this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}toggleTags(){this.displayTags=!this.displayTags,this.requestUpdate()}noTimePlaceholder(){return s`<span class="mealz-recipe-details-infos__no-time-placeholder">0 min</span>`}noDataPlaceholder(){return s`<span class="mealz-recipe-details-infos__no-data-placeholder">-</span>`}getRecipeDifficultyIntoClassName(){switch(this.recipe.attributes.difficulty){case 1:return"easy";case 2:return"medium";case 3:return"hard";default:return"no-difficulty-defined"}}getRecipeDifficultyIntoText(){switch(this.recipe.attributes.difficulty){case 1:return s`<span class="mealz-ds-text">Facile</span>`;case 2:return s`<span class="mealz-ds-text">Moyen</span>`;case 3:return s`<span class="mealz-ds-text">Difficile</span>`;default:return o}}renderPreparationTime(){return s`
94
+ `}sendAddAllEvent(){o.analytics.sendEvent("entry.add-all",this.analyticsPath,{recipe_id:this.recipeId,entry_count:this.remainingBasketEntries.length})}sendAddRecipeEvent(){o.analytics.sendEvent("recipe.add",this.analyticsPath,{recipe_id:this.recipeId})}sendContinueEvent(){o.analytics.sendEvent("recipe.continue",this.analyticsPath,{recipe_id:this.recipeId})}};y([p({type:Boolean})],b.prototype,"noPosDisplay",2);y([p({type:Boolean})],b.prototype,"noSupplier",2);y([p({type:String})],b.prototype,"recipeId",2);y([p({type:Boolean})],b.prototype,"plannerMode",2);y([p({type:Number})],b.prototype,"guests",2);y([p({attribute:!1})],b.prototype,"recipe",2);b=y([g("mealz-details-footer")],b);customElements.get("mealz-details-footer")||customElements.define("mealz-details-footer",b);var ze=Object.getOwnPropertyDescriptor,ye=(e,t,i,r)=>{for(var s=r>1?void 0:r?ze(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let W=class extends m{constructor(){super(),this.tags=[],this.displayTags=!1,this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-infos/details-infos.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(o.recipes.displayedRecipe$.subscribe(e=>{e&&(this.recipe=e.recipe,this.tags=e.recipe.relationships.tags.data.map(t=>t.attributes.name),this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}toggleTags(){this.displayTags=!this.displayTags,this.requestUpdate()}noTimePlaceholder(){return a`<span class="mealz-recipe-details-infos__no-time-placeholder">0 min</span>`}noDataPlaceholder(){return a`<span class="mealz-recipe-details-infos__no-data-placeholder">-</span>`}getRecipeDifficultyIntoClassName(){switch(this.recipe.attributes.difficulty){case 1:return"easy";case 2:return"medium";case 3:return"hard";default:return"no-difficulty-defined"}}getRecipeDifficultyIntoText(){switch(this.recipe.attributes.difficulty){case 1:return a`<span class="mealz-ds-text">Facile</span>`;case 2:return a`<span class="mealz-ds-text">Moyen</span>`;case 3:return a`<span class="mealz-ds-text">Difficile</span>`;default:return c}}renderPreparationTime(){return a`
95
95
  <!-- PREPARATION TIME -->
96
96
  <div
97
97
  class="
@@ -103,9 +103,9 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
103
103
  >
104
104
  <img alt="preparation time icon"
105
105
  src="https://storage.googleapis.com/assets.miam.tech/generic/icons/knife-primary.svg"/>
106
- ${this.recipe.preparationTime?s`<span class="mealz-ds-text">${this.recipe.preparationTime}</span>`:this.noTimePlaceholder()}
106
+ ${this.recipe.preparationTime?a`<span class="mealz-ds-text">${this.recipe.preparationTime}</span>`:this.noTimePlaceholder()}
107
107
  </div>
108
- `}renderCookingTime(){return s`
108
+ `}renderCookingTime(){return a`
109
109
  <!-- COOKING TIME -->
110
110
  <div class="
111
111
  mealz-ds-badge
@@ -115,11 +115,11 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
115
115
  ${this.recipe.cookingTime==="-"?"no-cooking-time-defined":""}"
116
116
  >
117
117
  <img alt="cooking time icon" src="https://storage.googleapis.com/assets.miam.tech/generic/icons/pan-primary.svg"/>
118
- ${this.recipe.cookingTime?s`<span class="mealz-ds-text">${this.recipe.cookingTime}</span>`:this.noTimePlaceholder()}
118
+ ${this.recipe.cookingTime?a`<span class="mealz-ds-text">${this.recipe.cookingTime}</span>`:this.noTimePlaceholder()}
119
119
  </div>
120
- `}renderRecipeDifficulty(){return s`
120
+ `}renderRecipeDifficulty(){return a`
121
121
  <!-- RECIPE DIFFICULTY -->
122
- ${this.recipe.difficulty?s`
122
+ ${this.recipe.difficulty?a`
123
123
  <div class="
124
124
  mealz-ds-badge
125
125
  size-l
@@ -130,9 +130,9 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
130
130
  src="https://storage.googleapis.com/assets.miam.tech/generic/icons/chef-hat-primary.svg"/>
131
131
  ${this.getRecipeDifficultyIntoText()}
132
132
  </div>
133
- `:o}`}renderMoreTags(){return s`
133
+ `:c}`}renderMoreTags(){return a`
134
134
  <!-- MORE INFO -->
135
- ${this.displayTags?this.renderTags():s`
135
+ ${this.displayTags?this.renderTags():a`
136
136
  <div
137
137
  class="mealz-ds-badge size-l mealz-recipe-details-infos__badge more-info"
138
138
  @click=${()=>this.toggleTags()}
@@ -143,21 +143,21 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
143
143
  />
144
144
  </div>
145
145
  `}
146
- `}renderTags(){return s`
146
+ `}renderTags(){return a`
147
147
  <!-- TAGS -->
148
- ${this.tags.map(e=>s`
148
+ ${this.tags.map(e=>a`
149
149
  <div class="mealz-ds-badge size-l mealz-recipe-details-infos__badge tag">
150
150
  <span class="mealz-ds-text">${e}</span>
151
151
  </div>
152
152
  `)}
153
- `}render(){return s`
153
+ `}render(){return a`
154
154
  <div class="mealz-recipe-details-infos__container ${this.displayTags?"tags-displayed":""}">
155
155
  ${this.renderPreparationTime()}
156
156
  ${this.renderCookingTime()}
157
157
  ${this.renderRecipeDifficulty()}
158
158
  ${this.renderMoreTags()}
159
159
  </div>
160
- `}};C=j([h("mealz-details-infos")],C);var K=Object.getOwnPropertyDescriptor,Q=(e,t,a,n)=>{for(var i=n>1?void 0:n?K(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let x=class extends u{constructor(){super(),this.steps=[],this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-steps/details-steps.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(r.recipes.displayedRecipe$.subscribe(e=>{e&&(this.steps=e.recipe.relationships["recipe-steps"].data.sort((t,a)=>t.attributes["step-number"]-a.attributes["step-number"]).map(t=>t.attributes.description),this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){return s`
160
+ `}};W=ye([g("mealz-details-infos")],W);var $e=Object.getOwnPropertyDescriptor,ke=(e,t,i,r)=>{for(var s=r>1?void 0:r?$e(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let K=class extends m{constructor(){super(),this.steps=[],this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-steps/details-steps.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(o.recipes.displayedRecipe$.subscribe(e=>{e&&(this.steps=e.recipe.relationships["recipe-steps"].data.sort((t,i)=>t.attributes["step-number"]-i.attributes["step-number"]).map(t=>t.attributes.description),this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){return a`
161
161
  <div class="mealz-details-steps">
162
162
  <!-- HEADER -->
163
163
  <div class="mealz-ds-text weight-xxl mealz-details-steps__header">
@@ -166,7 +166,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
166
166
  </div>
167
167
  <!-- LIST -->
168
168
  <div class="mealz-details-steps__list">
169
- ${this.steps.map((e,t)=>s`
169
+ ${this.steps.map((e,t)=>a`
170
170
  <div class="mealz-details-steps__step">
171
171
  <!-- INDEX -->
172
172
  <div class="mealz-details-steps__step__idx">
@@ -180,39 +180,39 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
180
180
  `)}
181
181
  </div>
182
182
  </div>
183
- `}};x=Q([h("mealz-details-steps")],x);var Y=Object.getOwnPropertyDescriptor,J=(e,t,a,n)=>{for(var i=n>1?void 0:n?Y(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let S=class extends u{constructor(){super(),this.ingredients=[],this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-ingredients/details-ingredients.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(r.recipes.displayedRecipe$.subscribe(e=>{e&&(this.ingredients=e.recipe.relationships.ingredients.data,this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){var e,t;return s`
183
+ `}};K=ke([g("mealz-details-steps")],K);var Ie=Object.getOwnPropertyDescriptor,Pe=(e,t,i,r)=>{for(var s=r>1?void 0:r?Ie(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let Q=class extends m{constructor(){super(),this.ingredients=[],this.subscriptions=[],this.styleURL=new URL("./recipe-details/details-ingredients/details-ingredients.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(o.recipes.displayedRecipe$.subscribe(e=>{e&&(this.ingredients=e.recipe.relationships.ingredients.data,this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){var e,t;return a`
184
184
  <div class="mealz-details-ingredients">
185
185
  <!-- HEADER -->
186
186
  <div class="mealz-ds-text weight-xxl mealz-details-ingredients__header">
187
187
  <span>${(e=this.ingredients)==null?void 0:e.length}</span>
188
- ${((t=this.ingredients)==null?void 0:t.length)>1?s`<span>ingrédients</span>`:s`<span>ingrédient</span>`}
188
+ ${((t=this.ingredients)==null?void 0:t.length)>1?a`<span>ingrédients</span>`:a`<span>ingrédient</span>`}
189
189
  </div>
190
190
  <!-- LIST -->
191
191
  <div class="mealz-details-ingredients__list">
192
- ${this.ingredients.map(a=>s`
192
+ ${this.ingredients.map(i=>a`
193
193
  <div class="mealz-details-ingredients__item">
194
194
  <!-- PICTURE -->
195
195
  <div class="mealz-ds-avatar mealz-details-ingredients__picture_container">
196
196
  <img class="mealz-details-ingredients__picture"
197
- src="${this.ingredientPicture(a)}"
198
- alt="${a.attributes.name} picture">
197
+ src="${this.ingredientPicture(i)}"
198
+ alt="${i.attributes.name} picture">
199
199
  </div>
200
200
  <!-- NAME -->
201
201
  <span class="mealz-ds-text size-s weight-xxl mealz-details-ingredients__name">
202
- ${D(a.attributes.name)}
202
+ ${ee(i.attributes.name)}
203
203
  </span>
204
204
  <!-- QUANTITY -->
205
205
  <div class="mealz-ds-text size-s weight-l mealz-details-ingredients__row__qty">
206
- ${a.attributes.quantity} ${a.attributes.unit}
206
+ ${i.attributes.quantity} ${i.attributes.unit}
207
207
  </div>
208
208
  </div>
209
209
  `)}
210
210
  </div>
211
211
  </div>
212
- `}ingredientPicture(e){return e.picture||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}};S=J([h("mealz-details-ingredients")],S);var W=Object.defineProperty,X=Object.getOwnPropertyDescriptor,b=(e,t,a,n)=>{for(var i=n>1?void 0:n?X(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&W(t,a,i),i};const f=["unavailable"],Z=["ticked","unselected"];let g=class extends u{constructor(){super(),this.isSponsored=!1,this.subscriptions=[],this.guestObserverService=L.getInstance(),this.modifiedIngQty=0,this.analyticsPath="/meals-planner/current",this.styleURL=new URL("./product-card/product-card-planner.css",this.getBaseURL())}get status(){var e;return(e=this.product)==null?void 0:e.status}set status(e){this.product.status=e,this.requestUpdate()}get productImage(){var e;return((e=this.product.item)==null?void 0:e.attributes.image)||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}get ingredientPicture(){return this.product.ingredient.picture||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}updated(){var e,t;this.product&&(this.isSponsored=((t=(e=this.product.item)==null?void 0:e.attributes)==null?void 0:t.sponsored)===!0)}connectedCallback(){super.connectedCallback(),this.listenGuestsChange(),this.calculateQty()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}listenGuestsChange(){this.subscriptions.push(this.guestObserverService.guests$.subscribe(e=>{this.currentGuests=e,this.calculateQty()}))}calculateQty(){const e=this.product.ingredient.attributes.quantity/this.initialGuests;this.modifiedIngQty=Number((e*this.currentGuests).toFixed(2)),this.requestUpdate()}openReplaceItemView(){r.planner.openReplaceItemView(this.product),this.replaceItemViewEvent()}onCheckboxChange(e){e.target.checked?(this.status="ticked",r.planner.selectProduct(+this.product.item.id,this.product.ingredient.relationships.definition.data.id),this.addItemEvent()):(this.status="unselected",r.planner.unselectProduct(+this.product.item.id,this.product.ingredient.relationships.definition.data.id),this.deleteItemEvent()),this.requestUpdate()}render(){return s`
212
+ `}ingredientPicture(e){return e.picture||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}};Q=Pe([g("mealz-details-ingredients")],Q);var Te=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,$=(e,t,i,r)=>{for(var s=r>1?void 0:r?Ee(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=(r?l(t,i,s):l(s))||s);return r&&s&&Te(t,i,s),s};const U=["unavailable"],xe=["ticked","unselected"];let _=class extends m{constructor(){super(),this.isSponsored=!1,this.subscriptions=[],this.guestObserverService=te.getInstance(),this.modifiedIngQty=0,this.analyticsPath="/meals-planner/current",this.styleURL=new URL("./product-card/product-card-planner.css",this.getBaseURL())}get status(){var e;return(e=this.product)==null?void 0:e.status}set status(e){this.product.status=e,this.requestUpdate()}get productImage(){var e;return((e=this.product.item)==null?void 0:e.attributes.image)||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}get ingredientPicture(){return this.product.ingredient.picture||"https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg"}updated(){var e,t;this.product&&(this.isSponsored=((t=(e=this.product.item)==null?void 0:e.attributes)==null?void 0:t.sponsored)===!0)}connectedCallback(){super.connectedCallback(),this.listenGuestsChange(),this.calculateQty()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}listenGuestsChange(){this.subscriptions.push(this.guestObserverService.guests$.subscribe(e=>{this.currentGuests=e,this.calculateQty()}))}calculateQty(){const e=this.product.ingredient.attributes.quantity/this.initialGuests;this.modifiedIngQty=Number((e*this.currentGuests).toFixed(2)),this.requestUpdate()}openReplaceItemView(){o.planner.openReplaceItemView(this.product),this.replaceItemViewEvent()}onCheckboxChange(e){e.target.checked?(this.status="ticked",o.planner.selectProduct(+this.product.item.id,this.product.ingredient.relationships.definition.data.id),this.addItemEvent()):(this.status="unselected",o.planner.unselectProduct(+this.product.item.id,this.product.ingredient.relationships.definition.data.id),this.deleteItemEvent()),this.requestUpdate()}render(){return a`
213
213
  <div class="mealz-product-card-planner
214
214
  ${this.status==="ticked"?"added":""}
215
- ${f.includes(this.status)||this.oftenIgnored?"disabled":""}
215
+ ${U.includes(this.status)||this.oftenIgnored?"disabled":""}
216
216
  ${this.status==="unavailable"?"unavailable":""}"
217
217
  >
218
218
  ${this.renderHeader()}
@@ -220,10 +220,10 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
220
220
  ${this.oftenIgnored?"disabled":""}
221
221
  ${this.status==="unavailable"?"unavailable":""}"
222
222
  >
223
- ${Z.includes(this.status)&&!this.oftenIgnored?this.renderEnabledProductCard():this.renderDisabledOrUnavailableProduct()}
223
+ ${xe.includes(this.status)&&!this.oftenIgnored?this.renderEnabledProductCard():this.renderDisabledOrUnavailableProduct()}
224
224
  </div>
225
225
  </div>
226
- `}renderEnabledProductCard(){return s`
226
+ `}renderEnabledProductCard(){return a`
227
227
  <mealz-promotion-badge .priceData="${this.product.price}"></mealz-promotion-badge>
228
228
  <div class="mealz-product-card-planner__selected-product">
229
229
  <div class="mealz-product-card-planner__picture-column">
@@ -257,7 +257,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
257
257
  </div>
258
258
  </div>
259
259
  ${this.renderFooterActions()}
260
- `}renderHeader(){return s`
260
+ `}renderHeader(){return a`
261
261
  <div
262
262
  class="mealz-product-card-planner__header
263
263
  ${this.status==="ticked"?"added":""}
@@ -267,21 +267,21 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
267
267
  class="
268
268
  mealz-product-card-planner__header-name
269
269
  mealz-ds-text weight-xl
270
- ${f.includes(this.status)||this.oftenIgnored?"mealz-product-card-planner__disabled-text":""}"
270
+ ${U.includes(this.status)||this.oftenIgnored?"mealz-product-card-planner__disabled-text":""}"
271
271
  >
272
- ${D(this.product.ingredient.attributes.name)}
272
+ ${ee(this.product.ingredient.attributes.name)}
273
273
  </span>
274
274
  <span
275
275
  class="
276
276
  mealz-product-card-planner__header-quantity
277
277
  mealz-ds-text size-s weight-l
278
- ${f.includes(this.status)||this.oftenIgnored?"mealz-product-card-planner__disabled-text":""}"
278
+ ${U.includes(this.status)||this.oftenIgnored?"mealz-product-card-planner__disabled-text":""}"
279
279
  >
280
280
  <span>${this.modifiedIngQty?this.modifiedIngQty:this.product.ingredient.attributes.quantity}</span>
281
281
  <span>${this.product.ingredient.attributes.unit}</span>
282
282
  </span>
283
283
  </div>
284
- `}renderFooterActions(){return s`
284
+ `}renderFooterActions(){return a`
285
285
  <div class="mealz-product-card-planner__footer__actions">
286
286
  <button
287
287
  @click="${()=>this.openReplaceItemView()}"
@@ -290,7 +290,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
290
290
  <span>Remplacer</span>
291
291
  </button>
292
292
  </div>
293
- `}renderCTA(){return s`
293
+ `}renderCTA(){return a`
294
294
  <div class="mealz-product-card-planner__checkbox mealz-ds-checkbox">
295
295
  <input
296
296
  type="checkbox"
@@ -298,8 +298,8 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
298
298
  @change="${e=>this.onCheckboxChange(e)}"
299
299
  >
300
300
  </div>
301
- `}renderDisabledOrUnavailableProduct(){return s`
302
- ${this.oftenIgnored?s`
301
+ `}renderDisabledOrUnavailableProduct(){return a`
302
+ ${this.oftenIgnored?a`
303
303
  <span class="mealz-ds-text mealz-product-card-planner__disabled-text">
304
304
  Cet ingrédient ne sera pas ajouté à votre panier
305
305
  </span>
@@ -309,7 +309,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
309
309
  <span>Ajouter un produit</span>
310
310
  </button>
311
311
  `:""}
312
- ${this.status==="unavailable"&&!this.oftenIgnored?s`
312
+ ${this.status==="unavailable"&&!this.oftenIgnored?a`
313
313
  <img class="mealz-ds-avatar" src="${this.ingredientPicture}" alt="ingredient picture">
314
314
  <mealz-unavailable-badge></mealz-unavailable-badge>
315
315
  <button
@@ -318,7 +318,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
318
318
  <span>Remplacer</span>
319
319
  </button>
320
320
  `:""}
321
- `}addItemEvent(){r.analytics.sendEvent("planner.item.add",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}deleteItemEvent(){r.analytics.sendEvent("planner.item.delete",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}replaceItemViewEvent(){r.analytics.sendEvent("planner.item.replace",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}};b([p({type:Object})],g.prototype,"product",2);b([p({type:String})],g.prototype,"recipeId",2);b([p({type:Number})],g.prototype,"initialGuests",2);b([p({type:Number})],g.prototype,"currentGuests",2);b([p({type:Boolean})],g.prototype,"oftenIgnored",2);g=b([h("mealz-product-card-planner")],g);customElements.get("mealz-product-card-planner")||customElements.define("mealz-product-card-planner",g);var ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,U=(e,t,a,n)=>{for(var i=n>1?void 0:n?te(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&ee(t,a,i),i};let y=class extends u{constructor(){super(),this.styleURL=new URL("./legal-notice/legal-notice.css",this.getBaseURL())}get containsAlcohol(){var t;return(((t=this.tags)==null?void 0:t.data)||[]).some(a=>a.id==="ingredient_category_alcool")}render(){return this.containsAlcohol?s`
321
+ `}addItemEvent(){o.analytics.sendEvent("planner.item.add",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}deleteItemEvent(){o.analytics.sendEvent("planner.item.delete",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}replaceItemViewEvent(){o.analytics.sendEvent("planner.item.replace",this.analyticsPath,{recipe_id:this.recipeId,item_id:this.product.item.id})}};$([p({type:Object})],_.prototype,"product",2);$([p({type:String})],_.prototype,"recipeId",2);$([p({type:Number})],_.prototype,"initialGuests",2);$([p({type:Number})],_.prototype,"currentGuests",2);$([p({type:Boolean})],_.prototype,"oftenIgnored",2);_=$([g("mealz-product-card-planner")],_);customElements.get("mealz-product-card-planner")||customElements.define("mealz-product-card-planner",_);var Ce=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,ie=(e,t,i,r)=>{for(var s=r>1?void 0:r?Se(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=(r?l(t,i,s):l(s))||s);return r&&s&&Ce(t,i,s),s};let A=class extends m{constructor(){super(),this.styleURL=new URL("./legal-notice/legal-notice.css",this.getBaseURL())}get containsAlcohol(){var t;return(((t=this.tags)==null?void 0:t.data)||[]).some(i=>i.id==="ingredient_category_alcool")}render(){return this.containsAlcohol?a`
322
322
  <div class="mealz-products-picker__legal-notices">
323
323
  <span class="mealz-ds-text weight-xxl mealz-products-picker__legal-notices-header">Mentions légales</span>
324
324
  <div class="mealz-products-picker__legal-notices-content">
@@ -330,7 +330,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
330
330
  </span>
331
331
  </div>
332
332
  </div>
333
- `:o}};U([p()],y.prototype,"tags",2);y=U([h("mealz-legal-notice")],y);var se=Object.getOwnPropertyDescriptor,ie=(e,t,a,n)=>{for(var i=n>1?void 0:n?se(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let R=class extends u{constructor(){super(),this.styleURL=[new URL("./product-card/product-card-skeleton/product-card-skeleton.css",this.getBaseURL()),new URL("./product-card/product-card.css",this.getBaseURL())]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){return s`
333
+ `:c}};ie([p()],A.prototype,"tags",2);A=ie([g("mealz-legal-notice")],A);var Re=Object.getOwnPropertyDescriptor,Oe=(e,t,i,r)=>{for(var s=r>1?void 0:r?Re(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let Y=class extends m{constructor(){super(),this.styleURL=[new URL("./product-card/product-card-skeleton/product-card-skeleton.css",this.getBaseURL()),new URL("./product-card/product-card.css",this.getBaseURL())]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){return a`
334
334
  <!-- PRODUCT CARD -->
335
335
  <div class="mealz-product-card skeleton">
336
336
  <!-- HEADER -->
@@ -373,9 +373,9 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
373
373
  </div>
374
374
  </div>
375
375
  </div>
376
- `}};R=ie([h("mealz-products-card-skeleton")],R);var ae=Object.defineProperty,re=Object.getOwnPropertyDescriptor,k=(e,t,a,n)=>{for(var i=n>1?void 0:n?re(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&ae(t,a,i),i};let z=class extends u{constructor(){super(),this.inBasket=!1,this.plannerMode=!1,this.numberUnavailableProducts=0,this.subscriptions=[],this.noSupplier=r.supplier.isNoSupplier(),this.hasEmittedReady=!1,this.styleURL=new URL("./products-picker/products-picker.css",this.getBaseURL())}get totalProducts(){return this.recipe.relationships.ingredients.data.length}connectedCallback(){super.connectedCallback(),this.resetProducts(),this.listenToProducts(),this.subscriptions.push(r.recipes.displayedRecipe$.subscribe(e=>{e&&(this.recipe=e.recipe,this.analyticsPath=`/recipes/${this.recipe.id}/shopping`,this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.resetProducts(),this.subscriptions.forEach(e=>e.unsubscribe())}resetProducts(){this.productsByCategory={toPickProducts:[],oftenIgnoredProducts:[]},this.numberUnavailableProducts=0,this.requestUpdate()}listenToProducts(){const e=this.plannerMode?r.recipes.productsPlannerByCategory$:r.recipes.productsByCategory$;this.subscriptions.push(e.subscribe(t=>{this.productsByCategory=t,this.plannerMode?this.numberUnavailableProducts=[...t.oftenIgnoredProducts,...t.toPickProducts].filter(a=>a.status==="unavailable").length:this.numberUnavailableProducts=[...t.oftenIgnoredProducts,...t.toPickProducts].filter(a=>a.basketEntry.status==="out_of_stock").length,this.requestUpdate(),this.notifyReadyIfRendered()}))}async notifyReadyIfRendered(){if(this.hasEmittedReady)return;if(await this.updateComplete,this.querySelector(".mealz-product-card-planner__checkbox")||this.querySelector(".mealz-product-card__checkbox")){this.hasEmittedReady=!0;const t=new CustomEvent("products-picker-ready",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}scrollToFirstUnavailable(){const e=document.querySelector(this.plannerMode?".mealz-products-picker":".mealz-products-picker__container");if(e){const t=e.querySelector(this.plannerMode?".mealz-product-card-planner.unavailable":".mealz-product-card__container.out_of_stock");t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}isAlreadyOnCatalogPage(){return window.location.href.includes(r.router.getCatalogUrl())}closeRecipeModal(){}currentPath(){return""}guestsChange(){const e=new CustomEvent("guestChange",{bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){var e,t,a;return s`
376
+ `}};Y=Oe([g("mealz-products-card-skeleton")],Y);var we=Object.defineProperty,De=Object.getOwnPropertyDescriptor,q=(e,t,i,r)=>{for(var s=r>1?void 0:r?De(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=(r?l(t,i,s):l(s))||s);return r&&s&&we(t,i,s),s};let T=class extends m{constructor(){super(),this.inBasket=!1,this.plannerMode=!1,this.numberUnavailableProducts=0,this.subscriptions=[],this.noSupplier=o.supplier.isNoSupplier(),this.hasEmittedReady=!1,this.styleURL=new URL("./products-picker/products-picker.css",this.getBaseURL())}get totalProducts(){return this.recipe.relationships.ingredients.data.length}connectedCallback(){super.connectedCallback(),this.resetProducts(),this.listenToProducts(),this.subscriptions.push(o.recipes.displayedRecipe$.subscribe(e=>{e&&(this.recipe=e.recipe,this.analyticsPath=`/recipes/${this.recipe.id}/shopping`,this.requestUpdate())}))}disconnectedCallback(){super.disconnectedCallback(),this.resetProducts(),this.subscriptions.forEach(e=>e.unsubscribe())}resetProducts(){this.productsByCategory={toPickProducts:[],oftenIgnoredProducts:[]},this.numberUnavailableProducts=0,this.requestUpdate()}listenToProducts(){const e=this.plannerMode?o.recipes.productsPlannerByCategory$:o.recipes.productsByCategory$;this.subscriptions.push(e.subscribe(t=>{this.productsByCategory=t,this.plannerMode?this.numberUnavailableProducts=[...t.oftenIgnoredProducts,...t.toPickProducts].filter(i=>i.status==="unavailable").length:this.numberUnavailableProducts=[...t.oftenIgnoredProducts,...t.toPickProducts].filter(i=>i.basketEntry.status==="out_of_stock").length,this.requestUpdate(),this.notifyReadyIfRendered()}))}async notifyReadyIfRendered(){if(this.hasEmittedReady)return;if(await this.updateComplete,this.querySelector(".mealz-product-card-planner__checkbox")||this.querySelector(".mealz-product-card__checkbox")){this.hasEmittedReady=!0;const t=new CustomEvent("products-picker-ready",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}scrollToFirstUnavailable(){const e=document.querySelector(this.plannerMode?".mealz-products-picker":".mealz-products-picker__container");if(e){const t=e.querySelector(this.plannerMode?".mealz-product-card-planner.unavailable":".mealz-product-card__container.out_of_stock");t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}isAlreadyOnCatalogPage(){return window.location.href.includes(o.router.getCatalogUrl())}closeRecipeModal(){}currentPath(){return""}guestsChange(){const e=new CustomEvent("guestChange",{bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){var e,t,i;return a`
377
377
  <div class="mealz-products-picker">
378
- ${this.inBasket&&this.plannerMode?s`
378
+ ${this.inBasket&&this.plannerMode?a`
379
379
  <div class="mealz-products-picker__overlay">
380
380
  <div class="mealz-products-picker__overlay-text">
381
381
  <span class="mealz-ds-text">
@@ -383,76 +383,76 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
383
383
  </span>
384
384
  </div>
385
385
  </div>
386
- `:o}
386
+ `:c}
387
387
  <!-- HEADER -->
388
388
  ${this.renderHeader()}
389
389
  <div class="mealz-products-picker__list">
390
390
  <!-- TO PICK PRODUCTS -->
391
- ${((e=this.productsByCategory)==null?void 0:e.toPickProducts.length)>0?this.productsByCategory.toPickProducts.map(n=>{var i,l,c,_;return this.plannerMode?s`
391
+ ${((e=this.productsByCategory)==null?void 0:e.toPickProducts.length)>0?this.productsByCategory.toPickProducts.map(r=>{var s,n,l,d;return this.plannerMode?a`
392
392
  <mealz-product-card-planner
393
- .product="${n}"
393
+ .product="${r}"
394
394
  .recipeId="${this.recipe.id}"
395
395
  .oftenIgnored="${!1}"
396
- .initialGuests="${((i=this.recipe)==null?void 0:i.attributes["number-of-guests"])||4}"
397
- .currentGuests="${this.recipe.modifiedGuests||((l=this.recipe)==null?void 0:l.attributes["number-of-guests"])||4}"
396
+ .initialGuests="${((s=this.recipe)==null?void 0:s.attributes["number-of-guests"])||4}"
397
+ .currentGuests="${this.recipe.modifiedGuests||((n=this.recipe)==null?void 0:n.attributes["number-of-guests"])||4}"
398
398
  ></mealz-product-card-planner>
399
- `:s`
399
+ `:a`
400
400
  <mealz-product-card
401
- .product="${n}"
401
+ .product="${r}"
402
402
  .recipeId="${this.recipe.id}"
403
- .initialGuests="${((c=this.recipe)==null?void 0:c.attributes["number-of-guests"])||4}"
404
- .currentGuests="${this.recipe.modifiedGuests||((_=this.recipe)==null?void 0:_.attributes["number-of-guests"])||4}"
403
+ .initialGuests="${((l=this.recipe)==null?void 0:l.attributes["number-of-guests"])||4}"
404
+ .currentGuests="${this.recipe.modifiedGuests||((d=this.recipe)==null?void 0:d.attributes["number-of-guests"])||4}"
405
405
  ></mealz-product-card>
406
- `}):Array(this.totalProducts).fill(s`
406
+ `}):Array(this.totalProducts).fill(a`
407
407
  <mealz-products-card-skeleton></mealz-products-card-skeleton>
408
408
  `)}
409
409
  </div>
410
410
  <!-- OFTEN IGNORED PRODUCTS -->
411
411
  <div class="mealz-products-picker__secondary-list">
412
- ${((a=(t=this.productsByCategory)==null?void 0:t.oftenIgnoredProducts)==null?void 0:a.length)>0?s`
412
+ ${((i=(t=this.productsByCategory)==null?void 0:t.oftenIgnoredProducts)==null?void 0:i.length)>0?a`
413
413
  <span class="mealz-ds-text weight-xl">
414
414
  Déjà dans le placard
415
415
  </span>
416
416
  <div class="mealz-products-picker__list">
417
- ${this.productsByCategory.oftenIgnoredProducts.map(n=>{var i,l,c,_;return this.plannerMode?s`
417
+ ${this.productsByCategory.oftenIgnoredProducts.map(r=>{var s,n,l,d;return this.plannerMode?a`
418
418
  <mealz-product-card-planner
419
- .product="${n}"
419
+ .product="${r}"
420
420
  .recipeId="${this.recipe.id}"
421
421
  .oftenIgnored="${!0}"
422
- .initialGuests="${((i=this.recipe)==null?void 0:i.attributes["number-of-guests"])||4}"
423
- .currentGuests="${this.recipe.modifiedGuests||((l=this.recipe)==null?void 0:l.attributes["number-of-guests"])||4}"
422
+ .initialGuests="${((s=this.recipe)==null?void 0:s.attributes["number-of-guests"])||4}"
423
+ .currentGuests="${this.recipe.modifiedGuests||((n=this.recipe)==null?void 0:n.attributes["number-of-guests"])||4}"
424
424
  ></mealz-product-card-planner>
425
- `:s`
425
+ `:a`
426
426
  <mealz-product-card
427
- .product="${n}"
427
+ .product="${r}"
428
428
  .recipeId="${this.recipe.id}"
429
- .initialGuests="${((c=this.recipe)==null?void 0:c.attributes["number-of-guests"])||4}"
430
- .currentGuests="${this.recipe.modifiedGuests||((_=this.recipe)==null?void 0:_.attributes["number-of-guests"])||4}"
429
+ .initialGuests="${((l=this.recipe)==null?void 0:l.attributes["number-of-guests"])||4}"
430
+ .currentGuests="${this.recipe.modifiedGuests||((d=this.recipe)==null?void 0:d.attributes["number-of-guests"])||4}"
431
431
  ></mealz-product-card>
432
432
  `})}
433
433
  </div>
434
- `:o}
434
+ `:c}
435
435
  </div>
436
436
  ${this.renderLowerContent()}
437
437
  </div>
438
- `}renderHeader(){var e;return s`
438
+ `}renderHeader(){var e;return a`
439
439
  <div class="mealz-products-picker__header">
440
- ${this.totalProducts>0?s`
440
+ ${this.totalProducts>0?a`
441
441
  <div class="mealz-products-picker__header-text mealz-ds-text weight-xxl">
442
442
  <div class="mealz-products-picker__number-of-products">
443
443
  <span>${this.totalProducts}</span>
444
- ${this.totalProducts>1?s`<span>ingrédients</span>`:s`<span>ingrédient</span>`}
444
+ ${this.totalProducts>1?a`<span>ingrédients</span>`:a`<span>ingrédient</span>`}
445
445
  </div>
446
- ${this.numberUnavailableProducts>0?s`
446
+ ${this.numberUnavailableProducts>0?a`
447
447
  <mealz-unavailable-badge
448
448
  .numberUnavailable="${this.numberUnavailableProducts}"
449
449
  @clicked="${()=>this.scrollToFirstUnavailable()}">
450
450
  </mealz-unavailable-badge>
451
- `:o}
451
+ `:c}
452
452
  </div>
453
- `:o}
453
+ `:c}
454
454
  <!-- GUEST COUNTER FOR NO SUPPLIER MODE-->
455
- ${this.noSupplier?s`
455
+ ${this.noSupplier?a`
456
456
  <mealz-counter
457
457
  .floating="${!0}"
458
458
  .value="${(e=this.recipe)==null?void 0:e.modifiedGuests}"
@@ -461,7 +461,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
461
461
  class="mealz-products-picker__guest-counter"
462
462
  @valueChange="${()=>this.guestsChange()}"
463
463
  ></mealz-counter>
464
- `:o}
464
+ `:c}
465
465
  <!-- <div class="mealz-ds-dropdown">
466
466
  <select>
467
467
  <option *ngFor="let option of productsTypeOption">
@@ -470,27 +470,27 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
470
470
  </select>
471
471
  </div> -->
472
472
  </div>
473
- `}renderLowerContent(){return s`
473
+ `}renderLowerContent(){return a`
474
474
  <!-- MORE RECIPE IDEAS -->
475
475
  <div class="mealz-products-picker__more">
476
- ${!this.isAlreadyOnCatalogPage()&&!this.plannerMode?s`
476
+ ${!this.isAlreadyOnCatalogPage()&&!this.plannerMode?a`
477
477
  <a class="mealz-products-picker__more-anchor"
478
- href="${r.router.getCatalogUrl()}"
478
+ href="${o.router.getCatalogUrl()}"
479
479
  @click="${this.sendHomeDisplayEvent}">
480
480
  <button class="mealz-products-picker__go-to-catalog-button mealz-ds-button secondary">
481
481
  <span class="mealz-ds-text weight-l size-s">Voir plus d'idées repas</span>
482
482
  </button>
483
483
  </a>
484
- `:s`
484
+ `:a`
485
485
  <button class="mealz-products-picker__close-modal-button mealz-ds-button secondary" @click="${this.closeRecipeModal}">
486
486
  <span class="mealz-ds-text weight-l size-s">Voir plus d'idées repas</span>
487
487
  </button>
488
488
  `}
489
489
  </div>
490
490
  <mealz-legal-notice .tags="${this.recipe.relationships.tags}"></mealz-legal-notice>
491
- `}sendHomeDisplayEvent(){r.analytics.sendEvent("home.display",this.analyticsPath,{})}};k([p({type:Boolean})],z.prototype,"inBasket",2);k([p({type:Boolean})],z.prototype,"plannerMode",2);z=k([h("mealz-products-picker")],z);customElements.get("mealz-products-picker")||customElements.define("mealz-products-picker",z);var ne=Object.getOwnPropertyDescriptor,le=(e,t,a,n)=>{for(var i=n>1?void 0:n?ne(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let $=class extends u{constructor(){super(),this.invalidPos=!1,this.subscriptions=[],this.styleURL=new URL("./recipe-details/no-pos-selected/no-pos-selected.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.listenIfPosInvalid()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}listenIfPosInvalid(){this.subscriptions.push(r.recipes.invalidPosDisplay$.subscribe(e=>{this.invalidPos=e,this.requestUpdate()}))}callPosSelector(){const e=new CustomEvent("posSelected",{bubbles:!0,composed:!0});this.dispatchEvent(e)}openStoreLocator(){const e=document.querySelector("mealz-drawer-view-swapper");e&&e.displayStoreLocator$.next(!0)}render(){return s`
491
+ `}sendHomeDisplayEvent(){o.analytics.sendEvent("home.display",this.analyticsPath,{})}};q([p({type:Boolean})],T.prototype,"inBasket",2);q([p({type:Boolean})],T.prototype,"plannerMode",2);T=q([g("mealz-products-picker")],T);customElements.get("mealz-products-picker")||customElements.define("mealz-products-picker",T);var Le=Object.getOwnPropertyDescriptor,Be=(e,t,i,r)=>{for(var s=r>1?void 0:r?Le(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let M=class extends m{constructor(){super(),this.invalidPos=!1,this.subscriptions=[],this.styleURL=new URL("./recipe-details/no-pos-selected/no-pos-selected.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.listenIfPosInvalid()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}listenIfPosInvalid(){this.subscriptions.push(o.recipes.invalidPosDisplay$.subscribe(e=>{this.invalidPos=e,this.requestUpdate()}))}callPosSelector(){const e=new CustomEvent("posSelected",{bubbles:!0,composed:!0});this.dispatchEvent(e)}openStoreLocator(){const e=document.querySelector("mealz-drawer-view-swapper");e&&e.displayStoreLocator$.next(!0)}render(){return a`
492
492
  <div class="mealz-no-pos-selected">
493
- ${this.invalidPos?s`
493
+ ${this.invalidPos?a`
494
494
  <!-- INVALID POS -->
495
495
  <img
496
496
  class="mealz-no-pos-selected__picture"
@@ -505,7 +505,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
505
505
  Vous pouvez sélectionner un autre magasin ou consulter la fiche recette
506
506
  </span>
507
507
  </div>
508
- `:s`
508
+ `:a`
509
509
  <!-- NO POS SELECTED -->
510
510
  <img
511
511
  class="mealz-no-pos-selected__picture"
@@ -528,13 +528,13 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
528
528
  Sélectionner un magasin
529
529
  </button>
530
530
  </div>
531
- `}};$=le([h("mealz-no-pos-selected")],$);customElements.get("mealz-no-pos-selected")||customElements.define("mealz-no-pos-selected",$);var ce=Object.getOwnPropertyDescriptor,oe=(e,t,a,n)=>{for(var i=n>1?void 0:n?ce(t,a):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(i=c(i)||i);return i};let O=class extends u{constructor(){super(),this.activeTabIndex=0,this.subscriptions=[],this.remainingBasketEntries=[],this.guestObserverService=L.getInstance(),this.isSticky=!1,this.styleURL=new URL("./recipe-details/recipe-details.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.handleNoSupplierMode(),this.subscriptions.push(w(r.recipes.displayedRecipe$.pipe(I(e=>!!e),G(e=>{this.recipe=e.recipe,this.sponsor=e.recipe.relationships.sponsors.data[0],this.analyticsPath=`/recipes/${this.recipe.id}/shopping`,this.plannerMode=e.planner,this.getLikeButton(),this.checkSponsorStorytelling(),this.pageview(),this.listenToCloseEvent(),this.setStickyObserver(),this.startRecipeDetailsOnboardingIfNeeded()}),T(()=>this.listenToRecipeInBasket())),this.listenPosStatus(),this.listenRemainingBasketEntries(),this.listenLastOrderDate(),this.listenToLoadingStates(),this.listenToAddAllToBasket()).subscribe(()=>{this.requestUpdate()})),this.addEventListener("products-picker-ready",()=>this.startRecipeDetailsOnboardingIfNeeded())}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.topObserver&&this.topObserver.disconnect(),this.stickyTimeout&&clearTimeout(this.stickyTimeout)}setStickyObserver(){this.topObserver||this.updateComplete.then(()=>{const e=this.querySelector(".mealz-recipe-details__sticky-anchor");e&&(this.topObserver=new IntersectionObserver(([t])=>{this.stickyTimeout&&clearTimeout(this.stickyTimeout),this.stickyTimeout=window.setTimeout(()=>{const a=!t.isIntersecting;this.isSticky!==a&&(this.isSticky=a,this.requestUpdate())},150)},{threshold:0}),this.topObserver.observe(e))})}startRecipeDetailsOnboardingIfNeeded(){localStorage.getItem("_miam/recipeDetailsOnboarding")==="true"||!this.plannerMode||this.updateComplete.then(()=>{this.scrollJustAfterImage();let t=document.querySelector("mealz-planner-onboarding");t?t.type="recipe-details":(t=new q,t.type="recipe-details",document.body.appendChild(t)),t.launchOnboardingTour()})}scrollJustAfterImage(){const e=this.querySelector(".mealz-recipe-details__tabs");if(!e)return;const t=document.querySelector(".mealz-drawer__content-container");if(t){const a=e.getBoundingClientRect(),n=t.getBoundingClientRect();t.scrollTop+=a.top-n.top;return}e.scrollIntoView({behavior:"smooth",block:"start"})}handleNoSupplierMode(){this.noSupplier=r.supplier.isNoSupplier(),this.requestUpdate()}close(){this.sendCloseEvent(),r.recipes.displayedRecipe$.next(null)}listenToCloseEvent(){document.querySelector("mealz-drawer").addEventListener("drawerClosed",()=>{this.sendCloseEvent()})}selectTab(e){this.activeTabIndex=e,this.activeTabIndex===1&&this.sendCookingDisplayEvent(),this.requestUpdate()}getLikeButton(){this.noSupplier||this.subscriptions.push(r.user.isAuthenticated().pipe(I(e=>e),T(()=>r.html.like(this.recipe.id))).subscribe(e=>{this.likeButtonHTML=e,this.requestUpdate()}))}checkSponsorStorytelling(){this.sponsor&&this.subscriptions.push(r.sponsor.hasStorytelling(this.sponsor.id).subscribe(e=>{this.hasSponsorStorytelling=e,this.requestUpdate()}))}listenPosStatus(){return E({noPosDisplay:r.recipes.noPosDisplay$,invalidPosDisplay:r.recipes.invalidPosDisplay$}).pipe(d(({noPosDisplay:e,invalidPosDisplay:t})=>{this.noPosDisplay=e,this.invalidPosDisplay=t,this.activeTabIndex=e?1:0}))}listenLastOrderDate(){return r.recipes.orderHistoryDate$.pipe(d(e=>{this.orderHistoryDate=e}))}listenToLoadingStates(){return E([r.recipes.ingredientToBasketLoading$,r.recipes.updateIngredientFromBasketLoading$]).pipe(d(([e,t])=>{this.basketIsUpdating=e||t}))}listenRemainingBasketEntries(){return r.recipes.remainingBasketEntries$.pipe(d(e=>{this.remainingBasketEntries=e}))}listenToAddAllToBasket(){return r.recipes.allIngredientsToBasketLoading$.pipe(d(e=>{e&&(this.selectTab(0),setTimeout(()=>{this.scrollToPicker()},50))}))}listenToRecipeInBasket(){return r.recipes.isRecipeInBasket(this.recipe.id).pipe(d(e=>{this.inBasket=e}))}scrollToPicker(){const e=this.querySelector(".mealz-products-picker");if(e){const t=this.querySelector(".mealz-recipe-details__title-container"),a=(t==null?void 0:t.offsetHeight)||0;e.style.scrollMarginTop=`${a}px`,e.scrollIntoView({behavior:"instant",block:"start"})}}scrollToReplacedItem(e){var a,n;const t=this.querySelectorAll("mealz-product-card-planner");for(const i of Array.from(t)){const l=i;if(((n=(a=l.product)==null?void 0:a.item)==null?void 0:n.id)===e){l.scrollIntoView({behavior:"instant",block:"center"});break}}}openLastOrderModal(){this.sendOrderedDisplayEvent();const e=new M;e.recipeId=this.recipe.id,e.addEventListener("orderAgain",()=>this.orderAgain()),e.displayLastOrderModal(this.orderHistoryDate)}orderAgain(){r.recipes.addAllIngredientsToBasket({originPath:this.analyticsPath,props:{}})}updateGuests(e){if(this.recipe.modifiedGuests===e.detail.value)return;this.recipe.modifiedGuests=e.detail.value,this.guestObserverService.updateGuests(this.recipe.modifiedGuests);const t={originPath:this.analyticsPath,props:{}};this.plannerMode?r.planner.updateGuests(this.recipe.modifiedGuests,t):r.recipes.updateGuests(t),this.requestUpdate()}render(){return s`
531
+ `}};M=Be([g("mealz-no-pos-selected")],M);customElements.get("mealz-no-pos-selected")||customElements.define("mealz-no-pos-selected",M);var Ue=Object.getOwnPropertyDescriptor,Ae=(e,t,i,r)=>{for(var s=r>1?void 0:r?Ue(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(s=l(s)||s);return s};let J=class extends m{constructor(){super(),this.activeTabIndex=0,this.destroy$=new D,this.remainingBasketEntries=[],this.guestObserverService=te.getInstance(),this.isSticky=!1,this.styleURL=new URL("./recipe-details/recipe-details.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.destroy$=new D,this.handleNoSupplierMode(),Z(o.recipes.displayedRecipe$.pipe(w(this.destroy$),j(e=>!!e),z(e=>{this.recipe=e.recipe,this.sponsor=e.recipe.relationships.sponsors.data[0],this.analyticsPath=`/recipes/${this.recipe.id}/shopping`,this.plannerMode=!!e.planner,this.getLikeButton(),this.checkSponsorStorytelling(),this.pageview(),this.listenToCloseEvent(),this.setStickyObserver()}),V(()=>this.listenToRecipeInBasket())),this.listenPosStatus(),this.listenRemainingBasketEntries(),this.listenLastOrderDate(),this.listenToLoadingStates(),this.listenToAddAllToBasket()).pipe(w(this.destroy$)).subscribe({next:()=>this.requestUpdate(),error:e=>console.error("Recipe details error:",e)}),this.addEventListener("products-picker-ready",()=>this.startRecipeDetailsOnboardingIfNeeded())}disconnectedCallback(){super.disconnectedCallback(),this.destroy$.next(),this.destroy$.complete(),this.topObserver&&this.topObserver.disconnect(),this.stickyTimeout&&clearTimeout(this.stickyTimeout)}setStickyObserver(){this.topObserver||this.updateComplete.then(()=>{const e=this.querySelector(".mealz-recipe-details__sticky-anchor");e&&(this.topObserver=new IntersectionObserver(([t])=>{this.stickyTimeout&&clearTimeout(this.stickyTimeout),this.stickyTimeout=window.setTimeout(()=>{const i=!t.isIntersecting;this.isSticky!==i&&(this.isSticky=i,this.requestUpdate())},150)},{threshold:0}),this.topObserver.observe(e))})}startRecipeDetailsOnboardingIfNeeded(){localStorage.getItem("_miam/recipeDetailsOnboarding")==="true"||!this.plannerMode||this.updateComplete.then(()=>{this.scrollJustAfterImage();let t=document.querySelector("mealz-planner-onboarding");t?t.type="recipe-details":(t=new ue,t.type="recipe-details",document.body.appendChild(t)),t.launchOnboardingTour()})}scrollJustAfterImage(){const e=this.querySelector(".mealz-recipe-details__tabs");if(!e)return;const t=document.querySelector(".mealz-drawer__content-container");if(t){const i=e.getBoundingClientRect(),r=t.getBoundingClientRect();t.scrollTop+=i.top-r.top;return}e.scrollIntoView({behavior:"smooth",block:"start"})}handleNoSupplierMode(){this.noSupplier=!!o.supplier.isNoSupplier(),this.requestUpdate()}close(){this.sendCloseEvent(),o.recipes.displayedRecipe$.next(null)}listenToCloseEvent(){const e=document.querySelector("mealz-drawer");e&&e.addEventListener("drawerClosed",()=>{this.sendCloseEvent()})}selectTab(e){this.activeTabIndex=e,this.activeTabIndex===1&&this.sendCookingDisplayEvent(),this.requestUpdate()}getLikeButton(){this.noSupplier||o.user.isAuthenticated().pipe(w(this.destroy$),j(e=>e),V(()=>o.html.like(this.recipe.id))).subscribe({next:e=>{this.likeButtonHTML=e,this.requestUpdate()},error:e=>console.error("Like button error:",e)})}checkSponsorStorytelling(){this.sponsor&&o.sponsor.hasStorytelling(this.sponsor.id).pipe(w(this.destroy$)).subscribe({next:e=>{this.hasSponsorStorytelling=e,this.requestUpdate()},error:e=>console.error("Sponsor storytelling error:",e)})}listenPosStatus(){return H({noPosDisplay:o.recipes.noPosDisplay$,invalidPosDisplay:o.recipes.invalidPosDisplay$}).pipe(z(({noPosDisplay:e,invalidPosDisplay:t})=>{this.noPosDisplay=e,this.invalidPosDisplay=t,this.activeTabIndex=e?1:0}),h(()=>{}))}listenLastOrderDate(){return o.recipes.orderHistoryDate$.pipe(z(e=>{this.orderHistoryDate=e}))}listenToLoadingStates(){return H([o.recipes.ingredientToBasketLoading$,o.recipes.updateIngredientFromBasketLoading$]).pipe(h(([e,t])=>e||t),z(e=>{this.basketIsUpdating=e}),be(1))}listenRemainingBasketEntries(){return o.recipes.remainingBasketEntries$.pipe(z(e=>{this.remainingBasketEntries=e}))}listenToAddAllToBasket(){return o.recipes.allIngredientsToBasketLoading$.pipe(z(e=>{e&&(this.selectTab(0),setTimeout(()=>{this.scrollToPicker()},50))}))}listenToRecipeInBasket(){return o.recipes.isRecipeInBasket(this.recipe.id).pipe(z(e=>{this.inBasket=e}))}scrollToPicker(){const e=this.querySelector(".mealz-products-picker");if(e){const t=this.querySelector(".mealz-recipe-details__title-container"),i=(t==null?void 0:t.offsetHeight)||0;e.style.scrollMarginTop=`${i}px`,e.scrollIntoView({behavior:"instant",block:"start"})}}scrollToReplacedItem(e){var i,r;const t=this.querySelectorAll("mealz-product-card-planner");for(const s of Array.from(t)){const n=s;if(((r=(i=n.product)==null?void 0:i.item)==null?void 0:r.id)===e){n.scrollIntoView({behavior:"instant",block:"center"});break}}}openLastOrderModal(){this.sendOrderedDisplayEvent();const e=new de;e.recipeId=this.recipe.id,e.addEventListener("orderAgain",()=>this.orderAgain()),e.displayLastOrderModal(this.orderHistoryDate)}orderAgain(){o.recipes.addAllIngredientsToBasket({originPath:this.analyticsPath,props:{}})}updateGuests(e){if(this.recipe.modifiedGuests===e.detail.value)return;this.recipe.modifiedGuests=e.detail.value,this.guestObserverService.updateGuests(this.recipe.modifiedGuests);const t={originPath:this.analyticsPath,props:{}};this.plannerMode?o.planner.updateGuests(this.recipe.modifiedGuests,t):o.recipes.updateGuests(t),this.requestUpdate()}render(){return a`
532
532
  <div class="mealz-recipe-details">
533
533
  <!-- IF IS LOADING -->
534
- ${this.recipe?o:s`
534
+ ${this.recipe?c:a`
535
535
  <div class="mealz-ds-loader mealz-recipe-details__loader"></div>`}
536
536
  <!-- IF IS NOT LOADING AND RECIPE EXISTS -->
537
- ${this.recipe?s`
537
+ ${this.recipe?a`
538
538
  <div class="mealz-recipe-details__container">
539
539
  <!-- BANNER CONTAINER -->
540
540
  <div class="mealz-recipe-details__picture ${this.noSupplier?"no-supplier":""}">
@@ -567,25 +567,25 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
567
567
  src="${this.recipe.attributes["media-url"]}"
568
568
  class="mealz-recipe-details__picture-img">
569
569
  <!-- Filigrane logo -->
570
- ${this.recipe.attributes["filigrane-logo-url"]?s`
570
+ ${this.recipe.attributes["filigrane-logo-url"]?a`
571
571
  <div class="mealz-recipe-details__picture__filigrane">
572
572
  <img alt="filigrane logo" src=${this.recipe.filigraneLogoUrl}>
573
- </div>`:o}
573
+ </div>`:c}
574
574
  </div>
575
575
  <!-- SPONSOR -->
576
576
  <div class="mealz-recipe-details__sponsor">
577
- ${this.recipe.attributes["informational-page-html"]&&this.hasSponsorStorytelling?this.renderAddonLink():o}
577
+ ${this.recipe.attributes["informational-page-html"]&&this.hasSponsorStorytelling?this.renderAddonLink():c}
578
578
  <hr class="mealz-recipe-details__sponsor-separator">
579
579
  </div>
580
580
  <!-- LAST ORDER BADGE -->
581
- ${this.orderHistoryDate?s`
581
+ ${this.orderHistoryDate?a`
582
582
  <div class="mealz-recipe-details__last-order-badge">
583
583
  <mealz-last-order-badge
584
584
  .orderHistoryDate=${this.orderHistoryDate}
585
585
  .disabled=${this.plannerMode}
586
586
  @openLastOrderModal=${()=>this.openLastOrderModal()}>
587
587
  </mealz-last-order-badge>
588
- </div>`:o}
588
+ </div>`:c}
589
589
  <div class="mealz-recipe-details__sticky-anchor"></div>
590
590
  <!-- STICKY HEADER -->
591
591
  <div class="mealz-recipe-details__sticky-header">
@@ -599,7 +599,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
599
599
  <div class="mealz-recipe-details__actions__icon">
600
600
  <!-- LIKE BUTTON -->
601
601
  <div class="mealz-recipe-details__like-button">
602
- ${N(this.likeButtonHTML)}
602
+ ${pe(this.likeButtonHTML)}
603
603
  </div>
604
604
  <!-- CLOSE MODAL BUTTON -->
605
605
  <div class="mealz-recipe-details__hideable-actions ${this.isSticky?"sticky":""}">
@@ -614,11 +614,11 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
614
614
  </div>
615
615
  </div>
616
616
  <!-- STORE INDICATOR -->
617
- ${this.noSupplier?s`
618
- <mealz-store-indicator .analyticsPath=${this.analyticsPath}></mealz-store-indicator>`:o}
617
+ ${this.noSupplier?a`
618
+ <mealz-store-indicator .analyticsPath=${this.analyticsPath}></mealz-store-indicator>`:c}
619
619
  </div>
620
620
  <!-- RECIPE BASIC INFORMATIONS + TABS -->
621
- ${this.noSupplier?o:s`
621
+ ${this.noSupplier?c:a`
622
622
  <!-- RECIPE BASIC INFORMATIONS -->
623
623
  <mealz-details-infos class="mealz-recipe-details__infos"></mealz-details-infos>
624
624
  <!-- TABS TO SWITCH BETWEEN BASKET AND INSTRUCTIONS -->
@@ -636,7 +636,7 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
636
636
  ${this.renderTabContent()}
637
637
  </div>
638
638
  <!-- FOOTER -->
639
- ${this.activeTabIndex===0&&!this.noPosDisplay||this.plannerMode?s`
639
+ ${this.activeTabIndex===0&&!this.noPosDisplay||this.plannerMode?a`
640
640
  <mealz-details-footer
641
641
  .noPosDisplay=${this.noPosDisplay}
642
642
  .noSupplier=${this.noSupplier}
@@ -644,17 +644,17 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
644
644
  .plannerMode=${this.plannerMode}
645
645
  .guests=${this.recipe.modifiedGuests}
646
646
  .recipe=${this.recipe}
647
- ></mealz-details-footer>`:o}
647
+ ></mealz-details-footer>`:c}
648
648
  </div>
649
- `:o}
649
+ `:c}
650
650
  </div>
651
- `}renderTabContent(){return s`
651
+ `}renderTabContent(){return a`
652
652
  <div class="mealz-recipe-details__products-tab ${this.activeTabIndex===0?"":"hidden"}">
653
- ${!this.noPosDisplay&&!this.invalidPosDisplay?s`
653
+ ${!this.noPosDisplay&&!this.invalidPosDisplay?a`
654
654
  <mealz-products-picker
655
655
  .inBasket=${this.inBasket}
656
656
  .plannerMode=${this.plannerMode}
657
- ></mealz-products-picker>`:s`
657
+ ></mealz-products-picker>`:a`
658
658
  <mealz-no-pos-selected
659
659
  .noPos=${this.noPosDisplay}
660
660
  .invalidPos=${this.invalidPosDisplay}
@@ -668,14 +668,14 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
668
668
  <!-- RECIPE INSTRUCTIONS -->
669
669
  <mealz-details-steps></mealz-details-steps>
670
670
  <!-- ORDER AGAIN -->
671
- ${this.orderHistoryDate&&this.remainingBasketEntries.length>0&&!this.plannerMode?s`
671
+ ${this.orderHistoryDate&&this.remainingBasketEntries.length>0&&!this.plannerMode?a`
672
672
  <mealz-order-again .recipeId=${this.recipe.id} @orderAgain=${()=>this.orderAgain()}></mealz-order-again>
673
- `:o}
673
+ `:c}
674
674
  </div>
675
- `}renderAddonLink(){var e;return s`
675
+ `}renderAddonLink(){var e;return a`
676
676
  <div class="mealz-addon-link">
677
677
  <div class="mealz-addon-link__info">
678
- ${this.recipe.attributes["informational-sentence"]?s`<span class="mealz-ds-text size-s weight-l">${this.recipe.attributes["informational-sentence"]}</span>`:s`
678
+ ${this.recipe.attributes["informational-sentence"]?a`<span class="mealz-ds-text size-s weight-l">${this.recipe.attributes["informational-sentence"]}</span>`:a`
679
679
  <span class="mealz-ds-text size-s weight-l">
680
680
  <span>Cette recette vous est proposée par notre partenaire</span>
681
681
  <span class="mealz-addon-link__sponsor-name">
@@ -683,16 +683,16 @@ import"../drawer/drawer.min.js";import"../recipe-pricing/recipe-pricing.min.js";
683
683
  </span>
684
684
  </span>
685
685
  `}
686
- ${(e=this.recipe.attributes)!=null&&e["informational-page-html"]||this.hasSponsorStorytelling?s`
686
+ ${(e=this.recipe.attributes)!=null&&e["informational-page-html"]||this.hasSponsorStorytelling?a`
687
687
  <span class="mealz-addon-link__link mealz-ds-text size-s weight-xl" @click=${()=>this.showRecipeAddon()}>
688
688
  En savoir plus
689
689
  </span>
690
- `:o}
690
+ `:c}
691
691
  </div>
692
- ${this.sponsor.attributes["logo-url"]?s`
692
+ ${this.sponsor.attributes["logo-url"]?a`
693
693
  <div class="mealz-addon-link__logo">
694
694
  <img src="${this.sponsor.attributes["logo-url"]}" alt="${this.sponsor.attributes.name} logo" />
695
695
  </div>
696
- `:o}
696
+ `:c}
697
697
  </div>
698
- `}showRecipeAddon(){this.sendSponsorDisplayEvent(),document.querySelector("mealz-drawer-view-swapper").displayRecipeAddon$.next(!0)}pageview(){r.analytics.sendEvent("pageview",this.analyticsPath,{})}sendSponsorDisplayEvent(){r.analytics.sendEvent("sponsor.display",this.analyticsPath,{recipe_id:this.recipe.id})}sendCloseEvent(){r.analytics.sendEvent("recipe.close",this.analyticsPath,{recipe_id:this.recipe.id})}sendCookingDisplayEvent(){r.analytics.sendEvent("recipe.cooking.display",this.analyticsPath,{recipe_id:this.recipe.id})}sendOrderedDisplayEvent(){r.analytics.sendEvent("recipe.ordered.display",this.analyticsPath,{recipe_id:this.recipe.id})}};O=oe([h("mealz-recipe-details")],O);
698
+ `}showRecipeAddon(){this.sendSponsorDisplayEvent();const e=document.querySelector("mealz-drawer-view-swapper");e&&e.displayRecipeAddon$.next(!0)}pageview(){o.analytics.sendEvent("pageview",this.analyticsPath,{})}sendSponsorDisplayEvent(){o.analytics.sendEvent("sponsor.display",this.analyticsPath,{recipe_id:this.recipe.id})}sendCloseEvent(){o.analytics.sendEvent("recipe.close",this.analyticsPath,{recipe_id:this.recipe.id})}sendCookingDisplayEvent(){o.analytics.sendEvent("recipe.cooking.display",this.analyticsPath,{recipe_id:this.recipe.id})}sendOrderedDisplayEvent(){o.analytics.sendEvent("recipe.ordered.display",this.analyticsPath,{recipe_id:this.recipe.id})}};J=Ae([g("mealz-recipe-details")],J);