(window.webpackJsonpvtex_structured_data_0_13_0=window.webpackJsonpvtex_structured_data_0_13_0||[]).push([[0],[,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsonLdScriptProps=t.JsonLd=t.helmetJsonLdProp=void 0;var r=n(6);Object.defineProperty(t,"helmetJsonLdProp",{enumerable:!0,get:function(){return r.helmetJsonLdProp}}),Object.defineProperty(t,"JsonLd",{enumerable:!0,get:function(){return r.JsonLd}}),Object.defineProperty(t,"jsonLdScriptProps",{enumerable:!0,get:function(){return r.jsonLdScriptProps}})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),i=function(){var e=r.canUseDOM?window.location.hostname:global.__hostname__,t=r.canUseDOM?window.__RUNTIME__.rootPath:global.__RUNTIME__.rootPath;return"".concat("https","://").concat(e).concat(null!=t?t:"")}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n":">",'"':""","'":"'"}),o=new RegExp("["+Object.keys(c).join("")+"]","g"),l=function(e){return c[e]},s=function(e,t){switch(typeof t){case"object":if(null===t)return;return t;case"number":case"boolean":case"bigint":return t;case"string":return t.replace(o,l);default:return}}},,function(e,t,n){"use strict";var r=n(11),i=n(12),a=n.n(i);t.a=function(){var e,t=Object(r.useQuery)(a.a,{ssr:!0}).data;if(null===(e=null==t?void 0:t.publicSettingsForApp)||void 0===e?void 0:e.message){var n=JSON.parse(t.publicSettingsForApp.message),i=n.decimals;return{disableOffers:n.disableOffers||!1,decimals:i||2,pricesWithTax:n.pricesWithTax||!1,useSellerDefault:n.useSellerDefault||!1,disableAggregateOffer:n.disableAggregateOffer||!1}}return{disableOffers:!1,decimals:2,pricesWithTax:!1,useSellerDefault:!1,disableAggregateOffer:!1}}},,function(e,t,n){"use strict";n.r(t),n.d(t,"parseToJsonLD",(function(){return j}));var r=n(9),i=n(1),a=n.n(i),c=n(0),o=n(4),l=n(3),s=n(8),u=n(5),d=Object(o.path)(["commertialOffer","spotPrice"]),f=Object(o.path)(["commertialOffer","Price"]),p=Object(o.path)(["commertialOffer","Tax"]),m=Object(o.pathOr)(0,["commertialOffer","AvailableQuantity"]),g=function(e,t,n){var r=n.decimals;return n.pricesWithTax?Math.round((t(e)+p(e)+Number.EPSILON)*Math.pow(10,r))/Math.pow(10,r):t(e)},v=Object(o.sort)((function(e,t){return d(e)-d(t)})),h=Object(o.sort)((function(e,t){return d(e)+p(e)-(d(t)+p(t))})),b=function(e){return m(e)>0},O=function(e,t){var n=t.pricesWithTax?h(e):v(e),r=n.filter(b);return 0===r.length?{low:n[0],high:Object(o.last)(n)}:{low:r[0],high:Object(o.last)(r)}},S=function(e){return b(e)?"http://schema.org/InStock":"http://schema.org/OutOfStock"},k=function(e){return e.find((function(e){return e.sellerDefault}))},y=function(e,t,n){var r=n.decimals,i=n.pricesWithTax,a=n.useSellerDefault,c=n.disableAggregateOffer,l=e.items||[],s=function(e){var t=e.map((function(e){return e.sellers}));return Object(o.flatten)(t)}(l),u=O(s,{pricesWithTax:i}),p=u.low,m=u.high,v=l.map((function(e){return function(e,t,n){var r=n.decimals,i=n.pricesWithTax,a=n.useSellerDefault?k(e.sellers):O(e.sellers,{pricesWithTax:i}).low,c=S(a),l=g(a,d,{decimals:r,pricesWithTax:i});return"http://schema.org/OutOfStock"===c&&0===l?null:{"@type":"Offer",price:l,priceCurrency:t,availability:S(a),sku:e.itemId,itemCondition:"http://schema.org/NewCondition",priceValidUntil:Object(o.path)(["commertialOffer","PriceValidUntil"],a),seller:{"@type":"Organization",name:a?a.sellerName:""}}}(e,t,{decimals:r,pricesWithTax:i,useSellerDefault:a})})).filter(Boolean);return 0===v.length?null:c?v:{"@type":"AggregateOffer",lowPrice:g(p,d,{decimals:r,pricesWithTax:i}),highPrice:g(m,f,{decimals:r,pricesWithTax:i}),priceCurrency:t,offers:v,offerCount:l.length}};function x(e){return{"@type":"Brand",name:"string"==typeof e?e:e.name}}var j=function(e){var t,n,i=e.product,a=e.selectedItem,c=e.currency,o=e.disableOffers,l=e.decimals,s=e.pricesWithTax,d=e.useSellerDefault,f=e.disableAggregateOffer,p=a?a.images:[],m=Object(r.a)(p,1)[0],g=i.brand,v=i.productName,h=(null==a||null===(t=a.referenceId)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.Value)||(null==i?void 0:i.productReference)||(null==i?void 0:i.productId),b=y(i,c,{decimals:l,pricesWithTax:s,useSellerDefault:d,disableAggregateOffer:f});if(null===b)return null;var O=Object(u.a)(),S=function(e){return e.categoryTree&&e.categoryTree.length>0&&e.categoryTree[e.categoryTree.length-1].name}(i),k=(null==a?void 0:a.ean)||null;return{"@context":"https://schema.org/","@type":"Product","@id":"".concat(O,"/").concat(i.linkText,"/p"),name:v,brand:x(g),image:(null==m?void 0:m.imageUrl)||null,description:i.metaTagDescription||i.description,mpn:h,sku:(null==a?void 0:a.itemId)||null,category:S,offers:o?null:b,gtin:k}};function _(e){var t=e.product,n=e.selectedItem,r=Object(c.useRuntime)().culture.currency,i=Object(s.a)(),o=i.decimals,u=i.disableOffers,d=i.pricesWithTax,f=i.useSellerDefault,p=i.disableAggregateOffer,m=j({product:t,selectedItem:n,currency:r,disableOffers:u,decimals:o,pricesWithTax:d,useSellerDefault:f,disableAggregateOffer:p});return a.a.createElement("script",Object(l.jsonLdScriptProps)(m))}t.default=Object(i.memo)(_)},,function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getSettings"},variableDefinitions:[],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.structured-data@0.13.0",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicSettingsForApp"},arguments:[{kind:"Argument",name:{kind:"Name",value:"app"},value:{kind:"StringValue",value:"vtex.structured-data",block:!1}},{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"StringValue",value:"0.x",block:!1}}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"provider"},value:{kind:"StringValue",value:"vtex.apps-graphql",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"1ce0f5912331b5ae0e37c1cd58cf575470baf1914218fb03106a2e60f2df17e0",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:298}};n.loc.source={body:'query getSettings @context(sender: "vtex.structured-data@0.13.0") {\n publicSettingsForApp(app: "vtex.structured-data", version: "0.x") @context(provider: "vtex.apps-graphql") @runtimeMeta(hash: "1ce0f5912331b5ae0e37c1cd58cf575470baf1914218fb03106a2e60f2df17e0") {\n message\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,t){for(var n=0;n0;){var l=o;o=new Set,l.forEach((function(e){c.has(e)||(c.add(e),(r[e]||new Set).forEach((function(e){o.add(e)})))}))}return c.forEach((function(t){var r=i(e,t);r&&n.definitions.push(r)})),n}(n,"getSettings")}]]);