mealz-components 2.0.0-beta.6 → 2.0.0-beta.8
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.
- package/dist/add-to-cart-cta/add-to-cart-cta.min.js +1 -1
- package/dist/assets/OperatorSubscriber-z_a6lCKk.js +1 -0
- package/dist/assets/async-H-Co76Oa.js +1 -0
- package/dist/assets/{combineLatest-P4GAEtOW.js → combineLatest-DNi66MsF.js} +1 -1
- package/dist/assets/{debounceTime-Bo5F3ux-.js → debounceTime-CIA2MWDj.js} +1 -1
- package/dist/assets/delay-0L99jHsb.js +1 -0
- package/dist/assets/distinctUntilChanged-Ckq1Syk_.js +1 -0
- package/dist/assets/empty-DGYYDWIm.js +1 -0
- package/dist/assets/executeSchedule-CTqB8mra.js +1 -0
- package/dist/assets/{filter-CEeE8t7I.js → filter-DuHsB8oM.js} +1 -1
- package/dist/assets/{from-jBe2xW5a.js → from-Btz8AgkO.js} +1 -1
- package/dist/assets/http-BGziD2u2.js +1 -0
- package/dist/assets/{innerFrom-CfKCbnvr.js → innerFrom-CVMPVEmB.js} +1 -1
- package/dist/assets/{map-C4rf5Jbc.js → map-oxUcVNGT.js} +1 -1
- package/dist/assets/mapOneOrManyArgs-Do0PsDok.js +1 -0
- package/dist/assets/mealz-sdk-DWLzEfKz.js +1 -0
- package/dist/assets/merge-OrXqfOOP.js +1 -0
- package/dist/assets/mergeMap-CMaM5Agw.js +1 -0
- package/dist/assets/no-shadow-element-DlGA0h9b.js +21 -0
- package/dist/assets/{of-BTA69Qgj.js → of-CH-D5SN9.js} +1 -1
- package/dist/assets/price-DcNF55ef.js +1 -0
- package/dist/assets/{product-card-DqcKyf1c.js → product-card-Be_9YL6f.js} +1 -1
- package/dist/assets/{promotion-badge-BwN2GpDz.js → promotion-badge-2uUuiRau.js} +1 -1
- package/dist/assets/{property-leIVgCvV.js → property-Bg80vXcm.js} +1 -1
- package/dist/assets/query-BApjzB0v.js +9 -0
- package/dist/assets/session-handler-BiuedJFx.js +1 -0
- package/dist/assets/{skipWhile-DuMEda_n.js → skipWhile-BAgfjfH2.js} +1 -1
- package/dist/assets/{state-CccUMzBZ.js → state-bsKs-Mb2.js} +1 -1
- package/dist/assets/{store-locator-m8sx3XDc.js → store-locator-CKwiyckb.js} +4 -12
- package/dist/assets/{switchMap-D8q0hRYH.js → switchMap-vA0vSKy4.js} +1 -1
- package/dist/assets/{take-DO4w5a1Y.js → take-BmqRVy-3.js} +1 -1
- package/dist/assets/tap-C4xC1M3N.js +1 -0
- package/dist/assets/{timer-BOl4bYNY.js → timer-DmQ_oP6s.js} +1 -1
- package/dist/assets/{unsafe-html-CmALAWuN.js → unsafe-html-MRC87lfr.js} +1 -1
- package/dist/assets/{viewport-listener-RTCBatPv.js → viewport-listener-BuonFDBs.js} +1 -1
- package/dist/basket-transfer-modal/basket-transfer-modal.min.js +1 -1
- package/dist/catalog/basket-preview/basket-preview.min.js +8 -8
- package/dist/catalog/catalog-category/catalog-category.min.js +1 -1
- package/dist/catalog/catalog-favorites/catalog-favorites.min.js +1 -1
- package/dist/catalog/catalog-history/catalog-history.min.js +1 -1
- package/dist/catalog/catalog-home/catalog-home.min.js +1 -1
- package/dist/catalog/catalog-list/catalog-list.min.js +1 -1
- package/dist/catalog/catalog-load-more.min.js +1 -1
- package/dist/catalog/catalog-tabs/catalog-tabs.min.js +1 -1
- package/dist/catalog/catalog-toolbar/catalog-toolbar.min.js +1 -1
- package/dist/catalog/my-meals-button/my-meals-button.min.js +1 -1
- package/dist/counter/counter.min.js +1 -1
- package/dist/drawer/drawer.min.js +2 -2
- package/dist/drawer-view-swapper/drawer-view-swapper.min.js +4 -4
- package/dist/history-drawer/history-drawer.min.js +1 -1
- package/dist/history-order/history-order.min.js +1 -1
- package/dist/history-order-expanded/history-order-expanded.min.js +1 -1
- package/dist/last-order-badge/last-order-badge.min.js +1 -1
- package/dist/last-order-modal/last-order-modal.min.js +1 -1
- package/dist/like-button/like-button.min.js +1 -1
- package/dist/modal/modal.min.js +6 -6
- package/dist/onboarding/analytics/onboarding-analytics.min.js +1 -0
- package/dist/onboarding/events.min.js +1 -0
- package/dist/onboarding/onboarding.css +1 -0
- package/dist/onboarding/onboarding.min.js +41 -0
- package/dist/order-again/order-again.min.js +1 -1
- package/dist/planner/helpers/open-onboarding-modal.min.js +1 -0
- package/dist/planner/planner-abandon-modal/planner-abandon-modal.min.js +1 -1
- package/dist/planner/planner-budget-gauge/planner-budget-gauge.min.js +1 -1
- package/dist/planner/planner-catalog/planner-catalog.min.js +2 -2
- package/dist/planner/planner-current-menu/planner-current-menu.css +1 -1
- package/dist/planner/planner-current-menu/planner-current-menu.min.js +1 -1
- package/dist/planner/planner-current-menu-modal/planner-current-menu-modal.min.js +2 -2
- package/dist/planner/planner-dashboard/planner-dashboard.css +1 -1
- package/dist/planner/planner-dashboard/planner-dashboard.min.js +1 -1
- package/dist/planner/planner-form/planner-form.min.js +1 -1
- package/dist/planner/planner-menu-option/planner-menu-option.min.js +1 -1
- package/dist/planner/planner-onboarding/planner-onboarding.min.js +1 -0
- package/dist/planner/planner-onboarding-modal/planner-onboarding-modal.css +1 -0
- package/dist/planner/planner-onboarding-modal/planner-onboarding-modal.min.js +53 -0
- package/dist/planner/planner-open-catalog-modal/planner-open-catalog-modal.min.js +2 -2
- package/dist/planner/planner-recipe-card/planner-recipe-card.min.js +1 -1
- package/dist/planner/planner-recipe-list/planner-recipe-list.min.js +1 -1
- package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.min.js +1 -1
- package/dist/planner/planner-welcome-modal/planner-welcome-modal.css +1 -0
- package/dist/planner/planner-welcome-modal/planner-welcome-modal.min.js +17 -0
- package/dist/planner/to-basket-loader/to-basket-loader.min.js +1 -1
- package/dist/preferences/preferences.min.js +1 -1
- package/dist/price/price.min.js +1 -1
- package/dist/recipe-card/recipe-card.min.js +1 -1
- package/dist/recipe-card-cta/recipe-card-cta.min.js +1 -1
- package/dist/recipe-details/recipe-details.min.js +110 -110
- package/dist/recipe-pricing/recipe-pricing.min.js +1 -1
- package/dist/replace-item/replace-item-card/replace-item-card.min.js +1 -1
- package/dist/replace-item/replace-item.min.js +1 -1
- package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.min.js +4 -4
- package/dist/replace-item-planner/replace-item-planner.min.js +2 -2
- package/dist/slider-tabs/slider-tabs.min.js +1 -1
- package/dist/store-indicator/store-indicator.min.js +2 -2
- package/dist/store-locator-drawer/store-locator-drawer.min.js +1 -1
- package/package.json +1 -1
- package/dist/assets/OperatorSubscriber-EGuECN6g.js +0 -1
- package/dist/assets/async-D3oCs_PQ.js +0 -1
- package/dist/assets/delay-ILvLVH1b.js +0 -1
- package/dist/assets/distinctUntilChanged-BkBiB4M3.js +0 -1
- package/dist/assets/empty-Cv-4tfKR.js +0 -1
- package/dist/assets/executeSchedule-DfyZaGAH.js +0 -1
- package/dist/assets/http-aOzufNsj.js +0 -1
- package/dist/assets/mapOneOrManyArgs-DNd_tswl.js +0 -1
- package/dist/assets/merge-C-u9uFzU.js +0 -1
- package/dist/assets/mergeMap-buGewtOo.js +0 -1
- package/dist/assets/no-shadow-element-l9trQfcI.js +0 -21
- package/dist/assets/price-BoM226Kw.js +0 -1
- package/dist/assets/session-handler-BnuvphmJ.js +0 -1
- package/dist/assets/tap-BCGrRktL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as D,N as z,B as A
|
|
1
|
+
import{O as D,N as z,B as A}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as C}from"../assets/custom-element-BhZVzxrc.js";import{m as c}from"../assets/mealz-sdk-DWLzEfKz.js";import{f as P}from"../assets/filter-DuHsB8oM.js";import{a as _,b as k,c as w}from"../assets/combineLatest-DNi66MsF.js";import{s as O}from"../assets/skipWhile-BAgfjfH2.js";import{s as g}from"../assets/switchMap-vA0vSKy4.js";import{i as L}from"../assets/innerFrom-CVMPVEmB.js";import{b as F}from"../assets/from-Btz8AgkO.js";import{c as E}from"../assets/OperatorSubscriber-z_a6lCKk.js";import{m as R}from"../assets/mapOneOrManyArgs-Do0PsDok.js";import{o as f}from"../assets/of-CH-D5SN9.js";import{t as y}from"../assets/take-BmqRVy-3.js";import{t as $}from"../assets/tap-C4xC1M3N.js";import"../assets/executeSchedule-CTqB8mra.js";import"../assets/map-oxUcVNGT.js";import"../assets/empty-DGYYDWIm.js";function B(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=F(e),s=_(e),t=s.args,a=s.keys,l=new D(function(h){var o=t.length;if(!o){h.complete();return}for(var n=new Array(o),u=o,b=o,I=function(v){var m=!1;L(t[v]).subscribe(E(h,function(M){m||(m=!0,b--),n[v]=M},function(){return u--},void 0,function(){(!u||!m)&&(b||h.next(a?k(a,n):n),h.complete())}))},d=0;d<o;d++)I(d)});return r?l.pipe(R(r)):l}class p{constructor(){this.priceMemorized=new Map,this.displayedPrices=new Set,this.cleanupInterval=null,this.MAX_MEMO_SIZE=500,this.CLEANUP_INTERVAL=600*1e3,this.handlePageUnload=()=>{this.destroy()},this.startAutoCleanup(),this.setupPageUnloadListener()}static getInstance(){return p.instance||(p.instance=new p),p.instance}getMemorizedPrice(i,r){const s=`${i}-${r}`;return this.priceMemorized.get(s)}memorizedPrice(i,r,s){const t=`${i}-${r}`;this.priceMemorized.size>=this.MAX_MEMO_SIZE&&this.cleanOldPrices(),this.priceMemorized.set(t,{price:s,guests:r})}isPriceDisplayed(i,r){const s=`${i}-${r}`;return this.displayedPrices.has(s)}markPriceAsDisplayed(i,r){const s=`${i}-${r}`;this.displayedPrices.add(s)}cleanOldPrices(){this.priceMemorized.size>this.MAX_MEMO_SIZE*.8&&Array.from(this.priceMemorized.entries()).slice(0,Math.floor(this.priceMemorized.size*.3)).forEach(([s])=>{this.priceMemorized.delete(s),this.displayedPrices.delete(s)})}clearAllPrices(){this.priceMemorized.clear(),this.displayedPrices.clear()}destroy(){window.removeEventListener("beforeunload",this.handlePageUnload),this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null),this.priceMemorized.clear(),this.displayedPrices.clear(),p.instance=null}startAutoCleanup(){this.cleanupInterval=window.setInterval(()=>{this.cleanOldPrices()},this.CLEANUP_INTERVAL)}setupPageUnloadListener(){window.addEventListener("beforeunload",this.handlePageUnload)}}var V=Object.getOwnPropertyDescriptor,N=(e,i,r,s)=>{for(var t=s>1?void 0:s?V(i,r):i,a=e.length-1,l;a>=0;a--)(l=e[a])&&(t=l(t)||t);return t};let S=class extends z{constructor(){super(...arguments),this.formattedPrice="",this.rendered=new A(!1),this.inBasket=!1,this.planner=!1,this.lastPlannerPrice=0,this.plannerPriceSubscription=null,this.lastAppliedPrice="",this.priceDisplayed=!1,this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.classList.add("re-rendering"),this.getInitialStatus(),this.setupSubscriptions(),requestAnimationFrame(()=>{this.classList.remove("re-rendering")})}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.plannerPriceSubscription&&(this.plannerPriceSubscription.unsubscribe(),this.plannerPriceSubscription=null)}setupSubscriptions(){this.subscriptions.push(c.recipes.guestsUpdated().subscribe(e=>{e.recipeId===this.recipeId&&(this.serves=e.guests,this.recalculatePrice())}),this.listenToBasket(),this.setupDisplayedRecipeSubscription(),this.setupGuestUpdatesSubscription(),this.setupMenuPriceSubscription())}setupDisplayedRecipeSubscription(){return c.recipes.displayedRecipe$.pipe(P(()=>this.planner&&!!this.recipeId)).subscribe(e=>{var i;((i=e==null?void 0:e.recipe)==null?void 0:i.id)===this.recipeId?(this.lastDisplayedRecipeId=this.recipeId,this.trackPlannerRecipePrice(),this.updateGuestCountFromMenu()):!(e!=null&&e.recipe)&&this.lastDisplayedRecipeId===this.recipeId&&(this.updatePriceFromCapturedPlannerPrice(),this.lastDisplayedRecipeId=null,this.plannerPriceSubscription&&(this.plannerPriceSubscription.unsubscribe(),this.plannerPriceSubscription=null))})}setupGuestUpdatesSubscription(){return c.recipes.guestsUpdated().pipe(P(()=>!!this.recipeId)).subscribe(({guests:e,recipeId:i})=>{i===this.recipeId&&(this.serves=e,this.recalculatePrice())})}setupMenuPriceSubscription(){return c.planner.menuPrice$.pipe(P(()=>this.planner&&!!this.recipeId)).subscribe(e=>{if(this.updateGuestCountFromMenu(),this.lastPlannerPrice>0&&this.serves>0){const i=this.lastPlannerPrice/this.serves;this.applyCurrencyDisplay(i.toFixed(2))}})}fetchPrice(e,i,r){var h,o;const s=(h=this.recipePricing)==null?void 0:h.querySelector(".mealz-recipe-pricing__wrapper"),t=(o=this.attributes["starting-data"])==null?void 0:o.value;if(!t){if(this.priceDisplayed)return;s==null||s.classList.replace("active","hidden"),this.priceDisplayed=!1;return}if(t){const n=JSON.parse(t);if(this.removeAttribute("starting-data"),n.pricePerServe!==null||n.inBasket){s==null||s.classList.replace("hidden","active"),this.applyCurrencyDisplay(n.pricePerServe),this.inBasket=n.inBasket;return}}const a=p.getInstance(),l=a.getMemorizedPrice(r,i);if(l){requestAnimationFrame(()=>{this.applyCurrencyDisplay(l.price),a.markPriceAsDisplayed(r,i)});return}s==null||s.classList.replace("active","hidden"),this.subscriptions.push(c.recipes.fetchPricing(r,e,i).subscribe(n=>{if(n!=null&&n.price_per_serve){const u=p.getInstance();u.memorizedPrice(r,i,n.price_per_serve),requestAnimationFrame(()=>{s==null||s.classList.replace("hidden","active"),this.applyCurrencyDisplay(n.price_per_serve),u.markPriceAsDisplayed(r,i)})}}))}render(){this.recipePricing=this.querySelector(".mealz-recipe-pricing"),this.recipePricing&&(this.recipeId&&this.pricePerServe&&p.getInstance().isPriceDisplayed(this.recipeId,this.serves)&&requestAnimationFrame(()=>{this.applyCurrencyDisplay(this.pricePerServe)}),this.rendered.next(!0),this.getInitialStatus())}getInitialStatus(){var a;const e=(a=this.attributes["starting-data"])==null?void 0:a.value;if(!e)return;const{recipeId:i,pricePerServe:r,serves:s,planner:t}=JSON.parse(e);this.recipeId=i,this.pricePerServe=(r==null?void 0:r.toString())??null,this.serves=s,this.planner=t||!1,this.applyCurrencyDisplay(this.pricePerServe)}applyCurrencyDisplay(e){if(this.lastAppliedPrice===e)return;const i=parseFloat(e);isNaN(i)||(this.lastAppliedPrice=e,this.formattedPrice=i.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2}),this.updateDOM())}showPrice(){var r,s;if(this.priceDisplayed)return;const e=(r=this.recipePricing)==null?void 0:r.querySelector(".mealz-recipe-pricing__loading"),i=(s=this.recipePricing)==null?void 0:s.querySelector(".mealz-recipe-pricing__wrapper");e==null||e.classList.replace("active","hidden"),i==null||i.classList.replace("hidden","active"),this.priceDisplayed=!0}updateDOM(){var i;const e=(i=this.recipePricing)==null?void 0:i.querySelector(".mealz-recipe-pricing__wrapper__price");e&&(e.innerHTML=this.formattedPrice+" €",this.showPrice())}listenToBasket(){return w([this.rendered,c.basket.recipePricesInBasket$()]).pipe(O(([e,i])=>!e||!i),g(([,e])=>B([f(e),c.pos.currentPos().pipe(y(1))])),g(([e,i])=>(this.recipePricingValue=e.find(r=>r.id===this.recipeId),this.recipePricingValue?(this.inBasket=!0,this.applyCurrencyDisplay((+this.recipePricingValue.price/this.serves).toString()),f(null)):i&&this.inBasket?c.recipes.fetchPricing(this.recipeId,i.id,this.serves).pipe($(r=>{r!=null&&r.price_per_serve&&(this.applyCurrencyDisplay(r.price_per_serve),this.inBasket=!1)})):(this.formattedPrice=this.pricePerServe,f(null))))).subscribe(()=>{this.priceDisplayed||(this.showPrice(),this.priceDisplayed=!0)})}recalculatePrice(){if(this.recipePricingValue){const e=(parseFloat(this.recipePricingValue.price)/this.recipePricingValue.guests).toString();requestAnimationFrame(()=>{this.applyCurrencyDisplay(e);const i=p.getInstance();i.memorizedPrice(this.recipeId,this.recipePricingValue.guests,e),i.markPriceAsDisplayed(this.recipeId,this.recipePricingValue.guests)})}}trackPlannerRecipePrice(){this.plannerPriceSubscription&&(this.plannerPriceSubscription.unsubscribe(),this.plannerPriceSubscription=null),this.plannerPriceSubscription=c.planner.plannerRecipePrice$.subscribe(e=>{e>0&&(this.lastPlannerPrice=e)})}updateGuestCountFromMenu(){!this.planner||!this.recipeId||c.planner.getGuestsForRecipe(this.recipeId).pipe(y(1)).subscribe(e=>{e&&e>0&&(this.serves=e)})}updatePriceFromCapturedPlannerPrice(){!this.planner||!this.recipeId||c.planner.isRecipeInMenu$(this.recipeId).pipe(y(1)).subscribe(e=>{if(e&&this.lastPlannerPrice>0){if(this.serves>0){const i=this.lastPlannerPrice/this.serves;this.applyCurrencyDisplay(i.toFixed(2))}}else this.pricePerServe&&this.applyCurrencyDisplay(this.pricePerServe)})}};S=N([C("mealz-recipe-pricing")],S);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../assets/promotion-badge-
|
|
1
|
+
import"../../assets/promotion-badge-2uUuiRau.js";import{N as n,k as s}from"../../assets/no-shadow-element-DlGA0h9b.js";import{t as h}from"../../assets/custom-element-BhZVzxrc.js";import{n as p}from"../../assets/property-Bg80vXcm.js";import{g as u,a as b}from"../../assets/price-utils-BRFZa-3D.js";import{m as o}from"../../assets/mealz-sdk-DWLzEfKz.js";import"../../assets/price-DcNF55ef.js";var z=Object.defineProperty,_=Object.getOwnPropertyDescriptor,l=(e,i,r,a)=>{for(var t=a>1?void 0:a?_(i,r):i,c=e.length-1,d;c>=0;c--)(d=e[c])&&(t=(a?d(i,r,t):d(t))||t);return a&&t&&z(i,r,t),t};let m=class extends n{constructor(){super(),this.noSupplier=o.supplier.isNoSupplier(),this.subscriptions=[],this.styleURL=new URL("./replace-item/replace-item-card/replace-item-card.css",this.getBaseURL()),this.subscriptions.push(o.replaceItem.replaceItemLoading$.subscribe(e=>{this.replaceItemLoading=e,this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}onSelectItem(e){const i={detail:{item:e},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("selectItem",i))}render(){var e,i,r,a,t,c;return s`
|
|
2
2
|
<div
|
|
3
3
|
class="
|
|
4
4
|
mealz-replace-item-card
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./replace-item-card/replace-item-card.min.js";import{N as h,
|
|
1
|
+
import"./replace-item-card/replace-item-card.min.js";import{N as h,q as u,D as o,k as i}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as g}from"../assets/custom-element-BhZVzxrc.js";import{c as _}from"../assets/capitalize-DUAqYmp4.js";import{m as s}from"../assets/mealz-sdk-DWLzEfKz.js";import{m as b}from"../assets/merge-OrXqfOOP.js";import{m as n}from"../assets/map-oxUcVNGT.js";import{d as z}from"../assets/debounceTime-CIA2MWDj.js";import{f as v}from"../assets/filter-DuHsB8oM.js";import{d as S}from"../assets/distinctUntilChanged-Ckq1Syk_.js";import{s as $}from"../assets/switchMap-vA0vSKy4.js";import"../assets/promotion-badge-2uUuiRau.js";import"../assets/property-Bg80vXcm.js";import"../assets/price-DcNF55ef.js";import"../assets/price-utils-BRFZa-3D.js";import"../assets/mergeMap-CMaM5Agw.js";import"../assets/innerFrom-CVMPVEmB.js";import"../assets/OperatorSubscriber-z_a6lCKk.js";import"../assets/executeSchedule-CTqB8mra.js";import"../assets/empty-DGYYDWIm.js";import"../assets/from-Btz8AgkO.js";import"../assets/async-H-Co76Oa.js";var I=Object.getOwnPropertyDescriptor,f=(e,t,c,a)=>{for(var r=a>1?void 0:a?I(t,c):t,l=e.length-1,m;l>=0;l--)(m=e[l])&&(r=m(r)||r);return r};let p=class extends h{constructor(){super(),this.addProductMode=!1,this.fromRecipeDetails=!1,this.isLoading=!1,this.subscriptions=[],this.searchString="",this.itemsWithPricesList=[],this.searchSubject=new u,this.styleURL=new URL("./replace-item/replace-item.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(this.setupSearchObservable(),s.replaceItem.basketEntryToReplace$.subscribe(e=>{this.handleToReplace(e)}),b(s.recipes.displayedRecipe$.pipe(n(e=>{var t;this.currentRecipeId=(t=e==null?void 0:e.recipe)==null?void 0:t.id,this.fromRecipeDetails=!!this.currentRecipeId})),s.replaceItem.replaceProductFromPreviewOpen$.pipe(n(e=>{this.basketEntry=e})),s.replaceItem.additionModalOpen$.pipe(n(e=>{this.addProductMode=e})),s.replaceItem.itemsWithPricesList$.pipe(n(e=>{this.itemsWithPricesList=e})),s.replaceItem.fetchingItemLoading$.pipe(n(e=>{this.isLoading=e}))).subscribe(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}handleToReplace(e){if(this.searchString="",!e){this.basketEntry=void 0,this.ingredient=void 0,this.ignoreSelected=!1;return}this.basketEntry=e.basketEntry,this.ingredient=e.ingredient,this.ignoreSelected=e.ignoreSelected||!1,this.requestUpdate()}onClose(){s.replaceItem.replaceItemLoading$.next(void 0),s.replaceItem.basketEntryToReplace$.next(void 0)}onSearchInputChange(e){this.searchString=e.target.value,this.searchSubject.next(this.searchString)}setupSearchObservable(){return this.searchSubject.pipe(z(200),v(e=>e.length>=3),S(),$(e=>s.replaceItem.searchItem(e))).subscribe()}onSelectItem(e){var a;const t=(a=this.basketEntry)==null?void 0:a.id,c=this.fromRecipeDetails?`/recipes/${this.currentRecipeId}/shopping`:"/basket/products";s.replaceItem.onSelectItem(e.detail.item,this.searchString,()=>{this.onClose(),s.productAddition.productAdded$.next(t)},{originPath:`${c}/item-selector`,props:{}})}renderIssues(){var e,t;return i`
|
|
2
2
|
<!-- NO SUBSTITUTION PRODUCT -->
|
|
3
3
|
${!this.isLoading&&this.itemsWithPricesList.length===1&&!this.searchString?i`
|
|
4
4
|
<div class="mealz-replace-item__error">
|
package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../assets/promotion-badge-
|
|
1
|
+
import"../../assets/promotion-badge-2uUuiRau.js";import{N as d,k as t}from"../../assets/no-shadow-element-DlGA0h9b.js";import{t as o}from"../../assets/custom-element-BhZVzxrc.js";import{n}from"../../assets/property-Bg80vXcm.js";import{g as h,a as u}from"../../assets/price-utils-BRFZa-3D.js";import{m as z}from"../../assets/mealz-sdk-DWLzEfKz.js";import"../../assets/price-DcNF55ef.js";var P=Object.defineProperty,_=Object.getOwnPropertyDescriptor,p=(a,r,l,s)=>{for(var e=s>1?void 0:s?_(r,l):r,c=a.length-1,m;c>=0;c--)(m=a[c])&&(e=(s?m(r,l,e):m(e))||e);return s&&e&&P(r,l,e),e};let i=class extends d{constructor(){super(),this.noSupplier=z.supplier.isNoSupplier(),this.styleURL=new URL("./replace-item-planner/replace-item-card-planner/replace-item-card-planner.css",this.getBaseURL())}onSelectItem(){this.itemWithPrice.status="ticked";const a={detail:{itemWithPrice:this.itemWithPrice},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("selectItem",a)),this.requestUpdate()}render(){return t`
|
|
2
2
|
<div class=" mealz-replace-item-card-planner
|
|
3
3
|
${this.itemWithPrice.status==="ticked"?"selected":""}"
|
|
4
4
|
>
|
|
@@ -35,8 +35,8 @@ import"../../assets/promotion-badge-BwN2GpDz.js";import{N as d,m as o,k as t}fro
|
|
|
35
35
|
<!-- PRODUCT PRICE -->
|
|
36
36
|
<mealz-price
|
|
37
37
|
class="mealz-replace-item__product-price mealz-ds-text size-m weight-xxl"
|
|
38
|
-
.oldPrice=${
|
|
39
|
-
.price=${
|
|
38
|
+
.oldPrice=${h(this.itemWithPrice.price)}
|
|
39
|
+
.price=${u(this.itemWithPrice.price)}>
|
|
40
40
|
</mealz-price>
|
|
41
41
|
<!-- PRODUCT CTA -->
|
|
42
42
|
<button
|
|
@@ -53,4 +53,4 @@ import"../../assets/promotion-badge-BwN2GpDz.js";import{N as d,m as o,k as t}fro
|
|
|
53
53
|
</button>
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
|
-
`}};p([n()],i.prototype,"itemWithPrice",2);p([n()],i.prototype,"index",2);i=p([
|
|
56
|
+
`}};p([n()],i.prototype,"itemWithPrice",2);p([n()],i.prototype,"index",2);i=p([o("mealz-replace-item-card-planner")],i);customElements.get("mealz-replace-item-card-planner")||customElements.define("mealz-replace-item-card-planner",i);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./replace-item-card-planner/replace-item-card-planner.min.js";import{N as h,
|
|
1
|
+
import"./replace-item-card-planner/replace-item-card-planner.min.js";import{N as h,q as d,D as o,k as a}from"../assets/no-shadow-element-DlGA0h9b.js";import{c as u}from"../assets/capitalize-DUAqYmp4.js";import{t as g}from"../assets/custom-element-BhZVzxrc.js";import{m as i}from"../assets/mealz-sdk-DWLzEfKz.js";import{m as _}from"../assets/merge-OrXqfOOP.js";import{m}from"../assets/map-oxUcVNGT.js";import{d as b}from"../assets/debounceTime-CIA2MWDj.js";import{f as z}from"../assets/filter-DuHsB8oM.js";import{d as v}from"../assets/distinctUntilChanged-Ckq1Syk_.js";import{s as S}from"../assets/switchMap-vA0vSKy4.js";import"../assets/promotion-badge-2uUuiRau.js";import"../assets/property-Bg80vXcm.js";import"../assets/price-DcNF55ef.js";import"../assets/price-utils-BRFZa-3D.js";import"../assets/mergeMap-CMaM5Agw.js";import"../assets/innerFrom-CVMPVEmB.js";import"../assets/OperatorSubscriber-z_a6lCKk.js";import"../assets/executeSchedule-CTqB8mra.js";import"../assets/empty-DGYYDWIm.js";import"../assets/from-Btz8AgkO.js";import"../assets/async-H-Co76Oa.js";var f=Object.getOwnPropertyDescriptor,$=(e,t,s,n)=>{for(var r=n>1?void 0:n?f(t,s):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(r=c(r)||r);return r};let p=class extends h{constructor(){super(),this.isLoading=!1,this.subscriptions=[],this.searchString="",this.itemsWithPricesList=[],this.analyticsPath="/meals-planner/current",this.searchSubject=new d,this.styleURL=new URL("./replace-item-planner/replace-item-planner.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(this.setupSearchObservable(),i.planner.itemToReplace$.subscribe(e=>{this.handleToReplace(e)}),_(i.recipes.displayedRecipe$.pipe(m(e=>{var t;this.currentRecipeId=(t=e==null?void 0:e.recipe)==null?void 0:t.id})),i.planner.itemsWithPricesList$.pipe(m(e=>{this.itemsWithPricesList=e})),i.planner.fetchingItemLoading$.pipe(m(e=>{this.isLoading=e}))).subscribe(()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}handleToReplace(e){if(this.searchString="",!e){this.item=void 0,this.ingredient=void 0;return}this.item=e.item,this.ingredient=e.ingredient,this.requestUpdate()}onClose(){i.planner.itemToReplace$.next(void 0)}onSearchInputChange(e){this.searchString=e.target.value,this.searchSubject.next(this.searchString)}setupSearchObservable(){return this.searchSubject.pipe(b(200),z(e=>e.length>=3),v(),S(e=>i.planner.searchItem(e,this.ingredient,this.item))).subscribe()}onSelectItem(e){this.replacedItemEvent(e.detail.itemWithPrice),i.planner.replaceProduct(e.detail.itemWithPrice),this.item=e.detail.itemWithPrice.item,this.onClose()}formatNumber(e){const t=i.user.getLanguage()||"fr";return new Intl.NumberFormat(t,{minimumFractionDigits:1,maximumFractionDigits:2}).format(e)}renderIssues(){var e,t;return a`
|
|
2
2
|
<!-- NO SUBSTITUTION PRODUCT -->
|
|
3
3
|
${!this.isLoading&&this.itemsWithPricesList.length===1&&!this.searchString?a`
|
|
4
4
|
<div class="mealz-replace-item-planner__error">
|
|
@@ -84,4 +84,4 @@ import"./replace-item-card-planner/replace-item-card-planner.min.js";import{N as
|
|
|
84
84
|
${this.renderIssues()}
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
|
-
`}replacedItemEvent(e){var t,s;i.analytics.sendEvent("planner.item.replaced",this.analyticsPath,{recipe_id:this.currentRecipeId,new_item_id:(t=e==null?void 0:e.item)==null?void 0:t.id,old_item_id:(s=this.item)==null?void 0:s.id})}};
|
|
87
|
+
`}replacedItemEvent(e){var t,s;i.analytics.sendEvent("planner.item.replaced",this.analyticsPath,{recipe_id:this.currentRecipeId,new_item_id:(t=e==null?void 0:e.item)==null?void 0:t.id,old_item_id:(s=this.item)==null?void 0:s.id})}};p=$([g("mealz-replace-item-planner")],p);customElements.get("mealz-replace-item-planner")||customElements.define("mealz-replace-item-planner",p);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../assets/store-locator-
|
|
1
|
+
import"../assets/store-locator-CKwiyckb.js";import{N as h,k as c}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as o}from"../assets/custom-element-BhZVzxrc.js";import{n as b}from"../assets/property-Bg80vXcm.js";import"../assets/state-bsKs-Mb2.js";import"../assets/query-BApjzB0v.js";import"../assets/mealz-sdk-DWLzEfKz.js";var p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,n=(e,t,i,l)=>{for(var s=l>1?void 0:l?m(t,i):t,d=e.length-1,r;d>=0;d--)(r=e[d])&&(s=(l?r(t,i,s):r(s))||s);return l&&s&&p(t,i,s),s};let a=class extends h{constructor(){super(),this._selectedTabIndex=0,this.styleURL=new URL("./slider-tabs/slider-tabs.css",this.getBaseURL())}get selectedTabIndex(){return this._selectedTabIndex}set selectedTabIndex(e){this._selectedTabIndex!==e&&(this._selectedTabIndex=e,this.sliderElement&&this.updateSlider())}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.sliderElement=this.querySelector(".mealz-slider-tab__background"),this.updateSlider()}render(){return c`
|
|
2
2
|
<div class="mealz-slider-tabs">
|
|
3
3
|
${this.tabs.map((e,t)=>c`
|
|
4
4
|
<button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../assets/store-locator-
|
|
1
|
+
import"../assets/store-locator-CKwiyckb.js";import{N as p,D as m,k as u}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as d}from"../assets/custom-element-BhZVzxrc.js";import{n as h}from"../assets/property-Bg80vXcm.js";import{m as l}from"../assets/mealz-sdk-DWLzEfKz.js";import"../assets/state-bsKs-Mb2.js";import"../assets/query-BApjzB0v.js";var b=Object.defineProperty,w=Object.getOwnPropertyDescriptor,c=(e,s,i,r)=>{for(var t=r>1?void 0:r?w(s,i):s,o=e.length-1,n;o>=0;o--)(n=e[o])&&(t=(r?n(s,i,t):n(t))||t);return r&&t&&b(s,i,t),t};let a=class extends p{constructor(){super(),this.analyticsPath="",this.subscriptions=[],this.styleURL=new URL("./store-indicator/store-indicator.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.setCurrentPosLabel()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){return this.currentPosLabel?u`
|
|
2
2
|
<div class="mealz-store-indicator">
|
|
3
3
|
<span class="mealz-store-indicator__pos-label mealz-ds-text weight-xl">
|
|
4
4
|
${this.currentPosLabel}
|
|
@@ -11,4 +11,4 @@ import"../assets/store-locator-m8sx3XDc.js";import{N as p,D as m,k as u,m as l}f
|
|
|
11
11
|
<span class="mealz-store-indicator__swap-pos-label mealz-ds-text size-s weight-l">Changer</span>
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
14
|
-
`:m}setCurrentPosLabel(){this.subscriptions.push(l.pos.currentPos().subscribe(e=>{e?this.currentPosLabel=e.relationships.supplier.data.attributes.name+" - "+e.attributes.name:this.currentPosLabel=" - ",this.requestUpdate()}))}openDrawer(){const e=document.querySelector("mealz-drawer-view-swapper");e&&(e.displayStoreLocator$.next(!0),this.sendLocatorDisplayEvent())}sendLocatorDisplayEvent(){l.analytics.sendEvent("locator.display",this.analyticsPath,{})}};c([h({type:String})],
|
|
14
|
+
`:m}setCurrentPosLabel(){this.subscriptions.push(l.pos.currentPos().subscribe(e=>{e?this.currentPosLabel=e.relationships.supplier.data.attributes.name+" - "+e.attributes.name:this.currentPosLabel=" - ",this.requestUpdate()}))}openDrawer(){const e=document.querySelector("mealz-drawer-view-swapper");e&&(e.displayStoreLocator$.next(!0),this.sendLocatorDisplayEvent())}sendLocatorDisplayEvent(){l.analytics.sendEvent("locator.display",this.analyticsPath,{})}};c([h({type:String})],a.prototype,"analyticsPath",2);a=c([d("mealz-store-indicator")],a);customElements.get("mealz-store-indicator")||customElements.define("mealz-store-indicator",a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as c,k as r
|
|
1
|
+
import{N as c,k as r}from"../assets/no-shadow-element-DlGA0h9b.js";import{t as m}from"../assets/custom-element-BhZVzxrc.js";import{r as g}from"../assets/state-bsKs-Mb2.js";import{m as o}from"../assets/mealz-sdk-DWLzEfKz.js";import{s as u}from"../assets/skipWhile-BAgfjfH2.js";import{s as b}from"../assets/switchMap-vA0vSKy4.js";import{m as v}from"../assets/map-oxUcVNGT.js";import"../assets/property-Bg80vXcm.js";import"../assets/OperatorSubscriber-z_a6lCKk.js";import"../assets/innerFrom-CVMPVEmB.js";var z=Object.defineProperty,S=Object.getOwnPropertyDescriptor,h=(e,s,n,i)=>{for(var t=i>1?void 0:i?S(s,n):s,a=e.length-1,l;a>=0;a--)(l=e[a])&&(t=(i?l(s,n,t):l(t))||t);return i&&t&&z(s,n,t),t};let d=class extends c{constructor(){super(),this.step=1,this.modalConfirmed=!1,this.steps=[{img:"https://storage.googleapis.com/assets.miam.tech/generic/images/8.7/noSupplierOnboardingStep1.png",title:"Les recettes sont commandables en ligne !",content:r`<span class="mealz-no-supplier-onboarding__bold">Commandez</span>
|
|
2
2
|
dès à présent les ingrédients de vos recettes en cliquant sur le bouton
|
|
3
3
|
<span class="mealz-no-supplier-onboarding__bold">“Mes courses”</span>`},{img:"https://storage.googleapis.com/assets.miam.tech/generic/images/8.7/noSupplierOnboardingStep2.png",title:"Choisissez votre drive",content:"Sélectionnez un magasin parmi les enseignes participantes et disponibles proches de vous"},{img:"https://storage.googleapis.com/assets.miam.tech/generic/images/8.7/noSupplierOnboardingStep3.png",title:"Une recette, des produits",content:"Ajoutez les produits de votre choix dans votre panier et ajustez les quantités."},{img:"https://storage.googleapis.com/assets.miam.tech/generic/images/8.7/noSupplierOnboardingStep4.png",title:"Commande en 1 clic",content:"Accédez à votre panier et passez votre commande dans le magasin sélectionné."}],this.analyticsPath="/onboarding",this.styleURL=new URL("./no-supplier-onboarding/no-supplier-onboarding.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.pageview(),this.listenToModalCloseEvent()}render(){const{img:e,title:s,content:n}=this.steps[this.step-1];return r`
|
|
4
4
|
<div class="mealz-no-supplier-onboarding">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as b,_ as h,t as f}from"./no-shadow-element-l9trQfcI.js";function p(r){return b(r==null?void 0:r.lift)}function d(r){return function(i){if(p(i))return i.lift(function(t){try{return r(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(r,i,t,e,c){return new y(r,i,t,e,c)}var y=function(r){h(i,r);function i(t,e,c,u,a,l){var n=r.call(this,t)||this;return n.onFinalize=a,n.shouldUnsubscribe=l,n._next=e?function(o){try{e(o)}catch(s){t.error(s)}}:r.prototype._next,n._error=u?function(o){try{u(o)}catch(s){t.error(s)}finally{this.unsubscribe()}}:r.prototype._error,n._complete=c?function(){try{c()}catch(o){t.error(o)}finally{this.unsubscribe()}}:r.prototype._complete,n}return i.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;r.prototype.unsubscribe.call(this),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},i}(f);export{_ as c,d as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as u,S as l,b as a,c as d,d as f}from"./no-shadow-element-l9trQfcI.js";var v={now:function(){return Date.now()}},p=function(n){u(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){u(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,c=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(c,s,e)),this.pending=!0,this.delay=e,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(c,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(c){r=!0,s=c||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){u(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{w as a,g as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./async-D3oCs_PQ.js";import{t as m}from"./take-DO4w5a1Y.js";import{m as a}from"./map-C4rf5Jbc.js";import{m as e}from"./mergeMap-buGewtOo.js";import{i as f}from"./innerFrom-CfKCbnvr.js";import{t as p}from"./timer-BOl4bYNY.js";function u(r){return a(function(){return r})}function s(r,t){return e(function(n,o){return f(r(n,o)).pipe(m(1),u(n))})}function l(r,t){t===void 0&&(t=i);var n=p(r,t);return s(function(){return n})}export{l as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as d}from"./no-shadow-element-l9trQfcI.js";import{o,c as a}from"./OperatorSubscriber-EGuECN6g.js";function x(i,n){return n===void 0&&(n=d),i=i??v,o(function(s,t){var e,r=!0;s.subscribe(a(t,function(f){var u=n(f);(r||!i(e,u))&&(r=!1,e=u,t.next(f))}))})}function v(i,n){return i===n}export{x as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as r}from"./no-shadow-element-l9trQfcI.js";var t=new r(function(e){return e.complete()});export{t as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as d}from"./no-shadow-element-l9trQfcI.js";function o(i){return i&&d(i.schedule)}function h(i,c,n,s,u){s===void 0&&(s=0),u===void 0&&(u=!1);var e=c.schedule(function(){n(),u?i.add(this.schedule(null,s)):this.unsubscribe()},s);if(i.add(e),!u)return e}export{h as e,o as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as s}from"./no-shadow-element-l9trQfcI.js";function i(t){const e={"language-id":s.user.getLanguage(),"supplier-token":s.supplier.getToken(),"session-id":t},a=localStorage.getItem("_miam/userId");return a?e.authorization=`user_id ${a}`:e["authless-id"]=localStorage.getItem("_miam/authlessId"),e}export{i as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n,c as p}from"./no-shadow-element-l9trQfcI.js";import{m as o}from"./map-C4rf5Jbc.js";var t=Array.isArray;function i(a,r){return t(r)?a.apply(void 0,n([],p(r))):a(r)}function y(a){return o(function(r){return i(a,r)})}export{y as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as t}from"./mergeMap-buGewtOo.js";import{x as n}from"./no-shadow-element-l9trQfcI.js";import{i}from"./innerFrom-CfKCbnvr.js";import{E as s}from"./empty-Cv-4tfKR.js";import{p as f,a as p,f as g}from"./from-jBe2xW5a.js";function u(r){return r===void 0&&(r=1/0),t(n,r)}function y(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var o=f(r),a=p(r,1/0),m=r;return m.length?m.length===1?i(m[0]):u(a)(g(m,o)):s}export{y as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as C}from"./map-C4rf5Jbc.js";import{i as x}from"./innerFrom-CfKCbnvr.js";import{c as h,o as F}from"./OperatorSubscriber-EGuECN6g.js";import"./executeSchedule-DfyZaGAH.js";import{e as I}from"./no-shadow-element-l9trQfcI.js";function b(f,e,n,i,t,v,u,k){var o=[],r=0,g=0,c=!1,d=function(){c&&!o.length&&!r&&e.complete()},y=function(a){return r<i?s(a):o.push(a)},s=function(a){r++;var l=!1;x(n(a,g++)).subscribe(h(e,function(m){e.next(m)},function(){l=!0},void 0,function(){if(l)try{r--;for(var m=function(){var p=o.shift();u||s(p)};o.length&&r<i;)m();d()}catch(p){e.error(p)}}))};return f.subscribe(h(e,y,function(){c=!0,d()})),function(){}}function N(f,e,n){return n===void 0&&(n=1/0),I(e)?N(function(i,t){return C(function(v,u){return e(i,v,t,u)})(x(f(i,t)))},n):(typeof e=="number"&&(n=e),F(function(i,t){return b(i,t,f,n)}))}export{N as m};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const L=globalThis,rt=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),it=new WeakMap;let St=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==nt)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(rt&&t===void 0){const r=e!==void 0&&e.length===1;r&&(t=it.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&it.set(e,t))}return t}toString(){return this.cssText}};const Mt=n=>new St(typeof n=="string"?n:n+"",void 0,nt),ye=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((r,s,i)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[i+1],n[0]);return new St(e,n,nt)},jt=(n,t)=>{if(rt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const r=document.createElement("style"),s=L.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,n.appendChild(r)}},ot=rt?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return Mt(e)})(n):n;/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2017 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Ht,defineProperty:Lt,getOwnPropertyDescriptor:Nt,getOwnPropertyNames:zt,getOwnPropertySymbols:Bt,getPrototypeOf:Vt}=Object,_=globalThis,at=_.trustedTypes,qt=at?at.emptyScript:"",q=_.reactiveElementPolyfillSupport,U=(n,t)=>n,Y={toAttribute(n,t){switch(t){case Boolean:n=n?qt: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}},At=(n,t)=>!Ht(n,t),lt={attribute:!0,type:String,converter:Y,reflect:!1,hasChanged:At};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class w 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=lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Lt(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:i}=Nt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return s==null?void 0:s.call(this)},set(o){const c=s==null?void 0:s.call(this);i.call(this,o),this.requestUpdate(t,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??lt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=Vt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const e=this.properties,r=[...zt(e),...Bt(e)];for(const s of r)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)e.unshift(ot(s))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r: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 r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(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 r;return(r=e.hostConnected)==null?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){var i;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const o=(((i=r.converter)==null?void 0:i.toAttribute)!==void 0?r.converter:Y).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var i;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=r.getPropertyOptions(s),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)==null?void 0:i.fromAttribute)!==void 0?o.converter:Y;this._$Em=s,this[s]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??At)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),r.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 r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,o]of s)o.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostUpdate)==null?void 0:i.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),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){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[U("elementProperties")]=new Map,w[U("finalized")]=new Map,q==null||q({ReactiveElement:w}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.4");var G=function(n,t){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},G(n,t)};function j(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");G(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ve(n,t,e,r){function s(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function c(f){try{l(r.next(f))}catch(h){o(h)}}function a(f){try{l(r.throw(f))}catch(h){o(h)}}function l(f){f.done?i(f.value):s(f.value).then(c,a)}l((r=r.apply(n,t||[])).next())})}function be(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(l){return function(f){return a([l,f])}}function a(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(e=0)),e;)try{if(r=1,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,s=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){e.label=l[1];break}if(l[0]===6&&e.label<i[1]){e.label=i[1],i=l;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(l);break}i[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(f){l=[6,f],s=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function R(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(c){o={error:c}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return i}function J(n,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return n.concat(i||Array.prototype.slice.call(t))}function Q(n){return this instanceof Q?(this.v=n,this):new Q(n)}function me(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(u){return function(v){return Promise.resolve(v).then(u,h)}}function c(u,v){r[u]&&(s[u]=function(y){return new Promise(function(It,kt){i.push([u,y,It,kt])>1||a(u,y)})},v&&(s[u]=v(s[u])))}function a(u,v){try{l(r[u](v))}catch(y){d(i[0][3],y)}}function l(u){u.value instanceof Q?Promise.resolve(u.value.v).then(f,h):d(i[0][2],u)}function f(u){a("next",u)}function h(u){a("throw",u)}function d(u,v){u(v),i.shift(),i.length&&a(i[0][0],i[0][1])}}function _e(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof R=="function"?R(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=n[i]&&function(o){return new Promise(function(c,a){o=n[i](o),s(c,a,o.done,o.value)})}}function s(i,o,c,a){Promise.resolve(a).then(function(l){i({value:l,done:c})},o)}}function b(n){return typeof n=="function"}function wt(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var D=wt(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
10
|
-
`+e.map(function(r,s){return s+1+") "+r.toString()}).join(`
|
|
11
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function X(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var B=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var c=R(o),a=c.next();!a.done;a=c.next()){var l=a.value;l.remove(this)}}catch(y){t={error:y}}finally{try{a&&!a.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(y){i=y instanceof D?y.errors:[y]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var d=R(h),u=d.next();!u.done;u=d.next()){var v=u.value;try{ct(v)}catch(y){i=i??[],y instanceof D?i=J(J([],Z(i)),Z(y.errors)):i.push(y)}}}catch(y){r={error:y}}finally{try{u&&!u.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(i)throw new D(i)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)ct(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&X(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&X(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Et=B.EMPTY;function xt(n){return n instanceof B||n&&"closed"in n&&b(n.remove)&&b(n.add)&&b(n.unsubscribe)}function ct(n){b(n)?n():n.unsubscribe()}var Dt={Promise:void 0},Ft={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,J([n,t],Z(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Wt(n){Ft.setTimeout(function(){throw n})}function ut(){}function N(n){n()}var Pt=function(n){j(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,xt(e)&&e.add(r)):r.destination=Gt,r}return t.create=function(e,r,s){return new tt(e,r,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(B),Kt=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){H(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){H(r)}else H(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){H(e)}},n}(),tt=function(n){j(t,n);function t(e,r,s){var i=n.call(this)||this,o;return b(e)||!e?o={next:e??void 0,error:r??void 0,complete:s??void 0}:o=e,i.destination=new Kt(o),i}return t}(Pt);function H(n){Wt(n)}function Yt(n){throw n}var Gt={closed:!0,next:ut,error:Yt,complete:ut},Zt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Jt(n){return n}function Qt(n){return n.length===0?Jt:n.length===1?n[0]:function(e){return n.reduce(function(r,s){return s(r)},e)}}var ht=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var s=this,i=te(t)?t:new tt(t,e,r);return N(function(){var o=s,c=o.operator,a=o.source;i.add(c?c.call(i,a):a?s._subscribe(i):s._trySubscribe(i))}),i},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=ft(e),new e(function(s,i){var o=new tt({next:function(c){try{t(c)}catch(a){i(a),o.unsubscribe()}},error:i,complete:s});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Zt]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Qt(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=ft(t),new t(function(r,s){var i;e.subscribe(function(o){return i=o},function(o){return s(o)},function(){return r(i)})})},n.create=function(t){return new n(t)},n}();function ft(n){var t;return(t=n??Dt.Promise)!==null&&t!==void 0?t:Promise}function Xt(n){return n&&b(n.next)&&b(n.error)&&b(n.complete)}function te(n){return n&&n instanceof Pt||Xt(n)&&xt(n)}var ee=wt(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ot=function(n){j(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new pt(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new ee},t.prototype.next=function(e){var r=this;N(function(){var s,i;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=R(r.currentObservers),c=o.next();!c.done;c=o.next()){var a=c.value;a.next(e)}}catch(l){s={error:l}}finally{try{c&&!c.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;N(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;N(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,i=s.hasError,o=s.isStopped,c=s.observers;return i||o?Et:(this.currentObservers=null,c.push(e),new B(function(){r.currentObservers=null,X(c,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,i=r.thrownError,o=r.isStopped;s?e.error(i):o&&e.complete()},t.prototype.asObservable=function(){var e=new ht;return e.source=this,e},t.create=function(e,r){return new pt(e,r)},t}(ht),pt=function(n){j(t,n);function t(e,r){var s=n.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Et},t}(Ot),re=function(n){j(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,i=e._value;if(r)throw s;return this._throwIfClosed(),i},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Ot);/**
|
|
12
|
-
* @license
|
|
13
|
-
* Copyright 2017 Google LLC
|
|
14
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
15
|
-
*/const C=globalThis,z=C.trustedTypes,dt=z?z.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ut="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,Ct="?"+m,ne=`<${Ct}>`,S=document,I=()=>S.createComment(""),k=n=>n===null||typeof n!="object"&&typeof n!="function",st=Array.isArray,se=n=>st(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",F=`[
|
|
16
|
-
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,vt=/>/g,$=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),bt=/'/g,mt=/"/g,Tt=/^(?:script|style|textarea|title)$/i,ie=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),$e=ie(1),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),_t=new WeakMap,g=S.createTreeWalker(S,129);function Rt(n,t){if(!st(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return dt!==void 0?dt.createHTML(t):t}const oe=(n,t)=>{const e=n.length-1,r=[];let s,i=t===2?"<svg>":t===3?"<math>":"",o=O;for(let c=0;c<e;c++){const a=n[c];let l,f,h=-1,d=0;for(;d<a.length&&(o.lastIndex=d,f=o.exec(a),f!==null);)d=o.lastIndex,o===O?f[1]==="!--"?o=yt:f[1]!==void 0?o=vt:f[2]!==void 0?(Tt.test(f[2])&&(s=RegExp("</"+f[2],"g")),o=$):f[3]!==void 0&&(o=$):o===$?f[0]===">"?(o=s??O,h=-1):f[1]===void 0?h=-2:(h=o.lastIndex-f[2].length,l=f[1],o=f[3]===void 0?$:f[3]==='"'?mt:bt):o===mt||o===bt?o=$:o===yt||o===vt?o=O:(o=$,s=void 0);const u=o===$&&n[c+1].startsWith("/>")?" ":"";i+=o===O?a+ne:h>=0?(r.push(l),a.slice(0,h)+Ut+a.slice(h)+m+u):a+m+(h===-2?c:u)}return[Rt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};class M{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let i=0,o=0;const c=t.length-1,a=this.parts,[l,f]=oe(t,e);if(this.el=M.createElement(l,r),g.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=g.nextNode())!==null&&a.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(Ut)){const d=f[o++],u=s.getAttribute(h).split(m),v=/([.?@])?(.*)/.exec(d);a.push({type:1,index:i,name:v[2],strings:u,ctor:v[1]==="."?le:v[1]==="?"?ce:v[1]==="@"?ue:V}),s.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:i}),s.removeAttribute(h));if(Tt.test(s.tagName)){const h=s.textContent.split(m),d=h.length-1;if(d>0){s.textContent=z?z.emptyScript:"";for(let u=0;u<d;u++)s.append(h[u],I()),g.nextNode(),a.push({type:2,index:++i});s.append(h[d],I())}}}else if(s.nodeType===8)if(s.data===Ct)a.push({type:2,index:i});else{let h=-1;for(;(h=s.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:i}),h+=m.length-1}i++}}static createElement(t,e){const r=S.createElement("template");return r.innerHTML=t,r}}function x(n,t,e=n,r){var o,c;if(t===E)return t;let s=r!==void 0?(o=e.o)==null?void 0:o[r]:e.l;const i=k(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==i&&((c=s==null?void 0:s._$AO)==null||c.call(s,!1),i===void 0?s=void 0:(s=new i(n),s._$AT(n,e,r)),r!==void 0?(e.o??(e.o=[]))[r]=s:e.l=s),s!==void 0&&(t=x(n,s._$AS(n,t.values),s,r)),t}class ae{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:r}=this._$AD,s=((t==null?void 0:t.creationScope)??S).importNode(e,!0);g.currentNode=s;let i=g.nextNode(),o=0,c=0,a=r[0];for(;a!==void 0;){if(o===a.index){let l;a.type===2?l=new P(i,i.nextSibling,this,t):a.type===1?l=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(l=new he(i,this,t)),this._$AV.push(l),a=r[++c]}o!==(a==null?void 0:a.index)&&(i=g.nextNode(),o++)}return g.currentNode=S,s}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class P{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,r,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this.v=(s==null?void 0:s.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=x(this,t,e),k(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):se(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!==p&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=M.createElement(Rt(r.h,r.h[0]),this.options)),r);if(((i=this._$AH)==null?void 0:i._$AD)===s)this._$AH.p(e);else{const o=new ae(s,this),c=o.u(this.options);o.p(e),this.T(c),this._$AH=o}}_$AC(t){let e=_t.get(t.strings);return e===void 0&&_t.set(t.strings,e=new M(t)),e}k(t){st(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const i of t)s===e.length?e.push(r=new P(this.O(I()),this.O(I()),this,this.options)):r=e[s],r._$AI(i),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=p}_$AI(t,e=this,r,s){const i=this.strings;let o=!1;if(i===void 0)t=x(this,t,e,0),o=!k(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const c=t;let a,l;for(t=i[0],a=0;a<i.length-1;a++)l=x(this,c[r+a],e,a),l===E&&(l=this._$AH[a]),o||(o=!k(l)||l!==this._$AH[a]),l===p?t=p:t!==p&&(t+=(l??"")+i[a+1]),this._$AH[a]=l}o&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class le extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class ce extends V{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class ue extends V{constructor(t,e,r,s,i){super(t,e,r,s,i),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??p)===E)return;const r=this._$AH,s=t===p&&r!==p||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==p&&(r===p||s);s&&this.element.removeEventListener(this.name,this,r),i&&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 he{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}}const ge={I:P},W=C.litHtmlPolyfillSupport;W==null||W(M,P),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.2.0");const fe=(n,t,e)=>{const r=(e==null?void 0:e.renderBefore)??t;let s=r._$litPart$;if(s===void 0){const i=(e==null?void 0:e.renderBefore)??null;r._$litPart$=s=new P(t.insertBefore(I(),i),i,void 0,e??{})}return s._$AI(n),s};/**
|
|
18
|
-
* @license
|
|
19
|
-
* Copyright 2017 Google LLC
|
|
20
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/class T extends w{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=fe(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 E}}var gt;T._$litElement$=!0,T.finalized=!0,(gt=globalThis.litElementHydrateSupport)==null||gt.call(globalThis,{LitElement:T});const K=globalThis.litElementPolyfillSupport;K==null||K({LitElement:T});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");const $t=()=>typeof window<"u"?window.mealzV10?window.mealzV10:window.mealz?window.mealz:null:null,et=()=>typeof window<"u"?window.mealzInternalV10?window.mealzInternalV10:window.mealzInternal?window.mealzInternal:null:null,Se=new Proxy({},{get(n,t){const e=$t();return e?e[t]:void 0},set(n,t,e){const r=$t();return r?(r[t]=e,!0):!1}}),A=new Proxy({},{get(n,t){const e=et();return e?e[t]:void 0},set(n,t,e){const r=et();return r?(r[t]=e,!0):!1}}),pe=()=>{const n=et();return!!(n!=null&&n.pos&&n.supplier&&n.recipes&&n.replaceItem&&n.basket&&n.planner)},Ae=()=>new Promise((n,t)=>{let e=0;const r=200,s=50,i=()=>{e++,pe()?n():e>=r?t(new Error(`MealzInternal SDK not available after ${r} attempts (${r*s}ms)`)):setTimeout(i,s)};i()});class we extends T{constructor(){super(...arguments),this.isMealzInternalReady$=new re(!1),this.elements={}}get selectors(){return{}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.checkMealzInternalStatus(),this.styleURL&&(this.styleURLs=Array.isArray(this.styleURL)?this.styleURL:[this.styleURL]),this.addStyles()}disconnectedCallback(){super.disconnectedCallback(),this.removeStyles()}addStyles(){!this.styleURLs||this.styleURLs.length===0||this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`;if(!document.head.querySelector(`#${r}`)){const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",t.toString()),i.setAttribute("id",r),document.head.appendChild(i)}})}removeStyles(){!this.styleURLs||this.styleURLs.length===0||setTimeout(()=>{this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`,s=document.head.querySelector(`#${r}`);s&&document.getElementsByTagName(this.tagName).length===0&&document.head.removeChild(s)})},100)}initSelectors(...t){t.length>0?t.forEach(e=>{this.selectors[e]&&(this.elements[e]=Array.isArray(this.selectors[e])?this.querySelectorAll(this.selectors[e][0]):this.querySelector(this.selectors[e]))}):Object.entries(this.selectors).forEach(([e,r])=>{this.elements[e]=Array.isArray(r)?this.querySelectorAll(r[0]):this.querySelector(r)})}addClickListener(t,e){const r=this.elements[t];r&&r.addEventListener("click",()=>{r.classList.contains("disabled")||r.hasAttribute("disabled")||e()})}checkMealzInternalStatus(t=0){var e,r;if((e=A==null?void 0:A.supplier)!=null&&e.getToken()&&((r=A==null?void 0:A.user)!=null&&r.getLanguage())){this.isMealzInternalReady$.next(!0);return}else t>50&&console.warn("Unable to find the supplier token or user language. Please verify the configuration."),setTimeout(()=>this.checkMealzInternalStatus(t+1),100)}getBaseURL(){return new URL("..",import.meta.url).toString()}}export{re as B,p as D,we as N,ht as O,fe as Q,E as R,B as S,j as _,Se as a,J as b,Z as c,X as d,b as e,At as f,me as g,T as h,ye as i,be as j,$e as k,Q as l,A as m,R as n,Zt as o,ve as p,_e as q,Wt as r,ge as s,Pt as t,Y as u,Ot as v,Ae as w,Jt as x};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m,k as s}from"./no-shadow-element-l9trQfcI.js";const e=class e{static getInstance(){return e.instances.has(this)||e.instances.set(this,new this),e.instances.get(this)}};e.instances=new Map;let c=e;const u={en:"USD","en-US":"USD","en-GB":"GBP",fr:"EUR","fr-FR":"EUR","fr-CA":"CAD"};class g extends c{initFormatter(){const t=m.user.getLanguage()||"fr",r=u[t]||"EUR";this.formatter=new Intl.NumberFormat(t,{style:"currency",currency:r})}currencySymbol(){const t=m.user.getLanguage()||"fr",r=u[t]||"EUR";return new Intl.NumberFormat(t,{style:"currency",currency:r}).format(0).replace(/[\d.,\s]/g,"")}formatPrice(t){return this.formatter||this.initFormatter(),this.formatter.format(t)}priceTemplate(t,r="price"){let n="",a=s``,o=0;return this.formatter.formatToParts(t).forEach(({type:f,value:i},l)=>{f==="currency"?(o=l,a=s`<span class="mealz-${r}__currency">${i}</span>`):n+=i}),o>0?s`<span class="mealz-${r}__amount">${n}</span>${a}`:s`${a}<span class="mealz-${r}__amount">${n}</span>`}}export{g as P,c as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as n}from"./no-shadow-element-l9trQfcI.js";function t(e){e&&n.user.setSessionId(e)}export{t as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as v,e as d}from"./no-shadow-element-l9trQfcI.js";import{o as f,c as s}from"./OperatorSubscriber-EGuECN6g.js";function _(n,r,e){var a=d(n)||r||e?{next:n,error:r,complete:e}:n;return a?f(function(u,l){var t;(t=a.subscribe)===null||t===void 0||t.call(a);var c=!0;u.subscribe(s(l,function(i){var o;(o=a.next)===null||o===void 0||o.call(a,i),l.next(i)},function(){var i;c=!1,(i=a.complete)===null||i===void 0||i.call(a),l.complete()},function(i){var o;c=!1,(o=a.error)===null||o===void 0||o.call(a,i),l.error(i)},function(){var i,o;c&&((i=a.unsubscribe)===null||i===void 0||i.call(a)),(o=a.finalize)===null||o===void 0||o.call(a)}))}):v}export{_ as t};
|