https://www.canadagoose.com/cdn/shop/t/19/assets/cart-metafields.js?v=140775014613158667081790259768
1(()=>{"use strict";const e=new Map;async function t(){const t=window.Theme?.storefrontAccessToken,r=window.Theme?.storefrontApiDomain;if(!t||!r)return;const n=function(){const e=document.cookie.match(/(?:^|;\s*)cart=([^;]*)/);if(!e)return null;const t=decodeURIComponent(e[1]);return t?t.startsWith("gid://")?t:`gid://shopify/Cart/${t}`:null}();if(!n)return void console.error("[cart-metafields] No cart cookie found");const o=function(t){return[{key:"custom.dps_required",value:window.Theme?.dpsRequired,type:"boolean",serialize:e=>String(e)},{key:"custom.legal_entity",value:window.Theme?.legalEntity,type:"single_line_text_field",serialize:e=>e}].filter(({key:r,value:n})=>null!=n&&""!==n&&e.get(r)!==t).map(({key:e,value:r,type:n,serialize:o})=>({key:e,type:n,value:o(r),ownerId:t}))}(n);if(0!==o.length)try{const a=await fetch(`https://${r}/api/2025-10/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t},body:JSON.stringify({query:"\n mutation cartMetafieldsSet($metafields: [CartMetafieldsSetInput!]!) {\n cartMetafieldsSet(metafields: $metafields) {\n metafields {\n key\n value\n }\n userErrors {\n field\n message\n }\n }\n }\n",variables:{metafields:o}})});if(!a.ok)return void console.error("[cart-metafields] API request failed:",a.status);const{data:i}=await a.json(),s=new Set;i?.cartMetafieldsSet?.userErrors?.length>0&&i.cartMetafieldsSet.userErrors.forEach(e=>{console.error("[cart-metafields] Error:",e),e.field&&s.add(e.field)}),o.forEach(({key:t})=>{s.has(t)||e.set(t,n)})}catch(e){console.error("[cart-metafields] Failed:",e)}}document.addEventListener("cart:updated",()=>{t()}),t()})();
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.