1<!doctype html> 2<html class="no-js" lang="en"> 3<head> 4 <link rel="alternate" hreflang="en-ae" 5 href="https://uae.lalschocolates.com/" /> 6 <!-- <link rel="alternate" hreflang="ar-ae" 7 href="https://uae.lalschocolates.com/" /> --> 8 <link rel="alternate" hreflang="en-pk" 9 href="https://www.lalschocolates.com/" /> 10 <link rel="alternate" hreflang="x-default" 11 href="https://www.lalschocolates.com" /> 12
12<script type="text/javascript"> (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "smzvvg3h09"); </script>
12 13
13<script> 14 newrelic.setErrorHandler(function(err) { 15 if (shouldIgnoreError(err)) { 16 return true; // The error will be ignored 17 } else if (shouldGroupError(err)) { 18 return { group: 'GroupName' }; // The error will be grouped 19 } else { 20 return false; // The error will be processed normally 21 }}); 22 </script>
vendor: 1 bytes, line 22
22
23<script type="text/javascript"> 24 var path = window.location.pathname; 25 if (path === "/pages/create-your-own-hamper" || path === "/pages/make-your-own-hamper") { 26 window.location.href = "https://www.lalschocolates.com"; 27 } 28</script>
28 29<!--
29<script type="text/javascript"> 30if (window.location.pathname.includes("/ar")) { 31 // Create a new URL without "/ar" 32 const newPath = window.location.pathname.replace("/ar", ""); 33 const newUrl = window.location.origin + newPath + window.location.search + window.location.hash; 34 // Redirect to the new URL 35 window.location.href = newUrl; 36} 37</script>
37 -->
38<script> 39document.addEventListener("DOMContentLoaded", function() { 40 if (document.querySelector("body.template-404")) { 41 window.location.href = "/"; 42 } 43}); 44</script>
44 45<!-- Google Tag Manager -->
46<script>
vendor: 327 bytes, lines 46-50
46(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 47new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 48j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 49'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 50})(window,document,'script','dataLayer','
50GTM-PF2255GJ
vendor: 3 bytes, line 50
50');
50</script>
50 51<!-- End Google Tag Manager -->
52<script src="https://cozycountryredirectiii.addons.business/js/eggbox/14179/script_5c30a9e9f5b66f0c76af9583954f086c.js?v=1&sign=5c30a9e9f5b66f0c76af9583954f086c&shop=lals-sd.myshopify.com" type='text/javascript'></script>
52
53<script type="text/javascript"> 54;window.NREUM||(NREUM={});NREUM.init={distributed_tracing:{enabled:true},privacy:{cookies_enabled:true},ajax:{deny_list:["bam.nr-data.net"]}}; 55 56;NREUM.loader_config={accountID:"4424891",trustKey:"4424891",agentID:"1103329964",licenseKey:"NRJS-197a34b772a743b4193",applicationID:"1103329964"}; 57;NREUM.info={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",licenseKey:"NRJS-197a34b772a743b4193",applicationID:"1103329964",sa:1}; 58;/*! For license information please see nr-loader-spa-1.258.0.min.js.LICENSE.txt */ 59(()=>{var e,t,r={234:(e,t,r)=>{"use strict";r.d(t,{P_:()=>m,Mt:()=>b,C5:()=>s,DL:()=>E,OP:()=>D,lF:()=>I,Yu:()=>_,Dg:()=>v,CX:()=>c,GE:()=>w,sU:()=>O});var n=r(8632),i=r(9567);const o={beacon:n.ce.beacon,errorBeacon:n.ce.errorBeacon,licenseKey:void 0,applicationID:void 0,sa:void 0,queueTime:void 0,applicationTime:void 0,ttGuid:void 0,user:void 0,account:void 0,product:void 0,extra:void 0,jsAttributes:{},userAttributes:void 0,atts:void 0,transactionName:void 0,tNamePlain:void 0},a={};function s(e){if(!e)throw new Error("All info objects require an agent identifier!");if(!a[e])throw new Error("Info for ".concat(e," was never set"));return a[e]}function c(e,t){if(!e)throw new Error("All info objects require an agent identifier!");a[e]=(0,i.D)(t,o);const r=(0,n.ek)(e);r&&(r.info=a[e])}const u=e=>{if(!e||"string"!=typeof e)return!1;try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0};var d=r(7056),l=r(50);const f="[data-nr-mask]",h=()=>{const e={mask_selector:"*",block_selector:"[data-nr-block]",mask_input_options:{color:!1,date:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:!1,search:!1,tel:!1,text:!1,time:!1,url:!1,week:!1,textarea:!1,select:!1,password:!0}};return{feature_flags:[],proxy:{assets:void 0,beacon:void 0},privacy:{cookies_enabled:!0},ajax:{deny_list:void 0,block_internal:!0,enabled:!0,harvestTimeSeconds:10,autoStart:!0},distributed_tracing:{enabled:void 0,exclude_newrelic_header:void 0,cors_use_newrelic_header:void 0,cors_use_tracecontext_headers:void 0,allowed_origins:void 0},session:{expiresMs:d.oD,inactiveMs:d.Hb},ssl:void 0,obfuscate:void 0,jserrors:{enabled:!0,harvestTimeSeconds:10,autoStart:!0},metrics:{enabled:!0,autoStart:!0},page_action:{enabled:!0,harvestTimeSeconds:30,autoStart:!0},page_view_event:{enabled:!0,autoStart:!0},page_view_timing:{enabled:!0,harvestTimeSeconds:30,long_task:!1,autoStart:!0},session_trace:{enabled:!0,harvestTimeSeconds:10,autoStart:!0},harvest:{tooManyRequestsDelay:60},session_replay:{autoStart:!0,enabled:!1,harvestTimeSeconds:60,preload:!1,sampling_rate:10,error_sampling_rate:100,collect_fonts:!1,inline_images:!1,inline_stylesheet:!0,mask_all_inputs:!0,get mask_text_selector(){return e.mask_selector},set mask_text_selector(t){u(t)?e.mask_selector="".concat(t,",").concat(f):""===t||null===t?e.mask_selector=f:(0,l.Z)("An invalid session_replay.mask_selector was provided. '*' will be used.",t)},get block_class(){return"nr-block"},get ignore_class(){return"nr-ignore"},get mask_text_class(){return"nr-mask"},get block_selector(){return e.block_selector},set block_selector(t){u(t)?e.block_selector+=",".concat(t):""!==t&&(0,l.Z)("An invalid session_replay.block_selector was provided and will not be used",t)},get mask_input_options(){return e.mask_input_options},set mask_input_options(t){t&&"object"==typeof t?e.mask_input_options={...t,password:!0}:(0,l.Z)("An invalid session_replay.mask_input_option was provided and will not be used",t)}},spa:{enabled:!0,harvestTimeSeconds:10,autoStart:!0},soft_navigations:{enabled:!0,harvestTimeSeconds:10,autoStart:!0}}},p={},g="All configuration objects require an agent identifier!";function m(e){if(!e)throw new Error(g);if(!p[e])throw new Error("Configuration for ".concat(e," was never set"));return p[e]}function v(e,t){if(!e)throw new Error(g);p[e]=(0,i.D)(t,h());const r=(0,n.ek)(e);r&&(r.init=p[e])}function b(e,t){if(!e)throw new Error(g);var r=m(e);if(r){for(var n=t.split("."),i=0;i<n.length-1;i++)if("object"!=typeof(r=r[n[i]]))return;r=r[n[n.length-1]]}return r}const y={accountID:void 0,trustKey:void 0,agentID:void 0,licenseKey:void 0,applicationID:void 0,xpid:void 0},A={};function E(e){if(!e)throw new Error("All loader-config objects require an agent identifier!");if(!A[e])throw new Error("LoaderConfig for ".concat(e," was never set"));return A[e]}function w(e,t){if(!e)throw new Error("All loader-config objects require an agent identifier!");A[e]=(0,i.D)(t,y);const r=(0,n.ek)(e);r&&(r.loader_config=A[e])}const _=(0,n.mF)().o;var x=r(385),R=r(6818);const T={buildEnv:R.Re,distMethod:R.gF,version:R.q4,originTime:x.sK},S={customTransaction:void 0,disabled:!1,isolatedBacklog:!1,loaderType:void 0,maxBytes:3e4,onerror:void 0,origin:""+x._A.location,ptid:void 0,releaseIds:{},appMetadata:{},session:void 0,denyList:void 0,harvestCount:0,timeKeeper:void 0},N={};function D(e){if(!e)throw new Error("All runtime objects require an agent identifier!");if(!N[e])throw new Error("Runtime for ".concat(e," was never set"));return N[e]}function O(e,t){if(!e)throw new Error("All runtime objects require an agent identifier!");N[e]={...(0,i.D)(t,S),...T};const r=(0,n.ek)(e);r&&(r.runtime=N[e])}function I(e){return function(e){try{const t=s(e);return!!t.licenseKey&&!!t.errorBeacon&&!!t.applicationID}catch(e){return!1}}(e)}},9567:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(50);function i(e,t){try{if(!e||"object"!=typeof e)return(0,n.Z)("Setting a Configurable requires an object as input");if(!t||"object"!=typeof t)return(0,n.Z)("Setting a Configurable requires a model to set its initial properties");const r=Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),o=0===Object.keys(r).length?e:r;
59for(let a in o)if(void 0!==e[a])try{if(null===e[a]){r[a]=null;continue}Array.isArray(e[a])&&Array.isArray(t[a])?r[a]=Array.from(new Set([...e[a],...t[a]])):"object"==typeof e[a]&&"object"==typeof t[a]?r[a]=i(e[a],t[a]):r[a]=e[a]}catch(e){(0,n.Z)("An error occurred while setting a property of a Configurable",e)}return r}catch(e){(0,n.Z)("An error occured while setting a Configurable",e)}}},6818:(e,t,r)=>{"use strict";r.d(t,{Re:()=>i,gF:()=>o,lF:()=>a,q4:()=>n});const n="1.258.0",i="PROD",o="CDN",a="2.0.0-alpha.12"},385:(e,t,r)=>{"use strict";r.d(t,{FN:()=>c,IF:()=>l,LW:()=>a,Nk:()=>h,Tt:()=>u,_A:()=>o,iS:()=>s,il:()=>n,sK:()=>p,ux:()=>d,v6:()=>i,w1:()=>f});const n="undefined"!=typeof window&&!!window.document,i="undefined"!=typeof WorkerGlobalScope&&("undefined"!=typeof self&&self instanceof WorkerGlobalScope&&self.navigator instanceof WorkerNavigator||"undefined"!=typeof globalThis&&globalThis instanceof WorkerGlobalScope&&globalThis.navigator instanceof WorkerNavigator),o=n?window:"undefined"!=typeof WorkerGlobalScope&&("undefined"!=typeof self&&self instanceof WorkerGlobalScope&&self||"undefined"!=typeof globalThis&&globalThis instanceof WorkerGlobalScope&&globalThis),a="complete"===o?.document?.readyState,s=Boolean("hidden"===o?.document?.visibilityState),c=""+o?.location,u=/iPad|iPhone|iPod/.test(o.navigator?.userAgent),d=u&&"undefined"==typeof SharedWorker,l=(()=>{const e=o.navigator?.userAgent?.match(/Firefox[/\s](\d+\.\d+)/);return Array.isArray(e)&&e.length>=2?+e[1]:0})(),f=Boolean(n&&window.document.documentMode),h=!!o.navigator?.sendBeacon,p=Math.floor(Date.now()-performance.now())},1117:(e,t,r)=>{"use strict";r.d(t,{w:()=>o});var n=r(50);const i={agentIdentifier:"",ee:void 0};class o{constructor(e){try{if("object"!=typeof e)return(0,n.Z)("shared context requires an object as input");this.sharedContext={},Object.assign(this.sharedContext,i),Object.entries(e).forEach((e=>{let[t,r]=e;Object.keys(i).includes(t)&&(this.sharedContext[t]=r)}))}catch(e){(0,n.Z)("An error occurred while setting SharedContext",e)}}}},8e3:(e,t,r)=>{"use strict";r.d(t,{LP:()=>l,RP:()=>c,o5:()=>u});var n=r(8325),i=r(1284),o=r(4322),a=r(3325);const s={};function c(e,t){const r={staged:!1,priority:a.p[t]||0};d(e),s[e].get(t)||s[e].set(t,r)}function u(e,t){d(e),s[e].get(t)&&s[e].delete(t),s[e].size&&f(e)}function d(e){if(!e)throw new Error("agentIdentifier required");s[e]||(s[e]=new Map)}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"feature",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(d(e),!e||!s[e].get(t)||r)return h(e,t);s[e].get(t).staged=!0,f(e)}function f(e){const t=[...s[e]];t.every((e=>{let[t,r]=e;return r.staged}))&&(t.sort(((e,t)=>e[1].priority-t[1].priority)),t.forEach((t=>{let[r]=t;s[e].delete(r),h(e,r)})))}function h(e,t){const r=e?n.ee.get(e):n.ee,a=o.X.handlers;if(r.backlog&&a){var s=r.backlog[t],c=a[t];if(c){for(var u=0;s&&u<s.length;++u)p(s[u],c);(0,i.D)(c,(function(e,t){(0,i.D)(t,(function(t,r){r[0].on(e,r[1])}))}))}r.isolatedBacklog||delete a[t],r.backlog[t]=null,r.emit("drain-"+t,[])}}function p(e,t){var r=e[1];(0,i.D)(t[r],(function(t,r){var n=e[0];if(r[0]===n){var i=r[1],o=e[3],a=e[2];i.apply(o,a)}}))}},8325:(e,t,r)=>{"use strict";r.d(t,{A:()=>c,ee:()=>u});var n=r(8632),i=r(2210),o=r(234);class a{constructor(e){this.contextId=e}}var s=r(3117);const c="nr@context:".concat(s.a),u=function e(t,r){var n={},s={},d={},l=!1;try{l=16===r.length&&(0,o.OP)(r).isolatedBacklog}catch(e){}var f={on:p,addEventListener:p,removeEventListener:function(e,t){var r=n[e];if(!r)return;for(var i=0;i<r.length;i++)r[i]===t&&r.splice(i,1)},emit:function(e,r,n,i,o){!1!==o&&(o=!0);if(u.aborted&&!i)return;t&&o&&t.emit(e,r,n);for(var a=h(n),c=g(e),d=c.length,l=0;l<d;l++)c[l].apply(a,r);var p=v()[s[e]];p&&p.push([f,e,r,a]);return a},get:m,listeners:g,context:h,buffer:function(e,t){const r=v();if(t=t||"feature",f.aborted)return;Object.entries(e||{}).forEach((e=>{let[n,i]=e;s[i]=t,t in r||(r[t]=[])}))},abort:function(){f._aborted=!0,Object.keys(f.backlog).forEach((e=>{delete f.backlog[e]}))},isBuffering:function(e){return!!v()[s[e]]},debugId:r,backlog:l?{}:t&&"object"==typeof t.backlog?t.backlog:{},isolatedBacklog:l};return Object.defineProperty(f,"aborted",{get:()=>{let e=f._aborted||!1;return e||(t&&(e=t.aborted),e)}}),f;function h(e){return e&&e instanceof a?e:e?(0,i.X)(e,c,(()=>new a(c))):new a(c)}function p(e,t){n[e]=g(e).concat(t)}function g(e){return n[e]||[]}function m(t){return d[t]=d[t]||e(f,t)}function v(){return f.backlog}}(void 0,"globalEE"),d=(0,n.fP)();d.ee||(d.ee=u)},5546:(e,t,r)=>{"use strict";r.d(t,{E:()=>n,p:()=>i});var n=r(8325).ee.get("handle");function i(e,t,r,i,o){o?(o.buffer([e],i),o.emit(e,t,r)):(n.buffer([e],i),n.emit(e,t,r))}},4322:(e,t,r)=>{"use strict";r.d(t,{X:()=>o});var n=r(5546);o.on=a;var i=o.handlers={};function o(e,t,r,o){a(o||n.E,i,e,t,r)}function a(e,t,r,i,o){o||(o="feature"),e||(e=n.E);var a=t[o]=t[o]||{};(a[r]=a[r]||[]).push([e,i])}},3239:(e,t,r)=>{"use strict";r.d(t,{bP:()=>s,iz:()=>c,m$:()=>a});var n=r(385);let i=!1,o=!1;
59try{const e={get passive(){return i=!0,!1},get signal(){return o=!0,!1}};n._A.addEventListener("test",null,e),n._A.removeEventListener("test",null,e)}catch(e){}function a(e,t){return i||o?{capture:!!e,passive:i,signal:t}:!!e}function s(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;window.addEventListener(e,t,a(r,n))}function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;document.addEventListener(e,t,a(r,n))}},3117:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});const n=(0,r(4402).Rl)()},4402:(e,t,r)=>{"use strict";r.d(t,{Ht:()=>u,M:()=>c,Rl:()=>a,ky:()=>s});var n=r(385);const i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function o(e,t){return e?15&e[t]:16*Math.random()|0}function a(){const e=n._A?.crypto||n._A?.msCrypto;let t,r=0;return e&&e.getRandomValues&&(t=e.getRandomValues(new Uint8Array(30))),i.split("").map((e=>"x"===e?o(t,r++).toString(16):"y"===e?(3&o()|8).toString(16):e)).join("")}function s(e){const t=n._A?.crypto||n._A?.msCrypto;let r,i=0;t&&t.getRandomValues&&(r=t.getRandomValues(new Uint8Array(e)));const a=[];for(var s=0;s<e;s++)a.push(o(r,i++).toString(16));return a.join("")}function c(){return s(16)}function u(){return s(32)}},7056:(e,t,r)=>{"use strict";r.d(t,{Bq:()=>n,Hb:()=>a,IK:()=>u,K4:()=>i,oD:()=>o,uT:()=>c,wO:()=>s});const n="NRBA",i="SESSION",o=144e5,a=18e5,s={STARTED:"session-started",PAUSE:"session-pause",RESET:"session-reset",RESUME:"session-resume",UPDATE:"session-update"},c={SAME_TAB:"same-tab",CROSS_TAB:"cross-tab"},u={OFF:0,FULL:1,ERROR:2}},7894:(e,t,r)=>{"use strict";function n(){return Math.floor(performance.now())}r.d(t,{z:()=>n})},7243:(e,t,r)=>{"use strict";r.d(t,{e:()=>i});var n=r(385);function i(e){if(0===(e||"").indexOf("data:"))return{protocol:"data"};try{const t=new URL(e,location.href),r={port:t.port,hostname:t.hostname,pathname:t.pathname,search:t.search,protocol:t.protocol.slice(0,t.protocol.indexOf(":")),sameOrigin:t.protocol===n._A?.location?.protocol&&t.host===n._A?.location?.host};return r.port&&""!==r.port||("http:"===t.protocol&&(r.port="80"),"https:"===t.protocol&&(r.port="443")),r.pathname&&""!==r.pathname?r.pathname.startsWith("/")||(r.pathname="/".concat(r.pathname)):r.pathname="/",r}catch(e){return{}}}},50:(e,t,r)=>{"use strict";function n(e,t){"function"==typeof console.warn&&(console.warn("New Relic: ".concat(e)),t&&console.warn(t))}r.d(t,{Z:()=>n})},2825:(e,t,r)=>{"use strict";r.d(t,{N:()=>c,T:()=>s});var n=r(8325),i=r(385);const o="newrelic";const a=new Set,s={};function c(e,t){const r=n.ee.get(t);s[t]??={},e&&"object"==typeof e&&(a.has(t)||(r.emit("rumresp",[e]),s[t]=e,a.add(t),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{i._A.dispatchEvent(new CustomEvent(o,{detail:e}))}catch(e){}}({loaded:!0})))}},2210:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=Object.prototype.hasOwnProperty;function i(e,t,r){if(n.call(e,t))return e[t];var i=r();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!1}),i}catch(e){}return e[t]=i,i}},7872:(e,t,r)=>{"use strict";function n(e){var t=this;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=n?.leading||!1;let o;return function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];i&&void 0===o&&(e.apply(t,a),o=setTimeout((()=>{o=clearTimeout(o)}),r)),i||(clearTimeout(o),o=setTimeout((()=>{e.apply(t,a)}),r))}}function i(e){var t=this;let r=!1;return function(){if(!r){r=!0;for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];e.apply(t,i)}}}r.d(t,{D:()=>n,Z:()=>i})},1284:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});const n=(e,t)=>Object.entries(e||{}).map((e=>{let[r,n]=e;return t(r,n)}))},4351:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(8325);const i=()=>{const e=new WeakSet;return(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}};function o(e){try{return JSON.stringify(e,i())}catch(e){try{n.ee.emit("internal-error",[e])}catch(e){}}}},3960:(e,t,r)=>{"use strict";r.d(t,{KB:()=>a,b2:()=>o});var n=r(3239);function i(){return"undefined"==typeof document||"complete"===document.readyState}function o(e,t){if(i())return e();(0,n.bP)("load",e,t)}function a(e){if(i())return e();(0,n.iz)("DOMContentLoaded",e)}},8632:(e,t,r)=>{"use strict";r.d(t,{EZ:()=>d,ce:()=>o,ek:()=>u,fP:()=>a,gG:()=>l,h5:()=>c,mF:()=>s});var n=r(385),i=r(7894);const o={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net"};function a(){return n._A.NREUM||(n._A.NREUM={}),void 0===n._A.newrelic&&(n._A.newrelic=n._A.NREUM),n._A.NREUM}function s(){let e=a();return e.o||(e.o={ST:n._A.setTimeout,SI:n._A.setImmediate,CT:n._A.clearTimeout,XHR:n._A.XMLHttpRequest,REQ:n._A.Request,EV:n._A.Event,PR:n._A.Promise,MO:n._A.MutationObserver,FETCH:n._A.fetch}),e}function c(e,t){let r=a();r.initializedAgents??={},t.initializedAt={ms:(0,i.z)(),date:new Date},r.initializedAgents[e]=t}function u(e){let t=a();return t.initializedAgents?.[e]}function d(e,t){a()[e]=t}function l(){return function(){let e=a();const t=e.info||{};e.info={beacon:o.beacon,errorBeacon:o.errorBeacon,...t}}(),function(){let e=a();const t=e.init||{};e.init={...t}}(),s(),function(){let e=a();const t=e.loader_config||{};e.loader_config={...t}}(),a()}},7956:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var n=r(3239);function i(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;(0,n.iz)("visibilitychange",(function(){if(t)return void("hidden"===document.visibilityState&&e());e(document.visibilityState)}),r,i)}},7806:(e,t,r)=>{"use strict";r.d(t,{em:()=>b,u5:()=>S,QU:()=>O,_L:()=>j,Gm:()=>M,Lg:()=>L,BV:()=>Z,Kf:()=>Y});var n=r(8325),i=r(3117);const o="nr@original:".concat(i.a);var a=Object.prototype.hasOwnProperty,s=!1;function c(e,t){return e||(e=n.ee),r.inPlace=function(e,t,n,i,o){n||(n="");const a="-"===n.charAt(0);for(let s=0;s<t.length;s++){const c=t[s],u=e[c];d(u)||(e[c]=r(u,a?c+n:n,i,c,o))}},r.flag=o,r;function r(t,r,n,s,c){return d(t)?t:(r||(r=""),nrWrapper[o]=t,function(e,t,r){if(Object.defineProperty&&Object.keys)try{return Object.keys(e).forEach((function(r){Object.defineProperty(t,r,{get:function(){return e[r]},set:function(t){return e[r]=t,t}})})),t}catch(e){u([e],r)}for(var n in e)a.call(e,n)&&(t[n]=e[n])}
59(t,nrWrapper,e),nrWrapper);function nrWrapper(){var o,a,d,l;try{a=this,o=[...arguments],d="function"==typeof n?n(o,a):n||{}}catch(t){u([t,"",[o,a,s],d],e)}i(r+"start",[o,a,s],d,c);try{return l=t.apply(a,o)}catch(e){throw i(r+"err",[o,a,e],d,c),e}finally{i(r+"end",[o,a,l],d,c)}}}function i(r,n,i,o){if(!s||t){var a=s;s=!0;try{e.emit(r,n,i,t,o)}catch(t){u([t,r,n,i],e)}s=a}}}function u(e,t){t||(t=n.ee);try{t.emit("internal-error",e)}catch(e){}}function d(e){return!(e&&"function"==typeof e&&e.apply&&!e[o])}var l=r(2210),f=r(385);const h={},p=f._A.XMLHttpRequest,g="addEventListener",m="removeEventListener",v="nr@wrapped:".concat(n.A);function b(e){var t=function(e){return(e||n.ee).get("events")}(e);if(h[t.debugId]++)return t;h[t.debugId]=1;var r=c(t,!0);function i(e){r.inPlace(e,[g,m],"-",o)}function o(e,t){return e[1]}return"getPrototypeOf"in Object&&(f.il&&y(document,i),y(f._A,i),y(p.prototype,i)),t.on(g+"-start",(function(e,t){var n=e[1];if(null!==n&&("function"==typeof n||"object"==typeof n)){var i=(0,l.X)(n,v,(function(){var e={object:function(){if("function"!=typeof n.handleEvent)return;return n.handleEvent.apply(n,arguments)},function:n}[typeof n];return e?r(e,"fn-",null,e.name||"anonymous"):n}));this.wrapped=e[1]=i}})),t.on(m+"-start",(function(e){e[1]=this.wrapped||e[1]})),t}function y(e,t){let r=e;for(;"object"==typeof r&&!Object.prototype.hasOwnProperty.call(r,g);)r=Object.getPrototypeOf(r);for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];r&&t(r,...i)}var A="fetch-",E=A+"body-",w=["arrayBuffer","blob","json","text","formData"],_=f._A.Request,x=f._A.Response,R="prototype";const T={};function S(e){const t=function(e){return(e||n.ee).get("fetch")}(e);if(!(_&&x&&f._A.fetch))return t;if(T[t.debugId]++)return t;function r(e,r,i){var o=e[r];"function"==typeof o&&(e[r]=function(){var e,r=[...arguments],a={};t.emit(i+"before-start",[r],a),a[n.A]&&a[n.A].dt&&(e=a[n.A].dt);var s=o.apply(this,r);return t.emit(i+"start",[r,e],s),s.then((function(e){return t.emit(i+"end",[null,e],s),e}),(function(e){throw t.emit(i+"end",[e],s),e}))})}return T[t.debugId]=1,w.forEach((e=>{r(_[R],e,E),r(x[R],e,E)})),r(f._A,"fetch",A),t.on(A+"end",(function(e,r){var n=this;if(r){var i=r.headers.get("content-length");null!==i&&(n.rxSize=i),t.emit(A+"done",[null,r],n)}else t.emit(A+"done",[e],n)})),t}const N={},D=["pushState","replaceState"];function O(e){const t=function(e){return(e||n.ee).get("history")}(e);return!f.il||N[t.debugId]++||(N[t.debugId]=1,c(t).inPlace(window.history,D,"-")),t}var I=r(3239);const P={},C=["appendChild","insertBefore","replaceChild"];function j(e){const t=function(e){return(e||n.ee).get("jsonp")}(e);if(!f.il||P[t.debugId])return t;P[t.debugId]=!0;var r=c(t),i=/[?&](?:callback|cb)=([^&#]+)/,o=/(.*)\.([^.]+)/,a=/^(\w+)(\.|$)(.*)$/;function s(e,t){if(!e)return t;const r=e.match(a),n=r[1];return s(r[3],t[n])}return r.inPlace(Node.prototype,C,"dom-"),t.on("dom-start",(function(e){!function(e){if(!e||"string"!=typeof e.nodeName||"script"!==e.nodeName.toLowerCase())return;if("function"!=typeof e.addEventListener)return;var n=(a=e.src,c=a.match(i),c?c[1]:null);var a,c;if(!n)return;var u=function(e){var t=e.match(o);if(t&&t.length>=3)return{key:t[2],parent:s(t[1],window)};return{key:e,parent:window}}(n);if("function"!=typeof u.parent[u.key])return;var d={};function l(){t.emit("jsonp-end",[],d),e.removeEventListener("load",l,(0,I.m$)(!1)),e.removeEventListener("error",f,(0,I.m$)(!1))}function f(){t.emit("jsonp-error",[],d),t.emit("jsonp-end",[],d),e.removeEventListener("load",l,(0,I.m$)(!1)),e.removeEventListener("error",f,(0,I.m$)(!1))}r.inPlace(u.parent,[u.key],"cb-",d),e.addEventListener("load",l,(0,I.m$)(!1)),e.addEventListener("error",f,(0,I.m$)(!1)),t.emit("new-jsonp",[e.src],d)}(e[0])})),t}const k={};function M(e){const t=function(e){return(e||n.ee).get("mutation")}(e);if(!f.il||k[t.debugId])return t;k[t.debugId]=!0;var r=c(t),i=f._A.MutationObserver;return i&&(window.MutationObserver=function(e){return this instanceof i?new i(r(e,"fn-")):i.apply(this,arguments)},MutationObserver.prototype=i.prototype),t}const H={};function L(e){const t=function(e){return(e||n.ee).get("promise")}(e);if(H[t.debugId])return t;H[t.debugId]=!0;var r=t.context,i=c(t),a=f._A.Promise;return a&&function(){function e(r){var n=t.context(),o=i(r,"executor-",n,null,!1);const s=Reflect.construct(a,[o],e);return t.context(s).getCtx=function(){return n},s}f._A.Promise=e,Object.defineProperty(e,"name",{value:"Promise"}),e.toString=function(){return a.toString()},Object.setPrototypeOf(e,a),["all","race"].forEach((function(r){const n=a[r];e[r]=function(e){let i=!1;
59[...e||[]].forEach((e=>{this.resolve(e).then(a("all"===r),a(!1))}));const o=n.apply(this,arguments);return o;function a(e){return function(){t.emit("propagate",[null,!i],o,!1,!1),i=i||!e}}}})),["resolve","reject"].forEach((function(r){const n=a[r];e[r]=function(e){const r=n.apply(this,arguments);return e!==r&&t.emit("propagate",[e,!0],r,!1,!1),r}})),e.prototype=a.prototype;const n=a.prototype.then;a.prototype.then=function(){var e=this,o=r(e);o.promise=e;for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];s[0]=i(s[0],"cb-",o,null,!1),s[1]=i(s[1],"cb-",o,null,!1);const u=n.apply(this,s);return o.nextPromise=u,t.emit("propagate",[e,!0],u,!1,!1),u},a.prototype.then[o]=n,t.on("executor-start",(function(e){e[0]=i(e[0],"resolve-",this,null,!1),e[1]=i(e[1],"resolve-",this,null,!1)})),t.on("executor-err",(function(e,t,r){e[1](r)})),t.on("cb-end",(function(e,r,n){t.emit("propagate",[n,!0],this.nextPromise,!1,!1)})),t.on("propagate",(function(e,r,n){this.getCtx&&!r||(this.getCtx=function(){if(e instanceof Promise)var r=t.context(e);return r&&r.getCtx?r.getCtx():this})}))}(),t}const U={},z="setTimeout",F="setInterval",B="clearTimeout",G="-start",q="-",V=[z,"setImmediate",F,B,"clearImmediate"];function Z(e){const t=function(e){return(e||n.ee).get("timer")}(e);if(U[t.debugId]++)return t;U[t.debugId]=1;var r=c(t);return r.inPlace(f._A,V.slice(0,2),z+q),r.inPlace(f._A,V.slice(2,3),F+q),r.inPlace(f._A,V.slice(3),B+q),t.on(F+G,(function(e,t,n){e[0]=r(e[0],"fn-",null,n)})),t.on(z+G,(function(e,t,n){this.method=n,this.timerDuration=isNaN(e[1])?0:+e[1],e[0]=r(e[0],"fn-",this,n)})),t}var K=r(50);const W={},X=["open","send"];function Y(e){var t=e||n.ee;const r=function(e){return(e||n.ee).get("xhr")}(t);if(W[r.debugId]++)return r;W[r.debugId]=1,b(t);var i=c(r),o=f._A.XMLHttpRequest,a=f._A.MutationObserver,s=f._A.Promise,u=f._A.setInterval,d="readystatechange",l=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"],h=[],p=f._A.XMLHttpRequest=function(e){const t=new o(e),n=r.context(t);try{r.emit("new-xhr",[t],n),t.addEventListener(d,(a=n,function(){var e=this;e.readyState>3&&!a.resolved&&(a.resolved=!0,r.emit("xhr-resolved",[],e)),i.inPlace(e,l,"fn-",E)}),(0,I.m$)(!1))}catch(e){(0,K.Z)("An error occurred while intercepting XHR",e);try{r.emit("internal-error",[e])}catch(e){}}var a;return t};function g(e,t){i.inPlace(t,["onreadystatechange"],"fn-",E)}if(function(e,t){for(var r in e)t[r]=e[r]}(o,p),p.prototype=o.prototype,i.inPlace(p.prototype,X,"-xhr-",E),r.on("send-xhr-start",(function(e,t){g(e,t),function(e){h.push(e),a&&(m?m.then(A):u?u(A):(v=-v,y.data=v))}(t)})),r.on("open-xhr-start",g),a){var m=s&&s.resolve();if(!u&&!s){var v=1,y=document.createTextNode(v);new a(A).observe(y,{characterData:!0})}}else t.on("fn-end",(function(e){e[0]&&e[0].type===d||A()}));function A(){for(var e=0;e<h.length;e++)g(0,h[e]);h.length&&(h=[])}function E(e,t){return t}return r}},7825:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const n=r(3325).D.ajax},6660:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const n=r(3325).D.jserrors},3081:(e,t,r)=>{"use strict";r.d(t,{gF:()=>o,mY:()=>i,t9:()=>n,vz:()=>s,xS:()=>a});const n=r(3325).D.metrics,i="sm",o="cm",a="storeSupportabilityMetrics",s="storeEventMetrics"},4649:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const n=r(3325).D.pageAction},7633:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const n=r(3325).D.pageViewEvent},9251:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const n=r(3325).D.pageViewTiming},7144:(e,t,r)=>{"use strict";r.d(t,{Ef:()=>o,J0:()=>f,Mi:()=>l,Vb:()=>a,Ye:()=>c,fm:()=>u,i9:()=>s,t9:()=>i,u0:()=>d});var n=r(7056);const i=r(3325).D.sessionReplay,o={RECORD:"recordReplay",PAUSE:"pauseReplay",REPLAY_RUNNING:"replayRunning",ERROR_DURING_REPLAY:"errorDuringReplay"},a=.12,s={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5},c=1e6,u=64e3,d={[n.IK.ERROR]:15e3,[n.IK.FULL]:3e5,[n.IK.OFF]:0},l={RESET:{message:"Session was reset",sm:"Reset"},IMPORT:{message:"Recorder failed to import",sm:"Import"},TOO_MANY:{message:"429: Too Many Requests",sm:"Too-Many"},TOO_BIG:{message:"Payload was too large",sm:"Too-Big"},CROSS_TAB:{message:"Session Entity was set to OFF on another tab",sm:"Cross-Tab"},ENTITLEMENTS:{message:"Session Replay is not allowed and will not be started",sm:"Entitlement"}},f=5e3},3112:(e,t,r)=>{"use strict";r.d(t,{HM:()=>c,ev:()=>o,rU:()=>s,wi:()=>u});var n=r(234),i=r(385);function o(e){return i.il&&!0===(0,n.Mt)(e,"privacy.cookies_enabled")}function a(e){return!!n.Yu.MO&&o(e)&&!0===(0,n.Mt)(e,"session_trace.enabled")}function s(e){return!0===(0,n.Mt)(e,"session_replay.preload")&&a(e)}function c(e,t){return!!a(e)&&(!!t?.isNew||!!t?.state.sessionReplayMode)}function u(e,t){const r=t.correctAbsoluteTimestamp(e);return{originalTimestamp:e,correctedTimestamp:r,timestampDiff:e-r,originTime:i.sK,correctedOriginTime:t.correctedOriginTime,originTimeDiff:Math.floor(i.sK-t.correctedOriginTime)}}},3614:(e,t,r)=>{"use strict";r.d(t,{BST_RESOURCE:()=>i,END:()=>s,FEATURE_NAME:()=>n,FN_END:()=>u,FN_START:()=>c,PUSH_STATE:()=>d,RESOURCE:()=>o,START:()=>a});const n=r(3325).D.sessionTrace,i="bstResource",o="resource",a="-start",s="-end",c="fn"+a,u="fn"+s,d="pushState"},6216:(e,t,r)=>{"use strict";r.d(t,{K8:()=>s,QZ:()=>c,cS:()=>o,sE:()=>i,t9:()=>a,vh:()=>u});var n=r(3325);const i=["click","keydown","submit"],o="api",a=n.D.softNav,s={INITIAL_PAGE_LOAD:"",ROUTE_CHANGE:1,UNSPECIFIED:2},c={INTERACTION:1,AJAX:2,CUSTOM_END:3,CUSTOM_TRACER:4},u={IP:"in progress",FIN:"finished",CAN:"cancelled"}},7836:(e,t,r)=>{"use strict";r.d(t,{BODY:()=>w,CB_END:()=>_,CB_START:()=>u,END:()=>E,FEATURE_NAME:()=>i,FETCH:()=>R,FETCH_BODY:()=>v,FETCH_DONE:()=>m,FETCH_START:()=>g,FN_END:()=>c,FN_START:()=>s,INTERACTION:()=>f,INTERACTION_API:()=>d,INTERACTION_EVENTS:()=>o,JSONP_END:()=>b,JSONP_NODE:()=>p,JS_TIME:()=>x,MAX_TIMER_BUDGET:()=>a,REMAINING:()=>l,SPA_NODE:()=>h,START:()=>A,originalSetTimeout:()=>y});var n=r(234);
59const i=r(3325).D.spa,o=["click","submit","keypress","keydown","keyup","change"],a=999,s="fn-start",c="fn-end",u="cb-start",d="api-ixn-",l="remaining",f="interaction",h="spaNode",p="jsonpNode",g="fetch-start",m="fetch-done",v="fetch-body-",b="jsonp-end",y=n.Yu.ST,A="-start",E="-end",w="-body",_="cb"+E,x="jsTime",R="fetch"},5938:(e,t,r)=>{"use strict";r.d(t,{W:()=>i});var n=r(8325);class i{constructor(e,t,r){this.agentIdentifier=e,this.aggregator=t,this.ee=n.ee.get(e),this.featureName=r,this.blocked=!1}}},2758:(e,t,r)=>{"use strict";r.d(t,{j:()=>_});var n=r(3325),i=r(234),o=r(5546),a=r(8325),s=r(8e3),c=r(3960),u=r(385),d=r(50),l=r(3081),f=r(8632),h=r(7144);const p=["setErrorHandler","finished","addToTrace","addRelease","addPageAction","setCurrentRouteName","setPageViewName","setCustomAttribute","interaction","noticeError","setUserId","setApplicationVersion","start","recordReplay","pauseReplay",h.Ef.RECORD,h.Ef.PAUSE],g=["setErrorHandler","finished","addToTrace","addRelease"];var m=r(7894),v=r(7056);function b(){const e=(0,f.gG)();p.forEach((t=>{e[t]=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];let o=[];return Object.values(e.initializedAgents).forEach((e=>{e.exposed&&e.api[t]&&o.push(e.api[t](...n))})),o.length>1?o:o[0]}(t,...n)}}))}const y={};var A=r(2825);const E=e=>{const t=e.startsWith("http");e+="/",r.p=t?e:"https://"+e};let w=!1;function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=arguments.length>2?arguments[2]:void 0,_=arguments.length>3?arguments[3]:void 0,{init:x,info:R,loader_config:T,runtime:S={loaderType:p},exposed:N=!0}=t;const D=(0,f.gG)();R||(x=D.init,R=D.info,T=D.loader_config),(0,i.Dg)(e.agentIdentifier,x||{}),(0,i.GE)(e.agentIdentifier,T||{}),R.jsAttributes??={},u.v6&&(R.jsAttributes.isWorker=!0),(0,i.CX)(e.agentIdentifier,R);const O=(0,i.P_)(e.agentIdentifier),I=[R.beacon,R.errorBeacon];w||(O.proxy.assets&&(E(O.proxy.assets),I.push(O.proxy.assets)),O.proxy.beacon&&I.push(O.proxy.beacon),b(),(0,f.EZ)("activatedFeatures",A.T),e.runSoftNavOverSpa&&=!0===O.soft_navigations.enabled&&O.feature_flags.includes("soft_nav")),S.denyList=[...O.ajax.deny_list||[],...O.ajax.block_internal?I:[]],(0,i.sU)(e.agentIdentifier,S),void 0===e.api&&(e.api=function(e,t){let f=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(0,s.RP)(e,"api");const p={};var b=a.ee.get(e),A=b.get("tracer");y[e]=v.IK.OFF,b.on(h.Ef.REPLAY_RUNNING,(t=>{y[e]=t}));var E="api-",w=E+"ixn-";function _(t,r,n,o){const a=(0,i.C5)(e);return null===r?delete a.jsAttributes[t]:(0,i.CX)(e,{...a,jsAttributes:{...a.jsAttributes,[t]:r}}),T(E,n,!0,o||null===r?"session":void 0)(t,r)}function x(){}g.forEach((e=>{p[e]=T(E,e,!0,"api")})),p.addPageAction=T(E,"addPageAction",!0,n.D.pageAction),p.setPageViewName=function(t,r){if("string"==typeof t)return"/"!==t.charAt(0)&&(t="/"+t),(0,i.OP)(e).customTransaction=(r||"http://custom.transaction")+t,T(E,"setPageViewName",!0)()},p.setCustomAttribute=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"==typeof e){if(["string","number","boolean"].includes(typeof t)||null===t)return _(e,t,"setCustomAttribute",r);(0,d.Z)("Failed to execute setCustomAttribute.\nNon-null value must be a string, number or boolean type, but a type of <".concat(typeof t,"> was provided."))}else(0,d.Z)("Failed to execute setCustomAttribute.\nName must be a string type, but a type of <".concat(typeof e,"> was provided."))},p.setUserId=function(e){if("string"==typeof e||null===e)return _("enduser.id",e,"setUserId",!0);(0,d.Z)("Failed to execute setUserId.\nNon-null value must be a string type, but a type of <".concat(typeof e,"> was provided."))},p.setApplicationVersion=function(e){if("string"==typeof e||null===e)return _("application.version",e,"setApplicationVersion",!1);(0,d.Z)("Failed to execute setApplicationVersion. Expected <String | null>, but got <".concat(typeof e,">."))},p.start=e=>{try{const t=e?"defined":"undefined";(0,o.p)(l.xS,["API/start/".concat(t,"/called")],void 0,n.D.metrics,b);const r=Object.values(n.D);if(void 0===e)e=r;else{if((e=Array.isArray(e)&&e.length?e:[e]).some((e=>!r.includes(e))))return(0,d.Z)("Invalid feature name supplied. Acceptable feature names are: ".concat(r));e.includes(n.D.pageViewEvent)||e.push(n.D.pageViewEvent)}e.forEach((e=>{b.emit("".concat(e,"-opt-in"))}))}catch(e){(0,d.Z)("An unexpected issue occurred",e)}},p[h.Ef.RECORD]=function(){(0,o.p)(l.xS,["API/recordReplay/called"],void 0,n.D.metrics,b),(0,o.p)(h.Ef.RECORD,[],void 0,n.D.sessionReplay,b)},p[h.Ef.PAUSE]=function(){(0,o.p)(l.xS,["API/pauseReplay/called"],void 0,n.D.metrics,b),(0,o.p)(h.Ef.PAUSE,[],void 0,n.D.sessionReplay,b)},p.interaction=function(e){return(new x).get("object"==typeof e?e:{})};const R=x.prototype={createTracer:function(e,t){var r={},i=this,a="function"==typeof t;return(0,o.p)(l.xS,["API/createTracer/called"],void 0,n.D.metrics,b),f||(0,o.p)(w+"tracer",[(0,m.z)(),e,r],i,n.D.spa,b),function(){if(A.emit((a?"":"no-")+"fn-start",[(0,m.z)(),i,a],r),a)try{return t.apply(this,arguments)}catch(e){throw A.emit("fn-err",[arguments,this,e],r),e}finally{A.emit("fn-end",[(0,m.z)()],r)}}}};
59function T(e,t,r,i){return function(){return(0,o.p)(l.xS,["API/"+t+"/called"],void 0,n.D.metrics,b),i&&(0,o.p)(e+t,[(0,m.z)(),...arguments],r?null:this,i,b),r?void 0:this}}function S(){r.e(111).then(r.bind(r,7438)).then((t=>{let{setAPI:r}=t;r(e),(0,s.LP)(e,"api")})).catch((()=>{(0,d.Z)("Downloading runtime APIs failed..."),b.abort()}))}return["actionText","setName","setAttribute","save","ignore","onEnd","getContext","end","get"].forEach((e=>{R[e]=T(w,e,void 0,f?n.D.softNav:n.D.spa)})),p.setCurrentRouteName=f?T(w,"routeName",void 0,n.D.softNav):T(E,"routeName",!0,n.D.spa),p.noticeError=function(t,r){"string"==typeof t&&(t=new Error(t)),(0,o.p)(l.xS,["API/noticeError/called"],void 0,n.D.metrics,b),(0,o.p)("err",[t,(0,m.z)(),!1,r,!!y[e]],void 0,n.D.jserrors,b)},u.il?(0,c.b2)((()=>S()),!0):S(),p}(e.agentIdentifier,_,e.runSoftNavOverSpa)),void 0===e.exposed&&(e.exposed=N),w=!0}},8993:(e,t,r)=>{r.nc=(()=>{try{return document?.currentScript?.nonce}catch(e){}return""})()},3325:(e,t,r)=>{"use strict";r.d(t,{D:()=>n,p:()=>i});const n={ajax:"ajax",jserrors:"jserrors",metrics:"metrics",pageAction:"page_action",pageViewEvent:"page_view_event",pageViewTiming:"page_view_timing",sessionReplay:"session_replay",sessionTrace:"session_trace",softNav:"soft_navigations",spa:"spa"},i={[n.pageViewEvent]:1,[n.pageViewTiming]:2,[n.metrics]:3,[n.jserrors]:4,[n.ajax]:5,[n.sessionTrace]:6,[n.pageAction]:7,[n.spa]:8,[n.softNav]:9,[n.sessionReplay]:10}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.m=r,i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>({111:"nr-spa",164:"nr-spa-compressor",433:"nr-spa-recorder"}[e]+"-1.258.0.min.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="NRBA-1.258.0.PROD:",i.l=(r,n,o,a)=>{if(e[r])e[r].push(n);else{var s,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var l=u[d];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+o){s=l;break}}if(!s){c=!0;var f={111:"sha512-VtcT/3vIpW0x3W7ieQKwIH5KCShV9/dJHKD8JDZpMi1DtDM1KBlgK6h6U/hvYr6wqcfN4VvuqQlDkanCOANUkA==",433:"sha512-zsJmns7m1GrWgTuGcWUxWULNb2v8EUHy6YX29uu/BPAQ50QyBWsfbEr7/GNp3IQAc2uKUHv8dQeYZrpeA1rdTA==",164:"sha512-rXGHK+coMfbak2EBAE5UkG05IbDCXC9QOiDR23+yIeiNoHwYZbthicTQdCmXlvFPLQv8ujFjuFtieQmCv/pcEQ=="};(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+o),s.src=r,0!==s.src.indexOf(window.location.origin+"/")&&(s.crossOrigin="anonymous"),f[a]&&(s.integrity=f[a])}e[r]=[n];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(p);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),c&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://js-agent.newrelic.com/",(()=>{var e={801:0,92:0};i.f.j=(t,r)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[a,s,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);if(c)c(i)}for(t&&t(r);u<a.length;u++)o=a[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self["webpackChunk:NRBA-1.258.0.PROD"]=self["webpackChunk:NRBA-1.258.0.PROD"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";i(8993);var e=i(50),t=i(7144),r=i(4402);class n{agentIdentifier;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.ky)(16);this.agentIdentifier=e}#e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if("function"==typeof this.api?.[t])return this.api[t](...n);(0,e.Z)("Call to agent api ".concat(t," failed. The API is not currently initialized."))}addPageAction(e,t){return this.#e("addPageAction",e,t)}setPageViewName(e,t){return this.#e("setPageViewName",e,t)}setCustomAttribute(e,t,r){return this.#e("setCustomAttribute",e,t,r)}noticeError(e,t){return this.#e("noticeError",e,t)}setUserId(e){return this.#e("setUserId",e)}setApplicationVersion(e){return this.#e("setApplicationVersion",e)}setErrorHandler(e){return this.#e("setErrorHandler",e)}finished(e){return this.#e("finished",e)}addRelease(e,t){return this.#e("addRelease",e,t)}start(e){return this.#e("start",e)}recordReplay(){return this.#e(t.Ef.RECORD)}pauseReplay(){return this.#e(t.Ef.PAUSE)}addToTrace(e){return this.#e("addToTrace",e)}setCurrentRouteName(e){return this.#e("setCurrentRouteName",e)}interaction(){return this.#e("interaction")}}var o=i(3325),a=i(234);const s=Object.values(o.D);function c(e){const t={};
59return s.forEach((r=>{t[r]=function(e,t){return!0===(0,a.Mt)(t,"".concat(e,".enabled"))}(r,e)})),t}var u=i(2758);var d=i(8e3),l=i(5938),f=i(3960),h=i(385),p=i(3112),g=i(7872);class m extends l.W{constructor(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];super(e,t,r),this.auto=n,this.abortHandler=void 0,this.featAggregate=void 0,this.onAggregateImported=void 0,!1===(0,a.Mt)(this.agentIdentifier,"".concat(this.featureName,".autoStart"))&&(this.auto=!1),this.auto?(0,d.RP)(e,r):this.ee.on("".concat(this.featureName,"-opt-in"),(0,g.Z)((()=>{(0,d.RP)(this.agentIdentifier,this.featureName),this.auto=!0,this.importAggregator()})))}importAggregator(){let t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.featAggregate||!this.auto)return;this.onAggregateImported=new Promise((e=>{t=e}));const n=async()=>{let n;try{if((0,p.ev)(this.agentIdentifier)){const{setupAgentSession:e}=await i.e(111).then(i.bind(i,9446));n=e(this.agentIdentifier)}}catch(t){(0,e.Z)("A problem occurred when starting up session manager. This page will not start or extend any session.",t),this.featureName===o.D.sessionReplay&&this.abortHandler?.()}try{if(!this.#t(this.featureName,n))return(0,d.LP)(this.agentIdentifier,this.featureName),void t(!1);const{lazyFeatureLoader:e}=await i.e(111).then(i.bind(i,8582)),{Aggregate:o}=await e(this.featureName,"aggregate");this.featAggregate=new o(this.agentIdentifier,this.aggregator,r),t(!0)}catch(r){(0,e.Z)("Downloading and initializing ".concat(this.featureName," failed..."),r),this.abortHandler?.(),(0,d.LP)(this.agentIdentifier,this.featureName,!0),t(!1),this.ee&&this.ee.abort()}};h.il?(0,f.b2)((()=>n()),!0):n()}#t(e,t){return e!==o.D.sessionReplay||(0,p.HM)(this.agentIdentifier,t)}}var v=i(7633);class b extends m{static featureName=v.t;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,t,v.t,r),this.importAggregator()}}var y=i(1117),A=i(1284);class E extends y.w{constructor(e){super(e),this.aggregatedData={}}store(e,t,r,n,i){var o=this.getBucket(e,t,r,i);return o.metrics=function(e,t){t||(t={count:0});return t.count+=1,(0,A.D)(e,(function(e,r){t[e]=w(r,t[e])})),t}(n,o.metrics),o}merge(e,t,r,n,i){var o=this.getBucket(e,t,n,i);if(o.metrics){var a=o.metrics;a.count+=r.count,(0,A.D)(r,(function(e,t){if("count"!==e){var n=a[e],i=r[e];i&&!i.c?a[e]=w(i.t,n):a[e]=function(e,t){if(!t)return e;t.c||(t=_(t.t));return t.min=Math.min(e.min,t.min),t.max=Math.max(e.max,t.max),t.t+=e.t,t.sos+=e.sos,t.c+=e.c,t}(i,a[e])}}))}else o.metrics=r}storeMetric(e,t,r,n){var i=this.getBucket(e,t,r);return i.stats=w(n,i.stats),i}getBucket(e,t,r,n){this.aggregatedData[e]||(this.aggregatedData[e]={});var i=this.aggregatedData[e][t];return i||(i=this.aggregatedData[e][t]={params:r||{}},n&&(i.custom=n)),i}get(e,t){return t?this.aggregatedData[e]&&this.aggregatedData[e][t]:this.aggregatedData[e]}take(e){for(var t={},r="",n=!1,i=0;i<e.length;i++)t[r=e[i]]=Object.values(this.aggregatedData[r]||{}),t[r].length&&(n=!0),delete this.aggregatedData[r];return n?t:null}}function w(e,t){return null==e?function(e){e?e.c++:e={c:1};return e}(t):t?(t.c||(t=_(t.t)),t.c+=1,t.t+=e,t.sos+=e*e,e>t.max&&(t.max=e),e<t.min&&(t.min=e),t):{t:e}}function _(e){return{t:e,min:e,max:e,sos:e*e,c:1}}var x=i(8632),R=i(4351);var T=i(5546),S=i(7956),N=i(3239),D=i(9251),O=i(7894);class I extends m{static featureName=D.t;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,t,D.t,r),h.il&&((0,S.N)((()=>(0,T.p)("docHidden",[(0,O.z)()],void 0,D.t,this.ee)),!0),(0,N.bP)("pagehide",(()=>(0,T.p)("winPagehide",[(0,O.z)()],void 0,D.t,this.ee))),this.importAggregator())}}var P=i(3081);class C extends m{static featureName=P.t9;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,t,P.t9,r),this.importAggregator()}}var j=i(6660);class k{constructor(e,t,r,n){this.name="UncaughtError",this.message=e,this.sourceURL=t,this.line=r,this.column=n}}class M extends m{static featureName=j.t;#r=new Set;#n=!1;constructor(e,r){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,r,j.t,n);try{this.removeOnAbort=new AbortController}catch(e){}this.ee.on("fn-err",((e,t,r)=>{this.abortHandler&&!this.#r.has(r)&&(this.#r.add(r),(0,T.p)("err",[this.#i(r),(0,O.z)()],void 0,o.D.jserrors,this.ee))})),this.ee.on("internal-error",(e=>{this.abortHandler&&(0,T.p)("ierr",[this.#i(e),(0,O.z)(),!0,{},this.#n],void 0,o.D.jserrors,this.ee)})),this.ee.on(t.Ef.REPLAY_RUNNING,(e=>{this.#n=e})),h._A.addEventListener("unhandledrejection",(e=>{this.abortHandler&&(0,T.p)("err",[this.#o(e),(0,O.z)(),!1,{unhandledPromiseRejection:1},this.#n],void 0,o.D.jserrors,this.ee)}),(0,N.m$)(!1,this.removeOnAbort?.signal)),h._A.addEventListener("error",(e=>{this.abortHandler&&(this.#r.has(e.error)?this.#r.delete(e.error):(0,T.p)("err",[this.#a(e),(0,O.z)(),!1,{},this.#n],void 0,o.D.jserrors,this.ee))}),(0,N.m$)(!1,this.removeOnAbort?.signal)),this.abortHandler=this.#s,this.importAggregator()}#s(){this.removeOnAbort?.abort(),this.#r.clear(),this.abortHandler=void 0}#i(e){return e instanceof Error?e:void 0!==e?.message?new k(e.message,e.filename||e.sourceURL,e.lineno||e.line,e.colno||e.col):new k("string"==typeof e?e:(0,R.P)(e))}#o(e){let t="Unhandled Promise Rejection: ";if(e?.reason instanceof Error)try{return e.reason.message=t+e.reason.message,e.reason}catch(t){return e.reason}if(void 0===e.reason)return new k(t);const r=this.#i(e.reason);return r.message=t+r.message,r}#a(e){if(e.error instanceof SyntaxError&&!/:\d+$/.test(e.error.stack?.trim())){const t=new k(e.message,e.filename,e.lineno,e.colno);return t.name=SyntaxError.name,t}return e.error instanceof Error?e.error:new k(e.message,e.filename,e.lineno,e.colno)}}var H=i(2210);let L=1;const U="nr@id";function z(e){const t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===h._A?0:(0,H.X)(e,U,(function(){return L++}))}function F(e){if("string"==typeof e&&e.length)return e.length;if("object"==typeof e){if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer&&e.byteLength)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob&&e.size)return e.size;if(!("undefined"!=typeof FormData&&e instanceof FormData))try{return(0,R.P)(e).length}catch(e){return}}}var B=i(7806),G=i(7243);class q{constructor(e){this.agentIdentifier=e}generateTracePayload(e){if(!this.shouldGenerateTrace(e))return null;var t=(0,a.DL)(this.agentIdentifier);if(!t)return null;var n=(t.accountID||"").toString()||null,i=(t.agentID||"").toString()||null,o=(t.trustKey||"").toString()||null;if(!n||!i)return null;var s=(0,r.M)(),c=(0,r.Ht)(),u=Date.now(),d={spanId:s,traceId:c,timestamp:u};return(e.sameOrigin||this.isAllowedOrigin(e)&&this.useTraceContextHeadersForCors())&&(d.traceContextParentHeader=this.generateTraceContextParentHeader(s,c),d.traceContextStateHeader=this.generateTraceContextStateHeader(s,u,n,i,o)),(e.sameOrigin&&!this.excludeNewrelicHeader()||!e.sameOrigin&&this.isAllowedOrigin(e)&&this.useNewrelicHeaderForCors())&&(d.newrelicHeader=this.generateTraceHeader(s,c,u,n,i,o)),d}generateTraceContextParentHeader(e,t){return"00-"+t+"-"+e+"-01"}generateTraceContextStateHeader(e,t,r,n,i){return i+"@nr=0-1-"+r+"-"+n+"-"+e+"----"+t}generateTraceHeader(e,t,r,n,i,o){if(!("function"==typeof h._A?.btoa))return null;var a={v:[0,1],d:{ty:"Browser",ac:n,ap:i,id:e,tr:t,ti:r}};return o&&n!==o&&(a.d.tk=o),btoa((0,R.P)(a))}shouldGenerateTrace(e){return this.isDtEnabled()&&this.isAllowedOrigin(e)}isAllowedOrigin(e){var t=!1,r={};if((0,a.Mt)(this.agentIdentifier,"distributed_tracing")&&(r=(0,a.P_)(this.agentIdentifier).distributed_tracing),e.sameOrigin)t=!0;else if(r.allowed_origins instanceof Array)for(var n=0;n<r.allowed_origins.length;n++){var i=(0,G.e)(r.allowed_origins[n]);if(e.hostname===i.hostname&&e.protocol===i.protocol&&e.port===i.port){t=!0;break}}return t}isDtEnabled(){var e=(0,a.Mt)(this.agentIdentifier,"distributed_tracing");return!!e&&!!e.enabled}excludeNewrelicHeader(){var e=(0,a.Mt)(this.agentIdentifier,"distributed_tracing");return!!e&&!!e.exclude_newrelic_header}useNewrelicHeaderForCors(){var e=(0,a.Mt)(this.agentIdentifier,"distributed_tracing");return!!e&&!1!==e.cors_use_newrelic_header}useTraceContextHeadersForCors(){var e=(0,a.Mt)(this.agentIdentifier,"distributed_tracing");return!!e&&!!e.cors_use_tracecontext_headers}}var V=i(7825),Z=["load","error","abort","timeout"],K=Z.length,W=a.Yu.REQ,X=a.Yu.XHR;class Y extends m{static featureName=V.t;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,t,V.t,r),this.dt=new q(e),this.handler=(e,t,r,n)=>(0,T.p)(e,t,r,n,this.ee);try{const e={xmlhttprequest:"xhr",fetch:"fetch",beacon:"beacon"};h._A?.performance?.getEntriesByType("resource").forEach((t=>{if(t.initiatorType in e&&0!==t.responseStatus){const r={status:t.responseStatus},n={rxSize:t.transferSize,duration:Math.floor(t.duration),cbTime:0};J(r,t.name),this.handler("xhr",[r,n,t.startTime,t.responseEnd,e[t.initiatorType]],void 0,o.D.ajax)}}))}catch(e){}(0,B.u5)(this.ee),(0,B.Kf)(this.ee),function(e,t,r,n){function i(e){var t=this;t.totalCbs=0,t.called=0,t.cbTime=0,t.end=w,t.ended=!1,t.xhrGuids={},t.lastSize=null,t.loadCaptureCalled=!1,t.params=this.params||{},t.metrics=this.metrics||{},e.addEventListener("load",(function(r){_(t,e)}),(0,N.m$)(!1)),h.IF||e.addEventListener("progress",(function(e){t.lastSize=e.loaded}),(0,N.m$)(!1))}function s(e){this.params={method:e[0]},J(this,e[1]),this.metrics={}}function c(t,r){var i=(0,a.DL)(e);i.xpid&&this.sameOrigin&&r.setRequestHeader("X-NewRelic-ID",i.xpid);var o=n.generateTracePayload(this.parsedOrigin);if(o){var s=!1;o.newrelicHeader&&(r.setRequestHeader("newrelic",o.newrelicHeader),s=!0),o.traceContextParentHeader&&(r.setRequestHeader("traceparent",o.traceContextParentHeader),o.traceContextStateHeader&&r.setRequestHeader("tracestate",o.traceContextStateHeader),s=!0),s&&(this.dt=o)}}function u(e,r){var n=this.metrics,i=e[0],o=this;if(n&&i){var a=F(i);a&&(n.txSize=a)}this.startTime=(0,O.z)(),this.body=i,this.listener=function(e){try{"abort"!==e.type||o.loadCaptureCalled||(o.params.aborted=!0),("load"
59!==e.type||o.called===o.totalCbs&&(o.onloadCalled||"function"!=typeof r.onload)&&"function"==typeof o.end)&&o.end(r)}catch(e){try{t.emit("internal-error",[e])}catch(e){}}};for(var s=0;s<K;s++)r.addEventListener(Z[s],this.listener,(0,N.m$)(!1))}function d(e,t,r){this.cbTime+=e,t?this.onloadCalled=!0:this.called+=1,this.called!==this.totalCbs||!this.onloadCalled&&"function"==typeof r.onload||"function"!=typeof this.end||this.end(r)}function l(e,t){var r=""+z(e)+!!t;this.xhrGuids&&!this.xhrGuids[r]&&(this.xhrGuids[r]=!0,this.totalCbs+=1)}function f(e,t){var r=""+z(e)+!!t;this.xhrGuids&&this.xhrGuids[r]&&(delete this.xhrGuids[r],this.totalCbs-=1)}function p(){this.endTime=(0,O.z)()}function g(e,r){r instanceof X&&"load"===e[0]&&t.emit("xhr-load-added",[e[1],e[2]],r)}function m(e,r){r instanceof X&&"load"===e[0]&&t.emit("xhr-load-removed",[e[1],e[2]],r)}function v(e,t,r){t instanceof X&&("onload"===r&&(this.onload=!0),("load"===(e[0]&&e[0].type)||this.onload)&&(this.xhrCbStart=(0,O.z)()))}function b(e,r){this.xhrCbStart&&t.emit("xhr-cb-time",[(0,O.z)()-this.xhrCbStart,this.onload,r],r)}function y(e){var t,r=e[1]||{};if("string"==typeof e[0]?0===(t=e[0]).length&&h.il&&(t=""+h._A.location.href):e[0]&&e[0].url?t=e[0].url:h._A?.URL&&e[0]&&e[0]instanceof URL?t=e[0].href:"function"==typeof e[0].toString&&(t=e[0].toString()),"string"==typeof t&&0!==t.length){t&&(this.parsedOrigin=(0,G.e)(t),this.sameOrigin=this.parsedOrigin.sameOrigin);var i=n.generateTracePayload(this.parsedOrigin);if(i&&(i.newrelicHeader||i.traceContextParentHeader))if(e[0]&&e[0].headers)s(e[0].headers,i)&&(this.dt=i);else{var o={};for(var a in r)o[a]=r[a];o.headers=new Headers(r.headers||{}),s(o.headers,i)&&(this.dt=i),e.length>1?e[1]=o:e.push(o)}}function s(e,t){var r=!1;return t.newrelicHeader&&(e.set("newrelic",t.newrelicHeader),r=!0),t.traceContextParentHeader&&(e.set("traceparent",t.traceContextParentHeader),t.traceContextStateHeader&&e.set("tracestate",t.traceContextStateHeader),r=!0),r}}function A(e,t){this.params={},this.metrics={},this.startTime=(0,O.z)(),this.dt=t,e.length>=1&&(this.target=e[0]),e.length>=2&&(this.opts=e[1]);var r,n=this.opts||{},i=this.target;"string"==typeof i?r=i:"object"==typeof i&&i instanceof W?r=i.url:h._A?.URL&&"object"==typeof i&&i instanceof URL&&(r=i.href),J(this,r);var o=(""+(i&&i instanceof W&&i.method||n.method||"GET")).toUpperCase();this.params.method=o,this.body=n.body,this.txSize=F(n.body)||0}function E(e,t){var n;this.endTime=(0,O.z)(),this.params||(this.params={}),this.params.status=t?t.status:0,"string"==typeof this.rxSize&&this.rxSize.length>0&&(n=+this.rxSize);var i={txSize:this.txSize,rxSize:n,duration:(0,O.z)()-this.startTime};r("xhr",[this.params,i,this.startTime,this.endTime,"fetch"],this,o.D.ajax)}function w(e){var t=this.params,n=this.metrics;if(!this.ended){this.ended=!0;for(var i=0;i<K;i++)e.removeEventListener(Z[i],this.listener,!1);t.aborted||(n.duration=(0,O.z)()-this.startTime,this.loadCaptureCalled||4!==e.readyState?null==t.status&&(t.status=0):_(this,e),n.cbTime=this.cbTime,r("xhr",[t,n,this.startTime,this.endTime,"xhr"],this,o.D.ajax))}}function _(e,r){e.params.status=r.status;var n=function(e,t){var r=e.responseType;return"json"===r&&null!==t?t:"arraybuffer"===r||"blob"===r||"json"===r?F(e.response):"text"===r||""===r||void 0===r?F(e.responseText):void 0}(r,e.lastSize);if(n&&(e.metrics.rxSize=n),e.sameOrigin){var i=r.getResponseHeader("X-NewRelic-App-Data");i&&((0,T.p)(P.mY,["Ajax/CrossApplicationTracing/Header/Seen"],void 0,o.D.metrics,t),e.params.cat=i.split(", ").pop())}e.loadCaptureCalled=!0}t.on("new-xhr",i),t.on("open-xhr-start",s),t.on("open-xhr-end",c),t.on("send-xhr-start",u),t.on("xhr-cb-time",d),t.on("xhr-load-added",l),t.on("xhr-load-removed",f),t.on("xhr-resolved",p),t.on("addEventListener-end",g),t.on("removeEventListener-end",m),t.on("fn-end",b),t.on("fetch-before-start",y),t.on("fetch-start",A),t.on("fn-start",v),t.on("fetch-done",E)}(e,this.ee,this.handler,this.dt),this.importAggregator()}}function J(e,t){var r=(0,G.e)(t),n=e.params||e;n.hostname=r.hostname,n.port=r.port,n.protocol=r.protocol,n.host=r.hostname+":"+r.port,n.pathname=r.pathname,e.parsedOrigin=r,e.sameOrigin=r.sameOrigin}var Q=i(3614);const{BST_RESOURCE:ee,RESOURCE:te,START:re,END:ne,FEATURE_NAME:ie,FN_END:oe,FN_START:ae,PUSH_STATE:se}=Q;var ce=i(7056);class ue extends m{static featureName=t.t9;constructor(e,r){let n,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,r,t.t9,i),this.replayRunning=!1;try{n=JSON.parse(localStorage.getItem("".concat(ce.Bq,"_").concat(ce.K4)))}catch(e){}this.#c(n)?this.#u(n?.sessionReplayMode):this.importAggregator(),this.ee.on("err",(e=>{this.replayRunning&&(this.errorNoticed=!0,(0,T.p)(t.Ef.ERROR_DURING_REPLAY,[e],void 0,this.featureName,this.ee))})),this.ee.on(t.Ef.REPLAY_RUNNING,(e=>{this.replayRunning=e}))}#c(e){return e&&(e.sessionReplayMode===ce.IK.FULL||e.sessionReplayMode===ce.IK.ERROR)||(0,p.rU)(this.agentIdentifier)}async#u(e){const{Recorder:t}=await Promise.all([i.e(111),i.e(433)]).then(i.bind(i,4345));this.recorder=new t({mode:e,agentIdentifier:this.agentIdentifier,ee:this.ee}),this.recorder.startRecording(),this.abortHandler=this.recorder.stopRecording,this.importAggregator({recorder:this.recorder,errorNoticed:this.errorNoticed})}}var de=i(6216);class le extends m{static featureName=de.t9;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(super(e,t,de.t9,r),!h.il||!a.Yu.MO)return;const n=(0,B.QU)(this.ee),i=(0,B.em)(this.ee),o=()=>(0,T.p)("newURL",[(0,O.z)(),""+window.location],void 0,this.featureName,this.ee);n.on("pushState-end",o),n.on("replaceState-end",o);try{this.removeOnAbort=new AbortController}catch(e){}(0,N.bP)("popstate",(e=>(0,T.p)("newURL",[e.timeStamp,""+window.location],void 0,this.featureName,this.ee)),!0,this.removeOnAbort?.signal);let s=!1;const c=new a.Yu.MO(((e,t)=>{s||(s=!0,requestAnimationFrame((()=>{(0,T.p)("newDom",[(0,O.z)()],void 0,this.featureName,this.ee),s=!1})))})),u=(0,g.D)((e=>{(0,T.p)("newUIEvent",[e],void 0,this.featureName,this.ee),c.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}
59)}),100,{leading:!0});i.on("fn-start",(e=>{let[t]=e;de.sE.includes(t?.type)&&u(t)}));for(let e of de.sE)document.addEventListener(e,(()=>{}));this.abortHandler=function(){this.removeOnAbort?.abort(),c.disconnect(),this.abortHandler=void 0},this.importAggregator({domObserver:c})}}var fe=i(7836);const{FEATURE_NAME:he,START:pe,END:ge,BODY:me,CB_END:ve,JS_TIME:be,FETCH:ye,FN_START:Ae,CB_START:Ee,FN_END:we}=fe;var _e=i(4649);class xe extends m{static featureName=_e.t;constructor(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];super(e,t,_e.t,r),this.importAggregator()}}new class extends n{constructor(t,r){super(r),h._A?(this.sharedAggregator=new E({agentIdentifier:this.agentIdentifier}),this.features={},(0,x.h5)(this.agentIdentifier,this),this.desiredFeatures=new Set(t.features||[]),this.desiredFeatures.add(b),this.runSoftNavOverSpa=[...this.desiredFeatures].some((e=>e.featureName===o.D.softNav)),(0,u.j)(this,t,t.loaderType||"agent"),this.run()):(0,e.Z)("Failed to initialize the agent. Could not determine the runtime environment.")}get config(){return{info:this.info,init:this.init,loader_config:this.loader_config,runtime:this.runtime}}run(){try{const t=c(this.agentIdentifier),r=[...this.desiredFeatures];r.sort(((e,t)=>o.p[e.featureName]-o.p[t.featureName])),r.forEach((r=>{if(!t[r.featureName]&&r.featureName!==o.D.pageViewEvent)return;if(this.runSoftNavOverSpa&&r.featureName===o.D.spa)return;if(!this.runSoftNavOverSpa&&r.featureName===o.D.softNav)return;const n=function(e){switch(e){case o.D.ajax:return[o.D.jserrors];case o.D.sessionTrace:return[o.D.ajax,o.D.pageViewEvent];case o.D.sessionReplay:return[o.D.sessionTrace];case o.D.pageViewTiming:return[o.D.pageViewEvent];default:return[]}}(r.featureName);n.every((e=>e in this.features))||(0,e.Z)("".concat(r.featureName," is enabled but one or more dependent features has not been initialized (").concat((0,R.P)(n),"). This may cause unintended consequences or missing data...")),this.features[r.featureName]=new r(this.agentIdentifier,this.sharedAggregator)}))}catch(t){(0,e.Z)("Failed to initialize all enabled instrument classes (agent aborted) -",t);for(const e in this.features)this.features[e].abortHandler?.();const r=(0,x.fP)();delete r.initializedAgents[this.agentIdentifier]?.api,delete r.initializedAgents[this.agentIdentifier]?.features,delete this.sharedAggregator;return r.ee.get(this.agentIdentifier).abort(),!1}}}({features:[Y,b,I,class extends m{static featureName=ie;constructor(e,t){if(super(e,t,ie,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]),!h.il)return;const r=this.ee;let n;(0,B.QU)(r),this.eventsEE=(0,B.em)(r),this.eventsEE.on(ae,(function(e,t){this.bstStart=(0,O.z)()})),this.eventsEE.on(oe,(function(e,t){(0,T.p)("bst",[e[0],t,this.bstStart,(0,O.z)()],void 0,o.D.sessionTrace,r)})),r.on(se+re,(function(e){this.time=(0,O.z)(),this.startPath=location.pathname+location.hash})),r.on(se+ne,(function(e){(0,T.p)("bstHist",[location.pathname+location.hash,this.startPath,this.time],void 0,o.D.sessionTrace,r)}));try{n=new PerformanceObserver((e=>{const t=e.getEntries();(0,T.p)(ee,[t],void 0,o.D.sessionTrace,r)})),n.observe({type:te,buffered:!0})}catch(e){}this.importAggregator({resourceObserver:n})}},ue,C,xe,M,le,class extends m{static featureName=he;constructor(e,t){if(super(e,t,he,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]),!h.il)return;try{this.removeOnAbort=new AbortController}catch(e){}let r,n=0;const i=this.ee.get("tracer"),o=(0,B._L)(this.ee),a=(0,B.Lg)(this.ee),s=(0,B.BV)(this.ee),c=(0,B.Kf)(this.ee),u=this.ee.get("events"),d=(0,B.u5)(this.ee),l=(0,B.QU)(this.ee),f=(0,B.Gm)(this.ee);function p(e,t){l.emit("newURL",[""+window.location,t])}function g(){n++,r=window.location.hash,this[Ae]=(0,O.z)()}function m(){n--,window.location.hash!==r&&p(0,!0);var e=(0,O.z)();this[be]=~~this[be]+e-this[Ae],this[we]=e}function v(e,t){e.on(t,(function(){this[t]=(0,O.z)()}))}this.ee.on(Ae,g),a.on(Ee,g),o.on(Ee,g),this.ee.on(we,m),a.on(ve,m),o.on(ve,m),this.ee.buffer([Ae,we,"xhr-resolved"],this.featureName),u.buffer([Ae],this.featureName),s.buffer(["setTimeout"+ge,"clearTimeout"+pe,Ae],this.featureName),c.buffer([Ae,"new-xhr","send-xhr"+pe],this.featureName),d.buffer([ye+pe,ye+"-done",ye+me+pe,ye+me+ge],this.featureName),l.buffer(["newURL"],this.featureName),f.buffer([Ae],this.featureName),a.buffer(["propagate",Ee,ve,"executor-err","resolve"+pe],this.featureName),i.buffer([Ae,"no-"+Ae],this.featureName),o.buffer(["new-jsonp","cb-start","jsonp-error","jsonp-end"],this.featureName),v(d,ye+pe),v(d,ye+"-done"),v(o,"new-jsonp"),v(o,"jsonp-end"),v(o,"cb-start"),l.on("pushState-end",p),l.on("replaceState-end",p),window.addEventListener("hashchange",p,(0,N.m$)(!0,this.removeOnAbort?.signal)),window.addEventListener("load",p,(0,N.m$)(!0,this.removeOnAbort?.signal)),window.addEventListener("popstate",(function(){p(0,n>1)}),(0,N.m$)(!0,this.removeOnAbort?.signal)),this.abortHandler=this.#s,this.importAggregator()}#s(){this.removeOnAbort?.abort(),this.abortHandler=void 0}}],loaderType:"spa"})})()})(); 60</script>
60 61 62 63 <meta charset="utf-8"> 64 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no"> 65 <meta name="theme-color" content="#000000"> 66 <meta name="format-detection" content="telephone=no"> 67 <meta name="google-site-verification" content="AyOB6K-jDx0KeEalIQrpoBIlvLVAsyZWxPMibFYixRc" /> 68 <meta name="ahrefs-site-verification" content="b789b8934c6059a1610eb34128200ecde52e0d4e4b653b527749e559d101cccb"> 69 <link rel="canonical" href="https://www.lalschocolates.com/"> 70 <link rel="prefetch" as="document" href="https://www.lalschocolates.com"> 71 <link rel="dns-prefetch" href="https://cdn.shopify.com" crossorigin> 72 <link rel="preconnect" href="https://cdn.shopify.com" crossorigin> 73 <link rel="preconnect" href="https://monorail-edge.shopifysvc.com"> 74 75
75<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
75 76 77
77<script defer> 78 SupertimeManualMode = { 79 formSelector: "form.frm_cart_page" 80 }; 81 </script>
81 82<link rel="dns-prefetch" href="https://fonts.shopifycdn.com" crossorigin> 83 <link rel="preconnect" href="https://fonts.shopify.com" crossorigin> 84 <link rel="preload" as="font" href="//www.lalschocolates.com/cdn/fonts/montserrat/montserrat_n7.3c434e22befd5c18a6b4afadb1e3d77c128c7939.woff2" type="font/woff2" crossorigin> 85 <link rel="preload" as="font" href="//www.lalschocolates.com/cdn/fonts/libre_baskerville/librebaskerville_n4.2ec9ee517e3ce28d5f1e6c6e75efd8a97e59c189.woff2" type="font/woff2" crossorigin> 86 <link rel="preload" as="font" href="//www.lalschocolates.com/cdn/fonts/libre_baskerville/librebaskerville_n7.eb83ab550f8363268d3cb412ad3d4776b2bc22b9.woff2" type="font/woff2" crossorigin><link rel="preload" as="style" href="//www.lalschocolates.com/cdn/shop/t/158/assets/pre_theme.min.css?v=168465729626630067411786953288"> 87 <link rel="preload" as="style" href="//www.lalschocolates.com/cdn/shop/t/158/assets/theme.css?enable_css_minification=1&v=136186120117623853901790230585"><title>Lals - Chocolate and Gifting Brand in Pakistan</title><meta name="description" content="Discover the perfect blend of taste and thoughtfulness with our range of artisan chocolates and unique gifting options. Shop now to experience the finest chocolate treats and gifts, made in Pakistan with love."><link rel="shortcut icon" type="image/png" href="//www.lalschocolates.com/cdn/shop/files/Untitled-2_ce81f76d-5d51-4f3d-80e4-420b0a949c90_32x.png?v=1640215791"><!-- social-meta-tags.liquid --><meta name="keywords" content="Lals, Gifting, Pakistan, Chocolate in Pakistan, dark Chocolate in Pakistan, Send Gift to Pakistan, Best Chocolate in Pakistan, Chocolate price in Pakistan, Pakistan Gifts Online, Dark Chocolate Brand in Pakistan, Chocolate Box Gift price in Pakistan, Gifts, Valentine's Day,V-Day, Cake, Occassion, Patisserie, Valentine's Day Celebration, Imported Chocolate in Pakistan" /><meta name="author" content="SIAR DIGITAL"><meta property="og:site_name" content="Lals - Chocolate and Gifting Brand in Pakistan"> 88<meta property="og:url" content="https://www.lalschocolates.com/"> 89<meta property="og:title" content="Lals - Chocolate and Gifting Brand in Pakistan"> 90<meta property="og:type" content="website"> 91<meta property="og:description" content="Discover the perfect blend of taste and thoughtfulness with our range of artisan chocolates and unique gifting options. Shop now to experience the finest chocolate treats and gifts, made in Pakistan with love."><meta property="og:image" content="http://www.lalschocolates.com/cdn/shop/files/Untitled-2_35b108b1-65c4-45a9-885b-e1bf29e487d3_1200x1200.png?v=1640584934"><meta property="og:image:secure_url" content="https://www.lalschocolates.com/cdn/shop/files/Untitled-2_35b108b1-65c4-45a9-885b-e1bf29e487d3_1200x1200.png?v=1640584934"><meta name="twitter:card" content="summary_large_image"> 92<meta name="twitter:title" content="Lals - Chocolate and Gifting Brand in Pakistan"> 93<meta name="twitter:description" content="Discover the perfect blend of taste and thoughtfulness with our range of artisan chocolates and unique gifting options. Shop now to experience the finest chocolate treats and gifts, made in Pakistan with love."><link href="//www.lalschocolates.com/cdn/shop/t/158/assets/pre_theme.min.css?v=168465729626630067411786953288" rel="stylesheet" type="text/css" media="all" /><link rel="preload" as="script" href="//www.lalschocolates.com/cdn/shop/t/158/assets/lazysizes.min.js?v=36113997772709414851786953288"> 94<link rel="preload" as="script" href="//www.lalschocolates.com/cdn/shop/t/158/assets/nt_vendor.min.js?v=127135569711254804441786953288">
95<script>document.documentElement.className = document.documentElement.className.replace('no-js', 'yes-js');const t_name = "index",designMode = false,t_cartCount = 0,ThemeNameT4='kalles',ThemeNameT42='ThemeIdT4Kalles',themeIDt4 = 158147084510,ck_hostname = 'kalles-niche-none',ThemeIdT4 = "true",SopEmlT4="[email protected]",ThemePuT4 = '#purchase_codet4',t_shop_currency = "PKR", t_moneyFormat = "\u003cspan class=money\u003ePKR {{amount_no_decimals}}\u003c\/span\u003e", t_cart_url = "\/cart",t_cartadd_url = "\/cart\/add",t_cartchange_url = "\/cart\/change", pr_re_url = "\/recommendations\/products"; try {var T4AgentNT = (navigator.userAgent.indexOf('Chrome-Lighthouse') == -1)}catch(err){var T4AgentNT = true} function onloadt4relcss(_this) {_this.onload=null;if(T4AgentNT){_this.rel='stylesheet'}} (function () {window.onpageshow = function() {if (performance.navigation.type === 2) {document.dispatchEvent(new CustomEvent('cart:refresh'))} }; })(); 96var T4stt_str = { 97 "PleaseChoosePrOptions":"Please select some product options before adding this product to your cart.", 98 "will_not_ship":"Will not ship until \u003cspan class=\"jsnt\"\u003e{{date}}\u003c\/span\u003e", 99 "will_stock_after":"Will be in stock after \u003cspan class=\"jsnt\"\u003e{{date}}\u003c\/span\u003e", 100 "replace_item_atc":"Replace item", 101 "replace_item_pre":"Replace item", 102 "added_to_cart": "Product was successfully added to your cart.", 103 "view_cart": "View cart", 104 "continue_shopping": "Continue Shopping", 105 "save_js":"-[sale]%", 106 "save2_js":"SAVE [sale]%", 107 "save3_js":"SAVE [sale]","bannerCountdown":"%D days %H:%M:%S", 108 "prItemCountdown":"%D Days %H:%M:%S", 109 "countdown_days":"days", 110 "countdown_hours":"hr", 111 "countdown_mins":"min", 112 "countdown_sec":"sc", 113 "multiple_rates": "We found [number_of_rates] shipping rates available for [address], starting at [rate].", 114 "one_rate": "We found one shipping rate available for [address].", 115 "no_rates": "Sorry, we do not ship to this destination.", 116 "rate_value": "[rate_title] at [rate]", 117 "agree_checkout": "You must agree with the terms and conditions of sales to checkout.", 118 "added_text_cp":"Compare products" 119}; 120</script>
120 121<link rel="preload" href="//www.lalschocolates.com/cdn/shop/t/158/assets/style.min.css?v=11802978694687623121786953288" as="style" onload="onloadt4relcss(this)"><link href="//www.lalschocolates.com/cdn/shop/t/158/assets/theme.css?enable_css_minification=1&v=136186120117623853901790230585" rel="stylesheet" type="text/css" media="all" /><link id="sett_clt4" rel="preload" href="//www.lalschocolates.com/cdn/shop/t/158/assets/sett_cl.css?enable_css_minification=1&v=123392124309832141641786953288" as="style" onload="onloadt4relcss(this)"><link rel="preload" as="style" href="//www.lalschocolates.com/cdn/shop/t/158/assets/custom.css?enable_css_minification=1&v=76727605978539904401787309862"><link href="//www.lalschocolates.com/cdn/shop/t/158/assets/custom.css?enable_css_minification=1&v=76727605978539904401787309862" rel="stylesheet" type="text/css" media="all" /><link rel="preload" href="//www.lalschocolates.com/cdn/shop/t/158/assets/line-awesome.min.css?v=36930450349382045261786953288" as="style" onload="onloadt4relcss(this)">
122<script id="js_lzt4" src="//www.lalschocolates.com/cdn/shop/t/158/assets/lazysizes.min.js?v=36113997772709414851786953288" defer="defer"></script>
vendor: 1 bytes, line 122
122
123<script src="//www.lalschocolates.com/cdn/shop/t/158/assets/nt_vendor.min.js?v=127135569711254804441786953288" defer="defer" id="js_ntt4" 124 data-theme='//www.lalschocolates.com/cdn/shop/t/158/assets/nt_theme.min.js?v=146861671498847108371786953288' 125 data-stt='//www.lalschocolates.com/cdn/shop/t/158/assets/nt_settings.js?enable_js_minification=1&v=10657486263676899021786953288' 126 data-cat='//www.lalschocolates.com/cdn/shop/t/158/assets/cat.min.js?v=180149743316768226151786953288' 127 128 data-sw='//www.lalschocolates.com/cdn/shop/t/158/assets/swatch.min.js?v=176986504127684982871786953288' 129 data-prjs='//www.lalschocolates.com/cdn/shop/t/158/assets/produc.min.js?v=2278665341573391541786953288' 130 data-mail='//www.lalschocolates.com/cdn/shop/t/158/assets/platform_mail.min.js?v=120104920183136925081786953288' 131 data-my='//www.lalschocolates.com/cdn/shop/t/158/assets/my.js?v=111603181540343972631786953288' data-cusp='https://cdn.shopify.com/s/javascripts/currencies.js' data-cur='//www.lalschocolates.com/cdn/shop/t/158/assets/nt_currencies.min.js?v=150676962577186337141786953288' data-mdl='//www.lalschocolates.com/cdn/shop/t/158/assets/module.min.js?v=72712877271928395091786953288' 132 data-map='//www.lalschocolates.com/cdn/shop/t/158/assets/maplace.min.js?v=123640464312137447171786953288' 133 data-time='//www.lalschocolates.com/cdn/shop/t/158/assets/spacetime.min.js?v=23742' 134 data-ins='//www.lalschocolates.com/cdn/shop/t/158/assets/nt_instagram.min.js?v=67982783334426809631786953288' 135 data-user='//www.lalschocolates.com/cdn/shop/t/158/assets/interactable.min.js?v=159705546912061908171786953288' 136 data-add='//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-56efaa05a768bd19' 137 data-klaviyo='//www.klaviyo.com/media/js/public/klaviyo_subscribe.js' 138 data-font='iconKalles , fakalles , Pe-icon-7-stroke , Font Awesome 5 Free:n9' 139 data-fm='' 140 data-spcmn='//www.lalschocolates.com/cdn/shopifycloud/storefront/assets/themes_support/shopify_common-5f594365.js' 141 data-cust='//www.lalschocolates.com/cdn/shop/t/158/assets/customerclnt.min.js?v=3252781937110261681786953288' 142 data-cusjs='none' 143 data-desadm='//www.lalschocolates.com/cdn/shop/t/158/assets/des_adm.min.js?v=77163636288758062821786953288' 144 data-otherryv='//www.lalschocolates.com/cdn/shop/t/158/assets/reviewOther.js?enable_js_minification=1&v=72029929378534401331786953288'></script>
144<script>window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.start');</script>
144<meta name="google-site-verification" content="hs5xRlStB_9ZQDS2c9WEd_31pqUKk1PaDhBgtTpc0JY"> 145<meta id="shopify-digital-wallet" name="shopify-digital-wallet" content="/61684646110/digital_wallets/dialog"> 146<link rel="ucp" href="/.well-known/ucp" version="2026-08-25"><link rel="alternate" hreflang="x-default" href="https://www.lalschocolates.com/"> 147<link rel="alternate" hreflang="en" href="https://www.lalschocolates.com/"> 148<link rel="alternate" hreflang="ar" href="https://www.lalschocolates.com/ar">
149<script async="async" src="/checkouts/internal/preloads.js?locale=en-PK"></script>
vendor: 1 bytes, line 149
149
150<script id="shopify-features" type="application/json">{"accessToken":"d8272054e6f211661d3ec02a933c5696","betas":["rich-media-storefront-analytics"],"domain":"www.lalschocolates.com","predictiveSearch":true,"shopId":61684646110,"locale":"en"}</script>
vendor: 1 bytes, line 150
150
151<script>var Shopify = Shopify || {}; 152Shopify.shop = "lals-sd.myshopify.com"; 153Shopify.locale = "en"; 154Shopify.currency = {"active":"PKR","rate":"1.0"}; 155Shopify.country = "PK"; 156Shopify.theme = {"name":"Birthday Collection '26","id":158147084510,"schema_name":"Kalles","schema_version":"3.0.0","theme_store_id":null,"role":"main"}; 157Shopify.theme.handle = "null"; 158Shopify.theme.style = {"id":null,"handle":null}; 159Shopify.cdnHost = "www.lalschocolates.com/cdn"; 160Shopify.routes = Shopify.routes || {}; 161Shopify.routes.root = "/"; 162Shopify.shopJsCdnBaseUrl = "https://cdn.shopify.com/shopifycloud/shop-js"; 163Shopify.SignInWithShop = Shopify.SignInWithShop || {}; 164Shopify.SignInWithShop.User = Shopify.SignInWithShop.User || {}; 165Shopify.SignInWithShop.User.recognized = false;</script>
vendor: 1 bytes, line 165
165
166<script type="module">!function(o){(o.Shopify=o.Shopify||{}).modules=!0}(window);</script>
vendor: 1 bytes, line 166
166
167<script>!function(o){function n(){var o=[];function n(){o.push(Array.prototype.slice.apply(arguments))}return n.q=o,n}var t=o.Shopify=o.Shopify||{};t.loadFeatures=n(),t.autoloadFeatures=n()}(window);</script>
vendor: 1 bytes, line 167
167
168<script> 169 window.Shopify = window.Shopify || {}; 170 window.Shopify.SignInWithShop = window.Shopify.SignInWithShop || {}; 171 window.Shopify.SignInWithShop.assetMetrics = { sampleRate: 0.25 }; 172 window.Shopify.SignInWithShop.eligible = true; 173</script>
vendor: 1 bytes, line 173
173
174<script id="shop-js-analytics" type="application/json">{"pageType":"index"}</script>
vendor: 1 bytes, line 174
174
175<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"></script>
vendor: 1 bytes, line 175
175
176<script type="module"> 177 await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"); 178 179 window.Shopify.SignInWithShop?.initShopCartSync?.({"fedCMEnabled":true,"windoidEnabled":true}); 180 181</script>
vendor: 1 bytes, line 181
181
182<script> 183 window.Shopify = window.Shopify || {}; 184 if (!window.Shopify.featureAssets) window.Shopify.featureAssets = {}; 185 window.Shopify.featureAssets['shop-js'] = {"avatar":["modules/v2/loader.avatar.en.esm.js"],"checkout-modal":["modules/v2/loader.checkout-modal.en.esm.js"],"init-customer-accounts-sign-up":["modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"],"init-customer-accounts":["modules/v2/loader.init-customer-accounts.en.esm.js"],"init-fed-cm":["modules/v2/loader.init-fed-cm.en.esm.js"],"init-shop-cart-sync":["modules/v2/loader.init-shop-cart-sync.en.esm.js"],"init-shop-email-lookup-coordinator":["modules/v2/loader.init-shop-email-lookup-coordinator.en.esm.js"],"init-shop-for-new-customer-accounts":["modules/v2/loader.init-shop-for-new-customer-accounts.en.esm.js"],"init-shop-user-recognition":["modules/v2/loader.init-shop-user-recognition.en.esm.js"],"init-windoid":["modules/v2/loader.init-windoid.en.esm.js"],"lead-capture":["modules/v2/loader.lead-capture.en.esm.js"],"listener":["modules/v2/loader.listener.en.esm.js"],"pay-button":["modules/v2/loader.pay-button.en.esm.js"],"payment-terms":["modules/v2/loader.payment-terms.en.esm.js"],"shop-button":["modules/v2/loader.shop-button.en.esm.js"],"shop-cart-sync":["modules/v2/loader.shop-cart-sync.en.esm.js"],"shop-cash-offers":["modules/v2/loader.shop-cash-offers.en.esm.js"],"shop-follow-button":["modules/v2/loader.shop-follow-button.en.esm.js"],"shop-login-button":["modules/v2/loader.shop-login-button.en.esm.js"],"shop-login":["modules/v2/loader.shop-login.en.esm.js"],"shop-toast-manager":["modules/v2/loader.shop-toast-manager.en.esm.js"],"shop-user-recognition":["modules/v2/loader.shop-user-recognition.en.esm.js"]}; 186</script>
vendor: 1 bytes, line 186
186
187<script>(function() { 188 var isLoaded = false; 189 function asyncLoad() { 190 if (isLoaded) return; 191 isLoaded = true; 192 var urls = ["https:\/\/static.klaviyo.com\/onsite\/js\/klaviyo.js?company_id=UCU6KZ\u0026shop=lals-sd.myshopify.com","https:\/\/static.klaviyo.com\/onsite\/js\/klaviyo.js?company_id=UCU6KZ\u0026shop=lals-sd.myshopify.com","\/\/cdn.shopify.com\/proxy\/8ebb903954fc63c843360a3d4763c2fee498bf5c39950f96e074a7698ffe5020\/bucket.useifsapp.com\/theme-files-min\/js\/ifs-script-tag-min.js?v=2\u0026shop=lals-sd.myshopify.com\u0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA"]; 193 for (var i = 0; i < urls.length; i++) { 194 var s = document.createElement('script'); 195 s.type = 'text/javascript'; 196 s.async = true; 197 s.src = urls[i]; 198 var x = document.getElementsByTagName('script')[0]; 199 x.parentNode.insertBefore(s, x); 200 } 201 }; 202 if(window.attachEvent) { 203 window.attachEvent('onload', asyncLoad); 204 } else { 205 window.addEventListener('load', asyncLoad, false); 206 } 207})();</script>
vendor: 1 bytes, line 207
207
208<script id="__st">var __st={"a":61684646110,"offset":18000,"reqid":"f2d47b0c-a07c-407d-8a33-45dd663acc0e-1791404836","pageurl":"www.lalschocolates.com\/","u":"f212ad9a5674","p":"home"};</script>
vendor: 1 bytes, line 208
208
209<script>window.ShopifyPaypalV4VisibilityTracking = true;</script>
vendor: 1 bytes, line 209
209
210<script id="captcha-bootstrap">!function(){'use strict';const t='contact',e='account',n='new_comment',o=[[t,t],['blogs',n],['comments',n],[t,'customer']],c=[[e,'customer_login'],[e,'guest_login'],[e,'recover_customer_password'],[e,'create_customer']],r=t=>t.map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(','),a=t=>()=>t?[...document.querySelectorAll(t)].map((t=>t.form)):[];function s(){const t=[...o],e=r(t);return a(e)}const i='password',u='form_key',d=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',i],f=()=>{try{return window.sessionStorage}catch{return}},m='__shopify_v',_=t=>t.elements[u];function p(t,e,n=!1){try{const o=window.sessionStorage,c=JSON.parse(o.getItem(e)),{data:r}=function(t){const{data:e,action:n}=t;return t[m]||n?{data:e,action:n}:{data:t,action:n}}(c);for(const[e,n]of Object.entries(r))t.elements[e]&&(t.elements[e].value=n);n&&o.removeItem(e)}catch(o){console.error('form repopulation failed',{error:o})}}const l='form_type',E='cptcha';function T(t){t.dataset[E]=!0}const w=window,h=w.document,L='Shopify',v='ce_forms',y='captcha';let A=!1;((t,e)=>{const n=(g='f06e6c50-85a8-45c8-87d0-21a2b65856fe',I='https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.3.iife.js',D={infoText:'Protected by hCaptcha',privacyText:'Privacy',termsText:'Terms'},(t,e,n)=>{const o=w[L][v],c=o.bindForm;if(c)return c(t,g,e,D).then(n);var r;o.q.push([[t,g,e,D],n]),r=I,A||(h.body.append(Object.assign(h.createElement('script'),{id:'captcha-provider',async:!0,src:r})),A=!0)});var g,I,D;w[L]=w[L]||{},w[L][v]=w[L][v]||{},w[L][v].q=[],w[L][y]=w[L][y]||{},w[L][y].protect=function(t,e){n(t,void 0,e),T(t)},Object.freeze(w[L][y]),function(t,e,n,w,h,L){const[v,y,A,g]=function(t,e,n){const i=e?o:[],u=t?c:[],d=[...i,...u],f=r(d),m=r(i),_=r(d.filter((([t,e])=>n.includes(e))));return[a(f),a(m),a(_),s()]}(w,h,L),I=t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form},D=t=>v().includes(t);t.addEventListener('submit',(t=>{const e=I(t);if(!e)return;const n=D(e)&&!e.dataset.hcaptchaBound&&!e.dataset.recaptchaBound,o=_(e),c=g().includes(e)&&(!o||!o.value);(n||c)&&t.preventDefault(),c&&!n&&(function(t){try{if(!f())return;!function(t){const e=f();if(!e)return;const n=_(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){_(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:u})),t.elements[u].value=e}(t,e),function(t,e){const n=f();if(!n)return;const o=[...t.querySelectorAll(`input[type='${i}']`)].map((({name:t})=>t)),c=[...d,...o],r={};for(const[a,s]of new FormData(t).entries())c.includes(a)||(r[a]=s);n.setItem(e,JSON.stringify({[m]:1,action:t.action,data:r}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(e),e.submit())}));const S=(t,e)=>{t&&!t.dataset[E]&&(n(t,e.some((e=>e===t))),T(t))};for(const o of['focusin','change'])t.addEventListener(o,(t=>{const e=I(t);D(e)&&S(e,y())}));const B=e.get('form_key'),M=e.get(l),P=B&&M;t.addEventListener('DOMContentLoaded',(()=>{const t=y();if(P)for(const e of t)e.elements[l].value===M&&p(e,B);[...new Set([...A(),...v().filter((t=>'true'===t.dataset.shopifyCaptcha))])].forEach((e=>S(e,t)))}))}(h,new URLSearchParams(w.location.search),n,t,e,['guest_login'])})(!0,!0)}();</script>
vendor: 1 bytes, line 210
210
211<script integrity="sha256-JjoPp5ZfB1sSAs5SQaol1x1GgvveM+BgmRzyDexInEQ=" data-source-attribution="shopify.loadfeatures" defer="defer" src="//www.lalschocolates.com/cdn/shopifycloud/storefront/assets/storefront/load_feature-1bd60354.js" crossorigin="anonymous"></script>
vendor: 1 bytes, line 211
211
212<script>(function () {var userAgent = navigator.userAgent;var platform = navigator.platform;var maxTouchPoints = navigator.maxTouchPoints || 0;var isIOS = /iPad|iPhone|iPod/.test(platform) || (platform === 'MacIntel' && maxTouchPoints > 1);var isMacSafari = platform.indexOf('Mac') === 0 && /Safari/.test(userAgent) && !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/.test(userAgent);var isAppleSafari = isIOS || isMacSafari;if (isAppleSafari) {fetch('/sf_private_access_tokens' + location.search).catch(function () {});}function browserMajorVersion(pattern) {var match = userAgent.match(pattern);return match ? parseInt(match[1], 10) : null;}function shouldLoadAutosizesPolyfill() {if (!window.PerformanceObserver?.supportedEntryTypes?.includes('paint')) {return false;}var chromeVersion = browserMajorVersion(/Chrome\/(\d+)/);if (chromeVersion !== null) {return chromeVersion < 126;}var firefoxVersion = browserMajorVersion(/Firefox\/(\d+)/);if (firefoxVersion !== null) {return firefoxVersion < 150;}var safariVersion = isAppleSafari ? browserMajorVersion(/Version\/(\d+).*Safari\//) : null;if (safariVersion !== null) {return safariVersion < 27;}return true;}if (shouldLoadAutosizesPolyfill()) {var autosizesScript = document.createElement('script');autosizesScript.async = true;autosizesScript.crossOrigin = 'anonymous';autosizesScript.src = "//www.lalschocolates.com/cdn/shopifycloud/storefront/assets/storefront/autosizes-84416378.js";(document.head || document.documentElement).appendChild(autosizesScript);}window.ShopifyAnalytics = window.ShopifyAnalytics || {};window.ShopifyAnalytics.performance = window.ShopifyAnalytics.performance || {};(function () {var LONG_FRAME_THRESHOLD = 50;var longAnimationFrames = [];var activeRafId = null;function collectLongFrames() {var previousTime = null;function rafMonitor(now) {if (activeRafId === null) {return;}var delta = now - previousTime;if (delta > LONG_FRAME_THRESHOLD) {longAnimationFrames.push({startTime: previousTime,endTime: now,});}previousTime = now;activeRafId = requestAnimationFrame(rafMonitor);}previousTime = performance.now();activeRafId = requestAnimationFrame(rafMonitor);}if (!window.PerformanceObserver?.supportedEntryTypes?.includes('long-animation-frame')) {collectLongFrames();var timeoutId = setTimeout(function () {cancelAnimationFrame(activeRafId);}, 10000);window.ShopifyAnalytics.performance.getLongAnimationFrames = function (stopCollection) {if (stopCollection === undefined) {stopCollection = false;}if (stopCollection) {clearTimeout(timeoutId);cancelAnimationFrame(activeRafId);}return longAnimationFrames;};}})();})();</script>
212<script id="shopify-origin-trials" async="async" integrity="sha256-qJbe/jEZBHtr5W/BlA2cKAz3vkXu6vJQyLjgvgCC86g=" src="//cdn.shopify.com/shopifycloud/storefront/assets/storefront/origin_trials-318ab40a.js" crossorigin="anonymous" onload="window.__shopifyOriginTrialsDone = true" onerror="window.__shopifyOriginTrialsDone = true"></script>
vendor: 1 bytes, line 212
212
213<script> 214 window.Shopify = window.Shopify || {}; 215 window.Shopify.MCP = window.Shopify.MCP || {}; 216 window.Shopify.MCP.enabled = true; 217 window.Shopify.MCP.shop = "lals-sd.myshopify.com"; 218 window.Shopify.MCP.mcpEndpoint = "https:\/\/www.lalschocolates.com\/api\/mcp"; 219 window.Shopify.MCP.tools = [{"name":"search_shop_policies_and_faqs","description":"Used to get facts about the stores policies, products, or services.\nSome examples of questions you can ask are:\n - What is your return policy?\n - What is your shipping policy?\n - What is your phone number?\n - What are your hours of operation?\"\nSet policy_types to also get the store's written policies (full text and URL).\n","inputSchema":{"$schema":"https:\/\/json-schema.org\/draft\/2020-12\/schema","type":"object","properties":{"query":{"type":"string","description":"A natural language query."},"context":{"type":"string","description":"Additional information about the request such as user demographics, mood, location, or other relevant details that could help in tailoring the response appropriately."},"policy_types":{"type":"array","items":{"type":"string","enum":["refund","shipping","privacy","terms_of_service","terms_of_sale","subscription","legal_notice","contact"]},"description":"Policy kinds to fetch, chosen from the user's question â e.g. [\"refund\"] for returns\/exchanges\/damaged items, [\"contact\"] for phone\/hours\/address. Include every kind the question touches. Omit it to get only FAQ answers."}},"required":["query"]}}]; 220</script>
vendor: 1 bytes, line 220
220
221<script>(()=>{var d="shopify:webmcp_adapter_loaded",n=Symbol.for("shopify.webmcp_adapter_loading");function s(c,a,{win:r=window,doc:o=document}={}){function p(){try{return r.localStorage.getItem(d)==="true"}catch{return!1}}function l(){try{r.localStorage.setItem(d,"true")}catch{}}function u(){return typeof(o.modelContext||r.navigator?.modelContext)?.registerTool=="function"}function f(){if(r[n]||!u())return;let t=o.head||o.getElementsByTagName("head")[0];if(!t)return;let e=o.createElement("script");e.type="module",e.crossOrigin="anonymous",a&&(e.integrity=a),e.src=c,e.addEventListener("load",l,{once:!0}),e.addEventListener("error",()=>{r[n]=!1},{once:!0}),t.appendChild(e),r[n]=!0}function _(t){let e=o.getElementById("shopify-origin-trials");if(!e||r.__shopifyOriginTrialsDone){t();return}e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function i(){_(()=>r.setTimeout(f,0))}function m(){o.addEventListener("DOMContentLoaded",i,{once:!0})}p()?i():m()}s("\/\/www.lalschocolates.com\/cdn\/shopifycloud\/storefront\/assets\/storefront\/webmcp-c6b62ece.js","sha256-ke4DDuBjdvea3vxLWxHc9E9nq8zihuG4IfYEGbb77ys=");})(); 222</script>
vendor: 1 bytes, line 222
222
223<script data-source-attribution="shopify.dynamic_checkout.dynamic.init">var Shopify=Shopify||{};Shopify.PaymentButton=Shopify.PaymentButton||{isStorefrontPortableWallets:!0,init:function(){window.Shopify.PaymentButton.init=function(){};var t=document.createElement("script");t.src="https://www.lalschocolates.com/cdn/shopifycloud/portable-wallets/latest/portable-wallets.en.js",t.type="module",document.head.appendChild(t)}}; 224</script>
vendor: 1 bytes, line 224
224
225<script data-source-attribution="shopify.dynamic_checkout.buyer_consent"> 226 function portableWalletsHideBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),n.removeEventListener("click",e))}function portableWalletsShowBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.remove("hidden"),t.removeAttribute("aria-hidden"),n.addEventListener("click",e))}window.Shopify?.PaymentButton&&(window.Shopify.PaymentButton.hideBuyerConsent=portableWalletsHideBuyerConsent,window.Shopify.PaymentButton.showBuyerConsent=portableWalletsShowBuyerConsent); 227</script>
vendor: 1 bytes, line 227
227
228<script data-source-attribution="shopify.dynamic_checkout.cart.bootstrap">document.addEventListener("DOMContentLoaded",(function(){function t(){return document.querySelector("shopify-accelerated-checkout-cart, shopify-accelerated-checkout")}if(t())Shopify.PaymentButton.init();else{new MutationObserver((function(e,n){t()&&(Shopify.PaymentButton.init(),n.disconnect())})).observe(document.body,{childList:!0,subtree:!0})}})); 229</script>
229 230
231<script id="shopify-cfh-end">window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.end');</script>
231 232 233<!-- BEGIN app block: shopify://apps/minmaxify-order-limits/blocks/app-embed-block/3acfba32-89f3-4377-ae20-cbb9abc48475 -->
233<script src="https://limits.minmaxify.com/lals-sd.myshopify.com?v=138&r=20250926051503" defer></script>
233 234 235<!-- END app block --><!-- BEGIN app block: shopify://apps/klaviyo-email-marketing-sms/blocks/klaviyo-onsite-embed/2632fe16-c075-4321-a88b-50b567f42507 --> 236 237 238 239 240 241 242 243 244 245 246 247 248
248<script async src="https://static.klaviyo.com/onsite/js/UCU6KZ/klaviyo.js?company_id=UCU6KZ"></script>
248 249
249<script>!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return"push"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w<n;w++)o[w]=arguments[w];var t="function"==typeof o[o.length-1]?o.pop():void 0,e=new Promise((function(n){window._klOnsite.push([i].concat(o,[function(i){t&&t(i),n(i)}]))}));return e}}})}catch(n){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var n;(n=window._klOnsite).push.apply(n,arguments)}}}}();</script>
249 250 251 252 253 254 255 256
256<script> 257 window.klaviyoReviewsProductDesignMode = false 258 </script>
258 259 260 261 262 263 264 265 266 267 268<!-- END app block -->
268<script src="https://cdn.shopify.com/extensions/01a115be-abcf-7501-a123-78da12b4df6b/lb-upsell-452/assets/lb-selleasy.js" type="text/javascript" defer="defer"></script>
268 269<link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
270<script>(function(){if ("sendBeacon" in navigator && "performance" in window) {try {var session_token_from_headers = performance.getEntriesByType('navigation')[0].serverTiming.find(x => x.name == '_s').description;} catch {var session_token_from_headers = undefined;}var session_cookie_matches = document.cookie.match(/_shopify_s=([^;]*)/);var session_token_from_cookie = session_cookie_matches && session_cookie_matches.length === 2 ? session_cookie_matches[1] : "";var session_token = session_token_from_headers || session_token_from_cookie || "";function handle_abandonment_event(e) {var entries = performance.getEntries().filter(function(entry) {return /monorail-edge.shopifysvc.com/.test(entry.name);});if (!window.abandonment_tracked && entries.length === 0) {window.abandonment_tracked = true;var currentMs = Date.now();var navigation_start = performance.timing.navigationStart;var payload = {shop_id: 61684646110,url: window.location.href,navigation_start,duration: currentMs - navigation_start,session_token,page_type: "index"};window.navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", JSON.stringify({schema_id: "online_store_buyer_site_abandonment/1.1",payload: payload,metadata: {event_created_at_ms: currentMs,event_sent_at_ms: currentMs}}));}}window.addEventListener('pagehide', handle_abandonment_event);}}());</script>
vendor: 1 bytes, line 270
270
271<script> 272 window.__TREKKIE_SHIM_QUEUE = window.__TREKKIE_SHIM_QUEUE || []; 273</script>
vendor: 1 bytes, line 273
273
274<script>(function(){var wpmLoader=function(){"use strict";var e=/Googlebot|Storebot-Google|bingbot|Baiduspider|YandexBot|DuckDuckBot|Slurp|facebookexternalhit|Twitterbot|LinkedInBot|Applebot|AdsBot-Google|Mediapartners-Google|APIs-Google|PetalBot|SemrushBot|AhrefsBot|MJ12bot|DotBot|Acunetix|PerplexityBot|Perplexity-User/i,t=/bytedance/i;function i(){try{var e=document.cookie;if(!e||"string"!=typeof e)return;for(var t=0,i=e.split(";");t<i.length;t++){var n=i[t],r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r).trim();if(o){var a=void 0;try{a=decodeURIComponent(o)}catch(e){a=o}if("_shopify_s"===a){var d=n.slice(r+1).trim();try{return decodeURIComponent(d)}catch(e){return d}}}}}return}catch(e){return}}function n(e){try{"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}catch(e){}}function r(e,t){return"string"==typeof e&&e.length>0&&e.length<=t?e:void 0}function o(e){var t;switch(null==(t=null==e?void 0:e.navigation)?void 0:t.type){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";default:return}}function a(){var e,t,i;try{var n=null==(i=null==(t=null==(e=self.ShopifyAnalytics)?void 0:e.lib)?void 0:t.trekkie)?void 0:i.state;return"awaiting-consent"===n||"initialized"===n?n:void 0}catch(e){return}}return function(d,s,u,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var p=c.trekkieShim;!0!==p&&"true"!==p||null!=window.__TREKKIE_SHIM_QUEUE||(window.__TREKKIE_SHIM_QUEUE=[])}catch(e){}var f,v,h,y,g=(v=(f={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}).modern,h=f.legacy,(y=navigator.userAgent).match(e)?"bot":y.match(v)?"modern":y.match(h)?"legacy":y.match(t)?"bot":"unknown"),m=function(e){var t,i,n=r(e,128);try{var a=window.performance,d=null==(t=null==a?void 0:a.getEntriesByType)?void 0:t.call(a,"navigation")[0];if(!d)return{requestId:n,navigationType:o(a)};var s="type"in d?r(d.type,64):void 0,u="serverTiming"in d&&Array.isArray(d.serverTiming)?d.serverTiming:[];return{requestId:null!=n?n:r(null==(i=u.find(function(e){return"requestID"===e.name}))?void 0:i.description,128),navigationType:s}}catch(e){return{requestId:n}}}(c.requestId),w=function(e){var t=e.version,r=e.browserTarget,o=e.surface,a=e.shopId,d=e.monorailEndpoint,s=window.location.href;return{emit:function(e){var u=e.status,l=e.errorMsg,c=e.failureReason,p=e.useKeepaliveFallback,f=void 0!==p&&p,v=e.navigationType,h=e.pagehidePersisted,y=e.requestId,g=e.trekkieState;if(d){var m,w;try{var b=(new Date).getTime();m=JSON.stringify({metadata:{event_sent_at_ms:b},events:[{schema_id:"web_pixels_manager_load/3.3",payload:{version:t,bundle_target:r,page_url:s,status:u,surface:o,error_msg:l,failure_reason:c,navigation_type:v,pagehide_persisted:h,request_id:y,trekkie_state:g,shop_id:a,visit_token:i()},metadata:{event_created_at_ms:b}}]})}catch(e){return}try{if("function"==typeof window.navigator.sendBeacon&&-1===(w=window.navigator.userAgent).indexOf("iPhone; CPU iPhone OS 12_")&&-1===w.indexOf("iPad; CPU OS 12_")&&-1===w.indexOf("iPod touch; CPU iPhone OS 12_")&&window.navigator.sendBeacon.bind(window.navigator)(d,m))return}catch(e){}if(f)try{"function"==typeof window.fetch&&window.fetch(d,{method:"POST",headers:{"Content-Type":"text/plain"},body:m,keepalive:!0}
274).catch(function(){})}catch(e){}else try{var _=new XMLHttpRequest;_.open("POST",d,!0),_.setRequestHeader("Content-Type","text/plain"),_.send(m)}catch(e){n("[Web Pixels Manager] Got an unhandled error while logging to Monorail.")}}else n("[Web Pixels Manager] No Monorail endpoint provided, skipping logging.")}}}({version:u,browserTarget:g,surface:d.surface,shopId:d.shopId,monorailEndpoint:d.monorailEndpoint});if(Boolean(null==(_=null==(b=window.Shopify)?void 0:b.analytics)?void 0:_.replayQueue))w.emit({status:"setup-skipped",errorMsg:"replay queue already initialized."});else{var b,_;w.emit({status:"setup-started"}),window.Shopify=window.Shopify||{};var S=window.Shopify;S.analytics=S.analytics||{};var P=S.analytics;P.replayQueue=[],P.publish=function(e,t,i){return P.replayQueue.push([e,t,i]),!0};try{self.performance.mark("wpm:start")}catch(e){}var k,C="modern"===g?"modern":"legacy",E=(null!=l?l:{modern:"",legacy:""})[C],I=[(k={baseUrl:s,hashVersion:u,buildTarget:C}).baseUrl,"/wpm","/b",k.hashVersion,"modern"===k.buildTarget?"m":"l",".js"].join(""),O=!1,T=!1;try{c.browserTarget=g,function(){O=!0;try{window.addEventListener("pagehide",M)}catch(e){O=!1}}(),R(function(){try{R(x)}catch(e){D(e)}}),w.emit({status:"loading",requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()})}catch(e){D(e)}}function U(){var e;if(q(),!function(){var e,t;return Boolean(null==(t=null==(e=window.Shopify)?void 0:e.analytics)?void 0:t.initialized)}()){var t,i,n;try{if("function"!=typeof(null==(e=window.webPixelsManager)?void 0:e.init))return void A();if(!(null!==(n=i=t=window.webPixelsManager.init(d))&&"function"!=typeof n&&Object(n)===n&&"publish"in i&&"function"==typeof i.publish&&"publishCustomEvent"in i&&"function"==typeof i.publishCustomEvent&&"visitor"in i&&"function"==typeof i.visitor))return void A()}catch(e){return void A(e)}var r=window.Shopify.analytics;r.replayQueue.forEach(function(e){var i=e[0],n=e[1],r=e[2];t.publishCustomEvent(i,n,r)}),r.replayQueue=[],r.publish=t.publishCustomEvent,r.visitor=t.visitor,r.initialized=!0}}function A(e){B("manager_api_unavailable",void 0===e?void 0:Q(e))}function x(){B("script_load_failed","".concat(I," has failed to load"))}function B(e,t){T||(T=!0,q(),w.emit({status:"failed",errorMsg:t,failureReason:e,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function M(e){O&&(q(),w.emit({status:"pagehide-while-loading",useKeepaliveFallback:!0,pagehidePersisted:e.persisted,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function q(){O=!1;try{window.removeEventListener("pagehide",M)}catch(e){}}function R(e){var t;!function(e){var t=e.src,i=e.async,n=void 0===i||i,r=e.onload,o=e.onerror,a=e.sri,d=e.scriptDataAttributes,s=void 0===d?{}:d,u=document.createElement("script"),l=document.querySelector("head"),c=document.querySelector("body");if(u.async=n,u.src=t,a&&(u.integrity=a,u.crossOrigin="anonymous"),s)for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))try{u.dataset[p]=String(s[p])}catch(e){}if(r&&u.addEventListener("load",r),o&&u.addEventListener("error",o),l)l.appendChild(u);else{if(!c)throw new Error("Did not find a head or body element to append the script");c.appendChild(u)}}({src:I,async:!0,onload:U,onerror:e,sri:(t=E,"string"==typeof t&&/^sha384-[A-Za-z0-9+/=]+$/.test(t)?E:""),scriptDataAttributes:c})}function D(e){B("script_append_failed",Q(e))}function Q(e){return e instanceof Error?e.message:"Unknown error"}}}();wpmLoader({shopId: 61684646110,storefrontBaseUrl: "https://www.lalschocolates.com",extensionsBaseUrl: "https://extensions.shopifycdn.com/cdn/shopifycloud/web-pixels-manager",monorailEndpoint: "https://www.lalschocolates.com/.well-known/shopify/monorail/unstable/produce_batch",surface: "storefront-renderer",enabledBetaFlags: ["4c64608a","16072cab","8450a54b"],webPixelsConfigList: [{"id":"2203222238","configuration":"{\"webPixelName\":\"Judge.me\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"8acc938b1a30dc7624e304493ca567d7","type":"APP","apiClientId":683015,"privacyPurposes":["ANALYTICS"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]}
274,"dataSharingState":"unrestricted"},{"id":"1520730334","configuration":"{\"accountID\":\"UCU6KZ\",\"webPixelConfig\":\"eyJlbmFibGVBZGRlZFRvQ2FydEV2ZW50cyI6IHRydWV9\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"c63c5b72c8d77be5f2d27d14c081da38","type":"APP","apiClientId":123074,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"475070686","configuration":"{\"config\":\"{\\\"google_tag_ids\\\":[\\\"G-4DVSXPV3DG\\\",\\\"GT-T9LQ46G\\\"],\\\"target_country\\\":\\\"PK\\\",\\\"gtag_events\\\":[{\\\"type\\\":\\\"search\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"begin_checkout\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"remove_from_cart\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"view_item\\\",\\\"action_label\\\":[\\\"G-4DVSXPV3DG\\\",\\\"MC-Y8F60280E3\\\"]},{\\\"type\\\":\\\"purchase\\\",\\\"action_label\\\":[\\\"G-4DVSXPV3DG\\\",\\\"MC-Y8F60280E3\\\"]},{\\\"type\\\":\\\"add_shipping_info\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"page_view\\\",\\\"action_label\\\":[\\\"G-4DVSXPV3DG\\\",\\\"MC-Y8F60280E3\\\"]},{\\\"type\\\":\\\"view_item_list\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"add_payment_info\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"add_to_cart\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"},{\\\"type\\\":\\\"view_cart\\\",\\\"action_label\\\":\\\"G-4DVSXPV3DG\\\"}],\\\"enable_monitoring_mode\\\":false}\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"a3321ca85cf5aaf6b57585fcd8d67b3a","type":"APP","apiClientId":1780363,"privacyPurposes":[],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"167313630","configuration":"{\"pixel_id\":\"265461711591773\",\"pixel_type\":\"facebook_pixel\",\"metaapp_system_user_token\":\"-\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"bd2f978c17a94bbb8a74d43de2165dc5","type":"APP","apiClientId":2329312,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"100729054","configuration":"{\"accountID\":\"selleasy-metrics-track\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"50acfdcd7b118f50e52df83f64624d06","type":"APP","apiClientId":5519923,"privacyPurposes":[],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_email","read_customer_name","read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"unrestricted"},{"id":"71106782","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS"],"name":"Google Analytics tag (migrated)"},{"id":"shopify-app-pixel","configuration":"{}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"APP","privacyPurposes":["ANALYTICS","MARKETING"]},{"id":"shopify-custom-pixel","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING"]}],isMerchantRequest: false,initData: {"shop":{"name":"Lals - Chocolate and Gifting Brand in Pakistan","paymentSettings":{"currencyCode":"PKR"},"myshopifyDomain":"lals-sd.myshopify.com","countryCode":"PK","storefrontUrl":"https:\/\/www.lalschocolates.com"},"customer":null,"cart":null,"checkout":null,"productVariants":[],"products":[],"purchasingCompany":null},},"https://www.lalschocolates.com/cdn","7ec887c8w14f9f074p854094e1m1370c602",{"modern":"","legacy":""},{"trekkieShim":true,"agentContext":true,"apiClientId":"580111","facebookCapiEnabled":"true","themeId":"158147084510","themePublished":"true","eventMetadataId":"b3440f35-3506-4ed1-ac1b-59af027e65c6","pageType":"home","shopId":"61684646110","
274storefrontBaseUrl":"https:\/\/www.lalschocolates.com","extensionBaseUrl":"https:\/\/extensions.shopifycdn.com\/cdn\/shopifycloud\/web-pixels-manager","surface":"storefront-renderer","enabledBetaFlags":"[\"4c64608a\", \"16072cab\", \"8450a54b\"]","isMerchantRequest":"false","hashVersion":"7ec887c8w14f9f074p854094e1m1370c602","publish":"custom","events":"[[\"page_viewed\",{}]]"});})();</script>
274<script> 275 window.ShopifyAnalytics = window.ShopifyAnalytics || {}; 276 window.ShopifyAnalytics.meta = window.ShopifyAnalytics.meta || {}; 277 window.ShopifyAnalytics.meta.currency = 'PKR'; 278 var meta = {"page":{"pageType":"home","requestId":"f2d47b0c-a07c-407d-8a33-45dd663acc0e-1791404836"}}; 279 for (var attr in meta) { 280 window.ShopifyAnalytics.meta[attr] = meta[attr]; 281 } 282</script>
vendor: 1 bytes, line 282
282
283<script class="analytics"> 284 (function () { 285 var customDocumentWrite = function(content) { 286 var jquery = null; 287 288 if (window.jQuery) { 289 jquery = window.jQuery; 290 } else if (window.Checkout && window.Checkout.$) { 291 jquery = window.Checkout.$; 292 } 293 294 if (jquery) { 295 jquery('body').append(content); 296 } 297 }; 298 299 var hasLoggedConversion = function(token) { 300 if (token) { 301 return document.cookie.indexOf('loggedConversion=' + token) !== -1; 302 } 303 return false; 304 } 305 306 var setCookieIfConversion = function(token) { 307 if (token) { 308 var twoMonthsFromNow = new Date(Date.now()); 309 twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2); 310 311 document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow; 312 } 313 } 314 315 var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || []; 316 window.ShopifyAnalytics.lib.trekkie = window.trekkie; 317 if (trekkie.integrations) { 318 return; 319 } 320 trekkie.methods = [ 321 'identify', 322 'page', 323 'ready', 324 'track', 325 'trackForm', 326 'trackLink' 327 ]; 328 trekkie.factory = function(method) { 329 return function() { 330 var args = Array.prototype.slice.call(arguments); 331 args.unshift(method); 332 trekkie.push(args); 333 if (method == 'track' || method == 'page') { 334 var pageUrl; 335 try { 336 pageUrl = window.location.href; 337 } catch (e) {} 338 var pageReferrer; 339 try { 340 pageReferrer = document.referrer; 341 } catch (e) {} 342 try { 343 if (window.__TREKKIE_SHIM_QUEUE == null) { 344 window.__TREKKIE_SHIM_QUEUE = []; 345 } 346 window.__TREKKIE_SHIM_QUEUE.push({ 347 from: 'trekkie-stub', 348 method: method, 349 args: args.slice(1), 350 pageContext: { 351 url: pageUrl, 352 referrer: pageReferrer 353 } 354 }); 355 } catch (e) { 356 // no-op 357 } 358 } 359 return trekkie; 360 }; 361 }; 362 for (var i = 0; i < trekkie.methods.length; i++) { 363 var key = trekkie.methods[i]; 364 trekkie[key] = trekkie.factory(key); 365 } 366 trekkie.load = function(config) { 367 trekkie.config = config || {}; 368 trekkie.config.initialDocumentCookie = document.cookie; 369 var first = document.getElementsByTagName('script')[0]; 370var script = document.createElement('script'); 371script.type = 'text/javascript'; 372script.onerror = function(e) { 373 var scriptFallback = document.createElement('script'); 374 scriptFallback.type = 'text/javascript'; 375 scriptFallback.onerror = function(error) { 376 var Monorail = { 377 produce: function produce(monorailDomain, schemaId, payload) { 378 var currentMs = new Date().getTime(); 379 var event = { 380 schema_id: schemaId, 381 payload: payload, 382 metadata: { 383 event_created_at_ms: currentMs, 384 event_sent_at_ms: currentMs 385 } 386 }; 387 return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event)); 388 }, 389 sendRequest: function sendRequest(endpointUrl, payload) { 390 // Try the sendBeacon API 391 if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) { 392 var blobData = new window.Blob([payload], { 393 type: 'text/plain' 394 }); 395 396 if (window.navigator.sendBeacon(endpointUrl, blobData)) { 397 return true; 398 } // sendBeacon was not successful 399 400 } // XHR beacon 401 402 var xhr = new XMLHttpRequest(); 403 404 try { 405 xhr.open('POST', endpointUrl); 406 xhr.setRequestHeader('Content-Type', 'text/plain'); 407 xhr.send(payload); 408 } catch (e) { 409 console.log(e); 410 } 411 412 return false; 413 }, 414 isIos12: function isIos12() { 415 return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1; 416 } 417 }; 418 Monorail.produce('monorail-edge.shopifysvc.com', 419 'trekkie_storefront_load_errors/1.1', 420 {shop_id: 61684646110, 421 theme_id: 158147084510, 422 app_name: "storefront", 423 context_url: window.location.href, 424 source_url: "//www.lalschocolates.com/cdn/s/trekkie.storefront.51e69540e15035ae012ec8cc42e8f9cd792233a0.min.js"}); 425 426 }; 427 scriptFallback.async = true; 428 scriptFallback.src = '//www.lalschocolates.com/cdn/s/trekkie.storefront.51e69540e15035ae012ec8cc42e8f9cd792233a0.min.js'; 429 first.parentNode.insertBefore(scriptFallback, first); 430}; 431script.async = true; 432script.src = '//www.lalschocolates.com/cdn/s/trekkie.storefront.51e69540e15035ae012ec8cc42e8f9cd792233a0.min.js'; 433first.parentNode.insertBefore(script, first); 434 435 }; 436 trekkie.load( 437 {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":61684646110,"isMerchantRequest":null,"themeId":158147084510,"themeCityHash":"8137886236623882233","contentLanguage":"en","currency":"PKR","eventMetadataId":"b3440f35-3506-4ed1-ac1b-59af027e65c6"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain","enabledBetaFlags":["764d78cb","8450a54b","4c64608a"]},"Session Attribution":{},"S2S":{"facebookCapiEnabled":true,"source":"trekkie-storefront-renderer","apiClientId":580111}} 438 ); 439 440 var loaded = false;
441 trekkie.ready(function() { 442 if (loaded) return; 443 loaded = true; 444 445 window.ShopifyAnalytics.lib = window.trekkie; 446 447 var originalDocumentWrite = document.write; 448 document.write = customDocumentWrite; 449 try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {}; 450 document.write = originalDocumentWrite; 451 452 var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/) 453 var token = match? match[1]: undefined; 454 if (!hasLoggedConversion(token)) { 455 setCookieIfConversion(token); 456 457 } 458 }); 459 460 window.ShopifyAnalytics.lib.page(null,{"pageType":"home","requestId":"f2d47b0c-a07c-407d-8a33-45dd663acc0e-1791404836","shopifyEmitted":true}); 461 462 var eventsListenerScript = document.createElement('script'); 463 eventsListenerScript.async = true; 464 eventsListenerScript.src = "//www.lalschocolates.com/cdn/shopifycloud/storefront/assets/shop_events_listener-4e26a9ce.js"; 465 document.getElementsByTagName('head')[0].appendChild(eventsListenerScript); 466})();</script>
466 467
467<script> 468 if (!window.ga || (window.ga && typeof window.ga !== 'function')) { 469 window.ga = function ga() { 470 (window.ga.q = window.ga.q || []).push(arguments); 471 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 472 window.Shopify.analytics.publish("ga_stub_called", {}, {sendTo: "google_osp_migration"}); 473 } 474 console.error("Shopify's Google Analytics stub called with:", Array.from(arguments), "\nSee https://help.shopify.com/manual/promoting-marketing/pixels/pixel-migration#google for more information."); 475 }; 476 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 477 window.Shopify.analytics.publish("ga_stub_initialized", {}, {sendTo: "google_osp_migration"}); 478 } 479 } 480</script>
vendor: 1 bytes, line 480
480
481<script 482 defer 483 src="https://www.lalschocolates.com/cdn/shopifycloud/perf-kit/shopify-perf-kit-3.9.6.min.js" 484 data-application="storefront-renderer" 485 data-shop-id="61684646110" 486 data-render-region="gcp-us-central1" 487 data-page-type="index" 488 data-theme-instance-id="158147084510" 489 data-theme-name="Kalles" 490 data-theme-version="3.0.0" 491 data-monorail-region="shop_domain" 492 data-resource-timing-sampling-rate="10" 493 data-shs="true" 494 data-shs-beacon="true" 495 data-shs-export-with-fetch="true" 496 data-shs-logs-sample-rate="1" 497 data-shs-beacon-endpoint="https://www.lalschocolates.com/api/collect" 498></script>
498 499<meta name="shopify-y" content="5b25592a-b4e8-42a9-8988-f68e5d618e3a" data-expiration="1822962436000"><meta name="shopify-s" content="0265ffb4-6c87-4fe2-94b2-d7b0836afa8c" data-expiration="1791406636000"><meta name="new-cookie-storage-activated" content="t"> 500</head> 501<body class="kalles_2-0 lazy_icons min_cqty_0 btnt4_style_1 zoom_tp_1 css_scrollbar template-index js_search_true cart_pos_side kalles_toolbar_false hover_img2 swatch_style_square swatch_list_size_small label_style_rounded wrapper_cus header_full_true header_sticky_true hide_scrolld_true des_header_4 h_transparent_false h_tr_top_false h_banner_false top_bar_true catalog_mode_false cat_sticky_false prs_bordered_grid_1 prs_sw_limit_false search_pos_canvas t4_compare_false dark_mode_false h_chan_space_false type_quickview_2 des_btns_prmb_1 t4_cart_count_0 lazyloadt4s rtl_false"> 502<!-- Google Tag Manager (noscript) -->
vendor: 68 bytes, lines 502-503
502 503<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
503GTM-PF2255GJ
vendor: 83 bytes, lines 503-504
503" 504height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
505<!-- End Google Tag Manager (noscript) --><a class="in-page-link visually-hidden skip-link" href="#nt_content">Skip to content</a> 506<div id="ld_cl_bar" class="op__0 pe_none"></div><div id="nt_wrapper"><header id="ntheader" class="ntheader header_4 h_icon_pegk"><h1 class="h2 site-header__logo dn">Lals - Chocolate and Gifting Brand in Pakistan</h1><div class="ntheader_wrapper pr z_200"><div id="shopify-section-header_top" class="shopify-section type_carousel"><link rel="stylesheet" href="https://unpkg.com/flickity@2/dist/flickity.min.css">
507<script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
507 508 509<div class="h__top bgbl pt__10 pb__10 fs__12 flex fl_center al_center"> 510 <div class="container"> 511 <div class="row al_center"><div class="col-lg-2 col-12 tc tl_lg col-md-12 dn_true_1024"><div class="header-text"><i class="pegk pe-7s-call"></i><a class="cg" href="tel:+923041115257"> +92-304-111-5257</a></div></div><div class="col-lg-8 col-12 tc col-md-12 tr_lg dn_false_1024"><div class="header-text"><div class="ticker-new"> 512<div class="ticker-track"> 513<span><a href="/collections/birthday-collection-26">Our Newest Birthday Collection is live! Place your order today</a></span> 514<span><a href="/pages/same-day-delivery">Good news, Karachi! Same Day Delivery has arrived. Faster delivery, lower delivery charges, available in selected areas.</a></span> 515<span><a href="/collections/free-delivery"> Enjoy free delivery in Karachi, Lahore & Islamabad on snackables & bars for prepaid orders above Rs. 5,000</a></span> 516</div> 517</div> 518 519<style> 520.ticker-new { 521overflow: hidden; 522white-space: nowrap; 523} 524.ticker-track { 525display: inline-block; 526animation: scroll 35s linear infinite; 527} 528.ticker-track span { 529margin-right: 8rem; 530} 531 532@keyframes scroll { 533from { 534transform: translateX(20%); 535} 536to { 537transform: translateX(-100%); 538} 539} 540@media (max-width: 1024px) { 541.ticker-track { 542animation-duration: 35s; 543} 544} 545</style></div></div></div> 546 </div> 547</div> 548 549<style> 550 button.flickity-button { 551 display: none; 552 } 553 ol.flickity-page-dots { 554 display: none; 555 } 556 .flickity-enabled.is-draggable { 557 background-color: #e2f4e8; 558 } 559 button.flickity-button { 560 display: none; 561 } 562 .AnnouncementBar__Wrapper { 563 padding: 0 !important; 564 } 565 p.AnnouncementBar__Content.mySlides { 566 margin-bottom: 0 !important; 567 } 568 .carousel-cell { 569 width: 100%; 570 margin-right: 10px; 571 display: flex; 572 align-items: center; 573 justify-content: center; 574 } 575 .carousel.is-fullscreen .carousel-cell { 576 height: 100%; 577 } 578 .carousel-cell-image { 579 display: block; 580 max-height: 100%; 581 } 582 .carousel.is-fullscreen .carousel-cell-image { 583 max-width: 100%; 584 } 585 #section-header_top { 586 background: ; 587 color: ; 588 } 589 @media (max-width:767px){ 590 p.AnnouncementBar__Content.mySlides { 591 text-align: center; 592 padding: 5px; 593 } 594 .header-text { 595 text-align: center; 596 } 597 } 598</style><div class="ticker" > 599 <div style="background: #e2f4e8;"> 600 <marquee behavior="scroll" direction="left"> 601 <div style="text-align: center; padding:0px 0 0px; margin: 0px 0 0px 0; color: #000;font-size: 12px;"><a href="/collections/valentines-day"><p style="font-size:12px; color:#000; margin:5px 0px 0px 0px; font-family:'Montserrat', serif;"><strong></strong></p></a></div> 602 </marquee> 603 </div> 604 </div><style data-shopify>.h__top {min-height:41px; font-size:12px;}.h__top,.h__top.bgbl { background-color: #e2f4e8;color:#000000 } 605 .header-text >.cg,.h__top .nt_currency,.h__top .nt-social .cb { color:#000000 } 606 .h__top .cr { color:#ec0101 } 607 .header-text >a:not(.cg),.dark_mode_true .header-text>a:not(.cg) { color:#222222 }</style><style> @media (max-width: 768px) {#shopify-section-header_top .h__top.bgbl.pt__10.pb__10.fs__12.flex.fl_center.al_center {padding-bottom: 0; padding-top: 0; }} </style></div><div id="shopify-section-header_4" class="shopify-section sp_header_mid"><div class="header__mid"><div class="container"> 608 <div class="row al_center css_h_se"> 609 <div class="col-lg-3 col-md-3 col-3"> 610 <style> 611 .giftCountry .selectedCountry { 612 width: fit-content; 613 display: inline-block; 614 position: relative; 615 cursor: pointer; 616 pointer-events: none; 617 } 618 .selectedCountrygroup { 619 display: inline-flex; 620 align-items: center; 621 gap: 10px; 622 vertical-align: bottom; 623 margin-right: 5px; 624 } 625 .giftCountry svg { 626 width: 25px; 627 } 628 .selectedcity { 629 display: inline-flex; 630 align-items: center; 631 vertical-align: super; 632 } 633 .giftCountry img { 634 width: 18px; 635 border: 1px solid; 636 } 637 .giftCountry .selectCountrydropdown { 638 position: absolute; 639 left: 0; 640 opacity: 0; 641 transition: 0.5s; 642 margin-top: 2px; 643 } 644 .giftCountry { 645 position: relative; 646 } 647 .giftCountry .selectedCountry:hover .selectCountrydropdown { 648 opacity: 1; 649 } 650 .giftCountry .selectedCountry:hover .selectCountrydropdown ul li { 651 list-style: none; 652 } 653 .giftCountry .selectedCountry:hover .selectCountrydropdown { 654 opacity: 1; 655 background-color: #fff; 656 box-shadow: 0 0 5px #00000040; 657 padding: 2px 5px 5px 5px; 658 } 659 .selectedCountrygroup { 660 font-size: 12px; 661 } 662 @media (max-width: 1024px) { 663 .giftCountry { 664 background-color: #fff; 665 box-shadow: 0 0 5px #00000038; 666 padding: 2px; 667 border-radius: 2px; 668 } 669 .giftCountry .selectedCountry { 670 display: flex; 671 } 672 .d-none-header { 673 display:none; 674 } 675 } 676 </style> 677 678 679<a href="/" data-id='#nt_menu_canvas' class="push_side push-menu-btn dn_lg lh__1 flex al_center"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="16" viewB
679ox="0 0 30 16"><rect width="30" height="1.5"></rect><rect y="7" width="20" height="1.5"></rect><rect y="14" width="30" height="1.5"></rect></svg></a><div class="dn db_lg cus_txt_h"> 680</div> 681 </div> 682 <div class="col-lg-6 col-md-6 col-6 tc"><div class=" branding ts__05 lh__1"><a class="dib" href="/" ><img class="w__100 logo_normal dn db_lg" src="//www.lalschocolates.com/cdn/shop/files/Untitled-2_180x.png?v=1639390006" srcset="//www.lalschocolates.com/cdn/shop/files/Untitled-2_180x.png?v=1639390006 1x,//www.lalschocolates.com/cdn/shop/files/[email protected]?v=1639390006 2x" alt="Lals - Chocolate and Gifting Brand in Pakistan" style="width: 140px"><img class="w__100 logo_sticky dn" src="//www.lalschocolates.com/cdn/shop/files/Untitled-2_140x.png?v=1639390006" srcset="//www.lalschocolates.com/cdn/shop/files/Untitled-2_140x.png?v=1639390006 1x,//www.lalschocolates.com/cdn/shop/files/[email protected]?v=1639390006 2x" alt="Lals - Chocolate and Gifting Brand in Pakistan" style="width: 100px"><img class="w__100 logo_mobile dn_lg" src="//www.lalschocolates.com/cdn/shop/files/Untitled-2_140x.png?v=1639390006" srcset="//www.lalschocolates.com/cdn/shop/files/Untitled-2_140x.png?v=1639390006 1x,//www.lalschocolates.com/cdn/shop/files/[email protected]?v=1639390006 2x" alt="Lals - Chocolate and Gifting Brand in Pakistan" style="width: 100px;"></a></div> </div> 683 <div class="col-lg-3 col-md-3 col-3 tr"><div class="nt_action in_flex al_center cart_des_1"><a class="icon_search push_side cb chp" data-id="#nt_search_canvas" href="/search"><i class="pegk pe-7s-search"></i></a> 684 685 <div class="my-account ts__05 pr dn db_md"> 686 <a class="cb chp db push_side" href="https://www.lalschocolates.com/customer_authentication/redirect?locale=en®ion_country=PK" data-id="#nt_login_canvas"><i class="pegk pe-7s-user"></i></a></div><a class="icon_like cb chp pr db_md js_link_wis" href="/search/?view=wish"><i class="pegk pe-7s-like pr"><span class="op__0 ts_op pa tcount jswcount bgb br__50 cw tc">0</span></i></a><div class="icon_cart pr"><a class="push_side pr cb chp db" href="/cart" data-id="#nt_cart_
686canvas"><i class="pegk pe-7s-shopbag pr"><span class="op__0 ts_op pa tcount jsccount bgb br__50 cw tc">0</span></i></a></div></div></div> 687 </div> 688 689 <div class="aa header__bot border_true dn db_lg"><nav class="nt_navigation tc hover_side_up nav_arrow_true"> 690 <ul id="nt_menu_id" class="nt_menu in_flex wrap al_center"><li id="item_header_4-1" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/collections/free-delivery" target="_self" style="color:#007eb4">FREE DELIVERY</a></li> 691<li id="item_simple_mGAi8N" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/pages/same-day-delivery" target="_self">SAME DAY DELIVERY<span class="lbc_nav" style="background-color: transparent">KHI Only</span></a></li> 692<li id="item_simple_jN7peD" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/collections/birthday-collection-26" target="_self">BIRTHDAY COLLECTION ð</a></li> 693<li id="item_simple_WjUAip" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/collections/curated-gift-hampers" target="_self">GIFT HAMPERS</a></li> 694<li id="item_7e2f38e4-755a-4e56-a303-37431d54e383" class="type_mega menu_wid_cus menu-item has-children menu_has_offsets menu_center pos_center" > 695 <a class="lh__1 flex al_center pr hi3 " href="/collections/chocolates" target="_self">CHOCOLATES</a> 696 <div class="cus sub-menu"><div class="container" style="width:850px"><div class="row lazy_menu unlazy_menu_mega" data-jspackery='{ "itemSelector": ".sub-column-item","gutter": 0,"percentPosition": true,"originLeft": true }'> 697<div id="bk_ab96f21e-d1d6-4624-ba0f-95fbad6472eb" class="type_mn_link menu-item sub-column-item col-4"><a href="/collections/chocolates" target="_self">CHOCOLATES</a><ul class="sub-column not_tt_mn"><li class="menu-item"><a href="/collections/chocolate-bars">Chocolate Bars</a></li><li class="menu-item"><a href="/collections/chocolate-barks">Chocolate Barks</a></li><li class="menu-item"><a href="/collections/chocolate-boxes">Chocolate Boxes</a></li><li class="menu-item"><a href="/collections/chocolate-platters">Chocolate Platters</a></li><li class="menu-item"><a href="/collections/chocolate-pouches">Chocolate Pouches</a></li><li class="menu-item"><a href="/collections/sugar-free-chocolates">Sugar Free Chocolates</a></li></ul> 698 </div><div id="bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1" class="type_mn_banner menu-item sub-column-item col-4"> 699 <div class="banner_hzoom nt_promotion oh pr"><div class="nt_bg_lz pr_lazy_img lazyloadt4s item__position " data-bgset="//www.lalschocolates.com/cdn/shop/files/Chocolate_Bar_97b36fcf-cee3-456e-a913-3a2435c781bb_1x1.webp?v=1791284201" data-ratio="1.0" data-sizes="auto" data-parent-fit="cover"></div><a href="/collections/chocolate-bars" target="_self" class="pa t__0 l__0 r__0 b__0"></a><div class="nt_promotion_html pa t__0 l__0 tc pe_none"><h2 class="lalo CDP-TXT fs__30 mg__0 lh__1 cw mb__10">CHOCOLATE BARS</h2> 700<span class="fs__16 mg__0 cw CDP-BTN">SHOP NOW</span> 701 702<style> 703h2.lalo.CDP-TXT.fs__30{font-family:unset!important;} 704</style></div> 705 </div> 706 </div><style data-shopify>#bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_promotion_html {top:90%;left:50%; 707 transform: translate(-50%, -90%);} 708 #bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_promotion_html,#bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_promotion_html>*,#bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_promotion_html .btn_icon_true:after{ color: #ffffff } 709 #bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_promotion>a:after{ background-color: #000000;opacity: 0.2 } 710 #bk_eccde2a2-42e5-4d93-a6e6-c045b0ef3ff1 .nt_bg_lz {padding-top:100.0%;} 711 </style><div id="bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8" class="type_mn_banner menu-item sub-column-item col-4"> 712 <div class="banner_hzoom nt_promotion oh pr"><div class="nt_bg_lz pr_lazy_img lazyloadt4s item__position " data-bgset="//www.lalschocolates.com/cdn/shop/files/Chocolate_Bark_1x1.webp?v=1791284220" data-ratio="1.0" data-sizes="auto" data-parent-fit="cover"></div><a href="/collections/chocolate-barks" target="_self" class="pa t__0 l__0 r__0 b__0"></a><div class="nt_promotion_html pa t__0 l__0 tc pe_none"><h2 class="lalo CDP-TXT fs__30 mg__0 lh__1 cw mb__10">CHOCOLATE BARKS</h2> 713<span class="fs__16 mg__0 cw CDP-BTN">SHOP NOW</span> 714 715<style> 716h2.lalo.CDP-TXT.fs__30{font-family:unset!important;} 717</style></div> 718 </div>
719 </div><style data-shopify>#bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_promotion_html {top:90%;left:50%; 720 transform: translate(-50%, -90%);} 721 #bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_promotion_html,#bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_promotion_html>*,#bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_promotion_html .btn_icon_true:after{ color: #ffffff } 722 #bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_promotion>a:after{ background-color: #000000;opacity: 0.2 } 723 #bk_78be302e-2549-4cc3-9f71-aa4bd7f005e8 .nt_bg_lz {padding-top:100.0%;} 724 </style></div></div></div> 725 </li><li id="item_header_4-0" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/collections/cakes" target="_self">CAKES</a></li> 726<li id="item_2a4076b1-3768-4cf2-a0ec-941e7ae8c2a4" class="type_mega menu_wid_cus menu-item has-children menu_has_offsets menu_center pos_center" > 727 <a class="lh__1 flex al_center pr hi3 " href="/collections/patisserie" target="_self">PATISSERIE</a> 728 <div class="cus sub-menu"><div class="container" style="width:850px"><div class="row lazy_menu unlazy_menu_mega" data-jspackery='{ "itemSelector": ".sub-column-item","gutter": 0,"percentPosition": true,"originLeft": true }'> 729<div id="bk_2a4b6f2d-f44b-4208-aeb1-43dc571a6686" class="type_mn_link menu-item sub-column-item col-4"><a href="/collections/patisserie" target="_self">PATISSERIE</a><ul class="sub-column not_tt_mn"><li class="menu-item"><a href="/collections/macarons">Macarons</a></li><li class="menu-item"><a href="/collections/snackables">Snackables</a></li><li class="menu-item"><a href="/collections/cakes">Cakes</a></li></ul> 730 </div><div id="bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de" class="type_mn_banner menu-item sub-column-item col-4"> 731 <div class="banner_hzoom nt_promotion oh pr"><div class="nt_bg_lz pr_lazy_img lazyloadt4s item__position " data-bgset="//www.lalschocolates.com/cdn/shop/files/Dropdown-1-min_1x1.webp?v=1709202260" data-ratio="1.0" data-sizes="auto" data-parent-fit="cover"></div><a href="/collections/macarons" target="_self" class="pa t__0 l__0 r__0 b__0"></a><div class="nt_promotion_html pa t__0 l__0 tc pe_none"><h2 class="lalo CDP-TXT fs__30 mg__0 lh__1 cw mb__10">MACARONS</h2> 732<span class="fs__16 mg__0 cw CDP-BTN">SHOP NOW</span> 733 734<style> 735h2.lalo.CDP-TXT.fs__30{font-family:unset!important;} 736</style></div> 737 </div> 738 </div><style data-shopify>#bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_promotion_html {top:90%;left:50%; 739 transform: translate(-50%, -90%);} 740 #bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_promotion_html,#bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_promotion_html>*,#bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_promotion_html .btn_icon_true:after{ color: #ffffff } 741 #bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_promotion>a:after{ background-color: #000000;opacity: 0.2 } 742 #bk_8f3aa220-c7c9-4e46-b60e-38e90e2c66de .nt_bg_lz {padding-top:100.0%;} 743 </style><div id="bk_bef2d788-c90a-43df-affd-207db67686fd" class="type_mn_banner menu-item sub-column-item col-4"> 744 <div class="banner_hzoom nt_promotion oh pr"><div class="nt_bg_lz pr_lazy_img lazyloadt4s item__position " data-bgset="//www.lalschocolates.com/cdn/shop/files/Snackables_82e17295-5b57-423f-8e42-01ee317c144d_1x1.webp?v=1791284358" data-ratio="1.0" data-sizes="auto" data-parent-fit="cover"></div><a href="/collections/snackables" target="_self" class="pa t__0 l__0 r__0 b__0"></a><div class="nt_promotion_html pa t__0 l__0 tc pe_none"><h2 class="lalo fs__30 mg__0 lh__1 cw mb__10 CDP-TXT">SNACKABLES</h2> 745<span class="fs__16 mg__0 cw CDP-BTN">SHOP NOW</span> 746 747<style> 748h2.lalo.CDP-TXT.fs__30{font-family:unset!important;} 749</style></div> 750 </div> 751 </div><style data-shopify>#bk_bef2d788-c90a-43df-affd-207db67686fd .nt_promotion_html {top:90%;left:50%; 752 transform: translate(-50%, -90%);} 753 #bk_bef2d788-c90a-43df-affd-207db67686fd .nt_promotion_html,#bk_bef2d788-c90a-43df-affd-207db67686fd .nt_promotion_html>*,#bk_bef2d788-c90a-43df-affd-207db67686fd .nt_promotion_html .btn_icon_true:after{ color: #ffffff } 754 #bk_bef2d788-c90a-43df-affd-207db67686fd .nt_promotion>a:after{ background-color: #000000;opacity: 0.2 } 755 #bk_bef2d788-c90a-43df-affd-207db67686fd .nt_bg_lz {padding-top:100.0%;} 756 </style></div></div></div> 757 </li><li id="item_b53bfb61-c0f0-4c88-b47b-60a852b2951e" class="type_mega menu_wid_cus menu-item has-children menu_has_offsets menu_center pos_center" > 758 <a class="lh__1 flex al_center pr hi3 " href="/collections/gifts" target="_self">GIFTING</a> 759 <div class="cus sub-menu"><div class="container" style="width:850px"><div class="row lazy_menu unlazy_menu_mega" data-jspackery='{ "itemSelector": ".sub-column-item","gutter": 0,"percentPosition": true,"originLeft": true }'> 760<div id="bk_link_HfGDep" class="type_mn_link menu-item sub-column-item col-4"><a href="/collections/occassions" target="_self">SHOP BY OCCASION</a><ul class="sub-column not_tt_mn"><li class="menu-item"><a href="/collections/birthday-collection-26">Birthday Collection</a></li><li class="menu-item"><a href="/collections/wedding-gifts-anniversary">Wedding & Anniversary</a></li><li class="menu-item"><a href="/collections/baby-arrivals">New Parents & Baby</a></li><li class="menu-item"><a href="/collections/graduation-gifts">Graduation</a></li><li class="menu-item"><a href="/collections/new-year-corporate-gifting">Corporate</a></li><li class="menu-item"><a href="/collections/housewarming-gifts">Housewarming</a></li><li class="menu-item"><a href="/collections/congrtaulations-gifts">Congratulations</a></li><li class="menu-item"><a href="/collections/thinking-of-you">Thinking of You</a></li></ul>
761 </div><div id="bk_link_ktRD4n" class="type_mn_link menu-item sub-column-item col-4"><a href="/collections/customer-favourites" target="_self">CUSTOMER FAVOURITES</a><ul class="sub-column not_tt_mn"><li class="menu-item"><a href="/collections/chocolate-platters-copy-gifting">Chocolate Platters</a></li><li class="menu-item"><a href="https://www.lalschocolates.com/collections/favourites-boxes">Chocolate Boxes</a></li><li class="menu-item"><a href="/collections/favourites-bars">Chocolate Bars</a></li><li class="menu-item"><a href="/collections/favourites-bark">Chocolate Barks</a></li><li class="menu-item"><a href="https://www.lalschocolates.com/collections/favourites-gifts">Gift Hampers</a></li><li class="menu-item"><a href="/collections/favourites-snackables">Snackables</a></li><li class="menu-item"><a href="/collections/favourites-cakes">Cakes</a></li><li class="menu-item"><a href="/collections/sugar-free">Sugar Free</a></li><li class="menu-item"><a href="/collections/guilt-free-snacking">Guilt Free Snacking</a></li></ul> 762 </div><div id="bk_link_TGtnfA" class="type_mn_link menu-item sub-column-item col-4"><a href="/collections/shop-by-recipient" target="_self">SHOP BY RECIPIENT</a><ul class="sub-column not_tt_mn"><li class="menu-item"><a href="/collections/gifts-for-him">For Him</a></li><li class="menu-item"><a href="/collections/gifts-for-her">For Her</a></li><li class="menu-item"><a href="/collections/gifts-for-kids-and-teens">For Kids</a></li></ul> 763 </div></div></div></div> 764 </li><li id="item_52687428-50e8-4393-bd51-246b885b7970" class="menu-item type_simple" ><a class="lh__1 flex al_center pr" href="/collections/most-popular" target="_self">MOST POPULAR</a></li> 765</ul> 766</nav> 767 768<style> 769 770 771 772 773 774 775 776 777 778 779</style> </div> 780 781 </div></div><style data-shopify>.header__mid .css_h_se {min-height: 63px}.nt_menu >li>a{height:66px}.header__mid .nt_menu{min-height: 66px}.header__bot.border_true {border-color:#ececec}</style></div></div> 782</header> 783<div id="nt_content"><div id="shopify-section-template--21621502738654__16357021760efbe511" class="shopify-section nt_section type_slideshow type_carousel tp_se_cdt2"><div class="SlideshowWrapper nt_se_template--21621502738654__16357021760efbe511 nt_full se_height_adapt nt_first"> 784 <div class="fade_flick_0 slideshow row no-gutters equal_nt nt_slider js_carousel prev_next_0 btn_owl_1 dot_owl_2 dot_color_1 btn_vi_1" data-flickityt4s-js='{ "fade":0,"cellAlign": "center","imagesLoaded": 0,"lazyload": 0,"freeScroll": 0,"wrapAround": true,"autoPlay" : 8000,"pauseAutoPlayOnHover" : false, "rightToLeft": false, "prevNextButtons": true,"pageDots": false, "contain" : 1,"adaptiveHeight" : 1,"dragThreshold" : 5,"percentPosition": 1 }'><div id="nt_img_8UDbFe" class="col-12 slideshow__slide bg_content_false border_bl_false br_style_solid"><div class="oh pr nt_img_txt"><div class="js_full_ht4 img_slider_block dek_img_slide"> 785 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/birthday-web-banner_new.png?v=1787039386" data-ratio="3.0" data-sizes="auto"></div> 786 </div> 787 <div class="js_full_ht4 img_slider_block mb_img_slide"> 788 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/mobile-banner-birthday_new.png?v=1787040128" data-ratio="0.6818181818181818" data-sizes="auto"></div> 789 </div><div class="caption-wrap caption-w-2 pe_none z_100 tl_md tl"> 790 <div class="pa_txts mb_h_pos39 mb_v_pos50 h_pos39 v_pos50 caption"> 791 <div class="none"></div> 792 </div> 793 </div> 794 <a href="/collections/birthday-collection-26" target="_self" class="pa t__0 l__0 b__0 r__0"></a> 795 </div> 796 </div><div id="nt_img_rPHdd7" class="col-12 slideshow__slide bg_content_false border_bl_false br_style_solid"><div class="oh pr nt_img_txt"><div class="js_full_ht4 img_slider_block dek_img_slide"> 797 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/web_banner_1_cad2b5ea-24ba-491c-a29d-564d27475478.png?v=1778221992" data-ratio="3.0" data-sizes="auto"></div> 798 </div> 799 <div class="js_full_ht4 img_slider_block mb_img_slide"> 800 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/mobile_banner_a93f58cf-366f-4255-b549-69f192758b42.png?v=1778221898" data-ratio="0.6818181818181818" data-sizes="auto"></div> 801 </div><div class="caption-wrap caption-w-2 pe_none z_100 tl_md tl"> 802 <div class="pa_txts mb_h_pos39 mb_v_pos50 h_pos39 v_pos50 caption"> 803 <div class="none"></div> 804 </div> 805 </div> 806 <a href="/pages/same-day-delivery" target="_self" class="pa t__0 l__0 b__0 r__0"></a> 807 </div> 808 </div><div id="nt_18302aea-0b23-427b-8ea0-f3aeefde1ee7" class="col-12 slideshow__slide bg_content_false border_bl_false br_style_solid"><div class="oh pr nt_img_txt"><div class="js_full_ht4 img_slider_block dek_img_slide"> 809 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/Mango_coconut_web_banner.png?v=1780571469" data-ratio="3.0" data-sizes="auto"></div> 810 </div> 811 <div class="js_full_ht4 img_slider_block mb_img_slide"> 812 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/Mango_and_coconut_bonbon_mobile_banner.png?v=1780571467" data-ratio="0.6818181818181818" data-sizes="auto"></div> 813 </div><div class="caption-wrap caption-w-2 pe_none z_100 tl_md tl"> 814 <div class="pa_txts mb_h_pos39 mb_v_pos50 h_pos39 v_pos50 caption"> 815 <div class="none"></div> 816 </div> 817 </div> 818 <a href="https://www.lalschocolates.com/collections/mango-summer" target="_self" class="pa t__0 l__0 b__0 r__0"></a> 819 </div> 820 </div><div id="nt_img_m3f9Em" class="col-12 slideshow__slide bg_content_false border_bl_false br_style_solid"><div class="oh pr nt_img_txt"><div class="js_full_ht4 img_slider_block dek_img_slide"> 821 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/Web-banner---generic-mint_26B.png?v=1780900660" data-ratio="3.0" data-sizes="auto"></div> 822 </div> 823 <div class="js_full_ht4 img_slider_block mb_img_slide"> 824 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/generic-mint-mobile-banner-C_1.png?v=1780661485" data-ratio="0.6818181818181818" data-sizes="auto"></div> 825 </div><div class="caption-wrap caption-w-2 pe_none z_100 tl_md tl"> 826 <div class="pa_txts mb_h_pos39 mb_v_pos50 h_pos39 v_pos50 caption"> 827 <div class="none"></div> 828 </div> 829 </div> 830 <a href="https://www.lalschocolates.com/collections/chocolates" target="_self" class="pa t__0 l__0 b__0 r__0"></a> 831 </div> 832 </div><div id="nt_img_kdCKBG" class="col-12 slideshow__slide bg_content_false border_bl_false br_style_solid"><div class="oh pr nt_img_txt"><div class="js_full_ht4 img_slider_block dek_img_slide"> 833 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/Web-banner-1800x600-wedding_25.png?v=1761200866" data-ratio="3.0" data-sizes="auto"></div> 834 </div> 835 <div class="js_full_ht4 img_slider_block mb_img_slide"> 836 <div class="bg_rp_norepeat bg_sz_cover lazyloadt4s item__position center center img_none pa l__0 t__0 r__0 b__0" data-bgset="//www.lalschocolates.com/cdn/shop/files/mobile-banner-wedding_25.png?v=1761200863" data-ratio="0.6818181818181818" data-sizes="auto"></div> 837 </div><div class="caption-wrap caption-w-2 pe_none z_100 tl_md tl"> 838 <div class="pa_txts mb_h_pos39 mb_v_pos50 h_pos39 v_pos50 caption"> 839 <div class="none"></div> 840 </div> 841 </div> 842 <a href="/collections/wedding-collection-2025" target="_self" class="pa t__0 l__0 b__0 r__0"></a> 843 </div> 844 </div></div> 845</div><style data-shopify>.nt_se_template--21621502738654__16357021760efbe511 {margin-top: 0 !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;padding-top: 0 !important;padding-right: 10px !important;padding-bottom: 0 !important;padding-left: 10px; !important;}@media only screen and (max-width: 767px) { .nt_se_template--21621502738654__16357021760efbe511 {margin-top: 20px !important;margin-right: auto !important;margin-bottom: 0px !important;margin-left: auto !important;padding-top: 0 !important;padding-right: 15px !important;padding-bottom: 0 !important;padding-left: 15px !important;} }</style> 846<style data-shopify>#nt_img_8UDbFe .nt_img_txt>a:after{ background-color: #000000;opacity: 0.0 }#nt_img_8UDbFe .img_slider_block{padding-top:146.66666666666669%}@media (min-width: 768px) { #nt_img_8UDbFe .img_slider_block{padding-top:33.33333333333333%} }#nt_img_rPHdd7 .nt_img_txt>a:after{ background-color: #000000;opacity: 0.0 }#nt_img_rPHdd7 .img_slider_block{padding-top:146.66666666666669%}@media (min-width: 768px) { #nt_img_rPHdd7 .img_slider_block{padding-top:33.33333333333333%} }#nt_18302aea-0b23-427b-8ea0-f3aeefde1ee7 .nt_img_txt>a:after{ background-color: #000000;opacity: 0.0 }#nt_18302aea-0b23-427b-8ea0-f3aeefde1ee7 .img_slider_block{padding-top:146.66666666666669%}@media (min-width: 768px) { #nt_18302aea-0b23-427b-8ea0-f3aeefde1ee7 .img_slider_block{padding-top:33.33333333333333%} }#nt_img_m3f9Em .nt_img_txt>a:after{ background-color: #000000;opacity: 0.0 }#nt_img_m3f9Em .img_slider_block{padding-top:146.66666666666669%}@media (min-width: 768px) { #nt_img_m3f9Em .img_slider_block{padding-top:33.33333333333333%} }#nt_img_kdCKBG .nt_img_txt>a:after{ background-color: #000000;opacity: 0.0 }#nt_img_kdCKBG .img_slider_block{padding-top:146.66666666666669%}@media (min-width: 768px) { #nt_img_kdCKBG .img_slider_block{padding-top:33.33333333333333%} }</style></div><div id="shopify-section-template--21621502738654__1639980528cdbe86fa" class="shopify-section nt_section type_custom_html"><div class="nt_se_template--21621502738654__1639980528cdbe86fa container"><div class="code_setting"><div class="tc" style="border:1px solid #edce87; padding:20px;margin-top:50px;"> 847<p style="margin-bottom:0;">ALL OUR PRODUCTS ARE DELIVERED IN CHILLER VANS SO THE WEATHER DOES NOT IMPACT OUR QUALITY</p> 848</div></div></div><style data-shopify>.nt_se_template--21621502738654__1639980528cdbe86fa {margin-top: 0 !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;}</style> 849</div><div id="shopify-section-template--21621502738654__1640803066184bf93b" class="shopify-section nt_section type_custom_html"><div class="nt_se_template--21621502738654__1640803066184bf93b container"><div class="code_setting"><div class="row"> 850<div class="col-12 col-md-6 cstm-sec-5-img-p "><a href="/collections/birthday-collection-26"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/birthday-Image-under-the-banner---fathers-day.png?v=1786953536"></a></div> 851 852<div class="col-md-6 col-12 cstm-3-p"> 853<div class="WAJIHA cstm-sec-5-p cstm-sec-6-p cstm-sec-3"> 854<h2 class="cstm-sec-5-h" style="font-size:25px;">The Sweetest Way to Celebrate</h2> 855<hr class="cstm-hr" style="margin:0;"> 856<p class="cstm-sec-3-mb" style="font-size:13px;letter-spacing:1px;margin-top:20px;margin-bottom:20px;">Find the perfect birthday gift for every person on your list. Whether you're celebrating a lifelong friend, a loved one, or a colleague, discover handcrafted chocolates, freshly baked cakes, beautiful hampers, and thoughtful birthday treats designed to make them feel truly celebrated.</p> 857 <a href="/collections/birthday-collection-26"><button class="cstm-sec-5-btn">SHOP NOW</button></a> 858</div> 859</div> 860</div> 861 862 863<style> 864@media (min-width: 1200px) { 865.WAJIHA.cstm-sec-3{ 866padding-top: unset !important; 867padding-bottom: unset !important; 868display: grid; 869align-content: center; 870margin-top: 0px !important; 871text-align: center !important; 872height: 100% !important; 873} 874} 875</style></div></div><style data-shopify>.nt_se_template--21621502738654__1640803066184bf93b {margin-top: 50px !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;}</style> 876</div><div id="shopify-section-template--21621502738654__1640116884582def42" class="shopify-section nt_section type_packery type_carousel type_collection_list"><div class="nt_se_template--21621502738654__1640116884582def42 container"><style> 877 .fs_16{font-size:16px;color:#313131;line-height:22.4px;font-weight:700;} 878</style><div class="mt__30 nt_cats_holder row equal_nt hoverz_false cat_space_20 cat_design_10"><div id="nt_1640116884ce464345-0" class="cat_grid_item cat_space_item cat_grid_item_1 col-lg-4 col-md-4 col-12" > 879 <div class="cat_grid_item__content pr oh"> 880 <a href="/collections/curated-gift-hampers" class="db cat_grid_item__link" style="margin: 0 auto;max-height: 800px;max-width: 540px"><div class="cat_grid_item__overlay item__position nt_bg_lz lazyloadt4s center" data-bgset="//www.lalschocolates.com/cdn/shop/files/Best-wishes-eid-hamper-image-1b_1_1_1x1.jpg?v=1756293482" data-ratio="0.675" data-sizes="auto" data-parent-fit="width" style="padding-top:148.14814814814815%;"></div></a><div class="cat_grid_item__wrapper pe_none"> 881 <div class="cat_grid_item__title h3"><h3 style="margin: 0; font-size: 15px;"><span style="font-family:'Libre Caslon Text', serif">Curated Gift Hampers</span></h3> 882<p style="font-weight:300">
882Celebrate loved ones with our curated range of Pastry Baskets and Chocolate Filled Hampers.</p> 883<a href="/collections/curated-gift-hampers"><button class="cstm-sec-5-btn">SHOP NOW</button></a></div></div></div> 884</div><div id="nt_1640116884ce464345-1" class="cat_grid_item cat_space_item cat_grid_item_2 col-lg-4 col-md-4 col-12" > 885 <div class="cat_grid_item__content pr oh"> 886 <a href="/collections/cakes" class="db cat_grid_item__link" style="margin: 0 auto;max-height: 800px;max-width: 540px"><div class="cat_grid_item__overlay item__position nt_bg_lz lazyloadt4s center" data-bgset="//www.lalschocolates.com/cdn/shop/files/confetti_cake_1_1_1_1x1.jpg?v=1756293498" data-ratio="0.675" data-sizes="auto" data-parent-fit="width" style="padding-top:148.14814814814815%;"></div></a><div class="cat_grid_item__wrapper pe_none"> 887 <div class="cat_grid_item__title h3"><h3 style="margin: 0; font-size: 15px;"><span style="font-family:'Libre Caslon Text', serif">Cakes and Cupcake</span></h3> 888<p style="font-weight:300">Gourmet Cakes and Pastries for every <br>occasion.</p> 889<a href="https://lals-sd.myshopify.com/collections/cakes"><button class="cstm-sec-5-btn">SHOP NOW</button></a></div></div></div> 890</div><div id="nt_1640116884ce464345-2" class="cat_grid_item cat_space_item cat_grid_item_3 col-lg-4 col-md-4 col-12" > 891 <div class="cat_grid_item__content pr oh"> 892 <a href="/collections/gelato" class="db cat_grid_item__link" style="margin: 0 auto;max-height: 800px;max-width: 540px"><div class="cat_grid_item__overlay item__position nt_bg_lz lazyloadt4s center" data-bgset="//www.lalschocolates.com/cdn/shop/files/freshly_made_gelato-min_1x1.webp?v=1709201721" data-ratio="0.675" data-sizes="auto" data-parent-fit="width" style="padding-top:148.14814814814815%;"></div></a><div class="cat_grid_item__wrapper pe_none"> 893 <div class="cat_grid_item__title h3"><h3 style="margin: 0; font-size: 15px;"><span style="font-family:'Libre Caslon Text', serif">Freshly made Gelato</span></h3> 894<p style="font-weight:300">Discover our delicious Gelato that is made fresh daily in small batches.</p> 895<a href="https://lals-sd.myshopify.com/collections/gelato"><button class="cstm-sec-5-btn">SEE MENU</button></a></div></div></div> 896</div></div></div><style data-shopify></style> 897</div><div id="shopify-section-template--21621502738654__164012079926a117f2" class="shopify-section nt_section type_custom_html"><div class="nt_se_template--21621502738654__164012079926a117f2 container"><div class="code_setting"><div class="row"> 898 899<div class="col-md-6 col-12"> 900<div class="cstm-sec-5-p cstm-sec-5-new"> 901<h2 class="cstm-sec-5-h wajiha">Chocolates for YOU</h2> 902<hr class="cstm-hr"> 903<p class="cstm-sec-5-new-p" style="font-size:13px;letter-spacing:1px;line-height:20px;">Fresh & delicious chocolates handmade by chocolatier Lal Majid in Karachi. Perfect for sharing, snacking or for you to enjoy in a moment of pure indulgence.</p> 904<a href="/collections/chocolate-boxes"><button class="cstm-sec-5-btn">I WANT IT NOW</button></a> 905</div> 906<div class="row cstm-sec-5-row"> 907<div class="col-6 cstm-height-sec-5"> <a href="/collections/chocolates"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Image-1.jpg?v=1710225618" alt="bob bons" style="width:100%" loading="lazy"></a> 908</div> 909<div class="col-6 cstm-height-sec-5"><a href="collections/chocolate-barks"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/image-2.jpg?v=1710225618" alt="chocolate-collection" style="width:100%" loading="lazy"></a></div> 910</div> 911</div> 912 913<div class="col-12 col-md-6"><a href="/collections/chocolates"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Main-Right-Image.jpg?v=1710225618" alt="Chocolates_for_YOU_tile" style="width:100%" loading="lazy"></a></div> 914</div> 915 916<style> 917@media (min-width:1200px) { 918h2.cstm-sec-5-h.wajiha { 919font-size: 23px !important; 920} 921} 922</style></div></div><style data-shopify>.nt_se_template--21621502738654__164012079926a117f2 {margin-top: 50px !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;}@media only screen and (max-width: 767px) { .nt_se_template--21621502738654__164012079926a117f2 {margin-top: 0 !important;margin-right: auto !important;margin-bottom: 0 !important;margin-left: auto !important;} }</style> 923</div><div id="shopify-section-template--21621502738654__16401227015168e00e" class="shopify-section nt_section type_custom_html"><div class="nt_se_template--21621502738654__16401227015168e00e container"><div class="code_setting"><div class="row"> 924<div class="col-12 col-md-6 cstm-sec-5-img-p"><a href="/collections/chocolate-boxes"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/keepsake_boxes_2-min.webp?v=1709203152" alt="croissant" style="width:100%" loading="lazy"></a></div> 925 926<div class="col-md-6 col-12"> 927<div class="cstm-sec-5-p cstm-sec-6-p"> 928<h2 class="cstm-sec-5-h wajiha">Keepsake Chocolate Boxes</h2> 929<hr class="cstm-hr"> 930<p class="cstm-sec-5-p" style="font-size:13px;letter-spacing:1px;">Chocolate boxes filled with handmade classic chocolates or chocolate bon bons. The perfect gifts for birthdays, anniversaries, holiday celebrations, or even a gift to yourself - these boxes are a delight to gift (& get) and will surely deliver an extraordinary taste experience. Send it with a greeting card along with a personalized greeting card message to make it all the more special. Untie the ribbon, open the box & taste Lals masterpieces.</p> 931<p style="font-size:13px;letter-spacing:1px;">GET YOUR FAVORITE DESSERT AT YOUR DOORSTEP</p> 932<hr class="cstm-sec-6-hr"> 933<p style="font-size:13px;letter-spacing:1px;"><a href="/pages/contact-us#kda">KDA OUTLET</a></p> 934<hr class="cstm-sec-6-hr"> 935<p style="font-size:13px;letter-spacing:1px;"><a href="/pages/contact-us#dha">SHAHBAZ OUTLET</a></p> 936<hr class="cstm-sec-6-hr-m"> 937<a href="/collections/gifts"><button class="cstm-sec-5-btn">GIFT NOW</button></a> 938</div> 939</div> 940 941</div> 942<style>.cstm-sec-6-hr > p > a:hover{color:#fff;}</style></div></div><style data-shopify>.nt_se_template--21621502738654__16401227015168e00e {margin-top: 50px !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;}</style> 943</div><div id="shopify-section-template--21621502738654__4d37698c-8512-4200-a3f5-eadc5ac280f1" class="shopify-section nt_section type_testimonials type_carousel"><div class="nt_se_template--21621502738654__4d37698c-8512-4200-a3f5-eadc5ac280f1 wrap"><div class="container"><div class="wrap_title mb__40 des_title_8"> 944 <h2 class="section-title tc pr flex fl_center al_center fs__16 title_8 "><span class="mr__10 ml__10 fs_16">Customer Reviews</span></h2> 945 <hr class="cstm-hr"> 946 <span class="dn tt_divider"><span></span><i class="dn clprfalse title_8 la-gem"></i><span></span></span><span class="section-subtitle db tc sub-title"></span> 947 </div><style> 948 .fs_16{font-size:16px;color:#313131;line-height:22.4px;font-weight:700;} 949</style><div class="equal_nt position_8 row quotes_wrapper quotes_des_1 js_carousel nt_slider prev_next_2 btn_owl_1 dot_owl_3 dot_color_3 btn_vi_2" data-flickityt4s-js='{"imagesLoaded": 0,"adaptiveHeight": 1, "contain": 1, "groupCells": "100%", "dragThreshold" : 5, "cellAlign": "left","wrapAround": true,"prevNextButtons": false,"percentPosition": 1,"pageDots": true, "autoPlay" : 6000, "pauseAutoPlayOnHover" : true, "rightToLeft": false }'><div id="bk_template--16396890964190__4d37698c-8512-4200-a3f5-eadc5ac280f1-16734972127e931ee8-0" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Tuba Saleem</div><p>Thank you! Orders received on time and everything tasted amazing!!</p> 950 951 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 952 </div> 953</div></div><div id="bk_quote_4UCGy8" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Hania Malik</div><p>I appreciate your response and efforts. Lals never disappoints and hence the reason to choose you at all times!</p> 954 955 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 956 </div> 957</div></div><div id="bk_quote_eTQfbE" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Sadia Khurram</div><p>The cake I ordered was a Masterpiece, every detail from the flavour to the design even the caption all was spot on. It was simply Perfect!!!!<br/>I highly recommend your services n anyone looking for a beautifully crafted cake.</p> 958 959 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 960 </div> 961</div></div><div id="bk_quote_6Jfxnn" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Aemen Usuf</div><p>My mother received her birthday surprise and it made our day special.<br/>The entire process was smooth and easy.<br/>I love how I can send my family cakes on any occasions now while I am away in Germany. </p> 962 963 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 964 </div> 965</div></div><div id="bk_template--16396890964190__4d37698c-8512-4200-a3f5-eadc5ac280f1-16734972127e931ee8-1" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Rabeea Amir</div><p>Your products are always amazing but I shop online first time and m surprised with your fast delivery</p> 966 967 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 968 </div> 969</div></div><div id="bk_5d3f797f-8209-4461-a992-470fff324573" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Zaib</div><p>Thank you so much for such an amazing experience. It was quick and you people are very supportive & polite. Highly recommended and for sure Iâll be using this platform again. As we are always fan of your food, the ambiance, good quality and beautiful presentation now totally worth the online shopping experience.</p> 970 971 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 972 </div> 973</div></div><div id="bk_ccb07ff8-a765-4cc3-a73d-64626521a80b" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Dr Kamran</div><p>Very nice and enjoyable. Keep it up.</p> 974 975 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 976 </div> 977</div></div><div id="bk_55549508-9944-45e5-b504-2038a9addfcb" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Hummad Shariff</div><p>You guys have always done good I appreciate it thank you for great service always.</p> 978 979 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 980 </div> 981</div></div><div id="bk_30c3b7cf-e775-4279-8557-9a67d3c897ff" class="quote_col col-12 col-md-6 col-lg-4 mb__35"><div class="quote_slide tc"><div class="quote_content"><div class="quote_author cd fwsb">Zohaib</div><p>I received my order and this is delicious</p> 982 983 <div class="quote_rating fs__13 fwb mb__10 cra rating_5"><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i><i class="facl facl-star"></i></div> 984 </div> 985</div></div></div></div></div><style data-shopify>#shopify-section-template--21621502738654__4d37698c-8512-4200-a3f5-eadc5ac280f1 {background-color: #e2f4e8 !important;}.nt_se_template--21621502738654__4d37698c-8512-4200-a3f5-eadc5ac280f1 {margin-top: 50px !important;margin-right: auto !important;margin-bottom: 50px !important;margin-left: auto !important;padding-top: 50px !important;padding-right: 0 !important;padding-bottom: 50px !important;padding-left: 0 !important;}</style></div><section id="shopify-section-template--21621502738654__16401567540a44e615" class="shopify-section spaced-section"><div class="nt_se_template--21621502738654__16401567540a44e615 nt_full"><div class="container"> 986<div class="row"> 987 988<div class="Section-7"> 989<h2 class="Section-7-h">Corporate Gifting</h2> 990<p class="Section-7-p">CHOCOLATES THAT MEAN BUSINESS.</p> 991<p class="Section-7-p">Impress clients and corporate customers with Luxurious Gifts from Lals Chocolates; Be it our premium Chocolate Boxes, Curated Hampers or Gourmet Cakes. We have gifts that will surely be remembered long after the last bite. Customize with a personalized card or a company ribbon to make them even more memorable.</p> 992</div> 993 994<div class="col-12 col-md-6"><img src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/gift_8ce2a7f7-264d-4beb-9fcb-723dddef3304-min.webp?v=1709203306" alt="gifting" style="width:100%" loading="lazy"></div> 995<div class="col-12 col-md-6"><form method="post" action="/contact#contact_form" accept-charset="UTF-8" class="contact-form"><input type="hidden" name="form_type" value="contact" /><input type="hidden" name="utf8" value="â" /> 996 997 998<p style="font-weight:600;">Enter your contact information below and our corporate team will reach out to you</p> 999<p><input placeholder="Full Name" type="text" id="-name" name="contact[name]" required="required" value=""></p> 1000<p> 1001<input 1002pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" 1003placeholder="Your Email" 1004type="email" 1005id="-email" 1006name="contact[email]" 1007autocorrect="off" 1008autocapitalize="off" 1009value="" 1010aria-required="true" 1011required="required"></p><p><input placeholder="Phone Number" type="tel" id="-phone" name="contact[phone]" value=""></p><textarea rows="20" id="-message" name="contact[body]" required="required" placeholder="Message"></textarea> 1012 1013<p class="Section-7-btn"><input type="submit" class="button w__100" value="Submit"></p></form></div> 1014</div></div><style data-shopify>#shopify-section-template--21621502738654__16401567540a44e615 {background-color: #ffffff !important;}.nt_se_template--21621502738654__16401567540a44e615 {margin-top: 50px !important;margin-right: auto !important;margin-bottom: 20px !important;margin-left: auto !important;}</style> 1015</section></div> 1016 <footer id="nt_footer" class="bgbl footer-1"><div id="shopify-section-footer_top" class="shopify-section footer__top type_instagram">
1016<div class="footer__top_wrap footer_sticky_false footer_collapse_true nt_bg_overlay pr oh pb__30 pt__80" > 1017 <div class="container pr z_100"> 1018 <div class="row"><div class="col-lg-4 col-md-6 col-12 mb__50 order-lg-1 order-1" ><aside id="block_27b3a13c-428b-4fb4-b515-e56f9d8c4119" class="widget widget_text"><h3 class="widget-title fwsb flex al_center fl_between fs__16 mg__0 mb__30"><span class="txt_title">Lals</span><span class="nav_link_icon ml__5"></span></h3><hr class="cstm-hr-footer-top"> 1019 <div class="LALS4 textwidget widget_footer"><div class="row"> 1020 1021<div class="col-10 CSTM-FOOTER-MARGIN"> 1022<ul class="address-list"> 1023<li style="font-size: 14px; margin-top:10px;text-transform: uppercase;"> 1024<div style="margin-bottom:-6px;">Main Line</div> 1025<a style="font-size:12px;" href="tel:923041115257">+92304-1115257</a> 1026</li> 1027 1028<li style="font-size: 14px;text-transform: uppercase;"> 1029<div style="margin-bottom:-6px;">Website order queries</div> 1030<a style="font-size:12px;" href="tel:923071115257">+92307-1115257</a> 1031</li> 1032<li style="font-size: 14px; margin-top:10px; text-transform: uppercase;"> 1033<div style="margin-bottom:-6px;">Karachi outlet</div> 1034<a style="font-size:12px;" href="https://api.whatsapp.com/send?phone=923171115257&text=Hello,%20I%20have%20a%20question%20about%20Lals%20Chocolate?" target="_blank">+92317-1115257</a> 1035</li> 1036</ul> 1037<ul class="f-extra-add"> 1038<li> 1039<span style="font-size: 14px;text-transform: uppercase;"> 1040<div style="margin-bottom:-6px;">Lahore outlet </div></span> 1041<a style="font-size:12px;" href="https://api.whatsapp.com/send?phone=923051115257&text=Hello,%20I%20have%20a%20question%20about%20Lals%20Chocolate?" target="_blank"><span style="font-size: 12px;">+92305-1115257 </span></a> 1042</li> 1043<li> 1044<span style="font-size: 14px;text-transform: uppercase;"> 1045<div style="margin-bottom:-6px;">Islamabad outlet </div></span> 1046<a style="font-size:12px;" href="https://api.whatsapp.com/send?phone=923241115257&text=Hello,%20I%20have%20a%20question%20about%20Lals%20Chocolate?" target="_blank"><span style="font-size: 12px;">+92324-1115257 </span></a> 1047</li> 1048<li> 1049</li> 1050<li style="font-size: 14px;text-transform: uppercase;"> 1051<div style="margin-bottom:-6px;">Email </div> 1052<span style="font-size: 14px;"><a style="text-transform: none;" href="mailto:[email protected]">[email protected]</a></span> 1053</li> 1054</ul> 1055</div> 1056</div></div> 1057 </aside></div><div class="col-lg-4 col-md-6 col-12 mb__50 order-lg-2 order-1" ><aside id="block_1581507840818" class="widget widget_nav_menu"><h3 class="widget-title fwsb flex al_center fl_between fs__16 mg__0 mb__30"><span class="txt_title">Useful links</span><span class="nav_link_icon ml__5"></span></h3><hr class="cstm-hr-footer-top"> 1058 <div class="LALS5 menu_footer widget_footer"><ul class="menu"><li class="menu-item"><a href="/pages/chocolate-guide" >Menu</a></li><li class="menu-item"><a href="/pages/about-us" >About Us</a></li><li class="menu-item"><a href="/pages/contact-us" >Our Outlets</a></li><li class="menu-item"><a href="/pages/in-the-news" >In The News</a></li><li class="menu-item"><a href="https://www.lalschocolates.com/pages/shipping-returns-policy#faq-section" >FAQs</a></li><li class="menu-item"><a href="/pages/shipping-returns-policy" >Shipping & Return Policy</a></li><li class="menu-item"><a href="/pages/payment-policy" >Payments</a></li><li class="menu-item"><a href="/pages/blog-posts" >Blogs</a></li><li class="menu-item"><a href="/pages/corporate-gifting" >Lals Corporate Gifting</a></li><li class="menu-item"><a href="https://track.siardigital.com/lals" target="_blank" rel="noopener">Track Your Order</a></li></ul></div> 1059 </aside></div><div class="col-lg-4 col-md-6 col-12 mb__50 order-lg-3 order-1" ><aside id="block_1581507835369" class="widget widget_text"><h3 class="widget-title fwsb flex al_center fl_between fs__16 mg__0 mb__30"><span class="txt_title">Newsletter</span><span class="nav_link_icon ml__5"></span></h3><hr class="cstm-hr-footer-top"> 1060 <div class="LALS2 textwidget widget_footer newl_des_3"> 1061 <p>Subscribe for Latest Updates and Trends</p><form method="post" action="/contact#contact_form" id="contact_form" accept-charset="UTF-8" class="js_mail_agree mc4wp-form pr z_100"><input type="hidden" name="form_type" value="customer" /><input type="hidden" name="utf8" value="â" /><input type="hidden" name="contact[tags]" value="newsletter"> 1062 <div class="mc4wp-form-fields"> 1063 <div class="signup-newsletter-form row no-gutters pr oh "> 1064 <div class="col-md col-12 col_email"><input pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" type="email" name="contact[email]" placeholder="Your email address" value="" class="tc tl_md class_ip input-text" required="required"></div> 1065 </div> 1066 <div class="col-md-auto col-12"><button type="submit" class="cstm-button-news btn_new_icon_false w__100 submit-btn truncate"><span>Subscribe!</span></button></div></div> 1067 <div class="mc4wp-response"></div></form><div class="nt-social " style="margin-top:25px;"> 1068 <a data-no-instant="" rel="noopener noreferrer nofollow" href="https://www.facebook.com/LALSchocolates" target="_blank" class="facebook cb ttip_nt tooltip_top"> 1069 <span class="tt_txt">Facebook</span> 1070 <i class="facl facl-facebook" style="font-size:18px;"></i> 1071 </a> 1072 1073 <a data-no-instant="" rel="noopener noreferrer nofollow" href="https://www.instagram.com/lalschocolates/" target="_blank" class="instagram cb ttip_nt tooltip_top"> 1074 <span class="tt_txt">Instagram</span> 1075 <i class="facl facl-instagram" style="font-size:18px;"></i> 1076 </a> 1077
1078 <a href="https://api.whatsapp.com/send?phone=923071115257&text=Hello,%20I%20have%20a%20question%20about%20Lals%20Chocolate?" target="_blank" class="whatsapp cb ttip_nt tooltip_top"><span class="tt_txt">Whatsapp</span><i class="lab la-whatsapp" style="font-size:20px;"></i></a> 1079 </div> 1080 <div style="margin-top:20px;"> 1081 <img style="width:190px" src="https://cdn.shopify.com/s/files/1/0616/8464/6110/files/cards.jpg?v=1656501338" alt="Visa-logo" loading="lazy"> 1082 </div> 1083 <style>.nt-social a{margin:0 5px;}</style></div> 1084 </aside></div></div> 1085 </div> 1086</div><style data-shopify>.footer__top a:hover{color: #c9a74d}.footer__top .signup-newsletter-form,.footer__top .signup-newsletter-form input.input-text {background-color: transparent;}.footer__top .signup-newsletter-form input.input-text {color: #222222 }.footer__top .signup-newsletter-form .submit-btn {color:#ffffff;background-color: #222222 }.footer__top .widget-title { color: #222222 }.footer__top a:not(:hover) { color: #222222 }.footer__top .signup-newsletter-form{ border-color: #878787 }.footer__top .nt_bg_overlay:after{ background-color: #000000;opacity: 0.0 }.footer__top_wrap {background-color: #e2f4e8;background-repeat: no-repeat;background-size: cover;background-attachment: scroll;background-position: center center;color:#222222 }</style></div><div id="shopify-section-footer_bot" class="shopify-section footer__bot"> <div class="footer__bot_wrap pt__20 pb__20"> 1087 <div class="container pr tc"> 1088 <div class="row"><div class="col-lg-6 col-md-12 col-12 col_1 f_bot_bt_menu"><ul id="footer-menu" class="clearfix"><li class="menu-item"><a href="/pages/privacy-policy">Privacy Policy</a></li><li class="menu-item"><a href="/pages/terms-conditions">Terms & Conditions</a></li></ul></div><div class="col-lg-6 col-md-12 col-12 col_2 f_bot_bt_copy">© 2026 <span class="">LALS</span> | Powered by <a target="_blank" href="https://siardigital.com/"><img class="siar_logo_img" style="margin-bottom: 4px;" src="https://cdn.shopify.com/s/files/1/0689/8221/0714/files/Group_195.svg?v=1756445094" alt="Siar logo" width="38" height="13"></a></div></div> 1089 </div> 1090</div><style data-shopify>.footer__bot_wrap a:hover,.footer__bot_wrap a.selected:not(:hover){color: #c9a74d}.footer__bot_wrap,.footer__bot .nt_currency ul,.footer__bot .nt_currency.cg {background-color: #f5f5f5;color:#878787}.footer__bot a:not(:hover) { color: #878787 }</style></div></footer> 1091 </div>
1091<script type="application/ld+json"> 1092 { 1093 "@context": "https://schema.org", 1094 "@type": "Organization", 1095 "name": "Lals - Luxury Chocolate Brand in Pakistan", 1096 "url": "https://www.lalschocolates.com/", 1097 "logo": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1098 "sameAs": [ 1099 "https://www.facebook.com/LALSchocolates", 1100 "https://www.instagram.com/lalschocolates/", 1101 "https://www.linkedin.com/company/lals", 1102 "https://api.whatsapp.com/send?phone=923071115257" 1103 ], 1104 1105 "contactPoint": [ 1106 { 1107 "@type": "ContactPoint", 1108 "telephone": "+92 (305) 3864642", 1109 "contactType": "customer service" 1110 } 1111 ], 1112 "location": [ 1113 { 1114 "@type": "ProfessionalService", 1115 "parentOrganization": { 1116 "name": "Lals - Luxury Chocolate Brand in Pakistan" 1117 }, 1118 "name": "Lals - Luxury Chocolate Brand in Pakistan", 1119 "image": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1120 "PriceRange": "Contact for Price", 1121 "hasMap": "https://www.google.com/maps/place/Lals+Chocolates/@24.808199,67.061597,14z/data=!4m5!3m4!1s0x0:0x453de4af21720e74!8m2!3d24.8081988!4d67.061597?hl=en", 1122 "address": { 1123 "@type": "PostalAddress", 1124 "addressLocality": "Sindh", 1125 "addressRegion": "Karachi", 1126 "postalCode": "75500", 1127 "streetAddress": "5-C Khayaban-e-Shahbaz, Main Shahbaz Commercial Area Shahbaz Commercial Area Phase 6 Defence Housing Authority" 1128 }, 1129 "openingHours": [ 1130 "Monday, 10amâ10pm", 1131 "Tuesday, 10amâ10pm", 1132 "Wednesday, 10amâ10pm", 1133 "Thursday, 10amâ10pm", 1134 "Friday, 10amâ10pm", 1135 "Saturday, 10amâ10pm", 1136 "Sunday, 10amâ10pm" 1137 ], 1138 "telephone": "+92 (305) 3864642" 1139 } 1140 ], 1141 "image": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1142 "email": "[email protected]", 1143 "description": "Lals chocolates offer premium quality chocolates in Pakistan. Choose from a variety of chocolate boxes and curated gift hampers and celebrate your special occasions." 1144 } 1145</script>
vendor: 1 bytes, line 1145
1145
1146<script type="application/ld+json"> 1147 { 1148 "@context": "https://schema.org", 1149 "@type": "LocalBusiness", 1150 "address": { 1151 "@type": "PostalAddress", 1152 "addressLocality": "Sindh", 1153 "addressRegion": "Karachi", 1154 "postalCode": "75500", 1155 "streetAddress": "5-C Khayaban-e-Shahbaz, Main Shahbaz Commercial Area Shahbaz Commercial Area Phase 6 Defence Housing Authority" 1156 }, 1157 "openingHoursSpecification": { 1158 "@type": "OpeningHoursSpecification", 1159 "dayOfWeek": [ 1160 "Monday, 10amâ10pm", 1161 "Tuesday, 10amâ10pm", 1162 "Wednesday, 10amâ10pm", 1163 "Thursday, 10amâ10pm", 1164 "Friday, 10amâ10pm", 1165 "Saturday, 10amâ10pm", 1166 "Sunday, 10amâ10pm" 1167 ], 1168 "opens": "10:00AM", 1169 "closes": "10:00PM" 1170 }, 1171 "name": "Lals - Luxury Chocolate Brand in Pakistan", 1172 "Description": "Lals chocolates offer premium quality chocolates in Pakistan. Choose from a variety of chocolate boxes and curated gift hampers and celebrate your special occasions.", 1173 "telephone": "+92 (305) 3864642", 1174 "url": "https://www.lalschocolates.com/", 1175 "logo": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1176 "image": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1177 "priceRange": "Contact Us For Price Range", 1178 "sameAs": [] 1179 } 1180</script>
vendor: 1 bytes, line 1180
1180
1181<script type="application/ld+json"> 1182 { 1183 "@context": "http://schema.org", 1184 "@type": "WebSite", 1185 "url": "https://www.lalschocolates.com/", 1186 "name": "Lals - Luxury Chocolate Brand in Pakistan" 1187 } 1188</script>
vendor: 1 bytes, line 1188
1188
1189<script type="application/ld+json"> 1190 { 1191 "@context": "https://schema.org/", 1192 "@type": "Service", 1193 "serviceType": "Chocolate artisan", 1194 "provider": { 1195 "@type": "LocalBusiness", 1196 "name": "Lals - Luxury Chocolate Brand in Pakistan", 1197 "address": "5-C Khayaban-e-Shahbaz, Main Shahbaz Commercial Area Shahbaz Commercial Area Phase 6 Defence Housing Authority", 1198 "telephone": "+92 (305) 3864642", 1199 "image": "https://cdn.shopify.com/s/files/1/0616/8464/6110/files/Untitled-2_180x.png", 1200 "priceRange": "Contact Us For Price Range" 1201 }, 1202 "areaServed": { 1203 "@type": "State", 1204 "name": "Pakistan" 1205 } 1206 } 1207</script>
1207<a id="nt_backtop" class="pf br__50 z__100 des_bt1" href="/"><span class="tc br__50 db cw"><i class="pr pegk pe-7s-angle-up"></i></span></a> 1208<div id="order_day" class="dn">Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday</div> 1209<div id="order_mth" class="dn">January,February,March,April,May,June,July,August,September,October,November,December</div> 1210<div id="js_we_stcl" class="dn">Not enough items available. Only [max] left.</div><a rel="nofollow" id="wis_ntjs" class="dn" data-get="/search" href="/search/?view=wish"> 1211 <span class="txt_add">Add to Wishlist</span> 1212 <span class="txt_view">Browse Wishlist</span> 1213 <span class="txt_remve">Remove Wishlist</span> 1214 </a><div class="pswp pswp_t4_js dn pswp_tp_light" tabindex="-1" role="dialog" aria-hidden="true"> 1215 <div class="pswp__bg"></div> 1216 <div class="pswp__scroll-wrap"> 1217 <div class="pswp__container"> 1218 <div class="pswp__item"></div> 1219 <div class="pswp__item"></div> 1220 <div class="pswp__item"></div> 1221 </div> 1222 <div class="pswp__ui pswp__ui--hidden"> 1223 <div class="pswp__top-bar"> 1224 <div class="pswp__counter"></div> 1225 <button class="pswp__button pswp__button--close" title="Close (Esc)"></button> 1226 <button class="pswp__button pswp__button--share" title="Share"></button> 1227 <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> 1228 <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button> 1229 <div class="pswp__preloader"> 1230 <div class="pswp__preloader__icn"> 1231 <div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div> 1232 </div> 1233 </div> 1234 </div> 1235 <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"> 1236 <div class="pswp__share-tooltip"></div> 1237 </div> 1238 <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button> 1239 <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button> 1240 <div class="pswp__caption"><div class="pswp__caption__center"></div></div> 1241 </div> 1242 </div> 1243 <div class="pswp__thumbnails"></div> 1244</div> 1245<div class="mask-overlay ntpf t__0 r__0 l__0 b__0 op__0 pe_none"></div><div id="shopify-section-cart_widget" class="shopify-section"><div id="nt_cart_canvas" class="nt_fk_canvas dn"> 1246 <form action="/cart" method="post" novalidate class="nt_mini_cart nt_js_cart flex column h__100 btns_cart_1"> 1247 <input required="required" style="color:#000;" class="mt__15" type="text" name="attributes[Term_Condition]" id="Term_Condition" hidden value="I hereby acknowledge and agree to abide by the terms and conditions."> 1248 1249 <input type="hidden" data-cart-attr-rm name="attributes[cat_mb_items_per_row]" value=""><input type="hidden" data-cart-attr-rm name="attributes[cat_tb_items_per_row]" value=""><input type="hidden" data-cart-attr-rm name="attributes[cat_dk_items_per_row]" value=""> 1250 <input type="hidden" data-cart-attr-rm name="attributes[auto_hide_ofsock]" value=""><input type="hidden" data-cart-attr-rm name="attributes[paginate_ntt4]" value=""><input type="hidden" data-cart-attr-rm name="attributes[limit_ntt4]" value=""><input type="hidden" data-cart-attr-rm name="attributes[use_bar_lmntt4]" value=""> 1251 <div class="mini_cart_header flex fl_between al_center"><div class="h3 widget-title tu fs__16 mg__0">Shopping cart</div><i class="close_pp pegk pe-7s-close ts__03 cd"></i></div><div class="mini_cart_wrap"> 1252 <div class="mini_cart_content fixcl-scroll"> 1253 <div class="fixcl-scroll-content"> 1254 <div class="empty tc mt__40"><i class="las la-shopping-bag pr mb__10"></i><p>Your cart is empty.</p><p class="return-to-shop mb__15"><a class="button button_primary tu js_add_ld" href="/collections/all"><span class="truncate">Return To Shop</span></a></p></div> 1255 <div class="cookie-message dn">Enable cookies to use the shopping cart</div><div class="mini_cart_items js_cat_items" data-rendert4s="/cart/?view=viewjs"><div class="lds_bginfinity pr mt__10 mb__20"></div></div><div class="mini_cart_tool js_cart_tool tc dn"></div><div data-cart-upsell-js data-baseurl="/recommendations/products" data-limit="10" data-id=""></div></div> 1256 </div> 1257 <div class="mini_cart_footer js_cart_footer dn"> 1258 <div class="js_cat_dics"></div><div class="total row fl_between al_center"> 1259 <div class="col-auto"><strong>Subtotal:</strong></div> 1260 <div class="col-auto tr js_cat_ttprice"><div class="cart_tot_price"><span class=money>PKR 0</span></div> 1261 </div> 1262 </div><p class="pr db mb__5 fs__12"><input type="checkbox" id="cart_agree" class="js_agree_ck mr__5" name="ck_lumise" checked><label for="cart_agree">I agree with the <a href="/pages/terms-conditions" target="_blank">terms and conditions</a>. 1263</label><svg class="dn scl_selected"><use xlink:href="#scl_selected"/></svg></p><a href="/cart" class="button btn-cart tc mt__10 mb__10 js_add_ld"><span class="truncate">View cart</span></a></div> 1264 </div></form> 1265</div>
1266<script> 1267(function () { 1268 if (window.__nt_mini_cart_minus_qty1_remove) return; 1269 window.__nt_mini_cart_minus_qty1_remove = true; 1270 1271 function attach($) { 1272 var $scope = $('#nt_cart_canvas'); 1273 if ($scope.length === 0) { setTimeout(function () { attach($); }, 100); return; } 1274 $scope.on('click', '.nt_js_cart .mini_cart_item .minus.qty_1', function (e) { 1275 var $btn = $(this); 1276 var $form = $btn.closest('form.nt_js_cart'); 1277 if ($form.hasClass('frm_cart_ajax_false')) return; 1278 1279 e.preventDefault(); 1280 e.stopPropagation(); 1281 e.stopImmediatePropagation(); 1282 1283 var $item = $btn.closest('.js_cart_item'); 1284 var vid = $btn.data('id') || $item.find('input.qty_cart_js').data('id'); 1285 if (!vid) return; 1286 1287 $form.addClass('ld_nt_cl'); 1288 $item.find('.ld_cart_bar').addClass('on_star'); 1289 1290 function releaseLoading() { 1291 $item.find('.ld_cart_bar').addClass('on_end'); 1292 setTimeout(function () { 1293 $item.find('.ld_cart_bar').attr('class', '').addClass('ld_cart_bar'); 1294 $form.removeClass('ld_nt_cl'); 1295 }, 280); 1296 } 1297 1298 fetch('/cart/change.js', { 1299 method: 'POST', 1300 headers: { 'Content-Type': 'application/json;' }, 1301 body: JSON.stringify({ id: vid, quantity: 0 }) 1302 }) 1303 .then(function (r) { return r.json(); }) 1304 .then(function () { 1305 $item.slideUp(250, function () { $(this).remove(); }); 1306 if (window.geckoShopify && typeof window.geckoShopify.onCartUpdate === 'function') { 1307 window.geckoShopify.onCartUpdate(0, 0); 1308 } 1309 $(document.body).trigger('CartUpdateSuccess CartChangeSuccess'); 1310 releaseLoading(); 1311 }) 1312 .catch(function (err) { 1313 releaseLoading(); 1314 console.log('mini cart remove error: ' + err); 1315 }); 1316 }); 1317 } 1318 1319 function ready() { 1320 var jq = window.jQuery_T4NT || window.jQuery || window.$; 1321 if (!jq) { setTimeout(ready, 100); return; } 1322 attach(jq); 1323 } 1324 if (document.readyState === 'loading') { 1325 document.addEventListener('DOMContentLoaded', ready); 1326 } else { 1327 ready(); 1328 } 1329})(); 1330</script>
1330<style> #shopify-section-cart_widget label[for="cart_agree"] a {text-decoration: underline #c9a74d;} </style></div><div id="nt_menu_canvas" class="nt_fk_canvas nt_sleft dn lazyloadt4s" data-rendert4s="/search/?view=mn"></div> 1331 <i class="close_pp pegk pe-7s-close ts__03 cd close_mn_t4 ntpf op__0 pe_none"></i><div id="sp_notices_wrapper"></div><div id="nt_search_canvas" class="nt_fk_canvas dn" data-rendert4s="/search?q=&view=pp"></div><div id="snow_ef_t4" class="dn"></div> 1332<div id="gliconsymbols" class="hide dn"> 1333 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="scl_remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line> </svg> </symbol> <symbol id="scl_edit"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path> </svg> </symbol> <symbol id="scl_selected"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 20l-7-7 3-3 4 4L19 4l3 3z"/></svg></symbol></svg> 1334</div><!-- whatsapp --> 1335 1336<style> 1337 @media (max-width: 767px) { 1338 .tooltip .tooltiptext { 1339 visibility: visible !important; 1340 } 1341 .tooltip .tooltiptext { 1342 padding: 4px 8px !important; 1343 font-size: 11px !important; 1344 } 1345 } 1346 .tooltip .tooltiptext { 1347 width: max-content; 1348 background-color: #fff; 1349 border: 2px solid #edce87; 1350 color: #000; 1351 text-align: center; 1352 padding: 4px 8px; 1353 border-radius: 8px; 1354 position: absolute; 1355 z-index: 1; 1356 top: 50%; 1357 right: 120%; 1358 transform: translateY(-50%); 1359 white-space: nowrap; 1360 font-size: 12px; 1361 box-shadow: 0px 2px 8px rgba(0,0,0,0.2); 1362 } 1363 1364 .tooltip .tooltiptext::after { 1365 content: ""; 1366 position: absolute; 1367 top: 50%; 1368 left: 100%; 1369 margin-top: -6px; 1370 border-width: 6px; 1371 border-style: solid; 1372 border-color: transparent transparent transparent #edce87; 1373 } 1374 1375 1376 .tooltip:hover .tooltiptext { 1377 visibility: visible; 1378 } 1379 </style> 1380 1381<!-- WhatsApp Icon with Tooltip --> 1382<a href="https://api.whatsapp.com/send?phone=923071115257&text=Hello,%20I%20have%20a%20question%20about Lals Chocolate?" 1383 class="float tooltip" 1384 target="_blank"> 1385 <i class="lab la-whatsapp"></i> 1386 <span class="tooltiptext">Weâd love to talk!</span> 1387</a> 1388 1389<div id="giftModal" class="giftmodal"> 1390 <!-- Modal content --> 1391 <div class="modal-content countryModal"> 1392 <div class="header__mid"> 1393 <div class="container"> 1394 <div class="row al_center css_h_se"> 1395 <div class="col-lg-12 col-md-12 col-12 tc"> 1396 <div class=" branding ts__05 lh__1"> 1397 <a class="dib" href="/"> 1398 <img class="w__100 logo_normal dn db_lg" src="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_180x.webp?v=1708583571" srcset="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_180x.webp?v=1708583571 1x,//lals-uae.myshopify.com/cdn/shop/files/[email protected]?v=1708583571 2x" alt="Lals UAE" style="width: 100px"> 1399 <img class="w__100 logo_sticky dn" src="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_140x.webp?v=1708583571" srcset="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_140x.webp?v=1708583571 1x,//lals-uae.myshopify.com/cdn/shop/files/[email protected]?v=1708583571 2x" alt="Lals UAE" style="width: 100px"> 1400 <img class="w__100 logo_mobile dn_lg" src="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_140x.webp?v=1708583571" srcset="//lals-uae.myshopify.com/cdn/shop/files/logo-lals_140x.webp?v=1708583571 1x,//lals-uae.myshopify.com/cdn/shop/files/[email protected]?v=1708583571 2x" alt="Lals UAE" style="width: 100px;"> 1401 </a> 1402 </div> 1403 </div> 1404 </div> 1405 </div> 1406 </div> 1407 1408 <div class="modal-content-left"> 1409 <div class="modal-header">
1410 <span class="close">×</span> 1411 </div> 1412 <img src="https://cdn.shopify.com/s/files/1/0859/3093/4565/files/Banner-Image_f6c2111d-51a3-41df-ad56-33e235632714.jpg?v=1709713940" alt=""> 1413 </div><!-- end modal content left --> 1414 1415 <div class="modal-content-right"> 1416 <div class="modal-body"> 1417 <h2>Which country would you like to send a gift to?</h2> 1418 <div class="flag"> 1419 <span class="close"><img src="https://cdn.shopify.com/s/files/1/0859/3093/4565/files/Flag_of_Pakistan_svg.png?v=1708947438" style="width: 60px;box-shadow: 0 0 5px #00000030;"></span> 1420 <a href="https://uae.lalschocolates.com/?SkipCozyRedirect=yes"><img src="https://cdn.shopify.com/s/files/1/0859/3093/4565/files/Flag_of_the_United_Arab_Emirates_svg_1b22e19b-58d7-4c5f-b15d-acb40b271243.png?v=1708950178" style="width: 60px;box-shadow: 0 0 5px #00000030;"></a> 1421 </div> 1422 </div> 1423 </div> 1424 </div> 1425</div><!-- END the modal --> 1426 1427<style> 1428 div#giftModal { 1429 z-index: 9999999999999; 1430 } 1431 /* The Modal (background) */ 1432 div#giftModal .header__mid { 1433 border-bottom: 1px solid #0000001a; 1434 } 1435 .giftmodal { 1436 display: none; 1437 position: fixed; 1438 z-index: 1; 1439 padding-top: 0; 1440 top: 50%; 1441 left: 0; 1442 top: 0; 1443 width: 100%; 1444 height: 100%; 1445 overflow: auto; 1446 background-color: rgb(0, 0, 0); 1447 background-color: rgba(0, 0, 0, 0.5); 1448 z-index: 999; 1449 } 1450 /* Modal Content */ 1451 .giftmodal .modal-content { 1452 position: relative; 1453 margin: auto; 1454 padding: 0; 1455 width: 100%; 1456 max-width: 100%; 1457 height: 100%; 1458 overflow: hidden; 1459 background: #fff; 1460 } 1461 .modal-header { 1462 display:none; 1463 } 1464 .flag { 1465 display: flex; 1466 justify-content: center; 1467 } 1468 .flag span.close { 1469 line-height: 0; 1470 font-size: 0; 1471 padding-left: 0; 1472 padding-right: 30px; 1473 } 1474 .giftmodal .modal-body h2 { 1475 margin-top: 0; 1476 font-family: 'Montserrat' !important; 1477 font-weight: 400 !important; 1478 font-size: 22px; 1479 color: #000; 1480 margin-bottom: 10px; 1481 } 1482 .giftmodal .modal-content-left { 1483 width: 100%; 1484 } 1485 .giftmodal .modal-content-left img { 1486 max-width: 100%; 1487 padding: 0; 1488 display: block; 1489 border-radius: 2px; 1490 height: 400px; 1491 width: 100%; 1492 object-fit: cover !important; 1493 margin: auto; 1494 } 1495 .giftmodal .modal-content-right { 1496 /* flex: 2; */ 1497 text-align: center; 1498 width: 100%; 1499 } 1500 .giftmodal .modal-body { 1501 padding: 30px 0 90px 0; 1502 background-image: linear-gradient(to bottom, #e2f4e8, #e4f5ea, #e7f6ec, #e9f6ee, #ecf7f0, #edf8f4, #eff9f7, #f2faf9, #f5fbfc, #f9fcfe, #fdfdff, #ffffff); 1503 } 1504 .flag { 1505 display: flex; 1506 justify-content: center; 1507 } 1508 .flag span.close { 1509 line-height: 0; 1510 font-size: 0; 1511 padding-left: 0; 1512 padding-right: 30px; 1513 } 1514 .flag a { 1515 line-height: 1 !important; 1516 height: 100%; 1517 } 1518 .flag img { 1519 transition: 0.5s; 1520 } 1521 .flag img { 1522 animation: pulse-animation 3s infinite; 1523 } 1524 @keyframes pulse-animation { 1525 0% { 1526 transform:scale(0.9); 1527 } 1528 50% { 1529 transform:scale(1); 1530 } 1531 100% { 1532 transform:scale(0.9); 1533 } 1534 } 1535 /* The Close Button */ 1536 .giftmodal .close, .giftmodal .close-imp { 1537 color: #000; 1538 font-size: 3rem; 1539 font-weight: 200; 1540 line-height: normal; 1541 padding: 0 1rem; 1542 border-radius: 2px; 1543 transition: 0.4s ease-out; 1544 } 1545 .giftmodal .close:hover, 1546 .giftmodal .close:focus, 1547 .giftmodal .close-imp:hover, 1548 .giftmodal .close-imp:focus { 1549 color: #111; 1550 text-decoration: none; 1551 cursor: pointer; 1552 } 1553 .giftmodal .modal-header { 1554 position: absolute; 1555 top: 0; 1556 right: 0; 1557 } 1558 .giftmodal .modal-header p { 1559 margin: 0; 1560 padding: 0; 1561 } 1562 .giftmodal .modal-content .modal-header { 1563 display:none; 1564 } 1565 .giftmodal.windowModal .modal-content .modal-header { 1566 display:block; 1567 } 1568 .giftmodal .modal-content-left, .modal-content-right { 1569 width: 50% !important; 1570 margin: auto; 1571 } 1572 /* ===== Page Content ===== */ 1573 @media (max-width:1024px){ 1574 .giftmodal .modal-content-left, .modal-content-right { 1575 width: 70% !important; 1576 margin: auto; 1577 } 1578 .hiddenWApp{ 1579 display: none; 1580 } 1581 .giftmodal .modal-content-left, .modal-content-right { 1582 width: 100% !important; 1583 margin: auto; 1584 } 1585 } 1586 @media (max-width:690px){ 1587 .giftmodal .modal-body h2 { 1588 font-size: 14px; 1589 } 1590 .flag img { 1591 width: 40px !important; 1592 } 1593 } 1594 #myBlockWApp svg { 1595 width: 40px; 1596 position: relative; 1597 bottom: 21px; 1598 } 1599</style> 1600
1601<script> 1602 $(window).on('scroll', function() { 1603 var scrollHeight = $(window).scrollTop(); 1604 var triggerHeight = 200; 1605 if (scrollHeight > triggerHeight) { 1606 $('#myBlockWApp').removeClass('hiddenWApp'); 1607 } else { 1608 $('#myBlockWApp').addClass('hiddenWApp'); 1609 } 1610 }); 1611 1612 // var perviousLink = document.referrer; 1613 // var expectedUrl = "https://uae.lalschocolates.com"; 1614 // GIFT MODAL 1615 // Function to check if a cookie exists 1616 function getCookie(name) { 1617 const value = `; ${document.cookie}`; 1618 const parts = value.split(`; ${name}=`); 1619 if (parts.length === 2) return parts.pop().split(';').shift(); 1620 } 1621 1622 // Function to set a cookie 1623 function setCookie(name, value, days) { 1624 const date = new Date(); 1625 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 1626 const expires = `expires=${date.toUTCString()}`; 1627 document.cookie = `${name}=${value}; ${expires}; path=/`; 1628 } 1629 1630 // Function to encapsulate all your existing code 1631 function initializeModal() { 1632 // Get the modal 1633 const modal = document.querySelector("#giftModal"); 1634 // Get the button that opens the modal 1635 const btn = document.querySelectorAll(".giftbtn"); 1636 // Get all elements with the class "close" 1637 const closeButtons = document.querySelectorAll(".close"); 1638 // Function to show the modal 1639 function openModal() { 1640 modal.style.display = "block"; 1641 // Set a cookie to indicate that the modal has been shown 1642 setCookie("modalShown", "true", 30); // Cookie expires in 30 days 1643 $('body').css('overflow', 'hidden'); 1644 } 1645 // Function to close the modal 1646 function closeModalFunction() { 1647 modal.style.display = "none"; 1648 $('body').css('overflow', ''); 1649 // $('.giftmodal').removeClass("windowModal"); 1650 } 1651 $(".giftbtn").click(function(){ 1652 $('.giftmodal').addClass("windowModal") 1653 }); 1654 1655 for (let i = 0; i < btn.length; i++) { 1656 btn[i].addEventListener("click", openModal); 1657 } 1658 closeButtons.forEach(function(closeButton) { 1659 closeButton.addEventListener("click", closeModalFunction); 1660 }); 1661 window.onclick = function(event) { 1662 if (event.target == modal) { 1663 closeModalFunction(); 1664 } 1665 }; 1666 } 1667 document.addEventListener("DOMContentLoaded", function() { 1668 // Call the initializeModal function after the DOM has finished loading 1669 initializeModal(); 1670 }); 1671</script>
1671 1672 1673
1673<script> 1674 (function () { 1675 // Function to add event listeners to the form and input 1676 function attachListeners() { 1677 var searchInput = document.querySelector('#q'); 1678 var searchForm = document.querySelector('.mini_search_frm'); 1679 1680 if (searchInput && searchForm) { 1681 // Prevent form submission if input is empty 1682 searchForm.addEventListener('submit', function (e) { 1683 if (searchInput.value.trim() === '') { 1684 e.preventDefault(); 1685 } 1686 }); 1687 1688 // Prevent Enter key submission if input is empty 1689 searchInput.addEventListener('keypress', function (e) { 1690 if (e.key === 'Enter' && searchInput.value.trim() === '') { 1691 e.preventDefault(); 1692 } 1693 }); 1694 1695 // Disconnect the observer after attaching listeners 1696 observer.disconnect(); 1697 } 1698 } 1699 // Set up the MutationObserver to detect changes in the DOM 1700 var observer = new MutationObserver(function () { 1701 attachListeners(); 1702 }); 1703 // Start observing the body for changes 1704 observer.observe(document.body, { 1705 childList: true, // Watch for added or removed child nodes 1706 subtree: true // Include all child nodes in the observation 1707 }); 1708 // Call initially in case elements already exist 1709 attachListeners(); 1710 })(); 1711</script>
1711 1712
1713<script src="//www.lalschocolates.com/cdn/shop/t/158/assets/jquery.min.js?v=23742"></script>
1713
1714<script> 1715 $(document).ready(function() { 1716 $(document).on('click', '.sm-mini-search_listKey li', function() { 1717 const value = $(this).data('value'); 1718 $(".search_default_list").hide(); 1719 $('.searched_new_list').show(); 1720 var selectedCategory = $(this).attr('class'); 1721 if ($(this).hasClass('all-categories')) { 1722 $(".shop-all").show(); 1723 $(".chocolate-platters").hide(); 1724 $(".chocolate-bars").hide(); 1725 $(".chocolate-boxes").hide(); 1726 $(".chocolate-pouches").hide(); 1727 $(".curated-gift-hampers").hide(); 1728 $(".snackables").hide(); 1729 } else if ($(this).hasClass('chocolate-platter')) { 1730 $(".shop-all").hide(); 1731 $(".chocolate-platters").show(); 1732 $(".chocolate-bars").hide(); 1733 $(".chocolate-boxes").hide(); 1734 $(".chocolate-pouches").hide(); 1735 $(".curated-gift-hampers").hide(); 1736 $(".snackables").hide(); 1737 } else if ($(this).hasClass('chocolate-bar')) { 1738 $(".shop-all").hide(); 1739 $(".chocolate-platters").hide(); 1740 $(".chocolate-bars").show(); 1741 $(".chocolate-boxes").hide(); 1742 $(".chocolate-pouches").hide(); 1743 $(".curated-gift-hampers").hide(); 1744 $(".snackables").hide(); 1745 } else if ($(this).hasClass('chocolate-box')) { 1746 $(".shop-all").hide(); 1747 $(".chocolate-platters").hide(); 1748 $(".chocolate-bars").hide(); 1749 $(".chocolate-boxes").show(); 1750 $(".chocolate-pouches").hide(); 1751 $(".curated-gift-hampers").hide(); 1752 $(".snackables").hide(); 1753 } else if ($(this).hasClass('chocolate-pouch')) { 1754 $(".shop-all").hide(); 1755 $(".chocolate-platters").hide(); 1756 $(".chocolate-bars").hide(); 1757 $(".chocolate-boxes").hide(); 1758 $(".chocolate-pouches").show(); 1759 $(".curated-gift-hampers").hide(); 1760 $(".snackables").hide(); 1761 } else if ($(this).hasClass('gift-hampers')) { 1762 $(".shop-all").hide(); 1763 $(".chocolate-platters").hide(); 1764 $(".chocolate-bars").hide(); 1765 $(".chocolate-boxes").hide(); 1766 $(".chocolate-pouches").hide(); 1767 $(".curated-gift-hampers").show(); 1768 $(".snackables").hide(); 1769 } else if ($(this).hasClass('snackables-patisserie')) { 1770 $(".shop-all").hide(); 1771 $(".chocolate-platters").hide(); 1772 $(".chocolate-bars").hide(); 1773 $(".chocolate-boxes").hide(); 1774 $(".chocolate-pouches").hide(); 1775 $(".curated-gift-hampers").hide(); 1776 $(".snackables").show(); 1777 } else { 1778 $(".shop-all").hide(); 1779 $(".chocolate-platters").hide(); 1780 $(".chocolate-bars").hide(); 1781 $(".chocolate-boxes").hide(); 1782 $(".chocolate-pouches").hide(); 1783 $(".curated-gift-hampers").hide(); 1784 $(".snackables").hide(); 1785 $(".search_default_list").show(); 1786 } 1787 }); 1788 }); 1789</script>
1789 1790<style> 1791/* bundle studio styling */ 1792.nt_fk_canvas { 1793 z-index: 9999 !important; 1794} 1795#bundle_builder_sd_container button.qty-btn.minus, 1796#bundle_builder_sd_container button.qty-btn.plus { 1797 padding: 0; 1798} 1799#bundle_builder_sd_container button.add-to-bag { 1800 min-height: inherit; 1801} 1802#bundle_builder_sd_container .sticky_bottom_bar { 1803 z-index: 9999; 1804} 1805#bundle_builder_sd_container .progress_bar { 1806 height: inherit; 1807 background: #4c4c4c; 1808} 1809body:has(#bundle_builder_sd_container) .float { 1810 bottom: 100px; 1811} 1812.bundle_builder_sd_products[data-step="Checkout"], 1813.bundle_builder_sd_products.checkout_step + .bundle_builder_sd_step_header { 1814 display: none; 1815} 1816#bundle_builder_sd_container button.bundle_addtocart { 1817 font-size: var(--buttonFontSize); 1818} 1819#bundle_builder_sd_container .bundle_builder_sd_header h1, 1820#bundle_builder_sd_container h1.popup_heading { 1821 font-family: 'Libre Caslon Text', serif !important; 1822} 1823#bundle_builder_sd_container h1.popup_heading { 1824 font-weight: 400; 1825 border: none; 1826} 1827div#bundle_builder_sd_container { 1828 padding: 15px !important; 1829} 1830#bundle_builder_sd_container .product_item .item_grid_actions { 1831 justify-content: center; 1832} 1833#bundle_builder_sd_container button.qty-btn.plus { 1834 font-size: 20px; 1835 color: #000 !important; 1836} 1837#bundle_builder_sd_container button.qty-btn.minus { 1838 font-size: 25px; 1839 color: #000 !important; 1840} 1841#bundle_builder_sd_container button.bundle_addtocart { 1842 border-radius: 10px !important; 1843} 1844#bundle_builder_sd_container button.qty-btn.plus:hover, 1845#bundle_builder_sd_container button.qty-btn.minus:hover { 1846 color: #000 !important; 1847} 1848#bundle_builder_sd_container button#previous_btn[disabled] { 1849 display: none; 1850} 1851#bundle_builder_sd_container .product_item.product_is_not { 1852 display: none; 1853} 1854#bundle_builder_sd_container button#previous_btn, 1855#bundle_builder_sd_container button#next_btn, 1856#bundle_builder_sd_container button.bundle_addtocart { 1857 min-width: 200px; 1858} 1859#bundle_builder_sd_container .bundle_builder_sd_step_toggle:before { 1860 width: 85%; 1861 left: 95px; 1862 top: 18px; 1863} 1864#bundle_builder_sd_container span.length_circle { 1865 width: 35px; 1866 height: 35px; 1867} 1868#bundle_builder_sd_container .item_grid_actions button.add-to-bag, 1869#bundle_builder_sd_container .item_grid_actions button.add-to-view { 1870 background: var(--buttonBgColor) !important; 1871 color: var(--buttonFontColor) !important; 1872 max-width: 154px; 1873 background: transparent; 1874 height: 30px; 1875 line-height: 1; 1876 font-size: 12px; 1877 font-weight: 600; 1878 min-height: inherit; 1879 border-width: 0.5px; 1880} 1881#bundle_builder_sd_container .item_grid_actions button.add-to-view { 1882 text-transform: uppercase; 1883} 1884#bundle_builder_sd_container .spinner .path { 1885 stroke: #c9a74d !important; 1886} 1887#bundle_builder_sd_container .bundle_builder_note { 1888 display: none; 1889} 1890#bundle_builder_sd_container { 1891 max-width: 1300px; 1892} 1893#bundle_builder_sd_container .item_grid_actions .quantity-controls { 1894 display: none !important; 1895} 1896#bundle_builder_sd_container h3.product_item_title { 1897 overflow: hidden; 1898 text-overflow: ellipsis; 1899 white-space: nowrap; 1900} 1901#bundle_builder_sd_container button#previous_btn, 1902#bundle_builder_sd_container button#next_btn { 1903 color: var(--buttonFontColor); 1904 font-size: 13px; 1905 font-weight: 600; 1906 background: #e2f4e8; 1907} 1908#bundle_builder_sd_container button#previous_btn:hover, 1909#bundle_builder_sd_container button#next_btn:hover { 1910 border: 1px solid #c9a74d; 1911 color: #c9a74d !important; 1912} 1913#bundle_builder_sd_container .item_grid_actions { 1914 margin-top: 10px !important; 1915} 1916#bundle_builder_sd_container .item_grid_actions button.add-to-bag:hover { 1917 border: 1px solid #c9a74d; 1918 color: #c9a74d !important; 1919} 1920 1921#bundle_builder_sd_container .item_step_toggle.previouse_active_circle .length_circle:after { 1922 background-size: 15px; 1923} 1924#bundle_builder_sd_container .bundle_builder_sd_header p { 1925 max-width: 655px; 1926 margin: 0 auto !important; 1927} 1928#bundle_builder_sd_container .bundle_builder_sd_step_header p { 1929 margin: 0 auto !important; 1930 max-width: 730px; 1931} 1932#bundle_builder_sd_container .item_step_toggle:not(.activeLengthCircle) span.length_circle { 1933 border-color: #000; 1934} 1935#bundle_builder_sd_container .item_step_toggle.activeLengthCircle span.length_circle { 1936 background: #c9a74d; 1937 border: 1px solid #c9a74d; 1938 color: #fff; 1939} 1940#bundle_builder_sd_container .item_step_toggle.previouse_active_circle span.length_circle { 1941 background: var(--circleCompleteColor); 1942 font-size: 0; 1943 border: var(--circleCompleteColor); 1944} 1945#bundle_builder_sd_container .item_step_toggle.previouse_active_circle .length_circle:after { 1946 background: black; 1947 -webkit-mask: url(https://cdn.shopify.com/s/files/1/0884/8097/2984/files/Vector_9.svg?v=1747119533) no-repeat center; 1948 -webkit-mask-size: contain; 1949 mask: url(https://cdn.shopify.com/s/files/1/0884/8097/2984/files/Vector_9.svg?v=1747119533) no-repeat center; 1950 mask-size: 15px; 1951} 1952.swal2-container { 1953 z-index: 99999; 1954} 1955button.swal2-close { 1956 font-size: 25px; 1957 font-weight: 400; 1958} 1959button.swal2-confirm, 1960button.swal2-deny.swal2-styled,
1961button.swal2-cancel.swal2-styled { 1962 border-radius: 6px !important; 1963} 1964h2#swal2-title { 1965 font-size: 14px !important; 1966} 1967.swal2-toast { 1968 padding: 8px !important 1969} 1970#bundle_builder_sd_container .popup_products_container { 1971 height: auto; 1972 max-height: 50vh; 1973} 1974div#bundle_view_popup { 1975 z-index: 9999 !important; 1976} 1977#bundle_builder_sd_container .popup_inner_container { 1978 box-shadow: none; 1979 border-radius: 0; 1980} 1981#bundle_builder_sd_container .product_item_des { 1982 font-size: 10px; 1983 text-align: center; 1984} 1985.swal2-popup.swal2-modal.swal2-show { 1986 box-shadow: none; 1987 border-radius: 0; 1988} 1989span.added_product_count::first-letter { 1990 margin-inline: 10px; 1991 font-size: 16px; 1992} 1993.select_variant_id { 1994 max-width: 154px; 1995 margin-inline: auto !important; 1996} 1997#bundle_builder_sd_container .bundle_builder_sd_step_header h2 span { 1998 font-weight: inherit; 1999} 2000#bundle_builder_sd_container .bundle_view_btn span{ 2001 font-size: 12px; 2002 color: #c9a74d; 2003 border-bottom: 1px solid #c9a74d; 2004} 2005#bundle_builder_sd_container div#bundle_view_popup.quick_view_popup .item_grid_actions, 2006#bundle_builder_sd_container div#bundle_view_popup.quick_view_popup .select_variant_id { 2007 width: 50%; 2008} 2009#bundle_builder_sd_container div#bundle_view_popup.quick_view_popup button.add-to-view { 2010 height: 30px; 2011} 2012#bundle_builder_sd_container select#variant_id { 2013 border-radius: 0; 2014 font-size: 11px; 2015} 2016div#bundle_view_popup .product_item_price { 2017 text-align: left; 2018} 2019div#bundle_view_popup.quick_view_popup .popup_qv_des { 2020 margin-top: 10px !important; 2021 margin-bottom: 10px; 2022} 2023div#bundle_view_popup .select_variant_id { 2024 margin-inline: 0 !important; 2025} 2026#bundle_builder_sd_container .product_item button.add-to-view:before { 2027 content: 'View Options'; 2028} 2029#bundle_builder_sd_container .product_item .add-to-view span.btn_title { 2030 font-size: 0; 2031} 2032#bundle_builder_sd_container .bundle_builder_sd_header { 2033 display: none; 2034} 2035#bundle_builder_sd_container .bundle_builder_sd_step_header { 2036 display: none; 2037} 2038 2039 2040@media only screen and (min-width: 1024px) { 2041 #bundle_builder_sd_container .product_item { 2042 max-width: 25%; 2043 padding: 0 15px 60px; 2044 } 2045 #bundle_builder_sd_container .item_step_toggle { 2046 min-width: 180px; 2047 } 2048} 2049@media only screen and (min-width: 768px) { 2050 #bundle_builder_sd_container .stickyProductItem { 2051 width: 70px; 2052 height: 70px; 2053 } 2054} 2055 2056@media only screen and (max-width:1024px) and (min-width:768px) { 2057 #bundle_builder_sd_container .sticky_bottom_bar { 2058 bottom: 54px; 2059 } 2060 body:has(#bundle_builder_sd_container) .float { 2061 bottom: 200px; 2062 } 2063} 2064 2065@media only screen and (max-width:768px) { 2066 body:has(#bundle_builder_sd_container) .float { 2067 bottom: 260px; 2068 } 2069 #bundle_builder_sd_container button.bundle_addtocart { 2070 font-size: var(--buttonFontSizeMb); 2071 } 2072 #bundle_builder_sd_container .item_grid_actions .quantity-controls { 2073 height: 30px !important; 2074 } 2075 #bundle_builder_sd_container .item_grid_actions input.qty-input, 2076 #bundle_builder_sd_container .qty-btn.minus, 2077 #bundle_builder_sd_container .qty-btn.plus { 2078 height: 30px !important; 2079 line-height: 1 !important; 2080 } 2081 #bundle_builder_sd_container .item_grid_actions button.add-to-bag { 2082 font-size: 10px; 2083 max-width: 135px; 2084 } 2085 #bundle_builder_sd_container .bundle_builder_sd_step_toggle:before { 2086 left: 11px !important; 2087 } 2088 #bundle_builder_sd_container button#previous_btn, 2089 #bundle_builder_sd_container button#next_btn { 2090 width: 50%; 2091 min-width: auto; 2092 } 2093 #bundle_builder_sd_container .sticky_action_button { 2094 flex-wrap: nowrap; 2095 width: 100%; 2096 } 2097 #bundle_builder_sd_container .checkout_actions { 2098 width: 50%; 2099 } 2100 #bundle_builder_sd_container button.bundle_addtocart { 2101 min-width: auto; 2102 width: 100%; 2103 } 2104 #bundle_builder_sd_container span.item_close_btn { 2105 width: 15px; 2106 height: 15px; 2107 } 2108 #bundle_builder_sd_container .bundle_builder_sd_step_header { 2109 margin-bottom: 30px !important; 2110 } 2111 #bundle_builder_sd_container .sticky_product_box { 2112 justify-content: center; 2113 } 2114 #bundle_builder_sd_container .checkout_heading { 2115 font-size: 20px; 2116 } 2117} 2118</style> 2119 2120 2121 2122
2123<script> 2124(function () { 2125 var SECTION_ID = 'cart-template'; // â your parent section filename 2126 2127 function refresh() { 2128 fetch('/?sections=' + SECTION_ID) 2129 .then(function (r) { return r.json(); }) 2130 .then(function (data) { 2131 if (!data[SECTION_ID]) return; 2132 var parser = new DOMParser(); 2133 var doc = parser.parseFromString(data[SECTION_ID], 'text/html'); 2134 var newContent = doc.getElementById('same-day-notice-wrapper'); 2135 var current = document.getElementById('same-day-notice-wrapper'); 2136 if (current && newContent) { 2137 current.innerHTML = newContent.innerHTML; 2138 } 2139 }); 2140 } 2141 2142 // Kalles exact events (confirmed from console) 2143 document.addEventListener('cart:item-removed', refresh); 2144 document.addEventListener('cart:updated', refresh); 2145 document.addEventListener('cart:item-added', refresh); 2146 2147})(); 2148</script>
2148 2149
2149<script> 2150 (function () { 2151 2152 function getKarachiHour() { 2153 return Number( 2154 new Intl.DateTimeFormat("en-US", { 2155 timeZone: "Asia/Karachi", 2156 hour: "numeric", 2157 hour12: false 2158 }).format(new Date()) 2159 ); 2160 } 2161 2162 function updateSameDay() { 2163 2164 const city = document.getElementById("siarCity"); 2165 const zone = document.getElementById("siarZone"); 2166 const delivery = document.getElementById("siarDeliveryMethod"); 2167 2168 if (!city || !zone || !delivery) return; 2169 2170 const sameDay = delivery.querySelector('option[value="samedaydelivery"]'); 2171 2172 if (!sameDay) return; 2173 2174 const disable = 2175 city.value === "Karachi" && 2176 zone.value === "PECHS" && 2177 getKarachiHour() >= 14; 2178 2179 sameDay.disabled = disable; 2180 2181 if (disable && delivery.value === "samedaydelivery") { 2182 delivery.value = ""; 2183 delivery.dispatchEvent(new Event("change", { bubbles: true })); 2184 } 2185 } 2186 2187 const observer = new MutationObserver(updateSameDay); 2188 2189 observer.observe(document.body, { 2190 childList: true, 2191 subtree: true 2192 }); 2193 2194 document.addEventListener("change", function (e) { 2195 if ( 2196 e.target.id === "siarCity" || 2197 e.target.id === "siarZone" || 2198 e.target.id === "siarDeliveryMethod" 2199 ) { 2200 updateSameDay(); 2201 } 2202 }); 2203 2204})(); 2205</script>
2205 2206<div id="shopify-block-AMHBJdDJEU2NFZ1Zpb__8464226395868619320" class="shopify-block shopify-app-block">
2206<script defer> 2207 var shop = Shopify.shop; 2208 2209 var URI = 'https://deliverytimeline.siardigital.com/'; 2210 2211 var selectedCity = ''; 2212 var isCutOffPass = false; 2213 var isExpressOrderLimitReached = false; 2214 var isTagForSameDay = false; 2215 // Same-day stock check (Settings â Same Day Delivery Stock Check); true when off 2216 var isSameDayStockQualified = true; 2217 var sameDayStock = { enabled: false, qtySelector: '' }; 2218 var shippingRateParagraph = ''; 2219 var currentMethod = ''; 2220 var deliveryFeeMessage = ''; 2221 var selectedZone = ''; 2222 const priorityCities = ['Karachi', 'Lahore', 'Islamabad', 'Rawalpindi']; 2223 2224 let lastActiveTime = Date.now(); 2225 let hasRefreshed = false; 2226 // Defaults; replaced by Settings â Widget Placements (Cart Item / Cart Row Selector) in applyCartSelectors() 2227 let cartItemClass = '.cart_item'; 2228 let cartItemsClass = '.cart_items'; 2229 let collectionsdataAttributeSelector = 'ez-schedule-lineitem-collection'; 2230 2231 function injectStyles() { 2232 [ 2233 'https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css', 2234 'https://cdn.jsdelivr.net/npm/tom-select/dist/css/tom-select.css', 2235 `https://deliverytimeline.siardigital.com/stylecss`, 2236 ].forEach((href) => { 2237 const link = document.createElement('link'); 2238 link.rel = 'stylesheet'; 2239 link.href = href; 2240 document.head.appendChild(link); 2241 }); 2242 2243 const style = document.createElement('style'); 2244 style.textContent = ` 2245 .ts-control, .ts-control input, .ts-dropdown, .ts-dropdown [data-selectable] { 2246 font-family: inherit !important; 2247 font-size: inherit !important; 2248 color: inherit !important; 2249 2250 } 2251 .method-selection { 2252 cursor: pointer; 2253 padding: 10px; 2254 border: 2px solid transparent; 2255 border-radius: 8px; 2256 display: flex; 2257 flex-direction: column; 2258 align-items: center; 2259 gap: 6px; 2260 transition: border-color 0.2s; 2261 } 2262 .method-selection.active { 2263 border-color: #000; 2264 } 2265 `; 2266 document.head.appendChild(style); 2267 } 2268 2269 function getTimeZone(region) { 2270 return region === 'uae' ? 'Asia/Dubai' : 'Asia/Karachi'; 2271 } 2272 2273 function getKarachiTime() { 2274 return new Date().toLocaleString('en-US', { 2275 timeZone: 'Asia/Karachi', 2276 year: 'numeric', 2277 month: '2-digit', 2278 day: '2-digit', 2279 hour: '2-digit', 2280 minute: '2-digit', 2281 hour12: true, 2282 }); 2283 } 2284 2285 function formatDate(date) { 2286 return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; 2287 } 2288 2289 function GetCurrentDate(newCurrentDate) { 2290 const [datePart] = newCurrentDate.split(', '); 2291 const [month, day, year] = datePart.split('/'); 2292 return formatDate(new Date(year, month - 1, day)); 2293 } 2294 2295 function GetNextDate(newCurrentDate) { 2296 const [datePart] = newCurrentDate.split(', '); 2297 const [month, day, year] = datePart.split('/'); 2298 2299 const d = new Date(year, month - 1, parseInt(day) + 1); 2300 return formatDate(d); 2301 } 2302 2303 function OrderLimitCurrentDate(format) { 2304 const d = new Date(); 2305 const year = d.getFullYear();
2306 const month = String(d.getMonth() + 1).padStart(2, '0'); 2307 const day = String(d.getDate()).padStart(2, '0'); 2308 return `${year}${format}${month}${format}${day}`; 2309 } 2310 2311 function normaliseDate(str) { 2312 const parts = str.replace(/\//g, '-').split('-'); 2313 return `${parts[0]}-${parseInt(parts[1])}-${parseInt(parts[2])}`; 2314 } 2315 2316 function getPakistanDateString() { 2317 return new Date().toLocaleDateString('en-CA', { timeZone: 'Asia/Karachi' }); 2318 } 2319 2320 function checkIfSameDayPakistan(deliveryDate) { 2321 if (!deliveryDate) return false; 2322 try { 2323 const [year, month, day] = deliveryDate.split('-'); 2324 if (!year || !month || !day) return false; 2325 const deliveryStr = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 2326 return getPakistanDateString() === deliveryStr; 2327 } catch { 2328 return false; 2329 } 2330 } 2331 2332 function compareArraysForVendorExpress(array1, array2) { 2333 const set1 = [...new Set(array1.map((e) => e.toLowerCase()))].sort(); 2334 const set2 = [...new Set(array2.map((e) => e.toLowerCase()))].sort(); 2335 if (set1.length !== set2.length) return false; 2336 return set1.every((val, i) => val === set2[i]); 2337 } 2338 2339 function normalizeCityName(city) { 2340 return city.trim(); 2341 } 2342 2343 function setCartAttributes(attributes = {}) { 2344 return fetch('/cart/update.js', { 2345 method: 'POST', 2346 headers: { 'Content-Type': 'application/json' }, 2347 body: JSON.stringify({ attributes }), 2348 }) 2349 .then((r) => r.json()) 2350 .catch((err) => console.error('Cart update error:', err)); 2351 } 2352 2353 function clearSamedayShippingAttributes() { 2354 return setCartAttributes({ 2355 Delivery_Date: '', 2356 DeliveryZone: '', 2357 deliveryType: '', 2358 Time_Slots: '', 2359 }); 2360 } 2361 2362 function clearShippingAttributes() { 2363 return setCartAttributes({ 2364 DeliveryCity: '', 2365 DeliveryZone: '', 2366 Delivery_Date: '', 2367 Time_Slots: '', 2368 EZDeliveryMethod: 'shipping',
2369 }); 2370 } 2371 2372 function clearPickupAttributes() { 2373 return setCartAttributes({ 2374 PickupCity: '', 2375 PickupLocation: '', 2376 PickupDate: '', 2377 PickupTimeSlot: '', 2378 EZDeliveryMethod: 'pickup', 2379 }); 2380 } 2381 2382 function GetCart() { 2383 return fetch('/cart.js') 2384 .then((r) => r.json()) 2385 .then((data) => ({ 2386 attributes: data.attributes, 2387 totalWeight: data.total_weight, 2388 vendors: data.items.map((item) => item.vendor), 2389 total_price: data.total_price, 2390 currency: data.currency, 2391 items: data.items, 2392 })) 2393 .catch((err) => { 2394 console.error('GetCart error:', err); 2395 throw err; 2396 }); 2397 } 2398 2399 async function setProductProperties(deliveryDate) { 2400 const isSameDay = checkIfSameDayPakistan(deliveryDate); 2401 if (!isSameDay) return; 2402 2403 const cart = await fetch('/cart.js').then((r) => r.json()); 2404 const items = cart?.items ?? []; 2405 2406 if (items.length === 0) { 2407 console.warn('setProductProperties: cart is empty'); 2408 return; 2409 } 2410 2411 const item = items[0]; 2412 if (!item?.key) { 2413 console.warn('setProductProperties: first item has no key'); 2414 return; 2415 } 2416 2417 const response = await fetch('/cart/change.js', { 2418 method: 'POST', 2419 headers: { 'Content-Type': 'application/json' }, 2420 body: JSON.stringify({ 2421 id: item.key, 2422 quantity: item.quantity, 2423 properties: { ...item.properties, 'Order Delivery': 'sameday_delivery' }, 2424 }), 2425 }); 2426 2427 if (!response.ok) { 2428 const err = await response.json(); 2429 console.error('setProductProperties error:', err.description); 2430 throw new Error(`Failed to update: ${err.description}`); 2431 } 2432 } 2433 2434 async function setZoneProperty(zone) { 2435 const cart = await fetch('/cart.js').then((r) => r.json()); 2436 for (const item of cart?.items ?? []) { 2437 const response = await fetch('/cart/change.js', { 2438 method: 'POST', 2439 headers: { 'Content-Type': 'application/json' }, 2440 body: JSON.stringify({ 2441 id: item.key, 2442 quantity: item.quantity, 2443 properties: { ...item.properties, Area: zone }, // keep Order Delivery etc. 2444 }), 2445 }); 2446 if (!response.ok) { 2447 const err = await response.json().catch(() => ({})); 2448 throw new Error(`Failed to set Area property: ${err.description || response.status}`); 2449 } 2450 } 2451 } 2452 2453 function cartHasSameDayTagMarkup() { 2454 return Array.from(document.querySelectorAll(cartItemClass)).some((item) => item.querySelector('.cart-item__tags')); 2455 } 2456 2457 function separateItemsByTag(tagName) { 2458 const cartItems = document.querySelectorAll(cartItemClass); 2459 2460 const withTag = []; 2461 const withoutTag = []; 2462 2463 cartItems.forEach((cartItem) => { 2464 const tagContainer = cartItem.querySelector('.cart-item__tags'); 2465 2466 const tags = tagContainer 2467 ? [...tagContainer.querySelectorAll('.product-tag')].map((tag) => tag.textContent.trim()) 2468 : []; 2469 2470 const item = { 2471 element: cartItem, 2472 tags, 2473 }; 2474 2475 if (tags.includes(tagName)) { 2476 withTag.push(item); 2477 } else { 2478 withoutTag.push(item); 2479 } 2480 }); 2481 2482 return { withTag, withoutTag }; 2483 } 2484 2485 function loadFlatpickr( 2486 inputElement, 2487 rollingWindow, 2488 blackOutDates, 2489 enable_each_day, 2490 nextEachDay, 2491 overrideDateArray, 2492 newCurrentDate 2493 ) { 2494 return new Promise((resolve, reject) => { 2495 function initFlatpickr() { 2496 if (inputElement._flatpickr) inputElement._flatpickr.destroy(); 2497 2498 const [datePart] = newCurrentDate.split(', '); 2499 const [month, day, year] = datePart.split('/'); 2500 2501 const pkTodayStr = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 2502 blackOutDates.push(`${year}-${month}-${day}`); 2503 const pkToday = new Date(`${pkTodayStr}T00:00:00`); 2504 2505 flatpickr(inputElement, { 2506 minDate: pkToday, 2507 maxDate: rollingWindow, 2508 dateFormat: 'Y-m-d', // actual input value: 2026-05-07 2509 altInput: true, 2510 altFormat: 'd-M-Y', 2511 onReady(selectedDates, dateStr, instance) { 2512 const altInput = instance.altInput; 2513 altInput.placeholder = 'Select date..'; 2514 altInput.style.cssText = 'width:175px;height:25px;background:transparent;'; 2515 instance.input.readOnly = true; 2516 instance.input.style.pointerEvents = 'auto'; 2517 }, 2518 onChange(selectedDates, dateStr, instance) { 2519 const isValidFormat = /^\d{4}-\d{2}-\d{2}$/.test(dateStr); 2520 2521 const isRealDate = selectedDates.length > 0 && !isNaN(selectedDates[0]); 2522 const errorEl = document.querySelector('.checkout-date-error'); 2523 if (errorEl) { 2524 errorEl.style.display = 'none'; 2525 errorEl.textContent = ''; 2526 } 2527 2528 if (!isValidFormat || !isRealDate) { 2529 instance.clear(); // wipe the bad value 2530 instance.open(); // reopen calendar 2531 return; 2532 } 2533 2534 setCartAttributes({ Delivery_Date: dateStr }); 2535 }, 2536 disable: [ 2537 (date) => { 2538 const year = date.getFullYear();
2539 const month = date.getMonth() + 1; // 1-based 2540 const day = date.getDate(); 2541 2542 const formattedDate = `${year}-${month}-${day}`; 2543 2544 const overrideFormatDate = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`; 2545 2546 const isBlackout = blackOutDates.includes(formattedDate); 2547 2548 const isOverride = overrideDateArray.some((o) => o.date === overrideFormatDate); 2549 2550 if (isOverride && isBlackout) return true; 2551 if (isOverride) return false; 2552 2553 const dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getDay()]; 2554 2555 const isDisabledNextDay = !nextEachDay.includes(dayName); 2556 const isDisabledDay = enable_each_day.length === 0 ? false : !enable_each_day.includes(dayName); 2557 2558 return isBlackout || isDisabledDay || isDisabledNextDay; 2559 }, 2560 ], 2561 }); 2562 resolve(); 2563 } 2564 2565 if (window.flatpickr) { 2566 initFlatpickr(); 2567 } else { 2568 const script = document.createElement('script'); 2569 script.src = 'https://cdn.jsdelivr.net/npm/flatpickr'; 2570 script.onload = initFlatpickr; 2571 script.onerror = reject; 2572 document.head.appendChild(script); 2573 } 2574 }); 2575 } 2576 2577 function InsertShippingRate(shippingRate, price) { 2578 shippingRate.style.display = 'block'; 2579 shippingRate.innerHTML = ''; 2580 const p = document.createElement('p'); 2581 p.innerText = price; 2582 shippingRate.appendChild(p); 2583 shippingRateParagraph = p; 2584 } 2585 2586 function addBlackoutDatesForUnscheduleDays(margedBlackout, dbMiniDays, dbNextEachDay, region, newCurrentDate) { 2587 const tz = getTimeZone(region); 2588 const opts = { timeZone: tz, hour12: false }; 2589 const currentDate = parseBackendDate(newCurrentDate); 2590 const dow = currentDate.getDay(); 2591 2592 const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; 2593 2594 const isDisabledNextDay = !dbNextEachDay.includes(days[(dow + 1) % 7]); 2595 const isDisabledAfterNext = !dbNextEachDay.includes(days[(dow + 2) % 7]); 2596 const isCurrentDay = !dbNextEachDay.includes(days[dow]); 2597 2598 function pushFutureDate(offset) { 2599 const nd = parseBackendDate(newCurrentDate); 2600 nd.setDate(nd.getDate() + offset); 2601 2602 margedBlackout.push(formatDate(nd)); 2603 } 2604 2605 if (isDisabledNextDay && isDisabledAfterNext && dbMiniDays > 1) { 2606 pushFutureDate(3); 2607 } else if (isDisabledNextDay && !isDisabledAfterNext && dbMiniDays > 1) { 2608 for (let i = 0; i < dbMiniDays; i++) pushFutureDate(2 + i); 2609 } else if (isCurrentDay && !isDisabledNextDay) { 2610 for (let i = 0; i < dbMiniDays; i++) pushFutureDate(1 + i); 2611 } 2612 } 2613 2614 function createMethodCard({ label, iconSrc, id }) { 2615 const card = document.createElement('div'); 2616 2617 if (id) card.id = id; 2618 const text = document.createElement('div'); 2619 text.textContent = label; 2620 2621 card.appendChild(text); 2622 return card; 2623 } 2624 2625 function initTomSelect(selectEl, selectId) { 2626 if (selectEl.tomselect) return; 2627 const ts = new TomSelect(`#${selectId}`, { 2628 create: false, 2629 closeAfterSelect: true, 2630 onInitialize() { 2631 const icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); 2632 icon.setAttribute('width', '14'); 2633 icon.setAttribute('height', '14'); 2634 icon.setAttribute('viewBox', '0 0 24 24'); 2635 icon.setAttribute('fill', 'none'); 2636 icon.setAttribute('stroke', '#888'); 2637 icon.setAttribute('stroke-width', '2'); 2638 icon.setAttribute('stroke-linecap', 'round'); 2639 icon.style.cssText = 'position:absolute;left:145px;top:50%;transform:translateY(-50%);pointer-events:none;'; 2640 icon.innerHTML = '<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>'; 2641 2642 this.control.style.position = 'relative'; 2643 this.control_input.style.paddingLeft = '24px'; 2644 this.control.insertBefore(icon, this.control_input); 2645 }, 2646 }); 2647 ts.on('item_add', () => ts.blur()); 2648 } 2649 2650 function loadTomSelect(cb) { 2651 if (window.TomSelect) { 2652 cb(); 2653 return; 2654 } 2655 const s = document.createElement('script'); 2656 s.src = 'https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.min.js'; 2657 s.onload = cb; 2658 document.body.appendChild(s); 2659 } 2660
2661 // Optional merchant icons before the labels (Settings â Text Labels). The 2662 // backend only stores https URLs; this re-checks before rendering. 2663 function appendLabelIcon(labelEl, settings, iconField) { 2664 if (settings?.enableLabelIcons !== true) return; 2665 const url = settings[iconField]; 2666 if (typeof url !== 'string' || !url.startsWith('https://')) return; 2667 2668 const icon = document.createElement('img'); 2669 icon.className = 'ez-label-icon'; 2670 icon.src = url; 2671 icon.alt = ''; 2672 icon.setAttribute('aria-hidden', 'true'); 2673 icon.loading = 'lazy'; 2674 // Same fixed box for every icon, so labels line up whatever the image's own size 2675 icon.style.cssText = 2676 'display:block;flex:0 0 auto;width:1.25em;height:1.25em;object-fit:contain;margin:0;padding:0;'; 2677 icon.onerror = () => icon.remove(); 2678 2679 // Flex row centres icon and text on one line (inline images sit on the text 2680 // baseline, which put each icon at a slightly different height). The banner 2681 // is a centred <p>, so it keeps its centring. 2682 const isBanner = labelEl.tagName === 'P'; 2683 labelEl.style.display = isBanner ? 'flex' : 'inline-flex'; 2684 labelEl.style.alignItems = 'center'; 2685 labelEl.style.gap = '8px'; 2686 labelEl.style.lineHeight = '1.25'; 2687 if (isBanner) labelEl.style.justifyContent = 'center'; 2688 2689 labelEl.prepend(icon); 2690 } 2691 2692 // Uses the merchant's cart selectors when set and valid, otherwise keeps the defaults 2693 function applyCartSelectors(settings) { 2694 const pick = (value, fallback) => { 2695 const selector = (value || '').trim(); 2696 if (!selector) return fallback; 2697 try { 2698 document.querySelector(selector); 2699 return selector; 2700 } catch (err) { 2701 console.warn('[EZSchedule] Invalid cart selector, using default:', selector); 2702 return fallback; 2703 } 2704 }; 2705 cartItemsClass = pick(settings?.cart_row_selector, cartItemsClass); 2706 cartItemClass = pick(settings?.cart_item_selector, cartItemClass); 2707 } 2708 2709 function buildMethodSelector(apiData) { 2710 const settings = apiData.settingsWithLabels; 2711 applyCartSelectors(settings); 2712 initCartItemRemovalObserver(); 2713 const hasShipping = apiData.detailsForScriptTag?.length > 0; 2714 setCartAttributes({ 2715 EZScheduleDateSelectionTime: new Date().toLocaleString('en-US', { 2716 timeZone: 'Asia/Karachi', 2717 year: 'numeric', 2718 month: '2-digit', 2719 day: '2-digit', 2720 hour: '2-digit', 2721 minute: '2-digit', 2722 hour12: true, 2723 }), 2724 allow_order: '0', 2725 CustomerTimeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, 2726 }); 2727 2728 if (!hasShipping) return; 2729 2730 const dbCheckoutBtnId = settings.checkout_button_id || 'mybtn'; 2731 const checkoutBtn = document.getElementById(dbCheckoutBtnId); 2732 if (!checkoutBtn) { 2733 console.warn(`[EZSchedule] Checkout button #${dbCheckoutBtnId} not found`); 2734 return; 2735 } 2736 2737 const mainDiv = document.createElement('div'); 2738 mainDiv.classList.add('flatpickr', 'main-div', 'ez-schedule-city-selector'); 2739 mainDiv.style.cssText = 2740 'padding:20px;border:1px solid black;border-radius:10px;text-align:center;margin-bottom:12px;'; 2741 2742 const banner = document.createElement('p'); 2743 banner.textContent = settings.appearOnCartPage || ''; 2744 if (banner.textContent) appendLabelIcon(banner, settings, 'bannerIconUrl'); 2745 banner.style.fontWeight = 'bold'; 2746 mainDiv.appendChild(banner); 2747 2748 // Optional subheading under the banner (Settings â Text Labels); hidden when empty 2749 const subheadingText = (settings.bannerSubheading || '').trim(); 2750 if (subheadingText) { 2751 const subheading = document.createElement('p'); 2752 subheading.className = 'ez-banner-subheading'; 2753 subheading.textContent = subheadingText; 2754 subheading.style.cssText = 'margin:4px 0 0;font-size:0.9em;opacity:0.8;'; 2755 mainDiv.appendChild(subheading); 2756 } 2757 2758 const contentArea = document.createElement('div'); 2759 contentArea.id = 'ezschedule-content-area'; 2760 contentArea.style.marginTop = '16px'; 2761 2762 mainDiv.appendChild(contentArea); 2763 checkoutBtn.parentNode.insertBefore(mainDiv, checkoutBtn); 2764 2765 currentMethod = 'shipping';
2766 initSameDayStockChecking(settings); 2767 buildShippingForm(apiData, contentArea, checkoutBtn); 2768 } 2769 2770 // Destroy any active TomSelect instances before rebuilding content 2771 function destroyTomSelects() { 2772 ['siarCity', 'siarZone', 'pickupCity'].forEach((id) => { 2773 const el = document.getElementById(id); 2774 if (el && el.tomselect) { 2775 el.tomselect.destroy(); 2776 } 2777 }); 2778 } 2779 2780 function buildShippingForm(apiData, contentArea, checkoutElement) { 2781 let newCurrentDate = apiData?.currentDate; 2782 2783 const settings = apiData.settingsWithLabels; 2784 const overrideDates = apiData.overrideDates; 2785 const scriptTagEnabled = JSON.parse(settings.script_tag); 2786 if (!scriptTagEnabled) return; 2787 2788 const region = settings.delivery_method; 2789 const optionalCheckout = JSON.parse(settings.optional_checkout); 2790 const timeZone = getTimeZone(region); 2791 2792 if (shop === 'folia-creatives-sd.myshopify.com') { 2793 const notice = document.createElement('div'); 2794 notice.style.marginBottom = '15px'; 2795 notice.innerHTML = `<span>Scheduled deliveries are only available for deliveries within Pakistan.</span><br> 2796 <span>For International shipping please proceed directly to checkout.</span>`; 2797 contentArea.appendChild(notice); 2798 } 2799 2800 const childDivCity = document.createElement('div'); 2801 childDivCity.classList.add('child-div'); 2802 childDivCity.style.cssText = 2803 'display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 2804 const labelCity = document.createElement('label'); 2805 labelCity.textContent = settings.chooseCity; 2806 appendLabelIcon(labelCity, settings, 'cityIconUrl'); 2807 const selectCity = document.createElement('select'); 2808 selectCity.id = 'siarCity'; 2809 selectCity.style.cssText = 'width:175px;height:25px;'; 2810 const defaultCityOption = document.createElement('option'); 2811 defaultCityOption.value = ''; 2812 defaultCityOption.disabled = true; 2813 defaultCityOption.hidden = true; 2814 defaultCityOption.selected = true; 2815 defaultCityOption.textContent = 'Search city'; 2816 selectCity.appendChild(defaultCityOption); 2817 const priorityCities = ['Karachi', 'Lahore', 'Islamabad', 'Rawalpindi']; 2818 2819 const allCities = apiData.detailsForScriptTag 2820 .map((c) => c.name) 2821 .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())); 2822 2823 const sortedCities = [ 2824 ...priorityCities.filter((city) => allCities.includes(city)), 2825 ...allCities.filter((city) => !priorityCities.includes(city)), 2826 ]; 2827 2828 sortedCities.forEach((city) => { 2829 const opt = document.createElement('option'); 2830 opt.value = opt.textContent = city; 2831 selectCity.appendChild(opt); 2832 }); 2833 childDivCity.appendChild(labelCity); 2834 childDivCity.appendChild(selectCity); 2835 contentArea.appendChild(childDivCity); 2836 2837 const childDivZone = document.createElement('div'); 2838 childDivZone.classList.add('child-div-for-zone'); 2839 childDivZone.style.cssText = 2840 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 2841 const labelZone = document.createElement('label'); 2842 labelZone.textContent = settings.selectArea || 'Select your area'; 2843 appendLabelIcon(labelZone, settings, 'areaIconUrl'); 2844 const selectZone = document.createElement('select'); 2845 selectZone.id = 'siarZone'; 2846 selectZone.style.cssText = 'width:175px;height:25px;background:transparent;'; 2847 childDivZone.appendChild(labelZone); 2848 childDivZone.appendChild(selectZone); 2849 contentArea.appendChild(childDivZone); 2850 2851 const deliveryMethodDiv = document.createElement('div'); 2852 deliveryMethodDiv.classList.add('delivery-method-div'); 2853 deliveryMethodDiv.style.cssText = 2854 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 2855 2856 const deliveryMethodLabel = document.createElement('label'); 2857 deliveryMethodLabel.textContent = settings.selectDeliveryType || 'Select delivery type'; 2858 appendLabelIcon(deliveryMethodLabel, settings, 'deliveryTypeIconUrl'); 2859 2860 const selectDeliveryType = document.createElement('select'); 2861 selectDeliveryType.id = 'siarDeliveryMethod'; 2862 selectDeliveryType.style.cssText = 'width:175px;height:25px;background:transparent;'; 2863 2864 const defaultMethodOpt = document.createElement('option'); 2865 defaultMethodOpt.value = ''; 2866 defaultMethodOpt.disabled = true; 2867 defaultMethodOpt.selected = true; 2868 defaultMethodOpt.textContent = 'Select..'; 2869 selectDeliveryType.appendChild(defaultMethodOpt); 2870 2871 const optSameDay = document.createElement('option'); 2872 optSameDay.value = 'samedaydelivery'; 2873 optSameDay.textContent = 'Same Day'; 2874 2875 const optSchedule = document.createElement('option'); 2876 optSchedule.value = 'scheduledelivery'; 2877 optSchedule.textContent = 'Scheduled'; 2878 2879 selectDeliveryType.appendChild(optSameDay); 2880 selectDeliveryType.appendChild(optSchedule); 2881 2882 deliveryMethodDiv.appendChild(deliveryMethodLabel); 2883 deliveryMethodDiv.appendChild(selectDeliveryType); 2884 contentArea.appendChild(deliveryMethodDiv); 2885 2886 const childDivDate = document.createElement('div'); 2887 childDivDate.classList.add('child-div'); 2888 childDivDate.style.cssText = 2889 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 2890 const labelDate = document.createElement('label'); 2891 labelDate.textContent = settings.selectDate; 2892 appendLabelIcon(labelDate, settings, 'dateIconUrl'); 2893 var inputDate = document.createElement('input'); 2894 2895 inputDate.type = 'text';
2896 inputDate.placeholder = 'Loading calendar..'; 2897 inputDate.readOnly = true; 2898 inputDate.style.pointerEvents = 'none'; 2899 2900 inputDate.setAttribute('data-input', ''); 2901 2902 inputDate.setAttribute('autocomplete', 'off'); 2903 inputDate.setAttribute('autocorrect', 'off'); 2904 inputDate.setAttribute('autocapitalize', 'off'); 2905 inputDate.setAttribute('spellcheck', 'false'); 2906 inputDate.style.cssText = 'width:175px;height:25px;background:transparent;'; 2907 childDivDate.appendChild(labelDate); 2908 childDivDate.appendChild(inputDate); 2909 contentArea.appendChild(childDivDate); 2910 2911 const timeSlotDiv = document.createElement('div'); 2912 timeSlotDiv.classList.add('child-div'); 2913 timeSlotDiv.style.cssText = 2914 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 2915 const labelTime = document.createElement('label'); 2916 labelTime.textContent = settings.selectTime || 'Select Time Slot'; 2917 appendLabelIcon(labelTime, settings, 'timeIconUrl'); 2918 const selectTime = document.createElement('select'); 2919 selectTime.style.cssText = 'width:175px;height:25px;'; 2920 2921 timeSlotDiv.appendChild(labelTime); 2922 timeSlotDiv.appendChild(selectTime); 2923 contentArea.appendChild(timeSlotDiv); 2924 2925 const shippingRateMessageElement = document.createElement('div'); 2926 shippingRateMessageElement.style.color = 'black'; 2927 contentArea.appendChild(shippingRateMessageElement); 2928 2929 const shippingRate = document.createElement('div'); 2930 contentArea.appendChild(shippingRate); 2931 2932 const checkoutDateError = document.createElement('p'); 2933 checkoutDateError.className = 'checkout-date-error'; 2934 checkoutDateError.style.cssText = 'display:none;color:red;font-size:13px;margin:6px 0 4px 0;text-align:center;'; 2935 contentArea.appendChild(checkoutDateError); 2936 2937 loadTomSelect(() => initTomSelect(selectCity, 'siarCity')); 2938 checkoutElement.disabled = shop === 'folia-creatives-sd.myshopify.com' ? false : !optionalCheckout; 2939 2940 let deliveryTypeHandler = null; 2941 let dateChangeHandler = null; 2942 let zoneChangeHandler = null; 2943 let timeChangeHandler = null; 2944 selectCity.addEventListener('change', function () { 2945 const city = selectCity.value; 2946 selectedCity = city; 2947 if (!city) return; 2948 clearSamedayShippingAttributes(); 2949 isExpressOrderLimitReached = false; 2950 isCutOffPass = false; 2951 isTagForSameDay = false; 2952 // Re-read the cart (also covers the removal observer, which re-runs this handler) 2953 validateSameDayStock(`city change: ${city}`); 2954 clearLineItemProperties(['Order Delivery', 'Area']); 2955 2956 if (dateChangeHandler) inputDate.removeEventListener('change', dateChangeHandler); 2957 if (deliveryTypeHandler) selectDeliveryType.removeEventListener('change', deliveryTypeHandler); 2958 if (zoneChangeHandler) selectZone.removeEventListener('change', zoneChangeHandler); 2959 if (timeChangeHandler) selectTime.removeEventListener('change', timeChangeHandler); 2960 2961 shippingRate.style.display = 'none'; 2962 deliveryMethodDiv.style.display = 'none'; 2963 shippingRateParagraph = ''; 2964 shippingRateMessageElement.innerText = ''; 2965 timeSlotDiv.style.display = 'none'; 2966 selectTime.innerHTML = ''; 2967 childDivDate.style.display = 'none'; 2968 inputDate.value = ''; 2969 inputDate.readOnly = true; // â add 2970 inputDate.style.pointerEvents = 'none'; // â add 2971 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 2972 checkoutElement.disabled = shop === 'folia-creatives-sd.myshopify.com' ? false : !optionalCheckout; 2973 contentArea.querySelector('.city-validation-error')?.remove(); 2974 contentArea.querySelector('.error-message')?.remove(); 2975 2976 setCartAttributes({ DeliveryCity: city, allow_order: '0' }); 2977 2978 const expressData = apiData.ExpressShipping.find((i) => i.city_name === city); 2979 const nextDayData = apiData.NextDayShipping.find((i) => i.city_name === city); 2980 2981 const cityConfig = apiData.detailsForScriptTag.find((i) => i.name === city); 2982 2983 const cityCollectionsIsEnabled = cityConfig?.enable_collection || false; 2984 const cityCollections = cityConfig?.collections.map((collection) => collection.handle) || []; 2985 const blackoutDatesCollectionsWise = cityConfig.collections_blackout_dates || []; 2986 const expressSlots = apiData.ExpressTimeSlots.filter((i) => i.formNo === expressData?.formNo); 2987 2988 if (!expressData || !nextDayData || !cityConfig) { 2989 console.warn('[EZSchedule] Missing data for city:', city); 2990 return; 2991 } 2992 2993 const { 2994 formNo, 2995 enable_each_day, 2996 cut_off_time, 2997 same_day_prep_time, 2998 orderLimit, 2999 express_blackout, 3000 express_zone_data, 3001 is_express_zone_shipping, 3002 } = expressData; 3003 3004 const { 3005 each_day, 3006 next_day_blackout, 3007 is_nextday_zone_shipping, 3008 nextday_zone_data, 3009 mini_fullfillment_day: dbMiniDays, 3010 next_cut_off_time, 3011 nextDayGlogalOrderLimit = orderLimit, 3012 } = nextDayData; 3013 3014 const globalBlackout = apiData.settingsWithLabels.global_blackout_date; 3015 const localBlackout = cityConfig.blackout_dates; 3016 3017 let collectionWiseBlackoutDatesSelection = []; 3018 3019 if (cityCollectionsIsEnabled) { 3020 const cartitemsCollectionsCombined = getCollectionsFromCartItem(
3020); 3021 let dates = getCollectionWiseBlackoutDates( 3022 cityCollections, 3023 blackoutDatesCollectionsWise, 3024 cartitemsCollectionsCombined 3025 ); 3026 collectionWiseBlackoutDatesSelection = dates || []; 3027 } 3028 // Normalise all blackout dates to 2025-3-2 format 3029 let margedBlackout = [ 3030 ...new Set([ 3031 ...localBlackout.map(normaliseDate), 3032 ...globalBlackout.map(normaliseDate), 3033 ...collectionWiseBlackoutDatesSelection.map(normaliseDate), 3034 ]), 3035 ]; 3036 3037 const isTimeSlot = JSON.parse(cityConfig.enable_timeslots); 3038 const isProductVendor = JSON.parse(cityConfig.enable_express_vendor); 3039 const dbProductVendor = cityConfig.product_vendor; 3040 const filterOverrideDates = overrideDates.filter((o) => o.formNo === nextDayData.formNo); 3041 3042 const hasExpressZone = is_express_zone_shipping === 'true' || is_express_zone_shipping === '1'; 3043 const hasNextDayZone = is_nextday_zone_shipping === 'true'; 3044 3045 // The options are rebuilt for every city, so drop the previous city's search box first 3046 if (selectZone.tomselect) selectZone.tomselect.destroy(); 3047 if (hasExpressZone || hasNextDayZone) { 3048 const mergedZones = [...new Set([...(express_zone_data || []), ...(nextday_zone_data || [])])]; 3049 // Long lists get a search box, like the city field 3050 const isZoneSearchable = mergedZones.length > 5; 3051 selectZone.innerHTML = ''; 3052 const defaultZoneOpt = document.createElement('option'); 3053 defaultZoneOpt.value = ''; 3054 defaultZoneOpt.disabled = true; 3055 defaultZoneOpt.selected = true; 3056 defaultZoneOpt.textContent = isZoneSearchable ? 'Search area' : 'Select..'; 3057 selectZone.appendChild(defaultZoneOpt); 3058 mergedZones.forEach((zone) => { 3059 const opt = document.createElement('option'); 3060 opt.value = opt.textContent = zone; 3061 selectZone.appendChild(opt); 3062 }); 3063 if (isZoneSearchable) loadTomSelect(() => initTomSelect(selectZone, 'siarZone')); 3064 } else { 3065 } 3066 3067 childDivZone.style.display = 'none'; 3068 childDivDate.style.display = 'none'; 3069 3070 childDivZone.style.display = hasExpressZone ? 'flex' : 'none'; 3071 childDivDate.style.display = hasExpressZone ? 'none' : 'flex'; 3072 3073 const rollingDate = new Date(); 3074 rollingDate.setDate(rollingDate.getDate() + parseInt(cityConfig.available_dates)); 3075 3076 const shopifyOrders = apiData.orders[city]; 3077 3078 const sumOrderLimits = {}; 3079 shopifyOrders?.forEach((order) => { 3080 sumOrderLimits[order.DeliveryDate] = (sumOrderLimits[order.DeliveryDate] || 0) + order.OrderLimit; 3081 }); 3082 3083 const sumOrderLimitsArray = Object.entries(sumOrderLimits).map(([DeliveryDate, TotalOrderLimit]) => ({ 3084 DeliveryDate, 3085 TotalOrderLimit, 3086 })); 3087 3088 const formattedToday = OrderLimitCurrentDate('-'); 3089 3090 const ExpressAppOrderLimit = expressSlots.reduce((acc, cur) => acc + cur.express_order_limit, 0); 3091 const NextDaySlots = apiData.NextDayTimeSlots.filter((i) => i.formNo === nextDayData.formNo); 3092 if (isTimeSlot) { 3093 let NextBlackoutOrderLimit = 0; 3094 if (NextDaySlots.length > 0) { 3095 NextBlackoutOrderLimit = NextDaySlots.reduce((acc, cur) => acc + cur.next_day_orderlimit, 0); 3096 } else { 3097 NextBlackoutOrderLimit = nextDayData.orderLimit; 3098 } 3099 3100 const appOrderLimitArray = sumOrderLimitsArray.filter( 3101 (i) => i.TotalOrderLimit >= NextBlackoutOrderLimit && i.DeliveryDate !== formattedToday 3102 ); 3103 3104 const expressOverLimit = sumOrderLimitsArray.filter( 3105 (i) => i.TotalOrderLimit >= ExpressAppOrderLimit && i.DeliveryDate === formattedToday 3106 ); 3107 3108 const overrideNonBlackout = appOrderLimitArray.filter( 3109 (a) => !filterOverrideDates.some((o) => o.date === a.DeliveryDate) 3110 ); 3111 3112 const overrideBlackout = appOrderLimitArray.filter((a) => 3113 filterOverrideDates.some((o) => { 3114 const dateMatch = o.date === a.DeliveryDate; 3115 const limitMatch = o.order_limit <= a.TotalOrderLimit; 3116 3117 return dateMatch && limitMatch; 3118 }) 3119 ); 3120 3121 const finalBlackoutDates = [...overrideNonBlackout, ...overrideBlackout]; 3122 3123 if (expressOverLimit.length > 0) { 3124 isExpressOrderLimitReached = true; 3125 margedBlackout.push(normaliseDate(OrderLimitCurrentDate('-'))); 3126 } 3127
3128 finalBlackoutDates.forEach((item) => margedBlackout.push(normaliseDate(item.DeliveryDate))); 3129 } else { 3130 const appOrderLimitArray = sumOrderLimitsArray.filter( 3131 (i) => i.TotalOrderLimit >= nextDayData.orderLimit && i.DeliveryDate !== formattedToday 3132 ); 3133 3134 const expressOverLimit = sumOrderLimitsArray.filter( 3135 (i) => i.TotalOrderLimit >= orderLimit && i.DeliveryDate === formattedToday 3136 ); 3137 3138 const overrideNonBlackout = appOrderLimitArray.filter( 3139 (a) => !filterOverrideDates.some((o) => o.date === a.DeliveryDate) 3140 ); 3141 3142 const overrideBlackout = sumOrderLimitsArray.filter((a) => 3143 filterOverrideDates.some((o) => { 3144 const dateMatch = o.date === a.DeliveryDate; 3145 const limitMatch = o.order_limit <= a.TotalOrderLimit; 3146 return dateMatch && limitMatch; 3147 }) 3148 ); 3149 3150 const finalBlackoutDates = [...overrideNonBlackout, ...overrideBlackout]; 3151 3152 if (expressOverLimit.length > 0) { 3153 isExpressOrderLimitReached = true; 3154 margedBlackout.push(normaliseDate(OrderLimitCurrentDate('-'))); 3155 } 3156 3157 finalBlackoutDates.forEach((item) => margedBlackout.push(normaliseDate(item.DeliveryDate))); 3158 } 3159 3160 if (express_blackout?.includes(GetCurrentDate(newCurrentDate))) 3161 margedBlackout.push(GetCurrentDate(newCurrentDate)); 3162 if (next_day_blackout?.includes(GetNextDate(newCurrentDate))) margedBlackout.push(GetNextDate(newCurrentDate)); 3163 3164 const [datePart, timePart] = newCurrentDate.split(', '); 3165 const [month, day, year] = datePart.split('/'); 3166 const [hourStr, minuteStr] = timePart.split(':'); 3167 const now = new Date(year, month - 1, day); // â just for .getDay(), no timezone involved 3168 3169 const currentTimeHour = parseInt(hourStr, 10); 3170 const currentTimeMinute = parseInt(minuteStr, 10); 3171 const dbCutOffParts = cut_off_time ? cut_off_time.split(':') : ['0', '0']; 3172 const dbNextCutOffParts = next_cut_off_time ? next_cut_off_time.split(':') : ['0', '0']; 3173 if ( 3174 next_cut_off_time && 3175 (parseInt(dbNextCutOffParts[0]) < currentTimeHour || 3176 (parseInt(dbNextCutOffParts[0]) === currentTimeHour && parseInt(dbNextCutOffParts[1]) <= currentTimeMinute)) 3177 ) { 3178 const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; 3179 const dow = now.getDay(); 3180 const weekLength = 7 - each_day.length; 3181 const isDisabledNextDay = !each_day.includes(days[(dow + 1) % 7]); 3182 const isDisabledAfterNext = !each_day.includes(days[(dow + 2) % 7]); 3183 const isDisabledAfterAfterNext = !each_day.includes(days[(dow + 3) % 7]); 3184 const tz = getTimeZone(region); 3185 const opts = { timeZone: tz, hour12: false }; 3186 if (isDisabledAfterNext && isDisabledAfterAfterNext && dbMiniDays > 1) { 3187 const d = parseBackendDate(newCurrentDate); 3188 d.setDate(d.getDate() + weekLength + 2); 3189 margedBlackout.push(formatDate(d)); 3190 } else if (isDisabledNextDay && isDisabledAfterNext) { 3191 const d = parseBackendDate(newCurrentDate); 3192 d.setDate(d.getDate() + weekLength + 1); 3193 for (let i = 0; i < dbMiniDays; i++) { 3194 d.setDate(d.getDate() + i); 3195 margedBlackout.push(formatDate(d)); 3196 } 3197 } else if (isDisabledNextDay && dbMiniDays === 1) { 3198 const d = parseBackendDate(newCurrentDate); 3199 d.setDate(d.getDate() + 2); 3200 margedBlackout.push(formatDate(d)); 3201 } 3202 3203 let nd = parseBackendDate(newCurrentDate); 3204 for (let i = dbMiniDays; i > 0; i--) { 3205 nd.setDate(nd.getDate() + 1); 3206 margedBlackout.push(formatDate(nd)); 3207 } 3208 } 3209 3210 if ( 3211 cut_off_time && 3212 parseInt(dbCutOffParts[0]) <= currentTimeHour && 3213 parseInt(dbCutOffParts[1]) <= currentTimeMinute 3214 ) { 3215 isCutOffPass = true; 3216 margedBlackout.push(GetCurrentDate(newCurrentDate)); 3217 } 3218 3219 if (enable_each_day.length > 0 && isTimeSlot && expressSlots.length > 0) { 3220 const [datePart] = newCurrentDate.split(', '); 3221 const [month, day, year] = datePart.split('/'); 3222 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3223 3224 const filteredOrders = apiData.orders[city]?.filter((o) => o.DeliveryDate === todayVal) || []; 3225 3226 const parsedNow = parseBackendDate(newCurrentDate); 3227 const currHour = parsedNow.getHours(); 3228 const currMin = parsedNow.getMinutes(); 3229 3230 const isCurrentDayExisInCollectionBlackout = isCurrentDateBlackedOut( 3231 collectionWiseBlackoutDatesSelection, 3232 newCurrentDate 3233 ); 3234 3235 const allSlotsGone = expressSlots.every((slot) => { 3236 const slotOrder = filteredOrders.find((o) => o.TimeSlot.match(/^(\d{1,2}:\d{2})/)?.[1] === slot.start_time); 3237 const isLimitReached = slotOrder && parseInt(slotOrder.OrderLimit) >= parseInt(slot.express_order_limit); 3238 3239 const [startHour, startMin] = slot.start_time.split(':').map(Number); 3240 const totalStartMins = startHour * 60 + startMin - parseInt(same_day_prep_time || 0); 3241 const isPrepTimePassed = totalStartMins <= currHour * 60 + currMin; 3242 3243 return isLimitReached || isPrepTimePassed; 3244 }); 3245 3246 if (isCurrentDayExisInCollectionBlackout) { 3247 optSameDay.disabled = true; 3248 optSameDay.hidden = true; 3249 } 3250 if (allSlotsGone) { 3251 optSameDay.disabled = true; 3252 optSameDay.hidden = true; 3253 isExpressOrderLimitReached = true; 3254 } 3255 } 3256 if (enable_each_day.length < 1) { 3257 let tempMini = dbMiniDays; 3258 const tz = getTimeZone(region); 3259 while (tempMini > 0) { 3260 const pakNow = new Date(newCurrentDate); 3261 3262 pakNow.setDate(pakNow.getDate() + --tempMini); 3263 3264 const year = pakNow.getFullYear();
3265 const month = pakNow.getMonth() + 1; // no leading zero 3266 const day = pakNow.getDate(); // no leading zero 3267 3268 margedBlackout.push(`${year}-${month}-${day}`); 3269 } 3270 } else { 3271 childDivDate.style.display = 'none'; 3272 const { withoutTag, withTag } = separateItemsByTag('sameday_delivery'); 3273 3274 contentArea.querySelector('.error-message')?.remove(); 3275 3276 const hasSameDayItems = withTag.length > 0; 3277 const hasNonSameDayItems = withoutTag.length > 0; 3278 const canUseSameDayZone = hasExpressZone || hasNextDayZone; 3279 const useTagCheck = cartHasSameDayTagMarkup(); 3280 3281 if (canUseSameDayZone && useTagCheck) { 3282 if (hasNonSameDayItems) { 3283 margedBlackout.push(GetCurrentDate(newCurrentDate)); 3284 isTagForSameDay = true; // Same-day disabled 3285 } else if (hasSameDayItems) { 3286 isTagForSameDay = false; // Same-day enabled 3287 } 3288 } 3289 } 3290 3291 if (dbMiniDays > 1) { 3292 addBlackoutDatesForUnscheduleDays(margedBlackout, dbMiniDays, each_day, region, newCurrentDate); 3293 } 3294 3295 if (dbMiniDays === 1) { 3296 addBlackoutDatesForUnscheduleDays(margedBlackout, dbMiniDays, each_day, region, newCurrentDate); 3297 } 3298 if (dbMiniDays === 1 && enable_each_day.length < 1) 3299 addBlackoutDatesForUnscheduleDays(margedBlackout, dbMiniDays, each_day, region, newCurrentDate); 3300 3301 // Vendor express check then load flatpickr 3302 GetCart().then((cartData) => { 3303 const result = 3304 isProductVendor && dbProductVendor && compareArraysForVendorExpress(dbProductVendor, cartData.vendors); 3305 if (isProductVendor) { 3306 if (result) overrideDates.push(normaliseDate(OrderLimitCurrentDate('-'))); 3307 else margedBlackout = [GetCurrentDate(newCurrentDate), ...margedBlackout]; 3308 } 3309 loadFlatpickr( 3310 inputDate, 3311 rollingDate, 3312 margedBlackout, 3313 enable_each_day, 3314 each_day, 3315 filterOverrideDates, 3316 newCurrentDate 3317 ); 3318 }); 3319 3320 let dateVal = ''; 3321 dateChangeHandler = function () { 3322 shippingRate.style.display = 'none'; 3323 shippingRateParagraph = ''; 3324 selectTime.innerHTML = ''; 3325 3326 dateVal = inputDate.value; 3327 setCartAttributes({ Delivery_Date: dateVal }); 3328 3329 if (isTimeSlot && NextDaySlots.length > 0) { 3330 timeSlotDiv.style.display = 'flex'; 3331 const defaultTimeOpt = document.createElement('option'); 3332 defaultTimeOpt.value = ''; 3333 defaultTimeOpt.disabled = true; 3334 defaultTimeOpt.selected = true; 3335 defaultTimeOpt.textContent = 'Select..'; 3336 selectTime.appendChild(defaultTimeOpt); 3337 const filteredOrders = apiData.orders[city]?.filter((o) => o.DeliveryDate === dateVal) || []; 3338 3339 let hasVisibleSlots = false; 3340 const sortedNextDaySlots = [...NextDaySlots].sort( 3341 (a, b) => timeToMinutes(a.start_time) - timeToMinutes(b.start_time) 3342 ); 3343 sortedNextDaySlots.forEach((slot) => { 3344 const slotOrder = filteredOrders.find((o) => { 3345 const apiSlotStart = o.TimeSlot.match(/^(\d{1,2}:\d{2})/)?.[1]; 3346 return apiSlotStart === slot.start_time; 3347 }); 3348 3349 const isLimitReached = slotOrder && parseInt(slotOrder.OrderLimit) >= parseInt(slot.next_day_orderlimit); 3350 if (isLimitReached) { 3351 return; // skip slot, same pattern as same-day 3352 } 3353 3354 const opt = document.createElement('option'); 3355 opt.value = `${slot.start_time}-${slot.end_time}`; 3356 opt.textContent = `${convertTo12HourFormat(slot.start_time)} - ${convertTo12HourFormat(slot.end_time)}`; 3357 selectTime.appendChild(opt); 3358 hasVisibleSlots = true; 3359 }); 3360 3361 if (!hasVisibleSlots) { 3362 timeSlotDiv.style.display = 'none'; 3363 checkoutElement.disabled = false; 3364 } else { 3365 checkoutElement.disabled = true; // wait for slot selection 3366 } 3367 } else { 3368 timeSlotDiv.style.display = 'none'; 3369 checkoutElement.disabled = false; 3370 } 3371 3372 if (!optionalCheckout) { 3373 if (dateVal && !/^\d{4}-\d{2}-\d{2}$/.test(dateVal)) { 3374 inputDate.value = ''; 3375 if (inputDate._flatpickr) inputDate._flatpickr.clear(); 3376 checkoutDateError.textContent = 'Please select a date from the calendar.'; 3377 checkoutDateError.style.display = 'block'; 3378 checkoutElement.disabled = true; 3379 inputDate.style.borderColor = 'red'; 3380 return; 3381 } else { 3382 checkoutDateError.style.display = 'none'; 3383 checkoutDateError.textContent = ''; 3384 inputDate.style.borderColor = ''; 3385 } 3386 } 3387 3388 const selectedDay = parseInt(dateVal.split('-')[2]); 3389 const today = parseBackendDate(newCurrentDate).getDate(); 3390 const isSameDay = selectedDay === today; 3391 if (isSameDay) { 3392 // â Sameday â wait for timeslot selection to show shipping price 3393 if (isTimeSlot && expressSlots.length > 0) { 3394 timeSlotDiv.style.display = 'flex'; 3395 } 3396 } else { 3397 // â Scheduled â show shipping price immediately on date select 3398 if (selectedCity === 'Karachi') { 3399 GetCart().then((cartData) => { 3400 const { total_price } = cartData; 3401 const totalPrice = Math.floor(total_price / 100); 3402 addShippingFeeMessage(totalPrice, shippingRateMessageElement, selectedCity, true, false); 3403 }); 3404 } else { 3405 GetCart().then((cartData) => { 3406 const { total_price } = cartData; 3407 const totalPrice = Math.floor(total_price / 100); 3408 addShippingFeeMessage(totalPrice, shippingRateMessageElement, selectedCity, false, true); 3409 }); 3410 } 3411 } 3412 }; 3413 inputDate.addEventListener('change', dateChangeHandler); 3414 3415 deliveryTypeHandler = async function () { 3416 const deliveryType = selectDeliveryType.value; 3417 3418 // ð Lock immediately â user can't fire this handler again until we're done 3419 selectDeliveryType.disabled = true; 3420 selectDeliveryType.style.opacity = '0.6'; 3421 selectDeliveryType.style.cursor = 'wait'; 3422 3423 try { 3424 if (deliveryType === 'samedaydelivery') { 3425 // console.log({isTimeSlot}) 3426 const showTimeSlots = isTimeSlot && expressSlots.length > 0;
3427 timeSlotDiv.style.display = showTimeSlots ? 'flex' : 'none'; 3428 if (showTimeSlots) { 3429 selectTime.disabled = true; 3430 selectTime.innerHTML = '<option>Loading...</option>'; 3431 } 3432 checkoutElement.disabled = true; 3433 childDivDate.style.display = 'none'; 3434 3435 const [datePart] = newCurrentDate.split(', '); 3436 const [month, day, year] = datePart.split('/'); 3437 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3438 try { 3439 await setCartAttributes({ Delivery_Date: todayVal, deliveryType: deliveryType, allow_order: '1' }); 3440 } catch (err) { 3441 console.error('[EZSchedule] Delivery_Date/deliveryType attribute write failed after retries:', err); 3442 } 3443 3444 try { 3445 await setProductProperties(todayVal); 3446 } catch (err) { 3447 console.error('[EZSchedule] setProductProperties failed:', err); 3448 } 3449 3450 selectTime.disabled = false; 3451 selectTime.innerHTML = ''; 3452 setCartAttributes({ Delivery_Date: todayVal, allow_order: '1' }); 3453 3454 const isSameDay = checkIfSameDayPakistan(dateVal); 3455 if (isSameDay) dateVal = todayVal; 3456 3457 if (isTimeSlot && expressSlots.length > 0) { 3458 const filteredOrders = apiData.orders[city]?.filter((o) => o.DeliveryDate === todayVal) || []; 3459 const parsedNow = parseBackendDate(newCurrentDate); 3460 const currHour = parsedNow.getHours(); 3461 const currMin = parsedNow.getMinutes(); 3462 3463 const defaultTimeOpt = document.createElement('option'); 3464 defaultTimeOpt.value = ''; 3465 defaultTimeOpt.disabled = true; 3466 defaultTimeOpt.selected = true; 3467 defaultTimeOpt.textContent = 'Select..'; 3468 selectTime.appendChild(defaultTimeOpt); 3469 3470 let hasVisibleSlots = false; 3471 3472 const sortedExpressSlots = [...expressSlots].sort( 3473 (a, b) => timeToMinutes(a.start_time) - timeToMinutes(b.start_time) 3474 ); 3475 3476 sortedExpressSlots.forEach((slot) => { 3477 if (isPECHSSlotBlocked(selectedZone, slot.start_time)) return; 3478 const slotOrder = filteredOrders.find( 3479 (o) => o.TimeSlot.match(/^(\d{1,2}:\d{2})/)?.[1] === slot.start_time 3480 ); 3481 const isLimitReached = 3482 slotOrder && parseInt(slotOrder.OrderLimit) >= parseInt(slot.express_order_limit); 3483 const [startHour, startMin] = slot.start_time.split(':').map(Number); 3484 const totalStartMins = startHour * 60 + startMin - parseInt(same_day_prep_time || 0); 3485 const isPrepTimePassed = totalStartMins <= currHour * 60 + currMin; 3486 3487 if (isLimitReached || isPrepTimePassed) return; 3488 3489 const opt = document.createElement('option'); 3490 opt.value = `${slot.start_time}-${slot.end_time}`; 3491 opt.textContent = `${convertTo12HourFormat(slot.start_time)} - ${convertTo12HourFormat(slot.end_time)}`; 3492 3493 selectTime.appendChild(opt); 3494 hasVisibleSlots = true; 3495 }); 3496 3497 if (!hasVisibleSlots) { 3498 timeSlotDiv.style.display = 'none'; 3499 selectDeliveryType.value = ''; 3500 optSameDay.disabled = true; 3501 optSameDay.hidden = true; 3502 checkoutElement.disabled = true; 3503 return; // â finally block below still runs â select gets re-enabled 3504 } 3505 3506 checkoutElement.disabled = true; 3507 } else { 3508 timeSlotDiv.style.display = 'none'; 3509 checkoutElement.disabled = false; 3510 } 3511 } else { 3512 timeSlotDiv.style.display = 'none'; 3513 childDivDate.style.display = 'flex'; 3514 checkoutElement.disabled = true; 3515 3516 const visibleInput = inputDate._flatpickr?.altInput; 3517 if (inputDate._flatpickr) { 3518 inputDate._flatpickr.set('clickOpens', false); 3519 } 3520 if (visibleInput) {
3521 visibleInput.placeholder = 'Loading calendar..'; 3522 visibleInput.style.opacity = '0.5'; 3523 visibleInput.style.cursor = 'not-allowed'; 3524 visibleInput.style.pointerEvents = 'none'; 3525 } 3526 3527 setCartAttributes({ 3528 deliveryType: deliveryType, 3529 allow_order: '0', 3530 Time_Slots: '', 3531 }); 3532 3533 try { 3534 await removeProductProperties(); 3535 } catch (err) { 3536 console.error('[EZSchedule] removeProductProperties failed:', err); 3537 } 3538 3539 if (inputDate._flatpickr) { 3540 inputDate._flatpickr.set('clickOpens', true); 3541 } 3542 if (visibleInput) { 3543 visibleInput.placeholder = 'Select date..'; 3544 visibleInput.style.opacity = ''; 3545 visibleInput.style.cursor = ''; 3546 visibleInput.style.pointerEvents = ''; 3547 } 3548 3549 if (isTimeSlot && NextDaySlots.length < 1) { 3550 timeSlotDiv.style.display = 'none'; 3551 } 3552 3553 checkoutElement.disabled = true; 3554 } 3555 } finally { 3556 selectDeliveryType.disabled = false; 3557 selectDeliveryType.style.opacity = ''; 3558 selectDeliveryType.style.cursor = ''; 3559 } 3560 }; 3561 selectDeliveryType.addEventListener('change', deliveryTypeHandler); 3562 3563 // Keeps the zone select and the next field (delivery type / calendar) in a 3564 // loading state while the zone's cart writes are in flight, like the same-day flow. 3565 function setZoneStepLoading(isLoading) { 3566 [selectZone, selectDeliveryType].forEach((el) => { 3567 el.disabled = isLoading; 3568 el.style.opacity = isLoading ? '0.6' : ''; 3569 el.style.cursor = isLoading ? 'wait' : ''; 3570 }); 3571 // A searchable area field is drawn by TomSelect, so lock its own control too 3572 const zoneSearch = selectZone.tomselect; 3573 if (zoneSearch) { 3574 if (isLoading) zoneSearch.disable(); 3575 else zoneSearch.enable(); 3576 zoneSearch.wrapper.style.opacity = isLoading ? '0.6' : ''; 3577 zoneSearch.wrapper.style.cursor = isLoading ? 'wait' : ''; 3578 } 3579 // Delivery type shows "Loading.." in place of its "Select.." placeholder 3580 defaultMethodOpt.textContent = isLoading ? 'Loading..' : 'Select..'; 3581 3582 if (inputDate._flatpickr) inputDate._flatpickr.set('clickOpens', !isLoading); 3583 const visibleInput = inputDate._flatpickr?.altInput; 3584 if (visibleInput) { 3585 visibleInput.placeholder = isLoading ? 'Loading calendar..' : 'Select date..'; 3586 visibleInput.style.opacity = isLoading ? '0.5' : ''; 3587 visibleInput.style.cursor = isLoading ? 'not-allowed' : ''; 3588 visibleInput.style.pointerEvents = isLoading ? 'none' : ''; 3589 } 3590 } 3591 3592 const applyZoneChange = async function () { 3593 const zone = selectZone.value; 3594 selectedZone = zone; 3595 const isPECHSAfter2PM = isPECHSSameDayClosed(zone, newCurrentDate); 3596 selectDeliveryType.value = ''; 3597 inputDate.value = ''; 3598 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 3599 timeSlotDiv.style.display = 'none'; 3600 checkoutElement.disabled = true; 3601 3602 let sameDayBlocked = false; 3603 let pendingRemoval = null; 3604 const zoneAttributeWrite = setCartAttributes({ DeliveryZone: zone }); 3605 3606 if (enable_each_day.length > 0 && isTimeSlot && expressSlots.length > 0) { 3607 const [datePart] = newCurrentDate.split(', '); 3608 const [month, day, year] = datePart.split('/'); 3609 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3610 3611 const filteredOrders = apiData.orders[city]?.filter((o) => o.DeliveryDate === todayVal) || []; 3612 const parsedNow = parseBackendDate(newCurrentDate); 3613 const currHour = parsedNow.getHours(); 3614 const currMin = parsedNow.getMinutes(); 3615 3616 sameDayBlocked = expressSlots.every((slot) => { 3617 if (isPECHSSlotBlocked(zone, slot.start_time)) return true; 3618 3619 const slotOrder = filteredOrders.find((o) => o.TimeSlot.match(/^(\d{1,2}:\d{2})/)?.[1] === slot.start_time); 3620 const isLimitReached = slotOrder && parseInt(slotOrder.OrderLimit) >= parseInt(slot.express_order_limit); 3621 const [startHour, startMin] = slot.start_time.split(':').map(Number); 3622 const totalStartMins = startHour * 60 + startMin - parseInt(same_day_prep_time || 0); 3623 const isPrepTimePassed = totalStartMins <= currHour * 60 + currMin; 3624 return isLimitReached || isPrepTimePassed; 3625 }); 3626 3627 if (sameDayBlocked) isExpressOrderLimitReached = true; 3628 } 3629 3630 const tzStr = getTimeZone(region); 3631 const todayStr = formatDate(parseBackendDate(newCurrentDate)); 3632 const [m, d, y] = todayStr.split('/'); 3633 const todayFormatted = `${y}-${parseInt(m)}-${parseInt(d)}`; 3634
3635 if (zone.toLowerCase() === 'rest of karachi') { 3636 pendingRemoval = removeProductProperties(); 3637 deliveryMethodDiv.style.display = 'none'; 3638 childDivDate.style.display = 'flex'; 3639 setCartAttributes({ allow_order: '0', deliveryType: '', Time_Slots: '' }); 3640 } else if (nextday_zone_data?.includes(zone)) { 3641 if (!margedBlackout.includes(todayFormatted)) margedBlackout.push(todayFormatted); 3642 optSameDay.hidden = true; 3643 optSameDay.disabled = true; 3644 3645 // â Any blocking condition â skip delivery type, show calendar directly 3646 deliveryMethodDiv.style.display = 'none'; 3647 childDivDate.style.display = 'flex'; 3648 3649 const [datePart] = newCurrentDate.split(', '); 3650 const [month, day, year] = datePart.split('/'); 3651 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3652 } else { 3653 // changes 04-07-2026 if any day is unschedule then don't show same day 3654 const [zcDatePart] = newCurrentDate.split(', '); 3655 const [zcMonth, zcDay, zcYear] = zcDatePart.split('/'); 3656 const zcToday = new Date(zcYear, zcMonth - 1, zcDay); 3657 3658 const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; 3659 const todayDayName = daysOfWeek[zcToday.getDay()]; 3660 const isTodayDisabledForSameDay = enable_each_day.length > 0 && !enable_each_day.includes(todayDayName); 3661 3662 const anyBlocked = 3663 sameDayBlocked || 3664 isCutOffPass || 3665 isExpressOrderLimitReached || 3666 isTagForSameDay || 3667 !isSameDayStockQualified || 3668 isTodayDisabledForSameDay || 3669 isPECHSAfter2PM; 3670 3671 3672 if (anyBlocked) { 3673 // â Cut-off passed / limit reached â skip delivery type, show calendar directly 3674 optSameDay.hidden = true; 3675 optSameDay.disabled = true; 3676 deliveryMethodDiv.style.display = 'none'; 3677 childDivDate.style.display = 'flex'; 3678 3679 const [datePart] = newCurrentDate.split(', '); 3680 const [month, day, year] = datePart.split('/'); 3681 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3682 } else { 3683 // â All clear â show delivery method toggle 3684 const isCurrentDayExisInCollectionBlackout = isCurrentDateBlackedOut( 3685 collectionWiseBlackoutDatesSelection, 3686 newCurrentDate 3687 ); 3688 3689 if (!isCurrentDayExisInCollectionBlackout) { 3690 optSameDay.hidden = false; 3691 optSameDay.disabled = false; 3692 } 3693 deliveryMethodDiv.style.display = 'flex'; 3694 childDivDate.style.display = 'none'; 3695 } 3696 3697 const idx = margedBlackout.indexOf(todayFormatted); 3698 if (!isCutOffPass && idx !== -1) margedBlackout.splice(idx, 1); 3699 if (!isExpressOrderLimitReached && idx !== -1) margedBlackout.splice(idx, 1); 3700 if (isExpressOrderLimitReached) margedBlackout.push(todayFormatted); 3701 if (isTagForSameDay) margedBlackout.push(todayFormatted); 3702 if (!isSameDayStockQualified) margedBlackout.push(todayFormatted); 3703 if (isCutOffPass) margedBlackout.push(todayFormatted); 3704 } 3705 3706 const rd = new Date(); 3707 rd.setDate(rd.getDate() + parseInt(cityConfig.available_dates)); 3708 await loadFlatpickr( 3709 inputDate, 3710 rd, 3711 margedBlackout, 3712 enable_each_day, 3713 each_day, 3714 filterOverrideDates, 3715 newCurrentDate 3716 ).catch((err) => console.error('[EZSchedule] loadFlatpickr failed:', err)); 3717 3718 // The calendar input exists now; put it in the loading state as well 3719 setZoneStepLoading(true); 3720 3721 // Wait for everything the zone step writes to the cart 3722 await zoneAttributeWrite; 3723 // removeProductProperties rewrites item properties too; let it finish first 3724 if (pendingRemoval) await pendingRemoval.catch(() => {}); 3725 if (cityConfig?.enable_zone_order_property === true) { 3726 try { 3727 await setZoneProperty(zone); 3728 } catch (err) { 3729 console.error('[EZSchedule] setZoneProperty failed:', err); 3730 } 3731 } 3732 }; 3733 3734 // Next field shows loading from the moment the zone changes until its cart 3735 // writes are done; always unlocked afterwards, even if something fails. 3736 zoneChangeHandler = async function () { 3737 setZoneStepLoading(true); 3738 try { 3739 await applyZoneChange(); 3740 } catch (err) { 3741 console.error('[EZSchedule] zone change failed:', err); 3742 } finally { 3743 setZoneStepLoading(false); 3744 } 3745 }; 3746 selectZone.addEventListener('change', zoneChangeHandler); 3747 3748 timeChangeHandler = () => { 3749 checkoutElement.disabled = false; 3750 setCartAttributes({ Time_Slots: selectTime.value });
3751 3752 const [datePart] = newCurrentDate.split(', '); 3753 const [month, day, year] = datePart.split('/'); 3754 const todayVal = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`; 3755 3756 const isSameDay = dateVal === todayVal; 3757 3758 GetCart().then((cartData) => { 3759 const { total_price } = cartData; 3760 const totalPrice = Math.floor(total_price / 100); 3761 addShippingFeeMessage(totalPrice, shippingRateMessageElement, selectedCity, true, true); 3762 }); 3763 }; 3764 selectTime.addEventListener('change', timeChangeHandler); 3765 }); 3766 function getCollectionsFromCartItem() { 3767 let cartRows = document.querySelector(cartItemsClass); 3768 if (!cartRows) return []; 3769 let cartItems = cartRows.querySelectorAll(cartItemClass); 3770 let collections = []; 3771 cartItems.forEach((item) => { 3772 let collectionDataFromAttribute = JSON.parse(item.getAttribute(collectionsdataAttributeSelector)); 3773 // collectionDataFromAttribute is already an array of handle strings, e.g. ["gift-hampers", "mothers-day", ...] 3774 collections.push(collectionDataFromAttribute); 3775 }); 3776 return collections; 3777 } 3778 3779 function getCollectionWiseBlackoutDates( 3780 cityCollections, 3781 blackoutDatesCollectionsWise, 3782 cartitemsCollectionsCombined 3783 ) { 3784 const normalizedCityCollections = cityCollections.map((item) => item.trim().toLowerCase()); 3785 3786 const normalizedCartCollections = cartitemsCollectionsCombined.flat().map((item) => item.trim().toLowerCase()); 3787 3788 const matchedCollections = normalizedCartCollections.filter((collection) => 3789 normalizedCityCollections.includes(collection) 3790 ); 3791 3792 if (matchedCollections.length > 0) { 3793 return blackoutDatesCollectionsWise; 3794 } else { 3795 return []; 3796 } 3797 } 3798 } 3799 3800 function buildPickupForm(apiData, contentArea, checkoutElement) { 3801 const pickupGeneral = apiData.pickupGeneralData; 3802 const pickupProfiles = apiData.pickupProfilesData; 3803 const globalBlackout = (pickupGeneral.globalBlockOutDate || []).map(normaliseDate); 3804 3805 if (!pickupProfiles || pickupProfiles.length === 0) { 3806 const p = document.createElement('p'); 3807 p.textContent = 'No pickup locations available.'; 3808 contentArea.appendChild(p); 3809 return; 3810 } 3811 3812 const activeProfiles = pickupProfiles.filter((p) => p.isEnableSchedule); 3813 3814 const childDivCity = document.createElement('div'); 3815 childDivCity.classList.add('child-div'); 3816 childDivCity.style.cssText = 3817 'display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 3818 const labelCity = document.createElement('label'); 3819 labelCity.textContent = pickupGeneral.city || 'Please select city'; 3820 const selectCity = document.createElement('select'); 3821 selectCity.id = 'pickupCity'; 3822 selectCity.style.cssText = 'width:175px;height:25px;'; 3823 const defaultCityOpt = document.createElement('option'); 3824 defaultCityOpt.value = ''; 3825 defaultCityOpt.disabled = true; 3826 defaultCityOpt.hidden = true; 3827 defaultCityOpt.selected = true; 3828 defaultCityOpt.textContent = 'Select..'; 3829 selectCity.appendChild(defaultCityOpt); 3830 activeProfiles 3831 .sort((a, b) => a.profileName.toLowerCase().localeCompare(b.profileName.toLowerCase())) 3832 .forEach((profile) => { 3833 const opt = document.createElement('option'); 3834 opt.value = profile.profileName; 3835 opt.textContent = profile.profileName; 3836 selectCity.appendChild(opt); 3837 }); 3838 childDivCity.appendChild(labelCity); 3839 childDivCity.appendChild(selectCity); 3840 contentArea.appendChild(childDivCity); 3841 3842 const childDivLocation = document.createElement('div'); 3843 childDivLocation.classList.add('child-div'); 3844 childDivLocation.style.cssText = 3845 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 3846 const labelLocation = document.createElement('label'); 3847 labelLocation.textContent = pickupGeneral.location || 'Please select location'; 3848 const selectLocation = document.createElement('select'); 3849 selectLocation.id = 'pickupLocation'; 3850 selectLocation.style.cssText = 'width:175px;height:25px;'; 3851 childDivLocation.appendChild(labelLocation); 3852 childDivLocation.appendChild(selectLocation); 3853 contentArea.appendChild(childDivLocation); 3854 3855 const childDivDate = document.createElement('div'); 3856 childDivDate.classList.add('child-div'); 3857 childDivDate.style.cssText = 3858 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 3859 const labelDate = document.createElement('label'); 3860 labelDate.textContent = pickupGeneral.date || 'Please select pickup date'; 3861 const inputDate = document.createElement('input'); 3862 inputDate.type = 'text'; 3863 inputDate.placeholder = 'Select Date..'; 3864 inputDate.setAttribute('data-input', ''); 3865 inputDate.style.cssText = 'width:175px;height:25px;background:transparent;'; 3866 childDivDate.appendChild(labelDate); 3867 childDivDate.appendChild(inputDate); 3868 contentArea.appendChild(childDivDate); 3869 3870 const childDivTime = document.createElement('div'); 3871 childDivTime.classList.add('child-div'); 3872 childDivTime.style.cssText = 3873 'display:none;justify-content:space-between;align-items:center;font-size:14px;padding:5px 0;'; 3874 const labelTime = document.createElement('label'); 3875 labelTime.textContent = pickupGeneral.timeSlot || 'Please select timeslot'; 3876 const selectTime = document.createElement('select'); 3877 selectTime.style.cssText = 'width:175px;height:25px;'; 3878 childDivTime.appendChild(labelTime); 3879 childDivTime.appendChild(selectTime); 3880 contentArea.appendChild(childDivTime); 3881 3882 loadTomSelect(() => initTomSelect(selectCity, 'pickupCity')); 3883 3884 selectCity.addEventListener('change', function () { 3885 const profileName = selectCity.value; 3886 if (!profileName) return; 3887 3888 childDivLocation.style.display = 'none'; 3889 childDivDate.style.display = 'none'; 3890 childDivTime.style.display = 'none'; 3891 selectTime.innerHTML = ''; 3892 inputDate.value = ''; 3893 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 3894 checkoutElement.disabled = true; 3895 3896 const profile = activeProfiles.find((p) => p.profileName === profileName); 3897 if (!profile) return; 3898 3899 setCartAttributes({ PickupCity: profileName }); 3900 3901 selectLocation.innerHTML = ''; 3902 const defaultLocOpt = document.createElement('option'); 3903 defaultLocOpt.value = ''; 3904 defaultLocOpt.disabled = true; 3905 defaultLocOpt.selected = true; 3906 defaultLocOpt.textContent = 'Select..'; 3907 selectLocation.appendChild(defaultLocOpt);
3908 (profile.pickupLocation || []).forEach((loc) => { 3909 const opt = document.createElement('option'); 3910 opt.value = opt.textContent = loc; 3911 selectLocation.appendChild(opt); 3912 }); 3913 3914 if (profile.pickupLocation?.length === 1) { 3915 selectLocation.value = profile.pickupLocation[0]; 3916 setCartAttributes({ PickupLocation: profile.pickupLocation[0] }); 3917 showPickupDatePicker(profile); 3918 } else { 3919 childDivLocation.style.display = 'flex'; 3920 } 3921 }); 3922 3923 selectLocation.addEventListener('change', function () { 3924 const location = selectLocation.value; 3925 if (!location) return; 3926 setCartAttributes({ PickupLocation: location }); 3927 3928 childDivDate.style.display = 'none'; 3929 childDivTime.style.display = 'none'; 3930 selectTime.innerHTML = ''; 3931 inputDate.value = ''; 3932 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 3933 checkoutElement.disabled = true; 3934 3935 const profile = activeProfiles.find((p) => p.profileName === selectCity.value); 3936 if (!profile) return; 3937 showPickupDatePicker(profile); 3938 }); 3939 3940 selectTime.addEventListener('change', function () { 3941 if (!selectTime.value) return; 3942 setCartAttributes({ PickupTimeSlot: selectTime.value }); 3943 checkoutElement.disabled = false; 3944 }); 3945 3946 /** 3947 * Returns current time in Asia/Karachi as { hour, min, total } 3948 */ 3949 function getLocalTime() { 3950 const now = new Date(); 3951 const tzOpts = { timeZone: 'Asia/Karachi', hour12: false }; 3952 const localStr = now.toLocaleString('en-US', tzOpts); 3953 const local = new Date(localStr); 3954 const hour = local.getHours(); 3955 const min = local.getMinutes(); 3956 return { hour, min, total: hour * 60 + min }; 3957 } 3958 3959 /** 3960 * Format a Date object as "YYYY-M-D" (matches mergedBlackout format) 3961 */ 3962 function toBlackoutKey(date) { 3963 return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; 3964 } 3965 3966 /** 3967 * Format a Date object as "YYYY-MM-DD" (matches override date format) 3968 */ 3969 function toOverrideKey(date) { 3970 const y = date.getFullYear(); 3971 const m = String(date.getMonth() + 1).padStart(2, '0'); 3972 const d = String(date.getDate()).padStart(2, '0'); 3973 return `${y}-${m}-${d}`; 3974 } 3975 3976 /** 3977 * Build a flat map of override dates from profile.overridedate 3978 * Returns: { "YYYY-MM-DD": { orderLimit, forceEnable } } 3979 */ 3980 function buildOverrideMap(overridedate) { 3981 const map = {}; 3982 if (!overridedate || typeof overridedate !== 'object') return map; 3983 Object.values(overridedate).forEach((entry) => { 3984 if (!entry.date) return; 3985 map[entry.date] = { 3986 orderLimit: entry.orderLimit != null ? parseInt(entry.orderLimit) : null, 3987 forceEnable: true, // presence of override entry means force-enable 3988 }; 3989 }); 3990 return map; 3991 } 3992 3993 function getOrderCount(dateKey, slotId = null) { 3994 const counts = apiData.orderCounts || {}; 3995 const entry = counts[dateKey]; 3996 if (!entry) return 0; 3997 if (slotId) return entry.slots?.[slotId] || 0; 3998 return entry.total || 0; 3999 } 4000 4001 function populateTimeSlots(slots, isToday, prepTime = 0, dateKey = '', overrideLimit = null) { 4002 selectTime.innerHTML = ''; 4003 childDivTime.style.display = 'none'; 4004 checkoutElement.disabled = true; 4005 4006 if (!slots || slots.length === 0) { 4007 checkoutElement.disabled = false; 4008 return; 4009 } 4010 4011 const defaultOpt = document.createElement('option'); 4012 defaultOpt.value = ''; 4013 defaultOpt.disabled = true; 4014 defaultOpt.hidden = true; 4015 defaultOpt.selected = true; 4016 defaultOpt.textContent = 'Select..'; 4017 selectTime.appendChild(defaultOpt); 4018 4019 const { total: currTotal } = getLocalTime(); 4020 4021 let hasVisibleSlot = false; 4022 4023 slots 4024 .sort((a, b) => (a.start || '').localeCompare(b.start || '')) 4025 .forEach((slot) => { 4026 // Skip slots with no start/end (empty placeholder slots) 4027 if (!slot.start || !slot.end) return; 4028 4029 // If overrideLimit is set (per-date override), use it for the whole date, 4030 // otherwise use the slot's own limit. 4031 const slotLimit = overrideLimit !== null ? overrideLimit : parseInt(slot.limit || 0); 4032 const slotCount = 4033 overrideLimit !== null 4034 ? getOrderCount(dateKey) // compare against total date orders 4035 : getOrderCount(dateKey, slot.slotId); // compare against per-slot orders 4036 4037 const isLimitReached = slotLimit >
4037 0 && slotCount >= slotLimit; 4038 if (isLimitReached) return; // hide completely 4039 4040 if (isToday) { 4041 const [startHour, startMin] = slot.start.split(':').map(Number); 4042 const adjustedStart = startHour * 60 + startMin - parseInt(prepTime || 0); 4043 if (adjustedStart <= currTotal) return; // hide passed slots 4044 } 4045 4046 const opt = document.createElement('option'); 4047 opt.value = `${slot.start} - ${slot.end}`; 4048 opt.textContent = `${slot.start} - ${slot.end}`; 4049 selectTime.appendChild(opt); 4050 hasVisibleSlot = true; 4051 }); 4052 4053 if (hasVisibleSlot) { 4054 childDivTime.style.display = 'flex'; 4055 } else { 4056 // All slots hidden (passed or full) â still allow checkout without timeslot 4057 checkoutElement.disabled = false; 4058 } 4059 } 4060 4061 function showPickupDatePicker(profile) { 4062 const localBlackout = (profile.pickupLocalBlackoutDates || []).map(normaliseDate); 4063 const mergedBlackout = [...new Set([...globalBlackout, ...localBlackout])]; 4064 const overrideMap = buildOverrideMap(profile.overridedate); 4065 const operatingDays = profile.pickupOperatingDays || []; 4066 const rollingDate = new Date(); 4067 rollingDate.setDate(rollingDate.getDate() + (profile.pickupRollingWindow || 14)); 4068 4069 const { hour: currHour, min: currMin, total: currTotal } = getLocalTime(); 4070 4071 const express = profile.express; 4072 const nextday = profile.nextday; 4073 4074 if (!operatingDays || operatingDays.length === 0) { 4075 inputDate.disabled = true; 4076 inputDate.style.pointerEvents = 'none'; 4077 inputDate.style.opacity = '0.5'; 4078 childDivDate.style.display = 'flex'; 4079 checkoutElement.disabled = true; 4080 return; 4081 } 4082 4083 // Reset any prior disabled state 4084 inputDate.disabled = false; 4085 inputDate.style.pointerEvents = ''; 4086 inputDate.style.opacity = ''; 4087 4088 let isSameDayAllowed = false; 4089 4090 if (express?.isEnableExpress) { 4091 if (express.cutoffTime) { 4092 const [cutHour, cutMin] = express.cutoffTime.split(':').map(Number); 4093 const cutoffPassed = currHour > cutHour || (currHour === cutHour && currMin >= cutMin); 4094 if (cutoffPassed) { 4095 mergedBlackout.push(toBlackoutKey(new Date())); 4096 } else { 4097 isSameDayAllowed = true; 4098 } 4099 } else { 4100 isSameDayAllowed = true; 4101 } 4102 } else { 4103 mergedBlackout.push(toBlackoutKey(new Date())); 4104 } 4105 4106 if (nextday?.isEnableNextDay) { 4107 const minDays = parseInt(nextday.minFulfillmentDays || 1); 4108 4109 // Check if today itself is scheduled 4110 const todayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][new Date().getDay()]; 4111 const todayOverrideKey = toOverrideKey(new Date()); 4112 const isTodayScheduled = operatingDays.includes(todayName) || overrideMap[todayOverrideKey]?.forceEnable; 4113 4114 let cutoffPassed = false; 4115 if (nextday.cutoffTime) { 4116 const [cutHour, cutMin] = nextday.cutoffTime.split(':').map(Number); 4117 cutoffPassed = currHour > cutHour || (currHour === cutHour && currMin >= cutMin); 4118 } 4119 4120 // If today is unscheduled, force cutoff as passed (today isn't orderable anyway) 4121 const effectiveCutoffPassed = cutoffPassed || !isTodayScheduled; 4122 4123 const startOffset = effectiveCutoffPassed ? 0 : 1; 4124 let scheduledDaysCounted = 0; 4125 let firstAvailableOffset = null; 4126 4127 for (let offset = startOffset; offset <= 60; offset++) { 4128 const d = new Date(); 4129 d.setDate(d.getDate() + offset); 4130 4131 const overrideKey = toOverrideKey(d); 4132 const dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][d.getDay()]; 4133 const isOverride = overrideMap[overrideKey]?.forceEnable; 4134 const isScheduled = operatingDays.includes(dayName); 4135 const isDayAvailable = isOverride || isScheduled; 4136 4137 if (isDayAvailable) { 4138 // Skip today (offset=0) from count if cutoff not passed & today is scheduled 4139 if (offset === 0 && !cutoffPassed && isTodayScheduled) continue; 4140 4141 scheduledDaysCounted++; 4142 4143 if (scheduledDaysCounted >= minDays) { 4144 firstAvailableOffset = offset; 4145 break; 4146 } 4147 } 4148 // Unscheduled days are skipped â not counted, not blocked 4149 } 4150 4151 // Block only scheduled/available days before firstAvailableOffset 4152 if (firstAvailableOffset !== null) { 4153 for (let i = startOffset; i < firstAvailableOffset; i++) { 4154 if (i === 0 && isSameDayAllowed) continue; 4155 4156 const d = new Date(); 4157 d.setDate(d.getDate() + i); 4158 4159 const overrideKey = toOverrideKey(d); 4160 const dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][d.getDay()]; 4161 const isOverride = overrideMap[overrideKey]?.forceEnable; 4162 const isScheduled = operatingDays.includes(dayName); 4163 4164 if (isOverride || isScheduled) { 4165 mergedBlackout.push(toBlackoutKey(d)); 4166 } 4167 } 4168 } 4169 } 4170 4171 // Remove override-enabled dates from blackout 4172 // (override can force-enable a date that would otherwise be blacked out) 4173 const finalBlackout = mergedBlackout.filter((dateStr) => { 4174 // Convert blackout key "YYYY-M-D" â "YYYY-MM-DD" for override map lookup 4175 const parts = dateStr.split('-'); 4176 const normalized = `${parts[0]}
4176-${String(parts[1]).padStart(2, '0')}-${String(parts[2]).padStart(2, '0')}`; 4177 return !overrideMap[normalized]?.forceEnable; 4178 }); 4179 4180 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 4181 4182 // Returns true (disable date) if date has no timeslots AND order limit reached. 4183 function isDateOrderLimitReached(date) { 4184 const dateKey = toOverrideKey(date); 4185 const overrideEntry = overrideMap[dateKey]; 4186 4187 // Determine effective order limit for this date 4188 const effectiveLimit = 4189 overrideEntry?.orderLimit != null 4190 ? overrideEntry.orderLimit 4191 : parseInt(nextday?.perDayOrderLimit || express?.perDayOrderLimit || 0); 4192 4193 if (effectiveLimit <= 0) return false; // no limit configured 4194 4195 const totalOrders = getOrderCount(dateKey); 4196 return totalOrders >= effectiveLimit; 4197 } 4198 4199 function initPickupFlatpickr() { 4200 flatpickr(inputDate, { 4201 minDate: 'today', 4202 maxDate: rollingDate, 4203 disable: [ 4204 (date) => { 4205 const blackoutKey = toBlackoutKey(date); 4206 const overrideKey = toOverrideKey(date); 4207 const dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][date.getDay()]; 4208 const overrideEntry = overrideMap[overrideKey]; 4209 4210 // Force-enabled override date: only block if order limit reached (no timeslot mode) 4211 if (overrideEntry?.forceEnable) { 4212 const timeslotEnabled = nextday?.enableTimeSlot || express?.enableTimeSlot; 4213 if (!timeslotEnabled && isDateOrderLimitReached(date)) return true; 4214 return false; 4215 } 4216 4217 // Standard blackout check 4218 if (finalBlackout.includes(blackoutKey)) return true; 4219 4220 // Operating day check 4221 if (!operatingDays.includes(dayName)) return true; 4222 4223 // Date-level order limit check (only when timeslots are NOT enabled) 4224 const timeslotEnabled = nextday?.enableTimeSlot || express?.enableTimeSlot; 4225 if (!timeslotEnabled && isDateOrderLimitReached(date)) return true; 4226 4227 return false; 4228 }, 4229 ], 4230 onChange: function (selectedDates, dateStr) { 4231 if (!dateStr) return; 4232 4233 const selected = selectedDates[0]; 4234 const todayDate = new Date(); 4235 const isToday = 4236 selected.getFullYear() === todayDate.getFullYear() && 4237 selected.getMonth() === todayDate.getMonth() && 4238 selected.getDate() === todayDate.getDate(); 4239 4240 selectTime.innerHTML = ''; 4241 childDivTime.style.display = 'none'; 4242 checkoutElement.disabled = true; 4243 4244 setCartAttributes({ PickupDate: dateStr }); 4245 4246 const selectedKey = toOverrideKey(selected); 4247 const overrideEntry = overrideMap[selectedKey]; 4248 4249 // Determine effective per-date order limit (override takes precedence) 4250 const getEffectiveLimit = (baseLimit) => 4251 overrideEntry?.orderLimit != null ? overrideEntry.orderLimit : parseInt(baseLimit || 0); 4252 4253 if (isToday) { 4254 if (express?.isEnableExpress) { 4255 if (express.enableTimeSlot && express.timeSlots?.length > 0) { 4256 const limit = getEffectiveLimit(express.perDayOrderLimit); 4257 populateTimeSlots( 4258 express.timeSlots, 4259 true, 4260 express.prepTime || express.sameDayPrepTime || 0, 4261 selectedKey, 4262 overrideEntry?.orderLimit != null ? limit : null 4263 ); 4264 } else { 4265 checkoutElement.disabled = false; 4266 } 4267 } 4268 } else { 4269 if (nextday?.isEnableNextDay) { 4270 if (nextday.enableTimeSlot && nextday.timeSlots?.length > 0) { 4271 const limit = getEffectiveLimit(nextday.perDayOrderLimit); 4272 populateTimeSlots( 4273 nextday.timeSlots, 4274 false, 4275 0, 4276 selectedKey, 4277 overrideEntry?.orderLimit != null ? limit : null 4278 ); 4279 } else { 4280 checkoutElement.disabled = false; 4281 } 4282 } else { 4283 checkoutElement.disabled = false; 4284 } 4285 } 4286 }, 4287 }); 4288 } 4289 4290 if (window.flatpickr) { 4291 initPickupFlatpickr(); 4292 } else { 4293 const script = document.createElement('script'); 4294 script.src = 'https://cdn.jsdelivr.net/npm/flatpickr'; 4295 script.onload = initPickupFlatpickr; 4296 document.head.appendChild(script); 4297 } 4298 4299 childDivDate.style.display = 'flex'; 4300 checkoutElement.disabled = true; 4301 } 4302 } 4303
4304 async function init() { 4305 try { 4306 injectStyles(); 4307 4308 const res = await fetch(`${URI}api/get-theme-labels?shop=${shop}`, { 4309 headers: { 4310 'ngrok-skip-browser-warning': 'true', 4311 }, 4312 }); 4313 const json = await res.json(); 4314 4315 if (json?.status !== 'ok' || !json?.data) { 4316 console.error('[EZSchedule] Unexpected API response', json); 4317 return; 4318 } 4319 4320 return buildMethodSelector(json.data); 4321 } catch (err) { 4322 console.error('[EZSchedule] Init failed:', err); 4323 } 4324 } 4325 4326 function isDateNotAfterNextDay(rawDate) { 4327 // rawDate is "YYYY-MM-DD" 4328 const parts = rawDate.split('-'); 4329 if (parts.length !== 3) return false; 4330 4331 const [yyyy, mm, dd] = parts.map(Number); 4332 if (!yyyy || !mm || !dd) return false; 4333 4334 // Get tomorrow's date in Pakistan Standard Time (UTC+5, no DST) 4335 const fmt = new Intl.DateTimeFormat('en-US', { 4336 timeZone: 'Asia/Karachi', 4337 year: 'numeric', 4338 month: '2-digit', 4339 day: '2-digit', 4340 }); 4341 4342 const tomorrow = new Date(); 4343 tomorrow.setDate(tomorrow.getDate() + 1); 4344 4345 const [tMM, tDD, tYYYY] = fmt.format(tomorrow).split('/').map(Number); 4346 4347 // Build comparable integers YYYYMMDD 4348 const deliveryInt = yyyy * 10000 + mm * 100 + dd; 4349 const tomorrowInt = tYYYY * 10000 + tMM * 100 + tDD; 4350 4351 // true = delivery date is on or before tomorrow â must pick AFTER tomorrow 4352 return deliveryInt <= tomorrowInt; 4353 } 4354 4355 function addShippingFeeMessage(cartTotal, shippingMessageShowElement, city, isSameDay, deliveryType) { 4356 if (shop === 'lals-sd.myshopify.com' || shop === 'asimjofa-dev.myshopify.com') { 4357 if (city === 'Karachi' && deliveryType) { 4358 // â Karachi + deliveryType true â fixed Rs. 350 4359 deliveryFeeMessage = 'Delivery charges will be Rs. 350'; 4360 shippingMessageShowElement.innerText = deliveryFeeMessage; 4361 } else { 4362 // â Everything else â calculated at checkout 4363 deliveryFeeMessage = 'Delivery charges will be calculated at checkout'; 4364 shippingMessageShowElement.innerText = deliveryFeeMessage; 4365 } 4366 } 4367 } 4368 4369 function populateCities(selectElement, cityData) { 4370 const allCities = cityData.map((c) => c.name); 4371 4372 const priority = []; 4373 const others = []; 4374 4375 allCities.forEach((city) => { 4376 if (priorityCities.includes(city)) { 4377 priority.push(city); 4378 } else { 4379 others.push(city); 4380 } 4381 }); 4382 4383 // Ensure priority cities stay in defined order & exist in data 4384 const orderedPriority = priorityCities.filter((c) => allCities.includes(c)); 4385 4386 const finalCities = [...orderedPriority, ...others]; 4387 4388 selectElement.innerHTML = ''; 4389 4390 finalCities.forEach((city) => { 4391 const opt = document.createElement('option'); 4392 opt.value = opt.textContent = city; 4393 selectElement.appendChild(opt); 4394 }); 4395 } 4396 4397 function removeExistingCitySelector() { 4398 let citySelectorCard = document.querySelector('.ez-schedule-city-selector'); 4399 if (citySelectorCard) { 4400 citySelectorCard.remove(); 4401 } 4402 } 4403 function reinitFlatpickr() { 4404 const inputDate = document.querySelector('#ezschedule-content-area [data-input]'); 4405 if (!inputDate) return; 4406 if (inputDate._flatpickr) inputDate._flatpickr.destroy(); 4407 4408 const citySelect = document.getElementById('siarCity'); 4409 if (!citySelect || !citySelect.value) return; 4410 4411 // Trigger a synthetic change to rebuild everything fresh 4412 citySelect.dispatchEvent(new Event('change')); 4413 } 4414 4415 // Same-day stock check: every cart line needs inventory - quantity >= 0, read 4416 // from the current DOM (inventory attribute + configured quantity input). One 4417 // failing or unreadable line makes the whole cart ineligible for same day. 4418 function validateSameDayStock(reason = '') { 4419 if (!sameDayStock.enabled) { 4420 isSameDayStockQualified = true; 4421 return isSameDayStockQualified; 4422 } 4423 if (cartHasSameDayTagMarkup()) { 4424 isSameDayStockQualified = true; 4425 return isSameDayStockQualified; 4426 } 4427 4428 const lineItems = Array.from(document.querySelectorAll('[ez-schedule-lineitem-inventory]')); 4429 4430 // Check every line (no early exit) so each one is logged 4431 const rows = lineItems.map((lineItem, index) => {
4432 const row = { 4433 index, 4434 element: lineItem, 4435 inventory: null, 4436 quantity: null, 4437 remaining: null, 4438 pass: false, 4439 reason: '', 4440 }; 4441 const inventoryRaw = (lineItem.getAttribute('ez-schedule-lineitem-inventory') || '').trim(); 4442 let quantityInput = null; 4443 try { 4444 quantityInput = lineItem.querySelector(sameDayStock.qtySelector); 4445 } catch (err) { 4446 row.reason = 'invalid quantity selector'; 4447 return row; 4448 } 4449 // Theme updates the value attribute; .value goes stale once the customer has typed in the box 4450 const quantityRaw = (quantityInput?.getAttribute?.('value') ?? quantityInput?.value ?? '').trim(); 4451 row.inventory = inventoryRaw; 4452 row.quantity = quantityRaw; 4453 if (!inventoryRaw) { 4454 row.reason = 'inventory attribute missing/empty'; 4455 return row; 4456 } 4457 if (!quantityInput) { 4458 row.reason = 'quantity input not found inside this line item'; 4459 return row; 4460 } 4461 if (!quantityRaw) { 4462 row.reason = 'quantity input is empty'; 4463 return row; 4464 } 4465 4466 const inventory = Number(inventoryRaw); 4467 const quantity = Number(quantityRaw); 4468 if (Number.isNaN(inventory) || Number.isNaN(quantity)) { 4469 row.reason = 'inventory or quantity is not a number'; 4470 return row; 4471 } 4472 4473 row.remaining = inventory - quantity; 4474 row.pass = row.remaining >= 0; 4475 row.reason = row.pass ? 'ok' : 'not enough stock'; 4476 return row; 4477 }); 4478 4479 // if (rows.length) console.table(rows.map(({ element, ...rest }) => rest)); 4480 // rows.forEach((row) => console.log(`[EZSchedule][stock] line ${row.index}:`, row.reason, row.element)); 4481 4482 isSameDayStockQualified = rows.every((row) => row.pass); 4483 // console.log( 4484 // `[EZSchedule][stock] cart result: ${isSameDayStockQualified ? 'PASS â same day allowed' : 'FAIL â same day hidden'}` 4485 // ); 4486 return isSameDayStockQualified; 4487 } 4488 4489 // Runs once when the widget is built. Validates the cart straight away and 4490 // re-validates on quantity changes (event delegation, so re-rendered inputs work). 4491 // When the result flips, the delivery options are rebuilt so same day disappears 4492 // or comes back. The existing item-removal observer is left as it is. 4493 function initSameDayStockChecking(settings) { 4494 sameDayStock.enabled = settings?.same_day_inventory_check === true; 4495 sameDayStock.qtySelector = (settings?.qty_input_selector || '').trim(); 4496 4497 if (!sameDayStock.enabled) { 4498 console.warn('[EZSchedule][stock] feature disabled for this store â quantity observer NOT attached'); 4499 return; 4500 } 4501 4502 if (sameDayStock.qtySelector) { 4503 try { 4504 document.querySelector(sameDayStock.qtySelector); 4505 // console.log( 4506 // `[EZSchedule][stock] quantity inputs on page matching "${sameDayStock.qtySelector}": ${document.querySelectorAll(sameDayStock.qtySelector).length}` 4507 // ); 4508 } catch (err) { 4509 console.warn('[EZSchedule] Invalid quantity input selector:', sameDayStock.qtySelector); 4510 } 4511 } else { 4512 console.warn('[EZSchedule][stock] feature enabled but no quantity input selector is set'); 4513 } 4514 validateSameDayStock('initial load'); 4515 4516 const LINE_ATTR = 'ez-schedule-lineitem-inventory'; 4517 const isQtyInput = (node) => { 4518 try { 4519 return !!node && node.nodeType === 1 && node.matches(sameDayStock.qtySelector); 4520 } catch (err) { 4521 return false; 4522 } 4523 }; 4524 const containsQtyOrLine = (node) => { 4525 if (!node || node.nodeType !== 1) return false; 4526 if (isQtyInput(node) || node.hasAttribute(LINE_ATTR)) return true; 4527 try { 4528 return !!node.querySelector(`${sameDayStock.qtySelector}, [${LINE_ATTR}]`); 4529 } catch (err) { 4530 return !!node.querySelector(`[${LINE_ATTR}]`); 4531 } 4532 }; 4533 4534 // All triggers end here: re-validate, and rebuild the delivery options only if the result flips 4535 let quantityValidationTimer; 4536 const scheduleValidation = (reason) => { 4537 clearTimeout(quantityValidationTimer); 4538 quantityValidationTimer = setTimeout(() => { 4539 const wasQualified = isSameDayStockQualified; 4540 const nowQualified = validateSameDayStock(reason); 4541 if (nowQualified !== wasQualified) { 4542 // console.log(`[EZSchedule][stock] result changed ${wasQualified ? 'PASS' : 'FAIL'} â ${nowQualified ? 'PASS' : 'FAIL'}, rebuilding`); 4543 reinitFlatpickr(); 4544 } else { 4545 // console.log('[EZSchedule][stock] result unchanged, no rebuild'); 4546 } 4547 }, 100); 4548 }; 4549 4550 // Typing / native change on the quantity input 4551 const handleQuantityChange = (event) => { 4552 if (!isQtyInput(event.target)) return; 4553 // console.log(`[EZSchedule][stock] quantity ${event.type} event`, event.target); 4554 scheduleValidation(`quantity ${event.type}`); 4555 }; 4556 document.addEventListener('input', handleQuantityChange); 4557 document.addEventListener('change', handleQuantityChange); 4558 4559 // +/- buttons update the input's value attribute (no event), or the theme re-renders 4560 // the cart lines. Separate from the existing item-removal observer, which is unchanged. 4561 new MutationObserver((mutations) => { 4562 // DEBUG: every value attribute change on the page, and whether it matches the selector 4563 mutations.filter((m) => m.type === 'attributes' && m.attributeName === 'data-current-qty'); 4564 // .forEach((m) => 4565 // // console.log('[EZSchedule][stock][debug] data-current-qty attribute changed', { 4566 // // element: m.target, 4567 // // from: m.oldValue, 4568 // // to: m.target.getAttribute('data-current-qty'),
4569 // // matchesQuantitySelector: isQtyInput(m.target), 4570 // // insideCartLine: !!m.target.closest?.(`[${LINE_ATTR}]`), 4571 // // }) 4572 // ); 4573 4574 const relevant = mutations.some((m) => { 4575 if (m.type === 'attributes') return isQtyInput(m.target) || m.attributeName === LINE_ATTR; 4576 return [...m.addedNodes, ...m.removedNodes].some(containsQtyOrLine); 4577 }); 4578 if (relevant) { 4579 // console.log('[EZSchedule][stock] quantity value attribute / cart lines changed'); 4580 scheduleValidation('value attribute / cart lines changed'); 4581 } 4582 }).observe(document.body, { 4583 childList: true, 4584 subtree: true, 4585 attributes: true, 4586 attributeOldValue: true, 4587 attributeFilter: ['value', LINE_ATTR], 4588 }); 4589 4590 // DEBUG: what the observer can see. Inputs inside a shadow DOM are invisible to it. 4591 let matched = []; 4592 try { 4593 matched = Array.from(document.querySelectorAll(sameDayStock.qtySelector)); 4594 } catch (err) {} 4595 let inShadow = 0; 4596 document.querySelectorAll('*').forEach((el) => { 4597 try { 4598 if (el.shadowRoot && el.shadowRoot.querySelector(sameDayStock.qtySelector)) inShadow++; 4599 } catch (err) {} 4600 }); 4601 // console.log('[EZSchedule][stock][debug] quantity observer attached', { 4602 // selector: sameDayStock.qtySelector, 4603 // matchingElements: matched, 4604 // matchingTags: matched.map((el) => `${el.tagName.toLowerCase()}${el.type ? `[type=${el.type}]` : ''}`), 4605 // matchingInsideCartLine: matched.filter((el) => el.closest(`[${LINE_ATTR}]`)).length, 4606 // shadowRootsContainingSelector: inShadow, 4607 // }); 4608 } 4609 4610 function isNextCutOffPassed(cutOffTime) { 4611 // cutOffTime is "HH:MM" e.g. "18:00" 4612 const parts = cutOffTime.split(':'); 4613 if (parts.length !== 2) return false; 4614 4615 const [cutHH, cutMM] = parts.map(Number); 4616 if (isNaN(cutHH) || isNaN(cutMM)) return false; 4617 4618 // Current time in Pakistan Standard Time (UTC+5, no DST) 4619 const fmt = new Intl.DateTimeFormat('en-US', { 4620 timeZone: 'Asia/Karachi', 4621 hour: '2-digit', 4622 minute: '2-digit', 4623 hour12: false, 4624 }); 4625 4626 const [nowHH, nowMM] = fmt.format(new Date()).split(':').map(Number); 4627 4628 // Convert both to total minutes and compare 4629 const cutTotal = cutHH * 60 + cutMM; 4630 const nowTotal = nowHH * 60 + nowMM; 4631 4632 return nowTotal >= cutTotal; // true = cut-off has passed 4633 } 4634 4635 async function clearLineItemProperties(keys) { 4636 const cart = await fetch('/cart.js').then((r) => r.json()); 4637 const items = (cart?.items ?? []).filter((item) => keys.some((key) => item.properties?.[key])); 4638 4639 for (const item of items) { 4640 const cleared = Object.fromEntries(keys.map((key) => [key, ''])); 4641 await fetch('/cart/change.js', { 4642 method: 'POST', 4643 headers: { 'Content-Type': 'application/json' }, 4644 body: JSON.stringify({ 4645 id: item.key, 4646 quantity: item.quantity, 4647 properties: { ...item.properties, ...cleared }, 4648 }), 4649 }); 4650 } 4651 } 4652 4653 async function removeProductProperties() { 4654 return clearLineItemProperties(['Order Delivery']); 4655 } 4656 4657 function parseBackendDate(newCurrentDate) { 4658 const [datePart, timePart] = newCurrentDate.split(', '); 4659 const [month, day, year] = datePart.split('/'); 4660 const [hourStr = '0', minuteStr = '0'] = (timePart || '').split(':'); 4661 return new Date(year, month - 1, day, parseInt(hourStr, 10) || 0, parseInt(minuteStr, 10) || 0); 4662 } 4663 4664 function isCurrentDateBlackedOut(collectionWiseBlackoutDatesSelection, newCurrentDate) { 4665 const formattedCurrentDate = getFormattedDate(newCurrentDate); 4666 return collectionWiseBlackoutDatesSelection.includes(formattedCurrentDate); 4667 } 4668 4669 function isPECHSZone(zone) { 4670 return typeof zone === 'string' && zone.trim().toLowerCase() === 'pechs'; 4671 } 4672 4673 // Slot-level: PECHS slots starting at/after 14:00 are never offered 4674 function isPECHSSlotBlocked(zone, startTime) { 4675 if (!isPECHSZone(zone) || !startTime) return false; 4676 return timeToMinutes(startTime) >= timeToMinutes('14:00'); 4677 } 4678 4679 // Day-level: PECHS same-day closes once the backend clock hits 14:00 4680 function isPECHSSameDayClosed(zone, newCurrentDate) { 4681 if (!isPECHSZone(zone)) return false; 4682 return parseBackendDate(newCurrentDate).getHours() >= 14; 4683 } 4684 4685 function getFormattedDate(newCurrentDate) { 4686 // newCurrentDate format: "7/22/2026, 13:04:47" 4687 const datePart = newCurrentDate.split(',')[0].trim(); // "7/22/2026" 4688 const [month, day, year] = datePart.split('/'); 4689 4690 return [year, month.padStart(2, '0'), day.padStart(2, '0')].join('-'); // "2026-07-22" 4691 } 4692 4693 function convertTo12HourFormat(time24) { 4694 // time24 expected format: "HH:mm" ya "HH:mm:ss" 4695 const [hourStr, minuteStr] = time24.split(':'); 4696 let hour = parseInt(hourStr, 10); 4697 const minute = minuteStr.padStart(2, '0'); 4698 4699 const period = hour >= 12 ? 'PM' : 'AM'; 4700 4701 hour = hour % 12; 4702 if (hour === 0) hour = 12; // 0 â 12 AM, 12 â 12 PM 4703 4704 return `${hour}:${minute} ${period}`; 4705 } 4706 4707 function timeToMinutes(timeStr) { 4708 const [h, m] = timeStr.split(':').map(Number); 4709 return h * 60 + m; 4710 } 4711 4712 // Started from buildMethodSelector() once the cart selectors from Settings are applied 4713 function initCartItemRemovalObserver() { 4714 if (!(shop === 'lals-sd.myshopify.com' || shop === 'asimjofa-dev.myshopify.com')) return; 4715 const cartItemsContainer = document.querySelector(cartItemsClass); 4716 if (!cartItemsContainer) return; 4717 4718 let previousItemCount = document.querySelectorAll(cartItemClass).length; 4719 4720 const observer = new MutationObserver(async () => { 4721 const currentItems = document.querySelectorAll(cartItemClass).length; 4722 if (currentItems < previousItemCount) { 4723 reinitFlatpickr(); 4724 document.dispatchEvent(new CustomEvent('cart:item-removed')); 4725 } 4726 4727 previousItemCount = currentItems; 4728 });
4729 4730 observer.observe(cartItemsContainer, { 4731 childList: true, 4732 subtree: true, 4733 }); 4734 } 4735 4736 init(); 4737 4738 document.addEventListener('visibilitychange', () => { 4739 if (document.visibilityState === 'hidden') { 4740 lastActiveTime = Date.now(); 4741 } else if (document.visibilityState === 'visible' && !hasRefreshed) { 4742 const now = Date.now(); 4743 const timeElapsed = now - lastActiveTime; 4744 const fiveMinutes = 5 * 60 * 1000; 4745 4746 if (timeElapsed > fiveMinutes) { 4747 hasRefreshed = true; 4748 location.reload(); 4749 } 4750 } 4751 }); 4752</script>
4752 4753 4754<style> 4755 .method-selection { 4756 border: 1px solid #e7e7e7; 4757 width: 90px; 4758 background-color: #f1f1f1; 4759 border-radius: 12px; 4760 display: flex; 4761 flex-direction: column; 4762 justify-content: center; 4763 align-items: center; 4764 padding: 8px 7px; 4765 height: 90px; 4766 cursor: pointer; 4767 gap: 8px; 4768 } 4769 4770 .ez-schedule-city-selector .active:after { 4771 content: ''; 4772 } 4773</style> 4774 4775 4776</div><div id="shopify-block-AM05QbkZpaG5MWU93V__18228966181090706294" class="shopify-block shopify-app-block"> 4777 4778 4779
4779<script type="module" src="https://cdn.shopify.com/extensions/01a115be-abcf-7501-a123-78da12b4df6b/lb-upsell-452/assets/lb-upsell.js" defer="defer"></script>
4779 4780
4780<script type="module" src="https://cdn.shopify.com/extensions/01a115be-abcf-7501-a123-78da12b4df6b/lb-upsell-452/assets/lb-upsell-components.esm.js" defer="defer"></script>
4780 4781 4782 4783
4784<script> 4785 4786 4787 4788</script>
4788 4789
4790<script> 4791 4792 window.lbInitMode = "immediate"; 4793 4794 window.lbComponentSrc = "https://cdn.shopify.com/extensions/01a115be-abcf-7501-a123-78da12b4df6b/lb-upsell-452/assets/lb-upsell-components.esm.js";</script>
4794 4795
4796<script type="text/javascript" src="https://cdn.shopify.com/extensions/01a115be-abcf-7501-a123-78da12b4df6b/lb-upsell-452/assets/lb-utils.js" defer="defer"></script>
4796 4797 4798</div>
4798<script src="https://cdn.shopify.com/storefront/standard-actions.js" type="module" data-source-attribution="shopify.standard_actions"></script>
4798 4799</body> 4800</html>
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.