text: pbjsChunk([91],{155:function(e,r,a){a(156),e.exports=a(157)},156:function(e,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.spec=void 0;var s=(function(e){{if(e&&e.__esModule)return e;var r={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r.default=e,r}})(a(0)),i=a(1);var n=360,o={noAuid:"Bid from response has no auid parameter - ",noAdm:"Bid from response has no adm parameter - ",noBid:"Array of bid objects is empty",noPlacementCode:"Can't find in requested bids the bid with auid - ",emptyUids:"Uids should be not empty",emptySeatbid:"Seatbid array from response has empty item",emptyResponse:"Response is empty",hasEmptySeatbidArray:"Response has empty seatbid array",hasNoArrayOfBids:"Seatbid from response has no array of bid objects - "},t=r.spec={code:"danmarket",aliases:["DANMarketplace","DAN_Marketplace","danmarketplace"],isBidRequestValid:function(e){return!!e.params.uid},buildRequests:function(e){var r=[],a={},i="net",t=void 0;return(e||[]).forEach((function(e){"gross"===e.params.priceType&&(i="gross"),a[e.params.uid]?a[e.params.uid].push(e):(a[e.params.uid]=[e],r.push(e.params.uid)),t=e.bidderRequestId})),{method:"GET",url:"//ads.danmarketplace.com/hb",data:{u:s.getTopWindowUrl(),pt:i,auids:r.join(","),r:t},bidsMap:a}},interpretResponse:function(e,r){e=e&&e.body;var a=[],i=r.bidsMap,t=r.data.pt,d=void 0;return e?e.seatbid&&!e.seatbid.length&&(d=o.hasEmptySeatbidArray):d=o.emptyResponse,!d&&e.seatbid&&e.seatbid.forEach((function(e){!(function(a,e,i,t){if(!a)return;var r=void 0;a.auid||(r=o.noAuid+JSON.stringify(a));if(a.adm){var d=e[a.auid];d?d.forEach((function(e){var r={requestId:e.bidId,cpm:a.price,width:a.w,height:a.h,creativeId:a.auid,currency:"USD",netRevenue:"gross"!==i,ttl:n,ad:a.adm,dealId:a.dealid};t.push(r)})):r=o.noPlacementCode+a.auid}else r=o.noAdm+JSON.stringify(a);r&&s.logError(r)})(function(e){e?e.bid?e.bid[0]||s.logError(o.noBid):s.logError(o.hasNoArrayOfBids+JSON.stringify(e)):s.logError(o.emptySeatbid);return e&&e.bid&&e.bid[0]}(e),i,t,a)})),d&&s.logError(d),a},getUserSyncs:function(e){if(e.pixelEnabled)return[{type:"image",url:"//ads.danmarketplace.com/push_sync"}]}};(0,i.registerBidder)(t)},157:function(e,r){}},[155]);