Initial commit

This commit is contained in:
gustavooth committed 2026-07-23 22:56:30 -03:00
commit 22a1006598
1816 files changed
+410742

No files matched your search

@@ -0,0 +1 @@
import{ay as t,at as e,j as a,k as s,E as i,h as n,i as o,aC as r,aB as l,aA as c,aD as d,aj as m,a4 as h,ag as _,y as u,aY as f,aJ as p,g}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as b,a6 as y,W as v,X as C,ab as w,Y as x,a5 as k,J as L,az as $,Z as T,aa as S,$ as E,a9 as A,a0 as I,a8 as V,ad as D,a7 as H,b2 as M,ax as B,av as R}from"../../../vendor.js?ver=3.1.8";import{E as O}from"../../../_eChart.js?ver=3.1.8";import{f as P,b as q,$ as F,d as j,g as W}from"../../../data_config.js?ver=3.1.8";import{_ as N,a as z,T as Z,I as G}from"../../../fc-bits-ui.js?ver=3.1.8";import{C as U}from"../../../CustomIcon.js?ver=3.1.8";import{C as K}from"../../../CalendarIcon.js?ver=3.1.8";import{B as Y}from"../../../Badge.js?ver=3.1.8";import{B as Q}from"../../../BaseCard.js?ver=3.1.8";import{f as J}from"../../../fluentcrm-logo.js?ver=3.1.8";const X=N({name:"SubscribersGrowth",components:{EChart:O},props:{date_range:{type:[String,Object,Array],required:!0}},data:()=>({fetching:!1,initialLoad:!0,stats:{},maxCumulativeValue:0,freshOptions:null,current_mode:"system"===Z.getCurrentTheme()?Z.getSystemTheme():Z.getCurrentTheme()}),mounted(){this.fetchReport(),this.onThemeChanged=t=>{var e;this.current_mode=(null==(e=t.detail)?void 0:e.effective)||Z.getCurrentTheme(),this.stats&&Object.keys(this.stats).length&&this.setupChartItems()},window.addEventListener(z,this.onThemeChanged)},beforeUnmount(){this.onThemeChanged&&window.removeEventListener(z,this.onThemeChanged)},watch:{date_range(){this.fetchReport()}},methods:{fetchReport(){this.fetching=!0,this.$get("reports/subscribers",{date_range:this.date_range}).then(t=>{var e,a;this.stats=(null==(a=null==(e=t.data_sets)?void 0:e[0])?void 0:a.data)||{},this.setupChartItems()}).finally(()=>{this.fetching=!1,this.initialLoad=!1})},setupChartItems(){const t=[],e={label:this.$t("By Date"),backgroundColor:"#ff7f0e",borderColor:"#ff7f0e",data:[],fill:!1,type:"line"},a={label:this.$t("Cumulative"),backgroundColor:"rgba(111, 66, 193, 0.1)",borderColor:"#6f42c1",data:[],type:"line"};let s=0;this.each(this.stats,(i,n)=>{e.data.push(i),t.push(n),s+=parseInt(i,10),a.data.push(s)});const i=/^[A-Za-z]{3} \d{4}$/;t.every(t=>i.test(t))||t.sort(),this.maxCumulativeValue=s+10;const n=q(t,this.date_range);this.renderChart(n,e,a)},renderChart(t,e,a){const s=this.date_range;this.freshOptions={tooltip:{show:!0,showContent:!0,appendToBody:!0,confine:!1,triggerOn:"mousemove|click",transitionDuration:.1,trigger:"axis",backgroundColor:"light"===this.current_mode?"#ffffff":"#283b56",borderColor:"light"===this.current_mode?"#ffffff":"#283b56",borderWidth:1,color:"#ffffff",formatter:t=>{const e=t[0]&&t[0].axisValue;return P(e,s)+"<br/>"+t.map(t=>`<span style="display:inline-block;margin-right:4px;border-radius:4px;width:10px;height:10px;background-color:${t.color};"></span>`+" "+t.seriesName+": "+t.value).join("<br/>")},axisPointer:{type:"cross",label:{backgroundColor:"#283b56"},crossStyle:{color:"#999"}},extraCssText:"z-index:10000; pointer-events:auto;",textStyle:{color:"light"===this.current_mode?"#0E121B":"#ffffff"}},legend:{top:10,left:"center",data:[e.label,a.label],icon:"roundRect",itemWidth:12,itemHeight:12,itemGap:20,textStyle:{color:"light"===this.current_mode?"#0E121B":"#ffffff"}},grid:{top:40,left:40,right:40,bottom:40,containLabel:!0},xAxis:{type:"category",data:t,axisPointer:{type:"shadow"},splitLine:{show:!1},axisLabel:{color:"light"===this.current_mode?"#0E121B":"#9CA3AF"}},yAxis:[{type:"value",min:0,name:e.label,minInterval:1,axisLabel:{formatter:t=>Number.isInteger(t)?t:""},splitLine:{lineStyle:{color:"light"===this.current_mode?"#E1E4EA":"#2c3c4e",type:"dashed"}}},{type:"value",min:0,name:a.label,max:this.maxCumulativeValue||null,minInterval:1,axisLabel:{formatter:t=>Number.isInteger(t)?t:""},splitLine:{lineStyle:{color:"light"===this.current_mode?"#E1E4EA":"#2c3c4e",type:"dashed"}}}],series:[{name:e.label,type:"line",data:e.data,yAxisIndex:0,itemStyle:{color:e.backgroundColor},emphasis:{focus:"series"}},{name:a.label,type:"line",data:a.data,yAxisIndex:1,smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:a.borderColor},lineStyle:{color:a.borderColor,width:2}}]}}}},[["render",function(e,a,s,i,n,o){const r=b("EChart"),l=t;return y((v(),C("div",null,[w(r,{options:n.freshOptions},null,8,["options"])])),[[l,n.fetching&&!n.initialLoad]])}]]);const tt=N({name:"email-sent-growth",props:["date_range"],components:{EChart:O},data:()=>({fetching:!1,initialLoad:!0,stats:{},maxCumulativeValue:0,freshOptions:null,current_mode:"system"===Z.getCurrentTheme()?Z.getSystemTheme():Z.getCurrentTheme()}),computed:{},methods:{fetchReport(){this.fetching=!0,this.$get("reports/email-sents",{date_range:this.date_range}).then(t=>{this.stats=t.stats,this.setupChartItems()}).finally(()=>{this.fetching=!1,this.initialLoad=!1})},setupChartItems(){const t=[],e={label:this.$t("By Date"),borderColor:"#ff7f0e",data:[]},a={label:this.$t("Cumulative"),borderColor:"#6f42c1",data:[]};let s=0;this.each(this.stats,Line truncated
@@ -0,0 +1 @@
import{W as s,X as e,Z as r,aa as t}from"../../../vendor.js?ver=3.1.8";import{_ as n}from"../../../fc-bits-ui.js?ver=3.1.8";import"../../../vendor-element-plus.js?ver=3.1.8";const i={class:"fcrm_no_permission text-align-center"};const o=n({},[["render",function(n,o){return s(),e("div",i,[r("h3",null,t(n.$t("permission.title")),1),r("p",null,t(n.$t("permission.desc")),1)])}]]);export{o as default};
@@ -0,0 +1 @@
import{e,k as t,ay as s}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as c,W as a,X as i,Z as d,ab as o,a5 as n,a6 as r,Y as l,aa as h,a9 as _,ax as u,J as m,az as g,c7 as f}from"../../../vendor.js?ver=3.1.8";import{_ as p,I as x}from"../../../fc-bits-ui.js?ver=3.1.8";import{B as k}from"../../../BaseCard.js?ver=3.1.8";const I={class:"fcrm_docs_wrapper"},b={class:"fcrm_max_w_800"},v={class:"fcrm_docs_section_header_input"},y={class:"icon"},w={class:"fcrm_docs_section_content"},D={href:"https://fluentcrm.com/docs"},$={href:"https://wpmanageninja.com/support-tickets/"},T={class:"fcrm_docs_hint"},L={target:"_blank",rel:"noopener",href:"https://www.facebook.com/groups/fluentcrm"},C={key:0},H=["href"],M=["innerHTML"],S={class:"simple_dic"},j=["href"],B=["innerHTML"],E={key:1,class:"fcrm_docs_lists"},N={key:0},P=["href"],V=["onClick","innerHTML"],A={key:1},R=["innerHTML"],W=["href"],Y=["onClick","innerHTML"];const z=p({name:"Documentations",components:{Icons:x,BaseCard:k},data:()=>({search:"",fetching:!1,docs:[],utl_param:"?utm_source=wp&utm_medium=doc&utm_campaign=doc",reading_doc_status:!1,reading_doc:{},fuseDocs:null}),computed:{doc_cats(){if(!this.docs.length)return[];const e={item_3:{label:this.$t("Getting Started With Audience"),docs:[]},item_7:{label:this.$t("Grow Your Audience"),docs:[]},item_4:{label:this.$t("Email Campaign"),docs:[]},item_5:{label:this.$t("Automation Funnels"),docs:[]}};return this.each(this.docs,t=>{const s="item_"+t.category.value;e[s]||(e[s]={label:t.category.label,cat_id:t.category.value,docs:[]}),e[s].docs.push(t)}),Object.values(e)},search_items(){if(!this.search||!this.docs.length||!this.fuseDocs)return[];return this.fuseDocs.search(this.search).map(e=>e.item)}},methods:{openSearch(){},fetchDocs(){this.fetching=!0,this.$get("docs").then(e=>{this.docs=e.docs,this.fuseDocs=new f(this.docs,{keys:["title","content"]})}).catch(e=>{this.handleError(e)}).finally(()=>{this.fetching=!1})},readDoc(e,t,s,c=!1){const a=document.getElementById("doc_search_end");a&&a.scrollIntoView(),this.reading_doc={doc:e,docIndex:t,catIndex:s,isSearch:c},this.reading_doc_status=!0},goToNext(){if(this.reading_doc.isSearch)return this.search_items[this.reading_doc.docIndex+1]?this.readDoc(this.search_items[this.reading_doc.docIndex+1],this.reading_doc.docIndex+1,0,!0):(this.reading_doc_status=!1,this.search=""),!1;this.doc_cats[this.reading_doc.catIndex].docs[this.reading_doc.docIndex+1]?this.readDoc(this.doc_cats[this.reading_doc.catIndex].docs[this.reading_doc.docIndex+1],this.reading_doc.docIndex+1,this.reading_doc.catIndex):this.doc_cats[this.reading_doc.catIndex+1]&&this.doc_cats[this.reading_doc.catIndex+1].docs[0]?this.readDoc(this.doc_cats[this.reading_doc.catIndex+1].docs[0],0,this.reading_doc.catIndex+1):this.reading_doc_status=!1},goToPrev(){if(this.reading_doc.isSearch)return this.search_items[this.reading_doc.docIndex-1]?this.readDoc(this.search_items[this.reading_doc.docIndex-1],this.reading_doc.docIndex-1,0,!0):(this.reading_doc_status=!1,this.search=""),!1;if(this.doc_cats[this.reading_doc.catIndex].docs[this.reading_doc.docIndex-1])this.readDoc(this.doc_cats[this.reading_doc.catIndex].docs[this.reading_doc.docIndex-1],this.reading_doc.docIndex-1,this.reading_doc.catIndex);else if(this.doc_cats[this.reading_doc.catIndex-1]&&this.doc_cats[this.reading_doc.catIndex-1].docs.length){const e=this.reading_doc.catIndex-1,t=this.doc_cats[e].docs.length-1;this.readDoc(this.doc_cats[e].docs[t],t,e)}else this.reading_doc_status=!1}},mounted(){this.fetchDocs()}},[["render",function(f,p,x,k,z,G){const J=c("Icons"),q=t,F=e,O=c("base-card"),Q=s;return a(),i("div",I,[d("div",b,[o(O,null,{body:n(()=>[d("div",v,[r((a(),l(F,{clearable:"",disabled:z.fetching,size:"large",modelValue:z.search,"onUpdate:modelValue":p[1]||(p[1]=e=>z.search=e),placeholder:f.$t("Search Type and Enter...")},{prefix:n(()=>[o(q,{onClick:p[0]||(p[0]=e=>z.reading_doc_status=!1)},{default:n(()=>[d("span",y,[o(J,{"icon-name":"search"})])],void 0,!0),_:1})]),_:1},8,["disabled","modelValue","placeholder"])),[[Q,z.fetching]])]),d("div",w,[d("h1",null,h(f.$t("How can we help you?")),1),d("p",null,[_(h(f.$t("Please view the"))+" ",1),d("a",D,h(f.$t("documentation")),1),_(" "+h(f.$t("still_cant_find_the_answer"))+" ",1),d("a",$,h(f.$t("open a support ticket")),1),_(" "+h(f.$t("and we will be happy to answer your questions and assist you with any problems."))+". ",1)]),d("p",T,[_(h(f.$t("Want to discuss something with users like you?"))+" ",1),d("a",L,h(f.$t("Join our facebook community")),1)])])]),_:1}),z.reading_doc_status?(a(),i("div",C,[o(O,{class:"fcrm_reading_doc_card"},{title:n(()=>[d("h4",null,[d("a",{class:"external-link d-flex items-center gap-4",rel:"noopener",target:"_blank",href:z.reading_doc.doc.link+z.utl_param},[d("span",{innerHTML:z.reading_doc.doc.title},null,8,M),o(J,{"icon-name":"externalLink"})],8,H)])]),body:n(()=>[d("div",S,[p[6]||(p[6]=_(" You are reading the simple version of this document. ",-1)),d("a",{target:"Line truncated
@@ -0,0 +1 @@
import{aI as e,aB as t,aC as a,aH as i,c as l,aJ as s,k as n,ay as r,aK as o,aL as c,e as d,E as m,n as h}from"../../../vendor-element-plus.js?ver=3.1.8";import{W as p,Y as u,a5 as _,ab as f,Z as g,aQ as v,X as b,a9 as y,aa as w,a8 as x,ay as $,a6 as C,J as E,az as S,b2 as k}from"../../../vendor.js?ver=3.1.8";import{P as T}from"../../../PaginationBar.js?ver=3.1.8";import F from"./Campaigns/_components/EmailPreview.js?ver=3.1.8";import{T as A}from"../../../TopNav.js?ver=3.1.8";import{_ as j,I as B,a as P,T as D}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as V}from"../../../PageHeader.js?ver=3.1.8";import{D as z}from"../../../DataTable.js?ver=3.1.8";import{F as I}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import L from"../../../v3app/src/Modules/Contacts/Filter/FilterPopover.js?ver=3.1.8";import R from"../../../v3app/src/Modules/Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";import{B as H}from"../../../Badge.js?ver=3.1.8";import"../../../PreviewIframeBuilder.js?ver=3.1.8";const K={class:"fcrm_contact_cell"},M={class:"fcrm_contact_info"},N={class:"fcrm_contact_name fcrm_mb_4"},U={class:"fcrm_contact_email"},J={style:{display:"flex","align-items":"center",gap:"6px"}};const Y={class:"fcrm_all_email_activities_page"},Q={class:"fcrm_page_header_top_nav_wrapper"},W={class:"fcrm_page_header_top_nav"},X={class:"fcrm-layout-width"},Z={key:0},q={class:"icon"},G={class:"fcrm_empty_state"},O={class:"fcrm_empty_state_text"},ee=["title","src","alt"],te={class:"fcrm_contact_info"},ae={class:"fcrm_contact_name"},ie={class:"fcrm_contact_email"},le={key:1},se={key:0},ne={key:1},re=["title"],oe={key:0,class:"fcrm_table_body_actions justify-center"},ce={class:"icon"},de={class:"icon"},me={class:"fcrm_bulk_action_bar"},he={class:"fcrm_bulk_action_left"},pe={class:"fc_bulk_selection_count"},ue={class:"icon"};const _e=j({name:"AllEmails",components:{Badge:H,ActiveFiltersBar:R,AllEmailsLoader:j({name:"AllEmailsLoader"},[["render",function(l,s,n,r,o,c){const d=a,m=t,h=e,v=i;return p(),u(v,{style:{width:"100%"},data:[1,2,3,4,5,6,7,8]},{default:_(()=>[f(h,{type:"selection",width:"55",fixed:""},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"button",style:{width:"20px",height:"20px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1}),f(h,{label:l.$t("Contact"),width:"240"},{default:_(()=>[g("div",K,[f(m,{animated:"",style:{width:"36px",flex:"none"}},{template:_(()=>[f(d,{variant:"circle",style:{width:"36px",height:"36px","border-radius":"50%"}})]),_:1}),g("div",M,[g("div",N,[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"100px",height:"17px","border-radius":"6px"}})]),_:1})]),g("div",U,[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"60px",height:"17px","border-radius":"6px"}})]),_:1})])])])],void 0,!0),_:1},8,["label"]),f(h,{label:l.$t("Subject")},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"100px",height:"17px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1},8,["label"]),f(h,{label:l.$t("Source")},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"100px",height:"17px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1},8,["label"]),f(h,{width:"180",label:l.$t("Type")},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"120px",height:"17px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1},8,["label"]),f(h,{width:"120",label:l.$t("Status")},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"80px",height:"17px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1},8,["label"]),f(h,{width:"180",label:l.$t("Sending Time")},{default:_(()=>[f(m,{animated:""},{template:_(()=>[f(d,{variant:"text",style:{width:"130px",height:"17px","border-radius":"6px"}})]),_:1})],void 0,!0),_:1},8,["label"]),f(h,{label:l.$t("Preview"),fixed:"right",width:"150",align:"center"},{default:_(()=>[f(m,{animated:""},{template:_(()=>[g("div",J,[f(d,{variant:"text",style:{width:"60px",height:"24px","border-radius":"6px"}}),f(d,{variant:"text",style:{width:"60px",height:"24px","border-radius":"6px"}})])]),_:1})],void 0,!0),_:1},8,["label"])],void 0),_:1})}]]),FilterPopover:L,Icons:B,PageHeader:V,TopNav:A,PaginationBar:T,EmailPreview:F,DataTable:z,FloatingBulkActionShell:I,Close:l},data:()=>({emails:[],pagination:{total:0,per_page:10,current_page:1},loading:!0,preview:{id:null,isVisible:!1},resending:!1,selections:[],deleting:!1,statuses:null,selectStatus:"",search:"",types:[],selectedFilters:{types:[]},current_mode:"system"===D.getCurrentTheme()?D.getSystemTheme():D.getCurrentTheme()}),methods:{fetchEmails(){this.loading=!0,this.storage.set("all_emails_perpage",this.pagination.per_page);const e={per_page:this.pagination.per_page,page:this.pagination.current_page,status:this.selectStatus,search:this.search,types:this.selectedFilters.types};this.$get("reports/emails",e).then(e=>{this.emails=e.emails.data,e.statuses&&(this.statuses=e.statuses),e.types&&(this.types=Line truncated
@@ -0,0 +1 @@
import{ax as e,k as t,ay as i,av as a,D as s,aB as n,aH as r,aI as c,e as l,W as o,a2 as p,E as d,aJ as m,aF as _,aE as g,aY as h,g as u,aZ as v,a_ as f,ap as b}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as w,X as S,ab as C,a5 as $,Y as T,Z as k,a9 as j,aa as E,a6 as x,a8 as D,ay as R,J as P,az as I,b2 as B,a0 as N,av as V}from"../../../../vendor.js?ver=3.1.8";import{E as O}from"../../../../EmailSubjects.js?ver=3.1.8";import{_ as M,I as A}from"../../../../fc-bits-ui.js?ver=3.1.8";import{E as F}from"../../../../BlockComposer.js?ver=3.1.8";import{B as Y}from"../../../../BaseCard.js?ver=3.1.8";import{R as J}from"../../../../RecipientTaggerForm.js?ver=3.1.8";import{R as z}from"../../../../ReadableRecipientTagger.js?ver=3.1.8";import{S as U}from"../../../../TestEmail.js?ver=3.1.8";import{P as H}from"../../../../PaginationBar.js?ver=3.1.8";import{D as L}from"../../../../DataTable.js?ver=3.1.8";import{g as W}from"../../../../relations.js?ver=3.1.8";import{P as q}from"../../../../PreviewIframeBuilder.js?ver=3.1.8";import{c as K,h as G}from"../../../../data_config.js?ver=3.1.8";import{C as Q}from"../../../../CampaignSubjectLines.js?ver=3.1.8";import{C as Z}from"../../../../Confirm.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../_MailerConfig.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const X={class:"fcrm_campaign_email_subject_settings"};const ee=M({name:"CampaignTemplate",props:["campaign","label_align"],components:{EmailSubjects:O}},[["render",function(t,i,a,s,n,r){const c=y("email-subjects"),l=e;return w(),S("div",X,[C(l,{"label-position":"top",model:a.campaign},{default:$(()=>[C(c,{mailer_settings:!0,multi_subject:!0,label_align:"top",campaign:a.campaign},null,8,["campaign"])],void 0),_:1},8,["model"])])}]]),te={class:"template"};const ie=M({name:"CampaignBodyTemplate",props:["campaign","extra_tags"],emits:["getVisualData","next","prev"],components:{BaseCard:Y,EmailBlockComposer:F},data:()=>({loading:!1}),computed:{hideComposerNext(){const e=(window.fcAdmin&&window.fcAdmin.email_template_designs||{})[this.campaign.design_template];return!(!e||e.use_gutenberg)}},methods:{nextStep(){if(!this.campaign.email_body)return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peb"),offset:19});this.updateCampaign(e=>{this.$emit("next")})},updateCampaign(e){this.loading=!0;const t=JSON.parse(JSON.stringify(this.campaign));delete t.template;const i={next_step:1,title:t.title,email_subject:t.email_subject,email_pre_header:t.email_pre_header,settings:t.settings,design_template:t.design_template,email_body:t.email_body,template_id:t.template_id,campaign_id:this.campaign.id};t._visual_builder_design&&"visual_builder"==t.design_template&&(i._visual_builder_design_string=JSON.stringify(t._visual_builder_design)),this.$post("campaigns/update-single-campaign",i).then(t=>{e?e(t):this.$notify.success({message:this.$t("Cam_Email_bsu")})}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},updateCampaignAjax(e){this.loading=!0;const t=JSON.parse(JSON.stringify(this.campaign));delete t.template;const i={next_step:1,title:t.title,email_subject:t.email_subject,email_pre_header:t.email_pre_header,settings:t.settings,design_template:t.design_template,email_body:t.email_body,template_id:t.template_id};t._visual_builder_design&&"visual_builder"==t.design_template&&(i._visual_builder_design_string=JSON.stringify(t._visual_builder_design)),window.jQuery.post(window.ajaxurl,{action_data:JSON.stringify(i),campaign_id:t.id,action:"fluentcrm_save_campaign_email_body",_nonce:window.fcAdmin.ajax_nonce,query_timestamp:Date.now()}).then(t=>{e?e(t):this.$notify.success({message:this.$t("Cam_Email_bsu")})}).catch(e=>{this.handleError(e.responseJSON)}).always(()=>{this.loading=!1})},maybeUpdateCampaign(){"visual_builder"==this.campaign.design_template?this.$bus.emit("getVisualData",{reference:"save"}):this.updateCampaign()},goBack(){this.$emit("prev")},maybeNextStep(){if("visual_builder"==this.campaign.design_template){const e=this;this.$bus.emit("getVisualData",{callback:function(t){e.nextStep()},reference:"update_only"})}else this.nextStep()},initKeyboardSave(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),this.maybeUpdateCampaign())}},mounted(){document.addEventListener("keydown",this.initKeyboardSave)},beforeDestroy(){document.removeEventListener("keydown",this.initKeyboardSave)}},[["render",function(e,i,a,s,n,r){const c=t,l=y("email-block-composer"),o=y("base-card");retLine truncated
@@ -0,0 +1 @@
import{S as e,R as t,_ as a}from"../../../../fc-bits.js?ver=3.1.8";import{a6 as s,aj as i,n as l,aL as n,aK as o,ay as r,E as c,k as d,i as p,aG as m,az as h,a7 as u,L as _,c as g,o as f,a5 as b,a4 as y,a3 as C,D as v,j as w,h as k,e as $,aI as S,aJ as F,aQ as D,aH as A,aB as P,aR as x,aS as q,g as L,ax as T,aw as V,aE as B,aF as E,aT as O}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as j,W as I,X as R,Z as M,ab as N,a5 as U,Y as z,a8 as H,J as G,az as Q,$ as Y,aa as J,a6 as Z,a9 as W,_ as K,bU as X,ac as ee,b2 as te,ax as ae,bS as se,bV as ie,bT as le,bW as ne}from"../../../../vendor.js?ver=3.1.8";import{C as oe}from"../../../../Confirm.js?ver=3.1.8";import{P as re}from"../../../../PaginationBar.js?ver=3.1.8";import{I as ce}from"../../../../InlineDoc.js?ver=3.1.8";import{_ as de,I as pe,a as me,T as he}from"../../../../fc-bits-ui.js?ver=3.1.8";import{E as ue}from"../../../../EmailPreview.js?ver=3.1.8";import{T as _e}from"../../../../TopNav.js?ver=3.1.8";import{B as ge}from"../../../../Badge.js?ver=3.1.8";import{P as fe}from"../../../../PageHeader.js?ver=3.1.8";import{F as be}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{F as ye}from"../../../../Filterer2.js?ver=3.1.8";import{e as Ce}from"../../../../data_config.js?ver=3.1.8";import{P as ve}from"../../../../PromoCard.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";const we={name:"BulkCampaignActions",components:{Check:i,Delete:s},props:{selectedCampaigns:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})},filters:{type:Object,default:()=>({})},allSelected:{type:Boolean,default:!1},theme_mode:{type:String,default:""}},emits:["refetch"],watch:{"select_job.action_name"(e){"apply_labels"!==e&&(this.selectedLabels=[])}},computed:{bulkSelectPopperClass(){return"dark"===this.theme_mode?"fcrm-force-light":"fcrm-dark"},bulkSelectWordbreakPopperClass(){return"dark"===this.theme_mode?"fcrm_select_options_wordbreak fcrm-force-light":"fcrm_select_options_wordbreak fcrm-dark"}},data:()=>({select_job:{action_name:"",selected_options:[]},doing_action:!1,selectedLabels:[]}),methods:{doApplyLabels(){this.selectedLabels.length&&this.doBulkAction("apply_labels")},confirmAndDeleteCampaigns(){l.confirm(this.$t("Are you sure you want to delete the selected campaigns?"),this.$t("Delete Campaigns"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.doBulkAction("delete_campaigns")}).catch(()=>{})},doBulkAction(e){const t={action_name:e,labels:"apply_labels"===e?this.selectedLabels:[]};this.allSelected?(t.select_all=!0,t.filters=this.filters):t.campaign_ids=this.selectedCampaigns.map(e=>e.id),this.doing_action=!0,this.$post("campaigns/do-bulk-action",t).then(e=>{this.$notify.success(e.message),this.$emit("refetch"),this.selectedLabels=[],this.select_job.action_name=""}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})}}},ke={class:"fcrm_bulk_action_inline"},$e={class:"fcrm_bulk_wrap"},Se={class:"icon"};const Fe=de(we,[["render",function(e,t,a,s,i,l){const p=n,m=o,h=j("Check"),u=c,_=d,g=j("Delete"),f=r;return I(),R("div",ke,[M("div",$e,[N(m,{clearable:"",filterable:"",size:"small",class:"fcrm_bulk_select",placeholder:e.$t("Select Action"),"popper-class":l.bulkSelectPopperClass,effect:"dark",modelValue:i.select_job.action_name,"onUpdate:modelValue":t[0]||(t[0]=e=>i.select_job.action_name=e)},{default:U(()=>[N(p,{label:e.$t("Apply Labels"),value:"apply_labels"},null,8,["label"]),e.hasPermission("fcrm_manage_email_delete")?(I(),z(p,{key:0,label:e.$t("Delete Selected"),value:"delete_campaigns"},null,8,["label"])):H("",!0)],void 0),_:1},8,["placeholder","popper-class","modelValue"]),"apply_labels"===i.select_job.action_name?(I(),R(G,{key:0},[N(m,{filterable:"",size:"small",class:"fcrm_bulk_select",placeholder:e.$t("Select Labels"),modelValue:i.selectedLabels,"onUpdate:modelValue":t[1]||(t[1]=e=>i.selectedLabels=e),multiple:"","collapse-tags":"","collapse-tags-tooltip":"","popper-class":l.bulkSelectWordbreakPopperClass,effect:"dark"},{default:U(()=>[(I(!0),R(G,null,Q(a.options&&a.options.labels||[],e=>(I(),z(p,{key:e.id,label:e.title,value:Number(e.id)},{default:U(()=>[M("span",{style:Y({background:e.settings.color,padding:"2px 5px 4px 5px",borderRadius:"4px",color:"#0E121B"})},J(e.title),5)],void 0,!0),_:2},1032,["label","value"]))),128))],void 0),_:1},8,["placeholder","modelValue","popper-class"]),Z((I(),z(_,{disabled:i.doing_action||!i.selectedLabels.length,onClick:t[2]||(t[2]=e=>l.doApplyLabels()),type:"primary",size:"small"},{default:U(()=>[M("span",Se,[N(u,null,{default:U(()=>[N(h)],void 0,!0),_:1})]),W(" "+J(e.$t("Apply Label")),1)],void 0),_:1},8,["disabled"])),[[f,i.doing_action]])],64)):"delete_campaigns"===i.select_job.action_name?Z((I(),z(_,{key:1,disabled:i.doing_action,type:"danger",size:"small",plain:"",onClick:l.confirmAndDeleteCampaigns},{dLine truncated
@@ -0,0 +1 @@
import{aH as a,aI as e,aQ as t,aB as i,aw as s,aE as n,aF as l,aK as c,aL as o,aG as r,az as d,k as m,ax as p,ay as _,aS as u,W as g,m as h,aA as f,E as v,aJ as y,aD as k,U as b,A as w,H as $,aZ as C,e as S,a_ as T,av as E,a$ as x,b0 as P,g as j,ap as A}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as I,W as R,X as V,ab as F,a5 as D,J as M,az as U,Z as z,aa as B,a9 as L,a6 as N,ac as Y,Y as q,a8 as H,a0 as O,b2 as G,$ as W,av as J}from"../../../../vendor.js?ver=3.1.8";import{L as K,C as Q}from"../../../../_LinkMetrics.js?ver=3.1.8";import{D as Z}from"../../../../DataTable.js?ver=3.1.8";import{_ as X,I as aa}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as ea}from"../../../../PaginationBar.js?ver=3.1.8";import{G as ta}from"../../../../GenericPromo.js?ver=3.1.8";import{C as ia,a as sa,U as na}from"../../../../_CampaignDetails.js?ver=3.1.8";import{R as la}from"../../../../ReadableRecipientTagger.js?ver=3.1.8";import{I as ca}from"../../../../ItemCopier.js?ver=3.1.8";import{S as oa}from"../../../../TestEmail.js?ver=3.1.8";import{B as ra}from"../../../../BaseCard.js?ver=3.1.8";import"../../../../Confirm.js?ver=3.1.8";import"./_components/EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../Badge.js?ver=3.1.8";import"../../../../SettingsIcons.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const da={class:"fluentcrm_subject_metrics"},ma={class:"fcrm_table_header_inner_left_title"},pa={key:0,class:"fc_list"},_a=["href"],ua={key:1,class:"fcrm_secondary_text small"};const ga=X({name:"CampaignSubjectAnalytics",components:{DataTable:Z},props:["metrics","campaign"]},[["render",function(i,s,n,l,c,o){const r=t,d=e,m=a,p=I("data-table");return R(),V("div",da,[F(p,{"has-selection":!1,wrapper_border:!0},{"header-left":D(()=>[z("h3",ma,B(i.$t("Subject Analytics")),1)]),table:D(()=>[F(m,{border:"","empty-text":i.$t("No Data Found"),class:"fc_el_border_table",stripe:"",data:n.metrics.subjects,style:{width:"100%"}},{default:D(()=>[F(d,{type:"expand"},{default:D(a=>[a.row.metric.clicks.length?(R(),V("ul",pa,[(R(!0),V(M,null,U(a.row.metric.clicks,(a,e)=>(R(),V("li",{key:e},[z("a",{target:"_blank",rel:"noopener",href:a.url},B(a.url),9,_a),s[0]||(s[0]=L(" - ",-1)),F(r,{size:"small"},{default:D(()=>[L(B(a.total),1)],void 0,!0),_:2},1024)]))),128))])):(R(),V("span",ua,B(i.$t("No metrics found.")),1))]),_:1}),F(d,{label:i.$t("Subject")},{default:D(a=>[L(B(a.row.value),1)]),_:1},8,["label"]),F(d,{width:"140",label:i.$t("Email Sent %")},{default:D(a=>[L(B(i.percent(a.row.total,n.campaign.recipients_count))+" ("+B(a.row.total)+") ",1)]),_:1},8,["label"]),F(d,{width:"140",label:i.$t("Open Rate")},{default:D(a=>[L(B(i.percent(a.row.metric.total_opens,a.row.total))+" ",1),N(z("span",null,"("+B(a.row.metric.total_opens)+")",513),[[Y,a.row.metric.total_opens]])]),_:1},8,["label"]),F(d,{width:"140",label:i.$t("Click Rate")},{default:D(a=>[L(B(i.percent(a.row.metric.total_clicks,a.row.total))+" ",1),N(z("span",null,"("+B(a.row.metric.total_clicks)+")",513),[[Y,a.row.metric.total_clicks]])]),_:1},8,["label"])],void 0,!0),_:1},8,["empty-text","data"])]),_:1})])}]]),ha={class:"fc_revenue_report"},fa=["innerHTML"];const va=X({name:"RevenueReport",props:["campaign"],components:{PaginationBar:ea},data:()=>({orders:[],labels:[],pagination:{per_page:10,current_page:1,total:0},loading:!1}),methods:{fetchOrders(){this.loading=!0,this.$get(`campaigns/${this.campaign.id}/revenues`,{per_page:this.pagination.per_page,page:this.pagination.current_page}).then(a=>{this.orders=a.orders,this.labels=a.labels,this.pagination.total=a.total}).catch(a=>{this.handleError(a)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchOrders()}},[["render",function(t,s,n,l,c,o){const r=e,d=a,m=I("pagination-bar"),p=i;return R(),V("div",ha,[z("h3",null,B(t.$t("Revenue from this email campaign")),1),c.loading?(R(),q(p,{key:1})):(R(),V(M,{key:0},[F(d,{data:c.orders,border:"",stripe:""},{default:D(()=>[(R(!0),V(M,null,U(c.labels,(a,e)=>(R(),q(r,{key:e,label:a},{default:D(a=>[z("span",{innerHTML:a.row[e]},null,8,fa)]),_:2},1032,["label"]))),128))],void 0),_:1},8,["data"]),F(m,{pagination:c.pagination,onFetch:o.fetchOrders},null,8,["pagination","onFetch"])],64))])}]]),ya={class:"fluentcrm_link_metrics"},ka={class:"fcrm_mb_20"},ba={class:"fcrm_primary_text fcrm_mb_6"},wa={class:"fcrm_secondary_text small"},$a={key:0,class:"fc_campaign_action_wrapper"},Ca={key:0},Sa={key:1,style:{color:"red"}},Ta={key:1},Ea={key:0,class:"text-align-center"},xa={key:0},Pa={key:1,class:"text-align-center"},ja={key:2},Aa={key:1},Ia={key:1};const Ra={class:"fc_campaign_report"},Va={key:0},Fa={class:"fc_report_title"},Da={class:"fc_report_value"},Ma={class:"fc_report_title"},Ua={key:2,class:"fc_report_value"},za={key:3,class:"fc_report_value"},Ba={key:1,style:{padding:"20px"}},La={class:"fc_campaign_report"},Na={class:""};const Ya={classLine truncated
@@ -0,0 +1 @@
import{T as e,_ as i,ay as a,aS as l,k as s,aT as t}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as o,X as c,ab as r,a5 as p,a6 as m,a8 as d,Z as v,aa as _,J as w,az as f,Y as u,a0 as b,a9 as h}from"../../../../../vendor.js?ver=3.1.8";import{P as g}from"../../../../../PreviewIframeBuilder.js?ver=3.1.8";import{B as k}from"../../../../../Badge.js?ver=3.1.8";import{_ as L,I as y}from"../../../../../fc-bits-ui.js?ver=3.1.8";const M={key:0},$={key:1,class:"fcrm_email_preview_email_body"},C={class:"fcrm_email_preview_email_header"},V={class:"label"},x={class:"content"},B={class:"value"},P={class:"label"},j={class:"content"},Z={class:"value"},I={class:"label"},O={class:"content"},T={class:"value"},D={class:"label"},S={class:"content"},E={class:"value"},H={class:"label"},z={class:"content"},A={class:"value"},F={class:"fcrm_email_preview_email_stats"},J={class:"label"},N={class:"content"},Q={class:"fcrm_email_preview_email_stat_item"},U={class:"value"},W={class:"fcrm_email_preview_email_stat_item"},X={class:"value"},Y={key:0},q={class:"label"},G={class:"content"},K={class:"value"},R={key:1,class:"fcrm_email_preview_email_clicks"},ee={class:"label"},ie={class:"content"},ae={class:"fcrm_preview_toolbar"},le={class:"fcrm_preview_device_toggle"},se={class:"fcrm_device_btn_group"},te=["title"],ne=["title"],oe=["title"],ce={key:0,class:"fc_device_notch"},re={key:1,class:"fc_device_home"},pe={class:"dialog-footer"};const me=L({name:"EmailPreview",props:["preview"],components:{Badge:k,PreviewIframeBuilder:g,Icons:y,FolderOpened:i,Location:e},data:()=>({direction:"rtl",email:null,info:{},loading:!1,previewMode:"desktop"}),computed:{deviceLabel(){return{desktop:this.$t("Desktop"),tablet:this.$t("Tablet")+" · 768px",mobile:this.$t("Mobile")+" · 375px"}[this.previewMode]||""}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr")},methods:{fetch(){this.email=null,this.loading=!0,this.$get(`campaigns/emails/${this.preview.id}/preview`).then(e=>{this.email=e.email,this.info=e.info}).finally(()=>{this.loading=!1})},onOpen(){this.fetch()},onClosed(){this.preview.isVisible=!1,this.previewMode="desktop"}}},[["render",function(e,i,g,k,L,y){const me=n("Badge"),de=l,ve=n("Icons"),_e=n("preview-iframe-builder"),we=s,fe=t,ue=a;return o(),c("div",null,[r(fe,{direction:L.direction,size:"70%",title:e.$t("Email Preview"),onOpen:y.onOpen,"append-to-body":!0,"close-on-click-modal":!1,modelValue:g.preview.isVisible,"onUpdate:modelValue":i[4]||(i[4]=e=>g.preview.isVisible=e),"modal-class":"fcrm_email_preview_dialog"},{footer:p(()=>[v("span",pe,[r(we,{onClick:i[3]||(i[3]=e=>g.preview.isVisible=!1)},{default:p(()=>[h(_(e.$t("Close")),1)],void 0,!0),_:1})])]),default:p(()=>[L.email?d("",!0):m((o(),c("div",M,null,512)),[[ue,L.loading]]),L.email?(o(),c("div",$,[v("div",C,[v("ul",null,[v("li",null,[v("span",V,_(e.$t("Status")),1),v("span",x,[v("span",B,[r(me,{type:L.info.status},null,8,["type"])])])]),v("li",null,[v("span",P,_(e.$t("Campaign")),1),v("span",j,[v("span",Z,_(L.info.campaign?L.info.campaign.title:"n/a"),1)])]),v("li",null,[v("span",I,_(e.$t("Subject")),1),v("span",O,[v("span",T,_(L.email.subject),1)])]),v("li",null,[v("span",D,_(e.$t("To")),1),v("span",S,[v("span",E,_(L.email.to.name)+" <"+_(L.email.to.email)+">",1)])]),v("li",null,[v("span",H,_(e.$t("Date")),1),v("span",z,[v("span",A,_(e.nsDateFormat(L.info.scheduled_at)),1)])]),v("li",F,[v("span",J,_(e.$t("Stats")),1),v("span",N,[v("span",Q,[i[5]||(i[5]=v("span",{class:"icon"},[v("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M2.1458 4.91239L7.694 1.58599C7.78725 1.53004 7.89395 1.50049 8.0027 1.50049C8.11145 1.50049 8.21815 1.53004 8.3114 1.58599L13.8542 4.91299C13.8987 4.93964 13.9355 4.97736 13.961 5.02247C13.9866 5.06758 14 5.11855 14 5.17039V12.8C14 12.9591 13.9368 13.1117 13.8243 13.2243C13.7117 13.3368 13.5591 13.4 13.4 13.4H2.6C2.44087 13.4 2.28826 13.3368 2.17574 13.2243C2.06321 13.1117 2 12.9591 2 12.8V5.16979C1.99999 5.11795 2.01341 5.06698 2.03897 5.02187C2.06452 4.97676 2.10133 4.93904 2.1458 4.91239ZM3.2 5.67979V12.2H12.8V5.67919L8.0024 2.79919L3.2 5.67919V5.67979ZM8.036 9.01879L11.2136 6.34099L11.9864 7.25899L8.0444 10.5812L4.0184 7.26319L4.7816 6.33679L8.036 9.01879V9.01879Z",fill:"var(--fc-secondary-text)"})])],-1)),v("span",U,_(L.info.is_open||0),1)]),i[7]||(i[7]=v("span",{class:"dotted-shape"},null,-1)),v("span",W,[i[6]||(i[6]=v("span",{class:"icon"},[v("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M10.0328 8.89878L11.564 13.1072L8.74522 14.1332L7.21342 9.92478L4.87402 11.3918L5.84602 1.77979L12.7682 8.51898L10.0334 8.89878H10.0328ZM10.0262 12.3896L8.39722 7.91358L10.1732 7.66758L6.78922 4.37358L6.31522 9.07158L7.83322 8.11938L9.46222 12.5954L10.0262 12.3896V12.3896Z",fill:"var(--fc-secondary-text)"})])],-1)),v("span",X,_(L.info.click_counter||0),1)])])]),L.info.note?(o(),c("li",Y,[v("span",q,_Line truncated
@@ -0,0 +1 @@
import{ax as e,aw as t,e as a,k as s,ay as i,g as l,c as n,R as o,as as r,a6 as c,ac as d,a2 as u,j as p,h as m,i as h,aB as g,aH as _,aI as f,E as y,aR as q,aS as v,n as b}from"../../../../vendor-element-plus.js?ver=3.1.8";import{W as S,Y as $,a5 as w,Z as k,ab as C,ax as T,b2 as V,aa as D,a6 as x,a9 as E,aQ as A,X as P,a8 as j,J as B}from"../../../../vendor.js?ver=3.1.8";import{_ as I,I as F,a as N,T as U}from"../../../../fc-bits-ui.js?ver=3.1.8";import{C as O}from"../../../../Confirm.js?ver=3.1.8";import{P as M}from"../../../../PaginationBar.js?ver=3.1.8";import{I as H}from"../../../../InlineDoc.js?ver=3.1.8";import{T as J}from"../../../../TopNav.js?ver=3.1.8";import{P as K}from"../../../../PageHeader.js?ver=3.1.8";import{D as R}from"../../../../DataTable.js?ver=3.1.8";import{F as Q}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";const Y={name:"CreateSequence",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","toggleDialog"],data:()=>({sequence:{title:""},errors:{title:""},saving:!1}),computed:{isVisible:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e),this.$emit("toggleDialog",e)}}},methods:{save(){this.sequence.title?(this.errors={title:""},this.saving=!0,this.$post("sequences",this.sequence).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit-sequence",params:{id:e.sequence.id}})}).catch(e=>{const t=e.data?e.data:e;if(t.status&&403===t.status)this.notify.error(t.message);else if(t.title){const e=Object.keys(t.title);this.errors.title=t.title[e[0]]}}).finally(e=>{this.saving=!1})):this.errors.title=this.$t("Title field is required")}}},z={class:"error"},L={class:"dialog-footer"};const G={class:"fcrm_email_sequences_page"},W={class:"fcrm_page_header_top_nav_wrapper"},X={class:"fcrm_page_header_top_nav"},Z={class:"fcrm-layout-width"},ee={key:0},te={class:"icon"},ae={class:"el-popover__reference"},se={class:"icon"},ie={class:"icon"},le={class:"icon"},ne={class:"fcrm_empty_state"},oe={class:"fcrm_empty_state_text"},re={key:0},ce=["title"],de={style:{"vertical-align":"middle"}},ue={key:1},pe=["aria-label"],me={class:"el-popover__reference"},he={class:"icon"},ge={class:"el-popover__reference"},_e={class:"icon"},fe={class:"el-popover__reference"},ye={class:"icon"},qe={class:"el-popover__reference"},ve={class:"icon"},be={class:"fcrm_bulk_action_bar"},Se={class:"fcrm_bulk_action_left"},$e={class:"fc_bulk_selection_count"},we={key:0,class:"fc_bulk_divider","aria-hidden":"true"},ke={key:2,class:"fc_bulk_divider","aria-hidden":"true"},Ce={class:"icon"},Te={class:"fcrm_import_content"},Ve={class:"upload-icon"},De={class:"el-upload__text"};const xe=I({name:"all-sequences",components:{Icons:F,PageHeader:K,TopNav:J,DataTable:R,FloatingBulkActionShell:Q,CreateSequence:I(Y,[["render",function(n,o,r,c,d,u){const p=a,m=t,h=e,g=s,_=l,f=i;return S(),$(_,{title:n.$t("Create new email sequence"),modelValue:u.isVisible,"onUpdate:modelValue":o[2]||(o[2]=e=>u.isVisible=e),"append-to-body":!0,"close-on-click-modal":!1,width:"640px",class:"fc-create-email-sequence"},{footer:w(()=>[k("span",L,[x((S(),$(g,{disabled:d.saving,type:"primary",onClick:o[1]||(o[1]=e=>u.save())},{default:w(()=>[E(D(n.$t("Next")),1)],void 0,!0),_:1},8,["disabled"])),[[f,d.saving]])])]),default:w(()=>[k("div",null,[C(h,{onSubmit:T(u.save,["prevent"]),model:d.sequence,"label-position":"top"},{default:w(()=>[C(m,{label:n.$t("Sequence Title")},{default:w(()=>[C(p,{ref:"title",placeholder:n.$t("Sequence Title"),modelValue:d.sequence.title,"onUpdate:modelValue":o[0]||(o[0]=e=>d.sequence.title=e),onKeyup:V(u.save,["enter"])},null,8,["placeholder","modelValue","onKeyup"]),k("span",z,D(d.errors.title),1)],void 0,!0),_:1},8,["label"])],void 0,!0),_:1},8,["onSubmit","model"])])],void 0),_:1},8,["title","modelValue"])}]]),Confirm:O,PaginationBar:M,InlineDoc:H,EditPen:u,CopyDocument:d,Delete:c,ArrowDownBold:r,Money:o,Close:n},data:()=>({sequences:[],pagination:{total:0,per_page:10,current_page:1},loading:!0,dialogVisible:!1,duplicating:!1,search:"",options:{sampleCsv:null,delimiter:"comma"},order:"desc",orderBy:"id",selection:!1,selectedSequences:[],deleting:!1,importDialogVisible:!1,inline_errors:null,allSelected:!1,current_mode:"system"===U.getCurrentTheme()?U.getSystemTheme():U.getCurrentTheme()}),computed:{url(){let e=window.ajaxurl;return e+=(e.match(/\?/)?"&":"?")+jQuery.param({action:"fluentcrm_import_sequence",_nonce:window.fcAdmin.rest.nonce}),e},canSelectAll(){if(!this.pagination||!this.pagination.per_page||!this.pagination.total)return!1;const e=this.selectedSequences.length===this.pagination.per_page,t=this.selectedSequences.length<this.pagination.total;return e&&t}},methods:{setup(){let e=this.$route.query;if(window.fcrm_seq_sub_params&&(e=window.fcrm_seq_sub_params),this.order=e.order,this.orderBy=e.orderBy,this.search=e.search,e.page&&(this.pagination.current_page=parseInt(e.page)),e.per_page)this.pagination.per_page=parseInt(e.per_page);else{const e=parseInt(this.storage.get("sequencLine truncated
@@ -0,0 +1 @@
import{W as e,ay as a,a_ as t,aZ as l,aD as i,aA as s,aw as d,e as m,bc as o,aJ as n,E as u,aK as r,aL as _,az as c,aG as p,ax as h,k as v,ap as f}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,a6 as b,W as y,X as $,ab as V,a5 as S,a9 as q,aa as j,Y as w,a8 as k,Z as E,a0 as C,av as T}from"../../../../vendor.js?ver=3.1.8";import{E as U}from"../../../../BlockComposer.js?ver=3.1.8";import{I as P}from"../../../../_FormBuilder2.js?ver=3.1.8";import{S as D}from"../../../../TestEmail.js?ver=3.1.8";import{P as x}from"../../../../PageHeader.js?ver=3.1.8";import{_ as M}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const I={class:"fcrm_edit_email_sequence_page fcrm_sticky_block_composer_page"},B={class:"fcrm_edit_email_sequence_body"},H={key:0,class:"fcrm_edit_email_sequence_schedule--config"},F={class:"fcrm_edit_email_sequence_schedule--datetime"},W={class:"fcrm_edit_email_sequence_schedule--specific-days"},A={key:0},K={key:1,class:"fluentcrm_body fluentcrm_pad_30 text-align-center"};const L=M({name:"SequenceEmailEdit",props:["sequence_id","email_id"],emits:["getVisualData"],components:{EmailBlockComposer:U,InputPopover:P,SendTestEmail:D,PageHeader:x,InfoFilled:e},data:()=>({ArrowRightBold:T(f),sequence:{},email:{},loading:!1,saving:!1,app_loaded:!1,smartcodes:window.fcAdmin.globalSmartCodes,email_subject_status:!0,is_dirty:""}),watch:{email_id(){this.fetchSequenceEmail()}},methods:{backToSequence(){this.$router.push({name:"edit-sequence",params:{id:this.sequence_id},query:{t:(new Date).getTime()}})},fetchSequenceEmail(){this.loading=!0,this.$get(`sequences/${this.sequence_id}/email/${this.email_id}`,{with:["sequence"]}).then(e=>{this.sequence=e.sequence,this.email=e.email}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1,this.app_loaded=!0})},save(){if(!this.email.email_body)return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peb"),offset:19});if(!this.email.email_subject)return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peS"),offset:19});this.saving=!0,this.is_dirty=!1;const e={route_method:"create",email:JSON.stringify(this.email),sequence_id:this.sequence_id};parseInt(this.email_id)&&(e.route_method="update",e.mail_id=this.email_id),this.$post("sequences/sequence-email-update-create",e).then(e=>{this.$notify.success(e.message),parseInt(this.email_id)||this.$router.push({name:"edit-sequence-email",params:{sequence_id:e.email.parent_id,email_id:e.email.id}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1,this.is_dirty=!1})},maybeSave(){"visual_builder"==this.email.design_template?this.$bus.emit("getVisualData",{}):this.save()},resetSubject(){this.email_subject_status=!1,this.$nextTick(()=>{this.email_subject_status=!0})},changingSpecificDaysStatus(){"yes"!=this.email.settings.timings.selected_days_only||this.email.settings.timings.allowed_days||(this.email.settings.timings.allowed_days=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"])},handleChangeContent(){""!==this.is_dirty?this.is_dirty=!0:this.is_dirty=!1},initKeyboardSave(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),this.maybeSave())}},mounted(){this.fetchSequenceEmail(),document.addEventListener("keydown",this.initKeyboardSave)},beforeRouteLeave(e,a,t){if(this.is_dirty){if(!window.confirm(this.$t("Unsaved_Confirm_Msg")))return!1}this.unmountBlockEditor(),document.removeEventListener("keydown",this.initKeyboardSave),t()}},[["render",function(e,f,T,U,P,D){const x=l,M=t,L=g("send-test-email"),R=g("page-header"),O=g("input-popover"),z=d,J=s,N=m,Z=i,G=g("InfoFilled"),Q=u,X=n,Y=o,ee=_,ae=r,te=c,le=p,ie=h,se=v,de=g("email-block-composer"),me=a;return b((y(),$("div",I,[V(R,null,{breadcrumb:S(()=>[V(M,{"separator-icon":P.ArrowRightBold},{default:S(()=>[V(x,{to:{name:"email-sequences"}},{default:S(()=>[q(j(e.$t("Email Sequences")),1)],void 0,!0),_:1}),V(x,{to:{name:"edit-sequence",params:{id:T.sequence_id}}},{default:S(()=>[q(j(P.sequence.title),1)],void 0,!0),_:1},8,["to"]),P.email.email_subject?(y(),w(x,{key:0},{default:S(()=>[q(j(P.email.email_subject),1)],void 0,!0),_:1})):k("",!0)],void 0,!0),_:1},8,["separator-icon"])]),actions:S(()=>[V(L,{campaign:P.email},null,8,["campaign"])]),_:1}),E("div",B,[P.app_loaded?(y(),$("div",H,[V(ie,{"label-position":"topLine truncated
@@ -0,0 +1 @@
import{T as e}from"../../../../TopNav.js?ver=3.1.8";import{P as a}from"../../../../PromoCard.js?ver=3.1.8";import{P as r}from"../../../../PageHeader.js?ver=3.1.8";import{aQ as o,W as s,X as t,Z as i,ab as c,a5 as n,a9 as m,aa as l}from"../../../../vendor.js?ver=3.1.8";import{_ as d}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const p={class:"fcrm_email_sequences_page"},u={class:"fcrm_page_header_top_nav_wrapper"},_={class:"fcrm_page_header_top_nav"},v={class:"fcrm-layout-width"},f={class:"fcrm_body_boxed"};const h={key:0,class:"fc_sequence_root"},g={key:1};const b=d({name:"sequence-view",components:{EmailSequencePromo:d({name:"EmailSequencePromo",components:{PromoCard:a,TopNav:e,PageHeader:r}},[["render",function(e,a,r,d,h,g){const b=o("TopNav"),w=o("page-header"),y=o("PromoCard");return s(),t("div",p,[i("div",u,[i("div",_,[c(b)]),a[0]||(a[0]=i("div",{class:"fcrm_page_header_top_actions"},null,-1))]),i("div",v,[c(w,null,{title:n(()=>[m(l(e.$t("Email Sequences")),1)]),_:1}),i("div",f,[c(y,{heading:e.$t("Email Sequences"),description:e.$t("EmailSequencePromo.title")},{"before-cta":n(()=>[...a[1]||(a[1]=[i("iframe",{style:{display:"block",margin:"20px auto 0 auto"},width:"764",height:"430",src:"https://www.youtube.com/embed/6nYOK2UzoVk",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,-1)])]),_:1},8,["heading","description"])])])])}]])},data:()=>({}),mounted(){this.changeTitle(this.$t("Email Sequences"))}},[["render",function(e,a,r,i,n,m){const l=o("router-view"),d=o("email-sequence-promo");return e.has_campaign_pro?(s(),t("div",h,[c(l)])):(s(),t("div",g,[c(d)]))}]]);export{b as default};
@@ -0,0 +1 @@
import{c as e,k as t,a_ as i,aZ as s,e as a,av as l,aB as n,E as c,aK as o,aL as d,aO as r,h as u,i as m,j as h,ax as p,aw as _,ay as f,g,ap as v}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as q,X as w,Z as C,ab as $,a5 as b,Y as k,a8 as L,a9 as S,aa as V,b2 as x,J as E,az as T,bB as M,a6 as D}from"../../../../vendor.js?ver=3.1.8";import{L as I,C as B}from"../../../../_LinkMetrics.js?ver=3.1.8";import{M as H}from"../../../../_MailerConfig.js?ver=3.1.8";import{E as j}from"../../../../EmailPreview.js?ver=3.1.8";import{P as Z}from"../../../../PageHeader.js?ver=3.1.8";import{_ as P,I as U}from"../../../../fc-bits-ui.js?ver=3.1.8";import{B as A}from"../../../../BaseCard.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../Confirm.js?ver=3.1.8";import"../Campaigns/_components/EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../Badge.js?ver=3.1.8";import"../../../../GenericPromo.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../SettingsIcons.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";const F={class:"fcrm_email_sequences_view"},R={class:"fcrm-layout-width"},W={key:0,class:"fcrm_inline_editable_input"},z={key:1,class:"fcrm-sequence-title-text-wrap"},N={class:"icon","aria-hidden":"true"},Y={class:"icon"},G={style:{position:"relative"}},K={class:"fc_loading_bar"},O={key:1},J={class:""},Q={class:"fcrm_sequence_hero_card"},X={class:"fcrm_sequence_hero_title"},ee={class:"icon"},te={key:2,class:"fcrm-sequence-list"},ie={key:0,class:"fcrm-sequence-wait-divider"},se=["onClick"],ae={class:"fcrm-sequence-delay-editor"},le={class:"fcrm-sequence-delay-editor__header"},ne={class:"fcrm-sequence-delay-editor__body"},ce={class:"fcrm-sequence-delay-editor__hint"},oe={class:"fcrm-sequence-delay-editor__footer"},de={class:"fcrm-sequence-card"},re={class:"fcrm-sequence-card-main"},ue={class:"fcrm-sequence-card-title-row"},me={class:"fcrm-sequence-card-title-wrap"},he={class:"fcrm-sequence-number"},pe={class:"fcrm-sequence-card-actions"},_e=["onClick","title"],fe={class:"fcrm-sequence-more"},ge={class:"el-popover__reference"},ve={class:"icon"},ye={class:"el-popover__reference"},qe={class:"icon"},we={class:"fcrm-sequence-schedule"},Ce={class:"fcrm-sequence-stats"},$e=["onClick"],be={class:"fcrm-stat-item"},ke=["onClick"],Le={class:"fcrm-stat-item"},Se={class:"dialog-footer"};const Ve=P({name:"EditSequence",components:{BaseCard:A,Icons:U,PageHeader:Z,CampaignEmails:B,LinkMetrics:I,MailerConfig:H,EmailPreview:j,Close:e},props:["id"],data:()=>({ArrowRightBold:v,sequence:{},sequence_emails:[],loading:!1,addEmailModal:!1,showSequenceSettings:!1,savingSequence:!1,show_email_report:!1,show_email_report_id:!1,link_clicks_modal:!1,link_click_id:!1,order:"desc",orderBy:"id",duplicating:!1,show_title_input:!1,editableTitle:"",editingEmailIndex:null,editDelayValue:"",editDelayUnit:"days",savingDelay:!1}),methods:{showInputField(){this.editableTitle=this.sequence.title||"",this.show_title_input=!0,this.$nextTick(()=>{const e=this.$refs.titleInput,t=Array.isArray(e)?e[0]:e;t&&t.focus&&t.focus()})},cancelInlineTitle(){this.show_title_input=!1,this.editableTitle=this.sequence.title||""},saveInlineTitle(){const e=(this.editableTitle||"").trim();e&&(e!==this.sequence.title?(this.sequence.title=e,this.saveSequence()):this.show_title_input=!1)},showEmailReport(e){this.show_email_report_id=e,this.show_email_report=!0},showLinkReport(e){this.link_click_id=e,this.link_clicks_modal=!0},handleSequenceAction(e,t){"edit"!==t?"report"!==t?"links"!==t?"duplicate"!==t?"delete"===t&&this.confirmDelete(e):this.duplicateSequence(e):this.showLinkReport(e.id):this.showEmailReport(e.id):this.$router.push({name:"edit-sequence-email",params:{sequence_id:e.parent_id,email_id:e.id},query:{t:(new Date).getTime()}})},statCount(e,t){const i=Number((e.stats||{})[t]);return Number.isFinite(i)?i:0},fetchSequence(){this.loading=!0;const e={with:["sequence_emails","email_stats"],order:this.order,orderBy:this.orderBy};this.$get(`sequences/${this.id}`,e).then(e=>{var t;this.sequence=e.sequence,this.editableTitle=(null==(t=e.sequence)?void 0:t.title)||"",this.sequence_emails=e.sequence_emails,this.changeTitle(this.sequence.title+" - Sequence")}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},gotToSubscribers(){this.$router.push({name:"sequence-subscribers",params:{id:this.id},query:{t:(new Date).getTime()}})},toSequenceEmailEdit(e){this.$router.push({name:"edit-sequence-email",params:{sequence_id:this.sequence.id,email_id:e}})},confirmDelete(e){const t=`\n <div class="fcrm-status-confirm__body">\n <div class="fcrm-status-confirm__content">\n <h4 class="fcrm-status-confirm__title">${this.$t("Delete Sequence")}</h4>\n <p class="fcrm-status-confirm__tex Line truncated
@@ -0,0 +1 @@
import{k as e,av as t,c as s,aH as i,aI as a,aO as n,ay as r,E as l,a_ as c,aZ as o,ap as d}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as u,W as _,X as b,Y as h,a5 as m,Z as g,aa as f,ab as p,a9 as v,J as S,a6 as y,ac as w,a8 as $,av as q}from"../../../../vendor.js?ver=3.1.8";import{R as k}from"../../../../RecipientTaggerForm.js?ver=3.1.8";import{_ as C,I as T,a as x,T as E}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as D}from"../../../../PaginationBar.js?ver=3.1.8";import{D as P}from"../../../../DataTable.js?ver=3.1.8";import{F as j}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{C as B}from"../../../../Confirm.js?ver=3.1.8";import{B as A}from"../../../../Badge.js?ver=3.1.8";import{P as F}from"../../../../PageHeader.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const I={class:"fluentcrm_sequence_sub_adder"},V={class:"text-align-center"},R={class:"text-align-center"},H={key:1,class:"text-align-center fluentcrm_hero_box"};const O={class:"fcrm_sequence_subscribers_table_wrap"},L={class:"fcrm_table_header_inner_left_title"},N=["title","src"],z={class:"fcrm_contact_info"},J={class:"fcrm_contact_name"},U={class:"fcrm_contact_email"},Y={class:"fcrm_sequence_date_with_note"},Z=["title"],G=["aria-label"],Q=["title"],W={key:1},X={class:"fcrm_bulk_action_bar"},K={class:"fcrm_bulk_action_left"},M={class:"fc_bulk_selection_count"},ee={class:"icon"};const te={class:"fcrm_email_sequences_view"},se={class:"fcrm-layout-width"},ie={class:"fcrm_sequence_subscribers_body"},ae={key:1,class:"fluentcrm_sequence_subs"};const ne=C({name:"SequenceSubscribers",props:["id"],components:{SubscribersAdder:C({name:"sequence_sub_adder",props:["sequence_id"],components:{RecipientTaggerForm:k},data:()=>({settings:{subscribers:[{list:null,tag:"all"}],excludedSubscribers:[{list:null,tag:null}],sending_filter:"list_tag",dynamic_segment:{id:"",slug:""}},ready_tagger:!0,inserting_page:1,inserting_total_page:0,inserting_now:!1,btnSubscribing:!1,batch_completed:!1,in_total:0,estimated_count:0}),watch:{},methods:{processSubscribers(){const e=this.settings,t=e.subscribers.filter(e=>e.list&&e.tag),s=e.excludedSubscribers.filter(e=>e.list&&e.tag);if("list_tag"===e.sending_filter){if(t.length!==e.subscribers.length||s.length&&s.length!==e.excludedSubscribers.length)return void this.$notify.error({title:this.$t("Oops!"),message:this.$t("_Su_Invalid_solatisi"),offset:19})}else if("dynamic_segment"==e.sending_filter){if(!e.dynamic_segment.uid)return void this.$notify.error({title:this.$t("Oops!"),message:this.$t("Please select the segment"),offset:19})}else if("advanced_filters"==e.sending_filter){let t=!1;if(this.each(e.advanced_filters,e=>{this.isEmptyValue(e)||(t=!0)}),!t)return void this.$notify.error({title:this.$t("Oops!"),message:this.$t("Please select the filters"),offset:19})}const i={subscribers:t,excludedSubscribers:s,sending_filter:e.sending_filter,dynamic_segment:e.dynamic_segment,page:this.inserting_page,advanced_filters:JSON.stringify(e.advanced_filters)};this.btnSubscribing=!0,this.inserting_now=!0,this.ready_tagger=!1,this.$post(`sequences/${this.sequence_id}/subscribers`,i).then(e=>{e.remaining?(1===this.inserting_page&&(this.inserting_total_page=e.page_total),this.inserting_page=e.next_page,this.$nextTick(()=>{this.processSubscribers()})):(this.batch_completed=!0,this.$notify.success({title:this.$t("Great!"),message:this.$t("_Su_Subscribers_hbas"),offset:19}),this.in_total=e.in_total)}).catch(e=>{this.handleError(e),this.btnSubscribing=!1,this.inserting_now=!1}).finally(()=>{})},resetSettings(){this.$emit("completed"),this.ready_tagger=!1,this.batch_completed=!1,this.inserting_now=!1,this.btnSubscribing=!1,this.inserting_page=1,this.inserting_total_page=0,this.settings={subscribers:[{list:null,tag:"all"}],excludedSubscribers:[{list:null,tag:null}],sending_filter:"list_tag",dynamic_segment:{id:"",slug:""}},this.$nextTick(()=>{this.ready_tagger=!0})}}},[["render",function(s,i,a,n,r,l){const c=e,o=u("recipient-tagger-form"),d=t;return _(),b("div",I,[r.ready_tagger?(_(),h(o,{key:0,modelValue:r.settings,"onUpdate:modelValue":i[1]||(i[1]=e=>r.settings=e)},{fc_tagger_bottom:m(()=>[g("div",V,[g("p",null,f(s.$t("_Su_Please_ntsewbstt")),1)]),g("div",R,[p(c,{onClick:i[0]||(i[0]=e=>l.processSubscribers()),type:"primary"},{default:m(()=>[v(f(s.$t("Add to this Sequence")),1)],void 0,!0),_:1})])]),_:1},8,["modelValue"])):(_(),b("div",H,[r.batch_completed?(_(),b(S,{key:0},[g("h3",null,f(s.$t("Completed")),1),g("h4",null,f(s.$t("_Su_All_SLashbaSttsE")),1),y(p(c,{onClick:i[2]||(i[2]=e=>l.resetSettings()),type:"primary",size:"small"},{default:m(()=>[v(f(s.$t("Back")),1)],void 0),_:1},512),[[w,r.batch_completed]]),g("p",null,[g("b",null,f(r.in_total),1),v(" "+f(s.$t("_Su_Subscribers_hbat")),1)])],64)):(_(),b(S,{key:1},[g("h3",null,f(s.$t("Processing now...")),1),g("h4",null,f(s.$t("Rec_Please_dnctw")),1),r.inserting_total_page?(_(),b(S,{key:0},[g("h2",null,f(r.inserting_page)+"/"+f(r.inserting_total_page),1)Line truncated
@@ -0,0 +1 @@
import{aQ as e,W as r,Y as o}from"../../../vendor.js?ver=3.1.8";import{_ as s}from"../../../fc-bits-ui.js?ver=3.1.8";import"../../../vendor-element-plus.js?ver=3.1.8";const t=s({name:"email-view"},[["render",function(s,t,n,a,i,m){const v=e("router-view");return r(),o(v)}]]);export{t as default};
@@ -0,0 +1 @@
import{aD as e,aA as a,aw as t,e as l,az as i,ax as o,k as m}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as s,W as d,X as r,ab as n,a5 as u,Y as p,a8 as c,a9 as _,aa as g,Z as v}from"../../../../../vendor.js?ver=3.1.8";import{E as h}from"../../../../../BlockComposer.js?ver=3.1.8";import{I as f}from"../../../../../_FormBuilder2.js?ver=3.1.8";import{_ as b}from"../../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../../data_config.js?ver=3.1.8";import"../../../../../EmailPreview.js?ver=3.1.8";import"../../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../../TestEmail.js?ver=3.1.8";import"../../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../../PaginationBar.js?ver=3.1.8";import"../../../../../_MergeCodes.js?ver=3.1.8";import"../../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../../PromoCard.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";import"../../../../../PhotoWidget.js?ver=3.1.8";import"../../../../../_OptionSelector.js?ver=3.1.8";import"../../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../../_VerifiedEmailInput.js?ver=3.1.8";const j=b({name:"CampaignName",components:{EmailBlockComposer:h,InputPopover:f},props:["campaign"],emits:["getVisualData"],data:()=>({loading:!1,saving:!1,app_loaded:!1,smartcodes:window.fcAdmin.globalSmartCodes,email_subject_status:!0,is_dirty:""}),methods:{validateBody(e=!0){return!!this.campaign.email_body||(e&&this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peb"),offset:19}),!1)},maybeSave(e=!1){"visual_builder"==this.campaign.design_template?this.$bus.emit("getVisualData",{callback:()=>this.save(e)}):this.save(e)},save(e=!1){if(!this.validateBody())return;if(e&&(!this.campaign.email_subject||!this.campaign.email_subject.trim()))return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peS"),offset:19});this.saving=!0,this.is_dirty=!1;const a={campaign:JSON.stringify(this.campaign),campaign_id:this.campaign.id,validate_subject:e?"yes":"no"};this.$post("recurring-campaigns/update-campaign-data",a).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})},resetSubject(){},handleChangeContent(){},initKeyboardSave(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),this.maybeSave())}},mounted(){this.changeTitle("Email - "+this.campaign.title),document.addEventListener("keydown",this.initKeyboardSave)},beforeDestroy(){document.removeEventListener("keydown",this.initKeyboardSave)}},[["render",function(h,f,b,j,y,V){const $=s("input-popover"),C=t,S=a,w=l,k=e,E=i,P=o,U=m,B=s("email-block-composer");return d(),r("div",null,[n(P,{"label-position":"top",model:b.campaign,class:"fcrm_edit_email_sequence_schedule--config"},{default:u(()=>[n(k,{gutter:20},{default:u(()=>[n(S,{sm:24,md:12},{default:u(()=>[n(C,{label:h.$t("Email Subject")},{default:u(()=>[y.email_subject_status?(d(),p($,{key:0,doc_url:"https://fluentcrm.com/docs/merge-codes-smart-codes-usage/",popper_extra:"fc_with_c_fields",placeholder:h.$t("Email Subject"),data:y.smartcodes,modelValue:b.campaign.email_subject,"onUpdate:modelValue":f[0]||(f[0]=e=>b.campaign.email_subject=e)},null,8,["placeholder","data","modelValue"])):c("",!0)],void 0,!0),_:1},8,["label"])],void 0,!0),_:1}),n(S,{sm:24,md:12},{default:u(()=>[n(C,{label:h.$t("Email Pre-Header")},{default:u(()=>[n(w,{placeholder:h.$t("Email Pre-Header"),modelValue:b.campaign.email_pre_header,"onUpdate:modelValue":f[1]||(f[1]=e=>b.campaign.email_pre_header=e)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"])],void 0,!0),_:1})],void 0,!0),_:1}),n(C,null,{default:u(()=>[n(E,{"true-value":"1","false-value":"0",modelValue:b.campaign.utm_status,"onUpdate:modelValue":f[2]||(f[2]=e=>b.campaign.utm_status=e)},{default:u(()=>[_(g(h.$t("Ema_Add_UPFU")),1)],void 0,!0),_:1},8,["modelValue"])],void 0,!0),_:1}),1==b.campaign.utm_status||"1"==b.campaign.utm_status?(d(),p(k,{key:0,gutter:16,class:"fcrm_edit_email_sequence_schedule--utm-row"},{default:u(()=>[n(S,{sm:24,md:8},{default:u(()=>[n(C,{label:h.$t("Campaign Source (required)")},{default:u(()=>[n(w,{placeholder:h.$t("The referrer: (e.g. google, newsletter)"),modelValue:b.campaign.utm_source,"onUpdate:modelValue":f[3]||(f[3]=e=>b.campaign.utm_source=e)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"])],void 0,!0),_:1}),n(S,{sm:24,md:8},{default:u(()=>[n(C,{label:h.$t("Campaign Medium (required)")},{default:u(()=>[n(w,{placeholder:h.$t("Marketing medium: (e.g. cpc, banner, email)"),modelValue:b.campaign.utm_medium,"onUpdate:modelValue":f[4]||(f[4]=e=>b.campaign.utm_medium=e)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"])],void 0,!0),_:1}),n(S,{sm:24,md:8},{default:u(()=>[n(C,{label:h.$t("Campaign Name (required)")},{default:u(()=>[n(w,{placeholder:h.$t("Product, promo code, or slogan (e.g. spring_sale)"),modeLine truncated
@@ -0,0 +1 @@
import{a7 as i,P as a,aB as e,E as t,h as r,i as s,j as l}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as c,X as o,ab as d,a8 as _,J as m,Z as h,aa as g,az as p,a9 as u,a5 as f,Y as C}from"../../../../../vendor.js?ver=3.1.8";import{E as v}from"../../../../../EmailPreview.js?ver=3.1.8";import{P as w}from"../../../../../PaginationBar.js?ver=3.1.8";import{_ as y}from"../../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../../TestEmail.js?ver=3.1.8";import"../../../../../CampaignSubjectLines.js?ver=3.1.8";const L={class:"fcrm_recurring_email_history_page"},k={key:0},$={key:0,class:"fcrm_recurring_email_history_wrapper"},x={class:"fcrm_recurring_email_history_header"},H={class:"fcrm_recurring_email_history_header--left"},M={class:"fcrm_recurring_email_history_header_title"},V={class:"fcrm_recurring_email_history_header_description"},b={class:"fcrm_recurring_email_history_body"},Z={class:"fcrm_recurring_email_history_item--content"},E={class:"fcrm_recurring_email_history_item--subject"},j={class:"fcrm_recurring_email_history_item--meta"},P={class:"fcrm_recurring_email_history_item--actions"},S={class:"el-dropdown-link"},B={key:1,class:"fcrm_recurring_email_history_wrapper"},D={class:"fcrm_recurring_email_history_header"},F={class:"fcrm_recurring_email_history_header--left"},T={class:"fcrm_recurring_email_history_header_title"},A={class:"fcrm_recurring_email_history_header_description"},I={class:"fcrm_recurring_email_history_body"},R={class:"fcrm_recurring_email_history_item--content"},z={class:"fcrm_recurring_email_history_item--subject"},J={class:"fcrm_recurring_email_history_item--meta"},Q={class:"fcrm_recurring_email_history_item--actions"},W={class:"el-dropdown-link"},X={class:"fcrm_recurring_email_history_footer"},Y={key:2,class:"fcrm_body_boxed"},q={style:{"text-align":"center",margin:"0"}},G={key:3};const K=y({name:"EmailHistory",components:{EmailPreview:v,PaginationBar:w,MoreFilled:a,DataLine:i},props:["campaign"],data:()=>({drafts:[],history:[],pagination:{total:0,per_page:20,current_page:1},loading:!1,previewingCampaign:!1,updatingStatus:!1}),methods:{fetch(){this.loading=!0,this.$get("recurring-campaigns/"+this.campaign.id+"/emails",{per_page:this.pagination.per_page,page:this.pagination.current_page}).then(i=>{i.drafts&&(this.drafts=i.drafts),this.history=i.emails.data,this.pagination.total=i.emails.total}).catch(i=>{this.handleError(i)}).finally(()=>{this.loading=!1})},showPreview(i){this.previewingCampaign=i},changeCampaignStatus(i,a){this.updatingStatus=!0,this.$put("recurring-campaigns/"+this.campaign.id+"/emails/"+a.id,{status:i}).then(i=>{this.$notify.success(i.message),this.fetch()}).catch(i=>{this.handleError(i)}).finally(()=>{this.updatingStatus=!1})},statusText(i){return{draft:this.$t("Draft"),cancelled:this.$t("Cancelled"),sent:this.$t("Sent"),failed:this.$t("Failed"),archived:this.$t("Archived")}[i]||i}},mounted(){this.fetch(),this.changeTitle(this.$t("Email History")+" - "+this.campaign.title)}},[["render",function(i,a,v,w,y,K){const N=e,O=n("MoreFilled"),U=t,ii=s,ai=r,ei=l,ti=n("DataLine"),ri=n("pagination-bar"),si=n("email-preview");return c(),o("div",L,[y.loading?(c(),o("div",k,[d(N,{animated:!0,style:{padding:"20px"},rows:7})])):_("",!0),y.drafts.length||y.history.length?(c(),o(m,{key:1},[y.drafts.length?(c(),o("div",$,[h("div",x,[h("div",H,[h("div",M,g(i.$t("Drafts")),1),h("div",V,g(i.$t("Draft_Email_Info")),1)]),a[1]||(a[1]=h("div",{class:"fcrm_recurring_email_history_header--actions"},null,-1))]),h("div",b,[(c(!0),o(m,null,p(y.drafts,e=>(c(),o("div",{key:e.id,class:"fcrm_recurring_email_history_item"},[h("div",Z,[h("div",E,g(e.email_subject),1),h("div",j,[u(g(e.status)+" ",1),a[2]||(a[2]=h("span",{class:"dotted"},null,-1)),u(" "+g(e.scheduled_at),1)])]),h("div",P,[d(ei,{trigger:"click",placement:"bottom-end"},{dropdown:f(()=>[d(ai,null,{default:f(()=>[d(ii,{class:"fc_dropdown_action",onClick:a=>i.$router.push({name:"recurring_email_report",params:{campaign_id:v.campaign.id,email_id:e.id}})},{default:f(()=>[a[3]||(a[3]=h("span",{class:"icon"},[h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[h("path",{d:"M6.875 4.375V3.125H8.125V4.375H11.875V3.125H13.125V4.375H15.625C15.9702 4.375 16.25 4.65482 16.25 5V8.125H15V5.625H13.125V6.875H11.875V5.625H8.125V6.875H6.875V5.625H5V14.375H8.75V15.625H4.375C4.02982 15.625 3.75 15.3452 3.75 15V5C3.75 4.65482 4.02982 4.375 4.375 4.375H6.875ZM13.125 10C11.7443 10 10.625 11.1193 10.625 12.5C10.625 13.8807 11.7443 15 13.125 15C14.5057 15 15.625 13.8807 15.625 12.5C15.625 11.1193 14.5057 10 13.125 10ZM9.375 12.5C9.375 10.4289 11.0539 8.75 13.125 8.75C15.1961 8.75 16.875 10.4289 16.875 12.5C16.875 14.5711 15.1961 16.25 13.125 16.25C11.0539 16.25 9.375 14.5711 9.375 12.5ZM12.5 10.625V12.7589L13.9331 14.1919L14.8169 13.3081L13.75 12.2411V10.625H12.5Z",fill:"var(--fc-secondary-text)"})])],-1)),u(" "+g(i.$t("Review & ScheLine truncated
@@ -0,0 +1 @@
import{aq as a,k as e,ay as t,E as i,ax as s,aw as n,aY as r,W as l,av as c,aJ as m,a$ as p,b0 as o,a_ as d,aZ as g,aB as _,ap as u}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as v,W as h,Y as f,a5 as b,Z as y,ab as C,a6 as k,a9 as w,aa as j,X as S,a8 as $,J as x,az as E,a0 as T,$ as P,av as B}from"../../../../../vendor.js?ver=3.1.8";import{E as R}from"../../../../../BlockComposer.js?ver=3.1.8";import{B as A}from"../../../../../BaseCard.js?ver=3.1.8";import{_ as F}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{E as I}from"../../../../../EmailSubjects.js?ver=3.1.8";import{S as U}from"../../../../../TestEmail.js?ver=3.1.8";import{h as D}from"../../../../../data_config.js?ver=3.1.8";import{U as L,C as z,a as M}from"../../../../../_CampaignDetails.js?ver=3.1.8";import{C as N,L as V}from"../../../../../_LinkMetrics.js?ver=3.1.8";import{R as G}from"../../../../../ReadableRecipientTagger.js?ver=3.1.8";import{P as Y}from"../../../../../PageHeader.js?ver=3.1.8";import"../../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../../PhotoWidget.js?ver=3.1.8";import"../../../../../_OptionSelector.js?ver=3.1.8";import"../../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../../EmailPreview.js?ver=3.1.8";import"../../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../../PaginationBar.js?ver=3.1.8";import"../../../../../_MergeCodes.js?ver=3.1.8";import"../../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../../PromoCard.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";import"../../../../../_MailerConfig.js?ver=3.1.8";import"../../../../../Confirm.js?ver=3.1.8";import"../../Campaigns/_components/EmailPreview.js?ver=3.1.8";import"../../../../../Badge.js?ver=3.1.8";import"../../../../../GenericPromo.js?ver=3.1.8";import"../../../../../SettingsIcons.js?ver=3.1.8";const O={class:"template"};const q={class:"fcrm_max_w_800"},H={class:"d-flex w-full items-center gap-10 flex-wrap justify-between"},J={class:"left"},W={class:"right d-flex gap-10 items-center"};const Z={class:"email_archived_report"},Q={key:0,style:{"margin-bottom":"20px","text-align":"center"}},X={class:"fcrm_email_campaign_stats_card_wrapper"},K={class:"fcrm_sms_campaign_view--stats-list"},aa={class:"fcrm_sms_campaign_view--stat-label"},ea={class:"fcrm_sms_campaign_view--stat-value"},ta={class:"fcrm_sms_campaign_view--stat-label"},ia={key:0,class:"fcrm_sms_campaign_view--stat-value"},sa={key:1,class:"fcrm_sms_campaign_view--stat-value"},na={class:"fcrm_perf_bars"},ra={class:"fcrm_perf_bar_header"},la={class:"fcrm_perf_bar_label"},ca={class:"fcrm_perf_value"},ma={class:"fcrm_perf_count"},pa={class:"fcrm_perf_pct"},oa={class:"fcrm_perf_bar"},da={class:"fcrm_sms_campaign_view--link-list"},ga={key:1,class:"fcrm_sms_campaign_view--main fcrm_email_campaign_view--main"},_a={class:"fcrm_campaign_emails_wrapper--title"};const ua={class:"fcrm_recurring_email_report_page"},va={class:"fcrm-layout-width"},ha={key:0},fa={key:2,class:"fluentcrm_body fluentcrm_body_boxed"};const ba=F({name:"ViewSingleCampaignReport",props:["campaign_id","email_id"],components:{PageHeader:Y,SendTestEmail:U,EmailEditor:F({name:"RecurringMailEditor",props:["campaign","saving"],emits:["goToNext","updateCampaign"],components:{BaseCard:A,EmailBlockComposer:R,ArrowRight:a},computed:{isGutenbergLayout(){var a;const e=((null==(a=window.fcAdmin)?void 0:a.email_template_designs)||{})[this.campaign.design_template];return!(!e||!e.use_gutenberg)}},methods:{nextStep(){this.$emit("goToNext")},goBack(){const a=this.campaign.parent_id;a?this.$router.push({name:"past_recurring_emails",params:{campaign_id:a}}):window.history.length>1&&window.history.back()},updateCampaign(){this.$emit("updateCampaign")}}},[["render",function(a,s,n,r,l,c){const m=e,p=v("ArrowRight"),o=i,d=v("email-block-composer"),g=v("base-card"),_=t;return h(),f(g,{body_class:"fcrm_p_0"},{body:b(()=>[y("div",O,[C(d,{disabled_templates:{visual_builder:!0},onSave:s[2]||(s[2]=a=>c.updateCampaign()),show_audit:!0,show_merge:!0,enable_template_save:!0,"hide-back-btn":!0,"hide-next-btn":!0,onEditor_next:s[3]||(s[3]=a=>c.nextStep()),onEditor_back:s[4]||(s[4]=a=>c.goBack()),use_fullscreen_editor:c.isGutenbergLayout,iframe_nav_mode:"compose",enable_templates:!0,campaign:n.campaign},{fc_editor_actions:b(()=>[k((h(),f(m,{disabled:n.saving,size:"small",onClick:s[0]||(s[0]=a=>c.updateCampaign())},{default:b(()=>[w(j(a.$t("Save")),1)],void 0,!0),_:1},8,["disabled"])),[[_,n.saving]]),k((h(),f(m,{disabled:n.saving,size:"small",type:"primary",onClick:s[1]||(s[1]=a=>c.nextStep())},{default:b(()=>[w(j(a.$t("Continue to Schedule"))+" ",1),C(o,null,{default:b(()=>[C(p)],void 0,!0),_:1})],void 0,!0),_:1},8,["disabled"])),[[_,n.saving]])]),_:1},8,["use_fullscreen_editor","campaign"])])]),_:1})}]]),MailConfig:F({name:"RecurringMailConfigLine truncated
@@ -0,0 +1 @@
import{k as i,ax as s}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as e,W as n,X as t,ab as a,a5 as r,Z as c,aa as g,a9 as m}from"../../../../../vendor.js?ver=3.1.8";import{R as o}from"../../../../../RecipientTaggerForm.js?ver=3.1.8";import{C as l,B as _}from"../../../../../_conditions.js?ver=3.1.8";import{_ as d}from"../../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";const p={class:"fcrm_single_recurring_camp_settings"},f={class:"fcrm_single_recurring_camp_settings--form-item"},u={class:"fcrm_single_recurring_camp_settings--form-item-header"},v={class:"fcrm_single_recurring_camp_settings--form-schedule"},h={class:"fcrm_single_recurring_camp_settings--form-item"},b={class:"fcrm_single_recurring_camp_settings--form-item-header"},S={class:"fcrm_single_recurring_camp_settings--form-conditions"},$={class:"fcrm_single_recurring_camp_settings--form-item"},j={class:"fcrm_single_recurring_camp_settings--form-item-header"},C={class:"fcrm_single_recurring_camp_settings--form-recipients"},y={class:"fcrm_single_recurring_camp_settings--form-footer"};const R=d({name:"RecurringEmailSettings",props:["campaign"],components:{RecipientTaggerForm:o,BasicSettings:_,ConditionsSettings:l},data:()=>({saving:!1}),methods:{updateCampaign(){this.saving=!0;const i={campaign:JSON.stringify({settings:this.campaign.settings,title:this.campaign.title})};this.$post("recurring-campaigns/"+this.campaign.id+"/update-settings",i).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.handleError(i)}).finally(()=>{this.saving=!1})}},mounted(){this.changeTitle(this.$t("Settings")+" - "+this.campaign.title)}},[["render",function(o,l,_,d,R,T){const V=e("basic-settings"),k=e("conditions-settings"),x=e("recipient-tagger-form"),B=i,E=s;return n(),t("div",p,[a(E,{"label-position":"top",class:"fcrm_single_recurring_camp_settings--form"},{default:r(()=>[c("div",f,[c("div",u,[c("h3",null,g(o.$t("Scheduling Settings")),1)]),c("div",v,[a(V,{campaign:_.campaign},null,8,["campaign"])])]),c("div",h,[c("div",b,[c("h3",null,g(o.$t("Sending Conditions")),1)]),c("div",S,[a(k,{sending_conditions:_.campaign.settings.sending_conditions},null,8,["sending_conditions"])])]),c("div",$,[c("div",j,[c("h3",null,g(o.$t("Recipients")),1)]),c("div",C,[a(x,{modelValue:_.campaign.settings.subscribers_settings,"onUpdate:modelValue":l[0]||(l[0]=i=>_.campaign.settings.subscribers_settings=i)},null,8,["modelValue"])])]),c("div",y,[a(B,{loading:R.saving,disabled:R.saving,onClick:l[1]||(l[1]=i=>T.updateCampaign()),type:"primary"},{default:r(()=>[m(g(o.$t("Save Settings")),1)],void 0,!0),_:1},8,["loading","disabled"])])],void 0),_:1})])}]]);export{R as default};
@@ -0,0 +1 @@
import{aZ as t,a_ as e,aJ as i,k as s,ay as a,ax as n,ap as r}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as o,W as c,X as p,Z as l,ab as d,a5 as g,a9 as m,aa as _,J as u,az as h,Y as v,a0 as f,a6 as S,a8 as y,av as $}from"../../../../vendor.js?ver=3.1.8";import{R as C}from"../../../../RecipientTaggerForm.js?ver=3.1.8";import{C as b,B as k}from"../../../../_conditions.js?ver=3.1.8";import{B as j}from"../../../../BaseCard.js?ver=3.1.8";import{_ as w}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const B={class:"fcrm_edit_campaign_page"},R={class:"fcrm_page_header_top_nav_wrapper"},x={class:"fcrm_page_header_top_nav"},P={class:"fcrm_page_header_top_actions"},T={class:"fcrm_edit_campaign_steps"},q={class:"fcrm_edit_campaign_progress_label"},z={class:"fcrm_edit_campaign_progress_bar"},N=["onClick"],E={class:"fcrm_max_w_800"},F={class:"fcrm_edit_campaign_steps_wrapper"};const J=w({name:"CreateRecurringCampaignFlow",components:{BaseCard:j,RecipientTaggerForm:C,BasicSettings:k,ConditionsSettings:b},data(){return{ArrowRightBold:$(r),loading:!1,creating:!1,activeStep:parseInt(this.$route.query.step,10)||0,steps:[{title:this.$t("Start"),description:this.$t("Provide campaign details")},{title:this.$t("Conditions"),description:this.$t("Select automation conditions")},{title:this.$t("Recipients"),description:this.$t("Select Email Recipients")}],campaign:{title:"",email_subject:"",email_pre_header:"",email_body:"",status:"draft",settings:{subscribers_settings:{subscribers:[{list:"all",tag:"all"}],excludedSubscribers:[{list:null,tag:null}],sending_filter:"list_tag",dynamic_segment:{id:"",slug:""},advanced_filters:[[]]},scheduling_settings:{type:"weekly",day:"",time:"",send_automatically:"yes"},sending_conditions:[[{object_type:"cpt",object_name:"post",object_key:"post_date",comparison_type:"within_days",compare_value:7}]]}}}},watch:{"$route.query.step":function(){this.activeStep=this.normalizeStep(this.$route.query.step)}},created(){this.activeStep=this.normalizeStep(this.activeStep)},methods:{normalizeStep(t){const e=parseInt(t,10);return isNaN(e)||e<0?0:e>=this.steps.length?this.steps.length-1:e},setStep(t){const e=this.normalizeStep(t);e===this.activeStep&&e===this.normalizeStep(this.$route.query.step)||(this.activeStep=e,this.$router.push({name:"create_recurring_campaign",query:{...this.$route.query,step:e}}))},validateStartStep(t=!0){return this.campaign.title?this.campaign.settings.scheduling_settings.time?("weekly"!=this.campaign.settings.scheduling_settings.type||this.campaign.settings.scheduling_settings.day)&&!("monthly"==this.campaign.settings.scheduling_settings.type&&!this.campaign.settings.scheduling_settings.day)||(t&&this.$notify.error(this.$t("Please provide a day")),!1):(t&&this.$notify.error(this.$t("Please provide a time")),!1):(t&&this.$notify.error(this.$t("Please provide an unique title")),!1)},validateConditionStep(t=!0){if(this.campaign.settings.sending_conditions.length){if(this.campaign.settings.sending_conditions[0][0].compare_value<1)return t&&this.$notify.error(this.$t("Please provide condition value")),!1}return!0},canGoToStep(t){return t<=0||!!this.validateStartStep(!1)&&(1===t||!!this.validateConditionStep(!1))},targetStep(t){t!==this.activeStep&&this.canGoToStep(t)&&this.setStep(t)},nextStep(t){if(1===t){if(!this.validateStartStep())return}else if(2===t&&!this.validateConditionStep())return;this.setStep(t)},goToPrev(t){this.setStep(t)},createCampaign(){this.creating=!0,this.$post("recurring-campaigns",{campaign:JSON.stringify(this.campaign)}).then(t=>{this.$notify.success(t.message),this.$router.push({name:"view_recurring_campaign",params:{campaign_id:t.campaign_id}})}).catch(t=>{this.handleError(t),(0===t.go_to_step||t.go_to_step)&&this.setStep(t.go_to_step)}).finally(()=>{this.creating=!1})}}},[["render",function(r,$,C,b,k,j){const w=t,J=e,V=i,A=o("basic-settings"),G=s,I=o("BaseCard"),Z=o("conditions-settings"),O=o("recipient-tagger-form"),Q=n,U=a;return c(),p("div",B,[l("div",R,[l("div",x,[d(J,{"separator-icon":k.ArrowRightBold},{default:g(()=>[d(w,{to:{name:"recurring_campaigns"}},{default:g(()=>[m(_(r.$t("Recurring Email Campaigns")),1)],void 0,!0),_:1}),d(w,null,{default:g(()=>[m(_(k.campaign.title||r.$t("Create a recurring email broadcast")),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"])]),l("div",P,[l("div",T,[l("div",q,_(k.activeStep+1)+"/"+_(k.steps.length)+" "+_(r.$t("Completed")),1),l("div",z,[(c(!0),p(u,null,h(k.steps,(t,e)=>(c(),v(V,{key:e,content:t.title,placement:"top"},{default:g(()=>[l("div",{class:f(["fcrm_edit_campaign_progress_segment",{"is-filled":e<=k.activeStep}]),onClick:t=>j.targetStep(e)},null,10,N)],void 0),_:2},1032,["content"]))),128))])])])]),l("div",E,[d(Q,{"label-position":"top",model:k.campaign},{default:g(()=>[S((c(),p("div",F,[0===k.activeStep?(c(),v(I,{key:0},{title:g(()=>[l("h4",null,_(r.$t("Scheduling Settings")),1)]),body:g(()=>[d(A,{campaign:k.campaign},null,8,["campaign"])]),footer:g(Line truncated
@@ -0,0 +1 @@
import{_ as e}from"../../../../fc-bits.js?ver=3.1.8";import{aj as a,a6 as t,n as s,aL as l,aK as i,ay as n,E as o,k as r,ac as c,c as p,a2 as d,j as m,h,i as u,aB as g,aH as _,aI as f,aQ as b,e as y,aR as C,aS as v,g as $}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as w,W as k,X as S,Z as A,ab as L,a5 as B,Y as D,a8 as F,J as T,az as P,$ as j,aa as R,a6 as E,a9 as x,ac as O,b2 as V,bW as q}from"../../../../vendor.js?ver=3.1.8";import{C as I}from"../../../../Confirm.js?ver=3.1.8";import{P as M}from"../../../../PaginationBar.js?ver=3.1.8";import{D as N}from"../../../../DataTable.js?ver=3.1.8";import{_ as z,I as H,a as U,T as W}from"../../../../fc-bits-ui.js?ver=3.1.8";import{T as Y}from"../../../../TopNav.js?ver=3.1.8";import{B as Q}from"../../../../Badge.js?ver=3.1.8";import{P as G}from"../../../../PageHeader.js?ver=3.1.8";import{F as J}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{G as K}from"../../../../GenericPromo.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const Z={name:"BulkCampaignActions",components:{Delete:t,Check:a},emits:["refetch"],props:{selectedCampaigns:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})},filters:{type:Object,default:()=>({})},allSelected:{type:Boolean,default:!1},theme_mode:{type:String,default:""}},watch:{"select_job.action_name"(e){"apply_labels"!==e&&(this.selectedLabels=[])}},computed:{bulkSelectPopperClass(){return"dark"===this.theme_mode?"fcrm-force-light":"fcrm-dark"},bulkSelectWordbreakPopperClass(){return"dark"===this.theme_mode?"fcrm_select_options_wordbreak fcrm-force-light":"fcrm_select_options_wordbreak fcrm-dark"}},data:()=>({select_job:{action_name:""},doing_action:!1,selectedLabels:[]}),methods:{doApplyLabels(){this.selectedLabels.length&&this.doBulkAction("apply_labels")},confirmAndDeleteCampaigns(){s.confirm(this.$t("Are you sure you want to delete the selected recurring campaigns?"),this.$t("Delete Recurring Campaigns"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.doBulkAction("delete_campaigns")}).catch(()=>{})},doBulkAction(e){const a={action_name:e,labels:"apply_labels"===e?this.selectedLabels:[]};this.allSelected?(a.select_all=!0,a.filters=this.filters):a.campaign_ids=this.selectedCampaigns.map(e=>e.id),this.doing_action=!0,this.$post("recurring-campaigns/do-bulk-action",a).then(e=>{this.$notify.success(e.message),this.$emit("refetch"),this.selectedLabels=[],this.select_job.action_name=""}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})}}},X={class:"fcrm_bulk_action_inline"},ee={class:"fcrm_bulk_wrap"},ae={class:"icon"};const te=z(Z,[["render",function(e,a,t,s,c,p){const d=l,m=i,h=w("Check"),u=o,g=r,_=w("Delete"),f=n;return k(),S("div",X,[A("div",ee,[L(m,{clearable:"",filterable:"",size:"small",class:"fcrm_bulk_select",placeholder:e.$t("Select Action"),"popper-class":p.bulkSelectPopperClass,effect:"dark",modelValue:c.select_job.action_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.select_job.action_name=e)},{default:B(()=>[L(d,{label:e.$t("Apply Labels"),value:"apply_labels"},null,8,["label"]),e.hasPermission("fcrm_manage_email_delete")?(k(),D(d,{key:0,label:e.$t("Delete Selected"),value:"delete_campaigns"},null,8,["label"])):F("",!0)],void 0),_:1},8,["placeholder","popper-class","modelValue"]),"apply_labels"===c.select_job.action_name?(k(),S(T,{key:0},[L(m,{filterable:"",size:"small",class:"fcrm_bulk_select",placeholder:e.$t("Select Labels"),modelValue:c.selectedLabels,"onUpdate:modelValue":a[1]||(a[1]=e=>c.selectedLabels=e),multiple:"","collapse-tags":"","collapse-tags-tooltip":"","popper-class":p.bulkSelectWordbreakPopperClass,effect:"dark"},{default:B(()=>{var e;return[(k(!0),S(T,null,P((null==(e=t.options)?void 0:e.labels)||[],e=>(k(),D(d,{key:e.id,value:e.id,label:e.title},{default:B(()=>[A("span",{style:j("background:"+e.settings.color+";padding: 2px 5px 4px 5px;border-radius: 4px;color: #0E121B;")},R(e.title),5)],void 0,!0),_:2},1032,["value","label"]))),128))]},void 0),_:1},8,["placeholder","modelValue","popper-class"]),E((k(),D(g,{disabled:c.doing_action||!c.selectedLabels.length,onClick:a[2]||(a[2]=e=>p.doApplyLabels()),type:"primary",size:"small"},{default:B(()=>[A("span",ae,[L(u,null,{default:B(()=>[L(h)],void 0,!0),_:1})]),x(" "+R(e.$t("Apply Label")),1)],void 0),_:1},8,["disabled"])),[[f,c.doing_action]])],64)):"delete_campaigns"===c.select_job.action_name?E((k(),D(g,{key:1,disabled:c.doing_action,type:"danger",size:"small",plain:"",onClick:p.confirmAndDeleteCampaigns},{default:B(()=>[L(u,null,{default:B(()=>[L(_)],void 0,!0),_:1}),x(" "+R(e.$t("Delete Selected")),1)],void 0),_:1},8,["disabled","onClick"])),[[f,c.doing_action]]):F("",!0)])])}]]),se=q(()=>e(()=>import("../../../../v3app/src/Modules/Labels/Labels.js?ver=3.1.8"),[],import.meta.url)),le=q(()=>e(()=>import("../../../../v3app/src/Modules/Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8"),[],import.meta.url)),ie=q(()=>e(()=>import("../../../../v3Line truncated
@@ -0,0 +1 @@
import{T as r}from"../../../../TopNav.js?ver=3.1.8";import{P as a}from"../../../../PromoCard.js?ver=3.1.8";import{P as e}from"../../../../PageHeader.js?ver=3.1.8";import{aQ as o,W as s,X as i,Z as n,ab as m,a5 as c,a9 as t,aa as p}from"../../../../vendor.js?ver=3.1.8";import{_ as d}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const _={class:"fcrm_email_recurring_campaigns_page"},l={class:"fcrm_page_header_top_nav_wrapper"},g={class:"fcrm_page_header_top_nav"},v={class:"fcrm-layout-width"},u={class:"fcrm_body_boxed"};const f={key:0,class:"fc_recurring_root"},h={key:1};const P=d({name:"RecurringCampaignsView",components:{EmailRecurringPromo:d({name:"EmailRecurringPromo",components:{PromoCard:a,TopNav:r,PageHeader:e}},[["render",function(r,a,e,d,f,h){const P=o("TopNav"),y=o("page-header"),j=o("PromoCard");return s(),i("div",_,[n("div",l,[n("div",g,[m(P)]),a[0]||(a[0]=n("div",{class:"fcrm_page_header_top_actions"},null,-1))]),n("div",v,[m(y,null,{title:c(()=>[t(p(r.$t("Recurring Email Campaigns")),1)]),_:1}),n("div",u,[m(j,{heading:r.$t("Recurring Campaigns"),description:r.$t("Send_Email_Daily_Weekly_Monthly")},null,8,["heading","description"])])])])}]])}},[["render",function(r,a,e,n,c,t){const p=o("router-view"),d=o("email-recurring-promo");return r.has_campaign_pro?(s(),i("div",f,[m(p)])):(s(),i("div",h,[m(d)]))}]]);export{P as default};
@@ -0,0 +1 @@
import{aZ as a,a_ as i,aP as e,aB as t,ap as s}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as c,X as r,Z as m,ab as g,a5 as d,a9 as p,aa as l,a8 as o,a0 as _,av as u}from"../../../../vendor.js?ver=3.1.8";import{S as h}from"../../../../TestEmail.js?ver=3.1.8";import{_ as f}from"../../../../fc-bits-ui.js?ver=3.1.8";const v={class:"fcrm_single_recurring_camp_page"},y={class:"fcrm-layout-width"},b={key:0,class:"fcrm_page_header"},$={class:"fcrm_page_header_content"},x={class:"fcrm_page_header_breadcrumb"},S={class:"fcrm_page_header_actions"},k={key:1,class:"fcrm_single_recurring_camp_body fcrm_body_boxed"},j={class:"fcrm_single_recurring_camp_body_header"},w={class:"fcrm_single_recurring_camp_body_header--left"},E={key:0,class:"fcrm_action_menu"},C={class:"fcrm_single_recurring_camp_body_header--right"},T={class:"fcrm_single_recurring_camp_body--email-body fcrm_sticky_block_composer_page"},V={key:2,class:"fluentcrm_body fluentcrm_body_boxed"};const A=f({name:"ViewSingleCampaign",components:{SendTestEmail:h},props:["campaign_id"],data:()=>({ArrowRightBold:u(s),campaign:{},loading:!0}),methods:{fetchCampaign(){this.loading=!0,this.$get("recurring-campaigns/"+this.campaign_id).then(a=>{this.campaign=a.campaign}).catch(a=>{this.handleError(a)}).finally(()=>{this.loading=!1})},changeStatus(){const a=this.campaign.status,i=()=>this.$post("recurring-campaigns/"+this.campaign.id+"/change-status",{status:a}).then(a=>{this.$notify.success(a.message)});"active"===a?this.$post("recurring-campaigns/update-campaign-data",{campaign:JSON.stringify(this.campaign),campaign_id:this.campaign.id,validate_subject:"yes"}).then(i).catch(a=>{this.handleError(a),this.campaign.status="draft"}):i().catch(a=>{this.handleError(a),this.campaign.status="active"})},campaignStatusText(a){return{active:this.$t("Active"),draft:this.$t("Draft")}[a]||a}},mounted(){this.fetchCampaign()}},[["render",function(s,u,h,f,A,B){const R=a,Z=i,D=n("send-test-email"),H=n("router-link"),J=e,N=n("router-view"),O=t;return c(),r("div",v,[m("div",y,[A.campaign?(c(),r("div",b,[m("div",$,[m("div",x,[g(Z,{"separator-icon":A.ArrowRightBold},{default:d(()=>[g(R,{to:{name:"recurring_campaigns"}},{default:d(()=>[p(l(s.$t("Recurring Campaigns")),1)],void 0,!0),_:1}),g(R,null,{default:d(()=>[p(l(A.campaign.title),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"])])]),m("div",S,[g(D,{campaign:{email_subject:A.campaign.email_subject,email_pre_header:A.campaign.post_excerpt,email_body:A.campaign.post_content||A.campaign.email_body,design_template:A.campaign.design_template,settings:A.campaign.settings}},null,8,["campaign"])])])):o("",!0),A.campaign&&A.campaign.id?(c(),r("div",k,[m("div",j,[m("div",w,[A.campaign.id?(c(),r("ul",E,[m("li",null,[g(H,{to:{name:"view_recurring_campaign",params:{campaign_id:A.campaign.id}}},{default:d(()=>[p(l(s.$t("Email Configuration")),1)],void 0),_:1},8,["to"])]),m("li",null,[g(H,{to:{name:"recurring_campaign_settings",params:{campaign_id:A.campaign.id}}},{default:d(()=>[p(l(s.$t("Settings")),1)],void 0),_:1},8,["to"])]),m("li",null,[g(H,{to:{name:"past_recurring_emails",params:{campaign_id:A.campaign.id}}},{default:d(()=>[p(l(s.$t("Email History")),1)],void 0),_:1},8,["to"])])])):o("",!0)]),m("div",C,[g(J,{onChange:u[0]||(u[0]=a=>B.changeStatus()),modelValue:A.campaign.status,"onUpdate:modelValue":u[1]||(u[1]=a=>A.campaign.status=a),"active-value":"active","inactive-value":"draft","active-text":B.campaignStatusText(A.campaign.status)},null,8,["modelValue","active-text"])])]),m("div",T,[A.campaign.id?(c(),r("div",{key:0,class:_([s.$route.name,"fcrm_single_recurring_camp_body--email-body-inner"])},[g(N,{campaign:A.campaign},null,8,["campaign"])],2)):o("",!0)])])):A.loading?(c(),r("div",V,[g(O,{animated:!0,style:{padding:"20px"},rows:7})])):o("",!0)])])}]]);export{A as default};
@@ -0,0 +1 @@
import{aZ as t,a_ as e,k as a,ay as i,av as r,aD as s,aA as o,aw as l,e as n,aK as d,aL as p,az as c,ax as m,ap as _}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as u,X as v,Z as h,ab as y,a5 as f,a9 as b,aa as j,a6 as $,a8 as P,J as w,az as k,Y as E,av as x}from"../../../../vendor.js?ver=3.1.8";import{E as C}from"../../../../BlockComposer.js?ver=3.1.8";import{_ as S}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const V={class:"fluentcrm-templates fluentcrm-view-wrapper fluentcrm_view fcrm_edit_template_page fcrm_sticky_block_composer_page"},D={class:"fcrm_page_header_top_nav_wrapper"},B={class:"fcrm_page_header_top_nav"},A={class:"fcrm_page_header_top_actions"},F={class:"fluentcrm_body fluentcrm_body_boxed",style:{position:"relative"}},T={key:0,class:"fc_loading_bar"},z={key:1,style:{padding:"40px","text-align":"center"}},I={key:2},R={class:"fcrm_mt_20"},U={style:{"font-size":"12px",color:"var(--fc-secondary-text)",margin:"4px 0 0","padding-inline-start":"24px"}},L={key:3,style:{margin:"0 -20px"}};const N=S({name:"EditPattern",props:["pattern_id"],components:{EmailBlockComposer:C},data:()=>({ArrowRightBold:x(_),pattern:{id:0,title:"",content:"",category:"",description:"",sync_status:""},campaignData:{id:0,title:"",email_body:"",design_template:"simple",__fcrm_block_type:"email_pattern",settings:{template_config:{}}},editorFeatures:{email_style_settings:!1,email_footer:!1,email_preview:!1,save_as_template:!1,browse_templates:!1,smartcodes:!1,design_switcher:!1},categories:[],loading:!0,saving:!1,app_ready:!1,loadError:null}),computed:{isSynced:{get(){return"unsynced"!==this.pattern.sync_status},set(t){this.pattern.sync_status=t?"":"unsynced"}}},methods:{fetchCategories(){this.$get("email-patterns/categories").then(t=>{this.categories=t.categories||[]}).catch(()=>{})},fetchPattern(){this.loading=!0,this.loadError=null,this.$get(`email-patterns/${this.pattern_id}`).then(t=>{const e=t.pattern||t;this.pattern={id:e.id,title:e.title||"",content:e.content||"",category:e.category||"",description:e.description||"",sync_status:e.sync_status||""},this.campaignData.id=e.id||0,this.campaignData.title=e.title||"",this.campaignData.email_body=e.content||"",this.$nextTick(()=>{this.app_ready=!0})}).catch(t=>{this.loadError=this.$t("Failed to load pattern. Please try again."),this.handleError(t)}).finally(()=>{this.loading=!1})},savePattern(){this.pattern.title?(this.saving=!0,this.$put(`email-patterns/${this.pattern.id}`,{title:this.pattern.title,content:this.campaignData.email_body,category:this.pattern.category||"",sync_status:this.pattern.sync_status}).then(t=>{this.campaignData.title=this.pattern.title,this.$notify.success(t.message)}).catch(t=>{this.handleError(t)}).finally(()=>{this.saving=!1})):this.$notify.error(this.$t("Pattern name is required"))}},mounted(){this.fetchPattern(),this.fetchCategories(),this.changeTitle(this.$t("Edit Pattern"))}},[["render",function(_,x,C,S,N,W){const Z=t,q=e,J=a,K=r,M=n,O=l,Q=o,X=p,Y=d,G=c,H=s,tt=m,et=g("email-block-composer"),at=i;return u(),v("div",V,[h("div",D,[h("div",B,[y(q,{"separator-icon":N.ArrowRightBold},{default:f(()=>[y(Z,{to:{name:"email_patterns"}},{default:f(()=>[b(j(_.$t("Email Patterns")),1)],void 0,!0),_:1}),y(Z,null,{default:f(()=>[b(j(N.pattern.title||_.$t("Edit Pattern")),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"])]),h("div",A,[y(J,{loading:N.saving,disabled:N.saving,onClick:W.savePattern,type:"primary"},{default:f(()=>[b(j(_.$t("Save Pattern")),1)],void 0),_:1},8,["loading","disabled","onClick"])])]),$((u(),v("div",F,[N.loading?(u(),v("div",T,[y(K,{class:"el-progress_animated","show-text":!1,percentage:30})])):P("",!0),N.loadError?(u(),v("div",z,[h("p",null,j(N.loadError),1),y(J,{type:"primary",onClick:x[0]||(x[0]=t=>W.fetchPattern())},{default:f(()=>[b(j(_.$t("Retry")),1)],void 0),_:1})])):P("",!0),N.app_ready?(u(),v("div",I,[y(tt,{"label-position":"top"},{default:f(()=>[y(H,{gutter:30},{default:f(()=>[y(Q,{sm:24,md:8},{default:f(()=>[y(O,{label:_.$t("Pattern Name")},{default:f(()=>[y(M,{placeholder:_.$t("Pattern Name"),modelValue:N.pattern.title,"onUpdate:modelValue":x[1]||(x[1]=t=>N.pattern.title=t)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"])],vLine truncated
@@ -0,0 +1 @@
import{a4 as e,P as t,aZ as a,a_ as l,k as i,h as s,i as o,E as m,j as p,ay as r,av as d,aD as n,aA as _,aw as c,e as h,ax as u,ap as v}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as f,X as y,Z as b,aa as T,Y as w,a5 as $,ab as j,a9 as k,J as C,a6 as S,a8 as E,av as x}from"../../../../vendor.js?ver=3.1.8";import{E as I}from"../../../../BlockComposer.js?ver=3.1.8";import{I as D}from"../../../../_FormBuilder2.js?ver=3.1.8";import{S as V}from"../../../../TestEmail.js?ver=3.1.8";import{_ as B,I as P}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const A={class:"fluentcrm-templates fluentcrm-view-wrapper fluentcrm_view fcrm_edit_template_page fcrm_sticky_block_composer_page"},M={class:"fcrm_page_header_top_nav_wrapper"},U={class:"fcrm_page_header_top_nav"},K={key:0,class:"fcrm_page_header_top_nav--title"},L={class:"fcrm_page_header_top_actions"},F={class:"icon"},J={class:"fluentcrm_body fluentcrm_body_boxed",style:{position:"relative"}},O={key:0,class:"fc_loading_bar"},H={key:1},N={key:2,class:"fc_template_init_notice"},R={key:3,style:{margin:"0 -20px"}};const Q=B({name:"edit_template",props:["template_id"],emits:["getVisualData"],components:{Icons:P,InputPopover:D,EmailBlockComposer:I,SendTestEmail:V,MoreFilled:t,Download:e},data:()=>({ArrowRightBold:x(v),email_template:{post_title:"",post_content:" ",post_excerpt:"",email_subject:"",edit_type:"html",design_template:"simple",settings:{template_config:{}}},email_template_designs:window.fcAdmin.email_template_designs,smart_codes:[],loading:!0,saving:!1,app_ready:!1,codes_ready:!1,is_dirty:!1,prevContent:""}),computed:{hasTemplateId(){return!!parseInt(this.template_id)}},methods:{getDefaultTemplateTitle(){const e=new Date,t=e=>String(e).padStart(2,"0");return`Untitled - Created at ${`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}`},createTemplateDraft(){this.hasTemplateId?this.maybeSaveTemplate():(this.loading=!0,this.is_dirty=!1,this.email_template.post_title||(this.email_template.post_title=this.getDefaultTemplateTitle()),this.email_template.design_template||(this.email_template.design_template="simple"),this.$post("templates",{template:JSON.stringify(this.email_template)}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit_template",params:{template_id:e.template_id}})}).catch(e=>{console.log(e),this.handleError(e)}).finally(()=>{this.loading=!1}))},fetchSmartCodes(){this.codes_ready=!1,this.$get("templates/smartcodes",{}).then(e=>{this.smart_codes=e.smartcodes}).catch(e=>{console.log(e)}).finally(()=>{this.codes_ready=!0})},fetchTemplate(){this.loading=!0,this.$get(`templates/${this.template_id}`).then(e=>{this.email_template=e.template,this.$nextTick(()=>{this.app_ready=!0,this.prevContent=this.email_template.post_content})}).catch(e=>{console.log(e)}).finally(()=>{this.loading=!1})},saveTemplate(){this.saving=!0,this.is_dirty=!1;let e={};e=parseInt(this.template_id)?this.$post("templates",{template:JSON.stringify(this.email_template),template_id:this.template_id}):this.$post("templates",{template:JSON.stringify(this.email_template)}),this.prevContent=this.email_template.post_content,e.then(e=>{this.$notify.success(e.message),parseInt(this.template_id)||this.$router.push({name:"edit_template",params:{template_id:e.template_id}})}).catch(e=>{console.log(e),this.handleError(e)}).finally(()=>{this.saving=!1})},maybeSaveTemplate(){"visual_builder"==this.email_template.design_template?this.$bus.emit("getVisualData",{}):this.saveTemplate()},handleChangeContent(){this.is_dirty=!0},exportTemplate(){this.has_campaign_pro?location.href=window.ajaxurl+"?"+jQuery.param({action:"fluentcrm_export_template",template_id:this.template_id}):this.$notify.error(this.$t("Template_Export_Alert"))},initKeyboardSave(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),this.maybeSaveTemplate())},handleBeforeUnload(e){if(this.is_dirty&&this.prevContent!==this.email_template.post_content)return e.preventDefault(),e.returnValue="",""}},mounted(){this.fetchSmartCodes(),this.hasTemplateId?this.fetchTemplate():(this.loading=!1,this.app_ready=!0,this.prevContent=this.email_template.post_content),this.changeTitle(this.$t("Edit Template")),document.addEventListener("keyLine truncated
@@ -0,0 +1 @@
import{c as e,k as t,aB as a,aH as n,aI as s,j as i,h as l,i as r,ay as o,e as c,E as d,n as h}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as p,W as m,X as g,Z as _,ab as u,ay as f,a5 as y,a9 as k,aa as v,a8 as b,Y as P,a6 as $,b2 as C,J as S}from"../../../../vendor.js?ver=3.1.8";import{C as w}from"../../../../Confirm.js?ver=3.1.8";import{P as T}from"../../../../PaginationBar.js?ver=3.1.8";import{T as D}from"../../../../TopNav.js?ver=3.1.8";import{_ as x,I as A,a as E,T as B}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as j}from"../../../../PageHeader.js?ver=3.1.8";import{D as F}from"../../../../DataTable.js?ver=3.1.8";import{F as N}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";const M={class:"fcrm_email_patterns_page"},H={class:"fcrm_page_header_top_nav_wrapper"},I={class:"fcrm_page_header_top_nav"},O={class:"fcrm-layout-width"},L={key:0},U={class:"icon"},V={class:"icon"},Y={class:"fcrm_empty_state"},K={class:"fcrm_empty_state_text"},z={key:0},J={key:1},Q={key:1,class:"template-title"},R={key:2,class:"fcrm_badge fcrm_badge_info",style:{"margin-left":"8px"}},W=["title"],X=["aria-label"],Z={class:"el-popover__reference"},q={class:"icon"},G={class:"el-popover__reference"},ee={class:"icon"},te={class:"fcrm_bulk_action_bar"},ae={class:"fcrm_bulk_action_left"},ne={class:"fc_bulk_selection_count"},se={class:"icon"};const ie=x({name:"Patterns",components:{Confirm:w,PageHeader:j,PaginationBar:T,TopNav:D,Icons:A,DataTable:F,FloatingBulkActionShell:N,Close:e},computed:{allSelectedOnPage(){const e=this.selectedPatterns.length;return this.patterns.length>0&&e===this.patterns.length&&e===this.pagination.per_page}},data:()=>({patterns:[],loading:!1,creating:!1,selection:!1,selectedPatterns:[],allSelected:!1,deleting:!1,search:"",appliedSearch:"",current_mode:"system"===B.getCurrentTheme()?B.getSystemTheme():B.getCurrentTheme(),pagination:{current_page:1,per_page:20,total:0}}),methods:{fetch(){this.loading=!0,this.selection=!1,this.allSelected=!1,this.appliedSearch=this.search,this.$get("email-patterns",{per_page:this.pagination.per_page,page:this.pagination.current_page,search:this.search}).then(e=>{this.patterns=e.patterns.data||[],this.pagination.total=e.patterns.total,!this.patterns.length&&this.pagination.current_page>1&&this.pagination.total>0&&(this.pagination.current_page=Math.min(this.pagination.current_page,Math.ceil(this.pagination.total/this.pagination.per_page)||1),this.fetch())}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},resetAndFetch(){this.pagination.current_page=1,this.fetch()},fetchPatterns(){this.fetch()},addPattern(){this.creating=!0,this.$post("email-patterns",{title:this.$t("Untitled Pattern"),content:"\x3c!-- wp:paragraph --\x3e<p></p>\x3c!-- /wp:paragraph --\x3e"}).then(e=>{this.$router.push({name:"edit_pattern",params:{pattern_id:e.pattern.id}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.creating=!1})},onSelection(e){this.selection=!!e.length,this.selectedPatterns=e,this.allSelected&&e.length<this.patterns.length&&(this.allSelected=!1)},clearSelection(){this.$refs.patternTable&&this.$refs.patternTable.clearSelection(),this.selectedPatterns=[],this.allSelected=!1,this.selection=!1},selectAllPatterns(){this.patterns.length&&this.patterns.forEach(e=>{this.$refs.patternTable.toggleRowSelection(e,!0)}),this.allSelected=!0},selectOnlyThisPage(){this.allSelected=!1},confirmBulkDelete(){h.confirm(this.$t("Are you sure you want to delete the selected patterns?"),this.$t("Delete Patterns"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.doBulkDelete()}).catch(()=>{})},doBulkDelete(){const e={action_name:"delete_patterns"};this.allSelected?(e.select_all=!0,e.search=this.appliedSearch||""):e.pattern_ids=this.selectedPatterns.map(e=>e.id),this.deleting=!0,this.$post("email-patterns/do-bulk-action",e).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.handleError(e)}).finally(()=>{this.deleting=!1})},deletePattern(e){this.$del(`email-patterns/${e.id}`).then(e=>{this.$notify.success(e.message),this.fetchPatterns()}).catch(e=>{this.handleError(e)})},onThemeChanged(e){var t;this.current_mode=(null==(t=e.detail)?void 0:t.effective)||("system"===B.getCurrentTheme()?B.getSystemTheme():B.getCurrentTheme())}},mounted(){window.addEventListener(E,this.onThemeChanged),this.fetchPatterns(),this.changeTitle(this.$t("Email Patterns"))},beforeUnmount(){window.removeEventListener(E,this.onThemeChanged)}},[["render",function(e,h,w,T,D,x){const A=p("TopNav"),E=p("Icons"),B=t,j=p("page-header"),F=c,N=a,ie=p("icons"),le=s,re=p("router-link"),oe=r,ce=p("confirm"),de=l,he=i,pe=n,me=p("pagination-bar"),ge=p("data-table"),_e=p("Close"),ue=d,fe=p("floating-bulk-action-shell"),ye=o;return m(),g("div",M,[_("div",H,[_("div",I,[u(A)])]),_("div",O,[u(j,null,f({title:y(()=>[k(v(e.$t("Email Patterns"))+" ",1),D.pagination.total?(m(),g("small",L,"("+v(e.formatMoney(D.pagination.total))+")",1)):b("",!0)]),_Line truncated
@@ -0,0 +1 @@
import{c as e,n as t,E as a,k as l,ay as i,o as s,a6 as o,a2 as n,ac as r,j as c,h as p,i as m,aB as d,aH as h,aI as _,e as u,aR as g,aS as f,g as v}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as w,W as y,X as T,Z as b,ab as $,a5 as k,J as S,a9 as C,aa as D,a8 as P,Y as I,a6 as A,ac as B,ay as E,b2 as j}from"../../../../vendor.js?ver=3.1.8";import{C as x}from"../../../../Confirm.js?ver=3.1.8";import{P as V}from"../../../../PaginationBar.js?ver=3.1.8";import{_ as O,I as N,a as F,T as L}from"../../../../fc-bits-ui.js?ver=3.1.8";import{I as U}from"../../../../InlineDoc.js?ver=3.1.8";import{E as H}from"../../../../EmailPreview.js?ver=3.1.8";import{B as M}from"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import{F as q}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{T as G}from"../../../../TopNav.js?ver=3.1.8";import{P as R}from"../../../../PageHeader.js?ver=3.1.8";import{D as J}from"../../../../DataTable.js?ver=3.1.8";import{G as Q}from"../../../../GenericPromo.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const Y={name:"BulkTemplateAction",components:{Icons:N,Close:e},emits:["deselect-all","refetch","select-all","select-only-this-page"],props:{selectedTemplates:{type:Array,default:()=>[]},totalCount:{type:Number,default:0},currentPageCount:{type:Number,default:0},perPage:{type:Number,default:10},allSelected:{type:Boolean,default:!1},search:{type:String,default:""}},computed:{allSelectedOnPage(){const e=this.selectedTemplates.length,t=this.currentPageCount;return t>0&&e===t&&e===this.perPage}},data:()=>({doing_action:!1}),methods:{confirmAndDeleteTemplates(){t.confirm(this.$t("Are you sure to delete?")+" "+this.$t("delete_all_templates_notice"),this.$t("Delete Templates"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.doBulkAction()}).catch(()=>{})},doBulkAction(){let e={action_name:"delete_templates"};this.allSelected?(e.select_all=!0,e.search=this.search||""):e.template_ids=this.selectedTemplates.map(e=>e.ID),this.doing_action=!0,this.$post("templates/do-bulk-action",e).then(e=>{this.$notify.success(e.message),this.$emit("refetch")}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})}}},K={class:"fcrm_bulk_action_bar"},W={class:"fcrm_bulk_action_left"},z={class:"fc_bulk_selection_count"},X={key:0,class:"fc_bulk_divider","aria-hidden":"true"},Z={key:2,class:"fc_bulk_divider","aria-hidden":"true"},ee={class:"icon"};const te={class:"fcrm_email_templates_page"},ae={class:"fcrm_page_header_top_nav_wrapper"},le={class:"fcrm_page_header_top_nav"},ie={class:"fcrm-layout-width"},se={class:"icon"},oe={class:"el-popover__reference"},ne={class:"icon"},re={class:"icon"},ce={class:"icon"},pe={class:"fcrm_empty_state"},me={class:"fcrm_empty_state_text"},de={class:"fcrm_template_type_icon"},he=["title"],_e=["onClick"],ue={class:"fcrm_template_preview_pill_btn"},ge={class:"el-dropdown-link"},fe={class:"el-popover__reference"},ve={class:"icon"},we={class:"el-popover__reference"},ye={class:"icon"},Te={class:"el-popover__reference"},be={class:"icon"},$e={class:"el-popover__reference"},ke={class:"icon"},Se={key:2},Ce={key:0,class:"fcrm_import_content"},De={class:"upload-icon"},Pe={class:"el-upload__text"};const Ie=O({name:"Templates",components:{CopyDocument:r,GenericPromo:Q,Icons:N,PageHeader:R,FloatingBulkActionShell:q,DataTable:J,TopNav:G,EmailPreview:H,Confirm:x,PaginationBar:V,BulkTemplateAction:O(Y,[["render",function(e,t,s,o,n,r){const c=w("Close"),p=a,m=l,d=w("Icons"),h=i;return y(),T("div",K,[b("div",W,[$(m,{link:"","aria-label":e.$t("Deselect"),onClick:t[0]||(t[0]=t=>e.$emit("deselect-all"))},{default:k(()=>[$(p,null,{default:k(()=>[$(c)],void 0,!0),_:1})],void 0),_:1},8,["aria-label"]),b("span",z,[s.allSelected?(y(),T(S,{key:0},[C(D(e.$t("All"))+" ",1),b("strong",null,D(s.totalCount),1),C(" "+D(e.$t("selected")),1)],64)):(y(),T(S,{key:1},[b("strong",null,D(s.selectedTemplates.length),1),C(" "+D(e.$t("selected")),1)],64))]),r.allSelectedOnPage&&!s.allSelected?(y(),T("span",X)):P("",!0),r.allSelectedOnPage&&!s.allSelected?(y(),I(m,{key:1,link:"",onClick:t[1]||(t[1]=t=>e.$emit("select-all"))},{default:k(()=>[C(D(e.$t("Select All"))+" "+D(s.totalCount),1)],void 0),_:1})):P("",!0),s.allSelected?(y(),T("span",Z)):P("",!0),s.allSelected?(y(),I(m,{key:3,link:"",onClick:t[2]||(t[2]=t=>e.$emit("select-only-this-page"))},{default:k(()=>[C(D(e.$t("Select only this page")),1)],void 0),_:1})):P("",!0),t[3]||(t[3]=b("span",{class:"fc_bulk_divider","aria-hidden":"true"},null,-1)),e.hasPermission("fcrm_manage_email_delete")?A((y(),I(m,{key:4,disabled:n.doing_action,type:"danger",size:"small",plain:"",onClick:r.confirmAndDeleteTemplates},{default:k(()=>[b("span",ee,[$(d,{"icon-name":"delete"})]),C(" "+D(e.$t("Delete")),1)],void 0),_:1},8,["disabled","onClick"])),[[h,n.doiLine truncated
@@ -0,0 +1 @@
import{ay as e,E as t,aF as a,aE as i,aw as r,e as s,az as l,ax as o,k as n,aB as c,aH as d,aI as m,D as f,ar as _,aG as p,aO as h,j as u,h as g,i as v,aT as y}from"../../../vendor-element-plus.js?ver=3.1.8";import{W as w,X as b,Z as F,a8 as C,bB as $,aQ as k,a6 as V,ab as I,a5 as x,aa as T,a9 as E,J as S,az as A,Y as O,b2 as L,a0 as P,ay as j}from"../../../vendor.js?ver=3.1.8";import{O as D}from"../../../_OptionSelector.js?ver=3.1.8";import{_ as H,I as z}from"../../../fc-bits-ui.js?ver=3.1.8";import{I as B}from"../../../ItemCopier2.js?ver=3.1.8";import{C as U}from"../../../CustomIcon.js?ver=3.1.8";import{P as N}from"../../../PaginationBar.js?ver=3.1.8";import{I as M}from"../../../InlineDoc.js?ver=3.1.8";import{D as Q}from"../../../DataTable.js?ver=3.1.8";import{P as G}from"../../../PageHeader.js?ver=3.1.8";import K from"../../../v3app/src/Modules/Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";import"../../../v3app/src/Modules/Contacts/Filter/FilterPopover.js?ver=3.1.8";const Y={class:"fcrm_form_preview"},Z={class:"fcrm_form_preview_image"},R={class:"fcrm_form_preview_image_body"},W={key:0,class:"fcrm_form_preview_image_container"},J={key:1,class:"fcrm_form_preview_image_container"},X={key:2,class:"fcrm_form_preview_image_container"},q={class:"fcrm_form_preview_details"},ee={key:0,class:"fcrm_form_preview_title"},te={key:1,class:"fcrm_form_preview_title"},ae={key:2,class:"fcrm_form_preview_title"};const ie={class:"fc_create_form_wrapper fcrm_create_form_wrapper"},re={key:0,style:{padding:"20px"},class:"fc_created_form text-align-center"},se={class:"fcrm_success_icon"},le={class:"fcrm_item_copier_wrapper"},oe={class:"d-flex flex-wrap items-center justify-center"},ne=["href"],ce={class:"icon"},de={class:"ml-5"},me=["href"],fe={class:"icon"},_e={class:"ml-5"},pe=["href"],he={class:"icon"},ue={key:1,style:{height:"100%"}},ge={key:0,class:"fc_select_template_wrapper"},ve={class:"fc_config_template"},ye={class:"fc_drawer_footer_wrap fcrm_drawer_footer_wrap"},we={class:"fcrm_drawer_footer_wrap_title"},be={class:"fcrm_drawer_footer_wrap_actions"};const Fe={class:"fc_form_entry"},Ce=["innerHTML"],$e={key:2};const ke={class:"fc_form_entries"},Ve={key:0,class:"text-align-center"},Ie={key:1},xe={class:"icon"},Te={key:1,class:"text-align-center"},Ee={class:"fcrm_empty_state"},Se={class:"fcrm_empty_state_text"},Ae={key:2,class:"fcrm_forms_table"},Oe=["href"],Le=["title"];const Pe={class:"icon"},je={key:0,class:"fcrm_filter_menu_items_container"},De={class:"fcrm_filter_menu_text"},He={key:1,class:"fcrm_filter_empty_item"},ze={class:"fcrm_filter_empty_text"},Be={class:"fcrm_filter_menu_text"},Ue={key:3,class:"fcrm_filter_empty_item"},Ne={class:"fcrm_filter_empty_text"},Me={class:"fcrm_filter_category_header"},Qe={class:"fcrm_filter_category_title"},Ge={class:"fcrm_filter_search_item"},Ke={class:"fcrm_filter_options_container"},Ye={key:1,class:"fcrm_filter_no_results"},Ze={class:"fcrm_filter_no_results_text"};const Re={class:"fcrm_forms_page"},We={class:"fcrm-layout-width"},Je={class:"icon"},Xe={class:"icon"},qe={class:"fcrm_empty_state_text"},et={key:0,class:"fcrm_installation_loader",role:"status","aria-live":"polite"},tt={class:"fcrm_loader_text"},at={class:"icon"},it={class:"d-flex gap-4 flex-wrap"},rt={class:"icon"},st={key:1,class:"fcrm_form_info_empty"},lt=["title"],ot={class:"icon","aria-hidden":"true"},nt={class:"fcrm_empty_state"},ct={class:"fcrm_empty_state_text"};const dt=H({name:"FluentForms",components:{createForm:H({name:"CreateForm",emits:["close"],components:{OptionSelector:D,FormPreview:H({name:"FormPreview",props:{type:{type:String,default:"inline_subscribe"}},components:{},data:()=>({})},[["render",function(e,t,a,i,r,s){return w(),b("div",Y,[F("div",Z,[t[3]||(t[3]=F("div",{class:"fcrm_form_preview_image_header"},[F("div",{class:"fcrm_form_preview_action fcrm_bg_red"}),F("div",{class:"fcrm_form_preview_action fcrm_bg_yellow"}),F("div",{class:"fcrm_form_preview_action fcrm_bg_green"})],-1)),F("div",R,["inline_subscribe"==a.type?(w(),b("div",W,[...t[0]||(t[0]=[F("div",{class:"fcrm_form_preview_common_form fcrm_form_inline"},[F("div",{class:"fcrm_form_preview_input"}),F("div",{class:"fcrm_form_preview_button fcrm_bg_primary"})],-1)])])):C("",!0),"simple_optin"==a.type?(w(),b("div",J,[...t[1]||(t[1]=[F("div",{class:"fcrm_form_preview_common_form fcrm_form_simple"},[F("div",{class:"fcrm_form_preview_input"})],-1),F("div",{class:"fcrm_form_preview_button fcrm_bg_primary"},null,-1)])])):C("",!0),"with_name_subscribe"==a.type?(w(),b("div",X,[...t[2]||(t[2]=[$('<div style="display:flex;gap:5px;"><div class="fcrm_form_preview_common_form fcrm_form_with_name_subscribe" style="width:42%;"><div class="fcrm_form_preview_input"></div></div><div class="fcrm_form_preview_common_form fcrm_form_with_name_subscribe" style="width:42%;"><div class="fcrm_form_preview_input"></div></div></div><div class="fcrm_form_preview_common_form fcrm_form_with_name_subscribe"><div class="fcrm_form_preview_input"></div></div><div class="fcrLine truncated
@@ -0,0 +1 @@
import{c as e,P as t,W as s,a6 as a,y as l,aK as i,aL as n,aB as r,aI as o,aJ as c,E as d,j as u,h as _,i as f,k as m,ay as h,aH as p}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as v,X as b,Z as w,ab as y,a5 as $,a9 as k,aa as C,J as S,az as F,Y as A,a8 as x,a6 as I}from"../../../vendor.js?ver=3.1.8";import{P as T}from"../../../PaginationBar.js?ver=3.1.8";import{I as P,C as j}from"../../../_IndividualProgress.js?ver=3.1.8";import{C as q}from"../../../Confirm.js?ver=3.1.8";import{_ as D,I as E,a as B,T as H}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as z}from"../../../PageHeader.js?ver=3.1.8";import{F as L}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../Badge.js?ver=3.1.8";const R={class:"fluentcrm_settings_wrapper"},Y={class:"fcrm_funnels_activities_page"},U={class:"fcrm_page_header_top_nav_wrapper"},V={class:"fcrm_page_header_top_nav"},W={class:"fcrm_page_header_top_nav_links"},J={class:"fcrm-layout-width"},M={class:"fcrm_table_wrapper"},K={class:"fcrm_table_body fcrm_pt_24"},N={key:1},Q={key:0},X=["title"],Z={key:1,class:"fcrm_badge fcrm_badge_plain"},G=["title"],O=["title"],ee={style:{display:"flex","align-items":"center",gap:"4px"}},te={class:"el-dropdown-link"},se={class:"el-popover__reference"},ae={class:"el-popover__reference"},le={class:"fcrm_empty_state"},ie={class:"fcrm_empty_state_text"},ne={class:"fcrm_bulk_action_bar"},re={class:"fcrm_bulk_action_left"},oe={class:"fc_bulk_selection_count"};const ce=D({name:"FunnelSubscribers",props:[],components:{PaginationBar:T,PageHeader:z,ContactCard:j,IndividualProgress:P,Confirm:q,SuccessFilled:l,Delete:a,InfoFilled:s,MoreFilled:t,Close:e,Icons:E,FloatingBulkActionShell:L},data(){return{funnel:{},subscribers:[],loading:!1,pagination:{total:0,per_page:10,current_page:1},sequences:[],stats:{metrics:[],total_revenue:0,revenue_currency:"USD"},visualization_type:"chart",search:"",deleting:!1,updating:!1,selectedIds:[],selected_status:"",selected_sequence:"",funnel_statuses:{active:this.$t("Active"),completed:this.$t("Completed"),cancelled:this.$t("Cancelled"),pending:this.$t("Pending")},loading_first:!0,syncSteps:!1,current_mode:"system"===H.getCurrentTheme()?H.getSystemTheme():H.getCurrentTheme()}},methods:{fetchSubscribers(){this.loading=!0;let e=["funnel","sequences"];this.loading_first||(e=[]),this.$get("funnels/all-activities",{per_page:this.pagination.per_page,page:this.pagination.current_page,with:e,search:this.search,status:this.selected_status,sequence_id:this.selected_sequence}).then(e=>{this.subscribers=e.activities.data,this.pagination.total=e.activities.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1,this.loading_first=!1})},rowStatusClass:({row:e})=>"fc_table_row_"+e.status,removeFromFunnel(e){this.deleting=!0,this.$del(`funnels/${e.funnel_id}/subscribers`,{subscriber_ids:[e.subscriber_id]}).then(e=>{this.$notify.success(e.message),this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.deleting=!1})},bulkRemove(){if(!this.selectedIds.length)return this.$notify.error(this.$t("Please select subscribers first")),!1;this.deleting=!0,this.$post("funnels/remove-bulk-subscribers",{funnel_subscriber_ids:this.selectedIds}).then(e=>{this.$notify.success(e.message),this.selectedIds=[],this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.deleting=!1})},changeFunnelSubscriptionStatus(e,t){this.updating=!0,this.$put(`funnels/${e.funnel_id}/subscribers/${e.subscriber_id}/status`,{status:t}).then(e=>{this.$notify.success(e.message),this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.updating=!1})},onSelection(e){const t=[];this.each(e,e=>{t.push(e.id)}),this.selectedIds=t},clearSelection(){this.$refs.activitiesTable&&this.$refs.activitiesTable.clearSelection(),this.selectedIds=[]},onThemeChanged(e){var t;this.current_mode=(null==(t=e.detail)?void 0:t.effective)||("system"===H.getCurrentTheme()?H.getSystemTheme():H.getCurrentTheme())}},mounted(){window.addEventListener(B,this.onThemeChanged),this.fetchSubscribers(),this.changeTitle(this.$t("All Automation Activities"))},beforeUnmount(){window.removeEventListener(B,this.onThemeChanged)}},[["render",function(e,t,s,a,l,T){const P=g("router-link"),j=n,q=i,D=g("page-header"),E=r,B=o,H=g("individual-progress"),z=g("InfoFilled"),L=d,ce=c,de=g("contact-card"),ue=g("SuccessFilled"),_e=g("MoreFilled"),fe=f,me=g("Delete"),he=m,pe=g("confirm"),ge=_,ve=u,be=g("Icons"),we=p,ye=g("pagination-bar"),$e=g("Close"),ke=g("floating-bulk-action-shell"),Ce=h;return v(),b("div",R,[w("div",Y,[w("div",U,[w("div",V,[w("ul",W,[w("li",null,[y(P,{to:"/funnels",class:"fcrm_top_nav_link"},{default:$(()=>[k(C(e.$t("Automation Funnels")),1)],void 0),_:1})]),w("li",null,[y(P,{to:"/funnels/funnel/all-activities",class:"fcrm_top_nav_link"},{default:$(()=>[k(C(e.$t("All Activities")),1)],void 0),_:1})])])]),t[3]||(t[3]=w("div",{class:"fcrm_page_header_top_actions"},null,-1))]),w("div",J,[y(D,null,{title:$(()=>[k(C(e.$Line truncated
@@ -0,0 +1 @@
import{D as e,c as t,S as i,ak as n,aU as s,$ as o,aW as l,aV as c,E as a,e as r,at as _,ao as d,P as u,n as h,h as p,i as f,j as m,k as g,aN as k,aT as b,aw as v,ay as y,aK as w,aL as C,ax as $,ae as S,aZ as x,aO as T,a_ as B,az as V,aP as q,aJ as A,av as F,aB as j,aD as I,aA as E,g as L,ap as P}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as D,W as M,X as O,Z as R,Y as U,a5 as N,ab as H,a9 as J,aa as z,J as K,a8 as W,az as Z,a0 as G,a7 as Q,_ as Y,$ as X,ax as ee,a6 as te,b2 as ie,av as ne}from"../../../../vendor.js?ver=3.1.8";import{F as se,a as oe}from"../../../../FieldEditor.js?ver=3.1.8";import{A as le}from"../../../../Animation.js?ver=3.1.8";import{P as ce}from"../../../../ProBadge.js?ver=3.1.8";import{_ as ae,I as re}from"../../../../fc-bits-ui.js?ver=3.1.8";import{R as _e}from"../../../../_report_widget.js?ver=3.1.8";import{I as de}from"../../../../InlineDoc.js?ver=3.1.8";import{P as ue}from"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../EmailComposer.js?ver=3.1.8";import"../../../../BlockComposer.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../../_MailerConfig.js?ver=3.1.8";import"../../../../ItemCopier.js?ver=3.1.8";const he={class:"fcrm_funnel_blocks_panel"},pe={class:"fcrm_funnel_blocks_panel_header"},fe={class:"fcrm_funnel_blocks_panel_header_bottom"},me={key:0,class:"fcrm_funnel_blocks_panel_header_bottom_content"},ge={key:1,class:"fcrm_funnel_blocks_panel_header_bottom_content"},ke={key:2,class:"fcrm_funnel_blocks_panel_header_bottom_content"},be={class:"fcrm_funnel_blocks_wrapper_list"},ve={key:0,class:"fcrm_funnel_blocks_wrapper_item_title"},ye=["onClick"],we=["onClick"],Ce={class:"fcrm_trigger_selection_item_icon"},$e=["innerHTML"],Se={key:1},xe={class:"fcrm_trigger_selection_item_content"},Te={class:"fcrm_trigger_selection_item_title"},Be=["innerHTML"],Ve={key:0,class:"fcrm_empty_state"},qe={class:"fcrm_empty_state_text"};const Ae=ae({name:"blockChoice",components:{Icons:re,ProBadge:ce,Animation:le,CaretBottom:n,Menu:i,Close:t,Search:e},props:["blocks","condition_type","choice_context","show_close"],emits:["close","insert"],data:()=>({selectType:"action",searchBlock:"",closedCategories:[]}),mounted(){setTimeout(()=>{this.$refs.actions_search_input&&this.$refs.actions_search_input.focus()},300)},watch:{condition_type(){this.selectType="action"},searchBlock(e){e&&(this.selectType="all")}},computed:{current_items(){if("all"==this.selectType){const e={action:{title:this.$t("Actions"),categories:{}},benchmark:{title:this.$t("Goals"),categories:{}},conditional:{title:this.$t("Conditionals"),categories:{}}};if(this.each(this.blocks,(t,i)=>{if(!this.shouldIncludeBlock(t,i))return;const n=this.resolveBlockType(t,i);if(e[n]){const s=t.category||"Other";e[n].categories[s]||(e[n].categories[s]={title:s,items:{}}),t.action_name||(t.action_name=i),e[n].categories[s].items[i]=t}}),this.searchBlock){const t=this.searchBlock.toLowerCase();Object.keys(e).forEach(i=>{e[i].categories=Object.entries(e[i].categories).reduce((e,[i,n])=>{const s=Object.entries(n.items).reduce((e,[i,n])=>(n.title.toLowerCase().includes(t)&&(e[i]=n),e),{});return Object.keys(s).length>0&&(e[i]={title:n.title,items:s}),e},{})})}return e}const e={title:"",categories:{}};return this.each(this.blocks,(t,i)=>{if(!this.shouldIncludeBlock(t,i))return;if(this.resolveBlockType(t,i)===this.selectType){const n=t.category||"Other";e.categories[n]||(e.categories[n]={title:n,items:{}}),t.action_name||(t.action_name=i),e.categories[n].items[i]=t}}),{items:e}}},methods:{shouldIncludeBlock(e,t){return"child"!==this.choice_context||"conditional"!==e.type},resolveBlockType(e,t){let i=e.type;return"conditional"==i&&"funnel_ab_testing"==t&&"child"!=this.choice_context&&(i="action"),i},getCategoryKey:(e,t)=>`${e}::${t}`,toggleCategory(e){const t=this.closedCategories.indexOf(e);t>-1?this.closedCategories.splice(t,1):this.closedCategories.push(e)},isCategoryOpen(e){return!this.closedCategories.includes(e)},insert(e,t){if(t&&t.is_pro)return this.$alert('<p><strong>This block require pro version of FluentCRM</strong></p><p style="line-height: 22px; margin-bottom: 15px !important;">Please download and install FluentCRM Pro to activate this block</p><p><a class="el-button el-buttonLine truncated
@@ -0,0 +1 @@
import{aQ as s,W as t,X as a,ab as e}from"../../../vendor.js?ver=3.1.8";import{_ as i}from"../../../fc-bits-ui.js?ver=3.1.8";import"../../../vendor-element-plus.js?ver=3.1.8";const o={class:"fcrm_funnel_root fc_funnel_root"};const n=i({name:"FunnelRoute",data:()=>({app_ready:!1,options:{}}),methods:{getOptions(){this.app_ready=!1;const s={fields:"campaigns,email_sequences"};this.has_company_module&&(s.fields=`${s.fields},companies`),this.$get("reports/options",s).then(s=>{this.options=s.options,this.options.tags=this.appVars.available_tags,this.options.lists=this.appVars.available_lists,this.options.editable_statuses=this.appVars.available_contact_editable_statuses}).catch(s=>{this.handleError(s)}).finally(()=>{this.app_ready=!0})}},mounted(){this.getOptions(),this.changeTitle(this.$t("Automations"))}},[["render",function(i,n,p,r,l,h){const c=s("router-view");return t(),a("div",o,[e(c,{options:l.options},null,8,["options"])])}]]);export{n as default};
@@ -0,0 +1 @@
import{ay as e,av as t,k as s,g as a,c as n,W as i,aZ as l,a_ as r,aJ as c,b9 as o,aE as u,aH as d,aI as _,E as p,aO as m,j as h,h as f,i as b,e as g,aK as v,aL as y,aT as k,ap as w}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as S,a6 as C,W as $,X as x,Y as A,aa as q,a8 as F,Z as E,J as P,az as R,ab as I,a9 as B,a5 as T,a0 as V,b2 as j,av as L}from"../../../vendor.js?ver=3.1.8";import{P as D}from"../../../PaginationBar.js?ver=3.1.8";import{D as N}from"../../../DataTable.js?ver=3.1.8";import{F as z}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import{I as O,C as U}from"../../../_IndividualProgress.js?ver=3.1.8";import{E as M}from"../../../_eChart.js?ver=3.1.8";import{_ as W,I as H,a as Y,T as G}from"../../../fc-bits-ui.js?ver=3.1.8";import{R as K}from"../../../_report_widget.js?ver=3.1.8";import{C as Z}from"../../../Confirm.js?ver=3.1.8";import{L as J,C as Q}from"../../../_LinkMetrics.js?ver=3.1.8";import{G as X}from"../../../GenericPromo.js?ver=3.1.8";import{S as ee}from"../../../_StepPicker.js?ver=3.1.8";import{B as te}from"../../../Badge.js?ver=3.1.8";import"../Email/Campaigns/_components/EmailPreview.js?ver=3.1.8";import"../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../SettingsIcons.js?ver=3.1.8";import"../../../PromoCard.js?ver=3.1.8";const se={style:{"min-height":"400px"}},ae={key:1,class:"fc_chart_empty",style:{"text-align":"center",padding:"40px 0",opacity:".6"}};const ne={class:"fcrm_funnel_step_reports"},ie={class:"fcrm_funnel_step_reports--list"},le={class:"fcrm_funnel_step_reports--card-title"},re={class:"fcrm_funnel_step_reports--card-stats-badges"},ce={key:0,class:"fcrm_funnel_step_reports--card fcrm_funnel_step_reports--card-result"},oe={class:"fcrm_funnel_step_reports--card-title"};const ue={class:"fcrm_funnel_email_reports"},de={key:0,class:"fcrm_funnel_email_lists"},_e={class:"fcrm_funnel_email_card--left"},pe=["onClick"],me={class:"fcrm_funnel_email_card--meta"},he={class:"icon"},fe={class:"fcrm_funnel_email_card--right"},be={class:"fcrm_quick_stats_wrap"},ge={class:"fcrm_quick_stats_label"},ve={class:"fcrm_quick_stats"},ye=["onClick"],ke={class:"icon"},we={class:"fcrm_quick_stat_digit"},Se=["title"],Ce={class:"icon"},$e={class:"fcrm_quick_stat_digit"},xe=["onClick","title"],Ae={class:"icon"},qe={class:"fcrm_quick_stat_digit"},Fe=["title"],Ee={class:"icon"},Pe={class:"fcrm_quick_stat_digit"},Re={key:0,class:"fcrm_quick_stat--revenue"},Ie={class:"icon"},Be={class:"fcrm_quick_stat_digit"},Te={key:1,class:"text-align-center"};const Ve={class:"fcrm_sync_new_steps_content"},je={style:{"font-size":"16px"}},Le={key:0},De={key:1},Ne={key:2};const ze={class:"fcrm_funnel_subscribers_report"},Oe={class:"fcrm_page_header_top_nav_wrapper"},Ue={class:"fcrm_page_header_breadcrumb"},Me={class:"fcrm_page_header_top_actions"},We={key:0,class:"fcrm_funnel_matrics_wrapper fc_m_24"},He={class:"fcrm_funnel_matrics_header"},Ye={class:"fcrm_funnel_matrics_body"},Ge={key:3,class:"fcrm_funnel_matrics_stat"},Ke={class:"count"},Ze={class:"icon"},Je={class:"fcrm_empty_state"},Qe={class:"fcrm_empty_state_text"},Xe={key:1},et={class:"icon"},tt={key:0},st={key:1},at={key:0},nt=["title"],it={class:"icon"},lt=["title"],rt=["title"],ct={class:"el-dropdown-link"},ot={class:"el-popover__reference"},ut={class:"icon"},dt={class:"el-popover__reference"},_t={class:"icon"},pt={class:"el-popover__reference"},mt={class:"icon"},ht={class:"el-popover__reference"},ft={class:"icon"},bt={class:"fcrm_bulk_action_bar"},gt={class:"fcrm_bulk_action_left"},vt={class:"fc_bulk_selection_count"},yt={class:"icon"},kt={style:{padding:"10px 20px"}};const wt=W({name:"FunnelSubscribers",props:["funnel_id"],components:{Icons:H,Badge:te,PaginationBar:D,DataTable:N,FloatingBulkActionShell:z,ContactCard:U,IndividualProgress:O,FunnelChart:W({name:"funnel-reporting-bar",props:["funnel_id","stats"],components:{EChart:M},data:()=>({fetching:!0,eChartOptions:null,maxCumulativeValue:0}),computed:{},methods:{setupChartItems(){if(!this.stats.metrics||0===this.stats.metrics.length)return this.eChartOptions=null,void(this.fetching=!1);const e=[],t=[],s=[],a=this.getBackgroundColors(this.stats.metrics.length);let n=0;this.each(this.stats.metrics,(i,l)=>{t.push({value:i.count,itemStyle:{color:"benchmark"===i.type?"red":a[l]}}),s.push(i.count),e.push(i.label+"\n"+i.percent+"%"),i.count>n&&(n=i.count)}),this.maxCumulativeValue=n+10;const i=e.length,l=i>8?Math.max(8/i*100,10):100,r=this;this.eChartOptions={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=r.stats.metrics[e[0].dataIndex];let s=`<strong>${t.label}</strong><br/>`;return s+=`${t.percent}%<br/>`,e.forEach(e=>{const t=`<span style="display:inline-block;margin-right:4px;border-radius:4px;width:10px;height:10px;background-color:${e.color};"></span>`;s+=`${t} ${e.seriesName}: ${e.value}<br/>`}),t.revenues&&(s+=`Revenue: ${t.revenues.join(" & ")}`),s}},legend:{top:10,data:[this.$t("Contacts"),this.$t("Line")]},grid:{left:40,right:85,bottom:60,top:50,containLine truncated
@@ -0,0 +1 @@
import{S as e,R as t,_ as s}from"../../../fc-bits.js?ver=3.1.8";import{$ as a,ae as l,an as i,aU as n,ax as o,aV as r,aW as c,E as d,k as _,e as u,aB as p,g as h,a6 as m,aj as g,aL as f,aK as b,ay as y,B as v,i as C,aG as w,az as k,aX as F,a4 as $,J as L,ac as V,a7 as S,u as T,c as A,L as P,D,j as x,h as q,aI as M,aQ as I,aP as B,aH as R}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as j,W as H,Y as E,a5 as U,X as O,ab as Z,ax as z,Z as N,aa as W,J as K,az as Q,a0 as Y,a9 as G,a8 as J,a7 as X,a6 as ee,$ as te,_ as se,bU as ae,b2 as le,bS as ie,bV as ne,bT as oe,bW as re}from"../../../vendor.js?ver=3.1.8";import{P as ce}from"../../../ProBadge.js?ver=3.1.8";import{P as de}from"../../../PromoCard.js?ver=3.1.8";import{_ as _e,I as ue,a as pe,T as he}from"../../../fc-bits-ui.js?ver=3.1.8";import{C as me}from"../../../Confirm.js?ver=3.1.8";import{P as ge}from"../../../PaginationBar.js?ver=3.1.8";import{I as fe}from"../../../InlineDoc.js?ver=3.1.8";import{F as be}from"../../../Filterer.js?ver=3.1.8";import{a as ye}from"../../../data_config.js?ver=3.1.8";import{P as ve}from"../../../PageHeader.js?ver=3.1.8";import{F as Ce}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import{B as we}from"../../../Badge.js?ver=3.1.8";const ke={key:0,class:"el-dialog__title"},Fe={key:1,class:"el-dialog__title"},$e={key:0,class:"fcrm_trigger_selection_wrapper"},Le={class:"fcrm_trigger_selection_inner"},Ve={class:"fcrm_trigger_selection_sidebar"},Se={class:"fc_trigger_icon"},Te=["innerHTML"],Ae={class:"fcrm_trigger_label"},Pe={key:0,class:"fcrm_trigger_selection_sidebar--footer"},De={class:"fcrm_trigger_selection_main"},xe={class:"fcrm_trigger_selection_internal_label_wrapper"},qe={class:"icon"},Me={class:"fcrm_trigger_selection_header"},Ie={class:"fcrm_trigger_selection_header_title"},Be={key:0,class:"fcrm_trigger_selection_list"},Re=["onClick"],je={class:"fcrm_trigger_selection_item_icon"},He=["innerHTML"],Ee={key:1},Ue={class:"fcrm_trigger_selection_item_content"},Oe={class:"fcrm_trigger_selection_item_title"},Ze={class:"fcrm_trigger_selection_item_description"},ze=["href"],Ne={key:1,class:"fcrm_trigger_prebuild_template_wrapper"},We={key:0,class:"fcrm_trigger_prebuild_template_list--section"},Ke={class:"fcrm_trigger_prebuild_template_list"},Qe={class:"fcrm_trigger_prebuild_template_item_icon"},Ye={class:"fcrm_trigger_prebuild_template_item_title"},Ge={class:"fcrm_trigger_prebuild_template_item_description"},Je={class:"fcrm_trigger_prebuild_template_item_overlay"},Xe={class:"icon"},et={class:"icon"},tt=["href"],st={key:1,class:"fcrm_promo_block"},at={key:0,class:"dialog-footer"};const lt=_e({name:"CreateFunnelModal",components:{Icons:ue,PromoCard:de,ProBadge:ce,Back:i,CirclePlus:l,Finished:a},props:["visible","triggers"],emits:["close"],data(){var e,t;return{saving:!1,funnel:{title:"",trigger_name:""},templates:[],templatesLoading:!1,showCreateNewAutomations:!0,dialogVisible:this.visible,selected_category:(null==(t=null==(e=window.fcAdmin)?void 0:e.addons)?void 0:t.fluentcampaign)?this.$t("CRM"):"__all__",allCategoryKey:"__all__",allowed_categories:[],searchTrigger:"",showProDialog:!1}},watch:{visible(e){this.dialogVisible=e},dialogVisible(){this.$emit("close")}},computed:{has_campaign_pro(){var e,t;return!!(null==(t=null==(e=window.fcAdmin)?void 0:e.addons)?void 0:t.fluentcampaign)},effectiveSelectedCategory(){return(this.searchTrigger||"").trim()?this.allCategoryKey:this.selected_category},funnel_categories(){const e=[];return this.each(this.triggers,t=>{-1===e.indexOf(t.category)&&e.push(t.category)}),e.sort()},funnelTriggers(){const e=(this.searchTrigger||"").trim().toLowerCase(),t=!!e,s=[this.$t("CRM")],a={};this.each(this.triggers,(l,i)=>{const n=this.effectiveSelectedCategory===this.allCategoryKey||l.category===this.effectiveSelectedCategory;if(t||n){if(e){const t=(l.description||"").replace(/<[^>]*>/g," ");if(!`${l.label||""} ${t} ${l.category||""} ${i||""}`.toLowerCase().includes(e))return}s.includes(l.category)||s.push(l.category),a[i]=l}});const l={};if(s.forEach(e=>{this.each(a,(t,s)=>{t.category===e&&(l[s]=t)})}),!this.has_campaign_pro){const e={},t={};return this.each(l,(s,a)=>{s.disabled?t[a]=s:e[a]=s}),{...e,...t}}return l}},methods:{funnelActiveHandle(e){this.funnel.trigger_name&&this.funnel.trigger_name==e?this.funnel.trigger_name="":this.funnel.trigger_name=e},saveFunnel(){this.saving=!0,this.$post("funnels",{funnel:this.funnel}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit_funnel",params:{funnel_id:e.funnel.id},query:{is_new:"yes"}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})},getCatIcon(e){e=e.replaceAll(" ","").toLowerCase();const t=this.appVars.funnel_cat_icons[e];return t?"string"==typeof t?t.startsWith("<")?t:'<i class="'+t+'"></i>':t.svg?t.svg:t.icon?'<i class="'+t.icon+'"></i>':"":""},getElIcon:e=>n[e]||a,createFromTemplate(e){this.checkImportable(e)&&this.$post("funnels/create-from-template",{template:e}).then(e=>{this.$notify.success(e.messLine truncated
@@ -0,0 +1 @@
import{aZ as e,a_ as o,ay as t,k as r,aR as s,aw as i,e as n,ax as l,ap as a}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as d,W as c,X as u,Z as _,ab as p,a5 as m,a9 as f,aa as v,a6 as h,J as b,a8 as k,Y as g,az as y,av as j}from"../../../vendor.js?ver=3.1.8";import{a as q,F as $}from"../../../FieldEditor.js?ver=3.1.8";import{_ as w,I as F}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as x}from"../../../PromoCard.js?ver=3.1.8";import"../../../fc-bits.js?ver=3.1.8";import"../../../_FormBuilder2.js?ver=3.1.8";import"../../../PhotoWidget.js?ver=3.1.8";import"../../../input-popover-dropdown.js?ver=3.1.8";import"../../../data_config.js?ver=3.1.8";import"../../../_OptionSelector.js?ver=3.1.8";import"../../../_AjaxSelector.js?ver=3.1.8";import"../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../EmailComposer.js?ver=3.1.8";import"../../../BlockComposer.js?ver=3.1.8";import"../../../EmailPreview.js?ver=3.1.8";import"../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../TestEmail.js?ver=3.1.8";import"../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../PaginationBar.js?ver=3.1.8";import"../../../_MergeCodes.js?ver=3.1.8";import"../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../_MailerConfig.js?ver=3.1.8";import"../../../ItemCopier.js?ver=3.1.8";const C={class:"fcrm_funnel_import_page"},I={class:"fcrm_funnel_top_nav_wrapper"},S={class:"fcrm_page_header_breadcrumb"},E={class:"fcrm_funnel_import_body fcrm_max_w_800"},V={key:0,class:"fcrm_funnel_import_upload_step"},B={class:"fcrm_funnel_import_card"},N={class:"fcrm_funnel_import_card--header"},P={class:"fcrm_funnel_import_card--header-left"},A={class:"fcrm_funnel_import_card--header-title"},J={class:"fcrm_funnel_import_card--header-description"},O={class:"fcrm_funnel_import_card--body"},T={class:"fcrm_upload_file_box"},U={class:"fcrm_upload_file_box_label"},L={class:"upload-icon"},Q={class:"el-upload__text"},R={key:0},D={key:1,class:"fcrm_funnel_import_root_editor fc_funnel_editor"},M={class:"fcrm_fixed_bottom_actions"},W={key:2,class:"fcrm_funnel_import_root_editor"},Z={class:"fcrm_fixed_bottom_actions"};const z=w({name:"ImportFunnel",components:{PromoCard:x,Icons:F,FieldEditor:$,FormField:q},props:["options"],data:()=>({ArrowRightBold:j(a),sequences:[],funnel:{},blocks:{},block_fields:{},step:"upload",sequence_step:0,importing:!1,inline_errors:!1}),computed:{url(){let e=window.ajaxurl;return e+=(e.match(/\?/)?"&":"?")+jQuery.param({action:"fluentcrm_import_funnel"}),e},current_block(){return this.sequences[this.sequence_step]||!1},current_block_fields(){if(!this.current_block)return{};const e=this.current_block.action_name;return this.block_fields[e]}},methods:{success(e){this.sequences=e.funnel_sequences,this.funnel=e.funnel,this.blocks=e.blocks,this.block_fields=e.block_fields,this.step="root_editor"},error(e){const o=JSON.parse(e.message);this.$notify.error(o.message),o.requires&&(this.inline_errors=o.requires)},showSequenceEditor(e){jQuery("html, body").animate({scrollTop:0},"slow"),this.sequence_step=e,this.step="sequence_editor"},completeImport(){this.importing=!0,this.$post("funnels/import",{funnel:this.funnel,sequences:JSON.stringify(this.sequences)}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit_funnel",params:{funnel_id:e.funnel.id}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.importing=!1})}}},[["render",function(a,j,q,$,w,F){const x=e,z=o,G=d("Icons"),X=r,Y=s,H=n,K=i,ee=d("field-editor"),oe=d("form-field"),te=l,re=d("PromoCard"),se=t;return c(),u("div",C,[_("div",I,[_("div",S,[p(z,{class:"fcrm_funnel_breadcrumb","separator-icon":w.ArrowRightBold},{default:m(()=>[p(x,{to:{name:"funnels"}},{default:m(()=>[f(v(a.$t("Automation Funnels")),1)],void 0,!0),_:1}),p(x,null,{default:m(()=>[f(v(a.$t("Import Automation Funnel")),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"])])]),h((c(),u("div",E,[a.has_campaign_pro?(c(),u(b,{key:0},["upload"==w.step?(c(),u("div",V,[_("div",B,[_("div",N,[_("div",P,[_("div",A,v(a.$t("Import Automation")),1),_("div",J,v(a.$t("import_your_exported_automation_json_file")),1)])]),_("div",O,[_("div",T,[_("h3",U,v(a.$t("Upload JSON File")),1),p(Y,{drag:"",limit:1,action:F.url,ref:"uploader",multiple:!1,"on-error":F.error,"on-success":F.success},{default:m(()=>[_("span",L,[p(G,{"icon-name":"upload"})]),_("div",Q,[f(v(a.$t("Drop JSON file here or"))+" ",1),_("em",null,v(a.$t("click to upload")),1)]),p(X,null,{default:m(()=>[f(v(a.$t("Browse File")),1)],void 0,!0),_:1})],void 0),_:1},8,["action","on-error","on-success"])]),w.inline_errors?(c(),u("pre",R,v(w.inline_errors),1)):k("",!0)])])])):"root_editor"==w.step?(c(),u("div",D,[p(ee,{title_badge:a.$t("Trigger"),key:"is_editing_root",show_controls:!1,options:q.options,data:w.funnel.settings,settings:w.funnel.settingsFields},{after_header:m(()=>[p(K,{label:a.$t("Funnel Name")},{default:m(()=>[p(H,{placeholder:a.$t("Funnel Name"),modelValue:w.funnel.titleLine truncated
@@ -0,0 +1 @@
import{P as t,aB as e,bj as s,bi as i,aJ as n,aQ as a,aO as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{c6 as l,aQ as r,W as c,X as d,ab as u,a5 as f,Z as _,aa as p,J as h,az as m,Y as b,a0 as y,a9 as g,a8 as v}from"../../../../vendor.js?ver=3.1.8";import{_ as $}from"../../../../fc-bits-ui.js?ver=3.1.8";const k={key:0,class:"fc_loading"},w={key:1,style:{padding:"10px 15px"},class:"fc_individual_progress"},z={style:{"margin-bottom":"15px"}},I={class:"fluentcrm_clickable"};const L=$({name:"LazyIndividualProgress",props:["subscriber_id","funnel"],data:()=>({funnel_subscriber:{},sequences:[],loading:!0,isLoaded:!1,MoreFilledIcon:t}),computed:{keyedMetrics(){return this.isLoaded?l(this.funnel_subscriber.metrics,"sequence_id"):{}},timelines(){if(!this.isLoaded)return[];let t=this.$t("Entrance (%s)",this.funnel.title);"pending"===this.funnel_subscriber.status?t+=this.$t("_In_Wfdoc"):"waiting"===this.funnel_subscriber.status&&(t+=this.$t("_In_Wfna"));const e=[{content:t,timestamp:this.nsHumanDiffTime(this.funnel_subscriber.created_at),size:"large",type:"primary",icon:this.MoreFilledIcon}];let s=!1;return this.each(this.sequences,(t,i)=>{const n=this.keyedMetrics[t.id]||{};let a=t.title;"pending"===a?a+=this.$t("_In_Wfdc"):"waiting"===a&&(a+=this.$t("_In_Wfna")),"conditional"==t.type&&(s=t);let o="";if(t.condition_type){o="fc_path_"+t.condition_type,s&&(o="fc_"+s.action_name+" "+o);let e=this.$t("Condition:")+" "+t.condition_type;if("funnel_ab_testing"==s.action_name){const s="yes"==t.condition_type?this.$t("B"):this.$t("A");e=this.$t("Path: ")+s,o+="_"+s}a+=" ( "+e+" )"}n.status||(o+=" fc_timeline_empty"),e.push({content:a,status:n.status,notes:n.notes,timestamp:this.nsHumanDiffTime(n.created_at),color:this.getTimelineColor(n),wrapper_class:o})}),e}},methods:{getTimelineColor:t=>t.status&&"completed"===t.status?"#0bbd87":"",fetchData(){this.loading=!0,this.$get(`funnels/${this.funnel.id}/subscribers/${this.subscriber_id}`).then(t=>{this.funnel_subscriber=t.funnel_subscriber,this.sequences=t.sequences}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1,this.isLoaded=!0})},maybeFetchData(){this.isLoaded||this.fetchData()}}},[["render",function(t,l,$,L,D,q){const W=e,j=a,x=n,C=i,F=s,M=r("router-link"),T=o;return c(),d("div",null,[u(T,{placement:"right",onShow:l[0]||(l[0]=t=>q.maybeFetchData()),width:"400","popper-class":"fc_individual_progress_popover",trigger:"click"},{reference:f(()=>[_("span",I,p($.funnel.title),1)]),default:f(()=>[_("div",null,[D.loading?(c(),d("div",k,[u(W,{loading:!0,rows:3})])):D.isLoaded?(c(),d("div",w,[_("div",z,p(t.$t("Current Status:"))+" "+p(D.funnel_subscriber.status),1),u(F,null,{default:f(()=>[(c(!0),d(h,null,m(q.timelines,(t,e)=>(c(),b(C,{key:e,class:y(t.wrapper_class),icon:t.icon,type:t.type,color:t.color,size:t.size,timestamp:t.timestamp},{default:f(()=>[g(p(t.content)+" ",1),_("template",null,[t.notes?(c(),b(x,{key:0,class:"item",effect:"dark",content:t.notes,placement:"top-start"},{default:f(()=>[u(j,{size:"small",type:"info"},{default:f(()=>[g(p(t.status),1)],void 0,!0),_:2},1024)],void 0,!0),_:2},1032,["content"])):t.status?(c(),b(j,{key:1,size:"small",type:"info"},{default:f(()=>[g(p(t.status),1)],void 0,!0),_:2},1024)):v("",!0)])],void 0,!0),_:2},1032,["class","icon","type","color","size","timestamp"]))),128))],void 0,!0),_:1}),u(M,{to:{name:"edit_funnel",params:{funnel_id:this.funnel.id}}},{default:f(()=>[g(p(t.$t("View Automation Steps")),1)],void 0,!0),_:1},8,["to"])])):v("",!0)])],void 0),_:1})])}]]);export{L as default};
@@ -0,0 +1 @@
import{q as e,a$ as l,be as t,bf as a,aD as s,aA as i,aR as d,E as o,e as n,aK as c,aL as u,k as v,az as r,aG as p,aH as m,aI as h,ax as f,aw as b,aE as g,aF as C,b0 as k}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as _,X as $,ab as V,a5 as U,Z as x,aa as T,a9 as S,a8 as D,J as I,az as R,Y as A}from"../../../vendor.js?ver=3.1.8";import{_ as L}from"../../../fc-bits-ui.js?ver=3.1.8";const M={key:0,style:{"text-align":"center"}},z={class:"el-upload__text"},F={key:1},j={style:{color:"var(--fc-secondary-text)"}},w={style:{color:"var(--fc-secondary-text)"}},E={style:{"margin-top":"10px"}},N={key:0,style:{"text-align":"center"}},P={key:1},W={style:{"margin-top":"10px"}};const B=L({name:"Importer",components:{UploadFilled:e},data:()=>({activeTab:"Csv",activeCsv:1,activeUser:1,uploadedFile:null,uploadUrl:window.ajaxurl+"?action=fluentcrm-post-csv-upload",tags:[],selectedTags:[],lists:[],selectedLists:[],csvColumns:[],tableColumns:[],csvMapping:[],roles:[],tableData:[],checkAll:!1,isIndeterminate:!1,selectedRoles:[],tableColumn:["date","name","address"],IsDataInDatabase:""}),methods:{tabClicked(e,l){this.activeTab=e.name},next(){const e="active"+this.activeTab;("Csv"!==this.activeTab||1!==this.active||this.uploadedFile)&&("User"!==this.activeTab||1!==this[e]||this.selectedRoles.length)&&this.active++>2&&(this[e]=0)},prev(){const e="active"+this.activeTab;0!==this[e]&&this[e]--},fileUploaded(e,l,t){this.csvColumns=e.headers,this.tableColumns=e.columns,this.uploadedFile=e.file;const a=[];for(const s in this.csvColumns)a.push({csv:this.csvColumns[s],table:null});this.csvMapping=a},fileRemoved(e,l){this.uploadedFile=null},confirmCsv(){const e=this.csvMapping.filter(e=>e.table);e.length?this.$post("import/csv-import",{mappings:e,tags:this.selectedTags,lists:this.selectedLists,file:this.uploadedFile}).then(e=>{this.$notify({title:this.$t("Success"),type:"success",offset:20,message:this.$t("Map_Subscribers_is")})}).catch(e=>console.log(e)):this.$notify({title:this.$t("Warning"),type:"warning",offset:20,message:this.$t("No mapping found.")})},handleCheckAllChange(e){this.selectedRoles=e?Object.keys(this.roles):[],this.isIndeterminate=!1},fluentcrmCheckedRolesChange(e){const l=Object.keys(this.roles),t=e.length;this.checkAll=t===l.length,this.isIndeterminate=t>0&&t<l.length}},created(){this.$get("tags").then(e=>{this.tags=e}).catch(e=>this.handleError(e)),this.$get("lists").then(e=>{this.lists=e}).catch(e=>this.handleError(e)),this.$get("reports/roles").then(e=>{this.roles=e.roles}).catch(e=>this.handleError(e))}},[["render",function(e,L,B,O,Y,q){const G=a,H=t,J=y("UploadFilled"),K=o,Q=d,X=i,Z=s,ee=n,le=u,te=c,ae=v,se=l,ie=r,de=p,oe=h,ne=m,ce=b,ue=f,ve=C,re=g,pe=k;return _(),$("div",null,[V(pe,{type:"border-card",onTabClick:q.tabClicked,modelValue:Y.activeTab,"onUpdate:modelValue":L[7]||(L[7]=e=>Y.activeTab=e)},{default:U(()=>[V(se,{label:e.$t("CSV"),name:"Csv"},{default:U(()=>[V(H,{active:Y.activeCsv,"finish-status":"success","align-center":""},{default:U(()=>[V(G,{title:e.$t("Step 1")},null,8,["title"]),V(G,{title:e.$t("Step 2")},null,8,["title"])],void 0,!0),_:1},8,["active"]),1===Y.activeCsv?(_(),$("div",M,[x("h3",null,T(e.$t("Upload Your CSV file"))+": ",1),V(Z,null,{default:U(()=>[V(X,null,{default:U(()=>[V(Q,{drag:"",accept:".csv",limit:1,action:Y.uploadUrl,"on-success":q.fileUploaded,"on-remove":q.fileRemoved},{default:U(()=>[V(K,null,{default:U(()=>[V(J)],void 0,!0),_:1}),x("div",z,[S(T(e.$t("Drop file here or"))+" ",1),x("em",null,T(e.$t("click to upload")),1)])],void 0,!0),_:1},8,["action","on-success","on-remove"])],void 0,!0),_:1})],void 0,!0),_:1})])):D("",!0),2===Y.activeCsv?(_(),$("div",F,[(_(!0),$(I,null,R(Y.csvMapping,(l,t)=>(_(),A(Z,{gutter:20,key:t},{default:U(()=>[V(X,{xs:12,sm:12,md:12,lg:12,xl:12},{default:U(()=>[V(ee,{readonly:"",modelValue:Y.csvMapping[t].csv,"onUpdate:modelValue":e=>Y.csvMapping[t].csv=e},null,8,["modelValue","onUpdate:modelValue"])],void 0,!0),_:2},1024),V(X,{xs:12,sm:12,md:12,lg:12,xl:12},{default:U(()=>[V(te,{modelValue:Y.csvMapping[t].table,"onUpdate:modelValue":e=>Y.csvMapping[t].table=e,placeholder:e.$t("Select")},{default:U(()=>[(_(!0),$(I,null,R(Y.tableColumns,e=>(_(),A(le,{key:e,label:e,value:e},null,8,["label","value"]))),128))],void 0,!0),_:1},8,["modelValue","onUpdate:modelValue","placeholder"])],void 0,!0),_:2},1024)],void 0,!0),_:2},1024))),128)),V(Z,{style:{"margin-top":"10px"}},{default:U(()=>[x("div",j,T(e.$t("Select Tags")),1),x("div",null,[V(te,{modelValue:Y.selectedTags,"onUpdate:modelValue":L[0]||(L[0]=e=>Y.selectedTags=e),multiple:"",placeholder:e.$t("Select")},{default:U(()=>[(_(!0),$(I,null,R(Y.tags,e=>(_(),A(le,{key:e.id,label:e.title,value:e.id},null,8,["label","value"]))),128))],void 0,!0),_:1},8,["modelValue","placeholder"])])],void 0,!0),_:1}),V(Z,null,{default:U(()=>[x("div",w,T(e.$t("Select Lists")),1),x("div",null,[V(te,{modelValue:Y.selectedLists,"onUpdate:modelValue":L[1]||(L[1]=e=>Y.selectedLists=e),multiple:"",placeholder:e.$tLine truncated
@@ -0,0 +1 @@
import{ay as e,bf as t,be as i,aF as s,aE as r,k as a,aw as l,aK as n,aL as o,az as d,aD as _,aA as c,ax as p}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as m,W as u,X as v,Z as g,aa as f,a6 as h,ab as y,a5 as b,J as k,az as $,Y as V,a0 as M,a9 as C,a8 as x}from"../../../vendor.js?ver=3.1.8";import{C as R,I as j,a as w,T as D}from"../../../_ImportRunner.js?ver=3.1.8";import{O as T}from"../../../_OptionSelector.js?ver=3.1.8";import{_ as F}from"../../../fc-bits-ui.js?ver=3.1.8";import"../../../_FormBuilder2.js?ver=3.1.8";import"../../../PhotoWidget.js?ver=3.1.8";import"../../../input-popover-dropdown.js?ver=3.1.8";import"../../../data_config.js?ver=3.1.8";import"../../../_AjaxSelector.js?ver=3.1.8";import"../../../_VerifiedEmailInput.js?ver=3.1.8";const I={class:"fluentcrm-settings fluentcrm_min_bg fluentcrm_view"},L={class:"fluentcrm_header"},S={class:"fluentcrm_header_title"},O={style:{"max-width":"1190px",margin:"0 auto"},class:"fluentcrm_pad_around"},U={class:"settings-section fluentcrm_databox"},A={key:0,class:"fc_crm_selection_step"},E={class:"fc_step_header"},H={class:"fc_crm_lists"},J=["src"],N={class:"fc_text_label"},P={key:0},W=["href"],z={class:"text-align-right"},B={key:1,class:"fc_crm_selection_step"},K={key:2,class:"fc_crm_selection_step"},Q={class:"fc_step_header"},X={key:0,style:{"margin-bottom":"20px"}},Y=["innerHTML"],Z={style:{"margin-top":"20px"},class:"text-align-right"},q={key:3,class:"fc_crm_selection_step"};const G=F({name:"CRMMigrator",components:{TagMapper:D,ContactFieldMapper:w,OptionSelector:T,ImportRunner:j,CredentialVerify:R},data:()=>({loading:!1,drivers:{},selected_driver:"",step:1,cred:{api_key:""},segment_options:{lists:[],tags:[],contact_fields:[]},map_settings:{list_id:"",local_list_id:"",local_tag_id:"",import_silently:"yes",import_active_only:"yes"},import_summary:{}}),computed:{current_driver(){return this.drivers[this.selected_driver]||{}}},methods:{getDrivers(){this.loading=!0,this.$get("migrators").then(e=>{this.drivers=e.drivers}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},back(){this.step-=1},selectDriver(){this.cred=JSON.parse(JSON.stringify(this.current_driver.credentials)),this.step=2},credentialVerified(){this.listMappings(),this.step=3},listMappings(){this.loading=!0,this.$get("migrators/list-tag-mappings",{driver:this.selected_driver,credential:this.cred,map_settings:this.map_settings}).then(e=>{this.segment_options=e.options}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},maybeRefetchTags(){this.current_driver.refresh_on_list_change&&this.listMappings()}},mounted(){this.getDrivers()}},[["render",function(R,j,w,D,T,F){const G=t,ee=i,te=s,ie=r,se=a,re=m("credential-verify"),ae=o,le=n,ne=l,oe=m("tag-mapper"),de=d,_e=m("contact-field-mapper"),ce=m("option-selector"),pe=c,me=_,ue=p,ve=m("import-runner"),ge=e;return u(),v("div",I,[g("div",L,[g("div",S,[g("h3",null,f(R.$t("Transfer Data From Other CRM")),1)]),j[12]||(j[12]=g("div",{class:"fluentcrm-templates-action-buttons fluentcrm-actions"},null,-1))]),h((u(),v("div",O,[y(ee,{active:T.step,"align-center":""},{default:b(()=>[y(G,{title:R.$t("CRM"),description:R.$t("Select Current CRM")},null,8,["title","description"]),y(G,{title:R.$t("Connect"),description:R.$t("Connect with your CRM")},null,8,["title","description"]),y(G,{title:R.$t("Map Data"),description:R.$t("Map the data")},null,8,["title","description"]),y(G,{title:R.$t("Review"),description:R.$t("Review & Import")},null,8,["title","description"])],void 0),_:1},8,["active"]),g("div",U,[1==T.step?(u(),v("div",A,[g("div",E,[g("h3",null,f(R.$t("select_current_crm_software")),1),g("p",null,f(R.$t("transfer_data_from_current_ems_to_fluentcrm")),1)]),g("div",H,[y(ie,{class:"sources fc_inline_image_radio",modelValue:T.selected_driver,"onUpdate:modelValue":j[0]||(j[0]=e=>T.selected_driver=e)},{default:b(()=>[(u(!0),v(k,null,$(T.drivers,(e,t)=>(u(),V(te,{class:M(["fc_driver_"+t,"option"]),key:t,label:t},{default:b(()=>[g("img",{style:{width:"80px",height:"80px"},src:e.logo},null,8,J),g("span",N,f(e.title),1)],void 0,!0),_:2},1032,["class","label"]))),128))],void 0),_:1},8,["modelValue"])]),F.current_driver.doc_url?(u(),v("p",P,[g("a",{style:{"text-decoration":"underline"},target:"_blank",rel:"noopener",href:F.current_driver.doc_url},f(R.$t("Check the documentation")),9,W),C(" "+f(R.$t("for migrating from"))+" ",1),g("b",null,f(F.current_driver.title),1)])):x("",!0),g("div",z,[y(se,{onClick:j[1]||(j[1]=e=>F.selectDriver()),disabled:!T.selected_driver,type:"primary"},{default:b(()=>[C(f(R.$t("Next")),1)],void 0),_:1},8,["disabled"])])])):2==T.step?(u(),v("div",B,[y(re,{driver:T.selected_driver,current_driver:F.current_driver,onVerified:j[2]||(j[2]=e=>F.credentialVerified()),onBack:j[3]||(j[3]=e=>F.back()),cred:T.cred},null,8,["driver","current_driver","cred"])])):3==T.step?(u(),v("div",K,[g("div",Q,[g("h3",null,f(R.$t("Map your Data")),1),g("p",null,f(R.$t("Please configure"))+" "+f(F.current_driver.title)+" "+f(R.$tLine truncated
@@ -0,0 +1 @@
import{_ as e}from"../../../../fc-bits.js?ver=3.1.8";import{P as t,aH as a,aI as i,j as s,h as l,i as o,ay as n,aO as r,k as c,W as d,aJ as m,E as u,Z as _,bk as p,bl as h,aD as g,aA as f,g as b,o as v,c as w,_ as y,T as k,a6 as $,G as C,z as S,aP as E,aE as V,aF as T,ax as P,az as x,aT as F}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as q,W as A,Y as j,a5 as L,ab as M,a6 as z,X as D,aa as B,a8 as R,Z as H,b2 as I,ax as N,a9 as O,bW as U,a0 as W,J as Y,az as J,ac as Z}from"../../../../vendor.js?ver=3.1.8";import{P as K}from"../../../../PaginationBar.js?ver=3.1.8";import{D as Q}from"../../../../DataTable.js?ver=3.1.8";import{F as G}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{C as X}from"../../../../Confirm.js?ver=3.1.8";import{O as ee}from"../../../../_OptionSelector.js?ver=3.1.8";import{B as te}from"../../../../Badge.js?ver=3.1.8";import{_ as ae,I as ie,a as se,T as le}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as oe}from"../../../../_StepPicker.js?ver=3.1.8";import{E as ne}from"../../../../EmailComposer.js?ver=3.1.8";import{M as re}from"../../../../_MailerConfig.js?ver=3.1.8";import"../../../../BlockComposer.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const ce={class:"fcrm_table_header_inner_left_title"},de={class:"fcrm_contact_popover_header"},me={class:"fcrm_contact_popover_body fcrm_popover_email_section"},ue={key:0},_e=["title"],pe={key:0},he=["title"],ge={key:2},fe=["aria-label"],be={class:"el-popover__reference"},ve={class:"icon"};const we=ae({name:"ProfileEmailSequence",components:{Icons:ie,Badge:te,Confirm:X,PaginationBar:K,DataTable:Q,OptionSelector:ee,MoreFilled:t},props:["subscriber_id"],data:()=>({sequences:[],loading:!1,removing:!1,pagination:{total:0,per_page:10,current_page:1},selected_sequence:"",doing_action:!1}),methods:{fetch(){this.loading=!0,this.$get(`sequences/subscriber/${this.subscriber_id}/sequences`,{per_page:this.pagination.per_page,page:this.pagination.current_page}).then(e=>{this.sequences=e.sequence_trackers.data,this.pagination.total=e.sequence_trackers.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},removeFromSequence(e,t){this.removing=!0,this.$del(`sequences/${e}/subscribers`,{tracker_ids:[t]}).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.handleError(e)}).finally(()=>{this.removing=!1})},addToSequence(){this.selected_sequence?(this.doing_action=!0,this.$post("subscribers/do-bulk-action",{action_name:"add_to_email_sequence",new_status:this.selected_sequence,subscriber_ids:[this.subscriber_id]}).then(e=>{var t;null==(t=this.$refs.popover)||t.hide(),this.selected_sequence="",this.$notify.success(e.message),this.fetch()}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})):this.$notify.warning({title:this.$t("Warning"),message:this.$t("Please select an email sequence"),offset:19})}},mounted(){this.fetch()}},[["render",function(e,t,d,m,u,_){const p=c,h=q("option-selector"),g=r,f=i,b=q("Badge"),v=q("Icons"),w=q("confirm"),y=o,k=l,$=s,C=a,S=q("pagination-bar"),E=q("data-table"),V=n;return A(),j(E,{wrapper_border:!0,"has-selection":!1,class:"fcrm_mb_24"},{"header-left":L(()=>[H("h3",ce,B(e.$t("Email Sequences")),1)]),"header-actions":L(()=>[M(g,{ref:"popover",placement:"left",width:"350","hide-after":0,trigger:"click","popper-class":"fcrm_contact_popover"},{reference:L(()=>[M(p,{size:"small"},{default:L(()=>[O(B(e.$t("Add Sequence")),1)],void 0,!0),_:1})]),default:L(()=>[H("div",de,[H("h3",null,B(e.$t("Select Sequence")),1)]),H("div",me,[M(h,{modelValue:u.selected_sequence,"onUpdate:modelValue":t[0]||(t[0]=e=>u.selected_sequence=e),field:{option_key:"email_sequences",clearable:!0,size:"small",placeholder:e.$t("Select Email Sequence"),teleported:!1}},null,8,["modelValue","field"]),M(p,{onClick:_.addToSequence,loading:u.doing_action,type:"primary"},{default:L(()=>[O(B(e.$t("Add To Sequence")),1)],void 0,!0),_:1},8,["onClick","loading"])])],void 0,!0),_:1},512)]),table:L(()=>[z((A(),j(C,{"empty-text":e.$t("No Data Available"),stripe:"",border:"",data:u.sequences,style:{width:"100%"}},{default:L(()=>[M(f,{label:e.$t("Sequence")},{default:L(e=>[e.row.sequence?(A(),D("span",ue,B(e.row.sequence.title),1)):R("",!0)]),_:1},8,["label"]),M(f,{label:e.$t("Started At")},{default:L(t=>[H("span",{title:t.row.created_at},B(e.$nsHumanDiffTime(t.row.created_at)),9,_e)]),_:1},8,["label"]),M(f,{labeLine truncated
@@ -0,0 +1 @@
import{ay as a,aA as t,k as e,aD as s,aR as i}from"../../../../vendor-element-plus.js?ver=3.1.8";import{a6 as n,W as d,X as r,Z as l,ab as o,a5 as c,aa as f,a9 as _}from"../../../../vendor.js?ver=3.1.8";import{_ as u}from"../../../../fc-bits-ui.js?ver=3.1.8";const p={class:"fluentcrm_databox"},m={class:"fluentcrm_contact_header"},v={class:"fc_uploader_drawer"};const g=u({name:"ProfileFiles",props:["subscriber_id"],data:()=>({adding_file:!1,files:[],loading:!1,pagination:{total:0,per_page:10,current_page:1},new_note:{title:"",description:"",type:"note"}}),methods:{fetchAttachments(){}},mounted(){this.fetchAttachments()}},[["render",function(u,g,h,b,A,y){const j=t,w=e,x=s,k=i,C=a;return n((d(),r("div",p,[l("div",m,[o(x,{gutter:30},{default:c(()=>[o(j,{span:12},{default:c(()=>[l("h3",null,f(u.$t("Pro_Contact_F_A")),1)],void 0,!0),_:1}),o(j,{class:"text-align-right",span:12},{default:c(()=>[o(w,{onClick:g[0]||(g[0]=a=>A.adding_file=!A.adding_file),type:"primary",size:"small"},{default:c(()=>[_(f(u.$t("Add New")),1)],void 0,!0),_:1})],void 0,!0),_:1})],void 0),_:1})]),l("div",v,[o(k)]),g[1]||(g[1]=l("div",null,null,-1))])),[[C,A.loading]])}]]);export{g as default};
@@ -0,0 +1 @@
import{aB as i,aT as e,aH as s,aI as t,k as a,ay as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{W as n,Y as r,a5 as l,X as d,a8 as m,ab as c,Z as u,aa as p,bC as _,aQ as b,a6 as h,J as f,az as g,a9 as v}from"../../../../vendor.js?ver=3.1.8";import{P as w}from"../../../../PaginationBar.js?ver=3.1.8";import{D as y}from"../../../../DataTable.js?ver=3.1.8";import{_ as k}from"../../../../fc-bits-ui.js?ver=3.1.8";const C={key:0,class:"el-drawer__title"},D={key:0},V={key:1},F={key:2},$=["innerHTML"],T=["innerHTML"];const H={class:"fcrm_table_header_inner_left_title"},L=["innerHTML"];const M={key:0,class:"fcrm_profile_form_submissions_wrapper"},z={key:1},j={class:"text-align-center"};const B=k({name:"ProfileFormSubmissions",props:["subscriber_id"],components:{FormSubmissionBlock:k({name:"FormSubmissionsBlock",props:["provider","subscriber_id"],components:{DynamicWidgetContent:k({name:"DynamicWidgetContent",emits:["closed"],props:["provider","subscriber_id","params"],data:()=>({loading:!1,dataView:null,direction:"rtl",show:!0}),methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/dynamic-item-view`,{provider:this.provider.provider_key,params:this.params}).then(i=>{this.dataView=i.data_view}).catch(i=>{this.handleError(i),console.log(i)}).finally(()=>{this.loading=!1})}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.fetch()}},[["render",function(s,t,a,o,_,b){const h=i,f=e;return n(),r(f,{"close-on-click-modal":!0,"append-to-body":!0,size:s.drawerWidth,modelValue:_.show,"onUpdate:modelValue":t[0]||(t[0]=i=>_.show=i),onClosed:t[1]||(t[1]=i=>s.$emit("closed")),direction:_.direction},{header:l(({close:i})=>[_.dataView?(n(),d("div",C,p(_.dataView.title),1)):m("",!0)]),default:l(()=>[_.loading?(n(),d("div",D,[c(h,{rows:5,animated:""})])):_.dataView?(n(),d("div",F,[_.dataView.content_html?(n(),d("div",{key:0,innerHTML:s.$sanitize(_.dataView.content_html)},null,8,$)):m("",!0)])):(n(),d("div",V,[u("p",null,p(s.$t("No data found")),1)]))]),footer:l(()=>[_.dataView&&_.dataView.footer_content?(n(),d("div",{key:0,innerHTML:s.$sanitize(_.dataView.footer_content)},null,8,T)):m("",!0)]),_:1},8,["size","modelValue","direction"])}]]),PaginationBar:w,DataTable:y},data:()=>({loading:!1,submissions:[],pagination:{per_page:10,current_page:1,total:0},columnsConfig:{},viewingDetails:null}),computed:{table_columns(){if(!_(this.columnsConfig))return this.columnsConfig;let i=[];return this.submissions.length&&(i=this.submissions[0]),i}},methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/form-submissions`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page}).then(i=>{i.submissions.columns_config&&(this.columnsConfig=i.submissions.columns_config),this.submissions=i.submissions.data,this.pagination.total=parseInt(i.submissions.total)}).catch(i=>{console.log(i)}).finally(()=>{this.loading=!1})},showDetails(i){this.viewingDetails={__id:i}}},mounted(){this.fetch()}},[["render",function(i,e,_,w,y,k){const C=a,D=t,V=s,F=b("DynamicWidgetContent"),$=b("pagination-bar"),T=b("data-table"),M=o;return n(),r(T,{wrapper_border:!0,"has-selection":!1},{"header-left":l(()=>[u("h3",H,p(_.provider.title),1)]),table:l(()=>[h((n(),r(V,{"empty-text":i.$t("No Data Found"),border:"",stripe:"",data:y.submissions},{empty:l(()=>[u("p",null,[v(p(i.$t("Form Submissions from"))+" ",1),u("b",null,p(_.provider.name),1),v(" "+p(i.$t("no_form_submissions_found_for_this_subscriber")),1)])]),default:l(()=>[(n(!0),d(f,null,g(k.table_columns,(e,s)=>(n(),r(D,{key:s,width:y.columnsConfig[s]?y.columnsConfig[s].width:"",label:y.columnsConfig[s]&&y.columnsConfig[s].label?y.columnsConfig[s].label:i.ucFirst(s)},{default:l(i=>[y.columnsConfig[s]&&y.columnsConfig[s].quick_action?(n(),r(C,{key:0,size:"small",onClick:e=>k.showDetails(i.row.__id),innerHTML:i.row[s]},null,8,["onClick","innerHTML"])):(n(),d("div",{key:1,innerHTML:i.row[s]},null,8,L))]),_:2},1032,["width","label"]))),128))],void 0,!0),_:1},8,["empty-text","data"])),[[M,y.loading]]),y.viewingDetails?(n(),r(F,{key:0,params:y.viewingDetails,provider:_.provider,subscriber_id:_.subscriber_id,onClosed:e[0]||(e[0]=i=>y.viewingDetails=null)},null,8,["params","provider","subscriber_id"])):m("",!0)]),pagination:l(()=>[c($,{pagination:y.pagination,onFetch:k.fetch},null,8,["pagination","onFetch"])]),_:1})}]])},data:()=>({providersData:{},app_ready:!1}),computed:{is_empty_item(){return this.isEmptyValue(this.providersData)}},mounted(){this.each(window.fcAdmin.form_submission_providers,(i,e)=>{const s={title:i.title,name:i.name,provider_key:e};this.providersData[e]=s}),this.app_ready=!0}},[["render",function(i,e,s,t,a,o){const l=b("form-submission-block");return a.app_ready?(n(),d("div",M,[o.is_empty_item?(n(),d("div",z,[u("h3",j,p(i.$t("Pro_Form_SfFFwbshCFF")),1)])):(n(!0),d(f,{key:0},g(a.providersData,(i,e)=>(n(),r(l,{key:e,provider:i,subscriber_id:s.subscriber_id},null,8,["provider","subscriLine truncated
@@ -0,0 +1 @@
import{a3 as e,a6 as t,a4 as s,D as i,ay as o,k as n,e as a,az as l,aT as r}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as d,a6 as c,W as h,X as _,Z as p,aa as u,a0 as m,ab as f,a5 as g,b2 as v,Y as b,a8 as y,a9 as k,J as w,az as N,ax as x,ac as C}from"../../../../vendor.js?ver=3.1.8";import{P as $}from"../../../../PaginationBar.js?ver=3.1.8";import{C as S}from"../../../../Confirm.js?ver=3.1.8";import{F as V}from"../../../../_FormBuilder2.js?ver=3.1.8";import{_ as M,I as L}from"../../../../fc-bits-ui.js?ver=3.1.8";import{c as j}from"../../../../clipboard.js?ver=3.1.8";import{F as B}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const H={class:"fcrm_notes_wrapper_inner fcrm_object_notes_template"},D={class:"fcrm_notes_header"},A={class:"fcrm_notes_header_title"},T={class:"fcrm_notes_header_actions"},z={class:"icon"},I={class:"icon"},Z={class:"icon"},E={class:"fcrm_notes_body"},U={class:"fcrm_notes_list"},F=["data-note-id"],P=["onClick"],Y={class:"fcrm_note_header_left"},q={class:"fcrm_note_avatar"},O=["src","alt"],K={key:1,class:"fcrm_note_avatar_initials"},Q={class:"fcrm_note_info"},W={class:"fcrm_note_title"},G={class:"fcrm_note_meta"},J={key:0},X={key:1},R=["title"],ee={class:"fcrm_note_header_right"},te=["innerHTML"],se={key:1,class:"fcrm_empty_state"},ie={class:"fcrm_empty_state_text"},oe={class:"fc_company_save_wrap"},ne={class:"fcrm_bulk_action_bar"},ae={class:"fcrm_bulk_action_left"},le={class:"icon"},re={class:"fc_bulk_selection_count"},de={key:0,class:"fcrm_bulk_divider"},ce={class:"icon"};const he={class:"fc_notes_wrapper fcrm_notes_wrapper"};const _e=M({name:"ProfileNotes",props:["subscriber_id"],components:{ObjectNotesTemplate:M({name:"ObjectNoteTemplate",props:["subscriber_id","route_prefix","section_title","target_note_id"],emits:["added","deleted","updated"],components:{PaginationBar:$,Confirm:S,FormBuilder:V,Search:i,Download:s,Delete:t,Edit:e,FloatingBulkActionShell:B,Icons:L},data:()=>({direction:"rtl",loading:!1,notes:[],types:window.fcAdmin.activity_types,pagination:{total:0,per_page:10,current_page:1},editing_note:{title:"",description:"",type:"note",created_at:""},is_editing_note:!1,search:"",updating:!1,is_changed:!1,note_syncing_fields:{},showSearchBar:!1,expandedNotes:{},targetedNoteId:null,bulkMode:!1,selectedNotes:[]}),watch:{"editing_note.type"(e,t){this.handleValueUpdate(e,t)},"editing_note.title"(e,t){this.handleValueUpdate(e,t)},"editing_note.description"(e,t){this.handleValueUpdate(e,t)},"editing_note.created_at"(e,t){this.handleValueUpdate(e,t)}},computed:{isSubscriberNotesContext(){return"subscribers"===this.route_prefix},allSelected(){return this.notes.length>0&&this.selectedNotes.length===this.notes.length},someSelected(){return this.selectedNotes.length>0&&this.selectedNotes.length<this.notes.length}},methods:{toggleNote(e){this.expandedNotes={...this.expandedNotes,[e]:!this.expandedNotes[e]}},toggleAllNotes(){const e=this.notes.every(e=>this.expandedNotes[e.id]),t={};this.notes.forEach(s=>{t[s.id]=!e}),this.expandedNotes=t},toggleBulkMode(){this.bulkMode=!this.bulkMode,this.bulkMode||(this.selectedNotes=[])},toggleNoteSelection(e){if(!this.isSubscriberNotesContext||!this.bulkMode)return;const t=this.selectedNotes.indexOf(e);-1===t?this.selectedNotes.push(e):this.selectedNotes.splice(t,1)},toggleAllSelection(){this.isSubscriberNotesContext&&this.bulkMode&&(this.allSelected?this.selectedNotes=[]:this.selectedNotes=this.notes.map(e=>e.id))},getInitials:e=>e&&e.display_name?e.display_name.split(" ").map(e=>e[0]).join("").toUpperCase().substring(0,2):"A",handleValueUpdate(e,t){e!==t&&(this.is_changed=!0)},handleClose(e){this.is_changed?this.$confirm(this.$t("You have unsaved data, proceed?")).then(t=>{this.is_changed=!1,this.is_editing_note=!1,this.resetNoteData(),e()}).catch(e=>{console.log(e)}):e()},fetch(){this.loading=!0;const e={per_page:this.pagination.per_page,page:this.pagination.current_page,search:this.search};this.target_note_id&&1===this.pagination.current_page&&!this.search&&(e.include_id=this.target_note_id),this.$get(`${this.route_prefix}/${this.subscriber_id}/notes`,e).then(e=>{if(this.notes=e.notes.data,this.selectedNotes=[],this.pagination.total=e.notes.total,this.note_syncing_fields=e.fields,this.resetNoteData(),this.is_editing_note=!1,e.included_note&&this.notes.unshift(e.included_note),this.target_note_id){const e=parseInt(this.target_note_id);this.notes.some(t=>t.id===e)&&(this.expandedNotes={...this.expandedNotes,[e]:!0},this.targetedNoteId=e,this.$nextTick(()=>{const t=this.$el.querySelector('[data-note-id="'+e+'"]');t&&t.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{this.targetedNoteId=null},3e3)}))}}).catch(e=>{thLine truncated
@@ -0,0 +1 @@
import{aA as t,aB as r,aH as e,aI as a,ay as s,k as o,aD as i}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as l,X as d,ab as c,a5 as h,Z as _,Y as p,a6 as u,J as m,az as y,a9 as b,aa as f,a8 as g}from"../../../../vendor.js?ver=3.1.8";import{P as v}from"../../../../PaginationBar.js?ver=3.1.8";import{D as k}from"../../../../DataTable.js?ver=3.1.8";import{_ as S}from"../../../../fc-bits-ui.js?ver=3.1.8";const C={class:"purchase_history_block fcrm_mb_24"},P={class:"fcrm_table_header_inner_left_title"},w={class:"fcrm_purchase_history_table_header_actions"},H={class:"fcrm_purchase_history_table_body"},D=["innerHTML"],T=["innerHTML"],q=["innerHTML"];const $={key:0,class:"fluentcrm_purchase_history_wrapper"},B={key:1},L={class:"text-align-center"};const M=S({name:"ProfilePurchaseHistory",props:["subscriber_id"],components:{PurchaseHistoryBlock:S({name:"PurchaseHistoryBlock",props:["provider","subscriber_id"],components:{PaginationBar:v,DataTable:k},data:()=>({loading:!1,orders:[],pagination:{per_page:10,current_page:1,total:0},sidebar_html:"",after_html:"",has_recount:!1,columnsConfig:{},query_data:{sort_by:"",sort_type:""},sortState:{currentProp:"",direction:""}}),computed:{table_columns(){let t=[];return this.orders&&this.orders.length&&(t=this.orders[0]),t}},methods:{handleSortable(t){t.prop?(this.query_data.sort_by=t.prop,this.sortState.currentProp!==t.prop?(this.sortState.currentProp=t.prop,this.sortState.direction="ASC"):this.sortState.direction="ASC"===this.sortState.direction?"DESC":"ASC",this.query_data.sort_type=this.sortState.direction,this.fetch()):(this.query_data.sort_by="",this.query_data.sort_type="",this.sortState.currentProp="",this.sortState.direction="")},fetch(t=!1){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/purchase-history`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page,sort_by:this.query_data.sort_by,sort_type:this.query_data.sort_type,will_recount:t}).then(t=>{this.orders=t.orders.data,this.pagination.total=parseInt(t.orders.total),t.orders.sidebar_html&&(this.sidebar_html=t.orders.sidebar_html),t.orders.after_html&&(this.after_html=t.orders.after_html),this.has_recount=t.orders.has_recount,t.orders.columns_config&&(this.columnsConfig=t.orders.columns_config)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetch()}},[["render",function(v,k,S,$,B,L){const M=o,j=r,A=a,x=e,E=n("pagination-bar"),F=n("data-table"),z=t,I=i,J=s;return l(),d("div",C,[c(I,{gutter:24},{default:h(()=>[c(z,{md:B.sidebar_html?16:24,sm:24},{default:h(()=>[c(F,{class:"fcrm_purchase_history_table_wrapper",wrapper_border:!0,"has-selection":!1},{"header-left":h(()=>[_("h3",P,f(S.provider.title),1)]),"header-actions":h(()=>[_("div",w,[B.has_recount?(l(),p(M,{key:0,class:"fcrm_purchase_history_resync_btn",onClick:k[0]||(k[0]=t=>L.fetch("yes")),type:"default",size:"small"},{default:h(()=>[b(f(v.$t("Re-Sync")),1)],void 0,!0),_:1})):g("",!0)])]),table:h(()=>[_("div",H,[B.loading?(l(),p(j,{key:0,animated:"",rows:10})):u((l(),p(x,{key:1,"empty-text":v.$t("No Data Found"),border:"",stripe:"",data:B.orders,onSortChange:L.handleSortable},{empty:h(()=>[_("p",null,[b(f(v.$t("Purchase History from"))+" ",1),_("b",null,f(S.provider.name),1),b(" "+f(v.$t("PurchaseHistoryBlock.empty_desc")),1)])]),default:h(()=>[(l(!0),d(m,null,y(L.table_columns,(t,r)=>{var e,a;return l(),p(A,{key:r,width:B.columnsConfig[r]?B.columnsConfig[r].width:"",label:B.columnsConfig[r]&&B.columnsConfig[r].label?B.columnsConfig[r].label:"",prop:(null==(e=B.columnsConfig[r])?void 0:e.sortable)?B.columnsConfig[r].key:"",sortable:!!(null==(a=B.columnsConfig[r])?void 0:a.sortable)},{default:h(t=>[_("div",{innerHTML:t.row[r]},null,8,D)]),_:2},1032,["width","label","prop","sortable"])}),128))],void 0,!0),_:1},8,["empty-text","data","onSortChange"])),[[J,B.loading]]),B.after_html?(l(),d("div",{key:2,class:"fc_history_before",innerHTML:B.after_html},null,8,T)):g("",!0)])]),pagination:h(()=>[c(E,{pagination:B.pagination,onFetch:L.fetch},null,8,["pagination","onFetch"])]),_:1})],void 0,!0),_:1},8,["md"]),B.sidebar_html?(l(),p(z,{key:0,md:8,sm:24},{default:h(()=>[_("div",{class:"fc_history_sidebar",innerHTML:B.sidebar_html},null,8,q)],void 0,!0),_:1})):g("",!0)],void 0),_:1})])}]])},data:()=>({providersData:{},app_ready:!1}),computed:{is_empty_item(){return this.isEmptyValue(this.providersData)}},mounted(){this.each(window.fcAdmin.purchase_providers,(t,r)=>{const e={title:t.title,name:t.name,provider_key:r};this.providersData[r]=e}),this.app_ready=!0}},[["render",function(t,r,e,a,s,o){const i=n("purchase-history-block");return s.app_ready?(l(),d("div",$,[o.is_empty_item?(l(),d("div",B,[_("h3",L,f(t.$t("Pro_Purchase_hfEwbsh")),1)])):(l(!0),d(m,{key:0},y(s.providersData,(t,r)=>(l(),p(i,{key:r,provider:t,subscriber_id:e.subscriber_id},null,8,["provider","subscriber_id"]))),128))])):g("",!0)}]]);export{M as default};
@@ -0,0 +1 @@
import{aH as t,aI as e,ay as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as i,W as s,X as r,ab as o,a5 as n,a6 as c,Y as p,J as l,az as d,Z as u,a9 as _,aa as m,a8 as h}from"../../../../vendor.js?ver=3.1.8";import{P as b}from"../../../../PaginationBar.js?ver=3.1.8";import{D as f}from"../../../../DataTable.js?ver=3.1.8";import{_ as g}from"../../../../fc-bits-ui.js?ver=3.1.8";const k={class:"purchase_history_block"},v={class:"fcrm_table_header_inner_left_title"},y=["innerHTML"];const T={key:0};const w=g({name:"ProfileSuportTickets",props:["subscriber_id"],components:{SupportTicketsBlock:g({name:"SupportTicketsBlock",props:["provider","subscriber_id"],components:{DataTable:f,PaginationBar:b},data:()=>({loading:!1,tickets:[],pagination:{per_page:10,current_page:1,total:0},columnsConfig:{}}),computed:{table_columns(){let t=[];return this.tickets&&this.tickets.length&&(t=this.tickets[0]),t}},methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/support-tickets`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page}).then(t=>{this.tickets=t.tickets.data,this.pagination.total=parseInt(t.tickets.total),t.tickets.columns_config&&(this.columnsConfig=t.tickets.columns_config)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetch()}},[["render",function(h,b,f,g,T,w){const C=e,D=t,j=i("pagination-bar"),$=i("data-table"),B=a;return s(),r("div",k,[o($,{class:"fcrm_support_ticket_block",wrapper_border:!0,"has-selection":!1},{"header-left":n(()=>[u("h3",v,m(f.provider.title),1)]),table:n(()=>[c((s(),p(D,{"empty-text":h.$t("No Data Found"),border:"",stripe:"",data:T.tickets},{empty:n(()=>[u("p",null,[_(m(h.$t("Support Tickets from"))+" ",1),u("b",null,m(f.provider.name),1),_(" "+m(h.$t("no_tickets_found_for_this_subscriber")),1)])]),default:n(()=>[(s(!0),r(l,null,d(w.table_columns,(t,e)=>(s(),p(C,{key:e,width:T.columnsConfig[e]?T.columnsConfig[e].width:"",label:T.columnsConfig[e]&&T.columnsConfig[e].label?T.columnsConfig[e].label:h.ucFirst(e)},{default:n(t=>[u("div",{innerHTML:t.row[e]},null,8,y)]),_:2},1032,["width","label"]))),128))],void 0,!0),_:1},8,["empty-text","data"])),[[B,T.loading]])]),pagination:n(()=>[o(j,{pagination:T.pagination,onFetch:w.fetch},null,8,["pagination","onFetch"])]),_:1})])}]])},data:()=>({providersData:{},app_ready:!1}),computed:{},mounted(){this.each(window.fcAdmin.support_tickets_providers,(t,e)=>{const a={title:t.title,name:t.name,provider_key:e};this.providersData[e]=a}),this.app_ready=!0}},[["render",function(t,e,a,o,n,c){const u=i("support-tickets-block");return n.app_ready?(s(),r("div",T,[(s(!0),r(l,null,d(n.providersData,(t,e)=>(s(),p(u,{key:e,provider:t,subscriber_id:a.subscriber_id},null,8,["provider","subscriber_id"]))),128))])):h("",!0)}]]);export{w as default};
@@ -0,0 +1 @@
import{k as e,aT as t,aD as i,aA as r,aB as s}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as a,W as o,X as n,Z as d,aa as l,ab as c,a5 as h,a9 as _,a8 as m,a0 as f,Y as u}from"../../../../vendor.js?ver=3.1.8";import{F as p}from"../../../../_FormBuilder2.js?ver=3.1.8";import{_ as v}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const g={key:0,class:"fcrm_external_profile_wrapper"},b={class:"fcrm_external_profile_header"},w={class:"fcrm_external_profile_header--title"},y={key:0,class:"fcrm_external_profile_header--actions"},x=["innerHTML"],j={key:0},F={key:0,style:{padding:"10px 15px"}},k={class:"fc_drawer_footer"};const D=v({name:"SubscriberProfileExternalView",props:["subscriber","subscriber_id"],components:{FormBuilder:p},data(){return{direction:"rtl",profile_section:this.$route.query.handler,heading:"",content_html:"",loading:!0,crud:null,showForm:!1,crudConfig:{},saving:!1}},methods:{fetchData(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/external_view`,{section_provider:this.profile_section}).then(e=>{this.heading=e.heading,this.content_html=e.content_html,e.crud&&(this.crud=e.crud)}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},initCrudForm(){if(!this.crud.fields)return;const e={};this.each(this.crud.fields,(t,i)=>{e[i]=t.default_value||""}),this.crudConfig.model=e,this.showForm=!0},saveData(){this.saving=!0,this.$post(`subscribers/${this.subscriber_id}/external_view`,{section_provider:this.profile_section,data:this.crudConfig.model}).then(e=>{this.$notify.success(e.message||"Saved successfully"),this.showForm=!1,e.content_html?(this.content_html=e.content_html,e.heading&&(this.heading=e.heading)):this.fetchData()}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.fetchData()}},[["render",function(p,v,D,C,S,$){const V=e,z=a("form-builder"),A=t,E=s,B=r,T=i;return S.loading?(o(),u(E,{key:1,style:{"margin-top":"20px"},class:"fc_skeleton_loader",animated:""},{template:h(()=>[c(T,{gutter:30},{default:h(()=>[c(B,{span:12},{default:h(()=>[c(E,{rows:10})],void 0,!0),_:1}),c(B,{span:12},{default:h(()=>[c(E,{rows:3})],void 0,!0),_:1})],void 0,!0),_:1})]),_:1})):(o(),n("div",g,[d("div",b,[d("h3",w,l(S.heading),1),S.crud&&S.crud.btn_label?(o(),n("div",y,[c(V,{onClick:v[0]||(v[0]=e=>$.initCrudForm()),size:"small"},{default:h(()=>[_(l(S.crud.btn_label),1)],void 0),_:1})])):m("",!0)]),d("div",{class:f(["fcrm_external_profile_data","fcrm_section_"+S.profile_section]),innerHTML:S.content_html},null,10,x),S.crud&&S.crud.btn_label?(o(),n("div",j,[c(A,{direction:S.direction,class:"fc_company_info_drawer","with-header":!0,size:p.globalDrawerSize,title:S.crud.form_heading,"append-to-body":!0,modelValue:S.showForm,"onUpdate:modelValue":v[2]||(v[2]=e=>S.showForm=e)},{default:h(()=>[S.showForm?(o(),n("div",F,[c(z,{formData:S.crudConfig.model,fields:S.crud.fields},null,8,["formData","fields"]),d("div",k,[c(V,{type:"primary",onClick:v[1]||(v[1]=e=>$.saveData())},{default:h(()=>[_(l(S.crud.save_btn_text||"Save"),1)],void 0,!0),_:1})])])):m("",!0)],void 0),_:1},8,["direction","size","title","modelValue"])])):m("",!0)]))}]]);export{D as default};
@@ -0,0 +1 @@
import{aQ as e,aS as s,k as t,aB as i,T as a,aH as r,aI as o,aO as n,as as c,aK as l,aL as d,E as u,P as m,at as h,ay as p,h as _,i as b,j as f,D as g,e as y,az as v,aG as w,aT as C,aE as $,b9 as k,b5 as S,aq as x,ar as V,aN as L,ap as P,Q as A,aZ as M,a_ as H,aD as I,aA as T,aC as Z}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as U,W as D,X as E,Z as z,aa as F,J as N,az as R,Y as B,a5 as q,ab as O,a8 as j,a9 as W,a0 as G,$ as K,_ as Q,a6 as Y,ax as J,b2 as X,bV as ee,ad as se,a7 as te,ac as ie,av as ae}from"../../../vendor.js?ver=3.1.8";import{T as re,E as oe,C as ne,u as ce}from"../../../Tagger.js?ver=3.1.8";import{_ as le,I as de}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as ue}from"../../../PhotoWidget.js?ver=3.1.8";import{P as me}from"../../../PaginationBar.js?ver=3.1.8";import{C as he}from"../../../Confirm.js?ver=3.1.8";import{j as pe}from"../../../data_config.js?ver=3.1.8";import{P as _e}from"../../../PromoCard.js?ver=3.1.8";import{B as be}from"../../../Badge.js?ver=3.1.8";import"../../../CompanyEditForm.js?ver=3.1.8";import"../../../fc-bits.js?ver=3.1.8";import"../../../Filterer.js?ver=3.1.8";const fe={class:"header"},ge={class:"items"},ye={class:"items_actions"},ve={class:"items_inner"},we={key:0,class:"icon"},Ce={key:1,class:"icon"},$e={class:"fc_tagger_footer fcrm_mt_10"};const ke={class:"fcrm_profile_tagger fc_profile_tagger"},Se={key:0,class:"fcrm_profile_tagger_row"},xe={key:1,class:"fcrm_profile_tagger_row"};const Ve=le({name:"ProfileListTags",props:["subscriber"],components:{Tagger:le({name:"Tagger",components:{Editor:oe,Icons:de},data:()=>({new_payload:!1,showItem:!0}),props:["type","taggables","options","matched","creatable"],emits:["addedNew"],mixins:[re],computed:{none(){return"tags"==this.type?this.$t("No tags found"):"lists"==this.type?this.$t("No lists found"):"No "+this.type+" found"}},methods:{handleClose(e){this.$confirm(this.$t("Are you sure you want to remove this?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.remove(e)}).catch(()=>{})},remove(e){this.subscribe({attach:[],detach:[e]})},updatePayLoad(e){this.new_payload=e},pushPayload(){this.new_payload?(this.subscribe(this.new_payload),setTimeout(()=>{this.showItem=!1,this.$nextTick(()=>{this.showItem=!0})},500)):this.$notify.error(this.$t("No changes found"))},getDescription(e){return e.pivot?this.$t("Added @ ")+e.pivot.created_at:""}}},[["render",function(i,a,r,o,n,c){const l=U("icons"),d=e,u=s,m=t,h=U("editor");return r.taggables&&n.showItem?(D(),E("div",{key:0,class:G("fcrm_profile_tagger_"+r.type)},[z("div",fe,[z("h2",null,F(i.$t(r.type)),1)]),z("div",ge,[z("div",ye,[z("div",ve,[(D(!0),E(N,null,R(r.taggables,e=>(D(),B(d,{key:e.title,class:"el-tag--white",title:c.getDescription(e),closable:"",onClose:s=>c.handleClose(e.slug)},{default:q(()=>["tags"===r.type?(D(),E("span",we,[O(l,{iconName:"TagIcon"})])):j("",!0),"lists"===r.type?(D(),E("span",Ce,[O(l,{iconName:"ListIcon"})])):j("",!0),W(" "+F(e.title),1)],void 0),_:2},1032,["title","onClose"]))),128)),r.taggables.length?j("",!0):(D(),B(u,{key:0,title:c.none,type:"info",closable:!1},null,8,["title"])),O(h,{type:r.type,options:i.choices,noMatch:i.noMatch,matched:r.matched,selectionCount:1,placement:"bottom-start",onSearch:i.search,onAddedNew:a[1]||(a[1]=e=>{i.$emit("addedNew",e)}),creatable:r.creatable,onSubscribe:c.updatePayLoad},{footer:q(()=>[z("div",$e,[O(m,{onClick:a[0]||(a[0]=e=>c.pushPayload()),style:{width:"100%"},type:"primary",size:"small"},{default:q(()=>[W(F(i.$t("Confirm")),1)],void 0,!0),_:1})])]),_:1},8,["type","options","noMatch","matched","onSearch","creatable","onSubscribe"])])])])],2)):j("",!0)}],["__scopeId","data-v-81e7743d"]])},data:()=>({options:{tags:[],lists:[]},matches:{tags:{},lists:{}},subscribing:!1}),methods:{setup(e){this.matches.tags=[],this.matches.lists=[],this.subscriber.tags=e.tags,this.subscriber.lists=e.lists,e.tags.forEach(e=>this.match(e,this.matches.tags)),e.lists.forEach(e=>this.match(e,this.matches.lists))},getOptions(){this.options={tags:this.appVars.available_tags,lists:this.appVars.available_lists}},subscribe({type:e,payload:s}){const{attach:t,detach:i}=s,a={type:e,attach:t,detach:i,subscribers:[this.subscriber.id]};this.subscribing=!0,this.$post("subscribers/sync-segments",a).then(e=>{const s=e.subscribers[0];this.setup(s),this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19})}).catch(e=>{this.handleError(e)}).finally(()=>{this.subscribing=!1})},search(e,s){this.options[e]=s},match(e,s){s[e.slug]=1}},mounted(){this.getOptions(),this.setup(this.subscriber)}},[["render",function(e,s,t,a,r,o){const n=i,c=U("tagger");return D(),E("div",ke,[r.subscribing?(D(),E("div",Se,[O(n,{rows:3})])):(D(),E("div",xe,[O(c,{type:"lists",onSearch:o.search,onSubscribe:o.subscribe,class:"info-item",creatable:!0,options:r.options.lists,onAddedNew:s[0]||(s[0]=e=>{r.options.lists.push(e)}),matched:r.matches.lists,taggables:t.subscriber.lists},nLine truncated
@@ -0,0 +1 @@
const e="FeatureCollection",o=[{type:"Feature",id:"AFG",properties:{name:"Afghanistan",iso_a2:"AF"},geometry:{type:"Polygon",coordinates:[[[61.210817,35.650072],[62.230651,35.270664],[62.984662,35.404041],[63.193538,35.857166],[63.982896,36.007957],[64.546479,36.312073],[64.746105,37.111818],[65.588948,37.305217],[65.745631,37.661164],[66.217385,37.39379],[66.518607,37.362784],[67.075782,37.356144],[67.83,37.144994],[68.135562,37.023115],[68.859446,37.344336],[69.196273,37.151144],[69.518785,37.608997],[70.116578,37.588223],[70.270574,37.735165],[70.376304,38.138396],[70.806821,38.486282],[71.348131,38.258905],[71.239404,37.953265],[71.541918,37.905774],[71.448693,37.065645],[71.844638,36.738171],[72.193041,36.948288],[72.63689,37.047558],[73.260056,37.495257],[73.948696,37.421566],[74.980002,37.41999],[75.158028,37.133031],[74.575893,37.020841],[74.067552,36.836176],[72.920025,36.720007],[71.846292,36.509942],[71.262348,36.074388],[71.498768,35.650563],[71.613076,35.153203],[71.115019,34.733126],[71.156773,34.348911],[70.881803,33.988856],[69.930543,34.02012],[70.323594,33.358533],[69.687147,33.105499],[69.262522,32.501944],[69.317764,31.901412],[68.926677,31.620189],[68.556932,31.71331],[67.792689,31.58293],[67.683394,31.303154],[66.938891,31.304911],[66.381458,30.738899],[66.346473,29.887943],[65.046862,29.472181],[64.350419,29.560031],[64.148002,29.340819],[63.550261,29.468331],[62.549857,29.318572],[60.874248,29.829239],[61.781222,30.73585],[61.699314,31.379506],[60.941945,31.548075],[60.863655,32.18292],[60.536078,32.981269],[60.9637,33.528832],[60.52843,33.676446],[60.803193,34.404102],[61.210817,35.650072]]]}},{type:"Feature",id:"AGO",properties:{name:"Angola",iso_a2:"AO"},geometry:{type:"MultiPolygon",coordinates:[[[[16.326528,-5.87747],[16.57318,-6.622645],[16.860191,-7.222298],[17.089996,-7.545689],[17.47297,-8.068551],[18.134222,-7.987678],[18.464176,-7.847014],[19.016752,-7.988246],[19.166613,-7.738184],[19.417502,-7.155429],[20.037723,-7.116361],[20.091622,-6.94309],[20.601823,-6.939318],[20.514748,-7.299606],[21.728111,-7.290872],[21.746456,-7.920085],[21.949131,-8.305901],[21.801801,-8.908707],[21.875182,-9.523708],[22.208753,-9.894796],[22.155268,-11.084801],[22.402798,-10.993075],[22.837345,-11.017622],[23.456791,-10.867863],[23.912215,-10.926826],[24.017894,-11.237298],[23.904154,-11.722282],[24.079905,-12.191297],[23.930922,-12.565848],[24.016137,-12.911046],[21.933886,-12.898437],[21.887843,-16.08031],[22.562478,-16.898451],[23.215048,-17.523116],[21.377176,-17.930636],[18.956187,-17.789095],[18.263309,-17.309951],[14.209707,-17.353101],[14.058501,-17.423381],[13.462362,-16.971212],[12.814081,-16.941343],[12.215461,-17.111668],[11.734199,-17.301889],[11.640096,-16.673142],[11.778537,-15.793816],[12.123581,-14.878316],[12.175619,-14.449144],[12.500095,-13.5477],[12.738479,-13.137906],[13.312914,-12.48363],[13.633721,-12.038645],[13.738728,-11.297863],[13.686379,-10.731076],[13.387328,-10.373578],[13.120988,-9.766897],[12.87537,-9.166934],[12.929061,-8.959091],[13.236433,-8.562629],[12.93304,-7.596539],[12.728298,-6.927122],[12.227347,-6.294448],[12.322432,-6.100092],[12.735171,-5.965682],[13.024869,-5.984389],[13.375597,-5.864241],[16.326528,-5.87747]]],[[[12.436688,-5.684304],[12.182337,-5.789931],[11.914963,-5.037987],[12.318608,-4.60623],[12.62076,-4.438023],[12.995517,-4.781103],[12.631612,-4.991271],[12.468004,-5.248362],[12.436688,-5.684304]]]]}},{type:"Feature",id:"ALB",properties:{name:"Albania",iso_a2:"AL"},geometry:{type:"Polygon",coordinates:[[[20.590247,41.855404],[20.463175,41.515089],[20.605182,41.086226],[21.02004,40.842727],[20.99999,40.580004],[20.674997,40.435],[20.615,40.110007],[20.150016,39.624998],[19.98,39.694993],[19.960002,39.915006],[19.406082,40.250773],[19.319059,40.72723],[19.40355,41.409566],[19.540027,41.719986],[19.371769,41.877548],[19.304486,42.195745],[19.738051,42.688247],[19.801613,42.500093],[20.0707,42.58863],[20.283755,42.32026],[20.52295,42.21787],[20.590247,41.855404]]]}},{type:"Feature",id:"ARE",properties:{name:"United Arab Emirates",iso_a2:"AE"},geometry:{type:"Polygon",coordinates:[[[51.579519,24.245497],[51.757441,24.294073],[51.794389,24.019826],[52.577081,24.177439],[53.404007,24.151317],[54.008001,24.121758],[54.693024,24.797892],[55.439025,25.439145],[56.070821,26.055464],[56.261042,25.714606],[56.396847,24.924732],[55.886233,24.920831],[55.804119,24.269604],[55.981214,24.130543],[55.528632,23.933604],[55.525841,23.524869],[55.234489,23.110993],[55.208341,22.70833],[55.006803,22.496948],[52.000733,23.001154],[51.617708,24.014219],[51.579519,24.245497]]]}},{type:"Feature",id:"ARG",properties:{name:"Argentina",iso_a2:"AR"},geometry:{type:"MultiPolygon",coordinates:[[[[-65.5,-55.2],[-66.45,-55.25],[-66.95992,-54.89681],[-67.56244,-54.87001],[-68.63335,-54.8695],[-68.63401,-52.63637],[-68.25,-53.1],[-67.75,-53.85],[-66.45,-54.45],[-65.05,-54.7],[-65.5,-55.2]]],[[[-64.964892,-22.075862],[-64.377021,-22.798091],[-63.986838,-21.993644],[-62.84Line truncated
@@ -0,0 +1 @@
import{k as t,e,aY as a,aL as r,aK as s,ay as n,aJ as o,az as i,aB as l,W as c,E as d,aO as p,ba as u,a6 as h,o as m,n as _,aI as g,j as f,h as v,i as b,aH as y,g as C}from"../../../vendor-element-plus.js?ver=3.1.8";import{q as w,k,v as $,W as x,X as S,Z as T,$ as M,a8 as D,c4 as R,r as O,d as L,aQ as A,Y as I,ab as V,aa as E,a9 as P,a0 as N,a5 as Y,J as j,az as G,c8 as F,av as z,a6 as B,b2 as U,ax as q,bB as H,_ as W}from"../../../vendor.js?ver=3.1.8";import{_ as Z,a as K,T as Q,I as X}from"../../../fc-bits-ui.js?ver=3.1.8";import{C as J,_ as tt}from"../../../fc-bits.js?ver=3.1.8";import{d as et,g as at}from"../../../data_config.js?ver=3.1.8";import{C as rt}from"../../../CalendarIcon.js?ver=3.1.8";import{P as st}from"../../../PageHeader.js?ver=3.1.8";import{B as nt}from"../../../BaseCard.js?ver=3.1.8";import{A as ot}from"../../../_AjaxSelector.js?ver=3.1.8";import{C as it}from"../../../CustomIcon.js?ver=3.1.8";import{C as lt}from"../../../Confirm.js?ver=3.1.8";import{I as ct}from"../../../ItemCopier.js?ver=3.1.8";import dt from"../Funnels/parts/_LazyIndividualProgress.js?ver=3.1.8";import{P as pt}from"../../../PaginationBar.js?ver=3.1.8";const ut={class:"echart-container-wrapper"},ht={key:0,class:"fc-chart-placeholder"};const mt=Z({name:"ReportGrowthChart",props:{options:{type:Object,default:null},height:{type:[Number,String],default:420}},setup(t){const e=O(null);let a=null;const r=L(()=>!(!t.options||!Array.isArray(t.options.series))&&t.options.series.some(t=>Array.isArray(t.data)&&t.data.length>0)),s=()=>{a&&a.resize()},n=()=>{!a&&e.value&&(a=R(e.value),a.setOption(t.options||{},!0),window.addEventListener("resize",s))};return w(()=>{n()}),k(()=>t.options,t=>{e.value&&(a||n(),t&&a&&a.setOption(t,!0))},{deep:!0}),$(()=>{a&&(window.removeEventListener("resize",s),a.dispose(),a=null)}),{chartRef:e,hasData:r}}},[["render",function(t,e,a,r,s,n){return x(),S("div",ut,[T("div",{ref:"chartRef",class:"chart-container",style:M("height:"+a.height+"px;")},null,4),r.hasData?D("",!0):(x(),S("div",ht," Chart placeholder (ECharts not loaded or data is empty) "))])}],["__scopeId","data-v-62202f49"]]),_t={class:"fc_chart"};const gt=Z({components:{ReportGrowthChart:mt},name:"ChartBuilder",props:{currency_sign:{default:""},data_sets:{default:()=>[]},height:{type:[Number,String],default:260}},data:()=>({maxCumulativeValue:0,chartOptions:null,current_mode:"system"===Q.getCurrentTheme()?Q.getSystemTheme():Q.getCurrentTheme()}),watch:{data_sets:{deep:!0,immediate:!0,handler(){this.setupChartItemsX()}},currency_sign(){this.setupChartItemsX()},current_mode(){this.setupChartItemsX()}},mounted(){this.onThemeChanged=t=>{var e;this.current_mode=(null==(e=t.detail)?void 0:e.effective)||Q.getCurrentTheme()},window.addEventListener(K,this.onThemeChanged)},beforeUnmount(){this.onThemeChanged&&window.removeEventListener(K,this.onThemeChanged)},methods:{decodeHtmlEntities(t){if(!t)return"";const e=document.createElement("textarea");return e.innerHTML=t,e.value},setupChartItemsX(){if(!Array.isArray(this.data_sets)||!this.data_sets.length)return void(this.chartOptions={series:[]});const t="light"===this.current_mode,e=t?"#0E121B":"#ffffff",a=t?"#4A5565":"#9CA3AF",r=t?"#E1E4EA":"#2c3c4e",s=t?"#ffffff":"#283b56",n=t?"#222530":"#94A3B8",o=[],i=[];let l=0;this.each(this.data_sets,(t,e)=>{const a=[];this.each(t.data,(t,r)=>{const s=Number(t)||0;a.push(s),s>l&&(l=s),0===e&&o.push(r)});const r=this.getReadableSeriesColor(t.borderColor||t.backgroundColor||n,n),s={name:t.label,type:t.type||"line",data:a,yAxisIndex:e,smooth:!1,symbol:"circle",symbolSize:4,showSymbol:!1,itemStyle:{color:r},lineStyle:{color:r,width:2}};"bar"===s.type&&(s.barMaxWidth=24),t.fill&&(s.areaStyle={opacity:.15,color:t.backgroundColor||r}),i.push(s)}),l>1e4?l=1e3*Math.ceil(l/1e3):l>500?l=100*Math.ceil(l/100):l+=10,this.maxCumulativeValue=l;const c=this.decodeHtmlEntities(this.currency_sign),d=this.data_sets.map((t,e)=>({type:"value",name:t.label,position:0===e?"left":"right",min:0,max:this.maxCumulativeValue,minInterval:1,nameTextStyle:{color:a},axisLine:{lineStyle:{color:r}},axisTick:{lineStyle:{color:r}},axisLabel:{color:a,formatter:t=>Math.floor(t)!==t?"":c?c+" "+t:t},splitLine:{show:0===e,lineStyle:{color:r,type:"dashed"}}}));this.chartOptions={tooltip:{show:!0,showContent:!0,triggerOn:"mousemove|click",trigger:"axis",appendToBody:!0,confine:!1,transitionDuration:.1,backgroundColor:s,borderColor:s,borderWidth:1,textStyle:{color:e},axisPointer:{type:"cross",label:{backgroundColor:"#283b56"},crossStyle:{color:r}},formatter:t=>Array.isArray(t)&&t.length?t[0].axisValue+"<br/>"+t.map(t=>'<span style="display:inline-block;margin-right:4px;border-radius:50%;width:10px;height:10px;background-color:'+t.color+';"></span>'+"<b>"+t.seriesName+"</b>: "+c+J.formatMoney(Number(t.value)||0,0)).join("<br/>"):"",extraCssText:"z-index:10000; pointer-events:auto;"},legend:{top:10,left:"center",data:this.data_sets.map(t=>t.label),icon:"roundRect",itemWidth:12,itemHeight:12,itemGap:20,textStylLine truncated
@@ -0,0 +1 @@
import{k as e,az as a,ax as t,aw as s,aE as l,aF as n,e as d,aK as o,aL as i,ay as r,aT as _,aD as c,aA as m,aB as u,aO as f}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as p,W as g,X as v,Z as b,a9 as h,aa as y,a0 as $,Y as x,a5 as k,ab as S,a8 as C,a6 as V,J as M,az as w}from"../../../vendor.js?ver=3.1.8";import{_ as E,I as A}from"../../../fc-bits-ui.js?ver=3.1.8";import{I as P}from"../../../ItemCopier.js?ver=3.1.8";import{B as D}from"../../../BaseCard.js?ver=3.1.8";const F={name:"FrontendPortalFeature",components:{ItemCopier:P},props:{settings:{type:Object,required:!0},direction:{type:String,default:"rtl"},saving:{type:Boolean,default:!1},hasCampaignPro:{type:Boolean,default:!1}},emits:["save"],data:()=>({drawer:!1,pageLoading:!1,pageOptions:[]}),computed:{standaloneUrl(){const e=this.settings.frontend_portal_slug||"fluentcrm";return this.appVars.site_url.replace(/\/$/,"")+"/"+e}},watch:{drawer(e){e&&this.searchPages(""),this.syncDrawerQuery(e)},"$route.query.frontportal"(e){this.drawer="1"===e&&this.hasCampaignPro},"settings.frontend_portal_page_id"(){"shortcode"===this.settings.frontend_portal_render_type&&this.searchPages("")}},methods:{syncDrawerQuery(e){const a={...this.$route.query};if(e){if("1"===a.frontportal)return;return a.frontportal="1",void this.$router.push({query:a})}void 0!==a.frontportal&&(delete a.frontportal,this.$router.replace({query:a}))},searchPages(e=""){this.pageLoading=!0,this.$get("reports/ajax-options",{option_key:"post_type",sub_option_key:"page",search:e,values:this.settings.frontend_portal_page_id?[this.settings.frontend_portal_page_id]:[]}).then(e=>{const a=e.options||[];this.pageOptions=a.map(e=>({...e,id:Number(e.id),title:`${e.title||this.$t("Page")} (#${e.id})`}))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.pageLoading=!1})}},mounted(){this.settings.frontend_portal_render_type||(this.settings.frontend_portal_render_type="standalone"),this.settings.frontend_portal_slug||(this.settings.frontend_portal_slug="fluentcrm"),this.settings.frontend_portal_page_id&&(this.settings.frontend_portal_page_id=Number(this.settings.frontend_portal_page_id)),this.hasCampaignPro&&"1"===this.$route.query.frontportal&&(this.drawer=!0),this.searchPages("")}},U={class:"fcrm_addons_features_box"},L={class:"fcrm_addons_features_box--content"},z={class:"fcrm_addons_features_box--content-title"},T={class:"fcrm_addons_features_box--content-desc"},B={class:"fcrm_addons_features_box--actions"},I={class:"fcrm_addons_popover_content"},R={class:"fc_inline_help"},O=["href"],W={class:"fcrm_secondary_text small fcrm_mt_4"},N={class:"dialog-footer"};const j={class:"fcrm_addons_page"},q={class:"fcrm_max_w_800"},H={class:"fcrm_addons_features_lists"},G={class:"fcrm_addons_features_box"},Q={class:"fcrm_addons_features_box--content"},K={class:"fcrm_addons_features_box--content-title"},Y={class:"fcrm_addons_features_box--content-desc"},J={class:"fcrm_addons_features_box--actions"},X={class:"fcrm_addons_features_box"},Z={class:"fcrm_addons_features_box--content"},ee={class:"fcrm_addons_features_box--content-title"},ae={class:"fcrm_addons_features_box--content-desc"},te={class:"fcrm_addons_features_box--actions"},se={class:"fcrm_addons_popover_body"},le={class:"fcrm_addons_popover_body--header"},ne={class:"fcrm_addons_popover_body--header-title"},de={class:"fcrm_addons_popover_content"},oe={key:0,class:"condition_fields"},ie={class:"fcrm_input_hit"},re={class:"fcrm_addons_popover_footer"},_e={class:"fcrm_addons_features_box"},ce={class:"fcrm_addons_features_box--content"},me={class:"fcrm_addons_features_box--content-title"},ue={class:"fcrm_addons_features_box--content-desc"},fe={class:"fcrm_addons_features_box--actions"},pe={class:"fcrm_addons_features_box"},ge={class:"fcrm_addons_features_box--content"},ve={class:"fcrm_addons_features_box--content-title"},be={class:"fcrm_addons_features_box--content-desc"},he={class:"fcrm_addons_features_box--actions"},ye={class:"fcrm_addons_features_box"},$e={class:"fcrm_addons_features_box--content"},xe={class:"fcrm_addons_features_box--content-title"},ke={class:"fcrm_addons_features_box--content-desc"},Se={class:"fcrm_addons_features_box--actions"},Ce={class:"fcrm_addons_popover_content"},Ve={style:{margin:"0"}},Me={style:{margin:"0"},class:"help_text"},we={style:{margin:"0"}},Ee={key:1},Ae={class:"text-align-center"},Pe={class:"fcrm_info_box"},De={class:"dialog-footer"},Fe={class:"fcrm_addons_features_box"},Ue={class:"fcrm_addons_features_box--content"},Le={class:"fcrm_addons_features_box--content-title"},ze={class:"fcrm_addons_features_box--content-desc"},Te={href:"https://fluentcrm.com/docs/event-tracking-automation/",target:"_blank",rel:"noopener noreferrer"},Be={class:"fcrm_addons_features_box--actions"},Ie={class:"fcrm_addons_popover_body"},Re={class:"fcrm_addons_popover_content"},Oe={class:"fcrm_addons_popover_footer"},We={class:"fcrm_addons_features_box"},Ne={class:"fcrm_addons_features_box--content"},je={class:"fcrm_addons_features_box--contentLine truncated