{"version":3,"sources":["webpack:///./src/assets/icons/trade.svg","webpack:///./src/services/ad.js","webpack:///./src/components/ui/snippet.vue?6955","webpack:///./src/services/google-map.js","webpack:///./src/assets/icons/donation.svg","webpack:///./src/assets/icons/sale.svg","webpack:///./src/components/ad/snippet.vue","webpack:///src/components/ad/snippet.vue","webpack:///./src/components/ad/snippet.vue?b0cb","webpack:///./src/components/ad/snippet.vue?fcfe","webpack:///./src/services/file-upload.js","webpack:///./src/components/ui/snippet.vue","webpack:///src/components/ui/snippet.vue","webpack:///./src/components/ui/snippet.vue?0d1f","webpack:///./src/components/ui/snippet.vue?8130","webpack:///./src/components/ad/snippet.vue?8f23","webpack:///./src/assets/icons/rent.svg","webpack:///./src/assets/icons/invisible.svg","webpack:///./src/services/ad.graphql"],"names":["module","exports","IMAGES_FOLDER","createAd","_x","_createAd","apply","arguments","_asyncToGenerator","input","galleryItems","undefined","length","value","GetGalleryItems","address","getAddressFromGooglePlace","mutationInput","title","category","isAvailableForRent","isAvailableForSale","isAvailableForDonation","isAvailableForTrade","language","CONTENT_LANG_FR","showAddress","rentPriceToBeDetermined","rentPrice","salePriceToBeDetermined","salePrice","rentPriceDescription","salePriceDescription","donationDescription","tradeDescription","organization","addMaybeValue","result","Apollo","instance","defaultClient","mutate","mutation","CreateAd","variables","AuthentificationService","renewToken","updateAd","_x2","_updateAd","updateAdTranslation","adId","Object","keys","UpdateAd","publishAd","_x3","_publishAd","PublishAd","unpublishAd","_x4","_unpublishAd","UnpublishAd","transferAd","_x5","_transferAd","TransferAd","_x6","_updateAdTranslation","UpdateAdTranslation","_x7","_GetGalleryItems","images","i","fileId","file","name","indexOf","uploadImage","substring","push","src","alt","_getAddressFromGooglePlace","place","reverseGeocodeResult","reverseGeocode","latitude","longitude","raw","JSON","stringify","locality","postal_code","postalCode","route","street_number","streetNumber","neighborhood","sublocality","_reverseGeocode","geocoder","window","google","maps","Geocoder","latlng","lat","parseFloat","lng","geocoded","geocode","location","results","findComponent","type","types","find","x","components","address_components","j","component","long_name","render","_vm","this","_c","_self","staticClass","class","concat","sectionWidth","attrs","snippetIsLink","hideSnippetActions","noWrapTitle","smallTitle","image","$consts","urls","URL_AD_DETAIL","params","id","$t","isAdminOnly","scopedSlots","_u","priceDetails","key","fn","require","_v","_s","_e","proxy","canTransfer","URL_AD_TRANSFER","showManageBtn","isPublished","on","conversation","haveContract","URL_CONTRACT_DETAIL","contractId","staticRenderFns","UiSnippet","props","String","required","titleTag","default","Boolean","conversationId","canCreateContract","isAccountOnboardingComplete","showAdDetailBtn","computed","contract","methods","_unpublishAd2","_publishAd2","_uploadImage","Authentification","token","getUserToken","data","FormData","append","response","fetch","VUE_APP_ROOT_API","method","headers","Authorization","body","status","json","Error","i18n","t","uploadFile","_uploadFile","tag","mainRoute","imageSrc","imageAlt","_t","suptitle","hideActions","mainRouteLabel","doc","loc","source","collectFragmentReferences","node","refs","kind","add","selectionSet","selections","forEach","selection","variableDefinitions","def","definitions","definitionRefs","findOperation","element","oneQuery","operationName","newDoc","hasOwnProperty","opRefs","Set","allRefs","newRefs","refName","size","prevRefs","has","childRefs","childRef","op"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,0B,0TCW3C,MAAMC,EAAgB,WAEf,SAAeC,EAAQC,GAAA,OAAAC,EAAAC,MAAC,KAADC,WA4D7B,SAAAF,IAAA,OAAAA,EAAAG,gBA5DM,UAAwBC,GAC7B,IAAIC,OAAeC,EACfF,EAAMC,aAAaE,OAAS,IAC9BF,EAAe,CAAEG,YAAaC,EAAgBL,EAAMC,gBAGtD,IAAIK,QAAgBC,eAA0BP,EAAMM,SAEhDE,EAAgB,CAClBC,MAAOT,EAAMS,MACbC,SAAUV,EAAMU,SAChBC,mBAAwD,mBAA7BX,EAAMW,oBAAmCX,EAAMW,mBAC1EC,mBAAwD,mBAA7BZ,EAAMY,oBAAmCZ,EAAMY,mBAC1EC,uBAAgE,mBAAjCb,EAAMa,wBAAuCb,EAAMa,uBAClFC,oBAA0D,mBAA9Bd,E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C,EAASlB,EAAKmB,GAErB,IAAIC,EAAS,CACXd,KAAMN,EAAIM,KACVQ,YAAa,CAACE,EAAchB,EAAKmB,KAE/BnB,EAAIqB,eAAe,SACrBD,EAAOnB,IAAMD,EAAIC,KAKnB,IAAIqB,EAASP,EAAeI,IAAkB,IAAII,IAC9CC,EAAU,IAAID,IACdE,EAAU,IAAIF,IAGlBD,EAAOZ,SAAQ,SAASgB,GACtBD,EAAQlB,IAAImB,MAGd,MAAOD,EAAQE,KAAO,EAAG,CACvB,IAAIC,EAAWH,EACfA,EAAU,IAAIF,IAEdK,EAASlB,SAAQ,SAASgB,GACxB,IAAKF,EAAQK,IAAIH,GAAU,CACzBF,EAAQjB,IAAImB,GACZ,IAAII,EAAYf,EAAeW,IAAY,IAAIH,IAC/CO,EAAUpB,SAAQ,SAASqB,GACzBN,EAAQlB,IAAIwB,UAapB,OAPAP,EAAQd,SAAQ,SAASgB,GACvB,IAAIM,EAAKhB,EAAchB,EAAK0B,GACxBM,GACFZ,EAAON,YAAYjJ,KAAKmK,MAIrBZ,GA9DT,WACEpB,EAAIc,YAAYJ,SAAQ,SAASG,GAC/B,GAAIA,EAAIpJ,KAAM,CACZ,IAAI4I,EAAO,IAAIkB,IACfpB,EAA0BU,EAAKR,GAC/BU,EAAeF,EAAIpJ,KAAK/D,OAAS2M,OALvC,GAiEAxN,EAAOC,QAAUkN,EAEbnN,EAAOC,QAAQ,YAAcoO,EAASlB,EAAK,YAE3CnN,EAAOC,QAAQ,YAAcoO,EAASlB,EAAK,YAE3CnN,EAAOC,QAAQ,uBAAyBoO,EAASlB,EAAK,uBAEtDnN,EAAOC,QAAQ,aAAeoO,EAASlB,EAAK,aAE5CnN,EAAOC,QAAQ,eAAiBoO,EAASlB,EAAK,eAE9CnN,EAAOC,QAAQ,cAAgBoO,EAASlB,EAAK","file":"js/chunk-03d66300.d6cbe388.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/trade.f3d10912.svg\";","import Apollo from \"@/graphql/vue-apollo\";\r\nimport { CreateAd, UpdateAd, UpdateAdTranslation, PublishAd, UnpublishAd, TransferAd } from \"./ad.graphql\";\r\n\r\nimport { CONTENT_LANG_FR } from \"@/consts/langs\";\r\n\r\nimport { addMaybeValue } from \"@/helpers/graphql\";\r\n\r\nimport { getAddressFromGooglePlace } from \"@/services/google-map\";\r\nimport AuthentificationService from \"./authentification\";\r\nimport { uploadImage } from \"./file-upload\";\r\n\r\nconst IMAGES_FOLDER = \"/images/\";\r\n\r\nexport async function createAd(input) {\r\n let galleryItems = undefined;\r\n if (input.galleryItems.length > 0) {\r\n galleryItems = { value: await GetGalleryItems(input.galleryItems) };\r\n }\r\n\r\n let address = await getAddressFromGooglePlace(input.address);\r\n\r\n let mutationInput = {\r\n title: input.title,\r\n category: input.category,\r\n isAvailableForRent: typeof input.isAvailableForRent === \"boolean\" ? input.isAvailableForRent : false,\r\n isAvailableForSale: typeof input.isAvailableForSale === \"boolean\" ? input.isAvailableForSale : false,\r\n isAvailableForDonation: typeof input.isAvailableForDonation === \"boolean\" ? input.isAvailableForDonation : false,\r\n isAvailableForTrade: typeof input.isAvailableForTrade === \"boolean\" ? input.isAvailableForTrade : false,\r\n language: CONTENT_LANG_FR,\r\n galleryItems,\r\n address,\r\n showAddress: typeof input.showAddress === \"boolean\" ? input.showAddress : false,\r\n rentPriceToBeDetermined: typeof input.rentPriceToBeDetermined === \"boolean\" ? input.rentPriceToBeDetermined : false,\r\n rentPrice: input.rentPrice,\r\n salePriceToBeDetermined: typeof input.salePriceToBeDetermined === \"boolean\" ? input.salePriceToBeDetermined : false,\r\n salePrice: input.salePrice,\r\n rentPriceDescription: input.rentPriceDescription,\r\n salePriceDescription: input.salePriceDescription,\r\n donationDescription: input.donationDescription,\r\n tradeDescription: input.tradeDescription,\r\n organization: input.organization\r\n };\r\n\r\n addMaybeValue(input, mutationInput, \"rentPriceRange\");\r\n addMaybeValue(input, mutationInput, \"salePriceRange\");\r\n addMaybeValue(input, mutationInput, \"conditions\");\r\n addMaybeValue(input, mutationInput, \"description\");\r\n addMaybeValue(input, mutationInput, \"surfaceSize\");\r\n addMaybeValue(input, mutationInput, \"equipment\");\r\n addMaybeValue(input, mutationInput, \"surfaceDescription\");\r\n addMaybeValue(input, mutationInput, \"professionalKitchenEquipment\");\r\n addMaybeValue(input, mutationInput, \"professionalKitchenEquipmentOther\");\r\n addMaybeValue(input, mutationInput, \"deliveryTruckType\");\r\n addMaybeValue(input, mutationInput, \"deliveryTruckTypeOther\");\r\n addMaybeValue(input, mutationInput, \"dayAvailability\");\r\n addMaybeValue(input, mutationInput, \"eveningAvailability\");\r\n addMaybeValue(input, mutationInput, \"availabilityRestriction\");\r\n addMaybeValue(input, mutationInput, \"refrigerated\");\r\n addMaybeValue(input, mutationInput, \"canSharedRoad\");\r\n addMaybeValue(input, mutationInput, \"canHaveDriver\");\r\n addMaybeValue(input, mutationInput, \"certification\");\r\n addMaybeValue(input, mutationInput, \"allergen\");\r\n\r\n let result = await Apollo.instance.defaultClient.mutate({\r\n mutation: CreateAd,\r\n variables: {\r\n input: mutationInput\r\n }\r\n });\r\n\r\n // Renew the token since we want the new ad in our\r\n await AuthentificationService.renewToken();\r\n return result;\r\n}\r\n\r\nexport async function updateAd(input) {\r\n if (\r\n \"title\" in input ||\r\n \"description\" in input ||\r\n \"rentPriceDescription\" in input ||\r\n \"salePriceDescription\" in input ||\r\n \"donationDescription\" in input ||\r\n \"tradeDescription\" in input ||\r\n \"conditions\" in input ||\r\n \"professionalKitchenEquipmentOther\" in input ||\r\n \"deliveryTruckTypeOther\" in input ||\r\n \"equipment\" in input ||\r\n \"surfaceSize\" in input ||\r\n \"surfaceDescription\" in input\r\n ) {\r\n await updateAdTranslation(input);\r\n }\r\n\r\n let mutationInput = {\r\n adId: input.adId\r\n };\r\n\r\n addMaybeValue(input, mutationInput, \"category\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForRent\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForSale\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForDonation\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForTrade\");\r\n await addMaybeValue(input, mutationInput, \"address\", getAddressFromGooglePlace);\r\n await addMaybeValue(input, mutationInput, \"galleryItems\", GetGalleryItems);\r\n addMaybeValue(input, mutationInput, \"rentPrice\");\r\n addMaybeValue(input, mutationInput, \"salePrice\");\r\n addMaybeValue(input, mutationInput, \"showAddress\");\r\n addMaybeValue(input, mutationInput, \"rentPriceToBeDetermined\");\r\n addMaybeValue(input, mutationInput, \"salePriceToBeDetermined\");\r\n addMaybeValue(input, mutationInput, \"rentPriceRange\");\r\n addMaybeValue(input, mutationInput, \"salePriceRange\");\r\n addMaybeValue(input, mutationInput, \"organization\");\r\n addMaybeValue(input, mutationInput, \"professionalKitchenEquipment\");\r\n addMaybeValue(input, mutationInput, \"deliveryTruckType\");\r\n addMaybeValue(input, mutationInput, \"dayAvailability\");\r\n addMaybeValue(input, mutationInput, \"eveningAvailability\");\r\n addMaybeValue(input, mutationInput, \"availabilityRestriction\");\r\n addMaybeValue(input, mutationInput, \"refrigerated\");\r\n addMaybeValue(input, mutationInput, \"canSharedRoad\");\r\n addMaybeValue(input, mutationInput, \"canHaveDriver\");\r\n addMaybeValue(input, mutationInput, \"certification\");\r\n addMaybeValue(input, mutationInput, \"allergen\");\r\n\r\n if (Object.keys(mutationInput).length > 1) {\r\n let result = await Apollo.instance.defaultClient.mutate({\r\n mutation: UpdateAd,\r\n variables: {\r\n input: mutationInput\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport async function publishAd(adId) {\r\n let mutationInput = {\r\n adId\r\n };\r\n\r\n let result = await Apollo.instance.defaultClient.mutate({\r\n mutation: PublishAd,\r\n variables: {\r\n input: mutationInput\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nexport async function unpublishAd(adId) {\r\n let mutationInput = {\r\n adId\r\n };\r\n\r\n let result = await Apollo.instance.defaultClient.mutate({\r\n mutation: UnpublishAd,\r\n variables: {\r\n input: mutationInput\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nexport async function transferAd(input) {\r\n const result = await Apollo.instance.defaultClient.mutate({\r\n mutation: TransferAd,\r\n variables: {\r\n input\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nasync function updateAdTranslation(input) {\r\n let mutationInput = {\r\n adId: input.adId,\r\n language: CONTENT_LANG_FR\r\n };\r\n\r\n addMaybeValue(input, mutationInput, \"description\");\r\n addMaybeValue(input, mutationInput, \"title\");\r\n addMaybeValue(input, mutationInput, \"rentPriceDescription\");\r\n addMaybeValue(input, mutationInput, \"salePriceDescription\");\r\n addMaybeValue(input, mutationInput, \"donationDescription\");\r\n addMaybeValue(input, mutationInput, \"tradeDescription\");\r\n addMaybeValue(input, mutationInput, \"conditions\");\r\n addMaybeValue(input, mutationInput, \"rentPriceToBeDetermined\");\r\n addMaybeValue(input, mutationInput, \"salePriceToBeDetermined\");\r\n addMaybeValue(input, mutationInput, \"equipment\");\r\n addMaybeValue(input, mutationInput, \"surfaceSize\");\r\n addMaybeValue(input, mutationInput, \"surfaceDescription\");\r\n addMaybeValue(input, mutationInput, \"professionalKitchenEquipmentOther\");\r\n addMaybeValue(input, mutationInput, \"deliveryTruckTypeOther\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForRent\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForSale\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForDonation\");\r\n addMaybeValue(input, mutationInput, \"isAvailableForTrade\");\r\n\r\n let result = await Apollo.instance.defaultClient.mutate({\r\n mutation: UpdateAdTranslation,\r\n variables: {\r\n input: mutationInput\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nasync function GetGalleryItems(images) {\r\n let galleryItems = [];\r\n\r\n for (let i = 0; i < images.length; i++) {\r\n let fileId = \"\";\r\n let file = null;\r\n file = images[i].file;\r\n if (file.name.indexOf(IMAGES_FOLDER) === -1) {\r\n fileId = await uploadImage(file);\r\n } else {\r\n // Trouver le nom du fichier dans l'url de la source déjà existante\r\n fileId = file.name.substring(file.name.indexOf(IMAGES_FOLDER) + IMAGES_FOLDER.length);\r\n }\r\n galleryItems.push({ src: fileId, alt: images[i].alt });\r\n }\r\n\r\n return galleryItems;\r\n}\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=style&index=0&id=c4e79f5a&prod&lang=scss\"","export async function getAddressFromGooglePlace(place) {\r\n let reverseGeocodeResult = await reverseGeocode(place.latitude, place.longitude);\r\n let address = { raw: JSON.stringify(place), latitude: place.latitude, longitude: place.longitude };\r\n\r\n if (place.locality !== undefined) {\r\n address.locality = { value: place.locality };\r\n }\r\n\r\n if (place.postal_code !== undefined) {\r\n address.postalCode = { value: place.postal_code };\r\n }\r\n\r\n if (place.route !== undefined) {\r\n address.route = { value: place.route };\r\n }\r\n\r\n if (place.street_number !== undefined) {\r\n address.streetNumber = { value: place.street_number };\r\n }\r\n\r\n if (reverseGeocodeResult.neighborhood !== undefined) {\r\n address.neighborhood = { value: reverseGeocodeResult.neighborhood };\r\n }\r\n\r\n if (reverseGeocodeResult.sublocality !== undefined) {\r\n address.sublocality = { value: reverseGeocodeResult.sublocality };\r\n }\r\n\r\n return address;\r\n}\r\n\r\nasync function reverseGeocode(latitude, longitude) {\r\n const geocoder = new window.google.maps.Geocoder();\r\n const latlng = {\r\n lat: parseFloat(latitude),\r\n lng: parseFloat(longitude)\r\n };\r\n\r\n let neighborhood = \"\";\r\n let sublocality = \"\";\r\n\r\n let geocoded = await geocoder.geocode({ location: latlng });\r\n\r\n for (let i = 0; i < geocoded.results.length; i++) {\r\n let result = geocoded.results[i];\r\n\r\n if (neighborhood === \"\") {\r\n neighborhood = findComponent(result, \"neighborhood\");\r\n }\r\n if (sublocality === \"\") {\r\n sublocality = findComponent(result, \"sublocality\");\r\n }\r\n }\r\n\r\n return { neighborhood, sublocality };\r\n}\r\n\r\nfunction findComponent(result, type) {\r\n if (result.types.find((x) => x === type)) {\r\n let components = result.address_components;\r\n for (let j = 0; j < components.length; j++) {\r\n let component = components[j];\r\n if (component.types.find((x) => x === type)) {\r\n return component.long_name;\r\n }\r\n }\r\n }\r\n return \"\";\r\n}\r\n","module.exports = __webpack_public_path__ + \"img/donation.2898a04c.svg\";","module.exports = __webpack_public_path__ + \"img/sale.8afbb8d0.svg\";","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"equipment-snippet focus-overflow w-100\"},[_c('div',{staticClass:\"section section--full-width-mobile\",class:`section--${_vm.sectionWidth}`},[_c('UiSnippet',{attrs:{\"snippetIsLink\":_vm.snippetIsLink,\"hideActions\":_vm.hideSnippetActions,\"title\":_vm.title,\"noWrapTitle\":_vm.noWrapTitle,\"smallTitle\":_vm.smallTitle,\"suptitle\":_vm.organization,\"imageSrc\":_vm.image.src,\"imageAlt\":_vm.image.alt,\"mainRoute\":{ name: _vm.$consts.urls.URL_AD_DETAIL, params: { id: this.id } },\"mainRouteLabel\":_vm.$t('btn.ad-detail'),\"is-admin-only\":_vm.isAdminOnly},scopedSlots:_vm._u([(_vm.priceDetails)?{key:\"description\",fn:function(){return [_c('ul',{staticClass:\"equipment-snippet__types\"},[(_vm.priceDetails.isAvailableForRent)?_c('li',{staticClass:\"equipment-snippet__types-item\"},[_c('b-img',{attrs:{\"src\":require('@/assets/icons/rent.svg'),\"alt\":\"\",\"height\":\"16\",\"block\":\"\"}}),_c('div',{staticClass:\"equipment-snippet__types-text\"},[_c('div',{staticClass:\"equipment-snippet__types-title\"},[_vm._v(_vm._s(_vm.$t(\"label.forRent\")))]),_c('div',{staticClass:\"equipment-snippet__types-price\",class:{ 'equipment-snippet__types-price--sm': _vm.priceDetails.rentPriceToBeDetermined }},[_vm._v(\" \"+_vm._s(_vm.priceDetails.rentPrice)+\" \")])])],1):_vm._e(),(_vm.priceDetails.isAvailableForSale)?_c('li',{staticClass:\"equipment-snippet__types-item\"},[_c('b-img',{attrs:{\"src\":require('@/assets/icons/sale.svg'),\"alt\":\"\",\"height\":\"16\",\"block\":\"\"}}),_c('div',{staticClass:\"equipment-snippet__types-text\"},[_c('div',{staticClass:\"equipment-snippet__types-title\"},[_vm._v(_vm._s(_vm.$t(\"label.forSale\")))]),_c('div',{staticClass:\"equipment-snippet__types-price\",class:{ 'equipment-snippet__types-price--sm': _vm.priceDetails.salePriceToBeDetermined }},[_vm._v(\" \"+_vm._s(_vm.priceDetails.salePrice)+\" \")])])],1):_vm._e(),(_vm.priceDetails.isAvailableForTrade)?_c('li',{staticClass:\"equipment-snippet__types-item\"},[_c('b-img',{attrs:{\"src\":require('@/assets/icons/trade.svg'),\"alt\":\"\",\"height\":\"16\",\"block\":\"\"}}),_c('div',{staticClass:\"equipment-snippet__types-text\"},[_c('div',{staticClass:\"equipment-snippet__types-title\"},[_vm._v(_vm._s(_vm.$t(\"label.forTrade\")))])])],1):_vm._e(),(_vm.priceDetails.isAvailableForDonation)?_c('li',{staticClass:\"equipment-snippet__types-item\"},[_c('b-img',{attrs:{\"src\":require('@/assets/icons/donation.svg'),\"alt\":\"\",\"height\":\"16\",\"block\":\"\"}}),_c('div',{staticClass:\"equipment-snippet__types-text\"},[_c('div',{staticClass:\"equipment-snippet__types-title\"},[_vm._v(_vm._s(_vm.$t(\"label.forDonation\")))])])],1):_vm._e()])]},proxy:true}:null,{key:\"actions\",fn:function(){return [(_vm.canTransfer)?_c('b-button',{staticClass:\"mt-2 ml-2\",attrs:{\"to\":{ name: _vm.$consts.urls.URL_AD_TRANSFER, params: { id: _vm.id } },\"variant\":\"outline-admin\",\"size\":\"sm\"}},[_c('b-icon',{staticClass:\"mr-1\",attrs:{\"icon\":\"arrow-right\",\"aria-hidden\":\"true\"}}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.transfer\"))+\" \")],1):_vm._e(),(_vm.showManageBtn)?[(_vm.isPublished)?_c('b-button',{staticClass:\"mt-2 ml-2\",attrs:{\"variant\":\"outline-primary\",\"size\":\"sm\"},on:{\"click\":_vm.unpublishAd}},[_c('b-icon',{staticClass:\"mr-1\",attrs:{\"icon\":\"eye-slash-fill\",\"aria-hidden\":\"true\"}}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.unpublish\"))+\" \")],1):_c('b-button',{staticClass:\"mt-2 ml-2\",attrs:{\"variant\":\"outline-primary\",\"size\":\"sm\"},on:{\"click\":_vm.publishAd}},[_c('b-icon',{staticClass:\"mr-1\",attrs:{\"icon\":\"eye-fill\",\"aria-hidden\":\"true\"}}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.publish\"))+\" \")],1)]:_vm._e(),(_vm.conversation)?_c('div',[(_vm.haveContract)?_c('b-button',{staticClass:\"mt-2\",attrs:{\"variant\":\"primary\",\"size\":\"sm\",\"to\":{ name: _vm.$consts.urls.URL_CONTRACT_DETAIL, params: { id: _vm.contractId } }}},[_c('b-icon',{staticClass:\"mr-1\",attrs:{\"icon\":\"file-earmark-check\",\"aria-hidden\":\"true\"}}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.contract-detail\"))+\" \")],1):_vm._e()],1):_vm._e()]},proxy:true}],null,true)})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ $t(\"label.forRent\") }}\r\n \r\n {{ priceDetails.rentPrice }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ $t(\"label.forSale\") }}\r\n \r\n {{ priceDetails.salePrice }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ $t(\"label.forTrade\") }}\r\n \r\n \r\n \r\n \r\n \r\n {{ $t(\"label.forDonation\") }}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {{ $t(\"btn.transfer\") }}\r\n \r\n \r\n \r\n \r\n {{ $t(\"btn.unpublish\") }}\r\n \r\n \r\n \r\n {{ $t(\"btn.publish\") }}\r\n \r\n \r\n \r\n \r\n \r\n {{ $t(\"btn.contract-detail\") }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./snippet.vue?vue&type=template&id=2c3613fe\"\nimport script from \"./snippet.vue?vue&type=script&lang=js\"\nexport * from \"./snippet.vue?vue&type=script&lang=js\"\nimport style0 from \"./snippet.vue?vue&type=style&index=0&id=2c3613fe&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Authentification from \"./authentification\";\r\nimport { VUE_APP_ROOT_API } from \"@/helpers/env\";\r\nimport i18n from \"@/helpers/i18n\";\r\n\r\nexport async function uploadImage(file) {\r\n // Make sure auth token will be valid\r\n await Authentification.renewToken();\r\n\r\n const token = Authentification.getUserToken();\r\n const data = new FormData();\r\n data.append(\"file\", file);\r\n\r\n const response = await fetch(`${VUE_APP_ROOT_API}/upload/image`, {\r\n method: \"post\",\r\n headers: {\r\n Authorization: `Bearer ${token}`\r\n },\r\n body: data\r\n });\r\n\r\n if (response.status === 200) {\r\n const result = await response.json();\r\n return result.fileId;\r\n } else {\r\n throw new Error(i18n.t(\"error.image-upload\"));\r\n }\r\n}\r\n\r\nexport async function uploadFile(file) {\r\n // Make sure auth token will be valid\r\n await Authentification.renewToken();\r\n\r\n const token = Authentification.getUserToken();\r\n const data = new FormData();\r\n data.append(\"file\", file);\r\n\r\n const response = await fetch(`${VUE_APP_ROOT_API}/upload/file`, {\r\n method: \"post\",\r\n headers: {\r\n Authorization: `Bearer ${token}`\r\n },\r\n body: data\r\n });\r\n\r\n if (response.status === 200) {\r\n const result = await response.json();\r\n return result.fileId;\r\n } else {\r\n throw new Error(i18n.t(\"error.file-upload\"));\r\n }\r\n}","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.snippetIsLink ? 'RouterLink' : 'div',{tag:\"component\",staticClass:\"ui-snippet\",class:{ 'ui-snippet--link': _vm.snippetIsLink },attrs:{\"to\":_vm.mainRoute}},[(_vm.imageSrc)?_c('div',{staticClass:\"ui-snippet__img-container\"},[_c('img',{staticClass:\"ui-snippet__img\",attrs:{\"src\":`${_vm.imageSrc}?mode=crop&width=200&height=200`,\"alt\":_vm.imageAlt ? _vm.imageAlt : ''}}),(_vm.isAdminOnly)?_c('div',{staticClass:\"ui-snippet__overlay-admin\"}):_vm._e(),(_vm.isAdminOnly)?_c('b-img',{staticClass:\"ui-snippet__icon-invisible\",attrs:{\"src\":require('@/assets/icons/invisible.svg'),\"alt\":\"\",\"height\":\"30\",\"block\":\"\"}}):_vm._e()],1):_vm._e(),_c('div',{staticClass:\"ui-snippet__content\"},[_vm._t(\"suptitle\",function(){return [(_vm.suptitle)?_c('p',{staticClass:\"my-0 text-uppercase font-weight-bold letter-spacing-wide smaller\"},[_vm._v(\" \"+_vm._s(_vm.suptitle)+\" \")]):_vm._e()]}),_vm._t(\"title\",function(){return [_c(_vm.titleTag,{tag:\"component\",staticClass:\"ui-snippet__title h6\",class:[{ 'ui-snippet__title--ellipse': _vm.noWrapTitle }, _vm.smallTitle ? 'h6 ui-snippet__title--small' : 'h2']},[_vm._v(\" \"+_vm._s(_vm.title)+\" \")])]}),_vm._t(\"description\"),(!_vm.hideActions)?_c('div',[(!_vm.snippetIsLink)?_c('b-button',{staticClass:\"mt-2\",attrs:{\"variant\":\"primary\",\"size\":\"sm\",\"to\":_vm.mainRoute}},[_vm._v(\" \"+_vm._s(_vm.mainRouteLabel)+\" \")]):_c('span',{staticClass:\"btn mt-2 btn-primary btn-sm\"},[_vm._v(_vm._s(_vm.mainRouteLabel))]),(!_vm.snippetIsLink)?_vm._t(\"actions\"):_vm._e()],2):_vm._e()],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {{ suptitle }}\r\n \r\n \r\n\r\n \r\n \r\n {{ title }}\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n {{ mainRouteLabel }}\r\n \r\n {{ mainRouteLabel }}\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./snippet.vue?vue&type=template&id=c4e79f5a\"\nimport script from \"./snippet.vue?vue&type=script&lang=js\"\nexport * from \"./snippet.vue?vue&type=script&lang=js\"\nimport style0 from \"./snippet.vue?vue&type=style&index=0&id=c4e79f5a&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./snippet.vue?vue&type=style&index=0&id=2c3613fe&prod&lang=scss\"","module.exports = __webpack_public_path__ + \"img/rent.74804c83.svg\";","module.exports = __webpack_public_path__ + \"img/invisible.e683c175.svg\";","\n var doc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"CreateAd\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"CreateAdInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createAd\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"ad\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]}]}}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"UpdateAd\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"UpdateAdInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updateAd\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"ad\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]}]}}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"UpdateAdTranslation\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"UpdateAdTranslationInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"updateAdTranslation\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"adTranslation\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]}]}}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"PublishAd\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"PublishAdInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"publishAd\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"ad\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"isPublish\"},\"arguments\":[],\"directives\":[]}]}}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"UnpublishAd\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"UnpublishAdInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"unpublishAd\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"ad\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"isPublish\"},\"arguments\":[],\"directives\":[]}]}}]}}]}},{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"TransferAd\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"TransferAdInput\"}}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"transferAd\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"ad\"},\"arguments\":[],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"isAdminOnly\"},\"arguments\":[],\"directives\":[]}]}}]}}]}}],\"loc\":{\"start\":0,\"end\":779}};\n doc.loc.source = {\"body\":\"mutation CreateAd($input: CreateAdInput!) {\\r\\n createAd(input: $input) {\\r\\n ad {\\r\\n id\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\nmutation UpdateAd($input: UpdateAdInput!) {\\r\\n updateAd(input: $input) {\\r\\n ad {\\r\\n id\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\nmutation UpdateAdTranslation($input: UpdateAdTranslationInput!) {\\r\\n updateAdTranslation(input: $input) {\\r\\n adTranslation {\\r\\n id\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\nmutation PublishAd($input: PublishAdInput!) {\\r\\n publishAd(input: $input) {\\r\\n ad {\\r\\n id\\r\\n isPublish\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\nmutation UnpublishAd($input: UnpublishAdInput!) {\\r\\n unpublishAd(input: $input) {\\r\\n ad {\\r\\n id\\r\\n isPublish\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\nmutation TransferAd($input: TransferAdInput!) {\\r\\n transferAd(input: $input) {\\r\\n ad {\\r\\n id\\r\\n isAdminOnly\\r\\n }\\r\\n }\\r\\n}\\r\\n\",\"name\":\"GraphQL request\",\"locationOffset\":{\"line\":1,\"column\":1}};\n \r\n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \r\n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"CreateAd\"] = oneQuery(doc, \"CreateAd\");\n \n module.exports[\"UpdateAd\"] = oneQuery(doc, \"UpdateAd\");\n \n module.exports[\"UpdateAdTranslation\"] = oneQuery(doc, \"UpdateAdTranslation\");\n \n module.exports[\"PublishAd\"] = oneQuery(doc, \"PublishAd\");\n \n module.exports[\"UnpublishAd\"] = oneQuery(doc, \"UnpublishAd\");\n \n module.exports[\"TransferAd\"] = oneQuery(doc, \"TransferAd\");\n \r\n"],"sourceRoot":""}
\r\n {{ suptitle }}\r\n