PageSourceSearch

https://maqloba.com/_nuxt/DrNgbDU_.js

js maqloba.com collected 2026-10-02 00:53:13 UTC 31,542 bytes, 1 lines download raw bytes

1import{_ as Pe}from"./DsH1P9jp.js";import{a6 as Ie,a7 as nt,E as V,o as n,c as a,k as e,f as u,u as l,F as y,v as j,a as ne,j as A,e as B,x as z,a8 as ve,a9 as at,L as De,D as h,A as ie,y as lt,d as it,V as Be,M as be,I as Le,N as rt,O as dt,b as qe,Q as _e,X as xe,Y as ke,$ as ct,w as ut}from"./BArAM9lu.js";import{_ as mt,a as pt}from"./CNeFf-gl.js";import{_ as vt}from"./CREAKDWZ.js";import{_ as _t}from"./DlAUqK2U.js";const ht={class:"container category-section"},ft={class:"mt-3 mb-4"},yt={class:"row g-3"},gt=["onClick"],bt={key:0,class:"position-absolute bg-black bg-opacity-75 radius text-center d-none d-lg-block",style:{left:"0",right:"0",top:"0",bottom:"0","padding-top":"115px","z-index":"2"}},xt={class:"mb-0 h2",style:{color:"#cc0808"}},kt={key:1,class:"position-absolute bg-black bg-opacity-75 text-center d-lg-none pt-2",style:{left:"0",right:"0",top:"0",bottom:"0","border-radius":"10px","z-index":"2"}},wt={class:"mb-0 h4",style:{color:"#cc0808"}},$t={class:"row h-100"},Mt={class:"col-lg-12"},Ct={class:"position-relative rounded h-100"},Tt=["src"],Et={key:0,class:"rounded position-absolute top-0 left-0 main-bk text-white px-4 py-2 rounded-start-0"},St={class:"col-lg-12"},jt={class:"p-lg-3 py-2 py-lg-4 text-center"},At={class:"main-color fw-bolder h5 mb-2 century"},Ot={key:0,class:"text-dark h5 mb-0 fw-normal"},Nt={class:"rounded bg-white border mb-4 border-2 pointer"},It={class:"p-3"},Bt={__name:"List",props:Ie({loading:{type:Boolean,default:!1}},{item:{},itemModifiers:{}}),emits:Ie(["fetch:product"],["update:item"]),setup(v,{emit:M}
1){const f=nt(v,"item"),E=M,Q=v,P=V(()=>Q.loading),N=V(()=>f.value.products??[]),I=function(O){E("fetch:product",O)};return(O,g)=>{const q=Pe;return n(),a("div",ht,[e("h4",ft,u(f.value.name),1),e("div",yt,[!l(P)||l(N).length>0?(n(!0),a(y,{key:0},j(l(N),x=>(n(),a("div",{class:"col-6 col-lg-4",key:x},[e("div",{class:ne(["radius bg-white border border-2 pointer h-100 border-dark position-relative overflow-hidden",{"user-select-all":x.out_of_stock}]),onClick:H=>I(x),"data-bs-toggle":"modal","data-bs-target":"#exampleModal"},[x.out_of_stock?(n(),a("div",bt,[g[0]||(g[0]=e("div",{class:"border-bottom border-danger mb-3"},null,-1)),e("h6",xt,u(O.$t("Temporarily Not Available")),1),g[1]||(g[1]=e("div",{class:"border-bottom border-danger mt-3"},null,-1))])):A("",!0),x.out_of_stock?(n(),a("div",kt,[g[2]||(g[2]=e("div",{class:"border-bottom border-danger mb-3"},null,-1)),e("h6",wt,u(O.$t("Temporarily Not Available")),1),g[3]||(g[3]=e("div",{class:"border-bottom border-danger mt-3"},null,-1))])):A("",!0),e("div",$t,[e("div",Mt,[e("div",Ct,[e("img",{src:x.image,alt:"",class:"radius rounded-bottom-0 product-img w-100 object-fit-cover h-100"},null,8,Tt),x.discount_value?(n(),a("div",Et,u(x.discount_value)+"% Off ",1)):A("",!0)])]),e("div",St,[e("div",jt,[e("h6",At,u(x.name),1),(x==null?void 0:x.price)>0?(n(),a("h6",Ot,[g[4]||(g[4]=e("span",{class:"sar-icon"},"",-1)),B(u(x==null?void 0:x.price),1)])):A("",!0)])])])],10,gt)]))),128)):A("",!0),l(P)?(n(),a(y,{key:1},j(["1products","2products","3products","4products","5products"],x=>e("div",{class:"col-lg-4",key:x},[e("div",Nt,[z(q,{class:"rounded product-img w-100 object-fit-cover rounded-bottom-0",height:"250px"}),e("div",It,[z(q,{class:"w-75 rounded",height:"20px"}),z(q,{class:"w-50 rounded",height:"20px"})])])])),64)):A("",!0)])])}}};var Lt="Expected a function",Re=NaN,qt="[object Symbol]",Rt=/^\s+|\s+$/g,Ft=/^[-+]0x[0-9a-f]+$/i,Pt=/^0b[01]+$/i,Dt=/^0o[0-7]+$/i,Ht=parseInt,Wt=typeof ve=="object"&&ve&&ve.Object===Object&&ve,Vt=typeof self=="object"&&self&&self.Object===Object&&self,Qt=Wt||Vt||Function("return this")(),Ut=Object.prototype,Yt=Ut.toString,Gt=Math.max,zt=Math.min,we=function(){return Qt.Date.now()};function Xt(v,M,f){var E,Q,P,N,I,O,g=0,q=!1,x=!1,H=!0;if(typeof v!="function")throw new TypeError(Lt);M=Fe(M)||0,$e(f)&&(q=!!f.leading,x="maxWait"in f,P=x?Gt(Fe(f.maxWait)||0,M):P,H="trailing"in f?!!f.trailing:H);function U(m){var _=E,p=Q;return E=Q=void 0,g=m,N=v.apply(p,_),N}function X(m){return g=m,I=setTimeout(D,M),q?U(m):N}function K(m){var _=m-O,p=m-g,R=M-_;return x?zt(R,P-p):R}function C(m){var _=m-O,p=m-g;return O===void 0||_>=M||_<0||x&&p>=P}function D(){var m=we();if(C(m))return L(m);I=setTimeout(D,K(m))}function L(m){return I=void 0,H&&E?U(m):(E=Q=void 0,N)}function te(){I!==void 0&&clearTimeout(I),g=0,E=O=Q=I=void 0}function T(){return I===void 0?N:L(we())}function S(){var m=we(),_=C(m);if(E=arguments,Q=this,O=m,_){if(I===void 0)return X(O);if(x)return I=setTimeout(D,M),U(O)}return I===void 0&&(I=setTimeout(D,M)),N}return S.cancel=te,S.flush=T,S}function $e(v){var M=typeof v;return!!v&&(M=="object"||M=="function")}function Kt(v){return!!v&&typeof v=="object"}function Zt(v){return typeof v=="symbol"||Kt(v)&&Yt.call(v)==qt}function Fe(v){if(typeof v=="number")return v;if(Zt(v))return Re;if($e(v)){var M=typeof v.valueOf=="function"?v.valueOf():v;v=$e(M)?M+"":M}if(typeof v!="string")return v===0?v:+v;v=v.replace(Rt,"");var f=Pt.test(v);return f||Dt.test(v)?Ht(v.slice(2),f?2:8):Ft.test(v)?Re:+v}var Jt=Xt;const es=at(Jt),ts=De();function ss(){const v=V(()=>ts.query.option||null);console.log(v.value,"selectedOption");const M=20,f=h(null),E=h([]),{$api:Q}=ie(),P=h([]),N=h(null),I=h(null),O=h(!0),g=h(!1),q=T=>{P.value=T},x=T=>{N.value=T,E.value=[],f.value=null},H=V(()=>P.value.find(T=>T.id===N.value)),U=V(()=>{var S;return((S=H.value)==null?void 0:S.menu_categories.flatMap(m=>m.children))??[]}),X=V(()=>U.value.filter(T=>!E.value.find(S=>S.id===T.id))),K=async T=>{const S=T?X.value.findIndex(p=>p.id===T.id):null,m=X.value.slice(0,S>=0?S+M:M);if(m.length===0)return;const _={menu_id:N.value,sub_category_ids:m.map(p=>p.id)};O.value=!0,Q.get("get-category-products",{params:_,headers:{"service-Type":v.value?"catering_order":"food_ordering"}}).then(({data:p})=>{var R,G;E.value=[...E.value,...p.data.categories],f.value||(f.value=(G=(R=D.value)==null?void 0:R[0])==null?void 0:G.id)}).finally(()=>{O.value=!1})},C=(T,S)=>
1{const m=document.querySelectorAll(S);let _=null,p=1/0;return m.forEach(R=>{const G=R.getBoundingClientRect().top,ae=Math.abs(G-T);ae<p&&(p=ae,_=R)}),_},D=V(()=>E.value.sort((T,S)=>U.value.findIndex(m=>m.id===T.id)-U.value.findIndex(m=>m.id===S.id))),L=async T=>{f.value=T.id,g.value=!0,E.value.findIndex(m=>T.id===m.id)<0&&await K(T),await lt(),setTimeout(function(){const m=document.getElementById(T.id);m?(m.scrollIntoView({behavior:"smooth"}),"onscrollend"in document.documentElement?m.addEventListener("scrollend",()=>{g.value=!1},{once:!0}):setTimeout(()=>{g.value=!1},500)):g.value=!1},100)},te=es(async T=>{const S=document.querySelector(".product-list-container"),m=S.scrollHeight-S.scrollTop-S.clientHeight;m<=600&&!O.value&&!g.value&&await K();const _=document.getElementById("footer");m<=0?_.classList.remove("reached-bottom"):_.classList.add("reached-bottom");const p=window.scrollY+window.innerHeight/2,R=C(p,".category-section");R&&!g.value&&(f.value=parseInt(R.getAttribute("id"),10)),setTimeout(function(){const G=document.getElementById(`category_selector_${f.value}`);G&&G.scrollIntoView({behavior:"smooth"})},100)},0);return{scrollToCategory:L,el:I,onScroll:te,categories:U,setMenus:q,setCurrentMenu:x,selectedCategory:f,fetchProductsWithCategories:K,sortedCategoriesWithProducts:D,categoriesWithProducts:E,menus:P,isProductsLoading:O,selectedMenu:N}}const os={class:"screen-height",style:{}},ns={class:"all-menu"},as={key:0,class:"category-container justify-content-center"},ls=["onClick"],is={key:1,class:"d-flex py-2 my-4"},rs={class:"d-md-none"},ds={key:0,style:{},class:"category-container category-container-fixed flex-column bg-white second-container"},cs=["data-id","id","onClick"],us={key:1,class:"d-flex py-4 my-4 flex-column bg-white p-4"},ms={class:"container-fluid"},ps={class:"row"},vs={class:"col-lg-3 d-none d-md-block"},_s={key:0,style:{},class:"category-container category-container-fixed py-4 flex-column bg-white p-4 second-container"},hs=["data-id","id","onClick"],fs={key:1,class:"d-flex py-4 my-4 flex-column bg-white p-4"},ys={class:"col-lg-9",style:{"padding-inline-end":"0"}},gs={class:"text-center mb-0 pb-5"},bs={key:1,class:"loading-indicator text-secondary"},xs={key:1,class:"p-3"},ks={class:"container"},ws={class:"row justify-content-center"},$s={class:"col-lg-6"},Ms={class:"alert alert-warning text-center",role:"alert"},Cs={class:"modal fade proModal",id:"exampleModal",tabindex:"-1","aria-labelledby":"exampleModalLabel","aria-hidden":"true"},Ts={class:"modal-dialog modal-dialog-centered modal-lg"},Es={class:"modal-content"},Ss={class:"modal-body p-0"},js={class:"sec-bk py-4 text-center rounded-bottom-0"},As={class:"main-color mb-0 Yesteryear fw-bold h3"},Os={class:"px-3"},Ns={class:"row mb-4 mt-4"},Is={class:"col-lg-5"},Bs={id:"carouselExampleIndicators",class:"carousel slide"},Ls={key:0,class:"carousel-indicators"},qs=["data-bs-slide-to","aria-label"],Rs={class:"carousel-inner bg-light radius"},Fs=["src"],Ps={key:1,class:"carousel-control-prev",type:"button","data-bs-target":"#carouselExampleIndicators","data-bs-slide":"prev"},Ds={key:2,class:"carousel-control-next",type:"button","data-bs-target":"#carouselExampleIndicators","data-bs-slide":"next"},Hs={class:"col-lg-7"},Ws={class:"main-color fw-bold d-flex justify-content-between century mt-4"},Vs={class:"pricess"},Qs={key:0,class:"priceBeforeDiscount"},Us={key:0,class:"d-flex"},Ys=["src"],Gs=["innerHTML"],zs={class:"px-3"},Xs={key:0},Ks={class:"main-color fw-bold"},Zs={class:"bg-white rounded-4 mb-4 d-flex w-100 justify-content-around align-items-center rounded-pill time-container py-3 shadow px-3"},Js=["name","id","value","checked"],eo=["for"],to={class:"main-color py-3 sec-bk radius rounded-bottom-0 ps-3 Yesteryear"},so={key:0,class:"mb-4 py-3 px-lg-3"},oo={class:"row"},no={class:"form-check main-color-bk px-3 py-2 rounded d-flex w-100"},ao=["name","value","id","onUpdate:modelValue"],lo=["for"],io={key:0,class:"text-secondary text-opacity-50 fw-normal fs-14"},ro={key:1,class:"mb-4 py-3 px-lg-3"},co={class:"row"},uo={class:"form-check main-color-bk px-3 px-lg-2 py-2 rounded d-flex w-100"},mo=["value","id"],po={class:"d-flex align-items-start"},vo=["for"],_o={key:0,class:"text-secondary text-opacity-50 fw-normal fs-14 m-0 mt-1"},ho={key:1,class:"bg-white radius shadow-sm mb-4"},fo={class:"py-3 px-4"},yo={class:"text-secondary fw-semibold"},go={class:"fw-bold"},bo={key:2,class:"mb-4"},xo={class:"py-3 px-4"},ko={class:"fw-bold mb-2"},wo={class:"text-secondary"},$o={key:0,class:"mt-3"},Mo=["id","name","value","onUpdate:modelValue","onChange"],Co=["for"],To={class:"fw-bold"},Eo={key:1,class:"mt-3"},So=["id","checked","disabled","onChange"],jo=["for"],Ao={class:"fw-bold"},Oo={class:"row rounded-top-0 align-items-center modal-end p-4 py-4"},No={class:"col-7 col-sm-5"},Io={class:"d-flex align-items-sm-center mb-4 justify-content-start flex-sm-row flex-column-price"},Bo={class:"text-white h5 me-3 fw-bold mb-0 font-gothic"},Lo={class:"main-color fw-bold h1 display-4 mb-0 fs36 font-gothic"},qo={class:"col-5 col-sm-3"},Ro={class:"col-md-4"},Fo={key:0,class:"text-danger small mb-2"},Po=["disabled"],Do={key:0,class:"px-4"},Ho={key:1,class:"px-lg-4"},Wo={class:"px-lg-4"},Vo={key:1,class:"p-4"},Qo=it({__name:"[id]",setup(v){const M=Be({}),f=De(),{$api:E,$swal:Q,$bootstrap:P}=ie(),N=h(!1),I=h([]),O=h(0),g=h(0),q=h(null),x=be("userTokenMaqloba"),H=h(1),U=h(1),X=h([]);h(["https://maqloba-dev.jigsawme.io/storage/uploads/tenant5/productMaster/2024-03-31/HrojZMda2ObTrmOAQfRq1711884463rWRxHRClEW7jQQQv6474.png","https://maqloba-dev.jigsawme.io/storage/uploads/tenant5/productMaster/2024-04-01/oALDE8HSCdQzmyLSghMl1711972861XGS2ZDqJgMXhowsY7bRO.png","https://maqloba-dev.jigsawme.io/storage/uploads/tenant5/productMaster/2024-03-31/HrojZMda2ObTrmOAQfRq1711884463rWRxHRClEW7jQQQv6474.png"]);const K=V(()=>f.query.option||null);V(()=>{var s;return(((s=p.value)==null?void 0:s.service_fees)||[]).filter(i=>{const c=!Array.isArray(i.children)||i.children.length===0,d=i.applied_condition==="auto"||i.applied_condition==null;return c&&d&&i.id!=null}).map(i=>Number(i.id))});const C=Be({}),D=V(()=>{var s;return(((s=p.value)==null?void 0:s.service_fees)||[]).filter(i=>i.applied_condition==="user_selection"&&i.is_active)}),L=(o,s)=>{var i;return`${((i=p.value)==null?void 0:i.id)??"p"}-${o.id}-${s}`};function te(o,s){const i=L(o,s);if(Number(o.max_selectable_children??1)===1){const d=C[i];Array.isArray(d)&&(C[i]=d[0]??null)}else Array.isArray(C[i])||(C[i]=[])}function T(o,s,i,c){const d=L(o,s);te(o,s);const k=Number(o.max_selectable_children??1/0),w=Array.isArray(C[d])?[...C[d]]:[];if(c)!w.includes(i)&&w.length<k&&w.push(i);else{const F=w.indexOf(i);F!==-1&&w.splice(F,1)}C[d]=w}function S(){return D.value.every((o,s)=>{const i=L(o,s),c=Number(o.min_selectable_children??0),d=Number(o.max_selectable_children??1),k=C[i],w=Array.isArray(k)?k.length:k?1:0;return w>=c&&w<=d})}function m(){return D.value.map((o,s)=>{const i=L(o,s),c=C[i],d=Array.isArray(c)?c:c?[c]:[];return{id:o.id,selected_children:d}}).filter(o=>o.selected_children.length>0)}const _=h(null),p=h(null),R=h(!0),G=h(!0),ae=h(0),Z=h(1),se=h([]),re=h(0);h([]);const oe=h(!1),de=be("cartCount"),ce=h([]),{locale:he}=Le();h(null);const fe=h(null),Y=h(null),ye=h(null);h(null);const{t:ue}=Le(),Me=h(null),He=be("catering"),We=V(()=>{var i,c;const o=(i=p.value)==null?void 0:i.special_notes;if(o!=null&&o.is_active)return o;const s=(c=_.value)==null?void 0:c.special_notes;return s!=null&&s.is_active?s:null}),{fetchProductsWithCategories:Ce,categoriesWithProducts:Uo,isProductsLoading:Ve,sortedCategoriesWithProducts:Qe,categories:Te,selectedCategory:Ee,setMenus:Ue,setCurrentMenu:Se,onScroll:je,scrollToCategory:Ae,el:Yo}=ss(),me=V(()=>{var s;return(((s=p.value)==null?void 0:s.service_fees)||[]).filter(i=>{const c=!Array.isArray(i.children)||i.children.length===0;return String((i==null?void 0:i.applied_condition)??"").toLowerCase()==="auto"&&c})});function Ye(o,s){const i=M[o];return!i||!(s!=null&&s.modifiers)?null:s.modifiers.find(c=>c.id===i)??null}function ge(o){const s=[];
1return((o==null?void 0:o.modifier_classes)||[]).forEach(i=>{const c=Ye(i.name,i);c&&s.push(c)}),s}function Ge(){var o=document.querySelector("#exampleModal"),s=P.Modal.getOrCreateInstance(o);s.hide()}function ze(){var J;if(Y.value&&de.value>0&&g.value.id!=Y.value){tt();return}var o=document.querySelector("#exampleModal"),s=P.Modal.getOrCreateInstance(o);s.hide();const i=document.getElementById("testParent");if(i){const $=i.offsetTop;window.scrollTo({top:$-200,behavior:"smooth"})}console.log(Y.value,g.value.id);const c=Me.value.getBoundingClientRect(),d=document.createElement("img");d.src=_.value.image,d.style.position="absolute",document.dir==="rtl"?(d.style.top=`${c.top}px`,d.style.left=`${c.left}px`):(d.style.top=`${c.top}px`,d.style.right=`${c.right}px`),d.style.width="150px",d.style.height="auto",d.style.opacity=".5",document.querySelector("#testParent").appendChild(d),setTimeout(()=>{d.style.transition="top 2s, right 2s, left 2s, width 4s, height 4s, opacity 2s",d.style.top="-50px",document.dir==="rtl"?d.style.left="30px":d.style.right="30px",d.style.width="20px",d.style.height="auto",d.style.opacity=".01",setTimeout(()=>{document.querySelector("#testParent").removeChild(d)},4e3)},0),oe.value=!0,console.log("selectedRadios:",JSON.stringify(M)),console.log("selectedRadioObjs:",ge(p.value));let k=new FormData;k.append("product_id",(J=p==null?void 0:p.value)==null?void 0:J.id),k.append("menu_id",g.value.id),k.append("quantity",String(Z.value??1)),f.query.DeliveryMethod=="delivery"?k.append("address_id",parseInt(f.params.id)):k.append("branch_id",parseInt(f.params.id));let w=0;ge(p.value).forEach($=>{$&&$.id&&(k.append(`modifiers[${w}][id]`,$.id),k.append(`modifiers[${w}][quantity]`,Z.value),w++)}),(se.value||[]).forEach($=>{$&&$.id&&(k.append(`modifiers[${w}][id]`,$.id),k.append(`modifiers[${w}][quantity]`,Z.value),w++)}),re.value&&re.value.id&&(k.append(`modifiers[${w}][id]`,re.value.id),k.append(`modifiers[${w}][quantity]`,Z.value),w++);const F=m();let W=0;for(const $ of F){for(const t of $.selected_children)k.append(`service_fees[${W}][id]`,String(t));W++}me.value.forEach($=>{k.append(`service_fees[${W}][id]`,String($.id)),W++});for(const[$,t]of k.entries())console.log($,t),console.log("<br> -------------------------------------------------------------------------<br>");E.post("cart",k,{headers:{"Delivery-Method":f.query.DeliveryMethod,"service-Type":K.value?"catering_order":"food_ordering"}}).then($=>{ie().$showToast({msg:$.data.message,type:"success",icon:"fa fa-check",position:"top-center",timeout:200}),de.value=$.data.data.products_count,Y.value=$.data.data.menu_id,oe.value=!1,K.value&&(He.value=!0)}).catch($=>{ie().$showToast({msg:$.response.data.message,type:"error",icon:"fa  fa-triangle-exclamation",position:"top-center"}),oe.value=!1})}const Xe=f.query.DeliveryMethod=="delivery"?"address_id":"branch_id";E.get("menus?Delivery-Method="+f.query.DeliveryMethod+"&"+Xe+"="+f.params.id,{headers:{"Delivery-Method":f.query.DeliveryMethod,"service-Type":K.value?"catering_order":"food_ordering"}}).then(o=>{var s,i;N.value=!0,ce.value=o.data.data.menus,Ue(o.data.data.menus),console.log("menus.value",ce.value),o.data.data.branch_delivery_method_description&&(console.log("yessssss"),Q.fire({html:o.data.data.branch_delivery_method_description,iconHtml:`<img src=${o.data.data.sbranch_delivery_method_image} />`,showCancelButton:!1,confirmButtonText:ue("Ok"),cancelButtonText:ue("Ok"),confirmButtonColor:"#dc3545",cancelButtonColor:"#4466f2"})),g.value=o.data.data.menus[0],Y.value||(Y.value=o.data.data.menus[0].id),Se(Y.value),o.data.data.menus[0].menu_categories.forEach(c=>{c.children&&c.children.length>0&&c.children.filter(d=>d.id!==-1).forEach(d=>{I.value.push(d)})}),Ce((i=(s=ce.value)==null?void 0:s[0])==null?void 0:i.id)}).catch(o=>{fe.value=o.response.data.message});function Ke(){H.value<U.value&&(H.value++,et(O.value))}function Ze(o){console.log(o),(!Y.value||de.value<=0)&&(Y.value=o.id),console.log(o.id!=Y.value,o.id,Y.value),I.value=[],o.menu_categories.forEach(s=>{s.children&&s.children.length>0&&s.children.filter(i=>
1i.id!==-1).forEach(i=>{I.value.push(i)})}),g.value=o,Se(o.id),Ce()}function Je(o){G.value=!0,Oe.value=0,Z.value=1,se.value=[],re.value=0,E.get("products/"+o.id).then(s=>{var i,c;G.value=!1,_.value=s.data.data,p.value=_.value.products[0],console.log(_.value),console.log("Selected variant ID:",(i=p.value)==null?void 0:i.id),console.log("Selected variant service_fees:",(c=p.value)==null?void 0:c.service_fees),Object.keys(C).forEach(d=>delete C[d]),(D.value||[]).forEach((d,k)=>{var J,$;const w=L(d,k),F=Number(d.max_selectable_children??1),W=Number(d.min_selectable_children??0);if(F===1)C[w]=W===1&&((J=d.children)!=null&&J.length)?d.children[0].id:null;else{const t=[];if(W>0&&(($=d.children)!=null&&$.length))for(let r=0;r<Math.min(W,d.children.length);r++)t.push(d.children[r].id);C[w]=t}}),q.value=_.value.attributes[0].attribute_values[0],_.value&&_.value.products&&_.value.products.length>0})}function et(o,s=!1){R.value=!0,s&&(X.value=[],H.value=1),O.value=o;const i=f.query.DeliveryMethod=="delivery"?"address_id":"branch_id";E.get(`products?sub_category_id=${o.id}&page=${H.value}&category_id=${o.parent_id}&${i}=${f.params.id}`).then(c=>{const d=c.data.data.products;s?X.value=d:X.value=[...X.value,...d],H.value=c.data.data.pagination_options.current_page,U.value=c.data.data.pagination_options.last_page}).catch(c=>{console.error("Error fetching products:",c)}).finally(()=>{R.value=!1})}const Oe=V(()=>{var i;let o=Number(((i=p==null?void 0:p.value)==null?void 0:i.price)??0);return ge(p.value).forEach(c=>{typeof c.price=="number"&&(o+=c.price)}),(se.value||[]).forEach(c=>{typeof c.price=="number"&&(o+=c.price)}),me.value.forEach(c=>{typeof c.value=="number"&&(c.type==="fixed"?o+=c.value:o+=c.value/100*o)}),m().forEach(c=>{var k;const d=(D.value||[]).find(w=>w.id===c.id);for(const w of c.selected_children){const F=(k=d==null?void 0:d.children)==null?void 0:k.find(W=>W.id===w);F&&typeof F.value=="number"&&(F.type==="fixed"?o+=F.value:o+=F.value/100*o)}}),Number((o*Z.value).toFixed(1))});rt(()=>q.value,()=>{_.value.products.forEach(o=>{o.attribute_values_key==q.value.id.toString()&&(p.value=o)})});function Ne(){E.get("cart").then(o=>{o.data.data.menu_id&&(Y.value=o.data.data.menu_id)})}function tt(){Q.fire({html:ye.value.text,iconHtml:`<img src=${ye.value.image_url} />`,showCancelButton:!0,confirmButtonText:ue("Delete"),cancelButtonText:ue("Cancel"),confirmButtonColor:"#dc3545",cancelButtonColor:"#4466f2"}).then(o=>{o.value&&ot()})}function st(){E.get("settings").then(o=>{ye.value=o.data.data.template_settings.dialog_setting.change_cart_service})}function ot(){E.delete("delete-all-cart").then(o=>{Ne(),de.value=0,ie().$showToast({msg:o.data.message,type:"success",icon:"fa fa-check",position:"top-center",timeout:200})})}return dt(()=>{st(),Ne()}),(o,s)=>{var F,W,J,$;const i=Pe,c=Bt,d=mt,k=pt,w=vt;return n(),a("div",os,[s[20]||(s[20]=e("div",{class:"position-fixed",style:{}},null,-1)),l(fe)?(n(),a("div",xs,[e("div",ks,[e("div",ws,[e("div",$s,[e("div",Ms,u(l(fe)),1)])])])])):(n(),a(y,{key:0},[e("div",ns,[e("div",{class:"container position-relative d-flex align-items-center justify-content-center",ref_key:"cartIcon",ref:Me,id:"testParent",style:{height:"60px"}},[l(N)?(n(),a("div",as,[(n(!0),a(y,null,j(l(ce),t=>(n(),a("div",{class:ne(["d-inline-block px-3 py-2 pointer rounded-pill me-2 category main-color",{active:t.id===l(g).id}]),key:t.name,onClick:r=>Ze(t)},u(t.name[l(he)]),11,ls))),128))])):(n(),a("div",is,[(n(),a(y,null,j(["1Method","2Method","3Method","4Method","5Method"],t=>z(i,{class:"rounded-pill me-2 mb-3",height:"40px",width:"180px",key:t})),64))]))],512),e("div",rs,[l(N)?(n(),a("div",ds,[(n(!0),a(y,null,j(l(Te),t=>(n(),a("div",{class:ne(["d-inline-block px-3 py-2 pointer rounded-pill me-2 category main-color mb-3 category-selector",{active:t.id==l(Ee)}]),"data-id":t.id,id:`category_selector_${t.id}`,key:t.name,onClick:r=>l(Ae)(t)},u(t.name),11,cs))),128))])):(n(),a("div",us,[(n(),a(y,null,j(["1Method","2Method","3Method","4Method","5Method"],t=>z(i,{class:"rounded-pill me-2 mb-3 w-100",height:"40px",key:t})),64))]))])]),e("div",ms,[e("div",ps,[e("div",vs,[l(N)?(n(),a("div",_s,[(n(!0),a(y,null,j(l(Te),t=>(n(),a("div",{class:ne(["d-inline-block px-3 py-2 pointer rounded-pill me-2 category main-color mb-3 category-selector",{active:t.id==l(Ee)}]),"data-id":t.id,id:`category_selector_${t.id}`,key:t.name,onClick:r=>l(Ae)(t)},u(t.name),11,hs))),128))])):(n(),a("div",fs,[(n(),a(y,null,j(["1Method","2Method","3Method","4Method","5Method"],t=>z(i,{class:"rounded-pill me-2 mb-3 w-100",height:"40px",key:t})),64))]))]),e("div",ys,[e("div",{class:"product-list-container",id:"product-list-container",onScroll:s[0]||(s[0]=(...t)=>l(je)&&l(je)(...t))},[(n(!0),a(y,null,j(l(Qe),t=>
1(n(),qe(c,{item:t,"onFetch:product":Je,id:t.id},null,8,["item","id"]))),256)),e("h6",gs,[!l(R)&&l(H)<l(U)?(n(),a("button",{key:0,onClick:Ke,class:"btn main-color"},[B(u(o.$t("SHOW MORE"))+" ",1),s[6]||(s[6]=e("i",{class:"fa-solid fa-chevron-down"},null,-1))])):A("",!0),l(Ve)?(n(),a("div",bs,u(o.$t("Loading"))+" ... ",1)):A("",!0)])],32)])])])],64)),e("div",Cs,[e("div",Ts,[e("div",Es,[e("div",Ss,[e("div",js,[e("h5",As,u((F=l(_))==null?void 0:F.name),1)]),l(G)?(n(),a("div",Vo,[z(i,{class:"w-50 rounded",height:"30px"}),z(i,{class:"w-75 rounded",height:"20px"}),z(i,{class:"w-100 rounded",height:"20px"})])):(n(),a(y,{key:0},[s[19]||(s[19]=e("span",{class:"fa-stack fa-sm position-absolute z-3 pointer",style:{top:"10px",right:"10px"},"data-bs-dismiss":"modal","aria-label":"Close"},[e("i",{class:"fa-solid fa-circle fa-stack-2x text-secondary opacity-50"}),e("i",{class:"fa-solid fa-close fa-stack-1x fa-inverse"})],-1)),e("div",Os,[e("div",Ns,[e("div",Is,[e("div",Bs,[l(_).inner_image_list.length>1?(n(),a("div",Ls,[(n(!0),a(y,null,j(l(_).inner_image_list,(t,r)=>(n(),a("button",{type:"button",key:t,"data-bs-target":"#carouselExampleIndicators","data-bs-slide-to":r,class:ne({active:r===l(ae)}),"aria-current":"true","aria-label":"Slide "+r},null,10,qs))),128))])):A("",!0),e("div",Rs,[(n(!0),a(y,null,j(l(_).inner_image_list,(t,r)=>(n(),a("div",{class:ne(["carousel-item radius position-relative",{active:r===l(ae)}]),key:t},[e("img",{src:t,class:"d-block w-100 object-fit-cover radius",alt:"..."},null,8,Fs)],2))),128))]),l(_).inner_image_list.length>1?(n(),a("button",Ps,s[7]||(s[7]=[e("span",{class:"carousel-control-prev-icon","aria-hidden":"true"},null,-1),e("span",{class:"visually-hidden"},"Previous",-1)]))):A("",!0),l(_).inner_image_list.length>1?(n(),a("button",Ds,s[8]||(s[8]=[e("span",{class:"carousel-control-next-icon","aria-hidden":"true"},null,-1),e("span",{class:"visually-hidden"},"Next",-1)]))):A("",!0)])]),e("div",Hs,[e("h4",Ws,[B(u(l(p).name)+" ",1),e("span",Vs,[s[10]||(s[10]=e("span",{class:"sar-icon"},"",-1)),B(u(l(p).price)+" ",1),l(p).price!==l(p).price_before_discount?(n(),a("sup",Qs,[s[9]||(s[9]=e("span",{class:"sar-icon"},"",-1)),B(u(l(p).price_before_discount),1)])):A("",!0)])]),e("div",null,[(n(!0),a(y,null,j(l(p).tag_groups,t=>(n(),a("div",{key:t,class:"d-flex"},[(n(!0),a(y,null,j(t.tags,r=>(n(),a("div",{key:r,class:"d-flex me-3"},[r.value?(n(),a("p",Us,[e("img",{src:r.icon,alt:"",class:"me-2",style:{width:"20px"}},null,8,Ys),B(" "+u(r.value)+" "+u(r.name),1)])):A("",!0)]))),128))]))),128))]),(W=l(_))!=null&&W.description?(n(),a("p",{key:0,class:"text-secondary text-opacity-50",innerHTML:(J=l(_))==null?void 0:J.description},null,8,Gs)):A("",!0)])]),z(d,{note:l(We),class:"mt-3"},null,8,["note"])]),e("div",zs,[l(_).products.length>1?(n(),a("div",Xs,[(n(!0),a(y,null,j(($=l(_))==null?void 0:$.attributes,t=>(n(),a("div",{key:t},[e("h5",Ks,u(t.name),1),e("div",Zs,[(n(!0),a(y,null,j(t.attribute_values,r=>{var b;return n(),a("div",{class:"form-check form-check-inline",key:r},[_e(e("input",{class:"form-check-input",type:"radio",name:r.name,id:"inlineRadio"+r.id,value:r,"onUpdate:modelValue":s[1]||(s[1]=ee=>ke(q)?q.value=ee:null),autocomplete:"off",checked:r.id===((b=l(q))==null?void 0:b.id)},null,8,Js),[[xe,l(q)]]),e("label",{class:"form-check-label fw-bold fs-16",for:r.name},u(r.name),9,eo)])}),128))])]))),128))])):A("",!0),(n(!0),a(y,null,j(l(p).modifier_classes,t=>(n(),a("div",{key:t,class:"bg-white radius shadow-sm"},[e("h6",to,u(t.name),1),Number(t.max)===1?(n(),a("div",so,[e("div",oo,[(n(!0),a(y,null,j(t.modifiers,r
1=>(n(),a("div",{class:"col-lg-4 mb-2",key:r},[e("div",no,[_e(e("input",{class:"form-check-input me-3 ms-0 ms-1 radio-btn-input",type:"radio",name:`group_${t.name}`,value:r.id,id:`radio_${t.name}_${r.id??r.name}`,"onUpdate:modelValue":b=>l(M)[t.name]=b},null,8,ao),[[xe,l(M)[t.name]]]),e("label",{class:"form-check-label text-secondary",for:`radio_${t.name}_${r.id??r.name}`},[B(u(r.name)+" ",1),r.price>0?(n(),a("h6",io," ( "+u(r.price)+" "+u(r.currency)+" ) ",1)):A("",!0)],8,lo)])]))),128))])])):(n(),a("div",ro,[e("div",co,[(n(!0),a(y,null,j(t.modifiers,r=>(n(),a("div",{class:"col-lg-4 mb-2",key:r},[e("div",uo,[_e(e("input",{class:"form-check-input me-3 ms-1",type:"checkbox",value:r,id:r.name,"onUpdate:modelValue":s[2]||(s[2]=b=>ke(se)?se.value=b:null)},null,8,mo),[[ct,l(se)]]),e("div",po,[e("label",{class:"form-check-label dark-text product-label fs-14 flex-grow-1",for:r.name},u(r.name),9,vo),r.price>0?(n(),a("h6",_o,[s[11]||(s[11]=e("span",{class:"sar-icon tiny"},"",-1)),B(u(r.price),1)])):A("",!0)])])]))),128))])]))]))),128)),l(me).length?(n(),a("div",ho,[s[13]||(s[13]=e("h6",{class:"main-color py-3 sec-bk radius rounded-bottom-0 ps-3 Yesteryear"}," Service Fees ",-1)),e("div",fo,[(n(!0),a(y,null,j(l(me),t=>(n(),a("div",{key:`auto_${t.id}`,class:"d-flex justify-content-between align-items-center py-2"},[e("span",yo,u(t.name),1),e("span",go,[t.type==="fixed"?(n(),a(y,{key:0},[s[12]||(s[12]=e("span",{class:"sar-icon tiny"},"",-1)),B(u(Number(t.value||0).toFixed(2)),1)],64)):(n(),a(y,{key:1},[B(u(t.value)+"% ",1)],64))])]))),128))])])):A("",!0),l(D).length?(n(),a("div",bo,[s[16]||(s[16]=e("h6",{class:"main-color py-3 sec-bk radius rounded-bottom-0 ps-3 Yesteryear"}," Service Fees ",-1)),(n(!0),a(y,null,j(l(D),(t,r)=>(n(),a("div",{key:`user_${t.id}_${r}`,class:"bg-white radius shadow-sm mb-3"},[e("div",xo,[e("h6",ko,u(t.name),1),e("small",wo,[Number(t.max_selectable_children||1)===1?(n(),a(y,{key:0},[B(" Choose 1 option ")],64)):(n(),a(y,{key:1},[B(" Choose "+u(t.min_selectable_children||0)+"–"+u(t.max_selectable_children)+" options ",1)],64))]),Number(t.max_selectable_children||1)===1?(n(),a("div",$o,[(n(!0),a(y,null,j(t.children,b=>{var ee,le;return n(),a("div",{key:`child_${t.id}_${b.id}`,class:"form-check d-flex justify-content-between align-items-center mb-2"},[e("div",null,[_e(e("input",{class:"form-check-input me-2",type:"radio",id:`fee_${t.id}_${r}_${b.id}`,name:`fee_${t.id}_${r}`,value:b.id,"onUpdate:modelValue":pe=>l(C)[L(t,r)]=pe,onChange:pe=>te(t,r)},null,40,Mo),[[xe,l(C)[L(t,r)]]]),e("label",{class:"form-check-label text-secondary",for:`fee_${t.id}_${r}_${b.id}`},u(((ee=b.name)==null?void 0:ee[l(he)])||((le=b.name)==null?void 0:le.en)||b.name),9,Co)]),e("span",To,[b.type==="fixed"?(n(),a(y,{key:0},[s[14]||(s[14]=e("span",{class:"sar-icon tiny"},"",-1)),B(u(Number(b.value||0).toFixed(2)),1)],64)):(n(),a(y,{key:1},[B(u(b.value)+"% ",1)],64))])])}),128))])):(n(),a("div",Eo,[(n(!0),a(y,null,j(t.children,b=>{var ee,le;return n(),a("div",{key:`child_${t.id}_${b.id}`,class:"form-check d-flex justify-content-between align-items-center mb-2"},[e("div",null,[e("input",{class:"form-check-input me-2",type:"checkbox",id:`fee_${t.id}_${r}_${b.id}`,checked:Array.isArray(l(C)[L(t,r)])?l(C)[L(t,r)].includes(b.id):!1,disabled:Array.isArray(l(C)[L(t,r)])?l(C)[L(t,r)].length>=Number(t.max_selectable_children||1/0)&&!l(C)[L(t,r)].includes(b.id):!1,onChange:pe=>T(t,r,b.id,pe.target.checked)},null,40,So),e("label",{class:"form-check-label text-secondary",for:`fee_${t.id}_${r}_${b.id}`},u(((ee=b.name)==null?void 0:ee[l(he)])||((le=b.name)==null?void 0:le.en)||b.name),9,jo)]),e("span",Ao,[b.type==="fixed"?(n(),a(y,{key:0},[s[15]||(s[15]=e("span",{class:"sar-icon tiny"},"",-1)),B(u(Number(b.value||0).toFixed(2)),1)],64)):(n(),a(y,{key:1},[B(u(b.value)+"% ",1)],64))])])}),128))]))])]))),128))])):A("",!0)]),e("div",Oo,[e("div",No,[e("div",Io,[e("h6",Bo,u(o.$t("Total")),1),e("h2",Lo,[s[17]||(s[17]=e("span",{class:"sar-icon large"},"",-1)),B(u(l(Oe)),1)])])]),e("div",qo,[z(k,{modelValue:l(Z),"onUpdate:modelValue":s[3]||(s[3]=t=>ke(Z)?Z.value=t:null),class:"w-100 justify-content-end d-flex"},null,8,["modelValue"])]),e("div",Ro,[S()?A("",!0):(n(),a("p",Fo," Please complete required Service Fees selections. ")),l(x)?(n(),a("button",{key:1,onClick:s[4]||(s[4]=t=>
1ze()),class:"button btn main-bk shadow border-0 btn-lg px-lg-4 float-end fs-18 fw-bold w-100",disabled:l(oe)||!S()},[l(oe)?(n(),a("span",Do,[s[18]||(s[18]=e("i",{class:"fa-solid fa-sync fa-spin me-2"},null,-1)),B(" "+u(o.$t("Adding"))+" .. ",1)])):(n(),a("span",Ho,u(o.$t("Add To Basket")),1))],8,Po)):A("",!0),l(x)?A("",!0):(n(),qe(w,{key:2,onClick:s[5]||(s[5]=t=>Ge()),to:o.localePath("/auth/login"),class:"button btn main-bk shadow border-0 btn-lg px-lg-4 float-end fs-18 fw-bold w-100",disabled:l(oe)},{default:ut(()=>[e("span",Wo,u(o.$t("Add To Basket")),1)]),_:1},8,["to","disabled"]))])])],64))])])])])])}}}),Jo=_t(Qo,[["__scopeId","data-v-e51f0266"]]);export{Jo as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.