{ "version": 3, "sources": ["src/app/shared/services/products/graphql/random-products-page.gql.service.ts"], "sourcesContent": ["import { Query, gql } from 'apollo-angular';\r\nimport { Injectable } from '@angular/core';\r\nimport { IPage } from '@collections/common/interfaces';\r\nimport { IProduct } from '@collections/products/interfaces/product.interface';\r\nimport { productsPageFragment } from './fragments/products-page.fragment';\r\n\r\nexport const DEFAULT_RANDOM_SEED = 5;\r\n\r\nexport interface RandomProductsPageResponse {\r\n randomProductsPage: IPage;\r\n}\r\n\r\n@Injectable()\r\nexport class RandomProductsPageGQL extends Query {\r\n document = gql`\r\n query getRandomProductsPage(\r\n $lang: String!, \r\n $first: Int, \r\n $after: String, \r\n $category: String!, \r\n $seed: Int, \r\n $includeCompany: Boolean = true) {\r\n randomProductsPage(\r\n lang: $lang, \r\n first: $first, \r\n after: $after, \r\n category: $category, \r\n seed: $seed) {\r\n ...productsPage\r\n }\r\n }\r\n ${productsPageFragment}\r\n `;\r\n\r\n getRandomSeed(): number {\r\n return Math.floor(Math.random() * (16 - 11) + 11);\r\n }\r\n}\r\n"], "mappings": "wIAMO,IAAMA,EAAsB,EAOtBC,GAAsB,IAAA,CAA7B,IAAOA,EAAP,MAAOA,UAA8BC,CAAiC,CAD5EC,aAAA,qBAEE,KAAAC,SAAWC;;;;;;;;;;;;;;;;;IAiBTC,CAAoB;IAGtBC,eAAa,CACX,OAAOC,KAAKC,MAAMD,KAAKE,OAAM,EAAM,EAAW,EAAE,CAClD,6DAvBWT,CAAqB,IAAAU,GAArBV,CAAqB,CAAA,CAAA,GAAA,wBAArBA,EAAqBW,QAArBX,EAAqBY,SAAA,CAAA,EAA5B,IAAOZ,EAAPa,SAAOb,CAAsB,GAAA", "names": ["DEFAULT_RANDOM_SEED", "RandomProductsPageGQL", "Query", "constructor", "document", "gql", "productsPageFragment", "getRandomSeed", "Math", "floor", "random", "t", "factory", "\u0275fac", "_RandomProductsPageGQL"] }