@restaround/react 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,9 @@ import { PlanType, PricingInterval } from "src/models/pricing";
2
2
  interface Props {
3
3
  currency: string;
4
4
  language: string;
5
+ isLoading?: boolean;
5
6
  onPlanSelect?: (plan: PlanType) => void;
6
7
  onIntervalSelect?: (interval: PricingInterval) => void;
7
8
  }
8
- declare const Pricing: ({ currency, language, onPlanSelect, onIntervalSelect }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const Pricing: ({ currency, language, isLoading, onPlanSelect, onIntervalSelect, }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default Pricing;
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{isEmpty as i,trackEvent as a,priceFormatter as r,classNames as l}from"@sorocraft/js-utils";import{createContext as o,useContext as d,useState as s,useRef as c,useEffect as u,useMemo as m,memo as _,useCallback as h}from"react";import{Row as g,classNames as p,IconLink as v,Tooltip as f,SVGIcon as P,Column as y,Flex as b,Carousel as I,CarouselItem as A,Chip as S,UIElementType as C,Text as E,IconButton as N,Input as k,InputType as R,Modal as M,Button as O,Drawer as T,Description as L,Container as w,Card as D,DropDown as U,DropDownMenuItem as j,Loading as z,BarChart as x}from"@sorocraft/ui";import{Phone as G,Whatsapp as H,Instagram as q,Telegram as V,Tiktok as B,Facebook as F,Wifi as W,MarkerPin as Q,Plus as Z,Minus as Y,Trash as $,ShoppingBag as K,Close as X,List as J,Grid as ee,Check as te}from"@sorocraft/ui/icons";function ne(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}function ie(e,t,n,i){return new(n||(n=Promise))((function(a,r){function l(e){try{d(i.next(e))}catch(e){r(e)}}function o(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}d((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var ae="PublicMenu-module_container__QLN6U",re="PublicMenu-module_categories__Iy6NC",le="PublicMenu-module_footer__6G3DQ";const oe="https://images.restaround.co",de=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${oe}/${e}`:"",se=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${oe}/${e}`:"https://images.restaround.co/no-photo-128.webp",ce=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${oe}/${e}`:"https://images.restaround.co/restaround-doodle.webp",ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",me=(e,t,n)=>ue.charAt(e>>2)+ue.charAt((3&e)<<4|t>>4)+ue.charAt((15&t)<<2|n>>6)+ue.charAt(63&n),_e="restaround.co",he=[_e,"restaround.az","restaround.ee","restaround.nl"],ge=(e,t)=>{const n=(e=>"az"===e?"az":"co")(e);return`https://app.restaround.${n}/auth/register?lang=${e}&utm_source=${t}`},pe=o({}),ve=({children:t,value:n})=>{const a=i(n)?{}:n;return a.currency||(a.currency="AZN"),a.language||(a.language="az"),e(pe.Provider,{value:i(n)?{}:n,children:t})},fe=()=>d(pe),Pe="digital_menu",ye=`${Pe}_category_select`,be=`${Pe}_category_scroll`,Ie=`${Pe}_product_details`,Ae=`${Pe}_product_add_cart`,Se=`${Pe}_product_view_changed`,Ce=[ye,be,Ie,Ae],Ee=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}};var Ne="Header-module_container__tenlF",ke="Header-module_cover__BAWZK",Re="Header-module_content__Gx4Al",Me="Header-module_logo__4MTCm",Oe="Header-module_info__IchYA",Te="Header-module_name__30wyw",Le="Header-module_address__WOxXc",we="Header-module_addressText__lUszI",De="Header-module_social__AoP0z",Ue="Header-module_links__EeQxg",je="Header-module_wifiPassword__VWBTa",ze="Header-module_wifiPasswordIcon__Ukn3D";const xe=t=>{const{priority:n,blurDataURL:i,quality:a,placeholder:r,fetchPriority:l}=t,o=ne(t,["priority","blurDataURL","quality","placeholder","fetchPriority"]),{imageTag:d}=fe()||{};if(d){return e(d,Object.assign({},t,{quality:t.quality||100,placeholder:"blur",blurDataURL:(s=235,c=59,u=90,`data:image/gif;base64,R0lGODlhAQABAPAA${me(0,s,c)+me(u,255,255)}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`)}))}var s,c,u;return e("img",Object.assign({},o))};var Ge={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f"};const He=()=>{var n;const{language:i,languages:a,onLanguageSelect:r}=fe(),[l,o]=s(!1),d=(null==a?void 0:a.length)>1,c=(null===(n=null==a?void 0:a.filter)||void 0===n?void 0:n.call(a,(({code:e})=>e!==i)))||[],u=e=>`https://images.restaround.co/languages/${e}.svg`;return d?e("div",{className:Ge.container,onClick:()=>o(!l),children:t(g,{alignItems:"center",gap:0,children:[e(g,{alignItems:"center",className:p(Ge,{options:!0,isOpen:l}),children:c.map((({code:t})=>e("img",{src:u(t),className:Ge.option,onClick:()=>(e=>{r&&r(e)})(t),alt:t},t)))}),e("img",{src:u(i),alt:i||"",className:Ge.currentLanguage})]})}):null},qe=({branch:n,coverImage:a,logoImage:r,name:l,instagram:o,facebook:d,whatsapp:s,telegram:c,tiktok:u})=>{const{address:m,latitude:_,longitude:h,phone:p,wifiPassword:I}=n||{},A=i(n),S=`https://www.google.com/maps/place/${_},${h}`;return t("div",{className:Ne,children:[e(xe,{src:a,alt:l,className:ke,width:1024,height:400,priority:!0,sizes:"100vw",fetchPriority:"high",loading:"eager"}),e("div",{className:Re,children:e(A?()=>t(y,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e(xe,{src:r,alt:l,className:Me,width:96,height:96}),e("div",{className:Oe,children:e("h1",{className:Te,children:l})})]}):()=>t(b,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e(b.Item,{children:e(xe,{src:r,alt:l,className:Me,width:96,height:96})}),e(b.Item,{shrink:!0,className:Oe,children:t(y,{gap:.25,children:[e("h1",{className:Te,children:l}),e("a",{className:Le,href:S,target:"_blank",rel:"noopener noreferrer",children:t(g,{alignItems:"center",gap:.5,children:[e(P,{icon:Q,theme:"dark"}),e("span",{className:we,children:m})]})})]})})]}),{})}),e(He,{}),!A&&e("div",{className:De,children:e("div",{className:Ue,children:e(g,{gap:2,alignItems:"center",children:t(g,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!p&&e(v,{icon:G,href:`tel:+${p}`,size:"sm",shape:"circle",theme:"light"}),!!s&&e(v,{icon:H,href:`https://wa.me/${s}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!o&&e(v,{icon:q,href:o,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!c&&e(v,{icon:V,href:c,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!u&&e(v,{icon:B,href:u,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e(v,{icon:F,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!I&&e(f,{hint:I,children:e("div",{className:je,children:e(P,{icon:W,size:"sm",className:ze})})})]})})})})]})},Ve=({categoryProductMap:t=[],language:n,selectedCategoryId:i,onSelectCategory:r})=>{const l=c({}),o=c(null);return u((()=>{i&&(()=>{var e;const t=null===(e=null==l?void 0:l.current)||void 0===e?void 0:e[i];if(!t||!o.current)return;const n=o.current.clientWidth,a=t.offsetLeft-n/2+t.offsetWidth/2;o.current.scrollTo({left:a,behavior:"smooth"})})()}),[i]),e("div",{className:re,children:e(I,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(o.current=e.current)},children:(t||[]).map((({id:t,translations:o})=>{const{name:d}=o.find((e=>e.language===n))||{};return e(A,{children:e(S,{onClick:()=>((e,t)=>{e!==i&&(a(ye,{name:t}),r(e))})(t,d),type:C.BORDERED_PRIMARY,active:t===i,children:e("div",{ref:e=>{e&&(l.current[t]=e)},children:d})})},t)}))})})};var Be="Products-module_container__bF2LF",Fe="Products-module_view__l857X",We="Products-module_products__AoDrY",Qe="Products-module_category__Sp7dE",Ze="Products-module_list__LH4v5";const Ye=(e=0,t=1,n=0)=>e*t*(1+n/100);var $e;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}($e||($e={}));const Ke=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},Xe=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},Je=(e,t)=>{var n;return(null===(n=((null==e?void 0:e.options)||[]).find((({id:e})=>e===t)))||void 0===n?void 0:n.price)||0},et=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},tt=(e,t=1)=>{const{price:n=0,vat:i=0}=e||{};return Ye(n,t,i)},nt=(e,t,n,i=1)=>{const a=tt(e,i);return{totalPrice:a,formattedTotalPrice:r(a,t,n)}},it=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.variants)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.id===t)))||{}},at=(e,t,n)=>{const i=it(t,e),{vat:a}=t||{},{price:r}=i||{};return Ye(r,n,a)},rt=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},lt=({product:e,variantId:t,quantity:n=1,selectedAddons:a,noVat:r=!1})=>{if(i(e))return{price:0,optionsPrice:0,total:0};const l=Object.assign(Object.assign({},e),{vat:r?0:e.vat}),o=((e,t={},n)=>((null==e?void 0:e.addons)||[]).filter((e=>Object.prototype.hasOwnProperty.call(t,e.id))).reduce(((e,n)=>{const{id:i,selectType:a}=n;if(a===$e.SINGLE){const a=t[i];return e+Je(n,a)}return e+(t[i]||[]).reduce(((e,t)=>e+Je(n,t)),0)}),0)*n)(l,a,n),d=t?at(t,l,n):tt(l,n);return{price:d,optionsPrice:o,total:d+o}};var ot,dt;!function(e){e.LIST="list",e.GRID="grid"}(ot||(ot={})),function(e){e.APPETIZER="appetizer",e.MAIN_COURSE="mainCourse",e.CHEFS_SPECIAL="chefsSpecial"}(dt||(dt={}));const st=(e,t="USD",n="en")=>{const{price:i,vat:a,quantity:l,optionsPrice:o}=e||{},d=Ye(i,l,a)+o*l;return{totalPrice:d,formattedTotalPrice:r(d,t,n)}},ct=(e,t,n)=>{if(!e)throw new Error("Product ID is required");let i=`${e}`;t&&(i+=`-${t}`);const a=Object.entries(n||{}).map((([e,t])=>{if(!e||!t)return null;const n=Array.isArray(t)?t.filter(Boolean).join("-"):`${t}`;return n?`${e}-${n}`:null})).filter(Boolean).join("-");return a&&(i+=`-${a}`),i},ut=o({cart:{},isCartOpen:!1,addProduct:()=>{},updateProduct:()=>{},setIsCartOpen:()=>{},removeAllProductVariants:()=>{}}),mt=({children:t})=>{const[n,a]=s({}),[r,l]=s(!1),o=({product:e,quantity:t,isAddOperation:n,variantId:r,selectedAddons:l})=>{if(i(e)||t<0)return;const{id:o,vat:d=0}=e,s=ct(o,r,l),{price:c,optionsPrice:u}=lt({product:e,variantId:r,quantity:1,selectedAddons:l,noVat:!0});a((e=>{const i=e[s],a=n?((null==i?void 0:i.quantity)||0)+t:t;if(a<=0){const t=e,n=s;t[n];return ne(t,["symbol"==typeof n?n:n+""])}return Object.assign(Object.assign({},e),{[s]:{productId:o,price:c,optionsPrice:u,quantity:a,vat:d,variantId:r,selectedAddons:l}})}))},d=({product:e,quantity:t=1,variantId:n,selectedAddons:i})=>o({product:e,quantity:t,variantId:n,selectedAddons:i,isAddOperation:!0}),c=({product:e,quantity:t=1,variantId:n,selectedAddons:i})=>o({product:e,quantity:t,variantId:n,selectedAddons:i,isAddOperation:!1}),u=e=>{if(!e||i(n))return;const t=Object.entries(n).reduce(((t,[n,i])=>(i.productId!==e&&(t[n]=i),t)),{});a(t)},_=m((()=>({cart:n,isCartOpen:r,addProduct:d,updateProduct:c,setIsCartOpen:l,removeAllProductVariants:u})),[n,r]);return e(ut.Provider,{value:_,children:t})},_t=()=>d(ut);var ht={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",image:"ProductsListItem-module_image__h6Wbi",notAvailable:"ProductsListItem-module_notAvailable__TeMCr",addToCart:"ProductsListItem-module_addToCart__WXrQZ",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26"};const gt={en:{},az:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et",Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Cart":"Səbətə əlavə edildi","Product choices":"Seçimlər","In order":"Sifarişdə","Not available":"Mövcud deyil","Get Started":"İndi başla","Choose Plan":"Planı seçin","Smart QR Menu":"Ağıllı QR Menyu","Link-in-bio":"Bio üçün link","Menu Analytics":"Menyu analitikası","Unlimited Products":"Limitsiz məhsul","Unlimited Categories":"Limitsiz kateqoriya","Product variants":"Məhsul variantları","Product options":"Məhsul əlavələri","Sales reports":"Satış hesabatı","24/7 Support":"24/7 dəstək","Multiple Branches":"Şöbələr","Order Management":"Sifarişlərin idarə edilməsi","Table Management":"Masaların idarə edilməsi","Mobile App for Owners & Staff":"Rəhbərlik və ofisiantlar üçün Mobil tətbiq","Point of Sale (POS)":"POS-kassa","Delivery Management":"Çatdırılmaların idarə edilməsi","Third-Party Delivery Integrations":"Çatdırılma partnyorlarının inteqrasiyası","RestaroundPay with Mobile":"RestaroundPay ilə ödəniş","Event management":"Tədbirlərin idarəsi","Unlimited Users":"Limitsiz istifadəçi","/ month":"/ Ay",monthly:"Aylıq plan",annually:"İllik plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!"},tr:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte","Not available":"Mevcut değil","Get Started":"Hemen Başla","Choose Plan":"Planı seçin","Smart QR Menu":"Akıllı QR Menü","Link-in-bio":"Bio için link","Menu Analytics":"Menü Analitiği","Unlimited Users":"Sınırsız kullanıcı","Unlimited Products":"Sınırsız ürün","Unlimited Categories":"Sınırsız kategori","Product variants":"Ürün çeşitleri","Product options":"Ürün seçenekleri","Sales reports":"Satış raporu","24/7 Support":"24/7 Teknik Destek","Multiple Branches":"Şube Yönetimi","Table Management":"Masa Yönetimi","Order Management":"Sipariş Yönetimi","Mobile App for Owners & Staff":"Patron ve Personel için Mobil Uygulama","Point of Sale (POS)":"POS Adisyon Sistemi","Delivery Management":"Paket sipariş yönetimi","Third-Party Delivery Integrations":"Üçüncü Parti Teslimat Entegrasyonları","RestaroundPay with Mobile":"Mobil ile RestaroundPay","Event management":"Etkinlik yönetimi","/ month":"/ Ay",monthly:"Aylık",annually:"Yıllık","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!"},nl:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling","Not available":"Niet beschikbaar","Get Started":"Start nu","Choose Plan":"Kies een plan","Smart QR Menu":"Slimme QR-menu","Link-in-bio":"Link-in-bio","Menu Analytics":"Menu analyse","Unlimited Products":"Onbeperkte producten","Unlimited Categories":"Onbeperkte categorieën","Unlimited Users":"Onbeperkte gebruikers","Product variants":"Productvarianten","Product options":"Productopties","Sales reports":"Verkooprapporten","24/7 Support":"24/7 ondersteuning","Multiple Branches":"Meerdere vestigingen","Table Management":"Tafelbeheer","Order Management":"Orderbeheer","Mobile App for Owners & Staff":"Mobiele app voor eigenaren en personeel","Point of Sale (POS)":"Kassasysteem (POS)","Delivery Management":"Leveringsbeheer","Third-Party Delivery Integrations":"Integraties van derden","RestaroundPay with Mobile":"RestaroundPay met mobiel","Event management":"Beheer van evenementen","/ month":"/ maand",monthly:"Maandelijks",annually:"Jaarlijks","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!"},et:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses","Not available":"Ei ole saadaval","Get Started":"Alustage","Choose Plan":"Vali plaan","Smart QR Menu":"Nutikas QR-menüü","Link-in-bio":"Link-in-bio","Menu Analytics":"Menüü Analüütika","Unlimited Products":"Piiramata tooted","Unlimited Categories":"Piiramata kategooriad","Product variants":"Tootevariandid","Product options":"Toote valikud","Sales reports":"Müügiaruanded","24/7 Support":"24/7 tugi","Multiple Branches":"Mitu filiaali","Table Management":"Tabelite haldamine","Order Management":"Tellimuste haldamine","Mobile App for Owners & Staff":"Mobiilirakendus omanikele ja töötajatele","Point of Sale (POS)":"Müügipunkt (POS)","Delivery Management":"Tarnejuhtimine","Third-Party Delivery Integrations":"Kolmanda osapoole tarneintegratsioonid","RestaroundPay with Mobile":"RestaroundPay koos mobiiliga","Event management":"Sündmuste haldamine","Unlimited Users":"Piiramatu arv kasutajaid","/ month":"/ kuus",monthly:"Igakuine",annually:"Igal aastal","Flexible Plans for Every Business - Simple Pricing, More Value!":"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!"},ru:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет товаров","Add items":"Добавить товары",Subtotal:"Итого",Events:"События","Product choices":"Варианты товара","In order":"В заказе","Not available":"Не доступен","Get Started":"Начать","Choose Plan":"Выберите план","Smart QR Menu":"Умное меню по QR-коду","Link-in-bio":"Ссылка в био","Menu Analytics":"Аналитика меню","Unlimited Users":"Неограниченные пользователи","Unlimited Products":"Неограниченные продукты","Unlimited Categories":"Неограниченные категории","Product variants":"Варианты продуктов","Product options":"Дополнения к продукту","Sales reports":"Отчеты о продажах","24/7 Support":"24/7 техническая поддержка","Multiple Branches":"Многочисленные филиалы","Table Management":"Управление столами","Order Management":"Управление заказами","Mobile App for Owners & Staff":"Мобильное приложение для владельцев и персонала","Point of Sale (POS)":"POS-касса","Delivery Management":"Управление доставкой","Third-Party Delivery Integrations":"Интеграция со сторонними поставщиками","RestaroundPay with Mobile":"«RestaroundPay» с мобильного","Event management":"Управление мероприятиями","/ month":"/ месяц",monthly:"Ежемесячный план",annually:"Годовой план","Flexible Plans for Every Business - Simple Pricing, More Value!":"Тарифы для любого бизнеса - Простой прайс, больше возможностей!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!"}},pt=e=>{const{language:t}=fe(),n=e||t;return{t:e=>{var t;return(null===(t=gt[n])||void 0===t?void 0:t[e])||e}}},vt=({product:n,currency:i,language:r,onClick:o})=>{var d,s;const{addProduct:c}=_t(),{image160:u,volume:_,available:h}=n||{},{name:p,description:v}=m((()=>et(n,r)),[n,r]),{formattedTotalPrice:f}=m((()=>nt(n,i,r)),[n,i,r]),{t:P}=pt(),b=(null===(d=null==n?void 0:n.variants)||void 0===d?void 0:d.length)>0,I=(null===(s=null==n?void 0:n.addons)||void 0===s?void 0:s.length)>0,A=!!u;return t("div",{className:l(ht,{container:!0,isClickable:!!o,noImage:!A}),onClick:o,children:[t(g,{justifyContent:"space-between",gap:0,children:[e("div",{className:ht.info,children:t(y,{gap:.25,children:[e("h3",{className:ht.name,children:p}),e("p",{className:ht.description,children:v}),t(g,{className:ht.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e("span",{children:f}),!!_&&e(E,{color:"muted",children:_})]}),!h&&e(E,{size:"xs",color:"danger",className:ht.notAvailableText,children:P("Not available")})]})}),A&&e(xe,{src:de(u),alt:p||"menu",className:l(ht,{image:!0,notAvailable:!h}),loading:"lazy",width:160,height:90})]}),h&&e("div",{className:ht.addToCart,children:e(N,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(b||I)&&o)return o();c({product:n}),a(Ae,{name:p,quantity:1})},icon:Z,type:C.DEFAULT})})]})};var ft={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",notAvailable:"ProductsGridItem-module_notAvailable__i4-HA",addToCart:"ProductsGridItem-module_addToCart__gYVrI",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5"};const Pt=({product:n,currency:i,language:r,onClick:o})=>{var d,s;const{addProduct:c}=_t(),{volume:u,image580:_,image160:h,image1024:p,available:v}=n||{},f=_||p||h,{name:P,description:b}=m((()=>et(n,r)),[n,r]),{formattedTotalPrice:I}=m((()=>nt(n,i,r)),[n,i,r]),{t:A}=pt(),S=(null===(d=null==n?void 0:n.variants)||void 0===d?void 0:d.length)>0,k=(null===(s=null==n?void 0:n.addons)||void 0===s?void 0:s.length)>0;return e("div",{className:ft.container,children:t("div",{className:l(ft,{content:!0,isClickable:!!o,noImage:!f}),onClick:o,children:[f&&e("div",{className:ft.imageContainer,children:e(xe,{src:de(f),alt:P||"menu",className:l(ft,{image:!0,notAvailable:!v}),loading:"lazy",width:580,height:326})}),e("div",{className:ft.info,children:e("div",{className:ft.data,children:t(y,{gap:.25,children:[e("h3",{className:ft.name,children:P}),e("p",{className:ft.description,children:b}),t(g,{className:ft.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e("span",{children:I}),!!u&&e(E,{color:"white",className:ft.volume,children:u})]}),!v&&e(E,{color:"white",size:"xs",className:ft.notAvailableText,children:A("Not available")})]})})}),v&&e("div",{className:ft.addToCart,children:e(N,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(S||k)&&o)return o();c({product:n}),a(Ae,{name:P,quantity:1})},icon:Z,type:C.DEFAULT})})]})})};var yt={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW"};const bt=()=>{const{cart:e}=_t();return Object.values(e||{}).reduce(((e,t)=>e+t.quantity),0)};var It={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk"};const At=({isDecreaseDisabled:n=!1,quantity:i=1,size:a="md",onIncrease:r,onDecrease:o})=>t(g,{className:l(It,{container:!0},[It[a]]),justifyContent:"space-between",gap:0,children:[e("div",{className:l(It,{quantityAction:!0,isDisabled:n}),onClick:o,children:e(P,{icon:Y})}),e("div",{className:It.quantityValue,children:i}),e("div",{className:It.quantityAction,onClick:r,children:e(P,{icon:Z})})]});var St="ProductInCart-module_container__oSrwq",Ct="ProductInCart-module_title__Vnc4l";const Et=({productId:n,onModalClose:a})=>{const{setIsCartOpen:r,removeAllProductVariants:l}=_t(),{t:o}=pt(),d=(e=>{const{cart:t}=_t();return i(t)||!e?0:Object.values(t).filter((t=>t.productId===e)).reduce(((e,t)=>e+t.quantity),0)})(n);return d<=0?null:t(b,{className:St,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[t(b.Item,{flex:1,className:Ct,children:[o("In order")," (",d,")"]}),e(b.Item,{flex:0,children:t(g,{children:[e(N,{icon:$,onClick:()=>{l(n)},type:C.DANGER,tooltip:o("Remove from order")}),e(N,{icon:K,onClick:()=>{r(!0),a&&a()},type:C.SUCCESS,tooltip:o("View order")})]})})]})};var Nt={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ"};const kt=({product:n,selectedVariant:i,focusedSection:a,onSelectVariant:o})=>{const{language:d,currency:s}=fe(),{t:m}=pt(),_=c(null),{variants:h}=n||{},p="variant"===a;return u((()=>{p&&_.current&&_.current.scrollIntoView({behavior:"smooth"})}),[a]),t(y,{className:l(Nt,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e("div",{className:Nt.variantsTitle,ref:_,children:m("Product choices")}),(h||[]).map((a=>{const{id:l}=a||{},{formattedTotalPrice:c}=(({variantId:e,currency:t="USD",language:n="en",product:i,quantity:a=1})=>{const l=at(e,i,a);return{totalPrice:l,formattedTotalPrice:r(l,t,n)}})({variantId:l,language:d,currency:s,product:n}),{title:u}=rt(a,d);return t(g,{justifyContent:"space-between",onClick:()=>o(l),className:Nt.variant,children:[e(k,{label:u,name:"variant",onChange:()=>o(l),checked:i===l,type:R.RADIO,size:"small",noMargin:!0}),e("div",{className:Nt.variantPrice,children:c})]},l)}))]})};var Rt={container:"ProductAddons-module_container__DRnT7"};const Mt=({product:n,selectedAddons:i,onOptionSelect:a})=>{const{language:l,currency:o}=fe(),{addons:d}=n||{};return e(y,{className:Rt.container,gap:1.5,fullWidth:!0,children:(d||[]).map((n=>{const{id:d,options:s,selectType:c}=n||{},{title:u}=Ke(n,l);return t(y,{children:[e(E,{variant:"bold",children:u}),e(y,{gap:1,fullWidth:!0,children:(s||[]).map((n=>{const{id:s}=n||{},{formattedTotalPrice:u}=(({option:e,currency:t="USD",language:n="en"})=>{const{price:i}=e||{};return{totalPrice:i,formattedTotalPrice:r(i,t,n)}})({option:n,language:l,currency:o}),{title:m}=Xe(n,l),_=c===$e.SINGLE,h=_?i[d]===s:(i[d]||[]).includes(s);return t(g,{justifyContent:"space-between",className:Rt.option,children:[e(k,{label:m,name:`option-${d}`,onChange:()=>a({addonId:d,optionId:s,isSingle:_,isRemove:!_&&h}),checked:h,type:_?R.RADIO:R.CHECKBOX,size:"small",noMargin:!0}),e("div",{className:Rt.optionPrice,children:u})]},s)}))})]},d)}))})},Ot=({product:n,onClose:l})=>{const{language:o,currency:d}=fe(),{addProduct:_,updateProduct:h}=_t(),[p,v]=s(1),[f,P]=s(!1),[b,I]=s(null),[A,S]=s(null),[C,E]=s({}),k=c(null),{t:R}=pt(),T=(({productId:e,variantId:t,selectedAddons:n})=>{var a;const{cart:r}=_t();return i(r)||!e?0:(null===(a=r[ct(e,t,n)])||void 0===a?void 0:a.quantity)||0})({productId:null==n?void 0:n.id,variantId:b,selectedAddons:C}),{name:L,description:w}=m((()=>et(n,o)),[n,o]),{formattedTotalPrice:D}=m((()=>nt(n,d,o)),[n,d,o]),{formattedTotalPrice:U}=m((()=>(({product:e,variantId:t,quantity:n=1,currency:i,language:a,selectedAddons:l,noVat:o=!1})=>{const{total:d}=lt({product:e,variantId:t,quantity:n,selectedAddons:l,noVat:o});return{totalPrice:d,formattedTotalPrice:r(d,i,a)}})({product:n,quantity:p,language:o,currency:d,variantId:b,selectedAddons:C})),[n,p,o,d,b,C]),j=f?0===p:1===p,z=m((()=>R(f?0===p?"Remove from order":"Update order":"Add to order")),[f,p]);u((()=>{v(T>0?T:1),P(T>0)}),[T,n]),u((()=>{I(null),E({})}),[n]);const x=e=>{-1===e&&j||v((t=>Math.max(0,t+e)))};if(i(n))return null;const{image1024:G,volume:H,variants:q,addons:V,available:B}=n,F=(null==q?void 0:q.length)>0,W=(null==V?void 0:V.length)>0;return e("div",{className:yt.container,onClick:e=>{var t,n;(null===(n=null===(t=null==k?void 0:k.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||l&&l()},children:e(M,{onClose:l,ref:k,noBodyPadding:!0,size:"small",content:t("div",{className:yt.content,children:[t(y,{gap:0,children:[G&&e(xe,{src:de(G),width:1024,height:400,alt:L||"product",className:yt.image}),t(y,{className:yt.details,gap:1,children:[e("h2",{className:yt.name,children:L}),t(g,{justifyContent:"space-between",children:[e("div",{className:yt.price,children:D}),e("div",{className:yt.volume,children:H})]}),e("div",{className:yt.description,children:w})]}),(F||W)&&t(y,{gap:0,className:yt.choices,children:[F&&e(kt,{product:n,selectedVariant:b,focusedSection:A,onSelectVariant:I}),W&&e(Mt,{product:n,selectedAddons:C,onOptionSelect:({addonId:e,optionId:t,isSingle:n,isRemove:i=!1})=>{E((a=>{if(n)return Object.assign(Object.assign({},a),{[e]:t});const r=a[e]||[],l=i?r.filter((e=>e!==t)):[...new Set([...r,t])];return Object.assign(Object.assign({},a),{[e]:l})}))}})]})]}),e("div",{className:yt.close,children:e(N,{onClick:l,icon:X})})]}),footer:t(y,{children:[e(Et,{productId:null==n?void 0:n.id,onModalClose:l}),t(g,{className:yt.addToCart,gap:.5,children:[e(At,{isDecreaseDisabled:j,onDecrease:()=>x(-1),onIncrease:()=>x(1),quantity:p}),e(O,{className:yt.addAction,label:B?t(g,{fullWidth:!0,justifyContent:"space-between",children:[e("span",{className:yt.actionTitle,children:z}),e("span",{children:U})]}):R("Not available"),onClick:()=>{var e;if((null===(e=null==n?void 0:n.variants)||void 0===e?void 0:e.length)>0&&!b)return S("variant"),void setTimeout((()=>{S(null)}),200);f?h({product:n,quantity:p,variantId:b,selectedAddons:C}):(_({product:n,quantity:p,variantId:b,selectedAddons:C}),a(Ae,{name:L,quantity:p})),l&&l()},size:"xl",fullWidth:!0,disabled:!B})]})]})})})};var Tt="Cart-module_container__3KQtx",Lt="Cart-module_content__rkiZa",wt={container:"CartStepper-module_container__4CF1L",count:"CartStepper-module_count__E-RBg",actionText:"CartStepper-module_actionText__-rVKA",totalPrice:"CartStepper-module_totalPrice__QboRN",isClickable:"CartStepper-module_isClickable__mDptU",flexWide:"CartStepper-module_flexWide__eXxCr",slidein:"CartStepper-module_slidein__d5JQ-",fadeInOut:"CartStepper-module_fadeInOut__pS8nn",heightAnimation:"CartStepper-module_heightAnimation__7-e5Z",fadein:"CartStepper-module_fadein__-Ba0-",floatAnimation:"CartStepper-module_floatAnimation__rq6zX",bottomSheet:"CartStepper-module_bottomSheet__1wHHD",slideRightToLeft:"CartStepper-module_slideRightToLeft__0KLAo"};const Dt=({actionText:n,onClick:i})=>{const a=bt(),{formattedTotalPrice:o}=(()=>{const{cart:e}=_t(),{currency:t,language:n}=fe(),i=Object.values(e||{}).reduce(((e,t)=>{const{totalPrice:n}=st(t);return e+n}),0);return{totalPrice:i,formattedTotalPrice:r(i,t,n)}})();return t(b,{className:l(wt,{container:!0,isClickable:!!i}),justifyContent:"space-between",alignItems:"center",onClick:i,children:[e(b.Item,{flex:1,children:t(g,{alignItems:"center",children:[e("div",{className:wt.count,children:a}),e("div",{className:wt.actionText,children:n})]})}),e(b.Item,{className:wt.totalPrice,flex:1,children:o})]})},Ut=()=>{const{setIsCartOpen:t}=_t(),{t:n}=pt();return bt()<=0?null:e("div",{className:Tt,children:e("div",{className:Lt,children:e(Dt,{onClick:()=>t(!0),actionText:n("View order")})})})};var jt={container:"CartDrawer-module_container__zvapw",content:"CartDrawer-module_content__ELSiG"},zt="CartItem-module_container__At7lj",xt="CartItem-module_image__D-zzG",Gt="CartItem-module_data__Lo3Fb",Ht="CartItem-module_name__EksZu",qt="CartItem-module_price__yJxl6";const Vt=e=>{var t;const{products:n}=fe();return(null===(t=null==n?void 0:n.find)||void 0===t?void 0:t.call(n,(({id:t})=>t===e)))||{}},Bt=({productId:t,variantId:n,min:i=1,size:a="md",selectedAddons:r})=>{const l=(({productId:e,variantId:t,selectedAddons:n})=>{const{cart:i}=_t(),a=i[ct(e,t,n)];return(null==a?void 0:a.quantity)||1})({productId:t,variantId:n,selectedAddons:r}),o=Vt(t),{updateProduct:d}=_t();return e(At,{isDecreaseDisabled:l===i,onDecrease:()=>d({product:o,quantity:l-1,variantId:n,selectedAddons:r}),onIncrease:()=>d({product:o,quantity:l+1,variantId:n,selectedAddons:r}),quantity:l,size:a})},Ft=({item:a,product:r,language:l})=>{const{selectedAddons:o}=a||{};return e(n,{children:Object.entries(o||{}).map((([e,n])=>{const a=((e,t)=>((null==e?void 0:e.addons)||[]).find((({id:e})=>e===t))||{})(r,Number(e));if(i(a)||i(a.options)||!Array.isArray(a.options))return null;let o="";if(Array.isArray(n)){const e=a.options.filter((({id:e})=>n.includes(e)));if(i(e))return null;o=e.map((e=>{const{title:t}=Xe(e,l);return t})).filter(Boolean).join(", ")}else{const e=a.options.find((({id:e})=>e===n));if(i(e))return null;const{title:t}=Xe(e,l);o=t}const{title:d}=Ke(a,l);return t(E,{color:"muted",size:"xs",children:[d,": ",o]},e)})).filter(Boolean)})},Wt=({item:n})=>{const{productId:i,variantId:a,selectedAddons:r}=n||{},l=Vt(i),o=it(l,a),{language:d,currency:s}=fe(),{image160:c}=l,{title:u}=rt(o,d),{name:_}=m((()=>et(l,d)),[l,d]),{formattedTotalPrice:h}=m((()=>st(n,s,d)),[n,s,d]);return t(g,{className:zt,gap:1,alignItems:"flex-start",children:[c&&e(xe,{src:de(c),alt:_||"menu",className:xt,loading:"lazy",width:80,height:45}),t("div",{className:Gt,children:[e("div",{className:Ht,children:_}),t(y,{gap:0,children:[!!u&&e(E,{color:"muted",size:"xs",children:u}),e(Ft,{item:n,product:l,language:d})]}),e("div",{className:qt,children:h})]}),e(Bt,{productId:i,variantId:a,selectedAddons:r,size:"sm",min:0})]})},Qt=()=>{const{isCartOpen:n,cart:a,setIsCartOpen:r}=_t(),l=c(null),{t:o}=pt(),d=i(a),s=()=>r(!1);return n?e("div",{className:jt.container,onClick:e=>{var t,n;(null===(n=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||s()},children:e(T,{ref:l,onClose:s,isOpen:n,title:o("Your order"),content:e("div",{className:jt.content,children:d?e((()=>t(y,{className:jt.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e(E,{variant:"h2",children:o("Empty order")}),e(L,{text:o("You don't have any items in your order")})]})),{}):e("div",{className:jt.items,children:Object.keys(a||{}).map((t=>e(Wt,{item:a[t]},t)))})}),footer:d?e(O,{label:o("Add items"),onClick:s,type:C.PRIMARY,size:"xl",fullWidth:!0}):e(Dt,{actionText:o("Subtotal")})})}):null},Zt=_((({categoryProductMap:n=[],currency:i,language:r,productBlocksRef:l,containerRef:o,onCategoryInView:d})=>{const[c,m]=s(null),[_,h]=s(ot.LIST),p=[{icon:J,type:ot.LIST},{icon:ee,type:ot.GRID}],v=e=>{const{name:t}=et(e,r);a(Ie,{name:t}),m(e)};return u((()=>{const e=new IntersectionObserver((e=>{var t;const n=((null===(t=null==o?void 0:o.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let i=null,a=1/0;e.forEach((e=>{if(e.isIntersecting){const t=e.boundingClientRect,r=t.top+t.height/2,l=Math.abs(r-n);l<a&&(a=l,i=e.target.getAttribute("data-category-id"))}})),i&&d(Number(i))}),{threshold:.1});return Object.entries(l.current||{}).forEach((([t,n])=>{n&&(n.setAttribute("data-category-id",t),e.observe(n))})),()=>{e.disconnect()}}),[l,o]),e(mt,{children:t("div",{className:Be,children:[e(g,{className:Fe,alignItems:"center",children:p.map((({icon:t,type:n})=>e(N,{icon:t,onClick:()=>(e=>{h(e),a(Se,{name:e})})(n),type:n===_?C.PRIMARY:C.DEFAULT},n)))}),e(y,{children:(n||[]).map((n=>{const{name:a}=Ee(n,r),{id:o,products:d}=n;return t("div",{className:We,ref:e=>{e&&(l.current[o]=e)},"data-category-id":o,children:[e("h2",{className:Qe,children:a}),e("div",{className:Ze,children:e(y,{gap:0,children:(d||[]).map((t=>_===ot.GRID?e(Pt,{product:t,currency:i,language:r,onClick:()=>v(t)},t.id):e(vt,{product:t,currency:i,language:r,onClick:()=>v(t)},t.id)))})})]},o)}))}),e(Ot,{product:c,onClose:()=>m(null)}),e(Ut,{}),e(Qt,{})]})})}),((e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language));Zt.displayName="Products";var Yt="Branches-module_branches__sOuoV",$t="Branches-module_list__vYoT2",Kt="Branches-module_name__K0Z-4";const Xt=({branches:t=[],rootPath:n="",onBranchSelect:i})=>{const a=({children:t,id:a})=>i?e("div",{onClick:()=>i(a),children:t}):e("a",{href:`${n}/${a}`,children:t});return e("div",{className:Yt,children:e(w,{className:$t,children:t.map((({id:t,name:n})=>e(a,{id:t,children:e(D,{noBottomMargin:!0,children:e(b,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:e("h2",{className:Kt,children:n})})})},t)))})})},Jt=({data:r})=>{var l;const{name:o,coverImage:d,logoImage:m,branches:_=[],branchId:h,language:g,categories:p,products:v,currency:f,instagram:P,facebook:y,whatsapp:b,telegram:I,tiktok:A,rootPath:S,hostname:C,onBranchSelect:E}=r||{},N=_.length<=1,k=((e,t)=>{const n=t.reduce(((e,t)=>{if(!t.visible)return e;const n=Number(t.categoryId);return e[n]||(e[n]=[]),e[n].push(t),e}),{});return e.map((e=>Object.assign(Object.assign({},e),{products:n[Number(e.id)]||[]}))).filter((e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0}))})(p,v),R=(()=>{var e;return N?(null===(e=null==_?void 0:_[0])||void 0===e?void 0:e.id)?_[0]:{}:_.find((e=>e.id===Number(h)))})(),M=N||!(null==R?void 0:R.name)?o:(null==R?void 0:R.name)||"",[O,T]=s(null===(l=null==p?void 0:p[0])||void 0===l?void 0:l.id),L=c({}),w=c(null),D=c(!0),{url:U,domain:j}=((e,t)=>{const n=he.includes(e)?e:_e;return{url:`https://${n}/${t||"en"}`,domain:n}})(C,g),z=e=>ie(void 0,void 0,void 0,(function*(){D.current=!1,T(e),(e=>{var t;const n=null===(t=null==L?void 0:L.current)||void 0===t?void 0:t[e];n&&(setTimeout((()=>{n.scrollIntoView({behavior:"smooth",block:"start"})}),100),setTimeout((()=>{D.current=!0}),1e3))})(e)}));return u((()=>{(()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search),t=Number(e.get("category"));if(!t)return;const n=(p||[]).find((({id:e})=>e===t));i(n)||z(t)})()}),[]),t("div",{className:ae,ref:w,children:[e(qe,{branch:R,name:M,coverImage:ce(d),logoImage:se(m),instagram:P,facebook:y,whatsapp:b,telegram:I,tiktok:A}),N||h?t(n,{children:[e(Ve,{categoryProductMap:k,language:g,selectedCategoryId:O,onSelectCategory:z}),e(Zt,{currency:f,language:g,productBlocksRef:L,containerRef:w,categoryProductMap:k,onCategoryInView:e=>{if(!(null==D?void 0:D.current))return;const t=((e,t,n)=>{var a;const r=null===(a=null==t?void 0:t.find)||void 0===a?void 0:a.call(t,(({id:t})=>t===e));if(i(r))return"";const{name:l}=Ee(r,n);return l})(e,p,g);a(be,{name:t}),T(e)}})]}):e(Xt,{branches:_,onBranchSelect:E,rootPath:S}),!!C&&e("a",{rel:"noopener noreferrer",target:"_blank",href:U,className:le,children:j})]})},en=({data:t})=>e(ve,{value:t,children:e(Jt,{data:t})});var tn={};const nn=({currentGoal:t,language:n,setGoal:i})=>{const{t:a}=pt(n),r=c({}),l=e=>{switch(e){case be:return a("Scrolled to Category");case ye:return a("Category Selected");case Ie:return a("Product Details");case Ae:return a("Product Added to Cart");default:return""}},o=h((e=>{var t,n;i(e),null===(n=null===(t=null==r?void 0:r.current)||void 0===t?void 0:t.close)||void 0===n||n.call(t)}),[i]);return e(U,{action:l(t),actionSize:"large",type:C.BORDERED_PRIMARY,closeRef:r,menu:e("div",{className:tn.toolbarMenu,children:Ce.map((t=>e(j,{onClick:()=>o(t),children:l(t)},t)))})})},an=({data:t,isLoading:n=!1,loadingImage:i,language:a,goal:r,setGoal:l})=>{const{t:o}=pt(a);return e(D,{title:o("Events"),toolbar:e(nn,{language:a,currentGoal:r,setGoal:l}),children:n?e(z,{image:i}):e(x,{data:t})})};var rn={container:"Pricing-module_container__86ns8",intervals:"Pricing-module_intervals__YOrns",interval:"Pricing-module_interval__perjd",active:"Pricing-module_active__BRQhl",plans:"Pricing-module_plans__hbRn5",plan:"Pricing-module_plan__pGWAl",title:"Pricing-module_title__rMUDX",price:"Pricing-module_price__TKBkb",originalPrice:"Pricing-module_originalPrice__klyhF",discountedPrice:"Pricing-module_discountedPrice__qS7GB",action:"Pricing-module_action__08XLt",benefits:"Pricing-module_benefits__OjGx8",benefit:"Pricing-module_benefit__-oBt1",flexWide:"Pricing-module_flexWide__mXSDX",slidein:"Pricing-module_slidein__tTiof",fadeInOut:"Pricing-module_fadeInOut__rYI0L",heightAnimation:"Pricing-module_heightAnimation__WKFZx",fadein:"Pricing-module_fadein__HeFT0",floatAnimation:"Pricing-module_floatAnimation__1VcsO",bottomSheet:"Pricing-module_bottomSheet__v4vTu",slideRightToLeft:"Pricing-module_slideRightToLeft__GpKCA"};const ln={appetizer:{title:"Appetizer",price:{monthly:9,annually:7}},mainCourse:{title:"Main Course",price:{monthly:19,annually:15}},chefsSpecial:{title:"Chef's Special",price:{monthly:49,annually:39}}},on=[{title:"Smart QR Menu",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Link-in-bio",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Menu Analytics",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Users",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Products",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Categories",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Product variants",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Product options",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"24/7 Support",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Sales reports",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Multiple Branches",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Table Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Order Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Delivery Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Mobile App for Owners & Staff",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0},{title:"Point of Sale (POS)",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0},{title:"Third-Party Delivery Integrations",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0}],dn=({plan:n,language:i,interval:a,currency:l})=>{const{t:o}=pt(i),{price:d,discountedPrice:s}=ln[n],c=d[a];return void 0!==s?t(y,{gap:0,children:[t(g,{children:[e("span",{className:rn.discountedPrice,children:r(s,l,i)}),e("span",{className:rn.originalPrice,children:r(c,l,i)})]}),e(E,{size:"sm",children:o("/ month")})]}):t(g,{gap:.5,children:[e(E,{size:"xxl",variant:"bold",children:r(c,l,i)}),e(E,{size:"sm",children:o("/ month")})]})},sn=({currency:n,language:i,onPlanSelect:a,onIntervalSelect:r})=>{const[o,d]=s("annually"),{t:c}=pt(i),u=[dt.APPETIZER,dt.MAIN_COURSE,dt.CHEFS_SPECIAL],m=a?"Choose Plan":"Get Started",_=({children:t,plan:n})=>a?e("div",{className:rn.plan,onClick:()=>{a(n)},children:t}):e("a",{className:rn.plan,href:ge(i,`pricing-${n}`),target:"_blank",rel:"noreferrer noopener",children:t});return t("div",{className:rn.container,children:[e("div",{className:rn.intervals,children:["annually","monthly"].map((t=>e("div",{className:l(rn,{interval:!0,active:o===t}),onClick:()=>(e=>{d(e),r&&r(e)})(t),children:c(t)},t)))}),e("div",{className:rn.plans,children:u.map((a=>e(_,{plan:a,children:t(D,{children:[e("div",{className:rn.title,children:ln[a].title}),e("div",{className:rn.price,children:e(dn,{plan:a,language:i,interval:o,currency:n})}),e("div",{className:rn.action,children:e(O,{label:c(m),fullWidth:!0,size:"xl",type:a===dt.MAIN_COURSE?C.PRIMARY:C.BORDERED_PRIMARY,onClick:()=>{}})}),e("div",{className:rn.benefits,children:on.map((n=>t("div",{className:rn.benefit,children:[e(P,{icon:n[a]?te:Y,size:"md"})," ",e("span",{children:c(n.title)})]},n.title)))})]})},a)))})]})};export{an as Events,sn as Pricing,en as PublicMenu};
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{isEmpty as i,trackEvent as a,priceFormatter as r,classNames as o}from"@sorocraft/js-utils";import{createContext as l,useContext as d,useState as s,useRef as c,useEffect as u,useMemo as m,memo as _,useCallback as h}from"react";import{Row as g,classNames as p,IconLink as v,Tooltip as f,SVGIcon as P,Column as y,Flex as b,Carousel as I,CarouselItem as A,Chip as S,UIElementType as C,Text as E,IconButton as N,Input as k,InputType as R,Modal as M,Button as O,Drawer as T,Description as L,Container as w,Card as D,DropDown as U,DropDownMenuItem as j,Loading as z,BarChart as x}from"@sorocraft/ui";import{Phone as G,Whatsapp as H,Instagram as q,Telegram as V,Tiktok as B,Facebook as F,Wifi as W,MarkerPin as Q,Plus as Z,Minus as Y,Trash as $,ShoppingBag as K,Close as X,List as J,Grid as ee,Check as te}from"@sorocraft/ui/icons";function ne(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}function ie(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{d(i.next(e))}catch(e){r(e)}}function l(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}d((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var ae="PublicMenu-module_container__QLN6U",re="PublicMenu-module_categories__Iy6NC",oe="PublicMenu-module_footer__6G3DQ";const le="https://images.restaround.co",de=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${le}/${e}`:"",se=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${le}/${e}`:"https://images.restaround.co/no-photo-128.webp",ce=e=>e?e.includes("base64")||e.startsWith("https://")?e:`${le}/${e}`:"https://images.restaround.co/restaround-doodle.webp",ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",me=(e,t,n)=>ue.charAt(e>>2)+ue.charAt((3&e)<<4|t>>4)+ue.charAt((15&t)<<2|n>>6)+ue.charAt(63&n),_e="restaround.co",he=[_e,"restaround.az","restaround.ee","restaround.nl"],ge=(e,t)=>{const n=(e=>"az"===e?"az":"co")(e);return`https://app.restaround.${n}/auth/register?lang=${e}&utm_source=${t}`},pe=l({}),ve=({children:t,value:n})=>{const a=i(n)?{}:n;return a.currency||(a.currency="AZN"),a.language||(a.language="az"),e(pe.Provider,{value:i(n)?{}:n,children:t})},fe=()=>d(pe),Pe="digital_menu",ye=`${Pe}_category_select`,be=`${Pe}_category_scroll`,Ie=`${Pe}_product_details`,Ae=`${Pe}_product_add_cart`,Se=`${Pe}_product_view_changed`,Ce=[ye,be,Ie,Ae],Ee=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}};var Ne="Header-module_container__tenlF",ke="Header-module_cover__BAWZK",Re="Header-module_content__Gx4Al",Me="Header-module_logo__4MTCm",Oe="Header-module_info__IchYA",Te="Header-module_name__30wyw",Le="Header-module_address__WOxXc",we="Header-module_addressText__lUszI",De="Header-module_social__AoP0z",Ue="Header-module_links__EeQxg",je="Header-module_wifiPassword__VWBTa",ze="Header-module_wifiPasswordIcon__Ukn3D";const xe=t=>{const{priority:n,blurDataURL:i,quality:a,placeholder:r,fetchPriority:o}=t,l=ne(t,["priority","blurDataURL","quality","placeholder","fetchPriority"]),{imageTag:d}=fe()||{};if(d){return e(d,Object.assign({},t,{quality:t.quality||100,placeholder:"blur",blurDataURL:(s=235,c=59,u=90,`data:image/gif;base64,R0lGODlhAQABAPAA${me(0,s,c)+me(u,255,255)}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`)}))}var s,c,u;return e("img",Object.assign({},l))};var Ge={container:"Languages-module_container__nJeK1",currentLanguage:"Languages-module_currentLanguage__EFw6Q",options:"Languages-module_options__6jLRm",option:"Languages-module_option__QkVQd",isOpen:"Languages-module_isOpen__eUGbg",flexWide:"Languages-module_flexWide__zQ9jN",slidein:"Languages-module_slidein__C4UHU",fadeInOut:"Languages-module_fadeInOut__U-vhH",heightAnimation:"Languages-module_heightAnimation__gIQkF",fadein:"Languages-module_fadein__vPmsX",floatAnimation:"Languages-module_floatAnimation__L-kPH",bottomSheet:"Languages-module_bottomSheet__-t-q8",slideRightToLeft:"Languages-module_slideRightToLeft__y0l-f"};const He=()=>{var n;const{language:i,languages:a,onLanguageSelect:r}=fe(),[o,l]=s(!1),d=(null==a?void 0:a.length)>1,c=(null===(n=null==a?void 0:a.filter)||void 0===n?void 0:n.call(a,(({code:e})=>e!==i)))||[],u=e=>`https://images.restaround.co/languages/${e}.svg`;return d?e("div",{className:Ge.container,onClick:()=>l(!o),children:t(g,{alignItems:"center",gap:0,children:[e(g,{alignItems:"center",className:p(Ge,{options:!0,isOpen:o}),children:c.map((({code:t})=>e("img",{src:u(t),className:Ge.option,onClick:()=>(e=>{r&&r(e)})(t),alt:t},t)))}),e("img",{src:u(i),alt:i||"",className:Ge.currentLanguage})]})}):null},qe=({branch:n,coverImage:a,logoImage:r,name:o,instagram:l,facebook:d,whatsapp:s,telegram:c,tiktok:u})=>{const{address:m,latitude:_,longitude:h,phone:p,wifiPassword:I}=n||{},A=i(n),S=`https://www.google.com/maps/place/${_},${h}`;return t("div",{className:Ne,children:[e(xe,{src:a,alt:o,className:ke,width:1024,height:400,priority:!0,sizes:"100vw",fetchPriority:"high",loading:"eager"}),e("div",{className:Re,children:e(A?()=>t(y,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e(xe,{src:r,alt:o,className:Me,width:96,height:96}),e("div",{className:Oe,children:e("h1",{className:Te,children:o})})]}):()=>t(b,{direction:"row",gap:1,alignItems:"center",fullWidth:!0,children:[e(b.Item,{children:e(xe,{src:r,alt:o,className:Me,width:96,height:96})}),e(b.Item,{shrink:!0,className:Oe,children:t(y,{gap:.25,children:[e("h1",{className:Te,children:o}),e("a",{className:Le,href:S,target:"_blank",rel:"noopener noreferrer",children:t(g,{alignItems:"center",gap:.5,children:[e(P,{icon:Q,theme:"dark"}),e("span",{className:we,children:m})]})})]})})]}),{})}),e(He,{}),!A&&e("div",{className:De,children:e("div",{className:Ue,children:e(g,{gap:2,alignItems:"center",children:t(g,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!p&&e(v,{icon:G,href:`tel:+${p}`,size:"sm",shape:"circle",theme:"light"}),!!s&&e(v,{icon:H,href:`https://wa.me/${s}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!l&&e(v,{icon:q,href:l,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!c&&e(v,{icon:V,href:c,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!u&&e(v,{icon:B,href:u,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!d&&e(v,{icon:F,href:d,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!I&&e(f,{hint:I,children:e("div",{className:je,children:e(P,{icon:W,size:"sm",className:ze})})})]})})})})]})},Ve=({categoryProductMap:t=[],language:n,selectedCategoryId:i,onSelectCategory:r})=>{const o=c({}),l=c(null);return u((()=>{i&&(()=>{var e;const t=null===(e=null==o?void 0:o.current)||void 0===e?void 0:e[i];if(!t||!l.current)return;const n=l.current.clientWidth,a=t.offsetLeft-n/2+t.offsetWidth/2;l.current.scrollTo({left:a,behavior:"smooth"})})()}),[i]),e("div",{className:re,children:e(I,{gap:1,onGetRef:e=>{(null==e?void 0:e.current)&&(l.current=e.current)},children:(t||[]).map((({id:t,translations:l})=>{const{name:d}=l.find((e=>e.language===n))||{};return e(A,{children:e(S,{onClick:()=>((e,t)=>{e!==i&&(a(ye,{name:t}),r(e))})(t,d),type:C.BORDERED_PRIMARY,active:t===i,children:e("div",{ref:e=>{e&&(o.current[t]=e)},children:d})})},t)}))})})};var Be="Products-module_container__bF2LF",Fe="Products-module_view__l857X",We="Products-module_products__AoDrY",Qe="Products-module_category__Sp7dE",Ze="Products-module_list__LH4v5";const Ye=(e=0,t=1,n=0)=>e*t*(1+n/100);var $e;!function(e){e.SINGLE="SINGLE",e.MULTIPLE="MULTIPLE"}($e||($e={}));const Ke=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},Xe=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},Je=(e,t)=>{var n;return(null===(n=((null==e?void 0:e.options)||[]).find((({id:e})=>e===t)))||void 0===n?void 0:n.price)||0},et=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},tt=(e,t=1)=>{const{price:n=0,vat:i=0}=e||{};return Ye(n,t,i)},nt=(e,t,n,i=1)=>{const a=tt(e,i);return{totalPrice:a,formattedTotalPrice:r(a,t,n)}},it=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.variants)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.id===t)))||{}},at=(e,t,n)=>{const i=it(t,e),{vat:a}=t||{},{price:r}=i||{};return Ye(r,n,a)},rt=(e,t)=>{var n,i;return(null===(i=null===(n=null==e?void 0:e.translations)||void 0===n?void 0:n.find)||void 0===i?void 0:i.call(n,(e=>e.language===t)))||{}},ot=({product:e,variantId:t,quantity:n=1,selectedAddons:a,noVat:r=!1})=>{if(i(e))return{price:0,optionsPrice:0,total:0};const o=Object.assign(Object.assign({},e),{vat:r?0:e.vat}),l=((e,t={},n)=>((null==e?void 0:e.addons)||[]).filter((e=>Object.prototype.hasOwnProperty.call(t,e.id))).reduce(((e,n)=>{const{id:i,selectType:a}=n;if(a===$e.SINGLE){const a=t[i];return e+Je(n,a)}return e+(t[i]||[]).reduce(((e,t)=>e+Je(n,t)),0)}),0)*n)(o,a,n),d=t?at(t,o,n):tt(o,n);return{price:d,optionsPrice:l,total:d+l}};var lt,dt;!function(e){e.LIST="list",e.GRID="grid"}(lt||(lt={})),function(e){e.APPETIZER="appetizer",e.MAIN_COURSE="mainCourse",e.CHEFS_SPECIAL="chefsSpecial"}(dt||(dt={}));const st=(e,t="USD",n="en")=>{const{price:i,vat:a,quantity:o,optionsPrice:l}=e||{},d=Ye(i,o,a)+l*o;return{totalPrice:d,formattedTotalPrice:r(d,t,n)}},ct=(e,t,n)=>{if(!e)throw new Error("Product ID is required");let i=`${e}`;t&&(i+=`-${t}`);const a=Object.entries(n||{}).map((([e,t])=>{if(!e||!t)return null;const n=Array.isArray(t)?t.filter(Boolean).join("-"):`${t}`;return n?`${e}-${n}`:null})).filter(Boolean).join("-");return a&&(i+=`-${a}`),i},ut=l({cart:{},isCartOpen:!1,addProduct:()=>{},updateProduct:()=>{},setIsCartOpen:()=>{},removeAllProductVariants:()=>{}}),mt=({children:t})=>{const[n,a]=s({}),[r,o]=s(!1),l=({product:e,quantity:t,isAddOperation:n,variantId:r,selectedAddons:o})=>{if(i(e)||t<0)return;const{id:l,vat:d=0}=e,s=ct(l,r,o),{price:c,optionsPrice:u}=ot({product:e,variantId:r,quantity:1,selectedAddons:o,noVat:!0});a((e=>{const i=e[s],a=n?((null==i?void 0:i.quantity)||0)+t:t;if(a<=0){const t=e,n=s;t[n];return ne(t,["symbol"==typeof n?n:n+""])}return Object.assign(Object.assign({},e),{[s]:{productId:l,price:c,optionsPrice:u,quantity:a,vat:d,variantId:r,selectedAddons:o}})}))},d=({product:e,quantity:t=1,variantId:n,selectedAddons:i})=>l({product:e,quantity:t,variantId:n,selectedAddons:i,isAddOperation:!0}),c=({product:e,quantity:t=1,variantId:n,selectedAddons:i})=>l({product:e,quantity:t,variantId:n,selectedAddons:i,isAddOperation:!1}),u=e=>{if(!e||i(n))return;const t=Object.entries(n).reduce(((t,[n,i])=>(i.productId!==e&&(t[n]=i),t)),{});a(t)},_=m((()=>({cart:n,isCartOpen:r,addProduct:d,updateProduct:c,setIsCartOpen:o,removeAllProductVariants:u})),[n,r]);return e(ut.Provider,{value:_,children:t})},_t=()=>d(ut);var ht={container:"ProductsListItem-module_container__i9tFs",isClickable:"ProductsListItem-module_isClickable__iHHdI",info:"ProductsListItem-module_info__4s4j2",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",price:"ProductsListItem-module_price__V1GRM",image:"ProductsListItem-module_image__h6Wbi",notAvailable:"ProductsListItem-module_notAvailable__TeMCr",addToCart:"ProductsListItem-module_addToCart__WXrQZ",noImage:"ProductsListItem-module_noImage__G4E-a",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV",bottomSheet:"ProductsListItem-module_bottomSheet__-YAdd",slideRightToLeft:"ProductsListItem-module_slideRightToLeft__oXk26"};const gt={en:{},az:{"View order":"Şifarişi göstər","Remove from order":"Sifarişdən sil","Update order":"Sifarişi yenilə","Add to order":"Sifarişə əlavə et","Your order":"Sifarişiniz",Subtotal:"Ümumi","Empty order":"Boş sifariş","You don't have any items in your order":"Sifarişinizdə heç bir məhsul yoxdur","Add items":"Məhsul əlavə et",Events:"Hərəkətlər","Scrolled to Category":"Kateqoriyaya sürüşdürdü","Category Selected":"Kateqoriya seçildi","Product Details":"Məhsul detalına baxıldı","Product Added to Cart":"Səbətə əlavə edildi","Product choices":"Seçimlər","In order":"Sifarişdə","Not available":"Mövcud deyil","Get Started":"İndi başla","Choose Plan":"Planı seçin","Smart QR Menu":"Ağıllı QR Menyu","Link-in-bio":"Bio üçün link","Menu Analytics":"Menyu analitikası","Unlimited Products":"Limitsiz məhsul","Unlimited Categories":"Limitsiz kateqoriya","Product variants":"Məhsul variantları","Product options":"Məhsul əlavələri","Sales reports":"Satış hesabatı","24/7 Support":"24/7 dəstək","Multiple Branches":"Şöbələr","Order Management":"Sifarişlərin idarə edilməsi","Table Management":"Masaların idarə edilməsi","Mobile App for Owners & Staff":"Rəhbərlik və ofisiantlar üçün Mobil tətbiq","Point of Sale (POS)":"POS-kassa","Delivery Management":"Çatdırılmaların idarə edilməsi","Third-Party Delivery Integrations":"Çatdırılma partnyorlarının inteqrasiyası","RestaroundPay with Mobile":"RestaroundPay ilə ödəniş","Event management":"Tədbirlərin idarəsi","Unlimited Users":"Limitsiz istifadəçi","/ month":"/ Ay",monthly:"Aylıq plan",annually:"İllik plan","Flexible Plans for Every Business - Simple Pricing, More Value!":"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!"},tr:{"View order":"Siparişi Görüntüle","Remove from order":"Siparişten Kaldır","Update order":"Siparişi Güncelle","Add to order":"Siparişe Ekle","Your order":"Siparişiniz","Empty order":"Boş sipariş","You don't have any items in your order":"Siparişinizde hiç bir ürün yok","Add items":"Ürün ekle",Subtotal:"Toplam",Events:"Olaylar","Product choices":"Seçenekler","In order":"Siparişte","Not available":"Mevcut değil","Get Started":"Hemen Başla","Choose Plan":"Planı seçin","Smart QR Menu":"Akıllı QR Menü","Link-in-bio":"Bio için link","Menu Analytics":"Menü Analitiği","Unlimited Users":"Sınırsız kullanıcı","Unlimited Products":"Sınırsız ürün","Unlimited Categories":"Sınırsız kategori","Product variants":"Ürün çeşitleri","Product options":"Ürün seçenekleri","Sales reports":"Satış raporu","24/7 Support":"24/7 Teknik Destek","Multiple Branches":"Şube Yönetimi","Table Management":"Masa Yönetimi","Order Management":"Sipariş Yönetimi","Mobile App for Owners & Staff":"Patron ve Personel için Mobil Uygulama","Point of Sale (POS)":"POS Adisyon Sistemi","Delivery Management":"Paket sipariş yönetimi","Third-Party Delivery Integrations":"Üçüncü Parti Teslimat Entegrasyonları","RestaroundPay with Mobile":"Mobil ile RestaroundPay","Event management":"Etkinlik yönetimi","/ month":"/ Ay",monthly:"Aylık",annually:"Yıllık","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!"},nl:{"View order":"Bestelling bekijken","Remove from order":"Uit bestelling verwijderen","Update order":"Bestelling bijwerken","Add to order":"Aan bestelling toevoegen","Your order":"Uw bestelling","Empty order":"Lege bestelling","You don't have any items in your order":"U heeft geen items in uw bestelling","Add items":"Items toevoegen",Subtotal:"Totaal",Events:"Gebeurtenissen","Product choices":"Productkeuzes","In order":"In bestelling","Not available":"Niet beschikbaar","Get Started":"Start nu","Choose Plan":"Kies een plan","Smart QR Menu":"Slimme QR-menu","Link-in-bio":"Link-in-bio","Menu Analytics":"Menu analyse","Unlimited Products":"Onbeperkte producten","Unlimited Categories":"Onbeperkte categorieën","Unlimited Users":"Onbeperkte gebruikers","Product variants":"Productvarianten","Product options":"Productopties","Sales reports":"Verkooprapporten","24/7 Support":"24/7 ondersteuning","Multiple Branches":"Meerdere vestigingen","Table Management":"Tafelbeheer","Order Management":"Orderbeheer","Mobile App for Owners & Staff":"Mobiele app voor eigenaren en personeel","Point of Sale (POS)":"Kassasysteem (POS)","Delivery Management":"Leveringsbeheer","Third-Party Delivery Integrations":"Integraties van derden","RestaroundPay with Mobile":"RestaroundPay met mobiel","Event management":"Beheer van evenementen","/ month":"/ maand",monthly:"Maandelijks",annually:"Jaarlijks","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!","Flexible Plans for Every Business - Simple Pricing, More Value!":"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!"},et:{"View order":"Vaata tellimust","Remove from order":"Eemalda tellimusest","Update order":"Uuenda tellimust","Add to order":"Lisa tellimusele","Your order":"Teie tellimus","Empty order":"Tühi tellimus","You don't have any items in your order":"Teie tellimuses pole ühtegi eset","Add items":"Lisa esemeid",Subtotal:"Kokku",Events:"Sündmused","Product choices":"Tootevalikud","In order":"Tellimuses","Not available":"Ei ole saadaval","Get Started":"Alustage","Choose Plan":"Vali plaan","Smart QR Menu":"Nutikas QR-menüü","Link-in-bio":"Link-in-bio","Menu Analytics":"Menüü Analüütika","Unlimited Products":"Piiramata tooted","Unlimited Categories":"Piiramata kategooriad","Product variants":"Tootevariandid","Product options":"Toote valikud","Sales reports":"Müügiaruanded","24/7 Support":"24/7 tugi","Multiple Branches":"Mitu filiaali","Table Management":"Tabelite haldamine","Order Management":"Tellimuste haldamine","Mobile App for Owners & Staff":"Mobiilirakendus omanikele ja töötajatele","Point of Sale (POS)":"Müügipunkt (POS)","Delivery Management":"Tarnejuhtimine","Third-Party Delivery Integrations":"Kolmanda osapoole tarneintegratsioonid","RestaroundPay with Mobile":"RestaroundPay koos mobiiliga","Event management":"Sündmuste haldamine","Unlimited Users":"Piiramatu arv kasutajaid","/ month":"/ kuus",monthly:"Igakuine",annually:"Igal aastal","Flexible Plans for Every Business - Simple Pricing, More Value!":"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!"},ru:{"View order":"Посмотреть заказ","Remove from order":"Удалить из заказа","Update order":"Обновить заказ","Add to order":"Добавить в заказ","Your order":"Ваш заказ","Empty order":"Пустой заказ","You don't have any items in your order":"В вашем заказе нет товаров","Add items":"Добавить товары",Subtotal:"Итого",Events:"События","Product choices":"Варианты товара","In order":"В заказе","Not available":"Не доступен","Get Started":"Начать","Choose Plan":"Выберите план","Smart QR Menu":"Умное меню по QR-коду","Link-in-bio":"Ссылка в био","Menu Analytics":"Аналитика меню","Unlimited Users":"Неограниченные пользователи","Unlimited Products":"Неограниченные продукты","Unlimited Categories":"Неограниченные категории","Product variants":"Варианты продуктов","Product options":"Дополнения к продукту","Sales reports":"Отчеты о продажах","24/7 Support":"24/7 техническая поддержка","Multiple Branches":"Многочисленные филиалы","Table Management":"Управление столами","Order Management":"Управление заказами","Mobile App for Owners & Staff":"Мобильное приложение для владельцев и персонала","Point of Sale (POS)":"POS-касса","Delivery Management":"Управление доставкой","Third-Party Delivery Integrations":"Интеграция со сторонними поставщиками","RestaroundPay with Mobile":"«RestaroundPay» с мобильного","Event management":"Управление мероприятиями","/ month":"/ месяц",monthly:"Ежемесячный план",annually:"Годовой план","Flexible Plans for Every Business - Simple Pricing, More Value!":"Тарифы для любого бизнеса - Простой прайс, больше возможностей!","Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!":"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!"}},pt=e=>{const{language:t}=fe(),n=e||t;return{t:e=>{var t;return(null===(t=gt[n])||void 0===t?void 0:t[e])||e}}},vt=({product:n,currency:i,language:r,onClick:l})=>{var d,s;const{addProduct:c}=_t(),{image160:u,volume:_,available:h}=n||{},{name:p,description:v}=m((()=>et(n,r)),[n,r]),{formattedTotalPrice:f}=m((()=>nt(n,i,r)),[n,i,r]),{t:P}=pt(),b=(null===(d=null==n?void 0:n.variants)||void 0===d?void 0:d.length)>0,I=(null===(s=null==n?void 0:n.addons)||void 0===s?void 0:s.length)>0,A=!!u;return t("div",{className:o(ht,{container:!0,isClickable:!!l,noImage:!A}),onClick:l,children:[t(g,{justifyContent:"space-between",gap:0,children:[e("div",{className:ht.info,children:t(y,{gap:.25,children:[e("h3",{className:ht.name,children:p}),e("p",{className:ht.description,children:v}),t(g,{className:ht.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e("span",{children:f}),!!_&&e(E,{color:"muted",children:_})]}),!h&&e(E,{size:"xs",color:"danger",className:ht.notAvailableText,children:P("Not available")})]})}),A&&e(xe,{src:de(u),alt:p||"menu",className:o(ht,{image:!0,notAvailable:!h}),loading:"lazy",width:160,height:90})]}),h&&e("div",{className:ht.addToCart,children:e(N,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(b||I)&&l)return l();c({product:n}),a(Ae,{name:p,quantity:1})},icon:Z,type:C.DEFAULT})})]})};var ft={container:"ProductsGridItem-module_container__DU5KG",content:"ProductsGridItem-module_content__FXs0Y",isClickable:"ProductsGridItem-module_isClickable__8zhwt",info:"ProductsGridItem-module_info__HkBG-",data:"ProductsGridItem-module_data__Z-N1X",name:"ProductsGridItem-module_name__ZrIx3",description:"ProductsGridItem-module_description__-FQPA",price:"ProductsGridItem-module_price__BFu2H",imageContainer:"ProductsGridItem-module_imageContainer__eHS4Z",image:"ProductsGridItem-module_image__alZWL",notAvailable:"ProductsGridItem-module_notAvailable__i4-HA",addToCart:"ProductsGridItem-module_addToCart__gYVrI",noImage:"ProductsGridItem-module_noImage__78UHW",volume:"ProductsGridItem-module_volume__oxEAr",flexWide:"ProductsGridItem-module_flexWide__qcB5X",slidein:"ProductsGridItem-module_slidein__oKaVb",fadeInOut:"ProductsGridItem-module_fadeInOut__d2zot",heightAnimation:"ProductsGridItem-module_heightAnimation__zgbh9",fadein:"ProductsGridItem-module_fadein__Z067K",floatAnimation:"ProductsGridItem-module_floatAnimation__GXjP-",bottomSheet:"ProductsGridItem-module_bottomSheet__-zrFD",slideRightToLeft:"ProductsGridItem-module_slideRightToLeft__R7hv5"};const Pt=({product:n,currency:i,language:r,onClick:l})=>{var d,s;const{addProduct:c}=_t(),{volume:u,image580:_,image160:h,image1024:p,available:v}=n||{},f=_||p||h,{name:P,description:b}=m((()=>et(n,r)),[n,r]),{formattedTotalPrice:I}=m((()=>nt(n,i,r)),[n,i,r]),{t:A}=pt(),S=(null===(d=null==n?void 0:n.variants)||void 0===d?void 0:d.length)>0,k=(null===(s=null==n?void 0:n.addons)||void 0===s?void 0:s.length)>0;return e("div",{className:ft.container,children:t("div",{className:o(ft,{content:!0,isClickable:!!l,noImage:!f}),onClick:l,children:[f&&e("div",{className:ft.imageContainer,children:e(xe,{src:de(f),alt:P||"menu",className:o(ft,{image:!0,notAvailable:!v}),loading:"lazy",width:580,height:326})}),e("div",{className:ft.info,children:e("div",{className:ft.data,children:t(y,{gap:.25,children:[e("h3",{className:ft.name,children:P}),e("p",{className:ft.description,children:b}),t(g,{className:ft.price,gap:.5,fullWidth:!0,justifyContent:"space-between",children:[e("span",{children:I}),!!u&&e(E,{color:"white",className:ft.volume,children:u})]}),!v&&e(E,{color:"white",size:"xs",className:ft.notAvailableText,children:A("Not available")})]})})}),v&&e("div",{className:ft.addToCart,children:e(N,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),(S||k)&&l)return l();c({product:n}),a(Ae,{name:P,quantity:1})},icon:Z,type:C.DEFAULT})})]})})};var yt={container:"ProductDetails-module_container__oa07j",content:"ProductDetails-module_content__Db3NC",image:"ProductDetails-module_image__BlMfl",details:"ProductDetails-module_details__zfnlt",name:"ProductDetails-module_name__ganLM",price:"ProductDetails-module_price__W34k9",volume:"ProductDetails-module_volume__RWG5s",description:"ProductDetails-module_description__HBufi",choices:"ProductDetails-module_choices__4tHaA",close:"ProductDetails-module_close__4cHZ3",addAction:"ProductDetails-module_addAction__o4T5R",actionTitle:"ProductDetails-module_actionTitle__NIJGW"};const bt=()=>{const{cart:e}=_t();return Object.values(e||{}).reduce(((e,t)=>e+t.quantity),0)};var It={container:"Quantity-module_container__01ySb",quantityAction:"Quantity-module_quantityAction__wRV2F",quantityValue:"Quantity-module_quantityValue__BBpyw",isDisabled:"Quantity-module_isDisabled__crQCf",sm:"Quantity-module_sm__0Hgp2",md:"Quantity-module_md__hu7a8",lg:"Quantity-module_lg__GA4jn",flexWide:"Quantity-module_flexWide__R95Jw",slidein:"Quantity-module_slidein__5yeWf",fadeInOut:"Quantity-module_fadeInOut__cllco",heightAnimation:"Quantity-module_heightAnimation__dhOgA",fadein:"Quantity-module_fadein__Cof2o",floatAnimation:"Quantity-module_floatAnimation__DSqQr",bottomSheet:"Quantity-module_bottomSheet__5-5iY",slideRightToLeft:"Quantity-module_slideRightToLeft__cjDHk"};const At=({isDecreaseDisabled:n=!1,quantity:i=1,size:a="md",onIncrease:r,onDecrease:l})=>t(g,{className:o(It,{container:!0},[It[a]]),justifyContent:"space-between",gap:0,children:[e("div",{className:o(It,{quantityAction:!0,isDisabled:n}),onClick:l,children:e(P,{icon:Y})}),e("div",{className:It.quantityValue,children:i}),e("div",{className:It.quantityAction,onClick:r,children:e(P,{icon:Z})})]});var St="ProductInCart-module_container__oSrwq",Ct="ProductInCart-module_title__Vnc4l";const Et=({productId:n,onModalClose:a})=>{const{setIsCartOpen:r,removeAllProductVariants:o}=_t(),{t:l}=pt(),d=(e=>{const{cart:t}=_t();return i(t)||!e?0:Object.values(t).filter((t=>t.productId===e)).reduce(((e,t)=>e+t.quantity),0)})(n);return d<=0?null:t(b,{className:St,fullWidth:!0,justifyContent:"space-between",alignItems:"center",children:[t(b.Item,{flex:1,className:Ct,children:[l("In order")," (",d,")"]}),e(b.Item,{flex:0,children:t(g,{children:[e(N,{icon:$,onClick:()=>{o(n)},type:C.DANGER,tooltip:l("Remove from order")}),e(N,{icon:K,onClick:()=>{r(!0),a&&a()},type:C.SUCCESS,tooltip:l("View order")})]})})]})};var Nt={container:"ProductVariants-module_container__r059N",variantsTitle:"ProductVariants-module_variantsTitle__G3wTr",variant:"ProductVariants-module_variant__Pk6eP",focused:"ProductVariants-module_focused__tdy2R",flexWide:"ProductVariants-module_flexWide__CQO0G",slidein:"ProductVariants-module_slidein__9xYoM",fadeInOut:"ProductVariants-module_fadeInOut__NcGdX",heightAnimation:"ProductVariants-module_heightAnimation__c7ORS",fadein:"ProductVariants-module_fadein__qqdC5",floatAnimation:"ProductVariants-module_floatAnimation__Fy-NX",bottomSheet:"ProductVariants-module_bottomSheet__JVxKH",slideRightToLeft:"ProductVariants-module_slideRightToLeft__lHsqZ"};const kt=({product:n,selectedVariant:i,focusedSection:a,onSelectVariant:l})=>{const{language:d,currency:s}=fe(),{t:m}=pt(),_=c(null),{variants:h}=n||{},p="variant"===a;return u((()=>{p&&_.current&&_.current.scrollIntoView({behavior:"smooth"})}),[a]),t(y,{className:o(Nt,{container:!0,focused:p}),gap:1,fullWidth:!0,children:[e("div",{className:Nt.variantsTitle,ref:_,children:m("Product choices")}),(h||[]).map((a=>{const{id:o}=a||{},{formattedTotalPrice:c}=(({variantId:e,currency:t="USD",language:n="en",product:i,quantity:a=1})=>{const o=at(e,i,a);return{totalPrice:o,formattedTotalPrice:r(o,t,n)}})({variantId:o,language:d,currency:s,product:n}),{title:u}=rt(a,d);return t(g,{justifyContent:"space-between",onClick:()=>l(o),className:Nt.variant,children:[e(k,{label:u,name:"variant",onChange:()=>l(o),checked:i===o,type:R.RADIO,size:"small",noMargin:!0}),e("div",{className:Nt.variantPrice,children:c})]},o)}))]})};var Rt={container:"ProductAddons-module_container__DRnT7"};const Mt=({product:n,selectedAddons:i,onOptionSelect:a})=>{const{language:o,currency:l}=fe(),{addons:d}=n||{};return e(y,{className:Rt.container,gap:1.5,fullWidth:!0,children:(d||[]).map((n=>{const{id:d,options:s,selectType:c}=n||{},{title:u}=Ke(n,o);return t(y,{children:[e(E,{variant:"bold",children:u}),e(y,{gap:1,fullWidth:!0,children:(s||[]).map((n=>{const{id:s}=n||{},{formattedTotalPrice:u}=(({option:e,currency:t="USD",language:n="en"})=>{const{price:i}=e||{};return{totalPrice:i,formattedTotalPrice:r(i,t,n)}})({option:n,language:o,currency:l}),{title:m}=Xe(n,o),_=c===$e.SINGLE,h=_?i[d]===s:(i[d]||[]).includes(s);return t(g,{justifyContent:"space-between",className:Rt.option,children:[e(k,{label:m,name:`option-${d}`,onChange:()=>a({addonId:d,optionId:s,isSingle:_,isRemove:!_&&h}),checked:h,type:_?R.RADIO:R.CHECKBOX,size:"small",noMargin:!0}),e("div",{className:Rt.optionPrice,children:u})]},s)}))})]},d)}))})},Ot=({product:n,onClose:o})=>{const{language:l,currency:d}=fe(),{addProduct:_,updateProduct:h}=_t(),[p,v]=s(1),[f,P]=s(!1),[b,I]=s(null),[A,S]=s(null),[C,E]=s({}),k=c(null),{t:R}=pt(),T=(({productId:e,variantId:t,selectedAddons:n})=>{var a;const{cart:r}=_t();return i(r)||!e?0:(null===(a=r[ct(e,t,n)])||void 0===a?void 0:a.quantity)||0})({productId:null==n?void 0:n.id,variantId:b,selectedAddons:C}),{name:L,description:w}=m((()=>et(n,l)),[n,l]),{formattedTotalPrice:D}=m((()=>nt(n,d,l)),[n,d,l]),{formattedTotalPrice:U}=m((()=>(({product:e,variantId:t,quantity:n=1,currency:i,language:a,selectedAddons:o,noVat:l=!1})=>{const{total:d}=ot({product:e,variantId:t,quantity:n,selectedAddons:o,noVat:l});return{totalPrice:d,formattedTotalPrice:r(d,i,a)}})({product:n,quantity:p,language:l,currency:d,variantId:b,selectedAddons:C})),[n,p,l,d,b,C]),j=f?0===p:1===p,z=m((()=>R(f?0===p?"Remove from order":"Update order":"Add to order")),[f,p]);u((()=>{v(T>0?T:1),P(T>0)}),[T,n]),u((()=>{I(null),E({})}),[n]);const x=e=>{-1===e&&j||v((t=>Math.max(0,t+e)))};if(i(n))return null;const{image1024:G,volume:H,variants:q,addons:V,available:B}=n,F=(null==q?void 0:q.length)>0,W=(null==V?void 0:V.length)>0;return e("div",{className:yt.container,onClick:e=>{var t,n;(null===(n=null===(t=null==k?void 0:k.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||o&&o()},children:e(M,{onClose:o,ref:k,noBodyPadding:!0,size:"small",content:t("div",{className:yt.content,children:[t(y,{gap:0,children:[G&&e(xe,{src:de(G),width:1024,height:400,alt:L||"product",className:yt.image}),t(y,{className:yt.details,gap:1,children:[e("h2",{className:yt.name,children:L}),t(g,{justifyContent:"space-between",children:[e("div",{className:yt.price,children:D}),e("div",{className:yt.volume,children:H})]}),e("div",{className:yt.description,children:w})]}),(F||W)&&t(y,{gap:0,className:yt.choices,children:[F&&e(kt,{product:n,selectedVariant:b,focusedSection:A,onSelectVariant:I}),W&&e(Mt,{product:n,selectedAddons:C,onOptionSelect:({addonId:e,optionId:t,isSingle:n,isRemove:i=!1})=>{E((a=>{if(n)return Object.assign(Object.assign({},a),{[e]:t});const r=a[e]||[],o=i?r.filter((e=>e!==t)):[...new Set([...r,t])];return Object.assign(Object.assign({},a),{[e]:o})}))}})]})]}),e("div",{className:yt.close,children:e(N,{onClick:o,icon:X})})]}),footer:t(y,{children:[e(Et,{productId:null==n?void 0:n.id,onModalClose:o}),t(g,{className:yt.addToCart,gap:.5,children:[e(At,{isDecreaseDisabled:j,onDecrease:()=>x(-1),onIncrease:()=>x(1),quantity:p}),e(O,{className:yt.addAction,label:B?t(g,{fullWidth:!0,justifyContent:"space-between",children:[e("span",{className:yt.actionTitle,children:z}),e("span",{children:U})]}):R("Not available"),onClick:()=>{var e;if((null===(e=null==n?void 0:n.variants)||void 0===e?void 0:e.length)>0&&!b)return S("variant"),void setTimeout((()=>{S(null)}),200);f?h({product:n,quantity:p,variantId:b,selectedAddons:C}):(_({product:n,quantity:p,variantId:b,selectedAddons:C}),a(Ae,{name:L,quantity:p})),o&&o()},size:"xl",fullWidth:!0,disabled:!B})]})]})})})};var Tt="Cart-module_container__3KQtx",Lt="Cart-module_content__rkiZa",wt={container:"CartStepper-module_container__4CF1L",count:"CartStepper-module_count__E-RBg",actionText:"CartStepper-module_actionText__-rVKA",totalPrice:"CartStepper-module_totalPrice__QboRN",isClickable:"CartStepper-module_isClickable__mDptU",flexWide:"CartStepper-module_flexWide__eXxCr",slidein:"CartStepper-module_slidein__d5JQ-",fadeInOut:"CartStepper-module_fadeInOut__pS8nn",heightAnimation:"CartStepper-module_heightAnimation__7-e5Z",fadein:"CartStepper-module_fadein__-Ba0-",floatAnimation:"CartStepper-module_floatAnimation__rq6zX",bottomSheet:"CartStepper-module_bottomSheet__1wHHD",slideRightToLeft:"CartStepper-module_slideRightToLeft__0KLAo"};const Dt=({actionText:n,onClick:i})=>{const a=bt(),{formattedTotalPrice:l}=(()=>{const{cart:e}=_t(),{currency:t,language:n}=fe(),i=Object.values(e||{}).reduce(((e,t)=>{const{totalPrice:n}=st(t);return e+n}),0);return{totalPrice:i,formattedTotalPrice:r(i,t,n)}})();return t(b,{className:o(wt,{container:!0,isClickable:!!i}),justifyContent:"space-between",alignItems:"center",onClick:i,children:[e(b.Item,{flex:1,children:t(g,{alignItems:"center",children:[e("div",{className:wt.count,children:a}),e("div",{className:wt.actionText,children:n})]})}),e(b.Item,{className:wt.totalPrice,flex:1,children:l})]})},Ut=()=>{const{setIsCartOpen:t}=_t(),{t:n}=pt();return bt()<=0?null:e("div",{className:Tt,children:e("div",{className:Lt,children:e(Dt,{onClick:()=>t(!0),actionText:n("View order")})})})};var jt={container:"CartDrawer-module_container__zvapw",content:"CartDrawer-module_content__ELSiG"},zt="CartItem-module_container__At7lj",xt="CartItem-module_image__D-zzG",Gt="CartItem-module_data__Lo3Fb",Ht="CartItem-module_name__EksZu",qt="CartItem-module_price__yJxl6";const Vt=e=>{var t;const{products:n}=fe();return(null===(t=null==n?void 0:n.find)||void 0===t?void 0:t.call(n,(({id:t})=>t===e)))||{}},Bt=({productId:t,variantId:n,min:i=1,size:a="md",selectedAddons:r})=>{const o=(({productId:e,variantId:t,selectedAddons:n})=>{const{cart:i}=_t(),a=i[ct(e,t,n)];return(null==a?void 0:a.quantity)||1})({productId:t,variantId:n,selectedAddons:r}),l=Vt(t),{updateProduct:d}=_t();return e(At,{isDecreaseDisabled:o===i,onDecrease:()=>d({product:l,quantity:o-1,variantId:n,selectedAddons:r}),onIncrease:()=>d({product:l,quantity:o+1,variantId:n,selectedAddons:r}),quantity:o,size:a})},Ft=({item:a,product:r,language:o})=>{const{selectedAddons:l}=a||{};return e(n,{children:Object.entries(l||{}).map((([e,n])=>{const a=((e,t)=>((null==e?void 0:e.addons)||[]).find((({id:e})=>e===t))||{})(r,Number(e));if(i(a)||i(a.options)||!Array.isArray(a.options))return null;let l="";if(Array.isArray(n)){const e=a.options.filter((({id:e})=>n.includes(e)));if(i(e))return null;l=e.map((e=>{const{title:t}=Xe(e,o);return t})).filter(Boolean).join(", ")}else{const e=a.options.find((({id:e})=>e===n));if(i(e))return null;const{title:t}=Xe(e,o);l=t}const{title:d}=Ke(a,o);return t(E,{color:"muted",size:"xs",children:[d,": ",l]},e)})).filter(Boolean)})},Wt=({item:n})=>{const{productId:i,variantId:a,selectedAddons:r}=n||{},o=Vt(i),l=it(o,a),{language:d,currency:s}=fe(),{image160:c}=o,{title:u}=rt(l,d),{name:_}=m((()=>et(o,d)),[o,d]),{formattedTotalPrice:h}=m((()=>st(n,s,d)),[n,s,d]);return t(g,{className:zt,gap:1,alignItems:"flex-start",children:[c&&e(xe,{src:de(c),alt:_||"menu",className:xt,loading:"lazy",width:80,height:45}),t("div",{className:Gt,children:[e("div",{className:Ht,children:_}),t(y,{gap:0,children:[!!u&&e(E,{color:"muted",size:"xs",children:u}),e(Ft,{item:n,product:o,language:d})]}),e("div",{className:qt,children:h})]}),e(Bt,{productId:i,variantId:a,selectedAddons:r,size:"sm",min:0})]})},Qt=()=>{const{isCartOpen:n,cart:a,setIsCartOpen:r}=_t(),o=c(null),{t:l}=pt(),d=i(a),s=()=>r(!1);return n?e("div",{className:jt.container,onClick:e=>{var t,n;(null===(n=null===(t=null==o?void 0:o.current)||void 0===t?void 0:t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))||s()},children:e(T,{ref:o,onClose:s,isOpen:n,title:l("Your order"),content:e("div",{className:jt.content,children:d?e((()=>t(y,{className:jt.noItems,fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",gap:0,children:[e(E,{variant:"h2",children:l("Empty order")}),e(L,{text:l("You don't have any items in your order")})]})),{}):e("div",{className:jt.items,children:Object.keys(a||{}).map((t=>e(Wt,{item:a[t]},t)))})}),footer:d?e(O,{label:l("Add items"),onClick:s,type:C.PRIMARY,size:"xl",fullWidth:!0}):e(Dt,{actionText:l("Subtotal")})})}):null},Zt=_((({categoryProductMap:n=[],currency:i,language:r,productBlocksRef:o,containerRef:l,onCategoryInView:d})=>{const[c,m]=s(null),[_,h]=s(lt.LIST),p=[{icon:J,type:lt.LIST},{icon:ee,type:lt.GRID}],v=e=>{const{name:t}=et(e,r);a(Ie,{name:t}),m(e)};return u((()=>{const e=new IntersectionObserver((e=>{var t;const n=((null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.clientHeight)||1e3)/2;let i=null,a=1/0;e.forEach((e=>{if(e.isIntersecting){const t=e.boundingClientRect,r=t.top+t.height/2,o=Math.abs(r-n);o<a&&(a=o,i=e.target.getAttribute("data-category-id"))}})),i&&d(Number(i))}),{threshold:.1});return Object.entries(o.current||{}).forEach((([t,n])=>{n&&(n.setAttribute("data-category-id",t),e.observe(n))})),()=>{e.disconnect()}}),[o,l]),e(mt,{children:t("div",{className:Be,children:[e(g,{className:Fe,alignItems:"center",children:p.map((({icon:t,type:n})=>e(N,{icon:t,onClick:()=>(e=>{h(e),a(Se,{name:e})})(n),type:n===_?C.PRIMARY:C.DEFAULT},n)))}),e(y,{children:(n||[]).map((n=>{const{name:a}=Ee(n,r),{id:l,products:d}=n;return t("div",{className:We,ref:e=>{e&&(o.current[l]=e)},"data-category-id":l,children:[e("h2",{className:Qe,children:a}),e("div",{className:Ze,children:e(y,{gap:0,children:(d||[]).map((t=>_===lt.GRID?e(Pt,{product:t,currency:i,language:r,onClick:()=>v(t)},t.id):e(vt,{product:t,currency:i,language:r,onClick:()=>v(t)},t.id)))})})]},l)}))}),e(Ot,{product:c,onClose:()=>m(null)}),e(Ut,{}),e(Qt,{})]})})}),((e,t)=>e.categoryProductMap===t.categoryProductMap&&e.currency===t.currency&&e.language===t.language));Zt.displayName="Products";var Yt="Branches-module_branches__sOuoV",$t="Branches-module_list__vYoT2",Kt="Branches-module_name__K0Z-4";const Xt=({branches:t=[],rootPath:n="",onBranchSelect:i})=>{const a=({children:t,id:a})=>i?e("div",{onClick:()=>i(a),children:t}):e("a",{href:`${n}/${a}`,children:t});return e("div",{className:Yt,children:e(w,{className:$t,children:t.map((({id:t,name:n})=>e(a,{id:t,children:e(D,{noBottomMargin:!0,children:e(b,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:e("h2",{className:Kt,children:n})})})},t)))})})},Jt=({data:r})=>{var o;const{name:l,coverImage:d,logoImage:m,branches:_=[],branchId:h,language:g,categories:p,products:v,currency:f,instagram:P,facebook:y,whatsapp:b,telegram:I,tiktok:A,rootPath:S,hostname:C,onBranchSelect:E}=r||{},N=_.length<=1,k=((e,t)=>{const n=t.reduce(((e,t)=>{if(!t.visible)return e;const n=Number(t.categoryId);return e[n]||(e[n]=[]),e[n].push(t),e}),{});return e.map((e=>Object.assign(Object.assign({},e),{products:n[Number(e.id)]||[]}))).filter((e=>{var t;return(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.length)>0}))})(p,v),R=(()=>{var e;return N?(null===(e=null==_?void 0:_[0])||void 0===e?void 0:e.id)?_[0]:{}:_.find((e=>e.id===Number(h)))})(),M=N||!(null==R?void 0:R.name)?l:(null==R?void 0:R.name)||"",[O,T]=s(null===(o=null==p?void 0:p[0])||void 0===o?void 0:o.id),L=c({}),w=c(null),D=c(!0),{url:U,domain:j}=((e,t)=>{const n=he.includes(e)?e:_e;return{url:`https://${n}/${t||"en"}`,domain:n}})(C,g),z=e=>ie(void 0,void 0,void 0,(function*(){D.current=!1,T(e),(e=>{var t;const n=null===(t=null==L?void 0:L.current)||void 0===t?void 0:t[e];n&&(setTimeout((()=>{n.scrollIntoView({behavior:"smooth",block:"start"})}),100),setTimeout((()=>{D.current=!0}),1e3))})(e)}));return u((()=>{(()=>{if("undefined"==typeof window)return;const e=new URLSearchParams(window.location.search),t=Number(e.get("category"));if(!t)return;const n=(p||[]).find((({id:e})=>e===t));i(n)||z(t)})()}),[]),t("div",{className:ae,ref:w,children:[e(qe,{branch:R,name:M,coverImage:ce(d),logoImage:se(m),instagram:P,facebook:y,whatsapp:b,telegram:I,tiktok:A}),N||h?t(n,{children:[e(Ve,{categoryProductMap:k,language:g,selectedCategoryId:O,onSelectCategory:z}),e(Zt,{currency:f,language:g,productBlocksRef:L,containerRef:w,categoryProductMap:k,onCategoryInView:e=>{if(!(null==D?void 0:D.current))return;const t=((e,t,n)=>{var a;const r=null===(a=null==t?void 0:t.find)||void 0===a?void 0:a.call(t,(({id:t})=>t===e));if(i(r))return"";const{name:o}=Ee(r,n);return o})(e,p,g);a(be,{name:t}),T(e)}})]}):e(Xt,{branches:_,onBranchSelect:E,rootPath:S}),!!C&&e("a",{rel:"noopener noreferrer",target:"_blank",href:U,className:oe,children:j})]})},en=({data:t})=>e(ve,{value:t,children:e(Jt,{data:t})});var tn={};const nn=({currentGoal:t,language:n,setGoal:i})=>{const{t:a}=pt(n),r=c({}),o=e=>{switch(e){case be:return a("Scrolled to Category");case ye:return a("Category Selected");case Ie:return a("Product Details");case Ae:return a("Product Added to Cart");default:return""}},l=h((e=>{var t,n;i(e),null===(n=null===(t=null==r?void 0:r.current)||void 0===t?void 0:t.close)||void 0===n||n.call(t)}),[i]);return e(U,{action:o(t),actionSize:"large",type:C.BORDERED_PRIMARY,closeRef:r,menu:e("div",{className:tn.toolbarMenu,children:Ce.map((t=>e(j,{onClick:()=>l(t),children:o(t)},t)))})})},an=({data:t,isLoading:n=!1,loadingImage:i,language:a,goal:r,setGoal:o})=>{const{t:l}=pt(a);return e(D,{title:l("Events"),toolbar:e(nn,{language:a,currentGoal:r,setGoal:o}),children:n?e(z,{image:i}):e(x,{data:t})})};var rn={container:"Pricing-module_container__86ns8",intervals:"Pricing-module_intervals__YOrns",interval:"Pricing-module_interval__perjd",active:"Pricing-module_active__BRQhl",plans:"Pricing-module_plans__hbRn5",plan:"Pricing-module_plan__pGWAl",title:"Pricing-module_title__rMUDX",price:"Pricing-module_price__TKBkb",originalPrice:"Pricing-module_originalPrice__klyhF",discountedPrice:"Pricing-module_discountedPrice__qS7GB",action:"Pricing-module_action__08XLt",benefits:"Pricing-module_benefits__OjGx8",benefit:"Pricing-module_benefit__-oBt1",flexWide:"Pricing-module_flexWide__mXSDX",slidein:"Pricing-module_slidein__tTiof",fadeInOut:"Pricing-module_fadeInOut__rYI0L",heightAnimation:"Pricing-module_heightAnimation__WKFZx",fadein:"Pricing-module_fadein__HeFT0",floatAnimation:"Pricing-module_floatAnimation__1VcsO",bottomSheet:"Pricing-module_bottomSheet__v4vTu",slideRightToLeft:"Pricing-module_slideRightToLeft__GpKCA"};const on={appetizer:{title:"Appetizer",price:{monthly:9,annually:7}},mainCourse:{title:"Main Course",price:{monthly:19,annually:15}},chefsSpecial:{title:"Chef's Special",price:{monthly:49,annually:39}}},ln=[{title:"Smart QR Menu",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Link-in-bio",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Menu Analytics",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Users",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Products",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Unlimited Categories",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Product variants",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Product options",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"24/7 Support",[dt.APPETIZER]:!0,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Sales reports",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Multiple Branches",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Table Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Order Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Delivery Management",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!0,[dt.CHEFS_SPECIAL]:!0},{title:"Mobile App for Owners & Staff",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0},{title:"Point of Sale (POS)",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0},{title:"Third-Party Delivery Integrations",[dt.APPETIZER]:!1,[dt.MAIN_COURSE]:!1,[dt.CHEFS_SPECIAL]:!0}],dn=({plan:n,language:i,interval:a,currency:o})=>{const{t:l}=pt(i),{price:d,discountedPrice:s}=on[n],c=d[a];return void 0!==s?t(y,{gap:0,children:[t(g,{children:[e("span",{className:rn.discountedPrice,children:r(s,o,i)}),e("span",{className:rn.originalPrice,children:r(c,o,i)})]}),e(E,{size:"sm",children:l("/ month")})]}):t(g,{gap:.5,children:[e(E,{size:"xxl",variant:"bold",children:r(c,o,i)}),e(E,{size:"sm",children:l("/ month")})]})},sn=({currency:n,language:i,isLoading:a=!1,onPlanSelect:r,onIntervalSelect:l})=>{const[d,c]=s("annually"),{t:u}=pt(i),m=[dt.APPETIZER,dt.MAIN_COURSE,dt.CHEFS_SPECIAL],_=r?"Choose Plan":"Get Started",h=({children:t,plan:n})=>r?e("div",{className:rn.plan,onClick:()=>{a||r(n)},children:t}):e("a",{className:rn.plan,href:ge(i,`pricing-${n}`),target:"_blank",rel:"noreferrer noopener",children:t});return t("div",{className:rn.container,children:[e("div",{className:rn.intervals,children:["annually","monthly"].map((t=>e("div",{className:o(rn,{interval:!0,active:d===t}),onClick:()=>(e=>{c(e),l&&l(e)})(t),children:u(t)},t)))}),e("div",{className:rn.plans,children:m.map((r=>e(h,{plan:r,children:t(D,{children:[e("div",{className:rn.title,children:on[r].title}),e("div",{className:rn.price,children:e(dn,{plan:r,language:i,interval:d,currency:n})}),e("div",{className:rn.action,children:e(O,{label:u(_),fullWidth:!0,size:"xl",type:r===dt.MAIN_COURSE?C.PRIMARY:C.BORDERED_PRIMARY,onClick:()=>{},isLoading:a})}),e("div",{className:rn.benefits,children:ln.map((n=>t("div",{className:rn.benefit,children:[e(P,{icon:n[r]?te:Y,size:"md"})," ",e("span",{children:u(n.title)})]},n.title)))})]})},r)))})]})};export{an as Events,sn as Pricing,en as PublicMenu};
2
2
  //# sourceMappingURL=index.esm.js.map