Get the Best IPTV Service
define("discourse/plugins/discourse-adplugin/discourse/components/ad-component",["exports","@ember/component","@ember/object/computed","@ember/service","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position"],(function(t,e,s,o,i,a){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 class d extends e.default{static#t=(()=>dt7948.g(this.prototype,"router",[o.service]))() #e=(()=>{dt7948.i(this,"router")})() static#s=(()=>dt7948.g(this.prototype,"currentCategoryId",[(0,s.or)("router.currentRoute.attributes.category.id","router.currentRoute.parent.attributes.category_id")]))() #o=(()=>{dt7948.i(this,"currentCategoryId")})() static#i=(()=>dt7948.g(this.prototype,"currentCategorySlug",[(0,s.or)("router.currentRoute.attributes.category.slug","router.currentRoute.parent.attributes.category.slug")]))() #a=(()=>{dt7948.i(this,"currentCategorySlug")})() static#d=(()=>dt7948.g(this.prototype,"topicTagsDisableAds",[(0,s.alias)("router.currentRoute.parent.attributes.tags_disable_ads")]))() #r=(()=>{dt7948.i(this,"topicTagsDisableAds")})() static#n=(()=>dt7948.g(this.prototype,"isRestrictedCategory",[(0,s.or)("router.currentRoute.attributes.category.read_restricted","router.currentRoute.parent.attributes.category.read_restricted")]))() #l=(()=>{dt7948.i(this,"isRestrictedCategory")})() topicListTag(t,e){if("tag"===t&&e)return e}static#c=(()=>dt7948.n(this.prototype,"topicListTag",[(0,i.default)("router.currentRoute.attributes.__type","router.currentRoute.attributes.id")]))() isPersonalMessage(t){return"private_message"===t}static#p=(()=>dt7948.n(this.prototype,"isPersonalMessage",[(0,i.default)("router.currentRoute.parent.attributes.archetype")]))() showToGroups(){return!this.currentUser||this.currentUser.show_to_groups}static#u=(()=>dt7948.n(this.prototype,"showToGroups",[i.default]))() showOnCurrentPage(t,e,s,o,i){return!(e||t&&this.siteSettings.no_ads_for_categories&&this.siteSettings.no_ads_for_categories.split("|").includes(t.toString())||s&&this.siteSettings.no_ads_for_tags&&this.siteSettings.no_ads_for_tags.split("|").includes(s)||o&&this.siteSettings.no_ads_for_personal_messages||i&&this.siteSettings.no_ads_for_restricted_categories)}static#_=(()=>dt7948.n(this.prototype,"showOnCurrentPage",[(0,i.default)("currentCategoryId","topicTagsDisableAds","topicListTag","isPersonalMessage","isRestrictedCategory")]))() isNthPost(t){return(0,a.isNthPost)(t,this.get("postNumber"))}isNthTopicListItem(t){return(0,a.isNthTopicListItem)(t,this.get("indexNumber"))}}t.default=d})),define("discourse/plugins/discourse-adplugin/discourse/components/ad-slot",["exports","@ember/component","@ember/object","@ember/service","@ember/utils","@ember-decorators/component","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","discourse/plugins/discourse-adplugin/discourse/helpers/slot-position","@ember/template-factory"],(function(t,e,s,o,i,a,d,r,n,l){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.slotContenders=_ const c=(0,l.createTemplateFactory)({id:"D5z0KdoN",block:'[[[42,[28,[37,1],[[28,[37,1],[[30,0,["adComponents"]]],null]],null],null,[[[42,[28,[37,1],[[28,[37,1],[[28,[37,2],[[30,0,["router","currentRoute"]]],null]],null]],null],null,[[[1," "],[46,[30,1],null,[["placement","category","postNumber","indexNumber","tagName"],[[30,0,["placement"]],[30,0,["category"]],[30,0,["postNumber"]],[30,0,["indexNumber"]],[30,0,["childTagName"]]]],null],[1,"\\n"]],[]],null]],[1]],null]],["adComponent"],false,["each","-track-array","array","component"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/ad-slot.hbs",isStrictMode:!1}),p=s.default.create({"google-adsense":{settingPrefix:"adsense",enabledSetting:"adsense_publisher_code",nthPost:"adsense_nth_post_code"},"google-dfp-ad":{settingPrefix:"dfp",enabledSetting:"dfp_publisher_id",nthPost:"dfp_nth_post_code"},"amazon-product-links":{settingPrefix:"amazon",enabledSetting:!1,nthPost:"amazon_nth_post_code",desktop:{"topic-list-top":"amazon_topic_list_top_src_code","post-bottom":"amazon_post_bottom_src_code","topic-above-post-stream":"amazon_topic_above_post_stream_src_code","topic-above-suggested":"amazon_topic_above_suggested_src_code"},mobile:{"topic-list-top":"amazon_mobile_topic_list_top_src_code","post-bottom":"amazon_mobile_post_bottom_src_code","topic-above-post-stream":"amazon_mobile_topic_above_post_stream_src_code","topic-above-suggested":"amazon_mobile_topic_above_suggested_src_code"}},"carbonads-ad":{settingPrefix:"carbonads",enabledSetting:"carbonads_serve_id",desktop:{"topic-list-top":"carbonads_topic_list_top_enabled","post-bottom":!1,"topic-above-post-stream":"carbonads_above_post_stream_enabled","topic-above-suggested":!1}},"adbutler-ad":{settingPrefix:"adbutler",enabledSetting:"adbutler_publisher_id",desktop:{"topic-list-top":"adbutler_topic_list_top_zone_id","post-bottom":"adbutler_post_bottom_zone_id","topic-above-post-stream":"adbutler_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_topic_above_suggested_zone_id"},mobile:{"topic-list-top":"adbutler_mobile_topic_list_top_zone_id","post-bottom":"adbutler_mobile_post_bottom_zone_id","topic-above-post-stream":"adbutler_mobile_topic_above_post_stream_zone_id","topic-above-suggested":"adbutler_mobile_topic_above_suggested_zone_id"}}}),u={houseAds:0,allAds:0} function _(t,e,s,o,a){let d=[] const r=t.get("house_creatives"),l=s.replace(/-/g,"_") if(r&&r.settings){const t=r.settings[l],e=Object.keys(r.creatives).length>0&&!(0,i.isBlank)(t),s=!a&&!o,c="topic_list_between"===l&&(0,n.isNthTopicListItem)(parseInt(r.settings.after_nth_topic,10),o) e&&(s||c||(0,n.isNthPost)(parseInt(r.settings.after_nth_post,10),a))&&d.push("house-ad")}return Object.keys(p).forEach((o=>{const r=p[o] let c,u=null;(function(t,e){return!1===e||e&&!(0,i.isBlank)(t[e])})(e,r.enabledSetting)&&function(t,e,s){return!e||!s||(0,n.isNthPost)(parseInt(t[s],10),e)}(e,a,r.nthPost)&&(u=t.mobileView&&r.mobile||r.desktop,u&&(c=u[s]),void 0===c&&(c=`${r.settingPrefix}_${t.mobileView?"mobile_":""}${l}_code`),!1===c||!1===e[c]||(0,i.isBlank)(e[c])||d.push(o))})),d}const g=dt7948.c(class extends r.default{static#t=(()=>dt7948.g(this.prototype,"router",[o.service]))() #e=(()=>{dt7948.i(this,"router")})() availableAdTypes(t,e,s){return _(this.site,this.siteSettings,t,s,e)}static#s=(()=>dt7948.n(this.prototype,"availableAdTypes",[(0,d.default)("placement","postNumber","indexNumber")]))() adComponents(t,e){if(!e.includes("house-ad")||1===e.length)return e const s=this.site.get("house_creatives") let o=!1 if(100===s.settings.house_ads_frequency)return["house-ad"] if(s.settings.house_ads_frequency>0){if(0===u.allAds||100*u.houseAds/u.allAds"house-ad"!==t)) return o&&(u.allAds+=i.length),i}static#i=(()=>dt7948.n(this.prototype,"adComponents",[(0,d.default)("placement","availableAdTypes","router.currentRoute")]))()},[(0,a.tagName)("")]) t.default=(0,e.setComponentTemplate)(c,g)})),define("discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad",["exports","@ember/component","@ember/runloop","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a,d,r,n){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const l=(0,n.createTemplateFactory)({id:"jgCU/K3F",block:'[[[41,[30,0,["showAd"]],[[[1," "],[10,0],[15,1,[30,0,["divId"]]],[15,0,[30,0,["className"]]],[12],[13],[1,"\\n"]],[]],null]],[],false,["if","div"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/adbutler-ad.hbs",isStrictMode:!1}) let c=!1,p=null,u=0 class _ extends r.default{divs=null publisherId=null init(){let t=[728,90],e="adbutler_",s="adbutler-",o="adbutler-ad" this.set("divs",[]),this.site.mobileView&&(t=[320,50],e+="mobile_",s+="mobile-",o="adbutler-mobile-ad"),e+=this.get("placement").replace(/-/g,"_")+"_zone_id",this.set("configKey",e),s+=this.get("placement"),this.set("className",s+" "+o) let i=this.siteSettings[e] this.set("zoneId",i) let a="placement-"+i+"-"+u this.set("divId",a) let d=this.siteSettings.adbutler_publisher_id this.set("publisherId",d),u++,this.divs.push({divId:a,publisherId:d,zoneId:i,dimensions:t}),super.init()}_triggerAds(){if((0,a.isTesting)())return const t=this.siteSettings.adbutler_adserver_hostname;(function(t){return c?o.default.resolve():p||(p=(0,i.default)("https://"+t+"/app.js",{scriptTag:!0}).then((function(){c=!0})),p)})(t).then(function(){if(this.divs.length>0){let e=window.abkw||"" window.AdButler.ads.push({handler:function(t){window.AdButler.register(t.place.publisherId,t.place.zoneId,t.place.dimensions,t.place.divId,t)},opt:{place:this.divs.pop(),keywords:e,domain:t,click:"CLICK_MACRO_PLACEHOLDER"}})}}.bind(this))}didInsertElement(){super.didInsertElement(),(0,s.scheduleOnce)("afterRender",this,this._triggerAds)}showAdbutlerAds(){return!this.currentUser||this.currentUser.show_adbutler_ads}static#t=(()=>dt7948.n(this.prototype,"showAdbutlerAds",[d.default]))() showAd(t,e,s,o,i){return t&&e&&s&&o&&i}static#s=(()=>dt7948.n(this.prototype,"showAd",[(0,d.default)("publisherId","showAdbutlerAds","showToGroups","showAfterPost","showOnCurrentPage")]))() showAfterPost(t){return!t||this.isNthPost(parseInt(this.siteSettings.adbutler_nth_post,10))}static#i=(()=>dt7948.n(this.prototype,"showAfterPost",[(0,d.default)("postNumber")]))()}t.default=_,(0,e.setComponentTemplate)(l,_)})),define("discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links",["exports","@ember/component","@ember/object/computed","@ember/template","@ember-decorators/component","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a,d,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const n=(0,r.createTemplateFactory)({id:"ZXlVr5Zu",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1," "],[10,0],[14,0,"amazon-product-links-label"],[15,5,[30,0,["adTitleStyleMobile"]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,"iframe"],[15,5,[30,0,["adWrapperStyleMobile"]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[30,0,["userInputMobile"]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"amazon-product-links-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,0],[14,0,"container"],[14,"align","center"],[12],[1,"\\n "],[10,"iframe"],[15,5,[30,0,["adWrapperStyle"]]],[14,"marginwidth","0"],[14,"marginheight","0"],[14,"scrolling","no"],[14,"frameborder","0"],[15,"src",[30,0,["userInput"]]],[15,"title",[28,[37,3],["adplugin.advertisement_label"],null]],[12],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]]]],[]],null]],[],false,["if","div","h2","i18n","iframe"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/amazon-product-links.hbs",isStrictMode:!1}),l=dt7948.c(class extends d.default{static#t=(()=>dt7948.g(this.prototype,"showAd",[(0,s.and)("showAmazonAds","showToGroups","showAfterPost","showOnCurrentPage")]))() #g=(()=>{dt7948.i(this,"showAd")})() init(){const t={"topic-list-top":{},"topic-above-post-stream":{},"topic-above-suggested":{},"post-bottom":{}},e=this.site.get("mobileView"),s=this.get("placement") !e&&this.siteSettings.amazon_topic_list_top_src_code&&(t["topic-list-top"].user_input=this.siteSettings.amazon_topic_list_top_src_code,t["topic-list-top"].amazon_width=parseInt(this.siteSettings.amazon_topic_list_top_ad_width_code,10),t["topic-list-top"].amazon_height=parseInt(this.siteSettings.amazon_topic_list_top_ad_height_code,10)),e&&this.siteSettings.amazon_mobile_topic_list_top_src_code&&(t["topic-list-top"].user_input_mobile=this.siteSettings.amazon_mobile_topic_list_top_src_code,t["topic-list-top"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_width_code,10),t["topic-list-top"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_list_top_ad_height_code,10)),!e&&this.siteSettings.amazon_topic_above_post_stream_src_code&&(t["topic-above-post-stream"].user_input=this.siteSettings.amazon_topic_above_post_stream_src_code,t["topic-above-post-stream"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_width_code,10),t["topic-above-post-stream"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_post_stream_ad_height_code,10)),e&&this.siteSettings.amazon_mobile_topic_above_post_stream_src_code&&(t["topic-above-post-stream"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_post_stream_src_code,t["topic-above-post-stream"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_width_code,10),t["topic-above-post-stream"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_post_stream_ad_height_code,10)),!e&&this.siteSettings.amazon_topic_above_suggested_src_code&&(t["topic-above-suggested"].user_input=this.siteSettings.amazon_topic_above_suggested_src_code,t["topic-above-suggested"].amazon_width=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_width_code,10),t["topic-above-suggested"].amazon_height=parseInt(this.siteSettings.amazon_topic_above_suggested_ad_height_code,10)),e&&this.siteSettings.amazon_mobile_topic_above_suggested_src_code&&(t["topic-above-suggested"].user_input_mobile=this.siteSettings.amazon_mobile_topic_above_suggested_src_code,t["topic-above-suggested"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_width_code,10),t["topic-above-suggested"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_topic_above_suggested_ad_height_code,10)),!e&&this.siteSettings.amazon_post_bottom_src_code&&(t["post-bottom"].user_input=this.siteSettings.amazon_post_bottom_src_code,t["post-bottom"].amazon_width=parseInt(this.siteSettings.amazon_post_bottom_ad_width_code,10),t["post-bottom"].amazon_height=parseInt(this.siteSettings.amazon_post_bottom_ad_height_code,10)),e&&this.siteSettings.amazon_mobile_post_bottom_src_code&&(t["post-bottom"].user_input_mobile=this.siteSettings.amazon_mobile_post_bottom_src_code,t["post-bottom"].mobile_amazon_width=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_width_code,10),t["post-bottom"].mobile_amazon_height=parseInt(this.siteSettings.amazon_mobile_post_bottom_ad_height_code,10)),this.set("user_input",t[s].user_input),this.set("amazon_width",t[s].amazon_width),this.set("amazon_height",t[s].amazon_height),this.set("user_input_mobile",t[s].user_input_mobile),this.set("mobile_amazon_height",t[s].mobile_amazon_height),this.set("mobile_amazon_width",t[s].mobile_amazon_width),super.init()}adWrapperStyle(t,e){return(0,o.htmlSafe)(`width: ${t}px; height: ${e}px;`)}static#s=(()=>dt7948.n(this.prototype,"adWrapperStyle",[(0,a.default)("amazon_width","amazon_height")]))() adWrapperStyleMobile(t,e){return(0,o.htmlSafe)(`width: ${t}px; height: ${e}px;`)}static#i=(()=>dt7948.n(this.prototype,"adWrapperStyleMobile",[(0,a.default)("mobile_amazon_width","mobile_amazon_height")]))() adTitleStyleMobile(t){return(0,o.htmlSafe)(`width: ${t}px;`)}static#d=(()=>dt7948.n(this.prototype,"adTitleStyleMobile",[(0,a.default)("mobile_amazon_width")]))() userInput(t){return(0,o.htmlSafe)(`${t}`)}static#n=(()=>dt7948.n(this.prototype,"userInput",[(0,a.default)("user_input")]))() userInputMobile(t){return(0,o.htmlSafe)(`${t}`)}static#c=(()=>dt7948.n(this.prototype,"userInputMobile",[(0,a.default)("user_input_mobile")]))() showAmazonAds(){return!this.currentUser||this.currentUser.show_amazon_ads}static#p=(()=>dt7948.n(this.prototype,"showAmazonAds",[a.default]))() showAfterPost(t){return!t||this.isNthPost(parseInt(this.siteSettings.amazon_nth_post_code,10))}static#u=(()=>dt7948.n(this.prototype,"showAfterPost",[(0,a.default)("postNumber")]))()},[(0,i.classNames)("amazon-product-links")]) t.default=(0,e.setComponentTemplate)(n,l)})),define("discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad",["exports","@ember/component","@ember/template","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const d=(0,a.createTemplateFactory)({id:"mMohoxGG",block:'[[[41,[30,0,["showAd"]],[[[1," "],[10,"script"],[15,"src",[30,0,["url"]]],[14,1,"_carbonads_js"],[14,"async",""],[14,4,"text/javascript"],[12],[1,"\\n "],[13],[1,"\\n"]],[]],null]],[],false,["if","script"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/carbonads-ad.hbs",isStrictMode:!1}) class r extends i.default{serve_id=null placement=null init(){this.set("serve_id",this.siteSettings.carbonads_serve_id),this.set("placement",this.siteSettings.carbonads_placement),super.init()}url(t,e){return(0,s.htmlSafe)(`//cdn.carbonads.com/carbon.js?serve=${t}&placement=${e}`)}static#t=(()=>dt7948.n(this.prototype,"url",[(0,o.default)("serve_id","placement")]))() showCarbonAds(){return!this.currentUser||this.currentUser.show_carbon_ads}static#s=(()=>dt7948.n(this.prototype,"showCarbonAds",[o.default]))() showAd(t,e,s,o,i){return t&&e&&s&&o&&i}static#i=(()=>dt7948.n(this.prototype,"showAd",[(0,o.default)("placement","serve_id","showCarbonAds","showToGroups","showOnCurrentPage")]))()}t.default=r,(0,e.setComponentTemplate)(d,r)})),define("discourse/plugins/discourse-adplugin/discourse/components/google-adsense",["exports","@ember/component","@ember/runloop","@ember/template","@ember-decorators/component","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a,d,r,n,l,c){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const p=(0,c.createTemplateFactory)({id:"D7TvJb1u",block:'[[[41,[30,0,["showAd"]],[[[1," "],[10,0],[14,0,"google-adsense-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,0],[14,0,"google-adsense-content"],[15,1,[52,[30,0,["isResponsive"]],"google-adsense__responsive"]],[15,5,[30,0,["adWrapperStyle"]]],[12],[1,"\\n "],[10,"ins"],[14,0,"adsbygoogle"],[15,5,[30,0,["adInsStyle"]]],[15,"data-ad-client",[29,["ca-pub-",[30,0,["publisher_id"]]]]],[15,"data-ad-slot",[30,0,["ad_code"]]],[15,"data-ad-format",[30,0,["autoAdFormat"]]],[12],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null]],[],false,["if","div","h2","i18n","ins"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-adsense.hbs",isStrictMode:!1}) let u=!1,_=null,g={} const m={"topic-list-top":{code:"adsense_topic_list_top_code",sizes:"adsense_topic_list_top_ad_sizes"},"topic-above-post-stream":{code:"adsense_topic_above_post_stream_code",sizes:"adsense_topic_above_post_stream_ad_sizes"},"topic-above-suggested":{code:"adsense_topic_above_suggested_code",sizes:"adsense_topic_above_suggested_ad_sizes"},"post-bottom":{code:"adsense_post_bottom_code",sizes:"adsense_post_bottom_ad_sizes"}},h={"topic-list-top":{code:"adsense_mobile_topic_list_top_code",sizes:"adsense_mobile_topic_list_top_ad_size"},"topic-above-post-stream":{code:"adsense_mobile_topic_above_post_stream_code",sizes:"adsense_mobile_topic_above_post_stream_ad_size"},"topic-above-suggested":{code:"adsense_mobile_topic_above_suggested_code",sizes:"adsense_mobile_topic_above_suggested_ad_size"},"post-bottom":{code:"adsense_mobile_post_bottom_code",sizes:"adsense_mobile_post_bottom_ad_size"}},b=dt7948.c(class extends l.default{loadedGoogletag=!1 publisher_id=null ad_width=null ad_height=null adRequested=!1 init(){let t,e const s=this.get("placement") t=this.site.mobileView?h[s]:m[s],g[s]||(g[s]=0) const o=(this.siteSettings[t.sizes]||"").split("|") 1===o.length?e=o[0]:(e=o[g[s]%o.length],g[s]+=1),this.set("ad_width",function(t){if("responsive"===t)return"auto" if(t.startsWith("fluid"))return"fluid" const e=parseInt(t.substring(0,3).trim(),10) return isNaN(e)?"auto":`${e}px`}(e)),this.set("ad_height",function(t){if("responsive"===t)return"auto" if(t.startsWith("fluid"))return"fluid" const e=parseInt(t.substring(4,7).trim(),10) return isNaN(e)?"auto":`${e}px`}(e)),this.set("ad_code",this.siteSettings[t.code]),this.set("publisher_id",this.siteSettings.adsense_publisher_code),super.init()}async _triggerAds(){if(!(0,r.isTesting)()&&(this.set("adRequested",!0),await function(){if(u)return a.default.resolve() if(_)return _ const t=("https:"===document.location.protocol?"https:":"http:")+"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" return _=(0,d.default)(t,{scriptTag:!0}).then((function(){u=!0})),_}(),!this.isDestroyed&&!this.isDestroying))try{(window.adsbygoogle||=[]).push({})}catch(t){console.error("Adsense error:",t)}}didInsertElement(){super.didInsertElement(),this.get("showAd")&&(0,s.scheduleOnce)("afterRender",this,this._triggerAds)}isResponsive(t){return["auto","fluid"].includes(t)}static#t=(()=>dt7948.n(this.prototype,"isResponsive",[(0,n.default)("ad_width")]))() isFluid(t){return"fluid"===t}static#s=(()=>dt7948.n(this.prototype,"isFluid",[(0,n.default)("ad_width")]))() classForSlot(t,e){return e?(0,o.htmlSafe)(`adsense-${t}`):""}static#i=(()=>dt7948.n(this.prototype,"classForSlot",[(0,n.default)("placement","showAd")]))() autoAdFormat(t,e){return!!t&&(0,o.htmlSafe)(e?"fluid":"auto")}static#d=(()=>dt7948.n(this.prototype,"autoAdFormat",[(0,n.default)("isResponsive","isFluid")]))() adWrapperStyle(t,e,s){return(0,o.htmlSafe)(s?"":`width: ${t}; height: ${e};`)}static#n=(()=>dt7948.n(this.prototype,"adWrapperStyle",[(0,n.default)("ad_width","ad_height","isResponsive")]))() adInsStyle(t,e){return(0,o.htmlSafe)(`display: ${e?"block":"inline-block"}; ${t}`)}static#c=(()=>dt7948.n(this.prototype,"adInsStyle",[(0,n.default)("adWrapperStyle","isResponsive")]))() showAdsenseAds(){return!this.currentUser||this.currentUser.show_adsense_ads}static#p=(()=>dt7948.n(this.prototype,"showAdsenseAds",[n.default]))() showAd(t,e,s,o,i){return t&&e&&s&&o&&i}static#u=(()=>dt7948.n(this.prototype,"showAd",[(0,n.default)("publisher_id","showAdsenseAds","showToGroups","showAfterPost","showOnCurrentPage")]))() showAfterPost(t){return!t||this.isNthPost(parseInt(this.siteSettings.adsense_nth_post_code,10))}static#_=(()=>dt7948.n(this.prototype,"showAfterPost",[(0,n.default)("postNumber")]))()},[(0,i.classNameBindings)(":google-adsense","classForSlot","isResponsive:adsense-responsive")]) t.default=(0,e.setComponentTemplate)(p,b)})),define("discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad",["exports","@ember/component","@ember/object/computed","@ember/template","@ember-decorators/component","rsvp","discourse/lib/load-script","discourse-common/config/environment","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a,d,r,n,l,c){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const p=(0,c.createTemplateFactory)({id:"GrVgisGC",block:'[[[41,[30,0,["showAd"]],[[[41,[30,0,["site","mobileView"]],[[[1," "],[10,0],[14,0,"google-dfp-ad-label"],[15,5,[30,0,["adTitleStyleMobile"]]],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,0],[15,1,[30,0,["divId"]]],[15,5,[30,0,["adWrapperStyle"]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"google-dfp-ad-label"],[12],[10,"h2"],[12],[1,[28,[35,3],["adplugin.advertisement_label"],null]],[13],[13],[1,"\\n "],[10,0],[15,1,[30,0,["divId"]]],[15,5,[30,0,["adWrapperStyle"]]],[14,0,"dfp-ad-unit"],[14,"align","center"],[12],[13],[1,"\\n"]],[]]]],[]],null]],[],false,["if","div","h2","i18n"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/google-dfp-ad.hbs",isStrictMode:!1}) let u=!1,_=null,g={},m=1,h={} function b(t){return t.substring(4,7).trim()}function f(t){let e=t.replace(/ /g,"") return e=e.replace(/['"]+/g,""),e=e.split(","),e}function v(t){let e=t return e=e.replace(/['"]+/g,""),e=e.split("\n"),e}const y={"topic-list-top":{code:"dfp_topic_list_top_code",sizes:"dfp_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_topic_above_post_stream_code",sizes:"dfp_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_topic_above_suggested_code",sizes:"dfp_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_post_bottom_code",sizes:"dfp_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}},w={"topic-list-top":{code:"dfp_mobile_topic_list_top_code",sizes:"dfp_mobile_topic_list_top_ad_sizes",targeting_keys:"dfp_target_topic_list_top_key_code",targeting_values:"dfp_target_topic_list_top_value_code"},"topic-above-post-stream":{code:"dfp_mobile_topic_above_post_stream_code",sizes:"dfp_mobile_topic_above_post_stream_ad_sizes",targeting_keys:"dfp_target_topic_above_post_stream_key_code",targeting_values:"dfp_target_topic_above_post_stream_value_code"},"topic-above-suggested":{code:"dfp_mobile_topic_above_suggested_code",sizes:"dfp_mobile_topic_above_suggested_ad_sizes",targeting_keys:"dfp_target_topic_above_suggested_key_code",targeting_values:"dfp_target_topic_above_suggested_value_code"},"post-bottom":{code:"dfp_mobile_post_bottom_code",sizes:"dfp_mobile_post_bottom_ad_sizes",targeting_keys:"dfp_target_post_bottom_key_code",targeting_values:"dfp_target_post_bottom_value_code"}} function z(t,e,s,o,i,a,d){if(!s.dfp_publisher_id)return if(g[t])return g[t] let r,n,l return o?(l=s.dfp_publisher_id_mobile||s.dfp_publisher_id,n=w[e]):(l=s.dfp_publisher_id,n=y[e]),r=window.googletag.defineSlot("/"+l+"/"+s[n.code],[i,a],t),function(t,e,s){for(let o=0;odt7948.g(this.prototype,"width",[(0,s.alias)("size.width")]))() #m=(()=>{dt7948.i(this,"width")})() static#s=(()=>dt7948.g(this.prototype,"height",[(0,s.alias)("size.height")]))() #h=(()=>{dt7948.i(this,"height")})() size(){return function(t,e,s){let o,i o=s?w[t]:y[t],h[t]||(h[t]=0) const a=(e[o.sizes]||"").split("|") if(1===a.length?i=a[0]:(i=a[h[t]%a.length],h[t]+=1),"fluid"===i)return{width:"fluid",height:"fluid"} const d={width:parseInt((r=i,r.substring(0,3).trim()),10),height:parseInt(b(i),10)} var r return isNaN(d.width)||isNaN(d.height)?void 0:d}(this.get("placement"),this.siteSettings,this.site.mobileView)}static#i=(()=>dt7948.n(this.prototype,"size",[n.default]))() publisherId(t,e,s){return s&&e||t}static#d=(()=>dt7948.n(this.prototype,"publisherId",[(0,n.default)("siteSettings.dfp_publisher_id","siteSettings.dfp_publisher_id_mobile","site.mobileView")]))() divId(t,e){let s=m++ return e?`div-gpt-ad-${s}-${t}-${e}`:`div-gpt-ad-${s}-${t}`}static#n=(()=>dt7948.n(this.prototype,"divId",[(0,n.default)("placement","postNumber")]))() adUnitClass(t,e){return e?`dfp-ad-${t}`:""}static#c=(()=>dt7948.n(this.prototype,"adUnitClass",[(0,n.default)("placement","showAd")]))() adWrapperStyle(t,e){if("fluid"!==t)return(0,o.htmlSafe)(`width: ${t}px; height: ${e}px;`)}static#p=(()=>dt7948.n(this.prototype,"adWrapperStyle",[(0,n.default)("width","height")]))() adTitleStyleMobile(t){if("fluid"!==t)return(0,o.htmlSafe)(`width: ${t}px;`)}static#u=(()=>dt7948.n(this.prototype,"adTitleStyleMobile",[(0,n.default)("width")]))() showAd(t,e,s,o,i,a){return t&&e&&s&&o&&i&&a}static#_=(()=>dt7948.n(this.prototype,"showAd",[(0,n.default)("publisherId","showDfpAds","showToGroups","showAfterPost","showOnCurrentPage","size")]))() showDfpAds(){return!this.currentUser||this.currentUser.show_dfp_ads}static#b=(()=>dt7948.n(this.prototype,"showDfpAds",[n.default]))() showAfterPost(t){return!t||this.isNthPost(parseInt(this.siteSettings.dfp_nth_post_code,10))}static#f=(()=>dt7948.n(this.prototype,"showAfterPost",[(0,n.default)("postNumber")]))() shouldRefreshAd(){const t=this.get("lastAdRefresh") return!t||new Date-t>3e3}updated(){if(!this.shouldRefreshAd())return let t=g[this.get("divId")] if(!t||!t.ad)return let e=t.ad,s=this.get("currentCategorySlug") this.get("loadedGoogletag")&&(this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{e.setTargeting("discourse-category",s||"0"),window.googletag.pubads().refresh([e])})))}static#v=(()=>dt7948.n(this.prototype,"updated",[(0,n.on)("didUpdate")]))() _initGoogleDFP(){(0,r.isTesting)()||this.get("showAd")&&function(){if(u)return a.default.resolve() if(_)return _ let t=("https:"===document.location.protocol?"https:":"http:")+"//securepubads.g.doubleclick.net/tag/js/gpt.js" return _=(0,d.default)(t,{scriptTag:!0}).then((function(){u=!0,void 0===window.googletag&&console.log("googletag is undefined!"),window.googletag.cmd.push((function(){window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().disableInitialLoad(),window.googletag.pubads().setForceSafeFrame(!0),window.googletag.enableServices()}))})),window.googletag=window.googletag||{cmd:[]},_}().then((()=>{this.set("loadedGoogletag",!0),this.set("lastAdRefresh",new Date),window.googletag.cmd.push((()=>{let t=z(this.get("divId"),this.get("placement"),this.siteSettings,this.site.mobileView,this.get("width"),this.get("height"),this.get("currentCategorySlug")||"0") t&&t.ad&&(window.googletag.display(this.get("divId")),window.googletag.pubads().refresh([t.ad]))}))}))}static#y=(()=>dt7948.n(this.prototype,"_initGoogleDFP",[(0,n.on)("didInsertElement")]))() willRender(){super.willRender(...arguments),this.get("showAd")}cleanup(){var t t=this.get("divId"),g[t]&&window.googletag&&(window.googletag.destroySlots([g[t].ad]),delete g[t])}static#w=(()=>dt7948.n(this.prototype,"cleanup",[(0,n.on)("willDestroyElement")]))()},[(0,i.classNames)("google-dfp-ad"),(0,i.classNameBindings)("adUnitClass")]) t.default=(0,e.setComponentTemplate)(p,S)})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ad",["exports","@ember/component","@ember/utils","@ember-decorators/component","discourse-common/utils/decorators","discourse/plugins/discourse-adplugin/discourse/components/ad-component","@ember/template-factory"],(function(t,e,s,o,i,a,d){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const r=(0,d.createTemplateFactory)({id:"5YhP8xZT",block:'[[[41,[30,0,["showAd"]],[[[1," "],[1,[28,[35,1],[[30,0,["adHtml"]]],null]],[1,"\\n"]],[]],null]],[],false,["if","html-safe"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/house-ad.hbs",isStrictMode:!1}),n={topic_list_top:null,topic_above_post_stream:null,topic_above_suggested:null,post_bottom:null,topic_list_between:null},l=dt7948.c(class extends a.default{adHtml="" colspanAttribute(){return"td"===this.tagName?"5":null}static#t=(()=>dt7948.n(this.prototype,"colspanAttribute",[i.default]))() adUnitClass(t,e){return e?`house-${t}`:""}static#s=(()=>dt7948.n(this.prototype,"adUnitClass",[(0,i.default)("placement","showAd")]))() showAd(t,e,s,o){return t&&(e||s)&&o}static#i=(()=>dt7948.n(this.prototype,"showAd",[(0,i.default)("showToGroups","showAfterPost","showAfterTopicListItem","showOnCurrentPage")]))() showAfterPost(t,e){return!t&&"topic-list-between"!==e||this.isNthPost(parseInt(this.site.get("house_creatives.settings.after_nth_post"),10))}static#d=(()=>dt7948.n(this.prototype,"showAfterPost",[(0,i.default)("postNumber","placement")]))() showAfterTopicListItem(t){return"topic-list-between"!==t||this.isNthTopicListItem(parseInt(this.site.get("house_creatives.settings.after_nth_topic"),10))}static#n=(()=>dt7948.n(this.prototype,"showAfterTopicListItem",[(0,i.default)("placement")]))() chooseAdHtml(){const t=this.site.get("house_creatives"),e=this.get("placement").replace(/-/g,"_"),s=this.adsNamesForSlot(e).filter((e=>{const s=t.creatives[e] return s&&(!s.category_ids?.length||s.category_ids.includes(this.currentCategoryId))})) if(s.length>0){n[e]||(n[e]=0) let o=t.creatives[s[n[e]]]||"" return n[e]=(n[e]+1)%s.length,o.html}}adsNamesForSlot(t){const e=this.site.get("house_creatives") if(!e||!e.settings)return[] const o=e.settings[t] return Object.keys(e.creatives).length>0&&!(0,s.isBlank)(o)?o.split("|"):[]}refreshAd(){this.set("adHtml",this.chooseAdHtml())}didInsertElement(){if(super.didInsertElement(...arguments),this.get("showAd")){if(null===n.topic_list_top){const t=this.site.get("house_creatives") Object.keys(n).forEach((e=>{const s=this.adsNamesForSlot(e) if(0===s.length)return const o=s.filter((e=>{const s=t.creatives[e] return s&&(!s.category_ids?.length||s.category_ids.includes(this.currentCategoryId))})) n[e]=Math.floor(Math.random()*o.length)}))}this.refreshAd()}}},[(0,o.attributeBindings)("colspanAttribute:colspan"),(0,o.classNameBindings)("adUnitClass"),(0,o.classNames)("house-creative")]) t.default=(0,e.setComponentTemplate)(r,l)})),define("discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad",["exports","@ember/component","@ember/component/template-only","@ember/template-factory"],(function(t,e,s,o){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 const i=(0,o.createTemplateFactory)({id:"EFDIMueB",block:'[[[1,[28,[35,0],null,[["placement","category","postNumber"],["post-bottom",[30,1,["topic","category","slug"]],[30,1,["post_number"]]]]]]],["@model"],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/post-bottom-ad.hbs",isStrictMode:!1}) t.default=(0,e.setComponentTemplate)(i,(0,s.default)(void 0,"post-bottom-ad"))})),define("discourse/plugins/discourse-adplugin/discourse/connectors/after-topic-list-item/discourse-adplugin",["exports","discourse/plugins/discourse-adplugin/discourse/components/ad-slot"],(function(t,e){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default={shouldRender:(t,s)=>t.index&&(0,e.slotContenders)(s.site,s.siteSettings,"topic-list-between",t.index).length>0}})),define("discourse/plugins/discourse-adplugin/discourse/helpers/slot-position",["exports"],(function(t){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.isNthPost=function(t,e){return!!(t&&t>0)&&e%t==0},t.isNthTopicListItem=function(t,e){return!!(t&&t>0&&e>0)&&(e+1)%t==0}})),define("discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin",["exports","discourse/lib/plugin-api","discourse/models/site","discourse/widgets/render-glimmer","@ember/template-factory"],(function(t,e,s,o,i){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default={name:"initialize-ad-plugin",initialize(t){(0,o.registerWidgetShim)("after-post-ad","div.widget-connector",(0,i.createTemplateFactory)({id:"adpJSmtH",block:'[[[8,[39,0],null,[["@model"],[[30,1]]],null]],["@data"],false,["post-bottom-ad"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-adplugin/discourse/initializers/initialize-ad-plugin.js",isStrictMode:!1})),(0,e.withPluginApi)("0.1",(t=>{t.decorateWidget("post:after",(t=>t.attach("after-post-ad",t.widget.model)))})) const a=t.lookup("service:message-bus"),d=t.lookup("service:current-user")?"/site/house-creatives/logged-in":"/site/house-creatives/anonymous" a.subscribe(d,(function(t){s.default.currentProp("house_creatives",t)}))}}})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin",["exports","@ember/template-factory"],(function(t,e){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default=(0,e.createTemplateFactory)({id:"zqOFJc6y",block:'[[[1,[28,[35,0],null,[["placement","category","indexNumber","childTagName"],["topic-list-between",[30,0,["category","slug"]],[30,0,["index"]],"td"]]]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/after-topic-list-item/discourse-adplugin.hbs",isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin",["exports","@ember/template-factory"],(function(t,e){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default=(0,e.createTemplateFactory)({id:"TEjXpo2z",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-list-top",[30,0,["category","slug"]]]]]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs",isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin",["exports","@ember/template-factory"],(function(t,e){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default=(0,e.createTemplateFactory)({id:"DxGXmB1r",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-post-stream",[30,0,["model","category","slug"]]]]]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs",isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin",["exports","@ember/template-factory"],(function(t,e){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0 t.default=(0,e.createTemplateFactory)({id:"5OlLBQ1p",block:'[[[1,[28,[35,0],null,[["placement","category"],["topic-above-suggested",[30,0,["model","category","slug"]]]]]]],[],false,["ad-slot"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs",isStrictMode:!1})})) //# sourceMappingURL=discourse-adplugin-ceb8138fe7a407a38b0820b551a64f6d6115ad7f6eb27f50b00d1437b98aef26.map //! ; Flash Sale Popup