1import{_ as L,S as O,k as w,l as D,q as S,F as I,a as Z,u as K,m as W,P as A,D as H,t as X,p as $,j as Q}from"./bk1iiYgR.js";import{_ as T}from"./COI0L8h3.js";import{_ as ee,a as te}from"./Gs1OmwKh.js";import{G as b,J as o,L as d,V as s,X as r,I as c,H as p,$ as C,P as k,aa as se,U as _,O as M,W as g,S as f,an as ie,ar as ne}from"./DycOzFlc.js";import{A as B}from"./CO8l2Uup.js";import{A as ae}from"./CvFz71td.js";import{c as oe}from"./D6TfdUPA.js";import{S as P}from"./D4r8OkwO.js";import{C as E}from"./DoMOaq14.js";import{c as N,a as j,b as R}from"./BPUCN6ph.js";import{_ as re}from"./Ob9YACld.js";import{_ as le,a as de,b as ce}from"./57HAGUGN.js";import{_ as ue,a as me,b as he,c as pe}from"./1mhjDx4r.js";import{_ as fe,a as ve}from"./CinNEYnf.js";import{C as _e}from"./DngV1vuK.js";import{C as ge}from"./BxBC6nmT.js";import"./DkDaE-7R.js";import"./DEp6hvKE.js";import"./Cfh3MTpZ.js";import"./BMWT-7Q-.js";import"./B0me4zUP.js";import"./BKPCUxlR.js";import"./D0WsFqW5.js";import"./DHF4M4F_.js";import"./UEjzanqP.js";import"./o9xoHpzM.js";import"./GWgvlDE7.js";import"./D70-H3z7.js";import"./CxZiWszh.js";import"./Deblih1f.js";import"./Fg8sd7pM.js";import"./BROFrszC.js";import"./KifeN_Pp.js";import"./D5AxVvGS.js";import"./BU-ALAIA.js";import"./BPuerLsk.js";import"./MNS_6Ta8.js";import"./Cjy2lmVg.js";import"./Y8tQDB0_.js";import"./BLZ_suTj.js";import"./CN76TyIY.js";import"./DPkM17DO.js";import"./DzRVbjWR.js";import"./L1tE2_sv.js";import"./DGEsS2lt.js";import"./x7UQqTqO.js";import"./Cp-lw7dz.js";import"./Bv-6YwmU.js";import"./Dl6E3Smh.js";import"./Bm-53dpl.js";import"./TE3-wjIu.js";import"./0N1LdZsX.js";import"./DYP1tec5.js";const we={name:"creative-list",components:{Search:P,skeleton:O,creativeListItem:oe},emits:["setCreative"],props:{picker:{type:Object,required:!0,default:{}},selectedCreative:{type:Object,default:{}},injectCreative:{type:Object,default:{}},campaignLoading:{type:Boolean,default:!0}},computed:{active_company:{get(){return w().get_active_company}},active_currency:function(){return this.active_company.details&&this.active_company.details.currency?this.active_company.details.currency:"USD"},auth_token:{get(){return w().token}},active_company_id:{get(){return w().get_active_company_id}},socket_data:{get(){return D().get_socket_data}},is_empty:function(){return!this.loading&&this.creatives.length===0}},data(){return{loading:!0,creatives:[],search:"",loadingMore:!1,currentPage:1,hasMoreData:!0,pageSize:15,controller:new AbortController}},created(){this.fetchCreatives()},methods:{fetchCreatives:async function(t=!1){var n,e;if(!t)this.creatives=[],this.loading=!0,this.currentPage=1,this.hasMoreData=!0;else{if(!this.hasMoreData||this.loadingMore)return;this.loadingMore=!0,this.currentPage++}try{this.controller=new AbortController;const i=this.controller.signal;let a=new Date;a.setDate(a.getDate()-1);let m=a.toISOString().split("T")[0];if(!((e=(n=this.picker)==null?void 0:n.campaigns_by_account)!=null&&e.length))return;const{data:h,status:u}=await S("analyze/creative-gallery",{method:"POST",body:JSON.stringify({pageOptions:{page_index:this.currentPage,page_per_view:this.pageSize,search:this.search,sort_by:"last_ai_creative.created_at",sort_direction:"desc"},filters:{start_date:"2022-01-01",end_date:m,accounts:this.picker.campaigns_by_account,business:{currency:this.active_currency},platform:"GOOGLE"},table_filters:[{key:"asset_type",operator:"IS_ONE_OF",first_value:["IMAGE"]}]}),signal:i});u&&h&&h.data&&(t?this.creatives=[...this.creatives,...h.data]:this.creatives=h.data,h.data.length<this.pageSize&&(this.hasMoreData=!1))}catch(i){console.log("error on fetch creatives: ",i)}finally{this.loading=!1,this.loadingMore=!1}},setCreative:function(t){this.$emit("setCreative",t);try{I.track("AI Creative Improve Image Clicked",{path:window.location.pathname})}catch(n){console.warn(n)}},updateCreative:function(t){const n=this.creatives.findIndex(e=>e.id===t.asset_id);n!==-1&&(this.creatives[n].last_ai_creative=t)},refreshCreatives:function(t){const n=this.creatives.findIndex(e=>e.id===t.asset_id);n!==-1&&(this.creatives[n].last_ai_creative=t.creative),t.status==="COMPLETED"&&this.selectedCreative&&this.selectedCreative.id===t.asset_id&&this.$router.push("/ai-creative/improve/"+this.selectedCreative.id)},handleScroll:function(t){const n=this.$refs.scrollContainer;if(n&&this.hasMoreData&&!this.loadingMore&&!this.loading){const{scrollTop:e,scrollHeight:i,clientHeight:a}=n;e+a>=i-100&&this.fetchCreatives(!0)}}},watch:{socket_data:{handler:function(t){t.asset_id&&t.creative&&this.refreshCreatives(t)}},search:function(){this.fetchCreatives()},injectCreative:function(){this.updateCreative(this.injectCreative)},picker:{handler:function(){this.fetchCreatives()},deep:!0,immediate:!0}}},Ce={class:"flex flex-col flex-grow h-full overflow-hidden"},ye={class:"px-[20px]"},ke={class:"mb-3 font-semibold text-base text-neutral-900"},xe={class:"relative w-full mb-3"},be={class:"absolute start-0 inset-y-0 flex items-center justify-center pl-[10px]"},Me={class:"grid grid-cols-3 gap-4 relative"},Ve={class:"rounded overflow-hidden"},$e={key:0,class:"absolute inset-0 bg-gradient-to-b from-white/40 to-white px-4 py-7"},Se={class:"text-center max-w-[300px] mx-auto"},Le={class:"text-base text-neutral-900 font-medium mb-2"},Ae={class:"text-[14px] text-neutral-800"},He={class:"rounded overflow-hidden"};function Ie(t,n,e,i,a,m){const h=T,u=b("Search"),v=b("creative-list-item"),x=b("skeleton");return o(),d("div",Ce,[s("div",ye,[s("h2",ke,r(t.$t("Select Creative for Improve")),1),s("div",xe,[c(h,{modelValue:a.search,"onUpdate:modelValue":n[0]||(n[0]=l=>a.search=l),placeholder:t.$t("Search in Existing Creatives"),class:"pl-[36px] pr-[12px] py-[8px] focus-visible:ring-0 border rounded text-neutral-700 placeholder:text-[14px] text-[14px] h-[40p
1x]"},null,8,["modelValue","placeholder"]),s("span",be,[c(u,{class:"size-4 text-neutral-800"})])])]),s("div",{ref:"scrollContainer",class:"overflow-auto flex-grow px-[20px] py-[8px]",onScroll:n[1]||(n[1]=(...l)=>m.handleScroll&&m.handleScroll(...l))},[s("div",Me,[!a.loading&&a.creatives.length>0?(o(!0),d(p,{key:0},C(a.creatives,l=>(o(),k(v,{creative:l,"selected-creative":e.selectedCreative,onSetCreative:m.setCreative},null,8,["creative","selected-creative","onSetCreative"]))),256)):(o(),d(p,{key:1},[(o(),d(p,null,C(12,l=>s("div",Ve,[c(x,{shimmer:!m.is_empty,class:"w-full aspect-square none-rounded-skeleton"},null,8,["shimmer"])])),64)),m.is_empty&&!e.campaignLoading?(o(),d("div",$e,[s("div",Se,[n[2]||(n[2]=se('<div class="flex justify-center mb-5"><div class="p-2 rounded-full border border-neutral-200"><svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="14.793" y="15.2412" width="1.7931" height="1.7931" fill="#627086"></rect><path d="M15.4539 9.75V10.55H17.0539V9.75H15.4539ZM9.75391 17.05H10.5539V15.45H9.75391V17.05ZM6.50391 10.8333L6.94767 10.1677C6.67895 9.98855 6.32887 9.98855 6.06015 10.1677L6.50391 10.8333ZM6.77474 5.97083C6.33291 5.97083 5.97474 6.32901 5.97474 6.77083C5.97474 7.21266 6.33291 7.57083 6.77474 7.57083V5.97083ZM6.78557 7.57083C7.2274 7.57083 7.58557 7.21266 7.58557 6.77083C7.58557 6.32901 7.2274 5.97083 6.78557 5.97083V7.57083ZM15.1706 14.5167L15.6342 13.8647C15.3902 13.6912 15.0698 13.6685 14.8038 13.8057C14.5377 13.943 14.3706 14.2173 14.3706 14.5167H15.1706ZM15.1706 17.9833H14.3706C14.3706 18.2827 14.5377 18.557 14.8038 18.6943C15.0698 18.8315 15.3902 18.8088 15.6342 18.6353L15.1706 17.9833ZM17.6081 16.25L18.0717 16.902C18.2827 16.7519 18.4081 16.509 18.4081 16.25C18.4081 15.991 18.2827 15.7481 18.0717 15.598L17.6081 16.25ZM3.35181 11.9732C2.98419 12.2183 2.88485 12.715 3.12993 13.0826C3.37501 13.4503 3.87171 13.5496 4.23933 13.3045L3.35181 11.9732ZM8.76848 13.3045C9.1361 13.5496 9.6328 13.4503 9.87788 13.0826C10.123 12.715 10.0236 12.2183 9.656 11.9732L8.76848 13.3045ZM4.33724 3.25V4.05H15.1706V3.25V2.45H4.33724V3.25ZM16.2539 4.33333H15.4539V9.75H16.2539H17.0539V4.33333H16.2539ZM4.33724 16.25V17.05H9.75391V16.25V15.45H4.33724V16.25ZM10.8372 9.75V10.55H21.6706V9.75V8.95H10.8372V9.75ZM10.8372 22.75V23.55H21.6706V22.75V21.95H10.8372V22.75ZM22.7539 10.8333H21.9539V21.6667H22.7539H23.5539V10.8333H22.7539ZM7.04557 6.77083H6.24557C6.24557 6.47858 6.48249 6.24167 6.77474 6.24167V7.04167V7.84167C7.36614 7.84167 7.84557 7.36224 7.84557 6.77083H7.04557ZM6.77474 7.04167V6.24167C7.06699 6.24167 7.30391 6.47858 7.30391 6.77083H6.50391H5.70391C5.70391 7.36224 6.18333 7.84167 6.77474 7.84167V7.04167ZM6.50391 6.77083H7.30391C7.30391 7.06308 7.06699 7.3 6.77474 7.3V6.5V5.7C6.18333 5.7 5.70391 6.17943 5.70391 6.77083H6.50391ZM6.77474 6.5V7.3C6.48249 7.3 6.24557 7.06308 6.24557 6.77083H7.04557H7.84557C7.84557 6.17943 7.36614 5.7 6.77474 5.7V6.5ZM6.77474 6.77083V7.57083H6.78557V6.77083V5.97083H6.77474V6.77083ZM15.1706 14.5167H14.3706V17.9833H15.1706H15.9706V14.5167H15.1706ZM15.1706 17.9833L15.6342 18.6353L18.0717 16.902L17.6081 16.25L17.1445 15.598L14.707 17.3314L15.1706 17.9833ZM17.6081 16.25L18.0717 15.598L15.6342 13.8647L15.1706 14.5167L14.707 15.1686L17.1445 16.902L17.6081 16.25ZM3.79557 12.6389L4.23933 13.3045L6.94767 11.499L6.50391 10.8333L6.06015 10.1677L3.35181 11.9732L3.79557 12.6389ZM3.25391 4.33333H2.45391V15.1667H3.25391H4.05391V4.33333H3.25391ZM6.50391 10.8333L6.06015 11.499L8.76848 13.3045L9.21224 12.6389L9.656 11.9732L6.94767 10.1677L6.50391 10.8333ZM9.75391 10.8333H8.95391V21.6667H9.75391H10.5539V10.8333H9.75391ZM21.6706 22.75V23.55C22.7107 23.55 23.5539 22.7068 23.5539 21.6667H22.7539H21.9539C21.9539 21.8231 21.8271 21.95 21.6706 21.95V22.75ZM10.8372 22.75V21.95C10.6808 21.95 10.5539 21.8231 10.5539 21.6667H9.75391H8.95391C8.95391 22.7068 9.7971 23.55 10.8372 23.55V22.75ZM4.33724 16.25V15.45C4.18076 15.45 4.05391 15.3231 4.05391 15.1667H3.25391H2.45391C2.45391 16.2068 3.2971 17.05 4.33724 17.05V16.25ZM21.6706 9.75V10.55C21.8271 10.55 21.9539 10.6769 21.9539 10.8333H22.7539H23.5539C23.5539 9.79319 22.7107 8.95 21.6706 8.95V9.75ZM15.1706 3.25V4.05C15.3271 4.05 15.4539 4.17685 15.4539 4.33333H16.2539H17.0539C17.0539 3.2932 16.2107 2.45 15.1706 2.45V3.25ZM10.8372 9.75V8.95C9.7971 8.95 8.95391 9.7932 8.95391 10.8333H9.75391H10.5539C10.5539 10.6769 10.6808 10.55 10.8372 10.55V9.75ZM4.33724 3.25V2.45C3.2971 2.45 2.45391 3.2932 2.45391 4.33333H3.25391H4.05391C4.05391 4.17685 4.18076 4.05 4.33724 4.05V3.25Z" fill="#627086"></path></svg></div></div>',1)),s("h3",Le,r(t.$t("No Creatives Available")),1),s("p",Ae,r(t.$t("Looks like there are no creatives for the selected campaigns. Add creatives in your ad platform to start generating recommendations.")),1)])])):_("",!0)],64)),a.loadingMore?(o(),d(p,{key:2},C(6,l=>s("div",He,[c(x,{class:"w-full aspect-square none-rounded-skeleton"})])),64)):_("",!0)])],544)])}
1const Ee=L(we,[["render",Ie]]),Ze={name:"creative-recom-card",props:{recommendation:{type:Object,required:!0,default:{}},loading:{type:Boolean,default:!1}}},Oe={class:"max-w-full"},De={class:"flex items-center gap-2 mb-[5px]"},Te={class:"text-[14px] font-medium text-neutral-900"},Be={class:"flex items-center gap-[2px]"},Pe={class:"text-[14px] text-neutral-800"};function Ne(t,n,e,i,a,m){const h=re;return o(),d("label",{class:M(["border rounded p-4 w-full flex items-center justify-between gap-4 hover:bg-neutral-50 cursor-pointer transition-all mb-4 last:mb-0",[e.recommendation.is_selected?"border-[#C638EA]":"border-neutral-200",e.loading?"opacity-50":"opacity-100"]])},[s("div",Oe,[s("div",De,[s("span",Te,r(e.recommendation.dimension),1),s("div",{class:M(["px-[10px] py-[2px] rounded-full border border-neutral-200 text-[14px] flex items-center whitespace-nowrap gap-[6px]",e.recommendation.effectiveness>2?"text-success-600":e.recommendation.effectiveness>1?"text-warning-600":"text-neutral-700"])},[s("span",Be,[(o(),d(p,null,C(3,u=>s("span",{class:M(["min-w-[2px] rounded-full h-[10px] bg-[red]",[e.recommendation.effectiveness===3&&u<=e.recommendation.effectiveness?"bg-success-600":"bg-neutral-300",e.recommendation.effectiveness===2&&u<=e.recommendation.effectiveness?"bg-warning-600":"bg-neutral-300",e.recommendation.effectiveness===1&&u<=e.recommendation.effectiveness?"bg-neutral-700":"bg-neutral-300"]])},null,2)),64))]),e.recommendation.effectiveness===3?(o(),d(p,{key:0},[g(r(t.$t("High-Impact")),1)],64)):e.recommendation.effectiveness===2?(o(),d(p,{key:1},[g(r(t.$t("Important")),1)],64)):(o(),d(p,{key:2},[g(r(t.$t("Optional")),1)],64))],2)]),s("div",Pe,r(e.recommendation.tip),1)]),c(h,{modelValue:e.recommendation.is_selected,"onUpdate:modelValue":n[0]||(n[0]=u=>e.recommendation.is_selected=u),disabled:e.loading,class:"fill-[#C638EA] data-[state=checked]:border-white w-[20px] h-[20px]"},null,8,["modelValue","disabled"])],2)}const G=L(Ze,[["render",Ne]]),je={name:"metric-select",components:{Button:Z,Check:_e,ChevronsUpDown:ge,Search:P},props:{modelValue:{type:Object,default:null},model_key:{type:String,default:""},btnClass:String,items:{type:Array,default:[]},placeholder:{type:String,default:"Select item"},searchPlaceholder:{type:String,default:"Search items"},emptyText:{type:String,default:"No items found."},rightSideBorder:{type:String,default:"border-solid"}},data(){return{isOpen:!1,selected_item:{}}},methods:{onItemSelect:function(t){this.selected_item=t,this.isOpen=!1}},watch:{selected_item:function(t){this.$emit("update:modelValue",t),this.$emit("updatedModel",{value:t,key:this.model_key})},modelValue:function(t){this.$emit("update:modelValue",t)}}},Re={class:"flex items-center text-sm text-neutral-900 font-medium truncate"},Ge={class:"truncate"},Ue={class:"flex items-center gap-2"},qe={class:"px-2 py-1"};function ze(t,n,e,i,a,m){const h=Z,u=le,v=fe,x=ve,l=b("Check"),V=ue,q=me,z=he,F=pe,Y=de,J=ce;return o(),k(J,{open:a.isOpen,"onUpdate:open":n[0]||(n[0]=y=>a.isOpen=y)},{default:f(()=>[c(u,{"as-child":"","child-class":"justify-between"},{default:f(()=>[c(h,{variant:"outline",class:M(["flex justify-between p-[14px] h-auto group w-full bg-white",e.btnClass]),disabled:t.$attrs.disabled},{default:f(()=>[s("div",Re,[s("div",Ge,r(t.$t(e.placeholder)),1)]),s("div",Ue,[s("div",{class:M(["text-sm font-medium truncate text-neutral-700 border-neutral-300 border-[1px] bg-white rounded-[8px]",e.rightSideBorder])},[s("div",qe,r(e.modelValue?e.modelValue.name:t.$t("Select")),1)],2),n[1]||(n[1]=s("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M6.03516 12L9.6816 8.35355C9.87687 8.15829 9.87687 7.84171 9.6816 7.64645L6.03516 4",stroke:"#627086","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])]),_:1},8,["class","disabled"])]),_:1}),c(Y,{class:"w-[300px] p-0 left-1 top-[-62px] md:absolute",align:"end"},{default:f(()=>[c(F,{"model-value":e.modelValue},{default:f(()=>[c(v,{placeholder:t.$t(e.searchPlaceholder)},null,8,["placeholder"]),c(z,null,{default:f(()=>
1[c(x,null,{default:f(()=>[g(r(t.$t("No results found.")),1)]),_:1}),c(q,null,{default:f(()=>[(o(!0),d(p,null,C(e.items,y=>(o(),k(V,{key:y.key,value:y.name,onSelect:Rt=>m.onItemSelect(y),class:"p-[10px] cursor-pointer flex justify-between items-center gap-2"},{default:f(()=>[s("span",null,r(y.name),1),a.selected_item===y.key?(o(),k(l,{key:0})):_("",!0)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value"])]),_:1})]),_:1},8,["open"])}const Fe=L(je,[["render",ze]]),Ye={name:"TargetAudiencePicker",components:{audienceSelect:Fe},props:{modelValue:{type:Object,default:{}},loading:{type:Boolean,default:!1}},data(){return{selectModels:[{model_key:"location",placeholder:"Country",searchPlaceholder:"Search in Countries",rightSideBorder:"border-solid",items:[{name:"Turkiye",key:"Turkiye"},{name:"Mexico",key:"mexico"},{name:"USA",key:"america"},{name:"Ireland",key:"ireland"},{name:"France",key:"France"}]},{model_key:"kpi_focus",placeholder:"Campaign Objective",searchPlaceholder:"Search in Campaign Objective",rightSideBorder:"border-dashed",items:[{name:this.$t("Impression"),key:"impression"},{name:this.$t("Click"),key:"click"},{name:this.$t("Lead"),key:"lead"},{name:this.$t("Purchase"),key:"purchase"}]},{model_key:"age",placeholder:"Age Range",searchPlaceholder:"Search in Age Range",rightSideBorder:"border-solid",items:[{name:"18-24 (Gen Z)",key:"18-24"},{name:"25â34 (Young Millennials)",key:"25-34"},{name:"35â44 (Mid Millennials)",key:"35-44"},{name:"45â54 (Older Millennials / Gen X)",key:"45-54"},{name:"55â64 (Boomers)",key:"55-64"},{name:"65+ (Seniors)",key:"65+"}]},{model_key:"gender",placeholder:"Gender",searchPlaceholder:"Search in Genders",rightSideBorder:"border-solid",items:[{name:this.$t("Male"),key:"male"},{name:this.$t("Female"),key:"female"}]},{model_key:"business_category",placeholder:"Audience Targeting",searchPlaceholder:"Search in Audience Targetings",rightSideBorder:"border-solid",items:[{key:"account_tax",name:this.$t("account_tax")},{key:"art_creative",name:this.$t("art_creative")},{key:"automotive",name:this.$t("automotive")},{key:"business_consultancy_services",name:this.$t("business_consultancy_services")},{key:"ecommerce",name:this.$t("ecommerce")},{key:"education",name:this.$t("education")},{key:"employment_services",name:this.$t("employment_services")},{key:"entertainment_media",name:this.$t("entertainment_media")},{key:"fashion_apparel",name:this.$t("fashion_apparel")},{key:"finance_insurance",name:this.$t("finance_insurance")},{key:"fmcg",name:this.$t("fmcg")},{key:"health_medical",name:this.$t("health_medical")},{key:"home_goods",name:this.$t("home_goods")},{key:"legal_services",name:this.$t("legal_services")},{key:"sports",name:this.$t("sports")},{key:"technology_startups",name:this.$t("technology_startups")},{key:"travel_hospitality",name:this.$t("travel_hospitality")},{key:"b2b_enterprise",name:this.$t("b2b_enterprise")},{key:"consumer_services",name:this.$t("consumer_services")},{key:"marketing_agency",name:this.$t("marketing_agency")},{key:"industrial_services",name:this.$t("industrial_services")},{key:"real_estate",name:this.$t("real_estate")},{key:"gaming",name:this.$t("gaming")}]}],outputModel:{location:{},kpi_focus:{},age:{},gender:{},business_category:{}},countries:null}},computed:{processedModelValue(){const t={};return this.modelValue&&this.selectModels.forEach(n=>{const e=n.model_key,i=this.modelValue[e];if(i){const a=this.findMatchingItem(n.items,i);t[e]=a}else t[e]=null}),t}},created(){this.countries=w().constants.countries},methods:{findMatchingItem(t,n){if(!t||!n)return null;let e=t.find(i=>i.key===n);if(e||(e=t.find(i=>i.name===n)),!e){const i=n.toLowerCase();e=t.find(a=>a.key.toLowerCase()===i||a.name.toLowerCase()===i)}return e||null},updateModel:function(t){this.outputModel[t.key]=t.value.name;const n={...this.modelValue};n[t.key]=t.value.name,this.$emit("update:modelValue",n)}},watch:{countries:function(){let t=[];for(const n in this.countries)this.countries.hasOwnProperty(n)&&t.push({key:n,name:this.countries[n]});this.selectModels[0].items=t}}},Je={class:"flex items-center justify-between mb-2"};function Ke(t,n,e,i,a,m){const h=b("audience-select");return o(),d("div",null,[s("label",Je,r(t.$t("Enrich Ad Creative Based on Custom Audiences")),1),s("div",null,[(o(!0),d(p,null,C(a.selectModels,u=>(o(),k(h,{modelValue:m.processedModelValue[u.model_key],"onUpdate:modelValue":v=>m.processedModelValue[u.model_key]=v,onUpdatedModel:m.updateModel,model_key:u.model_key,"right-side-border":m.processedModelValue[u.model_key]?"border-solid":"border-dashed",placeholder:u.placeholder,"search-placeholder":u.searchPlaceholder,items:u.items,disabled:e.loading,"btn-class":"first:rounded-t-md last:rounded-b-md rounded-none border-[1px] border-neutral-200 bg-white-50 last:border-b-[1px] border-b-[0]"},null,8,["modelValue","onUpdate:modelValue","onUpdatedModel","model_key","right-side-border","placeholder","search-placeholder","items","disabled"]))),256))])])}const U=L(Ye,[["render",Ke]]),We={class:"flex flex-col lg:min-h-screen lg:h-screen"},Xe={class:"bg-white border-neutral-900 h-full flex flex-col overflow-hidden"},Qe={class:"hidden lg:flex items-center flex-wrap gap-2 justify-between border-b border-neutral-200 px-[20px] pt-[15px] pb-[14px]"},et={class:"font-medium text-base"},tt={key:0,class:"h-full flex items-center justify-center"},st={class:"text-center"},it={class:"text-neutral-600"},nt={key:1,class:"h-full overflow-hidden"},at={class:"grid grid-cols-12 h-full overflow-hidden"},ot={class:"lg:col-span-5 xl:col-span-4 2xl:col-span-4 col-span-12 border-r border-neutral-200 flex order-2 lg:order-1 flex-col justify-between max-h-full overflow-hidden"},rt={class:"px-[20px] pt-[20px]"},lt={key:0,class:"border border-neutral-300 rounded p-4 shadow mb-4"},dt={class:"flex items-start justify-between gap-1 md:gap-3"},ct={class:"flex items-center gap-2"},ut={class:"text-[14px] text-neutral-700"},mt={class:"flex items-center gap-3 mb-3 overflow-hidden"},ht={class:"text-sm text-neutral-900 font-semibold truncate"},pt={class:"overflow-auto flex-grow px-[20px] py-[8px]"},ft={class:"rounded overflow-hidden mb-2"},vt={key:1,class:"flex flex-col overflow-auto flex-grow gap-[20px] p-[20px]"},_t={key:0,class:"border border-neutral-300 rounded p-4 shadow"},gt={class:"flex items-start justify-between gap-1 md:gap-3"},wt={class:"flex items-center gap-2"},Ct={class:"text-neutral-900 text-[14px] font-medium"},yt={class:"text-[14px] text-neutral-700"},kt={class:"flex items-center gap-3"},xt={class:"text-base text-neutral-900 font-semibold truncate"},bt={class:"flex items-center justify-between mb-2",for:"creative-new-cta-text"},Mt={class:"flex items-center justify-between mb-2",for:"creative-new-title"},Vt={class:"flex items-center justify-between mb-2",for:"creative-additional-prompt"},$t={class:"text-[14px] font-medium text-neutral-500"},St={class:"bg-neutral-50 rounded"},Lt=["disabled","placeholder"],At={key:2,class:"px-[20px] py-4 bg-white border-t border-neutral-200"},Ht={key:0},It={key:0,class:"rounded p-3 bg-neutral-50 border border-neutral-200 flex gap-3 mb-3 text-[14px] text-neutral-700"},Et={class:"text-neutral-700 text-[14px] font-medium truncate"},Zt={class:"text-neutral-700 text-[14px] font-medium truncate"},Ot={class:"text-neutral-700 text-[14px] font-medium truncate"},Dt={key:1},Tt={key:2,class:"flex gap-1 items-center justify-between w-full"},Bt={class:"flex items-center gap-1"},Pt={class:"flex items-center gap-1"},Nt={class:"lg:col-span-7 xl:col-span-8 2xl:col-span-8 col-span-12 h-full p-[20px] order-1 bg-dot-grid flex flex-col justify-between relative gap-3 max-h-full overflow-hidden"},jt={name:"ai-creative-improve-asset",components:{AppHeader:B,adPlatformAccountPicker:ae,creativeList:Ee,creativeBalance:E,creativeRecords:R,creativeTitle:N,creativeImage:j,creativeRecomCard:G,targetAudiencePicker:U,skeleton:O},data(){return{policy_warn:!1,page_loading:!0,redesign_loading:!1,waiting_redesign:!1,records:[],creative:null,creative_aspect_ratio:"square",generationStartedAt:null,info_boxes:{recom_info:!0,content_ratio_info:!0,exist_creative_info:!0}}},computed:{selected_recommendations:function(){let t=[];return this.creative&&this.creative.recommendations&&this.creative.recommendations.length>0&&(t=this.creative.recommendations.filter(n=>n.is_selected)),t},auth_token:{get(){return w().token}},active_company_id:{get(){return w().get_active_company_id}},selected_loading:function(){var t,n,e;return((t=this.creative)==null?void 0:t.status)==="GENERATING"||((n=this.creative)==null?void 0:n.status)==="IDLE"||((e=this.creative)==null?void 0:e.status)==="FAILED"},socket_data:{get(){return D().get_socket_data}},system_user:{get(){return w().get_user}},user_has_access:function(){return w().checkUserPermission(this.system_user,"ai_creative.manage")},button_validation:function(){var i,a,m,h,u,v;let t=!0,n=!0,e=!0;return((i=this.creative)==null?void 0:i.type)==="RECOMMENDATIONS"?t=((a=this.creative)==null?void 0:a.type)==="RECOMMENDATIONS"&&this.selected_recommendations.length>0:(n=((h=(m=this.creative)==null?void 0:m.details)==null?void 0:h.CTA_text)!=="",e=((v=(u=this.creative)==null?void 0:u.details)==null?void 0:v.headline_text)!==""),t&&n&&e},constant:{get(){return w().get_constants}}},created(){this.fetchAsset(),this.checkInfoBoxStatus()},methods:{fetchAsset:async function(){try{let t=(this._.provides[A]||this.$route).params.asset;const{data:n,status:e}=await S("ai-creatives/"+t,{});e&&n&&(this.records=n,this.records.forEach(i=>
1{i.recommendations&&i.recommendations.forEach(a=>{i.status==="COMPLETED"?a.is_selected=a.effectiveness===3:i.status==="GENERATING"&&(a.is_selected=a.effectiveness=!0)})}),n.length>0&&(this.creative=n[n.length-1]))}catch(t){console.log("error on fetch asset: ",t)}finally{this.page_loading=!1}},resetToInitialState:async function(){this.policy_warn=!1,this.page_loading=!0,this.redesign_loading=!1,this.waiting_redesign=!1,this.records=[],this.creative=null,this.creative_aspect_ratio="square",this.generationStartedAt=null,this.info_boxes={recom_info:!0,content_ratio_info:!0,exist_creative_info:!0},await this.fetchAsset()},reDesign:async function(){var t,n;if(this.creative&&(this.policy_warn=!1,H().checkUserCanMakeAICreative(((n=(t=this.constant.credits)==null?void 0:t.REDESIGN)==null?void 0:n.price)||5))){this.redesign_loading=!0,this.waiting_redesign=!0,this.creative.status="GENERATING",this.generationStartedAt=new Date().toISOString();try{let i=(this._.provides[A]||this.$route).params.asset,a={type:"REDESIGN",creative:this.creative,asset_id:i,recommendations:[]};this.creative.type==="RECOMMENDATIONS"&&(a.recommendations=this.selected_recommendations),this.creative.is_standard_size||(a.aspect_ratio=this.creative_aspect_ratio);const{status:m,data:h}=await S("ai-creatives",{method:"POST",body:JSON.stringify(a)});m&&h&&await this.fetchAsset()}catch(i){console.log(i)}finally{this.redesign_loading=!1}}},refreshData:async function(t){if(!(t!=null&&t.creative))return;const n=String((this._.provides[A]||this.$route).params.asset),e=t.asset_id&&String(t.asset_id)===n;let i=this.records.findIndex(a=>a.id===t.creative.id);if(i===-1&&e&&t.creative.status==="COMPLETED"&&(this.records.push(t.creative),i=this.records.length-1),i!==-1){if(t.creative&&t.creative.status==="COMPLETED"&&t.creative.generated_image_url)try{await fetch(t.creative.generated_image_url+"?id="+t.creative.id)}catch{}else t.status==="FAILED"&&(this.policy_warn=!0);this.records[i]=t.creative,this.creative=t.creative,this.waiting_redesign=!1,(t.creative.status==="COMPLETED"||t.status==="FAILED")&&(this.generationStartedAt=null)}await H().getCreditAmount()},setCreative:function(t){console.log("setCreative",t),t&&(this.creative=t)},upgradeCredit:function(){H().is_modal_active=!0},deleteCreative:async function(t){if(t&&t.id&&await X().ARE_YOU_SURE(this.$t("Delete Creative?"),this.$t("You cannot undo this action. Are you sure you want to delete?"),this.$t("Delete"),this.$t("Cancel"),"error")){const e=this.records.findIndex(i=>i.id===t.id);if(e!==-1){const{status:i}=await S("ai-creatives/"+t.id,{method:"DELETE"});i?(this.records[e].deleting=!0,this.records.splice(e,1),this.records.length>0&&this.creative.id===t.id&&(this.creative=this.records[this.records.length-1])):delete this.records[e].deleting}try{I.track("AI Creative Deleted",{path:window.location.pathname})}catch(i){console.warn(i)}}},checkInfoBoxStatus:function(){$("recom_info").value?this.info_boxes.recom_info=!1:this.info_boxes.recom_info=!0,$("content_ratio_info").value?this.info_boxes.content_ratio_info=!1:this.info_boxes.content_ratio_info=!0,$("exist_creative_info").value?this.info_boxes.exist_creative_info=!1:this.info_boxes.exist_creative_info=!0},hideInfoBox:function(t){$(t+"_info").value="hidden",this.info_boxes[t+"_info"]=!1},mixpanelEvent:function(t){if(this.creative_aspect_ratio!==t)try{I.track("AI Creative Aspect Ratio Changed",{path:window.location.pathname,size:t||"unknown"})}catch(n){console.warn(n)}},navigationChangeFunc(t){let n=this.records.findIndex(e=>e.id===this.creative.id);n!==-1&&(t==="next"?n+1<this.records.length&&(this.creative=this.records[n+1]):t==="prev"&&n-1>=0&&(this.creative=this.records[n-1]))}},watch:{socket_data:{handler:function(t){t.asset_id&&t.creative&&this.refreshData(t)}}}},Rs=Object.assign(jt,{setup(t){const{t:n}=K();return W({title:n("WASK - AI Creative - Asset")}),(e,i)=>{const a=Q,m=b("skeleton"),h=T,u=ee,v=te,x=Z;return o(),d("div",We,[s("div",Xe,[c(B,{title:e.$t("AI Improve")},{default:f(()=>[c(E)]),_:1},8,["title"]),s("div",Qe,[s("h1",et,r(e.$t("AI Improve")),1),c(E)]),e.page_loading?(
1o(),d("div",tt,[s("div",st,[i[12]||(i[12]=s("svg",{class:"animate-spin h-8 w-8 text-neutral-400 mx-auto mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[s("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),s("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),s("p",it,r(e.$t("Loading"))+"...",1)])])):(o(),d("div",nt,[s("div",at,[s("div",ot,[e.creative&&e.creative.type==="RECOMMENDATIONS"||e.creative&&e.creative.status==="GENERATING"&&e.creative.recommendations.length>0?(o(),d(p,{key:0},[s("div",rt,[e.info_boxes.recom_info?(o(),d("div",lt,[s("div",dt,[s("div",ct,[i[13]||(i[13]=s("div",{class:"w-4 h-4"},[s("svg",{class:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M12.832 8.66699C9.46239 8.95868 7.62371 10.7974 7.33203 14.167C7.02805 10.7449 5.19897 9.04836 1.83203 8.66699C5.25219 8.27251 6.93755 6.58715 7.33203 3.16699C7.7134 6.53393 9.40997 8.36301 12.832 8.66699Z",stroke:"#030018","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M13.001 1.05762C13.079 1.54515 13.2351 1.94433 13.4814 2.25391L13.6074 2.39746C13.9204 2.71608 14.3488 2.91596 14.9033 3C14.4332 3.0709 14.0466 3.22838 13.7451 3.47266L13.6025 3.60156C13.2841 3.92 13.0836 4.35428 13.001 4.90234C12.9289 4.42645 12.771 4.04386 12.5264 3.74707L12.3984 3.60645C12.0726 3.28645 11.6248 3.09057 11.0586 3C11.5528 2.92048 11.9482 2.7644 12.2529 2.51758L12.3926 2.3916C12.7127 2.07149 12.9087 1.63114 13.001 1.05762Z",fill:"#030018",stroke:"#030018","stroke-width":"0.444444"})])],-1)),s("p",ut,r(e.$t("These recommendations are based on the campaignâs target audience and preferences.")),1)]),s("div",{class:"cursor-pointer hover:bg-neutral-100 transition-all duration-400 rounded-md",onClick:i[0]||(i[0]=l=>e.hideInfoBox("recom"))},i[14]||(i[14]=[s("svg",{class:"m-1",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M2.76953 2.771L11.2279 11.2293M11.2279 2.771L2.76953 11.2293",stroke:"#030018","stroke-width":"1.5","stroke-linecap":"round"})],-1)]))])])):_("",!0),s("div",mt,[c(a,{to:"/ai-creative/improve",class:"border border-neutral-300 p-[7px] w-fit rounded-[124px] hover:bg-neutral-100 h-fit"},{default:f(()=>i[15]||(i[15]=[s("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M6.66667 3.8335L2.5 8.00015L6.66667 12.1668M3 8.00015H13.5",stroke:"#445469","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1}),s("h2",ht,r(e.$t("Recommendations for Your AD Creative")),1)])]),s("div",pt,[e.creative.recommendations?(o(!0),d(p,{key:1},C(e.creative.recommendations,l=>(o(),k(G,{recommendation:l,loading:e.selected_loading},null,8,["recommendation","loading"]))),256)):(o(),d(p,{key:0},C(9,l=>s("div",ft,[c(m,{class:"w-full",height:"100px"})])),64))])],64)):e.creative&&e.creative.details?(o(),d("div",vt,[e.info_boxes.exist_creative_info?(o(),d("div",_t,[s("div",gt,[s("div",null,[s("div",wt,[i[16]||(i[16]=s("svg",{class:"min-w-[16px]",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M7.16536 7.33301H7.99869L7.9987 10.833M14.1654 7.99967C14.1654 11.4054 11.4045 14.1663 7.9987 14.1663C4.59294 14.1663 1.83203 11.4054 1.83203 7.99967C1.83203 4.59392 4.59294 1.83301 7.9987 1.83301C11.4045 1.83301 14.1654 4.59392 14.1654 7.99967Z",stroke:"#030018","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M8.00098 4.7998C8.29542 4.7998 8.534 5.03861 8.53418 5.33301C8.53418 5.62756 8.29553 5.86621 8.00098 5.86621C7.70657 5.86604 7.46777 5.62745 7.46777 5.33301C7.46795 5.03871 7.70668 4.79998 8.00098 4.7998Z",fill:"#030018",stroke:"#030018","stroke-width":"0.4"})],-1)),s("h2",Ct,r(e.$t("Texts Adapted to Your Language")),1)]),s("p",yt,r(e.$t("CTA and headline texts are translated based on your language preferences.")),1)]),s("div",{class:"cursor-pointer hover:bg-neutral-100 transition-all duration-400 rounded-md",onClick:i[1]||(i[1]=l=>e.hideInfoBox("exist_creative"))},i[17]||(i[17]=[s("svg",{class:"m-1",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M2.76953 2.771L11.2279 11.2293M11.2279 2.771L2.76953 11.2293",stroke:"#030018","stroke-width":"1.5","stroke-linecap":"round"})],-1)]))])])):_("",!0),s("div",kt,[c(a,{to:"/ai-creative/improve",class:"border border-neutral-300 p-[7px] w-fit roun
1ded-[124px] hover:bg-neutral-100 h-fit"},{default:f(()=>i[18]||(i[18]=[s("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M6.66667 3.8335L2.5 8.00015L6.66667 12.1668M3 8.00015H13.5",stroke:"#445469","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),_:1}),s("h2",xt,r(e.$t("Creative Content")),1)]),s("div",null,[s("label",bt,r(e.$t("New CTA Text")),1),c(h,{modelValue:e.creative.details.CTA_text,"onUpdate:modelValue":i[2]||(i[2]=l=>e.creative.details.CTA_text=l),disabled:e.selected_loading,id:"creative-new-cta-text",placeholder:e.$t("New CTA Text")},null,8,["modelValue","disabled","placeholder"])]),s("div",null,[s("label",Mt,r(e.$t("New Title")),1),c(h,{modelValue:e.creative.details.headline_text,"onUpdate:modelValue":i[3]||(i[3]=l=>e.creative.details.headline_text=l),disabled:e.selected_loading,id:"creative-new-title",placeholder:e.$t("New Title")},null,8,["modelValue","disabled","placeholder"])]),s("div",null,[s("label",Vt,[g(r(e.$t("Additional Prompt"))+" ",1),s("span",$t,r(e.$t("Optional")),1)]),s("div",St,[ie(s("textarea",{"onUpdate:modelValue":i[4]||(i[4]=l=>e.creative.details.user_prompt=l),disabled:e.selected_loading,id:"creative-additional-prompt",rows:"4",placeholder:e.$t("Describe what you want")},null,8,Lt),[[ne,e.creative.details.user_prompt]])])]),c(U,{modelValue:e.creative.details.audience,"onUpdate:modelValue":i[5]||(i[5]=l=>e.creative.details.audience=l),loading:e.selected_loading},null,8,["modelValue","loading"])])):_("",!0),e.user_has_access?(o(),d("div",At,[e.creative&&e.creative.is_standard_size===!1?(o(),d("div",Ht,[e.info_boxes.content_ratio_info?(o(),d("div",It,[i[20]||(i[20]=s("div",{class:"min-w-[20px]"},[s("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M8.95964 9.16699H10.0013L10.0013 13.542M17.7096 10.0003C17.7096 14.2575 14.2585 17.7087 10.0013 17.7087C5.74411 17.7087 2.29297 14.2575 2.29297 10.0003C2.29297 5.74313 5.74411 2.29199 10.0013 2.29199C14.2585 2.29199 17.7096 5.74313 17.7096 10.0003Z",stroke:"#627086","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M9.99902 6.10742C10.3079 6.1076 10.5586 6.35808 10.5586 6.66699C10.5584 6.97575 10.3078 7.22639 9.99902 7.22656C9.69012 7.22656 9.43963 6.97586 9.43945 6.66699C9.43945 6.35798 9.69001 6.10742 9.99902 6.10742Z",fill:"#627086",stroke:"#627086","stroke-width":"0.285714"})])],-1)),s("span",null,r(e.$t("WASK supports only square (1:1), landscape (1536Ã1024), and portrait (1024Ã1536) ad creative formats. Please select an aspect ratio to proceed with the redesign.")),1),s("div",{class:"cursor-pointer hover:bg-neutral-100 transition-all duration-400 rounded-md h-fit",onClick:i[6]||(i[6]=l=>e.hideInfoBox("content_ratio"))},i[19]||(i[19]=[s("svg",{class:"m-1",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M2.76953 2.771L11.2279 11.2293M11.2279 2.771L2.76953 11.2293",stroke:"#030018","stroke-width":"1.5","stroke-linecap":"round"})],-1)]))])):_("",!0),c(v,{modelValue:e.creative_aspect_ratio,"onUpdate:modelValue":i[10]||(i[10]=l=>e.creative_aspect_ratio=l),disabled:e.selected_loading,class:"grid-cols-3 gap-0 border border-neutral-200 rounded mb-3"},{default:f(()=>[s("label",{onClick:i[7]||(i[7]=l=>e.mixpanelEvent("square")),class:"w-full border-r mb-0 border-neutral-200 p-3 flex flex-col 2xl:flex-row gap-3 items-start 2xl:items-center cursor-pointer",title:"Square"},[c(u,{id:"square",value:"square"}),s("span",Et,[g(r(e.$t("Square"))+" ",1),i[21]||(i[21]=s("br",null,null,-1)),i[22]||(i[22]=s("span",{class:"text-[12px]"},"1024x1024",-1))])]),s("label",{onClick:i[8]||(i[8]=l=>e.mixpanelEvent("landscape")),class:"w-full border-r mb-0 border-neutral-200 p-3 flex flex-col 2xl:flex-row gap-3 items-start 2xl:items-center cursor-pointer",title:"Landscape"},[c(u,{id:"landscape",value:"landscape"}),s("span",Zt,[g(r(e.$t("Landscape"))+" ",1),i[23]||(i[23]=s("br",null,null,-1)),i[24]||(i[24]=s("span",{class:"text-[12px]"},"1536x1024",-1))])]),s("label",{onClick:i[9]||(i[9]=l=>e.mixpanelEvent("portrait")),class:"w-full mb-0 p-3 flex flex-col 2xl:flex-row gap-3 items-start 2xl:items-center cursor-pointer",title:"Portrait"},[c(u,{id:"portrait",value:"portrait"}
1),s("span",Ot,[g(r(e.$t("Portrait"))+" ",1),i[25]||(i[25]=s("br",null,null,-1)),i[26]||(i[26]=s("span",{class:"text-[12px]"},"1024x1536",-1))])])]),_:1},8,["modelValue","disabled"])])):_("",!0),c(x,{size:"lg",block:"",variant:"gradient",class:"w-full",onClick:i[11]||(i[11]=l=>e.reDesign()),disabled:e.selected_loading||!e.button_validation},{default:f(()=>{var l,V;return[e.selected_loading&&!e.policy_warn?(o(),d(p,{key:0},[e.redesign_loading?(o(),d(p,{key:0},[g(r(e.$t("Preparing...")),1)],64)):(o(),d(p,{key:1},[g(r(e.$t("Generating"))+"...",1)],64)),i[27]||(i[27]=s("svg",{class:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[s("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),s("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))],64)):e.selected_loading&&e.policy_warn?(o(),d("span",Dt,r(e.$t("Generating Failed")),1)):(o(),d("div",Tt,[s("div",Bt,[i[28]||(i[28]=s("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M8.33081 3.11023C8.3022 2.85767 8.08867 2.66676 7.8345 2.6665C7.58032 2.66624 7.3664 2.85672 7.33728 3.10921C7.1479 4.75111 6.657 5.90564 5.86506 6.69758C5.07312 7.48952 3.91859 7.98042 2.2767 8.1698C2.0242 8.19892 1.83373 8.41284 1.83398 8.66702C1.83424 8.92119 2.02515 9.13472 2.27771 9.16333C3.89247 9.34623 5.07154 9.83693 5.88228 10.633C6.68998 11.4261 7.19112 12.5804 7.33595 14.2107C7.35888 14.4689 7.57533 14.6668 7.83455 14.6665C8.09376 14.6662 8.30977 14.4679 8.33212 14.2096C8.47093 12.6061 8.97161 11.4275 9.7833 10.6158C10.595 9.80412 11.7736 9.30345 13.3771 9.16464C13.6354 9.14229 13.8337 8.92628 13.834 8.66707C13.8343 8.40785 13.6364 8.1914 13.3782 8.16846C11.7479 8.02364 10.5936 7.5225 9.80049 6.7148C9.00441 5.90406 8.51371 4.72499 8.33081 3.11023Z",fill:"currentColor"}),s("path",{d:"M13.6939 0.839064C13.6827 0.740847 13.5997 0.666605 13.5008 0.666504C13.402 0.666403 13.3188 0.740475 13.3075 0.838669C13.2338 1.47718 13.0429 1.92617 12.735 2.23415C12.427 2.54212 11.978 2.73303 11.3395 2.80667C11.2413 2.818 11.1672 2.90119 11.1673 3.00004C11.1674 3.09888 11.2417 3.18192 11.3399 3.19305C11.9678 3.26418 12.4264 3.455 12.7417 3.76459C13.0558 4.07301 13.2506 4.5219 13.307 5.15593C13.3159 5.25634 13.4001 5.33328 13.5009 5.33317C13.6017 5.33306 13.6857 5.25592 13.6944 5.1555C13.7484 4.5319 13.9431 4.07357 14.2587 3.75791C14.5744 3.44225 15.0327 3.24754 15.6563 3.19356C15.7567 3.18486 15.8339 3.10086 15.834 3.00006C15.8341 2.89925 15.7572 2.81507 15.6567 2.80616C15.0227 2.74983 14.5738 2.55495 14.2654 2.24084C13.9558 1.92555 13.765 1.46703 13.6939 0.839064Z",fill:"currentColor"})],-1)),s("span",null,r(e.$t("Redesign Now")),1)]),s("div",Pt,[i[29]||(i[29]=s("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M11.5074 5.53594C10.7645 3.92812 9.13752 2.8125 7.25 2.8125C4.66117 2.8125 2.5625 4.91117 2.5625 7.5C2.5625 10.0471 4.59405 12.1197 7.12519 12.1859M16.4375 10.5C16.4375 13.0888 14.3388 15.1875 11.75 15.1875C9.75544 15.1875 8.05183 13.9418 7.3748 12.1859C7.17309 11.6627 7.0625 11.0943 7.0625 10.5C7.0625 7.9529 9.09405 5.88029 11.6252 5.81413C11.6667 5.81305 11.7083 5.8125 11.75 5.8125C14.3388 5.8125 16.4375 7.91117 16.4375 10.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"square"})],-1)),s("span",null,r((V=(l=e.constant.credits)==null?void 0:l.REDESIGN)==null?void 0:V.price),1)])]))]}),_:1},8,["disabled"])])):_("",!0)]),s("div",Nt,[e.policy_warn?_("",!0):(o(),k(N,{key:0,creative:e.creative,is_improve:!0},null,8,["creative"])),c(j,{creative:e.creative,records:e.records,"generation-started-at":e.generationStartedAt,onRefreshRecords:e.resetToInitialState,policy_warn:e.policy_warn,onNavigationChange:e.navigationChangeFunc},null,8,["creative","records","generation-started-at","onRefreshRecords","policy_warn","onNavigationChange"]),c(R,{records:e.records,creative:e.creative,onSetCreative:e.setCreative,onDeleteCreative:e.deleteCreative},null,8,["records","creative","onSetCreative","onDeleteCreative"])])])]))])])}}});
1export{Rs as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.