1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6531],{2661:(e,t,r)=>{r.d(t,{F9:()=>l,RP:()=>n,qn:()=>i});let n="Winnipeg East",l={COMING_SOON:"coming_soon",DISPLAY_NAME_FR:"display_name_fr",DATE_OPENED:"dateOpened",ADDRESS1_FR:"address1_fr"},i="BC-LOCATION-1"},19150:(e,t,r)=>{r.d(t,{Gb:()=>o,Q9:()=>a,TP:()=>m,aR:()=>i,q3:()=>u,tP:()=>l,uY:()=>d});var n=r(63771);let l=200,i=(e,t)=>{let r=(null==t?void 0:t.trim())||"",n=String(null!=e?e:"").trim();return r?/^(?:PA\d+)[-:](?:\s*)/.test(r)?r.replace(/^PA\d+[-:]\s*/,"").trim():n&&r.startsWith(n)?r.slice(n.length).trimStart().replace(/^[-:]+\s*/,"").trim():r:""},o=e=>e.split("/").at(-2),a=e=>e.map(e=>{var t,r,n,l,a,u,d,m;let c=o(e.path),s=null!=(a=e.listPrice)?a:e.salePrice,p="number"==typeof e.listPrice&&e.salePrice<e.listPrice?s-e.salePrice:0,_=[];e.hotBuy&&_.push("Hot Buy"),e.clearance&&_.push("Clearance");let v=null!=(u=null==(r=e.discounts)||null==(t=r[0])?void 0:t.label)?u:null,y=null!=(d=null==(l=e.discounts)||null==(n=l[0])?void 0:n.id)?d:null;return{productId:null!=c?c:"",productName:i(c,e.name),price:Number(e.salePrice.toFixed(2)),sku:e.sku,quantity:e.quantity,discount:p>0?Number(p.toFixed(2)):null,promotionName:v,promotionId:y,brand:null!=(m=e.brand)?m:null,categoryHierarchy:null,..._.length>0&&{productFlags:_}}}),u=e=>e.map((e,t)=>{var r,n,l;let o=null!=(n=null!=(r=e.salePrice)?r:e.regularPrice)?n:0,a=null!=(l=e.regularPrice)?l:o,u=a>o?a-o:0,d=[];return"clearance"===e.labelVariant&&d.push("Clearance"),"hot-buy"===e.labelVariant&&d.push("Hot Buy"),{productId:String(e.productId),productName:i(String(e.productId),e.productName)||"",price:Number(o.toFixed(2)),sku:e.sku||null,discount:u>0?Number(u.toFixed(2)):null,promotionName:null,promotionId:null,brand:e.brand||null,categoryHierarchy:null,productFlags:d.length>0?d:null,positionInList:t+1}}),d=e=>e.map((e,t)=>{var r,n,l,o,a,u,d;let{data:m}=e,c=m.id||"",s=m["metadata:product_name"]||m.name||"",p=null!=(u=null!=(a=m.sale_price)?a:m.list_price)?u:0,_=null!=(d=m.list_price)?d:p,v=_>p?_-p:0,y=[];return(null==(r=m.metadata)?void 0:r.clearance)==="true"&&y.push("Clearance"),(null==(n=m.metadata)?void 0:n.hot_buy)==="true"&&y.push("Hot Buy"),{productId:c,productName:i(c,String(s)),price:Number(p.toFixed(2)),sku:m.sku||null,discount:v>0?Number(v.toFixed(2)):null,promotionName:null,promotionId:null,brand:m["metadata:brand"]||(null==(l=m.metadata)?void 0:l.brand)||null,categoryHierarchy:(null==(o=m.metadata)?void 0:o.category_hierarchy)||m["metadata:category_hierarchy"]||null,productFlags:y.length>0?y:null,positionInList:t+1}}),m=e=>e.map((e,t)=>{var r,l,o,a,u;let{prices:d,categories:m,brand:c,entityId:s,name:p,sku:_}=e,v=(null==d||null==(r=d.salePrice)?void 0:r.value)||(null==d||null==(l=d.price)?void 0:l.value)||0,y=(null==d||null==(o=d.basePrice)?void 0:o.value)||(null==d||null==(a=d.price)?void 0:a.value)||0,g=y>v?y-v:0,h=[];("true"===(0,n.$P)("clearance_product",e)||"true"===(0,n.$P)("clearance",e))&&h.push("Clearance"),"true"===(0,n.$P)("hot_buy",e)&&h.push("Hot Buy");let f=(0,n.$P)("externalProductNumber",e)||(0,n.$P)("product_external_id",e)||String(s),b=null==m||null==(u=m.edges)?void 0:u.map(e=>{var t;return null==(t=e.node)?void 0:t.name}).filter(Boolean);return{productId:f,productName:i(f,p||""),price:Number(v.toFixed(2)),sku:_||null,discount:g>0?Number(g.toFixed(2)):null,promotionName:null,promotionId:null,brand:(null==c?void 0:c.name)||null,categoryHierarchy:(null==b?void 0:b.join(" > "))||null,productFlags:h.length>0?h:null,positionInList:t+1}})},36531:(e,t,r)=>{r.d(t,{tP:()=>n.tP,Ml:()=>m,Fu:()=>c,xS:()=>s,Pg:()=>y,ul:()=>v,Oz:()=>_,R_:()=>g,XB:()=>h,kk:()=>F,Du:()=>p,Ui:()=>k,Vd:()=>P,wJ:()=>f,N5:()=>b,AS:()=>I,az:()=>N,q3:()=>n.q3,Q9:()=>n.Q9,TP:()=>n.TP,uY:()=>n.uY});var n=r(19150);let l=e=>Math.round((null!=e?e:0)*100)/100,i=e=>{var t,r,n,i,o,a;"ecommerce"in e&&(null==(r=window.dataLayer)||r.push({ecommerce:null})),null==(t=window.dataLayer)||t.push(e),"purchase"===e.event?null==(n=(i=window).noibuTrack)||n.call(i,"checkout_completed",((e,t)=>{var r,n,i,o,a,u;let{ecommerce:d}=e,m=null!=(r=d.value)?r:0,c=null!=(n=d.tax)?n:0,s=null!=(i=e.shipping_price)?i:0,p=d.items.reduce((e,t)=>
1{var r;return e+(null!=(r=t.discount)?r:0)*t.quantity},0)+(null!=(o=e.shipping_discount)?o:0),_=new Map;d.items.forEach(e=>{var t;let r=null!=(t=e.promotion_name)?t:e.promotion_id;r&&_.set(r,{title:r,type:"PROMOTION"})});let v=null!=(a=e.shipping_method_selected)?a:e.delivery_method_selected;return{checkout:{currencyCode:d.currency,order:{id:e.transaction_id,customer:{id:null!=t?t:""}},lineItems:d.items.map(e=>{var t,r,n;return{title:e.item_name,quantity:e.quantity,variant:{sku:e.item_id,id:null!=(t=e.item_variant)?t:e.item_id,title:e.item_name,product:{id:e.item_id,type:null!=(r=e.item_category)?r:"",vendor:null!=(n=e.item_brand)?n:""},price:{amount:l(e.price)}}}}),subtotalPrice:{amount:l(m)},shippingLine:{price:{amount:l(s)}},totalTax:{amount:l(c)},totalPrice:{amount:l(m+c+s)},discountsAmount:{amount:l(p)},discountApplications:[..._.values()],delivery:{selectedDeliveryOptions:v?[{title:v,type:null!=(u=e.delivery_method_selected)?u:""}]:[]},transactions:e.payment_method_selected?[{gateway:e.payment_method_selected,paymentMethod:{type:e.payment_method_selected,name:e.payment_method_selected}}]:[]}}})(e)):null==(o=(a=window).noibuTrack)||o.call(a,e.event,e)},o=e=>"number"!=typeof e?null:Number(e.toFixed(2)),a=e=>"number"!=typeof e||e<=0?null:o(e),u=e=>e.some(e=>"number"!=typeof e.price)?null:o(e.reduce((e,t)=>e+t.price*t.quantity,0)),d=e=>{let{itemId:t,itemName:r,itemBrand:l,itemCategory:i,itemCategory2:u,itemCategory3:d,itemCategory4:m,itemVariant:c,price:s,quantity:p,discount:_,itemListId:v,itemListName:y,promotionName:g,index:h}=e;return{item_id:t,item_name:(0,n.aR)(t,r),item_brand:null!=l?l:null,...i&&{item_category:i},...u&&{item_category2:u},...d&&{item_category3:d},...m&&{item_category4:m},...c&&{item_variant:c},price:o(s),quantity:p,discount:a(_),...v&&{item_list_id:v},...y&&{item_list_name:y},...g&&{promotion_name:g},..."number"==typeof h&&{index:h}}},m=e=>{let{itemId:t,itemName:r,itemBrand:n,itemCategory:l,itemCategory2:a,itemCategory3:u,itemCategory4:m,itemVariant:c,price:s,quantity:p,discount:_,itemListId:v,itemListName:y,promotionName:g,currency:h="CAD",index:f}=e;i({event:"add_to_cart",ecommerce:{currency:h,value:"number"==typeof s?o(s*p):null,items:[d({itemId:t,itemName:r,itemBrand:n,itemCategory:l,itemCategory2:a,itemCategory3:u,itemCategory4:m,itemVariant:c,price:s,quantity:p,discount:_,itemListId:v,itemListName:y,promotionName:g,index:f})]},...(e=>{let{productType:t,preferredStoreId:r,filtersApplied:n,sortApplied:l,searchTerm:i,constructorFeature:o,sourcePage:a}=e;return{...t&&{product_type:t},...r&&{preferred_store_id:r},...n&&{filters_applied:n},...l&&{sort_applied:l},...i&&{search_term:i},...o&&{constructor_feature:o},...a&&{source_page:a}}})(e)})},c=e=>{let{productId:t,productName:r,price:n,quantity:l,discount:a,promotionName:u,brand:m,itemCategory:c,itemCategory2:s,itemCategory3:p,itemCategory4:_,sku:v,currency:y="CAD",listId:g,listName:h,positionInList:f}=e;i({event:"add_to_wishlist",ecommerce:{currency:y,value:"number"==typeof n?o(n*l):null,items:[d({itemId:t,itemName:r,itemBrand:m,itemCategory:c,itemCategory2:s,itemCategory3:p,itemCategory4:_,itemVariant:v,price:n,quantity:l,discount:a,itemListId:g,itemListName:h,promotionName:u,index:f})]},...(e=>{let{wishlistId:t,wishlistName:r,pageContext:n,wishlistPosition:l,listId:i,listName:o,positionInList:a,appliedFilters:u,appliedSort:d,searchTerm:m,carouselId:c,carouselName:s,positionInCarousel:p,carouselFilters:_,sourcePage:v,orderNumber:y}=e;return{wishlist_id:String(t),wishlist_name:r,page_context:n,..."number"==typeof l&&{wishlist_position:l},...i&&{list_id:i},...o&&{list_name:o},..."number"==typeof a&&{position_in_list:a},...u&&{filters_applied:u},...d&&{sort_applied:d},...m&&{search_term:m},...c&&{carousel_id:c},...s&&{carousel_name:s},..."number"==typeof p&&{position_in_carousel:p},..._&&{carousel_filters:_},...v&&{source_page:v},...y&&{order_number:y}}})(e)})},s=e=>{let{items:t,sourcePage:r,preferredStore:n,appliedFilters:l,appliedSort:d,sourceId:m,sourceName:c,currency:s="CAD"}=e;i({event:"begin_checkout",ecommerce:{currency:s,value:u(t),items:t.map(e=>{var t,r;return{item_id:e.productId,item_name:e.productName,item_brand:null!=(t=e.brand)?t:null,item_category:null!=(r=e.categoryHierarchy)?r:null,...e.sku&&{item_variant:e.sku},price:o(e.price),quantity:e.quantity,discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.productFlags&&e.productFlags.length>0&&{product_flags:e.productFlags}}})},source_page:r,...n&&{preferred_store:n},...l&&{applied_filters:l},...d&&{applied_sort:d},...m&&{source_id:m},...c&&{source_name:c}})},p=e=>{let{transactionId:t,orderNumber:r,items:l,paymentMethodSelected:d,deliveryMethodSelected:m,shippingMethodSelected:c,shippingPrice:s,shippingDiscount:p,estimatedDeliveryTime:_,appliedFilters:v,appliedSort:y,productFlags:g,preferredStore:h,sourceId:f,sourceName:b,tax:I,searchTerm:N,currency:k="CAD"}=e;i({event:"purchase",transaction_id:t,order_number:r,ecommerce:{currency:k,value:o(u(l)),..."number"==typeof I&&{tax:I},items:l.map(e=>{var t,r;return{item_id:e.productId,item_name:(0,n.aR)(e.productId,e.productName),item_brand:null!=(t=e.brand)?t:null,item_category:null!=(r=e.categoryHierarchy)?r:null,...e.itemCategory2&&{item_category2:e.itemCategory2},...e.itemCategory3&&{item_category3:e.itemCategory3},...e.itemCategory4&&{item_category4:e.itemCategory4},...e.sku&&{item_variant:e.sku},...e.itemListId&&{item_list_id:e.itemListId},...e.itemListName&&{item_list_name:e.itemListName},..."number"==typeof e.index&&{index:e.index},price:o(e.price),quantity:e.quantity,discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.searchTerm&&{search_term:e.searchTerm}}})},payment_method_selected:d,delivery_method_selected:m,...c&&{shipping_method_selected:c},..."number"==typeof s&&{shipping_price:o(s)},..."number"==typeof p&&{shipping_discount:o(p)},..._&&{estimated_delivery_time:_},...v&&{applied_filters:v},...y&&{applied_sort:y},...g&&g.length>0&&{product_flags:g},...h&&{preferred_store:h},...f&&{source_id:f},...b&&{source_name:b},...N&&{search_term:N}})},_=()=>{i({event:"error",error_type:"404"})},v=e=>{let{checkoutStep:t,items:r,preferredStore:n,appliedFilters:l,appliedSort:d,sourceId:m,sourceName:c,deliveryMethodsAvailable:s,shippingMethodsAvailable:p,shippingPrices:_,shippingDiscount:v,estimatedDeliveryTime:y,paymentMethodSelected:g,currency:h="CAD"}=e;i({event:"checkout_step_viewed",ecommerce:{currency:h,value:u(r),items:r.map(e=>{var t,r;return{item_id:e.productId,item_name:e.productName,item_brand:null!=(t=e.brand)?t:null,item_category:null!=(r=e.categoryHierarchy)?r:null,...e.sku&&{item_variant:e.sku},price:o(e.price),quantity:e.quantity,discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.productFlags&&e.productFlags.length>0&&{product_flags:e.productFlags}}})},checkout_step:t,...n&&{preferred_store:n},...l&&{applied_filters:l},...d&&{applied_sort:d},...m&&{source_id:m},...c&&{source_name:c},...s&&{delivery_methods_available:s},...p&&{shipping_methods_available:p},..._&&{shipping_prices:_.map(e=>o(e))},..."number"==typeof v||null===v?{shipping_discount:o(v)}:{},...y&&{estimated_delivery_time:y},...g&&{payment_method_selected:g}}
1)},y=e=>{let{checkoutStep:t,items:r,preferredStore:n,appliedFilters:l,appliedSort:d,sourceId:m,sourceName:c,deliveryMethodSelected:s,shippingMethodSelected:p,shippingPrice:_,paymentMethodSelected:v,currency:y="CAD"}=e;i({event:"checkout_step_completed",ecommerce:{currency:y,value:u(r),items:r.map(e=>{var t,r;return{item_id:e.productId,item_name:e.productName,item_brand:null!=(t=e.brand)?t:null,item_category:null!=(r=e.categoryHierarchy)?r:null,...e.sku&&{item_variant:e.sku},price:o(e.price),quantity:e.quantity,discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.productFlags&&e.productFlags.length>0&&{product_flags:e.productFlags}}})},checkout_step:t,...n&&{preferred_store:n},...l&&{applied_filters:l},...d&&{applied_sort:d},...m&&{source_id:m},...c&&{source_name:c},...s&&{delivery_method_selected:s},...p&&{shipping_method_selected:p},..."number"==typeof _||null===_?{shipping_price:o(_)}:{},...v&&{payment_method_selected:v}})},g=e=>{i({event:"generate_lead",...(null==e?void 0:e.userId)&&{user_id:e.userId}})},h=e=>{i({event:"login",login_method:e.loginMethod,user_id:e.userId})},f=e=>{i({event:"sign_up",user_id:e.userId,signup_method:e.signupMethod})},b=e=>{let{items:t,preferredStore:r,appliedFilters:n,appliedSort:l,sourceId:d,sourceName:m,currency:c="CAD",totalValue:s}=e;i({event:"view_cart",ecommerce:{currency:c,value:"number"==typeof s?o(s):u(t),items:t.map(e=>{var t;return{item_id:e.productId,item_name:e.productName,item_brand:null!=(t=e.brand)?t:null,...e.categoryHierarchy&&{item_category:e.categoryHierarchy},...e.sku&&{item_variant:e.sku},price:o(e.price),quantity:e.quantity,discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.promotionCode&&{promotion_code:e.promotionCode},...e.productFlags&&e.productFlags.length>0&&{product_flags:e.productFlags},...e.positionInList&&{index:e.positionInList}}})},...r&&{preferred_store:r},...n&&{applied_filters:n},...l&&{applied_sort:l},...d&&{source_id:d},...m&&{source_name:m}})},I=e=>{let{productId:t,productName:r,price:l,sku:u,quantity:d=1,discount:m,promotionName:c,promotionId:s,brand:p,categoryHierarchy:_,productFlags:v,preferredStore:y,appliedFilters:g,appliedSort:h,sourceId:f,sourceName:b,positionInList:I}=e;i({event:"view_item",ecommerce:{currency:"CAD",value:"number"==typeof l?o(l*d):null,items:[{item_id:t,item_name:(0,n.aR)(t,r),item_brand:null!=p?p:null,..._&&{item_category:_},...u&&{item_variant:u},price:o(l),quantity:d,discount:a(m),...c&&{promotion_name:c},...s&&{promotion_id:s},...v&&v.length>0&&{product_flags:v},...I&&{index:I}}]},...y&&{preferred_store:y},...g&&{applied_filters:g},...h&&{applied_sort:h},...f&&{source_id:f},...b&&{source_name:b}})},N=e=>{let{items:t,sourcePage:r,carouselId:l,carouselName:u,sourceId:d,sourceName:m,preferredStore:c,appliedFilters:s,appliedSort:p}=e;i({event:"view_item_list",ecommerce:{items:t.slice(0,n.tP).map(e=>{var t;let r=e.categoryHierarchy?e.categoryHierarchy.split(" > "):[];return{item_id:e.productId,item_name:e.productName,item_brand:null!=(t=e.brand)?t:null,...r[0]&&{item_category:r[0]},...r[1]&&{item_category2:r[1]},...r[2]&&{item_category3:r[2]},...r[3]&&{item_category4:r[3]},...e.sku&&{item_variant:e.sku},price:o(e.price),discount:a(e.discount),...e.promotionName&&{promotion_name:e.promotionName},...e.promotionId&&{promotion_id:e.promotionId},...e.productFlags&&e.productFlags.length>0&&{product_flags:e.productFlags},...null!==e.positionInList&&{index:e.positionInList}}})},source_page:r,...l&&{carousel_id:l},...u&&{carousel_name:u},...d&&{source_id:d},...m&&{source_name:m},...c&&{preferred_store:c},...s&&{applied_filters:s},...p&&{applied_sort:p}})},k=e=>{var t;let{cartId:r,removalReason:l,item:u,preferredStore:d,appliedFilters:m,appliedSort:c,sourceId:s,sourceName:p,currency:_="CAD"}=e;i({event:"remove_from_cart",cart_id:r,removal_reason:l,ecommerce:{currency:_,value:"number"==typeof u.price?o(u.price*u.quantity):null,items:[{item_id:u.productId,item_name:(0,n.aR)(u.productId,u.productName),item_brand:null!=(t=u.brand)?t:null,...u.categoryHierarchy&&{item_category:u.categoryHierarchy},...u.sku&&{item_variant:u.sku},price:o(u.price),quantity:u.quantity,discount:a(u.discount),...u.promotionName&&{promotion_name:u.promotionName},...u.promotionId&&{promotion_id:u.promotionId},...u.productFlags&&u.productFlags.length>0&&{product_flags:u.productFlags}}]},...d&&{preferred_store:d},...m&&{applied_filters:m},...c&&{applied_sort:c},...s&&{source_id:s},...p&&{source_name:p}})},F=()=>{i({event:"phone_number_clicked"})},P=e=>{let{productId:t,productName:r,price:l,sku:u,discount:d,promotionName:m,promotionId:c,brand:s,categoryHierarchy:p,positionInList:_,productFlags:v,preferredStore:y,appliedFilters:g,appliedSort:h,sourceId:f,sourceName:b}=e,I=(null==p?void 0:p.split(" > "))||[];i({event:"select_item",ecommerce:{items:[{item_id:t,item_name:(0,n.aR)(t,r),item_brand:null!=s?s:null,...I[0]&&{item_category:I[0]},...u&&{item_variant:u},price:o(l),quantity:1,discount:a(d),...m&&{promotion_name:m},...c&&{promotion_id:c},..."number"==typeof _&&{index:_}}]},...y&&{preferred_store:y},...g&&{applied_filters:g},...h&&{applied_sort:h},...v&&v.length>0&&{product_flags:v},...f&&{source_id:f},...b&&{source_name:b}})}},63771:(e,t,r)=>{r.d(t,{$A:()=>m,$P:()=>n,GL:()=>l,X6:()=>p,c:()=>o,f7:()=>d,g9:()=>i,g_:()=>a,wf:()=>s,yn:()=>u}),r(2661);let n=(e,t)=>{var r,n,l,i;return null==t||null==(i=t.customFields)||null==(l=i.edges)||null==(n=l.find(t=>{var r;return(null==(r=t.node)?void 0:r.name)===e}))||null==(r=n.node)?void 0:r.value},l=(e,t)=>
1{var r,n,l,i,o,a,u,d;let{productNode:m}=t;return null==m||null==(d=m.variants)||null==(u=d.edges)||null==(a=u.find(t=>{var r;return(null==(r=t.node)?void 0:r.sku)===e}))||null==(o=a.node)||null==(i=o.metafields)||null==(l=i.edges)||null==(n=l.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)==="shippable"}))||null==(r=n.node)?void 0:r.value},i=(e,t)=>{var r,n,l;return null==e||null==(l=e.byLocation)||null==(n=l.edges)||null==(r=n.find(e=>e.node.locationEntityId===t))?void 0:r.node},o=(e,t,r)=>{var n,l,i,o,a,u;return null!=(u=null!=(a=null==(l=t.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===r}))||null==(n=l.node)?void 0:n.value)?a:null==(o=e.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===r}))||null==(i=o.node)?void 0:i.value)?u:""},a=e=>e.some(e=>{var t,r;return null==(r=e.metafields)||null==(t=r.edges)?void 0:t.some(e=>{var t,r;return(null==(t=e.node)?void 0:t.key)==="isHazardous"&&(null==(r=e.node)?void 0:r.value)==="true"})}),u=(e,t)=>{let r=((e,t)=>{var r,l,i,o,a,u,d,m;let{productNode:c}=t,s=null==c||null==(m=c.variants)||null==(d=m.edges)||null==(u=d.find(t=>{var r;return(null==(r=t.node)?void 0:r.sku)===e}))||null==(a=u.node)||null==(o=a.metafields)||null==(i=o.edges)||null==(l=i.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)==="buyer"}))||null==(r=l.node)?void 0:r.value;return s||n("buyer",c)||null})(e,t);return!!(r&&""!==r.trim())},d=e=>{var t,r,n,l;let{productAttributes:i,variantAttributes:a,variants:u=[],key:d,isBaseProduct:m}=e,c=null==(r=a.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===d}))||null==(t=r.node)?void 0:t.value;if(c)return"[".concat(c,"]");if(!m)return"[]";let s="";null==u||u.forEach(e=>{if(e.metafields.edges){let t=o(i,e.metafields.edges,d);t&&(s=s?"".concat(s,",").concat(t):t)}});let p=null==(l=i.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===d}))||null==(n=l.node)?void 0:n.value;return p&&(s=s?"".concat(p,",").concat(s):p),s?"[".concat(s,"]"):""},m=(e,t)=>
1{for(let o of e){var r,n,l,i;let e=null==(i=o.metafields)||null==(l=i.edges)||null==(n=l.find(e=>{var r;return(null==(r=e.node)?void 0:r.key)===t}))||null==(r=n.node)?void 0:r.value;if(e)return e}return""},c=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},s=e=>{var t,r,n,l;let{productAttributes:i,variantAttributes:o,variants:a=[],key:u,isBaseProduct:d}=e,m=null==(r=o.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===u}))||null==(t=r.node)?void 0:t.value;if(m)return m;if(!d)return"";let s=[...c(null==(l=i.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===u}))||null==(n=l.node)?void 0:n.value),...a.flatMap(e=>{var t,r,n,l;return c(null==(l=e.metafields)||null==(n=l.edges)||null==(r=n.find(e=>{var t;return(null==(t=e.node)?void 0:t.key)===u}))||null==(t=r.node)?void 0:t.value)})],p=s.filter((e,t)=>s.findIndex(t=>t.filename===e.filename)===t);return p.length>0?JSON.stringify(p):""},p=function(e){var t,r,n;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=null==e||null==(t=e.byLocation)?void 0:t.edges;if(!o||0===o.length)return 0;let a=o.find(e=>1===e.node.locationEntityId),u=i?0:null!=(r=null==a?void 0:a.node.availableToSell)?r:0,d=o.filter(e=>1!==e.node.locationEntityId);if(l){let e=d.find(e=>e.node.locationEntityId===l);return Math.max(u,null!=(n=null==e?void 0:e.node.availableToSell)?n:0)}return Math.max(u,d.length>0?Math.max(...d.map(e=>{var t;return null!=(t=e.node.availableToSell)?t:0})):0)}}}]);
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.