PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 All 139 releases
bit-form / assets / bf-467-87.js

bf-467-87.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at assets/bf-467-87.js

2 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var A=Object.defineProperty;var f=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var g=(e,t,o)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,d=(e,t)=>{for(var o in t||(t={}))w.call(t,o)&&g(e,o,t[o]);if(f)for(var o of f(t))$.call(t,o)&&g(e,o,t[o]);return e};import{_ as n,a5 as I,$ as R,c as z}from"./main-96.js";import{s as y}from"./bf-331-47.js";function U(e,t,o,h,l,i,u,c,a){const s=d({},t);s[e.target.name]=e.target.value,o(d({},s))}const v=(e,t,o,h,l,i)=>{if(!e.dataCenter||!e.clientId||!e.clientSecret){o({dataCenter:e.dataCenter?"":n("Data center cann't be empty"),clientId:e.clientId?"":n("Client ID cann't be empty"),clientSecret:e.clientSecret?"":n("Secret key cann't be empty")});return}const u=I(R);l(!0);const a=`https://accounts.zoho.${e.dataCenter}/oauth/v2/auth?scope=ZohoMail.accounts.Read,ZohoMail.messages.CREATE,ZohoMail.messages.UPDATE,ZohoMail.Attachments.CREATE,ZohoMail.Attachments.READ,ZohoMail.Attachments.UPDATE&response_type=code&client_id=${e.clientId}&prompt=Consent&access_type=offline&state=${encodeURIComponent(window.location.href)}/redirect&redirect_uri=${encodeURIComponent(u.zohoRedirectURL)}`,s=window.open(a,"zohoMail","width=400,height=609,toolbar=off"),_=setInterval(()=>{if(s.closed){clearInterval(_);let r={},m=!1;const C=localStorage.getItem("__bitforms_zohoMail");if(C&&(m=!0,r=JSON.parse(C),localStorage.removeItem("__bitforms_zohoMail")),!r.code||r.error||!r||!m){const p=r.error?`Cause: ${r.error}`:"";i({show:!0,msg:`${n("Authorization failed")} ${p}. ${n("please try again")}`}),l(!1)}else{const p=d({},e);p.accountServer=r["accounts-server"],b(r,p,t,h,l,i)}}},500)},b=(e,t,o,h,l,i)=>{const u=I(R),c=d({},e);c.dataCenter=t.dataCenter,c.clientId=t.clientId,c.clientSecret=t.clientSecret,c.redirectURI=encodeURIComponent(u.zohoRedirectURL),z(c,"bitforms_zmail_generate_token").then(a=>a).then(a=>{if(a&&a.success){const s=d({},t);s.tokenDetails=a.data,o(s),y(s),h(!0),i({show:!0,msg:n("Authorized Successfully")})}else a&&a.data&&a.data.data||!a.success&&typeof a.data=="string"?i({show:!0,msg:`${n("Authorization failed Cause:")}${a.data.data||a.data}. ${n("please try again")}`}):i({show:!0,msg:n("Authorization failed. please try again")});l(!1)})};export{v as a,U as h};
2