@faststore/api 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/api.cjs.development.js +151 -130
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +151 -125
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +4 -17
- package/dist/local/server.d.ts +1 -0
- package/dist/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +1 -1
- package/dist/platforms/vtex/index.d.ts +4 -17
- package/dist/platforms/vtex/resolvers/aggregateOffer.d.ts +2 -5
- package/dist/platforms/vtex/resolvers/product.d.ts +2 -6
- package/dist/platforms/vtex/utils/enhanceCommercialOffer.d.ts +7 -0
- package/dist/platforms/vtex/utils/productStock.d.ts +7 -6
- package/package.json +2 -2
- package/src/platforms/vtex/clients/search/types/ProductSearchResult.ts +1 -1
- package/src/platforms/vtex/resolvers/aggregateOffer.ts +15 -13
- package/src/platforms/vtex/resolvers/offer.ts +44 -49
- package/src/platforms/vtex/resolvers/product.ts +14 -10
- package/src/platforms/vtex/utils/enhanceCommercialOffer.ts +24 -0
- package/src/platforms/vtex/utils/productStock.ts +22 -25
- package/src/typeDefs/aggregateOffer.graphql +18 -3
- package/src/typeDefs/aggregateRating.graphql +9 -0
- package/src/typeDefs/author.graphql +6 -0
- package/src/typeDefs/brand.graphql +6 -0
- package/src/typeDefs/breadcrumb.graphql +21 -0
- package/src/typeDefs/cart.graphql +24 -0
- package/src/typeDefs/collection.graphql +39 -2
- package/src/typeDefs/facet.graphql +30 -1
- package/src/typeDefs/image.graphql +18 -0
- package/src/typeDefs/mutation.graphql +30 -2
- package/src/typeDefs/offer.graphql +51 -1
- package/src/typeDefs/order.graphql +18 -0
- package/src/typeDefs/organization.graphql +12 -0
- package/src/typeDefs/pageInfo.graphql +18 -1
- package/src/typeDefs/person.graphql +15 -0
- package/src/typeDefs/product.graphql +60 -3
- package/src/typeDefs/productGroup.graphql +15 -0
- package/src/typeDefs/propertyValue.graphql +9 -0
- package/src/typeDefs/query.graphql +66 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("@graphql-tools/schema"),i=e(require("isomorphic-unfetch")),t=e(require("dataloader")),a=e(require("p-limit")),d=e(require("fast-deep-equal")),r=require("graphql");const l=async(e,n)=>{const t=await i(e,n);if(t.ok)return 204!==t.status?t.json():void 0;console.error(e,n,t);const a=await t.text();throw new Error(a)},o={method:"POST",headers:{"content-type":"application/json"}},m=({account:e,environment:n,hideUnavailableItems:i},t)=>{const a=`https://${e}.${n}.com.br/api/io`,d={key:"trade-policy",value:t.storage.channel.salesChannel},r=({query:e="",page:n,count:t,sort:r="",selectedFacets:o=[],type:m,fuzzy:u="0"})=>{const s=new URLSearchParams({page:(n+1).toString(),count:t.toString(),query:e,sort:r,fuzzy:u});void 0!==i&&s.append("hideUnavailableItems",i.toString());const p=(c=o,void 0===c.find(({key:e})=>e===d.key)?[...c,d]:c).map(({key:e,value:n})=>`${e}/${n}`).join("/");var c;return l(`${a}/_v/api/intelligent-search/${m}/${p}?${s.toString()}`)};return{facets:e=>r({...e,type:"facets"}),products:e=>r({...e,type:"product_search"}),suggestedTerms:e=>l(`${a}/_v/api/intelligent-search/search_suggestions?query=${e.query}`),suggestedProducts:e=>l(`${a}/_v/api/intelligent-search/product_search?query=${e.query}`)}},u=()=>(1e6*Math.random()).toFixed(0),s=e=>{let n=u(),i=Date.now();return()=>{var t;return t=i,(Date.now()-t)/1e3>e&&(n=u(),i=Date.now()),n}},p={anonymous:s(31536e3),session:s(1800)};class c extends Error{constructor(e){super(e),this.name="BadRequestError"}}class k extends Error{constructor(e){super(e),this.name="NotFoundError"}}const y=(e,n)=>({...e,isVariantOf:n}),N=new Set(["brand","category","department","subcategory"]),v=e=>"string"==typeof e.pageType&&N.has(e.pageType.toLowerCase()),f="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",g=e=>"brand"===e.type||v(e)&&"brand"===e.pageType.toLowerCase(),S=e=>g(e)?(e=>e.replace(/[·/_,:]/,"-"))((e=>{let n=e.slice(0);for(let e=0;e<f.length;e++)n=n.replace(new RegExp(f.charAt(e),"g"),"AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa".charAt(e));return n})(e.name.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-"))).toLowerCase():v(e)?new URL("https://"+e.url).pathname.slice(1).toLowerCase():new URL(e.url).pathname.slice(1).toLowerCase(),T={id:({id:e})=>e.toString(),slug:e=>S(e),seo:e=>g(e)||v(e)?{title:e.title,description:e.metaTagDescription}:{title:e.Title,description:e.MetaTagDescription},type:e=>g(e)?"Brand":v(e)?e.pageType:0===e.level?"Department":"Category",meta:e=>{const n=S(e);return g(e)?{selectedFacets:[{key:"brand",value:n}]}:{selectedFacets:n.split("/").map((e,n)=>({key:"category-"+(n+1),value:e}))}},breadcrumbList:async(e,n,i)=>{const{loaders:{collectionLoader:t}}=i,a=S(e).split("/").filter(e=>Boolean(e)),d=a.map((e,n)=>a.slice(0,n+1).join("/")),r=await Promise.all(d.map(e=>t.load(e)));return{itemListElement:r.map((e,n)=>({item:new URL("https://"+e.url).pathname.toLowerCase(),name:e.name,position:n+1})),numberOfItems:r.length}}},D=e=>[e.itemOffered.sku,e.seller.identifier,e.price].join("::"),h=(e,n)=>({listPrice:e.listPrice/100,price:e.sellingPrice/100,quantity:e.quantity,seller:{identifier:e.seller},itemOffered:{sku:e.id,image:[],name:e.name},index:n}),F=e=>({quantity:e.quantity,seller:e.seller.identifier,id:e.itemOffered.sku,index:e.index}),O=e=>e.reduce((e,n)=>{var i;const t=D(n);return e.set(t,null!=(i=e.get(t))?i:n),e},new Map);class I{static parse(e){try{var n,i;const t=JSON.parse(e);return{regionId:null!=(n=t.regionId)?n:"",salesChannel:null!=(i=t.salesChannel)?i:""}}catch(e){throw console.error(e),new Error("Malformed channel string")}}static stringify(e){return JSON.stringify(e)}}const b=(e,n)=>{e.storage={...e.storage,channel:I.parse(n)}},C={validateCart:async(e,{cart:{order:n}},i)=>{const{orderNumber:t,acceptedOffer:a}=n,{clients:{commerce:r},loaders:{skuLoader:l}}=i,o=await r.checkout.orderForm({id:t}),m=O(a),u=O(o.items.map(h)),s=Array.from(m.values()),p=Array.from(u.values()),{itemsToAdd:c,itemsToUpdate:k}=s.reduce((e,n)=>{const i=u.get(D(n));return i?e.itemsToUpdate.push({...i,quantity:n.quantity}):e.itemsToAdd.push(n),e},{itemsToAdd:[],itemsToUpdate:[]}),y=[...c,...k,...p.filter(e=>!m.has(D(e))).map(e=>({...e,quantity:0}))].map(F);if(0===y.length)return null;const N=await r.checkout.updateOrderFormItems({id:o.orderFormId,orderItems:y});return((e,n)=>{const i=(e,n)=>({...e,itemOffered:{sku:e.itemOffered.sku},index:n}),t=n.items.map(h).map(i),a=e.acceptedOffer.map(i),r=e.orderNumber===n.orderFormId,l=d(t,a);return r&&l})(n,N)?null:{order:{orderNumber:N.orderFormId,acceptedOffer:N.items.map(e=>({...e,product:l.load([{key:"id",value:e.id}])}))},messages:N.messages.map(({text:e,status:n})=>({text:e,status:n.toUpperCase()}))}},updateSession:async(e,{session:n},{clients:i})=>{var t,a,d,r;const l=I.parse(null!=(t=n.channel)?t:""),o=await i.commerce.checkout.region({postalCode:String(null!=(a=n.postalCode)?a:"").replace(/\D/g,""),country:null!=(d=n.country)?d:""});return{...n,channel:I.stringify({...l,regionId:null==o||null==(r=o[0])?void 0:r.id})}}},P=e=>e.sellers.find(e=>e.commertialOffer.AvailableQuantity>0),V=e=>e[0],L=(e,n)=>{var i,t;return null!=(i=null==(t=V(e.sellers))?void 0:t.commertialOffer[n])?i:0},w=e=>"sellers"in e,E=e=>"skuName"in e,q=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",R={priceCurrency:()=>"",priceValidUntil:e=>{var n,i,t;return w(e)?null!=(n=null==(i=V(e.sellers))?void 0:i.commertialOffer.PriceValidUntil)?n:"":E(e)?null!=(t=e.priceValidUntil)?t:"":null},itemCondition:()=>"https://schema.org/NewCondition",availability:async e=>w(e)?q(!!P(e)):E(e)?q("available"===e.availability):null,seller:e=>{var n,i;return w(e)?{identifier:null!=(n=null==(i=V(e.sellers))?void 0:i.sellerId)?n:""}:E(e)?{identifier:e.seller}:null},price:e=>w(e)?L(e,"spotPrice"):E(e)?e.price/100:null,sellingPrice:e=>w(e)?L(e,"Price"):E(e)?e.sellingPrice/100:null,listPrice:e=>w(e)?L(e,"ListPrice"):E(e)?e.listPrice/100:null,itemOffered:({product:e})=>e,quantity:e=>w(e)?e.sellers.reduce((e,n)=>e+n.commertialOffer.AvailableQuantity,0):E(e)?e.quantity:null},j={imageText:"image",imageUrl:"https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg"},A=(e,n)=>`${e}-${n}`,_={productID:({itemId:e})=>e,name:({isVariantOf:e,name:n})=>null!=n?n:e.productName,slug:({isVariantOf:{linkText:e},itemId:n})=>A(e,n),description:({isVariantOf:{description:e}})=>e,seo:({isVariantOf:{description:e,productName:n}})=>({title:n,description:e}),brand:({isVariantOf:{brand:e}})=>({name:e}),breadcrumbList:({isVariantOf:{categories:e,productName:n,linkText:i},itemId:t})=>{return{itemListElement:[...e.reverse().map((e,n)=>{const i=e.split("/");return{name:i[i.length-2],item:e.toLowerCase(),position:n+1}}),{name:n,item:(a=i,d=t,`/${A(a,d)}/p`),position:e.length+1}],numberOfItems:e.length};var a,d},image:({images:e})=>{var n,i;return(null!=(i=e,n=Array.isArray(i)&&i.length>0?i:null)?n:[j]).map(({imageUrl:e,imageText:n})=>({alternateName:null!=n?n:"",url:e.replace("vteximg.com.br","vtexassets.com")}))},sku:({itemId:e})=>e,gtin:({referenceId:e})=>{var n,i;return null!=(n=null==(i=e[0])?void 0:i.Value)?n:""},review:()=>[],aggregateRating:()=>({}),offers:e=>{return{items:(n=e.isVariantOf.items,n.sort((e,n)=>P(e)&&!P(n)?-1:!P(e)&&P(n)?1:L(e,"Price")-L(n,"Price"))),product:e};var n},isVariantOf:e=>e,additionalProperty:({variations:e=[]})=>e.flatMap(({name:e,values:n})=>n.map(n=>({name:e,value:n})))},x=new Set(["allSpecifications"]),$=({key:e,value:n})=>{switch(e){case"channel":{const e=I.parse(n),i=[{key:"trade-policy",value:e.salesChannel}];return e.regionId&&i.push({key:"region-id",value:e.regionId}),i}default:return{key:e,value:n}}},G={price_desc:"price:desc",price_asc:"price:asc",orders_desc:"orders:desc",name_desc:"name:desc",name_asc:"name:asc",release_desc:"release:desc",discount_desc:"discount:desc",score_desc:""},B={product:async(e,{locator:n},i)=>{var t;const a=null==(t=n.find(e=>"channel"===e.key))?void 0:t.value;a&&b(i,a);const{loaders:{skuLoader:d}}=i;return d.load(n.flatMap($))},collection:(e,{slug:n},i)=>{const{loaders:{collectionLoader:t}}=i;return t.load(n)},search:async(e,{first:n,after:i,sort:t,term:a,selectedFacets:d},r)=>{var l,o;const m=null==d||null==(l=d.find(e=>"channel"===e.key))?void 0:l.value;m&&b(r,m);const u=i?Number(i):0;return{page:Math.ceil(u/n),count:n,query:a,sort:G[null!=t?t:"score_desc"],selectedFacets:null!=(o=null==d?void 0:d.flatMap($))?o:[]}},allProducts:async(e,{first:n,after:i},t)=>{const{clients:{search:a}}=t,d=i?Number(i):0,r=await a.products({page:Math.ceil(d/n),count:n}),l=r.products.map(e=>e.items.map(n=>y(n,e))).flat().filter(e=>e.sellers.length>0);return{pageInfo:{hasNextPage:r.pagination.after.length>0,hasPreviousPage:r.pagination.before.length>0,startCursor:"0",endCursor:r.recordsFiltered.toString(),totalCount:r.recordsFiltered},edges:l.map((e,n)=>({node:e,cursor:(d+n).toString()}))}},allCollections:async(e,{first:n,after:i},t)=>{const{clients:{commerce:a}}=t,d=i?Number(i):0,[r,l]=await Promise.all([a.catalog.brand.list(),a.catalog.category.tree()]),o=[],m=(e,n)=>{o.push({...e,level:n});for(const i of e.children)m(i,n+1)};for(const e of l)m(e,0);const u=[...r.filter(e=>e.isActive).map(e=>({...e,type:"brand"})),...o].filter(e=>Boolean(T.slug(e,null,t,null)));return{pageInfo:{hasNextPage:u.length-d>n,hasPreviousPage:d>0,startCursor:"0",endCursor:(Math.min(n,u.length-d)-1).toString(),totalCount:u.length},edges:u.slice(d,d+n).map((e,n)=>({node:e,cursor:(d+n).toString()}))}},person:async(e,n,i)=>{var t,a,d,r,l,o,m,u;const{clients:{commerce:s}}=i,{namespaces:{profile:p=null}}=await s.session();return p&&{id:null!=(t=null==(a=p.id)?void 0:a.value)?t:"",email:null!=(d=null==(r=p.email)?void 0:r.value)?d:"",givenName:null!=(l=null==(o=p.firstName)?void 0:o.value)?l:"",familyName:null!=(m=null==(u=p.lastName)?void 0:u.value)?m:""}}},Q=["departamento","Departamento"],M={StoreCollection:T,StoreAggregateOffer:{highPrice:({product:e})=>{var n;return null!=(n=e.isVariantOf.priceRange.sellingPrice.highPrice)?n:0},lowPrice:e=>{var n;return null!=(n=e.product.isVariantOf.priceRange.sellingPrice.lowPrice)?n:0},offerCount:({items:e})=>e.length,priceCurrency:()=>"",offers:({items:e,product:n})=>e.map(e=>({...e,product:n}))},StoreProduct:_,StoreSeo:{title:({title:e})=>null!=e?e:"",description:({description:e})=>null!=e?e:"",titleTemplate:()=>"",canonical:()=>""},StoreFacet:{key:({key:e})=>null!=e?e:"",label:({name:e})=>null!=e?e:"unknown",values:({values:e})=>e,type:({type:e})=>"TEXT"===e?"BOOLEAN":"RANGE"},StoreFacetValue:{value:({value:e,range:n})=>{var i,t;return null!=e?e:`${null!=(i=null==n?void 0:n.from)?i:""}-to-${null!=(t=null==n?void 0:n.to)?t:""}`},label:({name:e})=>e||"unknown",selected:({selected:e})=>e,quantity:({quantity:e})=>e},StoreOffer:R,StoreAggregateRating:{ratingValue:()=>5,reviewCount:()=>0},StoreReview:{reviewRating:()=>({ratingValue:5,bestRating:5}),author:()=>({name:""})},StoreProductGroup:{hasVariant:e=>e.isVariantOf.items.map(n=>y(n,e.isVariantOf)),productGroupID:({isVariantOf:e})=>e.productId,name:({isVariantOf:e})=>e.productName,additionalProperty:({isVariantOf:{specificationGroups:e}})=>e.filter(e=>!x.has(e.name)).flatMap(({specifications:e})=>e.flatMap(({name:e,values:n})=>n.map(n=>({name:e,value:n}))))},StoreSearchResult:{suggestions:async(e,n,i)=>{const{clients:{search:t}}=i,a=await t.suggestedTerms(e),d=(await t.suggestedProducts(e)).products.map(e=>{const[n]=e.items;return n&&y(n,e)}).filter(e=>!!e),{searches:r}=a;return{terms:r.map(e=>e.term),products:d}},products:async(e,n,i)=>{const{clients:{search:t,sp:a}}=i,d=await t.products(e);e.query&&a.sendEvent({type:"search.query",text:e.query,misspelled:d.correction.misspelled,match:d.recordsFiltered,operator:d.operator}).catch(console.error);const r=d.products.map(e=>{const[n]=e.items;return n&&y(n,e)}).filter(e=>!!e);return{pageInfo:{hasNextPage:d.pagination.after.length>0,hasPreviousPage:d.pagination.before.length>0,startCursor:"0",endCursor:d.recordsFiltered.toString(),totalCount:d.recordsFiltered},edges:r.map((e,n)=>({node:e,cursor:n.toString()}))}},facets:async(e,n,i)=>{const{clients:{search:t}}=i,{facets:a}=await t.facets(e),d=!e.query,r=null==a?void 0:a.reduce((e,n)=>{const i=Q.includes(n.name);return d&&i||(n.values.sort((e,n)=>{var i,t;const a=null!=(i=e.name)?i:"",d=null!=(t=n.name)?t:"";return a.localeCompare(d)}),e.push(n)),e},[]);return null!=r?r:[]}},Query:B,Mutation:C};var U={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreAggregateOffer"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"highPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"lowPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"offerCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"priceCurrency"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"offers"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOffer"}}}}},directives:[]}]}],loc:{start:0,end:261}};U.loc.source={body:"type StoreAggregateOffer {\n # Highest spot price amongst all sellers\n highPrice: Float!\n # Lowest spot price amongst all sellers\n lowPrice: Float!\n # Number of sellers selling this sku\n offerCount: Int!\n priceCurrency: String!\n offers: [StoreOffer!]!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var z={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreAggregateRating"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"ratingValue"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"reviewCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:72}};z.loc.source={body:"type StoreAggregateRating {\n ratingValue: Float!\n reviewCount: Int!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var J={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreAuthor"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:37}};J.loc.source={body:"type StoreAuthor {\n name: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var W={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreBrand"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:36}};W.loc.source={body:"type StoreBrand {\n name: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var H={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreListItem"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"item"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"position"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreBreadcrumbList"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"itemListElement"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreListItem"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"numberOfItems"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:161}};H.loc.source={body:"type StoreListItem {\n item: String!\n name: String!\n position: Int!\n}\n\ntype StoreBreadcrumbList {\n itemListElement: [StoreListItem!]!\n numberOfItems: Int!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var Y={kind:"Document",definitions:[{kind:"EnumTypeDefinition",name:{kind:"Name",value:"StoreCollectionType"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"Department"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Category"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Brand"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Cluster"},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCollectionFacet"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"key"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCollectionMeta"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"selectedFacets"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionFacet"}}}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCollection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"seo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSeo"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"breadcrumbList"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBreadcrumbList"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"meta"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionMeta"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"slug"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionType"}}},directives:[]}]}],loc:{start:0,end:424}};Y.loc.source={body:"enum StoreCollectionType {\n Department\n Category\n Brand\n Cluster\n}\n\ntype StoreCollectionFacet {\n key: String!\n value: String!\n}\n\ntype StoreCollectionMeta {\n selectedFacets: [StoreCollectionFacet!]!\n}\n\ntype StoreCollection {\n # Meta tag data\n seo: StoreSeo!\n # location for structured data\n breadcrumbList: StoreBreadcrumbList!\n meta: StoreCollectionMeta!\n id: ID!\n slug: String!\n type: StoreCollectionType!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var K={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreFacet"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"key"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"label"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"values"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacetValue"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacetType"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreFacetValue"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"label"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"selected"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"quantity"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:240}};K.loc.source={body:"type StoreFacet {\n key: String!\n label: String!\n values: [StoreFacetValue!]!\n type: StoreFacetType!\n}\n\ntype StoreFacetValue {\n value: String!\n label: String!\n selected: Boolean!\n # Number of items with this facet\n quantity: Int!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var X={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreImage"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"url"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"alternateName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreImage"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"url"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"alternateName"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:123}};X.loc.source={body:"type StoreImage {\n url: String!\n alternateName: String!\n}\n\ninput IStoreImage {\n url: String!\n alternateName: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var Z={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreSession"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"channel"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"country"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"postalCode"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreSession"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"channel"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"country"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"postalCode"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"Mutation"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"validateCart"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"cart"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreCart"}}},directives:[]}],type:{kind:"NamedType",name:{kind:"Name",value:"StoreCart"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"updateSession"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"session"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSession"}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSession"}}},directives:[]}]}],loc:{start:0,end:367}};Z.loc.source={body:"type StoreSession {\n channel: String\n country: String\n postalCode: String\n}\n\ninput IStoreSession {\n channel: String\n country: String\n postalCode: String\n}\n\ntype Mutation {\n # Returns the order if anything changed with the order. Null if the order is valid\n validateCart(cart: IStoreCart!): StoreCart\n\n updateSession(session: IStoreSession!): StoreSession!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ee={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreOffer"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"listPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"sellingPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"priceCurrency"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"price"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"priceValidUntil"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"itemCondition"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"availability"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"seller"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOrganization"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"itemOffered"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"quantity"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreOffer"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"price"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"listPrice"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"seller"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOrganization"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"itemOffered"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreProduct"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"quantity"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:419}};ee.loc.source={body:"type StoreOffer {\n listPrice: Float!\n sellingPrice: Float!\n priceCurrency: String!\n # Also known as spotPrice\n price: Float!\n priceValidUntil: String!\n itemCondition: String!\n availability: String!\n seller: StoreOrganization!\n itemOffered: StoreProduct!\n quantity: Int!\n}\n\ninput IStoreOffer {\n price: Float!\n listPrice: Float!\n seller: IStoreOrganization!\n itemOffered: IStoreProduct!\n quantity: Int!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ne={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreOrder"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"orderNumber"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"acceptedOffer"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOffer"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreOrder"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"orderNumber"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"acceptedOffer"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOffer"}}}}},directives:[]}]}],loc:{start:0,end:154}};ne.loc.source={body:"type StoreOrder {\n orderNumber: String!\n acceptedOffer: [StoreOffer!]!\n}\n\ninput IStoreOrder {\n orderNumber: String!\n acceptedOffer: [IStoreOffer!]!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ie={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreOrganization"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"identifier"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreOrganization"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"identifier"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:101}};ie.loc.source={body:"type StoreOrganization {\n identifier: String!\n}\n\ninput IStoreOrganization {\n identifier: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var te={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StorePageInfo"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"hasNextPage"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"hasPreviousPage"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"startCursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"endCursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"totalCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:197}};te.loc.source={body:"type StorePageInfo {\n hasNextPage: Boolean!\n hasPreviousPage: Boolean!\n startCursor: String!\n endCursor: String!\n # Total number of items(products/collections), not pages\n totalCount: Int!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ae={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreProduct"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"seo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSeo"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"breadcrumbList"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBreadcrumbList"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"slug"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"productID"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"brand"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBrand"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"description"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"image"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreImage"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"offers"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAggregateOffer"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"sku"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"gtin"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"review"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreReview"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"aggregateRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAggregateRating"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"isVariantOf"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductGroup"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"additionalProperty"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePropertyValue"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreProduct"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"sku"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"name"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"image"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreImage"}}}}},directives:[]}]}],loc:{start:0,end:573}};ae.loc.source={body:"type StoreProduct {\n # Meta tag data\n seo: StoreSeo!\n # Location for structured data\n breadcrumbList: StoreBreadcrumbList!\n # Where to retrieve this entity\n slug: String!\n name: String!\n productID: String!\n brand: StoreBrand!\n description: String!\n image: [StoreImage!]!\n offers: StoreAggregateOffer!\n sku: String!\n gtin: String!\n review: [StoreReview!]!\n aggregateRating: StoreAggregateRating!\n isVariantOf: StoreProductGroup!\n additionalProperty: [StorePropertyValue!]!\n}\n\ninput IStoreProduct {\n sku: String!\n name: String!\n image: [IStoreImage!]!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var de={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreProductGroup"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"hasVariant"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"productGroupID"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"additionalProperty"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePropertyValue"}}}}},directives:[]}]}],loc:{start:0,end:145}};de.loc.source={body:"type StoreProductGroup {\n hasVariant: [StoreProduct!]!\n productGroupID: String!\n name: String!\n additionalProperty: [StorePropertyValue!]!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var re={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreProductEdge"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"node"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"cursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreProductConnection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"pageInfo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePageInfo"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"edges"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductEdge"}}}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCollectionEdge"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"node"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"cursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCollectionConnection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"pageInfo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePageInfo"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"edges"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionEdge"}}}}},directives:[]}]},{kind:"EnumTypeDefinition",name:{kind:"Name",value:"StoreSort"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"price_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"price_asc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"orders_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"name_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"name_asc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"release_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"discount_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"score_desc"},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreSelectedFacet"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"key"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"value"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"EnumTypeDefinition",name:{kind:"Name",value:"StoreFacetType"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"BOOLEAN"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"RANGE"},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreSuggestions"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"terms"},arguments:[],type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"products"},arguments:[],type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreSearchResult"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"products"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductConnection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"facets"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacet"}}}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"suggestions"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSuggestions"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"Query"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"product"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"locator"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSelectedFacet"}}}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"collection"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"slug"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"search"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"sort"},type:{kind:"NamedType",name:{kind:"Name",value:"StoreSort"}},defaultValue:{kind:"EnumValue",value:"score_desc"},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"term"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},defaultValue:{kind:"StringValue",value:"",block:!1},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"selectedFacets"},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSelectedFacet"}}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSearchResult"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"allProducts"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductConnection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"allCollections"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionConnection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"person"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"StorePerson"}},directives:[]}]}],loc:{start:0,end:1207}};re.loc.source={body:'type StoreProductEdge {\n node: StoreProduct!\n cursor: String!\n}\n\ntype StoreProductConnection {\n pageInfo: StorePageInfo!\n edges: [StoreProductEdge!]!\n}\n\ntype StoreCollectionEdge {\n node: StoreCollection!\n cursor: String!\n}\n\ntype StoreCollectionConnection {\n pageInfo: StorePageInfo!\n edges: [StoreCollectionEdge!]!\n}\n\nenum StoreSort {\n price_desc\n price_asc\n orders_desc\n name_desc\n name_asc\n release_desc\n discount_desc\n score_desc\n}\n\ninput IStoreSelectedFacet {\n key: String!\n value: String!\n}\n\nenum StoreFacetType {\n BOOLEAN\n RANGE\n}\n\ntype StoreSuggestions {\n terms: [String!]\n products: [StoreProduct!]\n}\n\ntype StoreSearchResult {\n products: StoreProductConnection!\n facets: [StoreFacet!]!\n suggestions: StoreSuggestions!\n}\n\ntype Query {\n product(locator: [IStoreSelectedFacet!]!): StoreProduct!\n\n collection(slug: String!): StoreCollection!\n\n search(\n first: Int!\n after: String\n sort: StoreSort = score_desc\n term: String = ""\n selectedFacets: [IStoreSelectedFacet!]\n ): StoreSearchResult!\n\n allProducts(first: Int!, after: String): StoreProductConnection!\n\n allCollections(first: Int!, after: String): StoreCollectionConnection!\n\n person: StorePerson\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var le={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreReviewRating"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"ratingValue"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"bestRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreReview"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"reviewRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreReviewRating"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"author"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAuthor"}}},directives:[]}]}],loc:{start:0,end:150}};le.loc.source={body:"type StoreReviewRating {\n ratingValue: Float!\n bestRating: Float!\n}\n\ntype StoreReview {\n reviewRating: StoreReviewRating!\n author: StoreAuthor!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var oe={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreSeo"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"title"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"titleTemplate"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"description"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"canonical"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:104}};oe.loc.source={body:"type StoreSeo {\n title: String!\n titleTemplate: String!\n description: String!\n canonical: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var me={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCartMessage"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"text"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"status"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreStatus"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreCart"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"order"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOrder"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"messages"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCartMessage"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"IStoreCart"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"order"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOrder"}}},directives:[]}]}],loc:{start:0,end:183}};me.loc.source={body:"type StoreCartMessage {\n text: String!\n status: StoreStatus!\n}\n\ntype StoreCart {\n order: StoreOrder!\n messages: [StoreCartMessage!]!\n}\n\ninput IStoreCart {\n order: IStoreOrder!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ue={kind:"Document",definitions:[{kind:"EnumTypeDefinition",name:{kind:"Name",value:"StoreStatus"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"INFO"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"WARNING"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"ERROR"},directives:[]}]}],loc:{start:0,end:46}};ue.loc.source={body:"enum StoreStatus {\n INFO\n WARNING\n ERROR\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var se={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StorePropertyValue"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:61}};se.loc.source={body:"type StorePropertyValue {\n value: String!\n name: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var pe={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StorePerson"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"email"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"givenName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"familyName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:95}};pe.loc.source={body:"type StorePerson {\n id: String!\n email: String!\n givenName: String!\n familyName: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};const ce=[re,Z,W,H,Y,K,X,te,ae,oe,ee,z,le,J,de,ie,U,ne,me,ue,se,pe].map(r.print).join("\n"),ke={vtex:{getResolvers:e=>M,getContextFactory:e=>n=>(n.storage={channel:I.parse(e.channel)},n.clients=((e,n)=>({search:m(e,n),commerce:(({account:e,environment:n},i)=>{const t=`https://${e}.${n}.com.br`;return{catalog:{brand:{list:()=>l(t+"/api/catalog_system/pub/brand/list")},category:{tree:(e=3)=>l(`${t}/api/catalog_system/pub/category/tree/${e}`)},portal:{pagetype:e=>l(`${t}/api/catalog_system/pub/portal/pagetype/${e}`)}},checkout:{simulation:(e,{salesChannel:n}=i.storage.channel)=>{const a=new URLSearchParams({sc:n});return l(`${t}/api/checkout/pub/orderForms/simulation?${a.toString()}`,{...o,body:JSON.stringify(e)})},orderForm:({id:e,refreshOutdatedData:n=!0,channel:a=i.storage.channel})=>{const{salesChannel:d}=a,r=new URLSearchParams({refreshOutdatedData:n.toString(),sc:d});return l(`${t}/api/checkout/pub/orderForm/${e}?${r.toString()}`,o)},updateOrderFormItems:({id:e,orderItems:n,allowOutdatedData:a="paymentData",salesChannel:d=i.storage.channel.salesChannel})=>{const r=new URLSearchParams({allowOutdatedData:a,sc:d});return l(`${t}/api/checkout/pub/orderForm/${e}/items?${r}`,{...o,body:JSON.stringify({orderItems:n}),method:"PATCH"})},region:async({postalCode:e,country:n,salesChannel:i})=>l(`${t}/api/checkout/pub/regions/?postalCode=${e}&country=${n}&sc=${null!=i?i:""}`)},session:()=>l(t+"/api/sessions?items=profile.id,profile.email,profile.firstName,profile.lastName",{method:"POST",headers:{"content-type":"application/json",cookie:i.headers.cookie},body:"{}"})}})(e,n),sp:(({account:e},n)=>{const i=`https://sp.vtex.com/event-api/v1/${e}/event`;return{sendEvent:e=>l(i,{method:"POST",body:JSON.stringify({...e,agent:"@faststore/api",anonymous:p.anonymous(),session:p.session()}),headers:{"content-type":"application/json"}})}})(e)}))(e,n),n.loaders=((e,{clients:n})=>({skuLoader:((e,n)=>new t(async e=>{const i=e.map(e=>{const n=e.find(({key:e})=>"id"===e);if(!n)throw new c("Error while loading SKU. Needs to pass an id to selected facets");return n.value}),{products:t}=await n.search.products({query:"sku:"+i.join(";"),page:0,count:i.length}),a=t.reduce((e,n)=>{for(const i of n.items)e[i.itemId]=y(i,n);return e},{}),d=i.map(e=>a[e]),r=d.filter(e=>!e);if(r.length>0)throw new Error("Search API did not return the following skus: "+r.join(","));return d},{maxBatchSize:99}))(0,n),simulationLoader:((e,n)=>{const i=a(1),d=async e=>{const i=[...e.flat()],t=await n.commerce.checkout.simulation({items:i}),a=t.items.reduce((e,n)=>{const i=n.requestIndex;return"number"==typeof i&&i<e.length&&(e[i]=n),e},Array(i.length).fill(null)),d=e.reduce((e,n)=>[...e,n.length+e[e.length-1]],[0]);return e.map((e,n)=>({...t,items:a.slice(d[n],d[n+1]).filter(e=>Boolean(e))}))};return new t(async e=>i(d,e),{maxBatchSize:50})})(0,n),collectionLoader:((e,n)=>{const i=a(20);return new t(async e=>Promise.all(e.map(e=>i(async()=>{const i=await n.commerce.catalog.portal.pagetype(e);if(v(i))return i;throw new k(`Catalog returned ${i.pageType} for slug: ${e}. This usually happens when there is more than one category with the same name in the same category tree level.`)}))),{batch:!1})})(0,n)}))(0,n),n)}},ye=e=>ke[e.platform].getResolvers(e);exports.getContextFactory=e=>ke[e.platform].getContextFactory(e),exports.getResolvers=ye,exports.getSchema=async e=>n.makeExecutableSchema({resolvers:ye(e),typeDefs:ce}),exports.getTypeDefs=()=>ce;
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=e(require("express")),i=require("express-graphql"),t=require("@graphql-tools/schema"),a=e(require("isomorphic-unfetch")),r=e(require("dataloader")),o=e(require("p-limit")),d=e(require("fast-deep-equal")),l=require("graphql");const s=async(e,n)=>{const i=await a(e,n);if(i.ok)return 204!==i.status?i.json():void 0;console.error(e,n,i);const t=await i.text();throw new Error(t)},u={method:"POST",headers:{"content-type":"application/json"}},c=({account:e,environment:n,hideUnavailableItems:i},t)=>{const a=`https://${e}.${n}.com.br/api/io`,r={key:"trade-policy",value:t.storage.channel.salesChannel},o=({query:e="",page:n,count:t,sort:o="",selectedFacets:d=[],type:l,fuzzy:u="0"})=>{const c=new URLSearchParams({page:(n+1).toString(),count:t.toString(),query:e,sort:o,fuzzy:u});void 0!==i&&c.append("hideUnavailableItems",i.toString());const m=(p=d,void 0===p.find(({key:e})=>e===r.key)?[...p,r]:p).map(({key:e,value:n})=>`${e}/${n}`).join("/");var p;return s(`${a}/_v/api/intelligent-search/${l}/${m}?${c.toString()}`)};return{facets:e=>o({...e,type:"facets"}),products:e=>o({...e,type:"product_search"}),suggestedTerms:e=>s(`${a}/_v/api/intelligent-search/search_suggestions?query=${e.query}`),suggestedProducts:e=>s(`${a}/_v/api/intelligent-search/product_search?query=${e.query}`)}},m=()=>(1e6*Math.random()).toFixed(0),p=e=>{let n=m(),i=Date.now();return()=>{var t;return t=i,(Date.now()-t)/1e3>e&&(n=m(),i=Date.now()),n}},k={anonymous:p(31536e3),session:p(1800)};class y extends Error{constructor(e){super(e),this.name="BadRequestError"}}class g extends Error{constructor(e){super(e),this.name="NotFoundError"}}const v=(e,n)=>({...e,isVariantOf:n}),f=new Set(["brand","category","department","subcategory"]),N=e=>"string"==typeof e.pageType&&f.has(e.pageType.toLowerCase()),S=e=>e.AvailableQuantity>0,h=e=>{var n;return null!=(n=e.spotPrice)?n:0},T=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",b=(e,n)=>S(e)&&!S(n)?-1:!S(e)&&S(n)?1:h(e)-h(n),D={highPrice:e=>{var n,i;const t=e.filter(S);return null!=(n=null==(i=t[t.length-1])?void 0:i.Price)?n:0},lowPrice:e=>{var n,i;return null!=(n=null==(i=e.filter(S)[0])?void 0:i.Price)?n:0},offerCount:e=>e.length,priceCurrency:()=>"",offers:e=>e},V="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",I=e=>"brand"===e.type||N(e)&&"brand"===e.pageType.toLowerCase(),O=e=>I(e)?(e=>e.replace(/[·/_,:]/,"-"))((e=>{let n=e.slice(0);for(let e=0;e<V.length;e++)n=n.replace(new RegExp(V.charAt(e),"g"),"AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa".charAt(e));return n})(e.name.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-"))).toLowerCase():N(e)?new URL("https://"+e.url).pathname.slice(1).toLowerCase():new URL(e.url).pathname.slice(1).toLowerCase(),F={id:({id:e})=>e.toString(),slug:e=>O(e),seo:e=>I(e)||N(e)?{title:e.title,description:e.metaTagDescription}:{title:e.Title,description:e.MetaTagDescription},type:e=>I(e)?"Brand":N(e)?e.pageType:0===e.level?"Department":"Category",meta:e=>{const n=O(e);return I(e)?{selectedFacets:[{key:"brand",value:n}]}:{selectedFacets:n.split("/").map((e,n)=>({key:"category-"+(n+1),value:e}))}},breadcrumbList:async(e,n,i)=>{const{loaders:{collectionLoader:t}}=i,a=O(e).split("/").filter(e=>Boolean(e)),r=a.map((e,n)=>a.slice(0,n+1).join("/")),o=await Promise.all(r.map(e=>t.load(e)));return{itemListElement:o.map((e,n)=>({item:new URL("https://"+e.url).pathname.toLowerCase(),name:e.name,position:n+1})),numberOfItems:o.length}}},P=e=>[e.itemOffered.sku,e.seller.identifier,e.price].join("::"),C=(e,n)=>({listPrice:e.listPrice/100,price:e.sellingPrice/100,quantity:e.quantity,seller:{identifier:e.seller},itemOffered:{sku:e.id,image:[],name:e.name},index:n}),w=e=>({quantity:e.quantity,seller:e.seller.identifier,id:e.itemOffered.sku,index:e.index}),L=e=>e.reduce((e,n)=>{var i;const t=P(n);return e.set(t,null!=(i=e.get(t))?i:n),e},new Map);class A{static parse(e){try{var n,i;const t=JSON.parse(e);return{regionId:null!=(n=t.regionId)?n:"",salesChannel:null!=(i=t.salesChannel)?i:""}}catch(e){throw console.error(e),new Error("Malformed channel string")}}static stringify(e){return JSON.stringify(e)}}const R=(e,n)=>{e.storage={...e.storage,channel:A.parse(n)}},q={validateCart:async(e,{cart:{order:n}},i)=>{const{orderNumber:t,acceptedOffer:a}=n,{clients:{commerce:r},loaders:{skuLoader:o}}=i,l=await r.checkout.orderForm({id:t}),s=L(a),u=L(l.items.map(C)),c=Array.from(s.values()),m=Array.from(u.values()),{itemsToAdd:p,itemsToUpdate:k}=c.reduce((e,n)=>{const i=u.get(P(n));return i?e.itemsToUpdate.push({...i,quantity:n.quantity}):e.itemsToAdd.push(n),e},{itemsToAdd:[],itemsToUpdate:[]}),y=[...p,...k,...m.filter(e=>!s.has(P(e))).map(e=>({...e,quantity:0}))].map(w);if(0===y.length)return null;const g=await r.checkout.updateOrderFormItems({id:l.orderFormId,orderItems:y});return((e,n)=>{const i=(e,n)=>({...e,itemOffered:{sku:e.itemOffered.sku},index:n}),t=n.items.map(C).map(i),a=e.acceptedOffer.map(i),r=e.orderNumber===n.orderFormId,o=d(t,a);return r&&o})(n,g)?null:{order:{orderNumber:g.orderFormId,acceptedOffer:g.items.map(e=>({...e,product:o.load([{key:"id",value:e.id}])}))},messages:g.messages.map(({text:e,status:n})=>({text:e,status:n.toUpperCase()}))}},updateSession:async(e,{session:n},{clients:i})=>{var t,a,r,o;const d=A.parse(null!=(t=n.channel)?t:""),l=await i.commerce.checkout.region({postalCode:String(null!=(a=n.postalCode)?a:"").replace(/\D/g,""),country:null!=(r=n.country)?r:""});return{...n,channel:A.stringify({...d,regionId:null==l||null==(o=l[0])?void 0:o.id})}}},E=e=>"Price"in e&&"seller"in e&&"product"in e,x=e=>"skuName"in e,j={priceCurrency:()=>"",priceValidUntil:e=>{var n,i;return E(e)?null!=(n=e.PriceValidUntil)?n:"":x(e)?null!=(i=e.priceValidUntil)?i:"":null},itemCondition:()=>"https://schema.org/NewCondition",availability:async e=>E(e)?T(S(e)):x(e)?T("available"===e.availability):null,seller:e=>{var n;return E(e)?{identifier:null!=(n=e.seller.sellerId)?n:""}:x(e)?{identifier:e.seller}:null},price:e=>E(e)?h(e):x(e)?e.price/100:null,sellingPrice:e=>{return E(e)?null!=(n=e.Price)?n:0:x(e)?e.sellingPrice/100:null;var n},listPrice:e=>(console.log({root:e,isSearchItem:E(e),isOrderFormItem:x(e)}),E(e)?e.ListPrice:x(e)?e.listPrice/100:null),itemOffered:({product:e})=>e,quantity:e=>{var n;return E(e)?null!=(n=e.AvailableQuantity)?n:0:x(e)?e.quantity:null}},U={imageText:"image",imageUrl:"https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg"},G=(e,n)=>`${e}-${n}`,_={productID:({itemId:e})=>e,name:({isVariantOf:e,name:n})=>null!=n?n:e.productName,slug:({isVariantOf:{linkText:e},itemId:n})=>G(e,n),description:({isVariantOf:{description:e}})=>e,seo:({isVariantOf:{description:e,productName:n}})=>({title:n,description:e}),brand:({isVariantOf:{brand:e}})=>({name:e}),breadcrumbList:({isVariantOf:{categories:e,productName:n,linkText:i},itemId:t})=>{return{itemListElement:[...e.reverse().map((e,n)=>{const i=e.split("/");return{name:i[i.length-2],item:e.toLowerCase(),position:n+1}}),{name:n,item:(a=i,r=t,`/${G(a,r)}/p`),position:e.length+1}],numberOfItems:e.length};var a,r},image:({images:e})=>{var n,i;return(null!=(i=e,n=Array.isArray(i)&&i.length>0?i:null)?n:[U]).map(({imageUrl:e,imageText:n})=>({alternateName:null!=n?n:"",url:e.replace("vteximg.com.br","vtexassets.com")}))},sku:({itemId:e})=>e,gtin:({referenceId:e})=>{var n,i;return null!=(n=null==(i=e[0])?void 0:i.Value)?n:""},review:()=>[],aggregateRating:()=>({}),offers:e=>e.sellers.flatMap(n=>((e,n,i)=>({...e,product:i,seller:n}))(n.commertialOffer,n,e)).sort(b),isVariantOf:e=>e,additionalProperty:({variations:e=[]})=>e.flatMap(({name:e,values:n})=>n.map(n=>({name:e,value:n})))},$=new Set(["allSpecifications"]),B=({key:e,value:n})=>{switch(e){case"channel":{const e=A.parse(n),i=[{key:"trade-policy",value:e.salesChannel}];return e.regionId&&i.push({key:"region-id",value:e.regionId}),i}default:return{key:e,value:n}}},M={price_desc:"price:desc",price_asc:"price:asc",orders_desc:"orders:desc",name_desc:"name:desc",name_asc:"name:asc",release_desc:"release:desc",discount_desc:"discount:desc",score_desc:""},Q={product:async(e,{locator:n},i)=>{var t;const a=null==(t=n.find(e=>"channel"===e.key))?void 0:t.value;a&&R(i,a);const{loaders:{skuLoader:r}}=i;return r.load(n.flatMap(B))},collection:(e,{slug:n},i)=>{const{loaders:{collectionLoader:t}}=i;return t.load(n)},search:async(e,{first:n,after:i,sort:t,term:a,selectedFacets:r},o)=>{var d,l;const s=null==r||null==(d=r.find(e=>"channel"===e.key))?void 0:d.value;s&&R(o,s);const u=i?Number(i):0;return{page:Math.ceil(u/n),count:n,query:a,sort:M[null!=t?t:"score_desc"],selectedFacets:null!=(l=null==r?void 0:r.flatMap(B))?l:[]}},allProducts:async(e,{first:n,after:i},t)=>{const{clients:{search:a}}=t,r=i?Number(i):0,o=await a.products({page:Math.ceil(r/n),count:n}),d=o.products.map(e=>e.items.map(n=>v(n,e))).flat().filter(e=>e.sellers.length>0);return{pageInfo:{hasNextPage:o.pagination.after.length>0,hasPreviousPage:o.pagination.before.length>0,startCursor:"0",endCursor:o.recordsFiltered.toString(),totalCount:o.recordsFiltered},edges:d.map((e,n)=>({node:e,cursor:(r+n).toString()}))}},allCollections:async(e,{first:n,after:i},t)=>{const{clients:{commerce:a}}=t,r=i?Number(i):0,[o,d]=await Promise.all([a.catalog.brand.list(),a.catalog.category.tree()]),l=[],s=(e,n)=>{l.push({...e,level:n});for(const i of e.children)s(i,n+1)};for(const e of d)s(e,0);const u=[...o.filter(e=>e.isActive).map(e=>({...e,type:"brand"})),...l].filter(e=>Boolean(F.slug(e,null,t,null)));return{pageInfo:{hasNextPage:u.length-r>n,hasPreviousPage:r>0,startCursor:"0",endCursor:(Math.min(n,u.length-r)-1).toString(),totalCount:u.length},edges:u.slice(r,r+n).map((e,n)=>({node:e,cursor:(r+n).toString()}))}},person:async(e,n,i)=>{var t,a,r,o,d,l,s,u;const{clients:{commerce:c}}=i,{namespaces:{profile:m=null}}=await c.session();return m&&{id:null!=(t=null==(a=m.id)?void 0:a.value)?t:"",email:null!=(r=null==(o=m.email)?void 0:o.value)?r:"",givenName:null!=(d=null==(l=m.firstName)?void 0:l.value)?d:"",familyName:null!=(s=null==(u=m.lastName)?void 0:u.value)?s:""}}},z=["departamento","Departamento"],K={StoreCollection:F,StoreAggregateOffer:D,StoreProduct:_,StoreSeo:{title:({title:e})=>null!=e?e:"",description:({description:e})=>null!=e?e:"",titleTemplate:()=>"",canonical:()=>""},StoreFacet:{key:({key:e})=>null!=e?e:"",label:({name:e})=>null!=e?e:"unknown",values:({values:e})=>e,type:({type:e})=>"TEXT"===e?"BOOLEAN":"RANGE"},StoreFacetValue:{value:({value:e,range:n})=>{var i,t;return null!=e?e:`${null!=(i=null==n?void 0:n.from)?i:""}-to-${null!=(t=null==n?void 0:n.to)?t:""}`},label:({name:e})=>e||"unknown",selected:({selected:e})=>e,quantity:({quantity:e})=>e},StoreOffer:j,StoreAggregateRating:{ratingValue:()=>5,reviewCount:()=>0},StoreReview:{reviewRating:()=>({ratingValue:5,bestRating:5}),author:()=>({name:""})},StoreProductGroup:{hasVariant:e=>e.isVariantOf.items.map(n=>v(n,e.isVariantOf)),productGroupID:({isVariantOf:e})=>e.productId,name:({isVariantOf:e})=>e.productName,additionalProperty:({isVariantOf:{specificationGroups:e}})=>e.filter(e=>!$.has(e.name)).flatMap(({specifications:e})=>e.flatMap(({name:e,values:n})=>n.map(n=>({name:e,value:n}))))},StoreSearchResult:{suggestions:async(e,n,i)=>{const{clients:{search:t}}=i,a=await t.suggestedTerms(e),r=(await t.suggestedProducts(e)).products.map(e=>{const[n]=e.items;return n&&v(n,e)}).filter(e=>!!e),{searches:o}=a;return{terms:o.map(e=>e.term),products:r}},products:async(e,n,i)=>{const{clients:{search:t,sp:a}}=i,r=await t.products(e);e.query&&a.sendEvent({type:"search.query",text:e.query,misspelled:r.correction.misspelled,match:r.recordsFiltered,operator:r.operator}).catch(console.error);const o=r.products.map(e=>{const[n]=e.items;return n&&v(n,e)}).filter(e=>!!e);return{pageInfo:{hasNextPage:r.pagination.after.length>0,hasPreviousPage:r.pagination.before.length>0,startCursor:"0",endCursor:r.recordsFiltered.toString(),totalCount:r.recordsFiltered},edges:o.map((e,n)=>({node:e,cursor:n.toString()}))}},facets:async(e,n,i)=>{const{clients:{search:t}}=i,{facets:a}=await t.facets(e),r=!e.query,o=null==a?void 0:a.reduce((e,n)=>{const i=z.includes(n.name);return r&&i||(n.values.sort((e,n)=>{var i,t;const a=null!=(i=e.name)?i:"",r=null!=(t=n.name)?t:"";return a.localeCompare(r)}),e.push(n)),e},[]);return null!=o?o:[]}},Query:Q,Mutation:q};var J={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.",block:!0},name:{kind:"Name",value:"StoreAggregateOffer"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Highest price among all sellers.",block:!0},name:{kind:"Name",value:"highPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Lowest price among all sellers.",block:!0},name:{kind:"Name",value:"lowPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Number of sellers selling this SKU.",block:!0},name:{kind:"Name",value:"offerCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"ISO code of the currency used for the offer prices.",block:!0},name:{kind:"Name",value:"priceCurrency"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with information on each available offer.",block:!0},name:{kind:"Name",value:"offers"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOffer"}}}}},directives:[]}]}],loc:{start:0,end:516}};J.loc.source={body:'"""\nAggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.\n"""\ntype StoreAggregateOffer {\n """\n Highest price among all sellers.\n """\n highPrice: Float!\n """\n Lowest price among all sellers.\n """\n lowPrice: Float!\n """\n Number of sellers selling this SKU.\n """\n offerCount: Int!\n """\n ISO code of the currency used for the offer prices.\n """\n priceCurrency: String!\n """\n Array with information on each available offer.\n """\n offers: [StoreOffer!]!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var H={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Average rating, based on multiple ratings or reviews.",block:!0},name:{kind:"Name",value:"StoreAggregateRating"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Value of the aggregate rating.",block:!0},name:{kind:"Name",value:"ratingValue"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Total number of ratings.",block:!0},name:{kind:"Name",value:"reviewCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:218}};H.loc.source={body:'"""\nAverage rating, based on multiple ratings or reviews.\n"""\ntype StoreAggregateRating {\n """\n Value of the aggregate rating.\n """\n ratingValue: Float!\n """\n Total number of ratings.\n """\n reviewCount: Int!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var W={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"information about the author of a product review or rating.",block:!0},name:{kind:"Name",value:"StoreAuthor"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Author name.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:132}};W.loc.source={body:'"""\ninformation about the author of a product review or rating.\n"""\ntype StoreAuthor {\n """\n Author name.\n """\n name: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var Y={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Brand of a given product.",block:!0},name:{kind:"Name",value:"StoreBrand"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Brand name.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:96}};Y.loc.source={body:'"""\nBrand of a given product.\n"""\ntype StoreBrand {\n """\n Brand name.\n """\n name: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var X={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Item of a list.",block:!0},name:{kind:"Name",value:"StoreListItem"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"List item value.",block:!0},name:{kind:"Name",value:"item"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Name of the list item.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Position of the item in the list.",block:!0},name:{kind:"Name",value:"position"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"List of items consisting of chain linked web pages, ending with the current page.",block:!0},name:{kind:"Name",value:"StoreBreadcrumbList"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with breadcrumb elements.",block:!0},name:{kind:"Name",value:"itemListElement"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreListItem"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Number of breadcrumbs in the list.",block:!0},name:{kind:"Name",value:"numberOfItems"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:486}};X.loc.source={body:'"""\nItem of a list.\n"""\ntype StoreListItem {\n """\n List item value.\n """\n item: String!\n """\n Name of the list item.\n """\n name: String!\n """\n Position of the item in the list.\n """\n position: Int!\n}\n\n"""\nList of items consisting of chain linked web pages, ending with the current page.\n"""\ntype StoreBreadcrumbList {\n """\n Array with breadcrumb elements.\n """\n itemListElement: [StoreListItem!]!\n """\n Number of breadcrumbs in the list.\n """\n numberOfItems: Int!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var Z={kind:"Document",definitions:[{kind:"EnumTypeDefinition",description:{kind:"StringValue",value:"Product collection type. Possible values are `Department`, `Category`, `Brand` or `Cluster`.",block:!0},name:{kind:"Name",value:"StoreCollectionType"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"Department"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Category"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Brand"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"Cluster"},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product collection facet, used for search.",block:!0},name:{kind:"Name",value:"StoreCollectionFacet"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet key.",block:!0},name:{kind:"Name",value:"key"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet value.",block:!0},name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Collection meta information. Used for search.",block:!0},name:{kind:"Name",value:"StoreCollectionMeta"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"List of selected collection facets.",block:!0},name:{kind:"Name",value:"selectedFacets"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionFacet"}}}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product collection information.",block:!0},name:{kind:"Name",value:"StoreCollection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Meta tag data.",block:!0},name:{kind:"Name",value:"seo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSeo"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"List of items consisting of chain linked web pages, ending with the current page.",block:!0},name:{kind:"Name",value:"breadcrumbList"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBreadcrumbList"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection meta information. Used for search.",block:!0},name:{kind:"Name",value:"meta"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionMeta"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection ID.",block:!0},name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Corresponding collection URL slug, with which to retrieve this entity.",block:!0},name:{kind:"Name",value:"slug"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection type.",block:!0},name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionType"}}},directives:[]}]}],loc:{start:0,end:1051}};Z.loc.source={body:'"""\nProduct collection type. Possible values are `Department`, `Category`, `Brand` or `Cluster`.\n"""\nenum StoreCollectionType {\n Department\n Category\n Brand\n Cluster\n}\n\n"""\nProduct collection facet, used for search.\n"""\ntype StoreCollectionFacet {\n """\n Facet key.\n """\n key: String!\n """\n Facet value.\n """\n value: String!\n}\n\n"""\nCollection meta information. Used for search.\n"""\ntype StoreCollectionMeta {\n """\n List of selected collection facets.\n """\n selectedFacets: [StoreCollectionFacet!]!\n}\n\n"""\nProduct collection information.\n"""\ntype StoreCollection {\n """\n Meta tag data.\n """\n seo: StoreSeo!\n """\n List of items consisting of chain linked web pages, ending with the current page.\n """\n breadcrumbList: StoreBreadcrumbList!\n """\n Collection meta information. Used for search.\n """\n meta: StoreCollectionMeta!\n """\n Collection ID.\n """\n id: ID!\n """\n Corresponding collection URL slug, with which to retrieve this entity.\n """\n slug: String!\n """\n Collection type.\n """\n type: StoreCollectionType!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ee={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Search facet information.",block:!0},name:{kind:"Name",value:"StoreFacet"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet key.",block:!0},name:{kind:"Name",value:"key"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet label.",block:!0},name:{kind:"Name",value:"label"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with information on each facet value.",block:!0},name:{kind:"Name",value:"values"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacetValue"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet type. Possible values are `BOOLEAN` and `RANGE`.",block:!0},name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacetType"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Information of a specific facet value.",block:!0},name:{kind:"Name",value:"StoreFacetValue"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet value.",block:!0},name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Facet value label.",block:!0},name:{kind:"Name",value:"label"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Indicates whether facet is selected.",block:!0},name:{kind:"Name",value:"selected"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Number of items with this facet.",block:!0},name:{kind:"Name",value:"quantity"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:622}};ee.loc.source={body:'"""\nSearch facet information.\n"""\ntype StoreFacet {\n """\n Facet key.\n """\n key: String!\n """\n Facet label.\n """\n label: String!\n """\n Array with information on each facet value.\n """\n values: [StoreFacetValue!]!\n """\n Facet type. Possible values are `BOOLEAN` and `RANGE`.\n """\n type: StoreFacetType!\n}\n\n"""\nInformation of a specific facet value.\n"""\ntype StoreFacetValue {\n """\n Facet value.\n """\n value: String!\n """\n Facet value label.\n """\n label: String!\n """\n Indicates whether facet is selected.\n """\n selected: Boolean!\n """\n Number of items with this facet.\n """\n quantity: Int!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ne={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Image.",block:!0},name:{kind:"Name",value:"StoreImage"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Image URL.",block:!0},name:{kind:"Name",value:"url"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Alias for the image.",block:!0},name:{kind:"Name",value:"alternateName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Image input.",block:!0},name:{kind:"Name",value:"IStoreImage"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Image input URL.",block:!0},name:{kind:"Name",value:"url"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Alias for the input image.",block:!0},name:{kind:"Name",value:"alternateName"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:291}};ne.loc.source={body:'"""\nImage.\n"""\ntype StoreImage {\n """\n Image URL.\n """\n url: String!\n """\n Alias for the image.\n """\n alternateName: String!\n}\n\n"""\nImage input.\n"""\ninput IStoreImage {\n """\n Image input URL.\n """\n url: String!\n """\n Alias for the input image.\n """\n alternateName: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ie={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Session information.",block:!0},name:{kind:"Name",value:"StoreSession"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Session channel.",block:!0},name:{kind:"Name",value:"channel"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Session country.",block:!0},name:{kind:"Name",value:"country"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Session postal code.",block:!0},name:{kind:"Name",value:"postalCode"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Session input.",block:!0},name:{kind:"Name",value:"IStoreSession"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Session input channel.",block:!0},name:{kind:"Name",value:"channel"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Session input country.",block:!0},name:{kind:"Name",value:"country"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Session input postal code.",block:!0},name:{kind:"Name",value:"postalCode"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"Mutation"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Returns the order if anything has changed in it, or `null` if the order is valid.",block:!0},name:{kind:"Name",value:"validateCart"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"cart"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreCart"}}},directives:[]}],type:{kind:"NamedType",name:{kind:"Name",value:"StoreCart"}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Update session information.",block:!0},name:{kind:"Name",value:"updateSession"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"session"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSession"}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSession"}}},directives:[]}]}],loc:{start:0,end:683}};ie.loc.source={body:'"""\nSession information.\n"""\ntype StoreSession {\n """\n Session channel.\n """\n channel: String\n """\n Session country.\n """\n country: String\n """\n Session postal code.\n """\n postalCode: String\n}\n\n"""\nSession input.\n"""\ninput IStoreSession {\n """\n Session input channel.\n """\n channel: String\n """\n Session input country.\n """\n country: String\n """\n Session input postal code.\n """\n postalCode: String\n}\n\ntype Mutation {\n """\n Returns the order if anything has changed in it, or `null` if the order is valid.\n """\n validateCart(cart: IStoreCart!): StoreCart\n """\n Update session information.\n """\n updateSession(session: IStoreSession!): StoreSession!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var te={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Offer information.",block:!0},name:{kind:"Name",value:"StoreOffer"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:'This is displayed as the "from" price in the context of promotions\' price comparison. This may change before it reaches the shelf.',block:!0},name:{kind:"Name",value:"listPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf.",block:!0},name:{kind:"Name",value:"sellingPrice"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"ISO code of the currency used for the offer prices.",block:!0},name:{kind:"Name",value:"priceCurrency"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Also known as spot price.",block:!0},name:{kind:"Name",value:"price"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.",block:!0},name:{kind:"Name",value:"priceValidUntil"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Offer item condition.",block:!0},name:{kind:"Name",value:"itemCondition"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Offer item availability.",block:!0},name:{kind:"Name",value:"availability"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Seller responsible for the offer.",block:!0},name:{kind:"Name",value:"seller"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOrganization"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Information on the item being offered.",block:!0},name:{kind:"Name",value:"itemOffered"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Number of items offered.",block:!0},name:{kind:"Name",value:"quantity"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Offer input.",block:!0},name:{kind:"Name",value:"IStoreOffer"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Also known as spot price.",block:!0},name:{kind:"Name",value:"price"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:'This is displayed as the "from" price in the context of promotions\' price comparison. This may change before it reaches the shelf.',block:!0},name:{kind:"Name",value:"listPrice"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Seller responsible for the offer.",block:!0},name:{kind:"Name",value:"seller"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOrganization"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Information on the item being offered.",block:!0},name:{kind:"Name",value:"itemOffered"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreProduct"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Number of items offered.",block:!0},name:{kind:"Name",value:"quantity"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:1501}};te.loc.source={body:'"""\nOffer information.\n"""\ntype StoreOffer {\n """\n This is displayed as the "from" price in the context of promotions\' price comparison. This may change before it reaches the shelf.\n """\n listPrice: Float!\n """\n Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf.\n """\n sellingPrice: Float!\n """\n ISO code of the currency used for the offer prices.\n """\n priceCurrency: String!\n """\n Also known as spot price.\n """\n price: Float!\n """\n Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.\n """\n priceValidUntil: String!\n """\n Offer item condition.\n """\n itemCondition: String!\n """\n Offer item availability.\n """\n availability: String!\n """\n Seller responsible for the offer.\n """\n seller: StoreOrganization!\n """\n Information on the item being offered.\n """\n itemOffered: StoreProduct!\n """\n Number of items offered.\n """\n quantity: Int!\n}\n\n"""\nOffer input.\n"""\ninput IStoreOffer {\n """\n Also known as spot price.\n """\n price: Float!\n """\n This is displayed as the "from" price in the context of promotions\' price comparison. This may change before it reaches the shelf.\n """\n listPrice: Float!\n """\n Seller responsible for the offer.\n """\n seller: IStoreOrganization!\n """\n Information on the item being offered.\n """\n itemOffered: IStoreProduct!\n """\n Number of items offered.\n """\n quantity: Int!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ae={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Information of a specific order.",block:!0},name:{kind:"Name",value:"StoreOrder"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Order shopping cart ID, also known as `orderFormId`.",block:!0},name:{kind:"Name",value:"orderNumber"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with information on each accepted offer.",block:!0},name:{kind:"Name",value:"acceptedOffer"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOffer"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Offer input.",block:!0},name:{kind:"Name",value:"IStoreOrder"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Order shopping cart ID, also known as `orderFormId`.",block:!0},name:{kind:"Name",value:"orderNumber"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Array with information on each accepted offer.",block:!0},name:{kind:"Name",value:"acceptedOffer"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOffer"}}}}},directives:[]}]}],loc:{start:0,end:472}};ae.loc.source={body:'"""\nInformation of a specific order.\n"""\ntype StoreOrder {\n """\n Order shopping cart ID, also known as `orderFormId`.\n """\n orderNumber: String!\n """\n Array with information on each accepted offer.\n """\n acceptedOffer: [StoreOffer!]!\n}\n\n"""\nOffer input.\n"""\ninput IStoreOrder {\n """\n Order shopping cart ID, also known as `orderFormId`.\n """\n orderNumber: String!\n """\n Array with information on each accepted offer.\n """\n acceptedOffer: [IStoreOffer!]!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var re={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Organization.",block:!0},name:{kind:"Name",value:"StoreOrganization"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Organization ID.",block:!0},name:{kind:"Name",value:"identifier"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Organization input.",block:!0},name:{kind:"Name",value:"IStoreOrganization"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Organization ID.",block:!0},name:{kind:"Name",value:"identifier"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:213}};re.loc.source={body:'"""\nOrganization.\n"""\ntype StoreOrganization {\n """\n Organization ID.\n """\n identifier: String!\n}\n\n"""\nOrganization input.\n"""\ninput IStoreOrganization {\n """\n Organization ID.\n """\n identifier: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var oe={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Page information.",block:!0},name:{kind:"Name",value:"StorePageInfo"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Indicates whether next page exists.",block:!0},name:{kind:"Name",value:"hasNextPage"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Indicates whether previous page exists.",block:!0},name:{kind:"Name",value:"hasPreviousPage"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Page cursor start.",block:!0},name:{kind:"Name",value:"startCursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Page cursor end.",block:!0},name:{kind:"Name",value:"endCursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Total number of items (products or collections), not pages.",block:!0},name:{kind:"Name",value:"totalCount"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}]}],loc:{start:0,end:406}};oe.loc.source={body:'"""\nPage information.\n"""\ntype StorePageInfo {\n """\n Indicates whether next page exists.\n """\n hasNextPage: Boolean!\n """\n Indicates whether previous page exists.\n """\n hasPreviousPage: Boolean!\n """\n Page cursor start.\n """\n startCursor: String!\n """\n Page cursor end.\n """\n endCursor: String!\n """\n Total number of items (products or collections), not pages.\n """\n totalCount: Int!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var de={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product information.",block:!0},name:{kind:"Name",value:"StoreProduct"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Meta tag data.",block:!0},name:{kind:"Name",value:"seo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSeo"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"List of items consisting of chain linked web pages, ending with the current page.",block:!0},name:{kind:"Name",value:"breadcrumbList"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBreadcrumbList"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Corresponding collection URL slug, with which to retrieve this entity.",block:!0},name:{kind:"Name",value:"slug"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product name.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product ID.",block:!0},name:{kind:"Name",value:"productID"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product brand.",block:!0},name:{kind:"Name",value:"brand"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreBrand"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product description.",block:!0},name:{kind:"Name",value:"description"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array of images.",block:!0},name:{kind:"Name",value:"image"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreImage"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Aggregate offer information.",block:!0},name:{kind:"Name",value:"offers"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAggregateOffer"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Stock Keeping Unit ID.",block:!0},name:{kind:"Name",value:"sku"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Global Trade Item Number.",block:!0},name:{kind:"Name",value:"gtin"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with review information.",block:!0},name:{kind:"Name",value:"review"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreReview"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Aggregate ratings data.",block:!0},name:{kind:"Name",value:"aggregateRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAggregateRating"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Indicates product group related to this product.",block:!0},name:{kind:"Name",value:"isVariantOf"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductGroup"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array of additional properties.",block:!0},name:{kind:"Name",value:"additionalProperty"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePropertyValue"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Product input.",block:!0},name:{kind:"Name",value:"IStoreProduct"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Stock Keeping Unit ID.",block:!0},name:{kind:"Name",value:"sku"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Product name.",block:!0},name:{kind:"Name",value:"name"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Array of product images.",block:!0},name:{kind:"Name",value:"image"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreImage"}}}}},directives:[]}]}],loc:{start:0,end:1315}};de.loc.source={body:'"""\nProduct information.\n"""\ntype StoreProduct {\n """\n Meta tag data.\n """\n seo: StoreSeo!\n """\n List of items consisting of chain linked web pages, ending with the current page.\n """\n breadcrumbList: StoreBreadcrumbList!\n """\n Corresponding collection URL slug, with which to retrieve this entity.\n """\n slug: String!\n """\n Product name.\n """\n name: String!\n """\n Product ID.\n """\n productID: String!\n """\n Product brand.\n """\n brand: StoreBrand!\n """\n Product description.\n """\n description: String!\n """\n Array of images.\n """\n image: [StoreImage!]!\n """\n Aggregate offer information.\n """\n offers: StoreAggregateOffer!\n """\n Stock Keeping Unit ID.\n """\n sku: String!\n """\n Global Trade Item Number.\n """\n gtin: String!\n """\n Array with review information.\n """\n review: [StoreReview!]!\n """\n Aggregate ratings data.\n """\n aggregateRating: StoreAggregateRating!\n """\n Indicates product group related to this product.\n """\n isVariantOf: StoreProductGroup!\n """\n Array of additional properties.\n """\n additionalProperty: [StorePropertyValue!]!\n}\n\n"""\nProduct input.\n"""\ninput IStoreProduct {\n """\n Stock Keeping Unit ID.\n """\n sku: String!\n """\n Product name.\n """\n name: String!\n """\n Array of product images.\n """\n image: [IStoreImage!]!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var le={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product group information.",block:!0},name:{kind:"Name",value:"StoreProductGroup"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array of variants related to product group.",block:!0},name:{kind:"Name",value:"hasVariant"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product group ID.",block:!0},name:{kind:"Name",value:"productGroupID"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product group name.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array of additional properties.",block:!0},name:{kind:"Name",value:"additionalProperty"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePropertyValue"}}}}},directives:[]}]}],loc:{start:0,end:350}};le.loc.source={body:'"""\nProduct group information.\n"""\ntype StoreProductGroup {\n """\n Array of variants related to product group.\n """\n hasVariant: [StoreProduct!]!\n """\n Product group ID.\n """\n productGroupID: String!\n """\n Product group name.\n """\n name: String!\n """\n Array of additional properties.\n """\n additionalProperty: [StorePropertyValue!]!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var se={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product pagination edge.",block:!0},name:{kind:"Name",value:"StoreProductEdge"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product pagination node.",block:!0},name:{kind:"Name",value:"node"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product pagination cursor.",block:!0},name:{kind:"Name",value:"cursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Product connection pagination information.",block:!0},name:{kind:"Name",value:"StoreProductConnection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Product connection page information.",block:!0},name:{kind:"Name",value:"pageInfo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePageInfo"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with product connection page edges.",block:!0},name:{kind:"Name",value:"edges"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductEdge"}}}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Collection pagination edge.",block:!0},name:{kind:"Name",value:"StoreCollectionEdge"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection pagination node.",block:!0},name:{kind:"Name",value:"node"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollection"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection pagination cursor.",block:!0},name:{kind:"Name",value:"cursor"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Collection connection pagination information.",block:!0},name:{kind:"Name",value:"StoreCollectionConnection"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Collection connection page information.",block:!0},name:{kind:"Name",value:"pageInfo"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StorePageInfo"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with collection connection page edges.",block:!0},name:{kind:"Name",value:"edges"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionEdge"}}}}},directives:[]}]},{kind:"EnumTypeDefinition",description:{kind:"StringValue",value:"Product sorting options used in search.",block:!0},name:{kind:"Name",value:"StoreSort"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"price_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"price_asc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"orders_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"name_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"name_asc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"release_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"discount_desc"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"score_desc"},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Selected facet input.",block:!0},name:{kind:"Name",value:"IStoreSelectedFacet"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"key"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"value"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]},{kind:"EnumTypeDefinition",description:{kind:"StringValue",value:"Search facet type.",block:!0},name:{kind:"Name",value:"StoreFacetType"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"BOOLEAN"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"RANGE"},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Suggestions information.",block:!0},name:{kind:"Name",value:"StoreSuggestions"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with suggestion terms.",block:!0},name:{kind:"Name",value:"terms"},arguments:[],type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array with suggestion products' information.",block:!0},name:{kind:"Name",value:"products"},arguments:[],type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Search result.",block:!0},name:{kind:"Name",value:"StoreSearchResult"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Search result products.",block:!0},name:{kind:"Name",value:"products"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductConnection"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Array of search result facets.",block:!0},name:{kind:"Name",value:"facets"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreFacet"}}}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Search result suggestions.",block:!0},name:{kind:"Name",value:"suggestions"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSuggestions"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"Query"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"product"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"locator"},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSelectedFacet"}}}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProduct"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"collection"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"slug"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"search"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"sort"},type:{kind:"NamedType",name:{kind:"Name",value:"StoreSort"}},defaultValue:{kind:"EnumValue",value:"score_desc"},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"term"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},defaultValue:{kind:"StringValue",value:"",block:!1},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"selectedFacets"},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreSelectedFacet"}}}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreSearchResult"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"allProducts"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreProductConnection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"allCollections"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"first"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"after"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCollectionConnection"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"person"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"StorePerson"}},directives:[]}]}],loc:{start:0,end:2154}};se.loc.source={body:'"""\nProduct pagination edge.\n"""\ntype StoreProductEdge {\n """\n Product pagination node.\n """\n node: StoreProduct!\n """\n Product pagination cursor.\n """\n cursor: String!\n}\n\n"""\nProduct connection pagination information.\n"""\ntype StoreProductConnection {\n """\n Product connection page information.\n """\n pageInfo: StorePageInfo!\n """\n Array with product connection page edges.\n """\n edges: [StoreProductEdge!]!\n}\n\n"""\nCollection pagination edge.\n"""\ntype StoreCollectionEdge {\n """\n Collection pagination node.\n """\n node: StoreCollection!\n """\n Collection pagination cursor.\n """\n cursor: String!\n}\n\n"""\nCollection connection pagination information.\n"""\ntype StoreCollectionConnection {\n """\n Collection connection page information.\n """\n pageInfo: StorePageInfo!\n """\n Array with collection connection page edges.\n """\n edges: [StoreCollectionEdge!]!\n}\n\n"""\nProduct sorting options used in search.\n"""\nenum StoreSort {\n price_desc\n price_asc\n orders_desc\n name_desc\n name_asc\n release_desc\n discount_desc\n score_desc\n}\n\n"""\nSelected facet input.\n"""\ninput IStoreSelectedFacet {\n key: String!\n value: String!\n}\n\n"""\nSearch facet type.\n"""\nenum StoreFacetType {\n BOOLEAN\n RANGE\n}\n\n"""\nSuggestions information.\n"""\ntype StoreSuggestions {\n """\n Array with suggestion terms.\n """\n terms: [String!]\n """\n Array with suggestion products\' information.\n """\n products: [StoreProduct!]\n}\n\n"""\nSearch result.\n"""\ntype StoreSearchResult {\n """\n Search result products.\n """\n products: StoreProductConnection!\n """\n Array of search result facets.\n """\n facets: [StoreFacet!]!\n """\n Search result suggestions.\n """\n suggestions: StoreSuggestions!\n}\n\ntype Query {\n product(locator: [IStoreSelectedFacet!]!): StoreProduct!\n\n collection(slug: String!): StoreCollection!\n\n search(\n first: Int!\n after: String\n sort: StoreSort = score_desc\n term: String = ""\n selectedFacets: [IStoreSelectedFacet!]\n ): StoreSearchResult!\n\n allProducts(first: Int!, after: String): StoreProductConnection!\n\n allCollections(first: Int!, after: String): StoreCollectionConnection!\n\n person: StorePerson\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ue={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreReviewRating"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"ratingValue"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"bestRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreReview"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"reviewRating"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreReviewRating"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"author"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreAuthor"}}},directives:[]}]}],loc:{start:0,end:150}};ue.loc.source={body:"type StoreReviewRating {\n ratingValue: Float!\n bestRating: Float!\n}\n\ntype StoreReview {\n reviewRating: StoreReviewRating!\n author: StoreAuthor!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ce={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"StoreSeo"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"title"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"titleTemplate"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"description"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"canonical"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:104}};ce.loc.source={body:"type StoreSeo {\n title: String!\n titleTemplate: String!\n description: String!\n canonical: String!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var me={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Shopping cart message.",block:!0},name:{kind:"Name",value:"StoreCartMessage"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Shopping cart message text.",block:!0},name:{kind:"Name",value:"text"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Shopping cart message status, which can be `INFO`, `WARNING` OR `ERROR`.",block:!0},name:{kind:"Name",value:"status"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreStatus"}}},directives:[]}]},{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Shopping cart information.",block:!0},name:{kind:"Name",value:"StoreCart"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Order information, including `orderNumber` and `acceptedOffer`.",block:!0},name:{kind:"Name",value:"order"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreOrder"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"List of shopping cart messages.",block:!0},name:{kind:"Name",value:"messages"},arguments:[],type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StoreCartMessage"}}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",description:{kind:"StringValue",value:"Shopping cart identification input.",block:!0},name:{kind:"Name",value:"IStoreCart"},directives:[],fields:[{kind:"InputValueDefinition",description:{kind:"StringValue",value:"Order information, including `orderNumber` and `acceptedOffer`.",block:!0},name:{kind:"Name",value:"order"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"IStoreOrder"}}},directives:[]}]}],loc:{start:0,end:624}};me.loc.source={body:'"""\nShopping cart message.\n"""\ntype StoreCartMessage {\n """\n Shopping cart message text.\n """\n text: String!\n """\n Shopping cart message status, which can be `INFO`, `WARNING` OR `ERROR`.\n """\n status: StoreStatus!\n}\n\n"""\nShopping cart information.\n"""\ntype StoreCart {\n """\n Order information, including `orderNumber` and `acceptedOffer`.\n """\n order: StoreOrder!\n """\n List of shopping cart messages.\n """\n messages: [StoreCartMessage!]!\n}\n\n"""\nShopping cart identification input.\n"""\ninput IStoreCart {\n """\n Order information, including `orderNumber` and `acceptedOffer`.\n """\n order: IStoreOrder!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var pe={kind:"Document",definitions:[{kind:"EnumTypeDefinition",name:{kind:"Name",value:"StoreStatus"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"INFO"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"WARNING"},directives:[]},{kind:"EnumValueDefinition",name:{kind:"Name",value:"ERROR"},directives:[]}]}],loc:{start:0,end:46}};pe.loc.source={body:"enum StoreStatus {\n INFO\n WARNING\n ERROR\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var ke={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Properties that can be associated with products and products groups.",block:!0},name:{kind:"Name",value:"StorePropertyValue"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Property value.",block:!0},name:{kind:"Name",value:"value"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Property name.",block:!0},name:{kind:"Name",value:"name"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:197}};ke.loc.source={body:'"""\nProperties that can be associated with products and products groups.\n"""\ntype StorePropertyValue {\n """\n Property value.\n """\n value: String!\n """\n Property name.\n """\n name: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var ye={kind:"Document",definitions:[{kind:"ObjectTypeDefinition",description:{kind:"StringValue",value:"Client profile data.",block:!0},name:{kind:"Name",value:"StorePerson"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",description:{kind:"StringValue",value:"Client ID.",block:!0},name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Client email.",block:!0},name:{kind:"Name",value:"email"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Client first name.",block:!0},name:{kind:"Name",value:"givenName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"FieldDefinition",description:{kind:"StringValue",value:"Client last name.",block:!0},name:{kind:"Name",value:"familyName"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}]}],loc:{start:0,end:242}};ye.loc.source={body:'"""\nClient profile data.\n"""\ntype StorePerson {\n """\n Client ID.\n """\n id: String!\n """\n Client email.\n """\n email: String!\n """\n Client first name.\n """\n givenName: String!\n """\n Client last name.\n """\n familyName: String!\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};const ge=[se,ie,Y,X,Z,ee,ne,oe,de,ce,te,H,ue,W,le,re,J,ae,me,pe,ke,ye].map(l.print).join("\n"),ve={vtex:{getResolvers:e=>K,getContextFactory:e=>n=>(n.storage={channel:A.parse(e.channel)},n.clients=((e,n)=>({search:c(e,n),commerce:(({account:e,environment:n},i)=>{const t=`https://${e}.${n}.com.br`;return{catalog:{brand:{list:()=>s(t+"/api/catalog_system/pub/brand/list")},category:{tree:(e=3)=>s(`${t}/api/catalog_system/pub/category/tree/${e}`)},portal:{pagetype:e=>s(`${t}/api/catalog_system/pub/portal/pagetype/${e}`)}},checkout:{simulation:(e,{salesChannel:n}=i.storage.channel)=>{const a=new URLSearchParams({sc:n});return s(`${t}/api/checkout/pub/orderForms/simulation?${a.toString()}`,{...u,body:JSON.stringify(e)})},orderForm:({id:e,refreshOutdatedData:n=!0,channel:a=i.storage.channel})=>{const{salesChannel:r}=a,o=new URLSearchParams({refreshOutdatedData:n.toString(),sc:r});return s(`${t}/api/checkout/pub/orderForm/${e}?${o.toString()}`,u)},updateOrderFormItems:({id:e,orderItems:n,allowOutdatedData:a="paymentData",salesChannel:r=i.storage.channel.salesChannel})=>{const o=new URLSearchParams({allowOutdatedData:a,sc:r});return s(`${t}/api/checkout/pub/orderForm/${e}/items?${o}`,{...u,body:JSON.stringify({orderItems:n}),method:"PATCH"})},region:async({postalCode:e,country:n,salesChannel:i})=>s(`${t}/api/checkout/pub/regions/?postalCode=${e}&country=${n}&sc=${null!=i?i:""}`)},session:()=>s(t+"/api/sessions?items=profile.id,profile.email,profile.firstName,profile.lastName",{method:"POST",headers:{"content-type":"application/json",cookie:i.headers.cookie},body:"{}"})}})(e,n),sp:(({account:e},n)=>{const i=`https://sp.vtex.com/event-api/v1/${e}/event`;return{sendEvent:e=>s(i,{method:"POST",body:JSON.stringify({...e,agent:"@faststore/api",anonymous:k.anonymous(),session:k.session()}),headers:{"content-type":"application/json"}})}})(e)}))(e,n),n.loaders=((e,{clients:n})=>({skuLoader:((e,n)=>new r(async e=>{const i=e.map(e=>{const n=e.find(({key:e})=>"id"===e);if(!n)throw new y("Error while loading SKU. Needs to pass an id to selected facets");return n.value}),{products:t}=await n.search.products({query:"sku:"+i.join(";"),page:0,count:i.length}),a=t.reduce((e,n)=>{for(const i of n.items)e[i.itemId]=v(i,n);return e},{}),r=i.map(e=>a[e]),o=r.filter(e=>!e);if(o.length>0)throw new Error("Search API did not return the following skus: "+o.join(","));return r},{maxBatchSize:99}))(0,n),simulationLoader:((e,n)=>{const i=o(1),t=async e=>{const i=[...e.flat()],t=await n.commerce.checkout.simulation({items:i}),a=t.items.reduce((e,n)=>{const i=n.requestIndex;return"number"==typeof i&&i<e.length&&(e[i]=n),e},Array(i.length).fill(null)),r=e.reduce((e,n)=>[...e,n.length+e[e.length-1]],[0]);return e.map((e,n)=>({...t,items:a.slice(r[n],r[n+1]).filter(e=>Boolean(e))}))};return new r(async e=>i(t,e),{maxBatchSize:50})})(0,n),collectionLoader:((e,n)=>{const i=o(20);return new r(async e=>Promise.all(e.map(e=>i(async()=>{const i=await n.commerce.catalog.portal.pagetype(e);if(N(i))return i;throw new g(`Catalog returned ${i.pageType} for slug: ${e}. This usually happens when there is more than one category with the same name in the same category tree level.`)}))),{batch:!1})})(0,n)}))(0,n),n)}},fe=e=>ve[e.platform].getResolvers(e),Ne=async e=>t.makeExecutableSchema({resolvers:fe(e),typeDefs:ge}),Se={platform:"vtex",account:"storeframework",environment:"vtexcommercestable",channel:'{"salesChannel":"1"}'},he=(e=>ve[Se.platform].getContextFactory(Se))(),Te=n();Te.use(n.json()),Te.use("/graphql",i.graphqlHTTP(async()=>({schema:await Ne(Se),context:he({}),graphiql:!0,pretty:!0}))),Te.listen("4000"),console.log("🚀 GraphQL server ready at http://localhost:4000/graphql");
|
|
2
2
|
//# sourceMappingURL=api.cjs.production.min.js.map
|