text: (window.webpackJsonpreact_ads=window.webpackJsonpreact_ads||[]).push([[190],{152:function(e,r,t){"use strict";t.r(r),t.d(r,"ENVIRONMENT",(function(){return d})),t.d(r,"spec",(function(){return c}));var a=t(278),i=t(279),n={production:"https://s-rtb-pb.send.microad.jp/prebid",test:"https://rtbtest.send.microad.jp/prebid"},d="production";function o(e,r){return(e?-1:0)&r}function p(e){return o(e.mediaTypes.banner,1)|o(e.mediaTypes.native,2)|o(e.mediaTypes.video,4)}var c={code:"microad",supportedMediaTypes:[i.b],isBidRequestValid:function(e){return!!(e&&e.params&&e.params.spot&&e.mediaTypes&&(e.mediaTypes.banner||e.mediaTypes.native||e.mediaTypes.video))},buildRequests:function(e,r){var t=[];return e.forEach((function(e){var a=e.params,i={spot:a.spot,url:r.refererInfo.canonicalUrl||window.location.href,referrer:r.refererInfo.referer,bid_id:e.bidId,transaction_id:e.transactionId,media_types:p(e),cbt:Math.floor(Math.random()*Math.pow(10,18)).toString(16)+(new Date).getTime().toString(16)};if(a.url&&(i.url_macro=a.url.replace("${COMPASS_EXT_URL}","")),a.referrer&&(i.referrer_macro=a.referrer.replace("${COMPASS_EXT_REF}","")),a.ifa&&(i.ifa=a.ifa.replace("${COMPASS_EXT_IFA}","")),a.appid&&(i.appid=a.appid.replace("${COMPASS_EXT_APPID}","")),a.geo){var o=a.geo.replace("${COMPASS_EXT_GEO}","");/^[0-9.\-]+,[0-9.\-]+$/.test(o)&&(i.geo=o)}t.push({method:"GET",url:n[d],data:i,options:{Accept:"application/json"}})})),t},interpretResponse:function(e){var r=e.body,t=[];if(r.cpm&&r.cpm>0){var a={requestId:r.requestId,cpm:r.cpm,width:r.width,height:r.height,ad:r.ad,ttl:r.ttl,creativeId:r.creativeId,netRevenue:r.netRevenue,currency:r.currency};r.dealId&&(a.dealId=r.dealId),t.push(a)}return t},getUserSyncs:function(e,r){var t=[];return e.iframeEnabled||e.pixelEnabled?(r.forEach((function(r){var a=r.body.syncUrls.iframe,i=r.body.syncUrls.image;e.iframeEnabled&&a&&a.forEach((function(e){t.push({type:"iframe",url:e})})),e.pixelEnabled&&i&&i.forEach((function(e){t.push({type:"image",url:e})}))})),t):t}};Object(a.registerBidder)(c)}}]);