PageSourceSearch

https://www.granngarden.se/dist/Component.ProductSchema.79b9dcee.js

js granngarden.se collected 2026-09-24 18:17:44 UTC 5,179 bytes, 1 lines download raw bytes

1"use strict";(self.fkaWebpackJsonp=self.fkaWebpackJsonp||[]).push([[2305,5406],{3165:(t,e,r)=>{var i;r.d(e,{U:()=>i}),function(t){t[t.None=0]="None",t[t.InventoryInStock=1]="InventoryInStock",t[t.InventoryNotInStock=2]="InventoryNotInStock",t[t.ContactSales=3]="ContactSales",t[t.ForcedPurchaseButton=4]="ForcedPurchaseButton",t[t.StoreOnly=5]="StoreOnly",t[t.TemporarilyOutOfStock=12]="TemporarilyOutOfStock",t[t.OutOfWebStock=13]="OutOfWebStock",t[t.OrderAndBuyInStore=14]="OrderAndBuyInStore"}(i||(i={}))},2634:(t,e,r)=>{r.r(e),r.d(e,{default:()=>p});var i=r(641),n=r(33);var a=r(6663),o=r(9635),c=r(9590),s=r(3165);const u=(0,i.pM)({name:"ProductSchema",props:{url:String,datePublished:String,dateModified:String,product:Object,initialPrices:Array,initialInventory:Object,variants:Array,sellerName:String,sellerPhone:String,returnPolicyUrl:String,shippingDestinationCountry:String,shippingRate:Number},computed:{productNumber(){return this.product?.sku},prices(){return this.initialPrices?this.initialPrices:this.$store&&this.productNumber?(0,o.RP)(this.$store).filter((t=>t.productNumber===this.productNumber)):void 0},inventory(){if(this.initialInventory){return(new Array).concat(this.initialInventory).concat(this.initialInventory.variants)}if(this.$store&&this.productNumber)return(0,c.yw)(this.$store).filter((t=>t.productNumber===this.productNumber))},schema(){const{product:t}=this;if(!this.url||!t)return{"@context":"https://schema.org","@graph":[]};const{merchantReturnPolicy:e,offers:r,gtin:i}=this,n=`${this.url}#product`,a=`${this.url}#webpage`,o=this.datePublished&&this.dateModified?{datePublished:this.datePublished,dateModified:this.dateModified}:{},c={"@id":a,"@type":"ItemPage",url:this.url,...o,mainEntity:{"@id":n}},s={"@id":n,"@type":"Product",name:t?.name,image:t?.image,description:t?.description,sku:t?.sku,mpn:t?.mpn,...i(t?.gtin)};if(null!=t?.reviewCount&&t.reviewCount>0){const{product:t}=this;s.aggregateRating={"@type":"AggregateRating",ratingValue:t?.avgCustomerScore,reviewCount:t?.reviewCount}}return t?.brand&&(s.brand={"@type":"Brand",name:t?.brand}),e&&(s.hasMerchantReturnPolicy=e),r&&(s.offers=r),{"@context":"https://schema.org","@graph":[c,s]}},merchantReturnPolicy(){if(this.returnPolicyUrl)return{"@type":"MerchantReturnPolicy",merchantReturnLink:this.returnPolicyUrl,returnPolicyCategory:"MerchantReturnUnspecified",applicableCountry:this.shippingDestinationCountry}},offers(){const{prices:t,product:e,inventory:r,availabilityToSchemaStatus:i,gtin:n,seller:a,shippingDetails:o}=this;if(Array.isArray(t)&&0!==t.length){if(t.length>=2){const e=t.filter((t=>t.variantNumber)),r=e.map((t=>t.priceWithDiscount));return{"@type":"AggregateOffer",highPrice:Math.max(...r),lowPrice:Math.min(...r),priceCurrency:t[0].currencyCode,offerCount:e.length,offers:e.map(this.variantOffer)}}{const c=t[0],s=Array.isArray(r)?r[0]:r,u=c.priceWithDiscount<c.price,p={"@type":"Offer",priceCurrency:c.currencyCode,price:c.priceWithDiscount,itemCondition:"NewCondition",availability:i(s),url:this.url,priceValidUntil:c.validTo,seller:a,shippingDetails:o,...n(e?.gtin)};return u&&(p.priceSpecification={"@type":"UnitPriceSpecification",priceType:"https://schema.org/StrikethroughPrice",price:c.price,priceCurrency:c.currencyCode}),p}}},seller(){if(this.sellerName)return{"@type":"Organization",name:this.sellerName,telephone:this.sellerPhone}},shippingDetails(){if(null==this.shippingRate||!Array.isArray(this.prices)||0===this.prices.length)return;return{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:this.shippingRate,currency:this.prices[0].currencyCode},shippingDestination:this.shippingDestinationCountry?{"@type":"DefinedRegion",addressCountry:this.shippingDestinationCountry}:void 0}}},methods:{isProduct:t=>t&&void 0!==t.variants,availabilityToSchemaStatus(t){switch(t?.availabilityInfo?.availabilityStatus){case s.U.InventoryInStock:case s.U.ForcedPurchaseButton:return"InStock";case s.U.InventoryNotInStock:case s.U.TemporarilyOutOfStock:return"OutOfStock";case s.U.OutOfWebStock:case s.U.StoreOnly:return"InStoreOnly";case s.U.ContactSales:return"BackOrder";case s.U.None:default:return}},gtin:t=>t?{[`gtin${t.length}`]:t}:{},variantOffer(t){const{product:e,inventory:r,availabilityToSchemaStatus:i,variants:n,gtin:o,seller:c,shippingDetails:s}=this,u=a.parseUrl(this.url??""),p=n?.find((e=>e.variantNumber===t.variantNumber)),l=t.priceWithDiscount<t.price,h={"@type":"Offer",name:`${e?.name??""} ${p?.size??""}`.trim(),availability:i(r?.find((e=>e.variantNumber===t.variantNumber))),price:t.priceWithDiscount,priceCurrency:t.currencyCode,url:this.url?`${u.url}?variant=${t.variantNumber}`:void 0,sku:t.variantNumber,priceValidUntil:t.validTo,seller:c,shippingDetails:s,...o(p?.barcode)};return l&&(h.priceSpecification={"@type":"UnitPriceSpecification",priceType:"https://schema.org/StrikethroughPrice",price:t.price,priceCurrency:t.currencyCode}),h}}});const p=(0,r(6262).A)(u,[["render",function(t,e,r,a,o,c){return t.product&&t.url?((0,i.uX)(),(0,i.Wv)((0,i.$y)("script"),{key:0,t
1ype:"application/ld+json"},{default:(0,i.k6)((()=>[(0,i.eW)((0,n.v_)(JSON.stringify(t.schema)),1)])),_:1})):(0,i.Q3)("",!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.