HEX
Server: Apache
System: Linux d5123.usc1.stableserver.net 5.14.0-570.17.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Sat May 24 12:53:17 EDT 2025 x86_64
User: d5123 (1001)
PHP: 8.4.21
Disabled: NONE
Upload Files
File: /home/d5123/myboofola_com/wp-content/plugins/bit-integrations/assets/KeapIntegLayout.Y_2nPy8j.js
var y=Object.defineProperty;var j=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var p=(s,l,a)=>l in s?y(s,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[l]=a,m=(s,l)=>{for(var a in l||(l={}))T.call(l,a)&&p(s,a,l[a]);if(j)for(var a of j(l))_.call(l,a)&&p(s,a,l[a]);return s};import{j as t,_ as c,L as F,k as M,f as S,s as $}from"./main.2.8.7.js";import{b as R,e as V}from"./react-router.DMwpH23k.js";import{a as A,u as I}from"./CopyIcn.CbTvfHMz.js";import{b as f}from"./Table.B1vWdker.js";import{g as N,r as q}from"./KeapCommonFunc.Bq5fL2EK.js";import{a as P,h as E}from"./Integrations.C5a9L07D.js";import{T as L}from"./TagifyInput.BfY_JHJn.js";function G({keapConf:s,setKeapConf:l,loading:a,setLoading:e}){var h;const[r,n]=R.useState({show:!1,action:()=>{}}),d=(o,i)=>{var g;const u=m({},s);(g=o.target)!=null&&g.checked?(N(s,l,e),u.actions.tags=!0):(n({show:!1}),delete u.actions.tags),n({show:"tag"}),l(m({},u))},b=()=>{n({show:!1})},x=o=>{const i=m({},s);i.selectedTags=o,l(m({},i))};return t.jsxs("div",{className:"pos-rel d-flx w-8",children:[t.jsx(f,{checked:(s==null?void 0:s.selectedTags)||!1,onChange:o=>d(o),className:"wdt-200 mt-4 mr-2",value:"tag",title:c("Add Tags","bit - integrations"),subTitle:c("Add Tags")}),t.jsxs(A,{className:"custom-conf-mdl",mainMdlCls:"o-v",btnClass:"purple",btnTxt:c("Ok","bit-integrations"),show:r.show==="tag",close:b,action:b,title:c("Tags","bit-integrations"),children:[t.jsx("div",{className:"btcd-hr mt-2 mb-2"}),t.jsx("div",{className:"mt-2",children:c("Select tags","bit-integrations")}),a.tags?t.jsx(F,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:45,transform:"scale(0.5)"}}):t.jsxs("div",{className:"flx flx-between mt-2",children:[t.jsx(I,{options:(h=s==null?void 0:s.tags)==null?void 0:h.map(o=>({label:o.name,value:o.id})),className:"msl-wrp-options",defaultValue:s==null?void 0:s.selectedTags,onChange:o=>x(o)}),t.jsx("button",{onClick:()=>N(s,l,e),className:"icn-btn sh-sm ml-2 mr-2 tooltip",style:{"--tooltip-txt":`${c("Refresh Tags","bit-integrations")}'`},type:"button",children:"↻"})]})]})]})}const Y=s=>{const l={},e=window.location.href.replace(`${window.opener.location.href}/redirect`,"").split("&");e&&e.forEach(r=>{const n=r.split("=");n[1]&&(l[n[0]]=n[1])}),localStorage.setItem(`__${s}`,JSON.stringify(l)),window.close()},w=(s,l,a,e,r)=>{const n=m({},l);n.field_map.splice(s,0,{}),a(m({},n))},O=(s,l,a,e,r)=>{const n=m({},l);n.field_map.length>1&&n.field_map.splice(s,1),a(m({},n))},v=(s,l,a,e,r,n)=>{const d=m({},a);d.field_map[l][s.target.name]=s.target.value,s.target.value==="custom"&&(d.field_map[l].customValue=""),e(m({},d))};function W({i:s,formFields:l,field:a,keapConf:e,setKeapConf:r}){var o;const n=e!=null&&e.customFields?[...e==null?void 0:e.contactFields,...e==null?void 0:e.customFields]:e==null?void 0:e.contactFields,d=n.filter(i=>i.required===!0)||[],b=n.filter(i=>i.required===!1)||[],x=M(S),{isPro:h}=x;return t.jsx("div",{className:"flx mt-2 mb-2 btcbi-field-map",children:t.jsxs("div",{className:"pos-rel flx",children:[t.jsxs("div",{className:"flx integ-fld-wrp",children:[t.jsxs("select",{className:"btcd-paper-inp mr-2",name:"formField",value:a.formField||"",onChange:i=>v(i,s,e,r),children:[t.jsx("option",{value:"",children:c("Select Field","bit-integrations")}),t.jsx("optgroup",{label:c("Form Fields","bit-integrations"),children:l==null?void 0:l.map(i=>t.jsx("option",{value:i.name,children:i.label},`ff-rm-${i.name}`))}),t.jsx("option",{value:"custom",children:c("Custom...","bit-integrations")}),t.jsx("optgroup",{label:$(c("General Smart Codes %s","bit-integrations"),h?"":`(${c("Pro","bit-integrations")})`),children:h&&((o=P)==null?void 0:o.map(i=>t.jsx("option",{value:i.name,children:i.label},`ff-rm-${i.name}`)))})]}),a.formField==="custom"&&t.jsx(L,{onChange:i=>E(i,s,e,r),label:c("Custom Value","bit-integrations"),className:"mr-2",type:"text",value:a.customValue,placeholder:c("Custom Value","bit-integrations"),formFields:l}),t.jsxs("select",{className:"btcd-paper-inp",disabled:s<d.length,name:"keapField",value:s<d.length?d[s].key||"":a.keapField||"",onChange:i=>v(i,s,e,r),children:[t.jsx("option",{value:"",children:c("Select Field","bit-integrations")}),s<d.length?t.jsx("option",{value:d[s].key,children:d[s].label},d[s].key):b.map(({key:i,label:u})=>t.jsx("option",{value:i,children:u},i))]})]}),s>=d.length&&t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>w(s,e,r),className:"icn-btn sh-sm ml-2 mr-1",type:"button",children:"+"}),t.jsx("button",{onClick:()=>O(s,e,r),className:"icn-btn sh-sm ml-1",type:"button","aria-label":"btn",children:t.jsx("span",{className:"btcd-icn icn-trash-2"})})]})]})})}function Z({formID:s,formFields:l,handleInput:a,keapConf:e,setKeapConf:r,isLoading:n,setIsLoading:d,setSnackbar:b,a:x}){const{id:h}=V();return t.jsxs(t.Fragment,{children:[n&&t.jsx(F,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:100,transform:"scale(0.7)"}}),t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"mt-4",children:[t.jsx("b",{className:"wdt-100",children:c("Map Fields","bit-integrations")}),t.jsx("button",{onClick:()=>q(h,e,r,d,b),className:"icn-btn sh-sm ml-2 mr-2 tooltip",style:{"--tooltip-txt":`'${c("Refresh Lemlist Field","bit-integrations")}'`},type:"button",disabled:n,children:"↻"})]}),t.jsx("div",{className:"btcd-hr mt-1"}),t.jsxs("div",{className:"flx flx-around mt-2 mb-2 btcbi-field-map-label",children:[t.jsx("div",{className:"txt-dp",children:t.jsx("b",{children:c("Form Fields","bit-integrations")})}),t.jsx("div",{className:"txt-dp",children:t.jsx("b",{children:c("Keap Fields","bit-integrations")})})]}),e.field_map.map((o,i)=>t.jsx(W,{i,field:o,keapConf:e,formFields:l,setKeapConf:r},`keap-m-${i+9}`)),t.jsx("div",{className:"txt-center btcbi-field-map-button mt-2",children:t.jsx("button",{onClick:()=>w(e.field_map.length,e,r),className:"icn-btn sh-sm",type:"button",children:"+"})}),t.jsx("br",{}),t.jsx("br",{}),t.jsx("div",{className:"mt-4",children:t.jsx("b",{className:"wdt-100",children:c("Utilities","bit-integrations")})}),t.jsx("div",{className:"btcd-hr mt-1"}),t.jsx(G,{keapConf:e,setKeapConf:r,formFields:l,loading:n,setLoading:d}),t.jsx("br",{}),t.jsx("br",{})]})]})}export{Z as K,Y as s};