From 3adb7c8f903f552d03e6ad01d29fabe0011ef2f7 Mon Sep 17 00:00:00 2001 From: Romeo Rosete <110788242+bombastictranz@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:45:17 -0400 Subject: [PATCH] discourse-adplugin-admin-.br.js.download Stock control supervisors --- ...f873cacbc333969be4808a882e7.br.js.download | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 discourse-adplugin_admin-19d062214a057170d85f58f115c235c2df9e4f873cacbc333969be4808a882e7.br.js.download diff --git a/discourse-adplugin_admin-19d062214a057170d85f58f115c235c2df9e4f873cacbc333969be4808a882e7.br.js.download b/discourse-adplugin_admin-19d062214a057170d85f58f115c235c2df9e4f873cacbc333969be4808a882e7.br.js.download new file mode 100644 index 00000000..5faf38fd --- /dev/null +++ b/discourse-adplugin_admin-19d062214a057170d85f58f115c235c2df9e4f873cacbc333969be4808a882e7.br.js.download @@ -0,0 +1,51 @@ +define("discourse/plugins/discourse-adplugin/discourse/adplugin-route-map",["exports"],(function(e){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default={resource:"admin.adminPlugins",path:"/plugins",map(){this.route("houseAds",{path:"/pluginad/house_creatives"},(function(){this.route("index",{path:"/"}),this.route("show",{path:"/:ad_id"})}))}}})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ads-category-selector",["exports","select-kit/components/category-selector"],(function(e,t){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +class s extends t.default{get value(){return this.selectedCategories.map((e=>e.id))}}e.default=s})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ads-chooser",["exports","@ember/object","discourse-common/lib/helpers","select-kit/components/multi-select"],(function(e,t,s,i){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=i.default.extend({classNames:["house-ads-chooser"],filterable:!0,filterPlaceholder:"admin.adplugin.house_ads.filter_placeholder",tokenSeparator:"|",allowCreate:!1,allowAny:!1,settingValue:"",valueAttribute:null,nameProperty:null,value:(0,t.computed)("settingValue",(function(){return this.settingValue.toString().split(this.tokenSeparator).filter(Boolean)})),mutateValues(e){this.set("settingValue",e.join(this.tokenSeparator))},computeValues(){return this.settingValue.split(this.tokenSeparator).filter(Boolean)},content:(0,t.computed)("choices",(function(){return(0,s.makeArray)(this.choices)})),actions:{onChange(e){const t=(0,s.makeArray)(e).join(this.tokenSeparator) +this.onChange?.(t)}}})})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting",["exports","@ember/component","@ember/object/computed","discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/is-component","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,a,l,o,n,r){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +const u=(0,r.createTemplateFactory)({id:"3cPEy714",block:'[[[44,[[28,[37,1],null,[["name"],[[28,[32,0],["name"],null]]]]],[[[10,"label"],[15,"for",[52,[30,1,["name"]],[28,[30,1,["name"]],null,null],[28,[32,1],[[30,0],"name","[\\"The `name` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.name}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[41,[28,[32,2],["title"],null],[[[8,[39,3],null,null,null]],[]],[[[44,[[28,[37,1],null,[["title"],[[28,[32,0],["title"],null]]]]],[[[1,[52,[30,2,["title"]],[28,[30,2,["title"]],null,null],[28,[32,1],[[30,0],"title","[\\"The `title` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.title}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]],[2]]]],[]]],[13]],[1]]],[1,"\\n"],[1,[28,[35,4],null,[["settingValue","choices","onChange"],[[30,0,["adValue"]],[30,0,["adNames"]],[28,[37,5],[[30,0],[28,[37,6],[[30,0,["adValue"]]],null]],null]]]]],[1,"\\n"],[10,0],[14,0,"setting-controls"],[12],[1,"\\n"],[41,[30,0,["changed"]],[[[1," "],[8,[39,7],[[24,0,"ok"]],[["@action","@icon"],[[28,[37,5],[[30,0],"save"],null],"check"]],null],[1,"\\n "],[8,[39,7],[[24,0,"cancel"]],[["@action","@icon"],[[28,[37,5],[[30,0],"cancel"],null],"times"]],null],[1,"\\n"]],[]],null],[13],[1,"\\n"],[10,2],[14,0,"help"],[12],[41,[28,[32,2],["help"],null],[[[8,[39,8],null,null,null]],[]],[[[44,[[28,[37,1],null,[["help"],[[28,[32,0],["help"],null]]]]],[[[1,[52,[30,3,["help"]],[28,[30,3,["help"]],null,null],[28,[32,1],[[30,0],"help","[\\"The `help` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.help}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]],[3]]]],[]]],[13],[1,[28,[32,3],["[[\\"The `adValue` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adValue}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adNames` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adNames}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adValue` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adValue}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `changed` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.changed}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers0","maybeHelpers"],false,["let","hash","if","title","house-ads-chooser","action","mut","d-button","help"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/house-ads-list-setting.hbs",scope:()=>[l.default,a.default,o.default,n.default],isStrictMode:!1}) +e.default=(0,t.setComponentTemplate)(u,i.default.extend({classNames:"house-ads-setting house-ads-list-setting",adNames:(0,s.mapBy)("allAds","name")}))})),define("discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting",["exports","@ember/component","discourse/lib/ajax","discourse/lib/ajax-error","discourse/lib/computed","I18n","ember-this-fallback/this-fallback-helper","ember-this-fallback/try-lookup-helper","ember-this-fallback/is-component","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s,i,a,l,o,n,r,u,d){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +const p=(0,d.createTemplateFactory)({id:"OwUU7dQG",block:'[[[44,[[28,[37,1],null,[["name"],[[28,[32,0],["name"],null]]]]],[[[10,"label"],[15,"for",[52,[30,1,["name"]],[28,[30,1,["name"]],null,null],[28,[32,1],[[30,0],"name","[\\"The `name` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.name}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]],[12],[41,[28,[32,2],["title"],null],[[[8,[39,3],null,null,null]],[]],[[[44,[[28,[37,1],null,[["title"],[[28,[32,0],["title"],null]]]]],[[[1,[52,[30,2,["title"]],[28,[30,2,["title"]],null,null],[28,[32,1],[[30,0],"title","[\\"The `title` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.title}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]],[2]]]],[]]],[13]],[1]]],[1,"\\n"],[8,[39,4],null,[["@value","@classNames"],[[30,0,["adValue"]],"house-ads-text-input"]],null],[1,"\\n"],[10,0],[14,0,"setting-controls"],[12],[1,"\\n"],[41,[30,0,["changed"]],[[[1," "],[8,[39,5],[[24,0,"ok"]],[["@action","@icon"],[[28,[37,6],[[30,0],"save"],null],"check"]],null],[1,"\\n "],[8,[39,5],[[24,0,"cancel"]],[["@action","@icon"],[[28,[37,6],[[30,0],"cancel"],null],"times"]],null],[1,"\\n"]],[]],null],[13],[1,"\\n"],[10,2],[14,0,"help"],[12],[41,[28,[32,2],["help"],null],[[[8,[39,7],null,null,null]],[]],[[[44,[[28,[37,1],null,[["help"],[[28,[32,0],["help"],null]]]]],[[[1,[52,[30,3,["help"]],[28,[30,3,["help"]],null,null],[28,[32,1],[[30,0],"help","[\\"The `help` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.help}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]"],null]]]],[3]]]],[]]],[13],[1,[28,[32,3],["[[\\"The `adValue` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adValue}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `changed` property path was used in the `discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.changed}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["maybeHelpers","maybeHelpers0","maybeHelpers"],false,["let","hash","if","title","text-field","d-button","action","help"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting.hbs",scope:()=>[n.default,o.default,r.default,u.default],isStrictMode:!1}) +e.default=(0,t.setComponentTemplate)(p,t.default.extend({classNames:"house-ads-setting",adValue:"",saving:!1,savingStatus:"",title:(0,a.i18n)("name","admin.adplugin.house_ads.%@.title"),help:(0,a.i18n)("name","admin.adplugin.house_ads.%@.description"),changed:(0,a.propertyNotEqual)("adValue","value"),init(){this._super(...arguments),this.set("adValue",this.get("value"))},actions:{save(){this.get("saving")||(this.setProperties({saving:!0,savingStatus:l.default.t("saving")}),(0,s.ajax)(`/admin/plugins/pluginad/house_settings/${this.get("name")}.json`,{type:"PUT",data:{value:this.get("adValue")}}).then((()=>{this.get("adSettings").set(this.get("name"),this.get("adValue")),this.setProperties({value:this.get("adValue"),savingStatus:l.default.t("saved")})})).catch(i.popupAjaxError).finally((()=>{this.setProperties({saving:!1,savingStatus:""})})))},cancel(){this.set("adValue",this.get("value"))}}}))})),define("discourse/plugins/discourse-adplugin/discourse/components/modal/preview",["exports","@ember/template","discourse/components/d-modal","discourse-common/helpers/i18n","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,s,i,a,l,o){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +const n=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"rprbfKE8",block:'[[[1,"\\n "],[8,[32,0],null,[["@closeModal","@title"],[[30,1],[28,[32,1],["admin.adplugin.house_ads.preview"],null]]],[["body"],[[[[1,"\\n "],[10,0],[14,0,"house-ad-preview"],[12],[1,"\\n "],[1,[28,[32,2],[[30,2,["html"]]],null]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],["@closeModal","@model"],false,[]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-adplugin/discourse/components/modal/preview.js",scope:()=>[s.default,i.default,t.htmlSafe],isStrictMode:!0}),(0,o.default)()) +e.default=n})),define("discourse/plugins/discourse-adplugin/discourse/controllers/admin-plugins-house-ads-index",["exports","@ember/controller","@ember/object/computed"],(function(e,t,s){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=t.default.extend({adminPluginsHouseAds:(0,t.inject)("adminPlugins.houseAds"),houseAds:(0,s.alias)("adminPluginsHouseAds.model"),adSettings:(0,s.alias)("adminPluginsHouseAds.houseAdsSettings")})})),define("discourse/plugins/discourse-adplugin/discourse/controllers/admin-plugins-house-ads-show",["exports","@glimmer/tracking","@ember/controller","@ember/object","@ember/service","@ember-compat/tracked-built-ins","@ember-decorators/object","discourse/lib/ajax","discourse/lib/ajax-error","discourse/models/category","I18n","discourse/plugins/discourse-adplugin/discourse/components/modal/preview"],(function(e,t,s,i,a,l,o,n,r,u,d,p){"use strict" +var c,h,b,m,f,g,k,v,y,_,w +function x(e,t,s,i){s&&Object.defineProperty(e,t,{enumerable:s.enumerable,configurable:s.configurable,writable:s.writable,value:s.initializer?s.initializer.call(i):void 0})}function j(e,t,s,i,a){var l={} +return Object.keys(i).forEach((function(e){l[e]=i[e]})),l.enumerable=!!l.enumerable,l.configurable=!!l.configurable,("value"in l||l.initializer)&&(l.writable=!0),l=s.slice().reverse().reduce((function(s,i){return i(e,t,s)||s}),l),a&&void 0!==l.initializer&&(l.value=l.initializer?l.initializer.call(a):void 0,l.initializer=void 0),void 0===l.initializer&&(Object.defineProperty(e,t,l),l=null),l}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=(c=(0,s.inject)("adminPlugins.houseAds"),h=(0,o.observes)("model"),b=class extends s.default{constructor(){super(...arguments),x(this,"router",m,this),x(this,"modal",f,this),x(this,"houseAdsController",g,this),x(this,"selectedCategories",k,this),x(this,"selectedGroups",v,this),x(this,"saving",y,this),x(this,"savingStatus",_,this),x(this,"buffered",w,this)}modelChanged(){this.buffered=new l.TrackedObject({...this.model}),this.selectedCategories=this.model.categories||[],this.selectedGroups=this.model.group_ids||[]}get disabledSave(){for(const e in this.buffered)if("categories"!==e&&this.buffered[e]!==this.model[e])return!1 +return!0}async save(){if(!this.saving){this.saving=!0,this.savingStatus=d.default.t("saving") +const t={},s=!this.buffered.id +s||(t.id=this.buffered.id),t.name=this.buffered.name,t.html=this.buffered.html,t.visible_to_logged_in_users=this.buffered.visible_to_logged_in_users,t.visible_to_anons=this.buffered.visible_to_anons,t.category_ids=this.buffered.category_ids,t.group_ids=this.buffered.group_ids +try{const e=await(0,n.ajax)(s?"/admin/plugins/pluginad/house_creatives":`/admin/plugins/pluginad/house_creatives/${this.buffered.id}`,{type:s?"POST":"PUT",data:t}) +this.savingStatus=d.default.t("saved") +const a=this.houseAdsController.model +s?(this.buffered.id=e.house_ad.id,a.includes(this.buffered)||a.pushObject(i.default.create(this.buffered)),this.router.transitionTo("adminPlugins.houseAds.show",this.buffered.id)):a.find((e=>e.id===this.buffered.id)).setProperties(this.buffered)}catch(e){(0,r.popupAjaxError)(e)}finally{this.set("model",this.buffered),this.saving=!1,this.savingStatus=""}}}setCategoryIds(e){this.selectedCategories=e,this.buffered.category_ids=e.map((e=>e.id)),this.setCategoriesForBuffered()}setGroupIds(e){this.selectedGroups=e,this.buffered.group_ids=e.map((e=>e))}cancel(){this.buffered=new l.TrackedObject({...this.model}),this.selectedCategories=this.model.categories||[],this.selectedGroups=this.model.group_ids||[],this.setCategoriesForBuffered()}async destroy(){if(this.buffered.id)try{await(0,n.ajax)(`/admin/plugins/pluginad/house_creatives/${this.buffered.id}`,{type:"DELETE"}),this.houseAdsController.model.removeObject(this.houseAdsController.model.findBy("id",this.buffered.id)),this.router.transitionTo("adminPlugins.houseAds.index")}catch(e){(0,r.popupAjaxError)(e)}else this.router.transitionTo("adminPlugins.houseAds.index")}openPreview(){this.modal.show(p.default,{model:{html:this.buffered.html}})}setCategoriesForBuffered(){this.buffered.categories=this.buffered.category_ids?this.buffered.category_ids.map((e=>u.default.findById(e))):[]}},m=j(b.prototype,"router",[a.service],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=j(b.prototype,"modal",[a.service],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=j(b.prototype,"houseAdsController",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=j(b.prototype,"selectedCategories",[t.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),v=j(b.prototype,"selectedGroups",[t.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),y=j(b.prototype,"saving",[t.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=j(b.prototype,"savingStatus",[t.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),w=j(b.prototype,"buffered",[t.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j(b.prototype,"modelChanged",[h],Object.getOwnPropertyDescriptor(b.prototype,"modelChanged"),b.prototype),j(b.prototype,"save",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"save"),b.prototype),j(b.prototype,"setCategoryIds",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"setCategoryIds"),b.prototype),j(b.prototype,"setGroupIds",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"setGroupIds"),b.prototype),j(b.prototype,"cancel",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"cancel"),b.prototype),j(b.prototype,"destroy",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"destroy"),b.prototype),j(b.prototype,"openPreview",[i.action],Object.getOwnPropertyDescriptor(b.prototype,"openPreview"),b.prototype),b)})),define("discourse/plugins/discourse-adplugin/discourse/controllers/admin-plugins-house-ads",["exports","@ember/controller"],(function(e,t){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=t.default.extend({loadingAds:!0})})),define("discourse/plugins/discourse-adplugin/discourse/routes/admin-plugins-house-ads-index",["exports","@ember/object","@ember/service","discourse/routes/discourse"],(function(e,t,s,i){"use strict" +var a +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +var l,o,n,r,u,d +e.default=i.default.extend((a={router:(0,s.inject)(),moreSettings(){this.router.transitionTo("adminSiteSettingsCategory","ad_plugin")}},l=a,o="moreSettings",n=[t.action],r=Object.getOwnPropertyDescriptor(a,"moreSettings"),u=a,d={},Object.keys(r).forEach((function(e){d[e]=r[e]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=n.slice().reverse().reduce((function(e,t){return t(l,o,e)||e}),d),u&&void 0!==d.initializer&&(d.value=d.initializer?d.initializer.call(u):void 0,d.initializer=void 0),void 0===d.initializer&&(Object.defineProperty(l,o,d),d=null),a))})),define("discourse/plugins/discourse-adplugin/discourse/routes/admin-plugins-house-ads-show",["exports","@ember-compat/tracked-built-ins","discourse/routes/discourse","I18n"],(function(e,t,s,i){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=s.default.extend({model(e){return"new"===e.ad_id?new t.TrackedObject({name:i.default.t("admin.adplugin.house_ads.new_name"),html:"",visible_to_logged_in_users:!0,visible_to_anons:!0}):new t.TrackedObject(this.modelFor("adminPlugins.houseAds").findBy("id",parseInt(e.ad_id,10)))}})})),define("discourse/plugins/discourse-adplugin/discourse/routes/admin-plugins-house-ads",["exports","@ember/object","discourse/lib/ajax","discourse/routes/discourse"],(function(e,t,s,i){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=i.default.extend({settings:null,model(){return(0,s.ajax)("/admin/plugins/pluginad/house_creatives.json").then((e=>(this.set("settings",t.default.create(e.settings)),e.house_ads.map((e=>t.default.create(e))))))},setupController(e,t){e.setProperties({model:t,houseAdsSettings:this.get("settings"),loadingAds:!1})}})})),define("discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=(0,s.createTemplateFactory)({id:"hUctnxvD",block:'[[[10,"section"],[14,0,"house-ads-settings content-body"],[12],[1,"\\n "],[10,0],[12],[1,[28,[35,0],["admin.adplugin.house_ads.description"],null]],[13],[1,"\\n\\n"],[41,[30,0,["houseAds","length"]],[[[1," "],[10,"form"],[14,0,"form-horizontal"],[12],[1,"\\n "],[1,[28,[35,2],null,[["name","value","allAds","adSettings"],["topic_list_top",[30,0,["adSettings","topic_list_top"]],[30,0,["houseAds"]],[30,0,["adSettings"]]]]]],[1,"\\n "],[1,[28,[35,2],null,[["name","value","allAds","adSettings"],["topic_above_post_stream",[30,0,["adSettings","topic_above_post_stream"]],[30,0,["houseAds"]],[30,0,["adSettings"]]]]]],[1,"\\n "],[1,[28,[35,2],null,[["name","value","allAds","adSettings"],["topic_above_suggested",[30,0,["adSettings","topic_above_suggested"]],[30,0,["houseAds"]],[30,0,["adSettings"]]]]]],[1,"\\n "],[1,[28,[35,2],null,[["name","value","allAds","adSettings"],["post_bottom",[30,0,["adSettings","post_bottom"]],[30,0,["houseAds"]],[30,0,["adSettings"]]]]]],[1,"\\n "],[1,[28,[35,2],null,[["name","value","allAds","adSettings"],["topic_list_between",[30,0,["adSettings","topic_list_between"]],[30,0,["houseAds"]],[30,0,["adSettings"]]]]]],[1,"\\n\\n "],[8,[39,3],[[24,0,"btn-default"]],[["@label","@icon","@action"],["admin.adplugin.house_ads.more_settings","cog",[28,[37,4],["moreSettings"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,2],[12],[1,"\\n"],[6,[39,5],null,[["route","model"],["adminPlugins.houseAds.show","new"]],[["default"],[[[[1," "],[1,[28,[35,0],["admin.adplugin.house_ads.get_started"],null]],[1,"\\n"]],[]]]]],[1," "],[13],[1,"\\n"]],[]]],[13],[1,[28,[32,0],["[[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `houseAds` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.houseAds}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `adSettings` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.adSettings}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],[],false,["i18n","if","house-ads-list-setting","d-button","route-action","link-to"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-index.hbs",scope:()=>[t.default],isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-show",["exports","@ember/template-factory"],(function(e,t){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=(0,t.createTemplateFactory)({id:"VRrchGuX",block:'[[[10,"section"],[14,0,"edit-house-ad content-body"],[12],[1,"\\n "],[10,"h1"],[12],[8,[39,0],[[24,0,"house-ad-name"]],[["@value"],[[30,0,["buffered","name"]]]],null],[13],[1,"\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[8,[39,1],null,[["@content","@mode"],[[30,0,["buffered","html"]],"html"]],null],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"controls"],[12],[1,"\\n "],[10,0],[14,0,"visibility-settings"],[12],[1,"\\n "],[10,0],[12],[1,"\\n "],[8,[39,2],[[24,0,"visible-to-logged-in-checkbox"]],[["@type","@checked"],["checkbox",[30,0,["buffered","visible_to_logged_in_users"]]]],null],[1,"\\n "],[10,1],[12],[1,[28,[35,3],["admin.adplugin.house_ads.show_to_logged_in_users"],null]],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[12],[1,"\\n "],[8,[39,2],[[24,0,"visible-to-anonymous-checkbox"]],[["@type","@checked"],["checkbox",[30,0,["buffered","visible_to_anons"]]]],null],[1,"\\n "],[10,1],[12],[1,[28,[35,3],["admin.adplugin.house_ads.show_to_anons"],null]],[13],[1,"\\n "],[13],[1,"\\n\\n "],[8,[39,4],[[24,0,"house-ads-categories"]],[["@categories","@selectedCategories","@onChange","@options"],[[30,0,["site","categories"]],[30,0,["selectedCategories"]],[30,0,["setCategoryIds"]],[28,[37,5],null,[["allowAny"],[true]]]]],null],[1,"\\n "],[10,0],[14,0,"description"],[12],[1,"\\n "],[1,[28,[35,3],["admin.adplugin.house_ads.category_chooser_description"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[8,[39,6],[[24,0,"banner-groups"]],[["@content","@onChange","@value"],[[30,0,["site","groups"]],[30,0,["setGroupIds"]],[30,0,["selectedGroups"]]]],null],[1,"\\n "],[10,0],[14,0,"description"],[12],[1,"\\n "],[1,[28,[35,3],["admin.adplugin.house_ads.group_chooser_description"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[8,[39,7],[[24,0,"btn-primary save-button"]],[["@action","@disabled","@label"],[[30,0,["save"]],[30,0,["disabledSave"]],"admin.adplugin.house_ads.save"]],null],[1,"\\n\\n"],[41,[30,0,["saving"]],[[[1," "],[1,[30,0,["savingStatus"]]],[1,"\\n"]],[]],[[[41,[51,[30,0,["disabledSave"]]],[[[1," "],[8,[39,7],null,[["@action","@label"],[[30,0,["cancel"]],"cancel"]],null],[1,"\\n"]],[]],null]],[]]],[1,"\\n "],[8,[39,7],null,[["@action","@label"],[[30,0,["openPreview"]],"admin.adplugin.house_ads.preview"]],null],[1,"\\n\\n "],[8,[39,7],[[24,0,"btn-danger delete-button"]],[["@action","@label"],[[30,0,["destroy"]],"admin.adplugin.house_ads.delete"]],null],[1,"\\n "],[13],[1,"\\n"],[13]],[],false,["text-field","ace-editor","input","i18n","house-ads-category-selector","hash","group-chooser","d-button","if","unless"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads-show.hbs",isStrictMode:!1})})),define("discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads",["exports","ember-this-fallback/deprecations-helper","@ember/template-factory"],(function(e,t,s){"use strict" +Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 +e.default=(0,s.createTemplateFactory)({id:"+vQOSVMD",block:'[[[10,0],[14,0,"adplugin-mgmt"],[12],[1,"\\n "],[10,"h1"],[12],[1,[28,[35,0],["admin.adplugin.house_ads.title"],null]],[13],[1,"\\n"],[41,[30,0,["model","length"]],[[[1," "],[10,0],[14,0,"content-list"],[12],[1,"\\n "],[10,0],[14,0,"house-ads-actions"],[12],[1,"\\n "],[8,[39,2],[[24,0,"btn btn-primary"]],[["@route","@model"],["adminPlugins.houseAds.show","new"]],[["default"],[[[[1,"\\n "],[1,[28,[35,3],["plus"],null]],[1,"\\n "],[10,1],[12],[1,[28,[35,0],["admin.adplugin.house_ads.new"],null]],[13],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[39,2],[[24,0,"btn btn-default"]],[["@route"],["adminPlugins.houseAds.index"]],[["default"],[[[[1,"\\n "],[1,[28,[35,3],["cog"],null]],[1,"\\n "],[10,1],[12],[1,[28,[35,0],["admin.adplugin.house_ads.settings"],null]],[13],[1,"\\n "]],[]]]]],[1,"\\n "],[13],[1,"\\n "],[10,"ul"],[14,0,"house-ads-list"],[12],[1,"\\n"],[42,[28,[37,5],[[28,[37,5],[[30,0,["model"]]],null]],null],null,[[[1," "],[10,"li"],[14,0,"house-ads-list-item"],[12],[1,"\\n"],[6,[39,2],null,[["route","model"],["adminPlugins.houseAds.show",[30,1,["id"]]]],[["default"],[[[[1," "],[1,[30,1,["name"]]],[1,"\\n"]],[]]]]],[1," "],[13],[1,"\\n"]],[1]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[46,[28,[37,7],null,null],null,null,null],[1,"\\n"],[13],[1,[28,[32,0],["[[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}],[\\"The `model` property path was used in the `discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads.hbs` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.model}}\\",false,{\\"id\\":\\"ember-this-fallback.this-property-fallback\\",\\"until\\":\\"n/a\\",\\"for\\":\\"ember-this-fallback\\",\\"url\\":\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\",\\"since\\":{\\"available\\":\\"0.2.0\\"}}]]"],null]]],["ad"],false,["i18n","if","link-to","d-icon","each","-track-array","component","-outlet"]]',moduleName:"discourse/plugins/discourse-adplugin/discourse/templates/admin/plugins-house-ads.hbs",scope:()=>[t.default],isStrictMode:!1})})) + +//# sourceMappingURL=discourse-adplugin_admin-7b04b998a509a21e40b53b51e3b58cf603473983f1c0d3d3cb9aba0ea211e300.map +//! + +;