@integry/sdk 4.5.4 → 4.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +1 -1
- package/dist/esm/index.csm.d.ts +7 -4
- package/dist/esm/index.csm.js +35 -16
- package/dist/umd/index.umd.d.ts +1 -0
- package/dist/umd/index.umd.js +35 -16
- package/package.json +2 -1
- package/src/features/common/ActionForm/index.ts +64 -21
- package/src/features/common/ActionForm/styles.module.scss +5 -0
- package/src/index.ts +42 -0
- package/src/renderFlowStep.test.ts +0 -0
- package/src/store/actionFunctions.ts +9 -4
- package/vitest.config.ts +6 -0
package/.vscode/launch.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// "url": "file:////Users/yasir/Downloads/Flows%20-%20Integry%20SDK%20sample%20(33).html",
|
|
15
15
|
// "url": "file:////Users/yasir/Downloads/Integry SDK sample code (17).html",
|
|
16
16
|
"url": "file:////Users/yasir/Downloads/Flows - Integry SDK sample (41).html",
|
|
17
|
-
// "url": "file:////Users/yasir/Downloads/Integry SDK sample code - 2025-02-
|
|
17
|
+
// "url": "file:////Users/yasir/Downloads/Integry SDK sample code - 2025-02-14T143828.237.html",
|
|
18
18
|
"webRoot": "${workspaceFolder}/src"
|
|
19
19
|
}
|
|
20
20
|
]
|
package/dist/esm/index.csm.d.ts
CHANGED
|
@@ -50,12 +50,14 @@ type IntegrySDKEventPayloads = {
|
|
|
50
50
|
callbackUrlArray: {
|
|
51
51
|
templateStepId: number;
|
|
52
52
|
activityId: number;
|
|
53
|
-
callbackUrl: string | null;
|
|
54
|
-
* Integry JS SDK
|
|
55
|
-
*/
|
|
53
|
+
callbackUrl: string | null;
|
|
56
54
|
}[];
|
|
57
55
|
authorizations: {
|
|
58
|
-
authorizationId:
|
|
56
|
+
authorizationId:
|
|
57
|
+
/**
|
|
58
|
+
* Integry JS SDK
|
|
59
|
+
*/
|
|
60
|
+
number;
|
|
59
61
|
userIdentity: string;
|
|
60
62
|
isBrandingAppAuth: boolean;
|
|
61
63
|
}[];
|
|
@@ -708,6 +710,7 @@ declare class IntegryJS {
|
|
|
708
710
|
containerId: string;
|
|
709
711
|
multipurposeFieldProps: MultipurposeFieldType;
|
|
710
712
|
}) => void;
|
|
713
|
+
renderFlowStep: (containerId: string, step: any, connectedAccountId: string) => void;
|
|
711
714
|
verifyAuthConfig: () => Promise<{
|
|
712
715
|
config_verified: boolean;
|
|
713
716
|
meta: any;
|
package/dist/esm/index.csm.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function c(e){var t=e.parentNode;t&&t.removeChild(e)}function u(e,t,n){var i,o=arguments,s={};for(i in t)"key"!==i&&"ref"!==i&&(s[i]=t[i]);if(arguments.length>3)for(n=[n],i=3;i<arguments.length;i++)n.push(o[i]);if(null!=n&&(s.children=n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return _(e,s,t&&t.key,t&&t.ref)}function _(t,n,i,o){var s={type:t,props:n,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return e.vnode&&e.vnode(s),s}function m(){return{}}function h(e){return e.children}function g(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?y(e):null}function f(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return f(e)}}function v(t){(!t.__d&&(t.__d=!0)&&1===n.push(t)||o!==e.debounceRendering)&&((o=e.debounceRendering)||i)(x)}function x(){var e,t,i,o,s,a,l;for(n.sort((function(e,t){return t.__v.__b-e.__v.__b}));e=n.pop();)e.__d&&(i=void 0,o=void 0,a=(s=(t=e).__v).__e,(l=t.__P)&&(i=[],o=S(l,s,p({},s),t.__n,void 0!==l.ownerSVGElement,null,i,null==a?y(s):a),k(i,s),o!=a&&f(s)))}function w(e,t,n,i,o,s,a,d,p){var u,_,m,h,g,f,v,x=n&&n.__k||r,w=x.length;if(d==l&&(d=null!=s?s[0]:w?y(n,0):null),u=0,t.__k=b(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(m=x[u])||m&&n.key==m.key&&n.type===m.type)x[u]=void 0;else for(_=0;_<w;_++){if((m=x[_])&&n.key==m.key&&n.type===m.type){x[_]=void 0;break}m=null}if(h=S(e,n,m=m||l,i,o,s,a,d,p),(_=n.ref)&&m.ref!=_&&(v||(v=[]),m.ref&&v.push(m.ref,null,n),v.push(_,n.__c||h,n)),null!=h){if(null==f&&(f=h),null!=n.__d)h=n.__d,n.__d=null;else if(s==m||h!=d||null==h.parentNode){e:if(null==d||d.parentNode!==e)e.appendChild(h);else{for(g=d,_=0;(g=g.nextSibling)&&_<w;_+=2)if(g==h)break e;e.insertBefore(h,d)}"option"==t.type&&(e.value="")}d=h.nextSibling,"function"==typeof t.type&&(t.__d=h)}}return u++,n})),t.__e=f,null!=s&&"function"!=typeof t.type)for(u=s.length;u--;)null!=s[u]&&c(s[u]);for(u=w;u--;)null!=x[u]&&A(x[u],x[u]);if(v)for(u=0;u<v.length;u++)M(v[u],v[++u],v[++u])}function b(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var i=0;i<e.length;i++)b(e[i],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?_(null,e,null,null):null!=e.__e||null!=e.__c?_(e.type,e.props,e.key,null):e):e);return n}function $(e,t,n,i,o){var s;for(s in n)s in t||I(e,s,null,n[s],i);for(s in t)o&&"function"!=typeof t[s]||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],i)}function C(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===d.test(t)?n+"px":null==n?"":n}function I(e,t,n,i,o){var s,a,l,r,d;if(o?"className"===t&&(t="class"):"class"===t&&(t="className"),"key"===t||"children"===t);else if("style"===t)if(s=e.style,"string"==typeof n)s.cssText=n;else{if("string"==typeof i&&(s.cssText="",i=null),i)for(a in i)n&&a in n||C(s,a,"");if(n)for(l in n)i&&n[l]===i[l]||C(s,l,n[l])}else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),d=t.toLowerCase(),t=(d in e?d:t).slice(2),n?(i||e.addEventListener(t,L,r),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,L,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&!o&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n?e.removeAttribute(t):e.setAttribute(t,n))}function L(t){this.l[t.type](e.event?e.event(t):t)}function S(t,n,i,o,s,a,d,c,u){var _,m,y,f,v,x,C,I,L,S,k=n.type;if(void 0!==n.constructor)return null;(_=e.__b)&&_(n);try{e:if("function"==typeof k){if(I=n.props,L=(_=k.contextType)&&o[_.__c],S=_?L?L.props.value:_.__:o,i.__c?C=(m=n.__c=i.__c).__=m.__E:("prototype"in k&&k.prototype.render?n.__c=m=new k(I,S):(n.__c=m=new g(I,S),m.constructor=k,m.render=D),L&&L.sub(m),m.props=I,m.state||(m.state={}),m.context=S,m.__n=o,y=m.__d=!0,m.__h=[]),null==m.__s&&(m.__s=m.state),null!=k.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=p({},m.__s)),p(m.__s,k.getDerivedStateFromProps(I,m.__s))),f=m.props,v=m.state,y)null==k.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(null==k.getDerivedStateFromProps&&I!==f&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(I,S),!m.__e&&null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(I,m.__s,S)){for(m.props=I,m.state=m.__s,m.__d=!1,m.__v=n,n.__e=i.__e,n.__k=i.__k,m.__h.length&&d.push(m),_=0;_<n.__k.length;_++)n.__k[_]&&(n.__k[_].__=n);break e}null!=m.componentWillUpdate&&m.componentWillUpdate(I,m.__s,S),null!=m.componentDidUpdate&&m.__h.push((function(){m.componentDidUpdate(f,v,x)}))}m.context=S,m.props=I,m.state=m.__s,(_=e.__r)&&_(n),m.__d=!1,m.__v=n,m.__P=t,_=m.render(m.props,m.state,m.context),n.__k=b(null!=_&&_.type==h&&null==_.key?_.props.children:_),null!=m.getChildContext&&(o=p(p({},o),m.getChildContext())),y||null==m.getSnapshotBeforeUpdate||(x=m.getSnapshotBeforeUpdate(f,v)),w(t,n,i,o,s,a,d,c,u),m.base=n.__e,m.__h.length&&d.push(m),C&&(m.__E=m.__=null),m.__e=null}else n.__e=function(e,t,n,i,o,s,a,d){var p,c,u,_,m,h=n.props,g=t.props;if(o="svg"===t.type||o,null==e&&null!=s)for(p=0;p<s.length;p++)if(null!=(c=s[p])&&(null===t.type?3===c.nodeType:c.localName===t.type)){e=c,s[p]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),s=null}if(null===t.type)null!=s&&(s[s.indexOf(e)]=null),h===g||d||e.data==g||(e.data=g);else if(t!==n){if(null!=s&&(s=r.slice.call(e.childNodes)),u=(h=n.props||l).dangerouslySetInnerHTML,_=g.dangerouslySetInnerHTML,!d){if(h===l)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(_||u)&&(_&&u&&_.__html==u.__html||(e.innerHTML=_&&_.__html||""))}$(e,g,h,o,d),t.__k=t.props.children,_||w(e,t,n,i,"foreignObject"!==t.type&&o,s,a,l,d),d||("value"in g&&void 0!==g.value&&g.value!==e.value&&(e.value=null==g.value?"":g.value),"checked"in g&&void 0!==g.checked&&g.checked!==e.checked&&(e.checked=g.checked))}return e}(i.__e,n,i,o,s,a,d,u);(_=e.diffed)&&_(n)}catch(t){e.__e(t,n,i)}return n.__e}function k(t,n){e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(e){e.call(n)}))}catch(t){e.__e(t,n.__v)}}))}function M(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(t){e.__e(t,i)}}function A(t,n,i){var o,s,a;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||M(o,null,n)),i||"function"==typeof t.type||(i=null!=(s=t.__e)),t.__e=t.__d=null,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){e.__e(t,n)}o.base=o.__P=null}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&A(o[a],n,i);null!=s&&c(s)}function D(e,t,n){return this.constructor(e,n)}function T(t,n,i){var o,a,d;e.__&&e.__(t,n),a=(o=i===s)?null:i&&i.__k||n.__k,t=u(h,null,[t]),d=[],S(n,(o?n:i||n).__k=t,a||l,l,void 0!==n.ownerSVGElement,i&&!o?[i]:a?null:r.slice.call(n.childNodes),d,i||l,o),k(d,t)}function F(e){var t={},n={__c:"__cC"+a++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,o=this;return this.getChildContext||(i=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(t){e.value!==t.value&&i.some((function(e){e.context=t.value,v(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n}e={__e:function(e,t){for(var n,i;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(i=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(i=!0,n.componentDidCatch(e)),i)return v(n.__E=n)}catch(t){e=t}throw e}},t=function(e){return null!=e&&void 0===e.constructor},g.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&p(n,e),null!=e&&this.__v&&(this.__e=!1,t&&this.__h.push(t),v(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},g.prototype.render=h,n=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=l,a=0;var E=Object.freeze({__proto__:null,render:T,hydrate:function(e,t){T(e,t,s)},createElement:u,h:u,Fragment:h,createRef:m,get isValidElement(){return t},Component:g,cloneElement:function(e,t){return t=p(p({},e.props),t),arguments.length>2&&(t.children=r.slice.call(arguments,2)),_(e.type,t,t.key||e.key,t.ref||e.ref)},createContext:F,toChildArray:b,_unmount:A,get options(){return e}}),O=function(e,t,n,i){var o;t[0]=0;for(var s=1;s<t.length;s++){var a=t[s++],l=t[s]?(t[0]|=a?1:2,n[t[s++]]):t[++s];3===a?i[0]=l:4===a?i[1]=Object.assign(i[1]||{},l):5===a?(i[1]=i[1]||{})[t[++s]]=l:6===a?i[1][t[++s]]+=l+"":a?(o=e.apply(l,O(e,l,n,["",null])),i.push(o),l[0]?t[0]|=2:(t[s-2]=0,t[s]=o)):i.push(l)}return i},N=new Map;var R=function(e){var t=N.get(this);return t||(t=new Map,N.set(this,t)),(t=O(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,o="",s="",a=[0],l=function(e){1===i&&(e||(o=o.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(0,e,o):3===i&&(e||o)?(a.push(3,e,o),i=2):2===i&&"..."===o&&e?a.push(4,e,0):2===i&&o&&!e?a.push(5,0,!0,o):i>=5&&((o||!e&&5===i)&&(a.push(i,0,o,n),i=6),e&&(a.push(i,e,0,n),i=6)),o=""},r=0;r<e.length;r++){r&&(1===i&&l(),l(r));for(var d=0;d<e[r].length;d++)t=e[r][d],1===i?"<"===t?(l(),a=[a],i=3):o+=t:4===i?"--"===o&&">"===t?(i=1,o=""):o=t+o[0]:s?t===s?s="":o+=t:'"'===t||"'"===t?s=t:">"===t?(l(),i=1):i&&("="===t?(i=5,n=o,o=""):"/"===t&&(i<5||">"===e[r][d+1])?(l(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),i=2):o+=t),3===i&&"!--"===o&&(i=4,a=a[0])}return l(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(u),W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}function H(e){var t={exports:{}};return e(t,t.exports),t.exports}var P=z(E),B=H((function(e,t){var n=P;function i(e,t){for(var n in t)e[n]=t[n];return e}function o(e){this.getChildContext=function(){return{store:e.store}}}o.prototype.render=function(e){return e.children&&e.children[0]||e.children},t.connect=function(e,t){var o;return"function"!=typeof e&&("string"==typeof(o=e||{})&&(o=o.split(/\s*,\s*/)),e=function(e){for(var t={},n=0;n<o.length;n++)t[o[n]]=e[o[n]];return t}),function(o){function s(s,a){var l=this,r=a.store,d=e(r?r.getState():{},s),p=t?function(e,t){"function"==typeof e&&(e=e(t));var n={};for(var i in e)n[i]=t.action(e[i]);return n}(t,r):{store:r},c=function(){var t=e(r?r.getState():{},s);for(var n in t)if(t[n]!==d[n])return d=t,l.setState({});for(var i in d)if(!(i in t))return d=t,l.setState({})};this.componentWillReceiveProps=function(e){s=e,c()},this.componentDidMount=function(){r.subscribe(c)},this.componentWillUnmount=function(){r.unsubscribe(c)},this.render=function(e){return n.h(o,i(i(i({},p),e),d))}}return(s.prototype=new n.Component).constructor=s}},t.Provider=o}));function V(e,t){return t=t||{},new Promise((function(n,i){var o=new XMLHttpRequest,s=[],a=[],l={},r=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:r,headers:{keys:function(){return s},entries:function(){return a},get:function(e){return l[e.toLowerCase()]},has:function(e){return e.toLowerCase()in l}}}};for(var d in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){s.push(t=t.toLowerCase()),a.push([t,n]),l[t]=l[t]?l[t]+","+n:n})),n(r())},o.onerror=i,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(d,t.headers[d]);o.send(t.body||null)}))}class U extends Error{statusCode;response;constructor(e,t){super(e),this.name=this.constructor.name,this.statusCode=t?.status,this.response=t}}const Z=async e=>{if(e.ok)try{return{data:await e.json(),status:e.status}}catch(t){return{data:null,status:e.status}}else if(405===e.status)return{data:await e.json(),status:e.status};const t=new U(e.statusText,e);return Promise.reject(t)};class j{config;constructor(e){this.config=e}static addUrlSearchParams=(e,t)=>Object.keys(t).map((n=>void 0!==t[n]&&null!==t[n]&&e.searchParams.append(n,`${t[n]}`)));getTemplate=async(e,t,n)=>{const i=new URL(`${this.config.baseUrlv2}/template/${e}/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,self_api_key:this.config.apiKey||null,self_auth_id:this.config.authId||t||null,self_auth_extras:this.config.extras?JSON.stringify(this.config.extras):null,app_auth_id:n||null});try{return(await V(i.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAuthUrl=e=>{const t=new URL(`${this.config.baseUrl}/auth/login/${e}/`);return j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t.toString()};getAuthUrlByApp=e=>{const t=new URL(`${this.config.baseUrl}/auth/app/login/${e}/`);return j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t.toString()};getAppById=async e=>{const t=new URL(`${this.config.baseUrl}/api/apps/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,sdk_request:!0});try{return(await V(t.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getTemplateStep=async(e,t,n,i,o)=>{const s=new URL(`${this.config.baseUrl}/template_step/${e}/`);j.addUrlSearchParams(s,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,self_api_key:this.config.apiKey||null,self_auth_id:this.config.authId||i||null,integration_id:t?`${t}`:null,version_id:n?`${n}`:null,self_auth_extras:this.config.extras?JSON.stringify(this.config.extras):null,app_auth_id:o||null,v:"4.0"});try{return(await V(s.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};verifyOAuth=async e=>{const t=new URL(`${this.config.baseUrl}/${this.config.oauthVerifyPath}`);j.addUrlSearchParams(t,{authorization_id:`${e}`,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return!!(await V(t.toString(),{method:"POST"}).then(Z)).data}catch(e){return console.error(e),null}};verifyOAuthWithError=async e=>{const t=new URL(`${this.config.baseUrl}/${this.config.oauthVerifyPath}?return_error=true`);j.addUrlSearchParams(t,{authorization_id:`${e}`,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};deleteAuth=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/connected-accounts/${e}?force=${t??!1}`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{const e=await V(n.toString(),{method:"DELETE"}).then((e=>Z(e)));return{status:e.status,data:e.data}}catch(e){return console.error(e),null}};callDynamicDataEndpoint=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",o=arguments.length>3?arguments[3]:void 0;j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});try{return(await V(t.toString(),{method:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getTemplateListing=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle/${e}/`);(t||[]).length>0?j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(",")}):j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getTemplateListingV2=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/api/v1/sdk/flows/?page_size=9999&show_draft=true${t?`&deployment_id=${t}`:""}`);(e||[]).length>0?j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(e||[]).join(",")}):j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveIntegration=async e=>{const t=new URL(`${this.config.baseUrlv2}/integration/`);j.addUrlSearchParams(t,{async:!1,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,activate:this.config?.defaultIntegrationStatus??!0});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppsForAuthConnection=async e=>{const t=new URL(`${this.config.baseUrl}/api/v1/sdk/flow-apps/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,page:`${e?.page??""}`,tags:e?.tags??"",page_size:9999});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};updateIntegration=async(e,t,n)=>{const i=new URL(`${this.config.baseUrlv2}/integration/${e}/`);j.addUrlSearchParams(i,{async:!1,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,activate:t});try{return(await V(i.toString(),{method:"PUT",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};renameIntegration=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}/rename/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PUT",body:JSON.stringify({name:t}),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};deleteIntegration=async e=>{const t=new URL(`${this.config.baseUrl}/setup/template/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"DELETE"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};toggleIntegration=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}/${t?"enable":"disable"}/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PUT"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getIntegrationById=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,is_read_only:!!t});try{return(await V(n.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getCustomFields=async e=>{const t=new URL(`${this.config.baseUrl}/endpoints/get_custom_fields/${e.activityFieldId}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,step_name:e.stepName||"",authorization_id:`${e.authorizationId}`,...e.endpointData||{}});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};verifyAuthConfig=async e=>{const t=new URL(`${this.config.baseUrl}/verify-sdk-config/`);e.deploymentId?j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle_id:e.deploymentId||""}):j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceApps=async e=>{const t=new URL(`${this.config.baseUrl}/sdk/bundle_apps/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle:e.marketplaceId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceAppDetail=async e=>{const t=new URL(`${this.config.baseUrl}/sdk/bundle_apps/${e.marketplaceAppId}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle:e.marketplaceId,app_auth_id:e.app_auth_id||null});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};sendRequestForNewApp=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle/${e}/app_requests/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceDetails=async e=>{const t=new URL(`${this.config.baseUrl}/bundle/${e.marketplaceId}`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};setDefaultAuthorization=async e=>{const t=new URL(`${this.config.baseUrl}/connected-accounts/${e.authorizationId}/set_as_default/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,authorization_type:`${e.authorizationTypeId}`});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveAppDescription=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle_apps/${e}/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getIUTestingAccounts=async()=>{const e=new URL(`${this.config.baseUrl}/connected-accounts/list_workspace_connected_accounts/`);j.addUrlSearchParams(e,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(e.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};uploadFile=async e=>{const t=new URL(`${this.config.baseUrl}/api/files/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST",body:e}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveAppMedia=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle_apps/${e}/save_media/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t.media),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppInfo=async e=>{const t=new URL(`${this.config.baseUrl}/api/v1/sdk/apps/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppFlows=async(e,t,n)=>{const i=new URL(`${this.config.baseUrl}/api/v1/sdk/apps/${e}/flows/`);n?j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(","),show_draft:!0,authorization_id:n,page_size:9999}):j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(","),show_draft:!0,page_size:9999});try{return(await V(i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAdminAppFlows=async e=>{let{appId:t,bundleId:n}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/bundle/${n}/apps/${t}/templates/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};executeFlow=async(e,t)=>{const n=new URL(e);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getApps=async e=>{let{tags:t=[],nextURL:n=null}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/flow-apps/`);(t||[]).length,j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:t.join(","),show_draft:!0}),null===n&&j.addUrlSearchParams(i,{page_size:100});try{return(await V(n||i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceAppsV2=async e=>{let{cursor:t=null,search:n=""}=e;const i=new URL(`${this.config.baseAPIUrl}/apps/list/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,page_size:30}),""!==n&&null!==n&&j.addUrlSearchParams(i,{search:n});const o={};null!==t&&(o._cursor=t);try{return(await V(i.toString(),{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAdminApps=async e=>{let{nextURL:t=null,bundleId:n=0}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/bundle/${n}/apps/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t||i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};callDynamicDataEndpointWithTags=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});let o={query_string_data:i};"object"==typeof i&&(o={...i,query_string_data:i});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();callSourceFlowIntegrationInvocationUrl=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getUserVariables=async()=>{const e=new URL(`${this.config.baseUrl}/api/v1/app-user-variables/`);j.addUrlSearchParams(e,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(e.toString(),{method:"GET"}).then(Z)).data}catch(e){return console.error(e),null}};getFunctionDetails=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new URL(`${e.config.baseAPIUrl}/functions/${t}/get/`);j.addUrlSearchParams(i,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,include:"meta"});try{return(await V(i.toString(),{method:"POST",body:JSON.stringify({_variables:n}),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getFunctionSignature=async e=>{const t=new URL(`${this.config.baseAPIUrl}/functions/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getConnectedAccounts=async e=>{const t=new URL(`${this.config.baseUrl}/apps/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getApp=async e=>{const t=new URL(`${this.config.baseUrl}/apps/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};invokeFunction=async(e,t)=>{const n=new URL(e.url);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t&&j.addUrlSearchParams(n,{connected_account_id:t});try{const t=await V(n.toString(),{method:e.method,headers:e.headers,body:JSON.stringify({...e.args,...e.vars&&{_variables:e.vars}})});return await t.json()}catch(e){return new Error("Error while invoking function")}};getAuthConfig=()=>{let e="";return e=`app_key=${this.config.appKey}&hash=${this.config.hash}&user_id=${encodeURIComponent(this.config.userId)}`,e}}class K extends class{emitter;handler;constructor(e,t){this.emitter=e,this.handler=t}getHandler(){return this.handler}}{run(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.handler.apply(null,n)}}class q extends K{total;i=0;constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(super(e,t),this.total=n,this.total<1)throw new Error("{total} can not be less than 1")}run(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];super.run(e,...n),++this.i>=this.total&&this.emitter.off(e,this.handler)}}class G{events=(()=>Object.create(null))();on(e,t){this.addEventListener(e,new K(this,t))}once(e,t){this.addEventListener(e,new q(this,t,1))}off(e,t){const n=this.events[e];n?.length&&(this.events[e]=n.filter((e=>e.getHandler()!==t)))}offAll(){Object.keys(this.events).forEach((e=>{const t=this.events[e];t&&(t.length=0)})),this.events=Object.create(null)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const o=this.events[e];o&&o.forEach((t=>t.run(e,...n)))}addEventListener(e,t){const n=this.events[e];Array.isArray(n)?n.push(t):this.events[e]=[t]}}var J,X,Y,Q,ee,te,ne=F(null);function ie(e,t){for(var n in t)e[n]=t[n];return e}!function(e){e.COMPACT="COMPACT",e.COMFORTABLE="COMFORTABLE"}(J||(J={})),function(e){e.NARROW="COMPACT",e.WIDE="COMFORTABLE"}(X||(X={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE",e.DETACHED="DETACHED",e.CUSTOM="CUSTOM"}(Y||(Y={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE"}(Q||(Q={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE"}(ee||(ee={})),function(e){e.GRID="GRID",e.LIST="LIST"}(te||(te={}));const oe={stepState:{steps:[],currentStep:{type:"CONFIRMATION"},stepIndex:0,fieldsListData:null,showValidation:!1,allStepsCompleted:!1},genericData:{deploymentId:null,implicitAuthEnabled:!1,templateId:null,stepWithActivityOutput:null,isPreviewMode:!1,brandingApp:null,name:"",authModalId:"",showAppAuthModal:!1,isAnonymous:!1,marketplaceId:null,marketplaceDetail:null,IUAccountsData:null,app_id:null,currentIntegrationStatus:"",isTestIntegration:!1,deploymentIdFromConfig:null,customFlowSetupRender:!1},stepMapping:{},authMapping:{},stepDataMapping:{},parentChildMapping:{},conditionalFieldMapping:{},fieldListMapping:{},integrations:[],templates:[],showFlowsListModal:!1,showAppsListModal:!1,showAppPageModal:!1,showSetupModal:!1,showSetupInline:!1,fetchingIntegrations:!1,fetchingTemplates:!1,integrationIdToEdit:null,mappingInfo:null,activatedTab:"",showMarketplaceModal:!1,showRequestAppModal:!1,requestAppFormData:{},showMarketplaceAppPageId:null,selectedAuthByAppId:{}},se=e=>{try{return JSON.parse(e)}catch(e){return null}},ae=(e,t,n)=>{let i=!1;for(let o=0;o<t.length;o+=1){const{parentFieldId:s,value:a}=t[o],l=n[e]&&n[e][s];if(l&&l.value===a){i=!0;break}}return i},le=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{is_hidden:n,is_default_value_auto_mapped:i}=e,o=[];return t?(n&&o.push({label:"Hidden",type:"grey"}),i&&o.push({label:"AI mapped",type:"grey"}),o):[]},re=e=>({setStoreState:(e,t)=>({...e,...t}),setBaseData:(e,t)=>({...e,integrations:t.integrations.map((e=>({...e,loading:!1}))),templates:t.templates,fetchingIntegrations:!1,fetchingTemplates:!1}),setSteps(e,t){const n=[];let i=-1;const o=[];return t.forEach((e=>{const{authorization_type:t}=e,{app:s}=t;if(!e.hide_authorization&&!o.includes(s.id)){o.push(s.id);let t=e.activity.app.name,a=e.activity.app.icon_url;"MAKE_HTTP_CALL"===e.activity.type&&(t=e.authorization_type.app.name,a=e.authorization_type.app.icon_url),i+=1,n.push({stepId:e.id,title:`${t} Account`,iconUrl:a,isCompleted:!1,isCurrentlyOpen:!1,type:"AUTH",requiredFields:[e.id],invalidFields:{[e.id]:""},isValid:!1,itemIndex:i})}})),t.forEach((e=>{if(e.is_visible&&e.template_fields.length>0){const t=e.template_fields.filter((e=>e.is_visible)).length>0,o=e.template_fields.filter((e=>e.is_required&&e.is_visible)).map((e=>e.id)),s=e.template_fields.filter((e=>e.is_required&&!e.default_value&&e.is_visible)).reduce(((e,t)=>({...e,[t.id]:""})),{}),a=Object.keys(s).length<1;t&&(i+=1,n.push({stepId:e.id,title:e.title,description:e.description||"",iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"CONFIGURATION",requiredFields:o,invalidFields:s,isValid:a,itemIndex:i}))}})),{...e,stepState:{steps:n,fieldsListData:null,currentStep:n[0],stepIndex:0,showValidation:!1,allStepsCompleted:!1}}},setIntegrationLoadingState(e,t){const{integrationId:n,isLoading:i,op:o,nextVal:s}=t,a=e.integrations.findIndex((e=>e.id===n));if("delete"===o)return{...e,integrations:e.integrations.filter((e=>e.id!==n))};if("edit"===o&&a>-1){const t={...e.integrations[a],loading:i};return null!=s&&(t.status=s?"ACTIVE":"INACTIVE"),{...e,integrations:[...e.integrations.slice(0,a),t,...e.integrations.slice(a+1)]}}if("edit-name"===o&&a>-1){const n={...e.integrations[a],name:`${t.updatedName}`,loading:i};return{...e,integrations:[...e.integrations.slice(0,a),n,...e.integrations.slice(a+1)]}}return{...e}},showStepValidationState(e){const{stepState:t}=e;return{stepState:{...t,showValidation:!0}}},hideStepValidationState(e){const{stepState:t}=e;return{stepState:{...t,showValidation:!1}}},gotoNextStep(e){const{stepState:t}=e;if(t){const n=Number(t.stepIndex)+1,i=t.steps[Number(t.stepIndex)+1],o={...t.steps[e.stepState.stepIndex],isCompleted:!0};return i?{stepState:{...t,steps:[...t.steps.slice(0,t.stepIndex),o,...t.steps.slice(t.stepIndex+1)],currentStep:{...i},stepIndex:n,showValidation:!1}}:{stepState:{...t,steps:[...t.steps.slice(0,t.stepIndex),o,...t.steps.slice(t.stepIndex+1)],currentStep:{type:"CONFIRMATION"},stepIndex:n,allStepsCompleted:!0,showValidation:!1}}}return e},gotoPreviousStep(e){if(e.stepState){const t=Number(e.stepState.stepIndex)-1,n=e.stepState.steps[Number(e.stepState.stepIndex)-1];let i=!n.isValid;return e.genericData.isReadOnly&&(i=!1),{stepState:{...e.stepState,currentStep:n,stepIndex:t,showValidation:i}}}return e},gotoStepInPreview:(e,t)=>{const{stepState:n}=e,{stepId:i,type:o}=t;if(i&&"CONFIRMATION"!==o){const t=n.steps.findIndex((e=>e.stepId===i&&e.type===o));if(t>-1)return{stepState:{...e.stepState,currentStep:n.steps[t],stepIndex:t,allStepsCompleted:!1}}}return i||"CONFIRMATION"!==o?e:{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}}},gotoStep:(e,t)=>{const{stepState:n}=e,{stepIndex:i}=n;if(n){const{currentStep:o}=n,s=n.steps[t];if(e.genericData.isPreviewMode)return t===n.steps.length?{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}}:{stepState:{...e.stepState,currentStep:{...s},stepIndex:t,allStepsCompleted:!1}};if(e.genericData.isReadOnly)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t}};if(n.allStepsCompleted&&t===n.steps.length&&"CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isValid)return{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}};if(o&&"CONFIRMATION"!==o.type&&o.isValid&&i===n.steps.length-1&&t===n.steps.length){const e={...n.steps[i],isCompleted:!0};return{stepState:{...n,steps:[...n.steps.slice(0,i),e,...n.steps.slice(i+1)],currentStep:{type:"CONFIRMATION"},stepIndex:t,allStepsCompleted:!0}}}if(s&&s.isCompleted||s&&"CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isCompleted&&"CONFIRMATION"===s.type)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t,showValidation:!s.isValid}};if("CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isValid&&t===i+1){const o={...n.steps[i],isCompleted:!0,isValid:!0};return{stepState:{...e.stepState,steps:[...n.steps.slice(0,i),o,...n.steps.slice(i+1)],currentStep:{...s},stepIndex:t}}}if(n.steps[t-1]&&n.steps[t-1].isCompleted&&"CONFIRMATION"!==n.steps[t].type)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t}}}return e},verifyStepValidity(e,t){const{stepDataMapping:n,conditionalFieldMapping:i}=e,o=n[t],s=!(Object.keys(o).map((e=>o[Number(e)])).filter((e=>{const o=i[t][e.machineName];return!o||ae(t,o,n)})).filter((e=>{if(e.isRequired){if("SECTION"===e.type)return!1;if(!e.value&&!e.objectValue)return!0;if("CHECKBOX"===e.type&&"0"===e.value)return!0}return!(!e.value||e.passesRegexTest)})).length>0);return{stepState:{...e.stepState,currentStep:{...e.stepState.currentStep,isValid:s}}}},getStepState:()=>e.getState().stepState,setGenericData:(e,t)=>({genericData:{...e.genericData,...t}}),setStepMapping(e,t,n){const i=e.integrationIdToEdit||n,o=t.find((e=>e.activity&&("TRIGGER"===e.activity.type||"QUERY"===e.activity.type||"ADAPTER"===e.activity.type)))||null;let s={},a={},l="";s=t.map((e=>e.template_fields.reduce(((t,n)=>"FIELD_LIST"===n.activity_field?.type?{...t,[`{steps.${e.machine_name}.field_list}`]:{...n,stepId:e.id}}:t),{}))).filter((e=>Object.keys(e).length>0)).reduce(((e,t)=>({...e,...t})),{});const r=t.reduce(((t,n)=>{let o=0,s=!1;return e.genericData.isReadOnly&&i&&n.step_authorization?o=n.step_authorization:n.hide_authorization||e.genericData.isPreviewMode||n.is_workspace_app_step&&"FORM"===n.activity.type?(s=!0,o=n.step_authorization?n.step_authorization:n.authorization_type.authorizations[0]?.id??null):e.stepMapping[n.id]?o=e.stepMapping[n.id].selectedAuthId:i&&n.step_authorization&&(s=!0,o=n.step_authorization),{...t,[n.id]:{step:n,integrationStepId:n.step_instance,authorizations:n.authorization_type.authorizations?.map((e=>({authorizationId:e.id,userIdentity:e.user_identity,authType:e.authorization_type,disableLink:e.disable_link,isErrored:!1,isVerifying:!1,isVerified:!1,accessToken:e?.access_token||null})))??[],isAuthVerified:s,isUserinfoRequired:n.authorization_type?.is_userinfo_required,selectedAuthId:o,invalidFields:{},isValid:!!i,isCompleted:!!i}}}),{}),d=e.stepState.steps.map((e=>({...e,invalidFields:{},isValid:!!r[e.stepId].selectedAuthId,isCompleted:!!r[e.stepId].selectedAuthId})));function p(e,t){return e.reduce(((e,n)=>{let o=null,s=null,r=[];const d=!!i,c="FIELD_MAPPING"===n.activity_field?.type,u="DYNAMIC"===n.activity_field?.type,_=!!t.is_visible,m=!!n.is_visible,h=n.app_user_data&&n.app_user_data.length>0&&n.app_user_data[0]||null;if(d&&!c&&h&&m)if(u)try{s=JSON.parse(`${h.value||"{}"}`),r=JSON.parse(`${h.changed_dynamic_fields||"[]"}`)}catch(e){console.error(e)}else o=h.value;else if(_&&m)if(c&&h&&h.value){const e=JSON.parse(`${h.value}`);l=`${t.id}`,a=Object.fromEntries(Object.entries(e).filter((t=>{let[n]=t;return"string"==typeof e[n]})));const n=Object.fromEntries(Object.entries(e).filter((t=>{let[n]=t;return"string"!=typeof e[n]})));s=n[Object.keys(n)[0]]}else o="";else o=n.default_value,h&&h.value&&(o=h.value);const g={...e,[n.id]:{fieldId:n.id,value:o,objectValue:s,machineName:n.activity_field?.machine_name,isRequired:n.activity_field?.is_required||n.is_required,isVisible:n.is_visible,isDynamic:"DYNAMIC"===n.activity_field?.type||"FIELD_MAPPING"===n.activity_field?.type,integrationFieldId:n.app_user_data&&n.app_user_data.length>0?n.app_user_data[0].id:null,isAddedInMapping:!!n.added_in_mapping,type:n.activity_field?.type||n.type,regex:n.activity_field?.regex,regexErrorMessage:n.activity_field?.regex_error_message,passesRegexTest:!0,isChanged:!!h&&h.is_changed,changedDynamicFields:r}};return"SECTION"===n?.type&&n?.template_fields?{...g,...p(n.template_fields,t)}:g}),{})}const c=t.reduce(((t,n)=>({...t,[n.id]:{...e.stepDataMapping[n.id],...p(n.template_fields,n)}})),{});return Object.keys(a).length>0&&l&&Object.keys(c).forEach((e=>{const t=c[Number(e)];Object.keys(t).forEach((e=>{const n=t[Number(e)];a[n.machineName]&&(n.value=a[n.machineName])}))})),{stepState:i?{...e.stepState,steps:d,currentStep:d[0],showValidation:!i,allStepsCompleted:!!i}:e.stepState,stepMapping:{...e.stepMapping,...r},stepDataMapping:{...e.stepDataMapping,...c},fieldListMapping:s,genericData:{...e.genericData,stepWithActivityOutput:o}}},setActivityOutputData:(e,t)=>({...e,activityOutputData:t.activityOutputData}),setAppsAuthData:(e,t)=>({...e,appsAuthData:t.appsAuthData}),setDynamicFieldData:(e,t)=>({...e,dynamicFieldData:Object.keys(t.dynamicFieldData).reduce(((e,n)=>({...e,[`{${n}}`]:t.dynamicFieldData[n]})),{})}),setIncomingWebhookPayload:(e,t)=>({...e,incomingWebhookPayload:t.incomingWebhookPayload}),setParentChildMapping(e,t){const n=t.reduce(((t,n)=>({...t,[n.id]:{...e.parentChildMapping[n.id],...n.template_fields.reduce(((e,t)=>t.activity_field?{...e,[t.activity_field?.machine_name]:{fieldId:t.id,childFields:t.activity_field?.child_fields?JSON.parse(t.activity_field?.child_fields??"[]"):null,parentFields:t.activity_field?.parent_fields?JSON.parse(t.activity_field?.parent_fields??"[]"):null}}:e),{})}})),{});return{parentChildMapping:{...e.parentChildMapping,...n}}},setConditionalFieldMapping(e,t){const n=t.reduce(((t,n)=>({...t,[n.id]:{...e.conditionalFieldMapping[n.id],...n.template_fields.reduce(((e,t)=>{if(t.activity_field&&t.activity_field.conditional_fields){const n=t.activity_field?.machine_name,i=t.id,o=se(t?.activity_field?.conditional_fields)||[];return{...e,...o.reduce(((t,o)=>{const{value:s}=o,a=se(o.field_array)||[];return{...t,...a.reduce(((o,a)=>({...o,[a]:[...e[a]||[],...t[a]||[],{value:s,parentMachineName:n,parentFieldId:i}]})),{})}}),{})}}return e}),{})}})),{});return{conditionalFieldMapping:{...e.conditionalFieldMapping,...n}}},addAuthorization(e,t){const{stepId:n,authData:i}=t;return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations,i]}}}},addAppAuthorization(e,t){const{appId:n,authData:i}=t;return{authMapping:{...e.authMapping,[n]:{...e.authMapping[n],authorizations:[...e.authMapping[n]?.authorizations,i]}}}},setSelectedAuthByAppId(e,t){const{appId:n,authId:i}=t;return{selectedAuthByAppId:{...e.selectedAuthByAppId,[n]:i}}},removeAuthorization(e,t){const{stepId:n,authId:i}=t,o=e.stepMapping[n].authorizations.filter((e=>e.authorizationId!==i)),s=e.stepState.currentStep;return{stepState:{...e.stepState,currentStep:{...s,isValid:o.length>0&&s.isValid,isCompleted:o.length>0&&s.isCompleted}},stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:o}}}},toggleVerifyAuthorizationFlag(e,t){const{stepId:n,authId:i,isVerifying:o}=t,s=e.stepMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));return s>-1?{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,s),{...e.stepMapping[n].authorizations[s],isVerifying:o},...e.stepMapping[n].authorizations.slice(s+1)]}}}:e},toggleVerifyAppAuthorizationFlag(e,t){const{appId:n,authId:i,isVerifying:o}=t,s=e.authMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));return s>-1?{stepMapping:{...e.stepMapping,[n]:{...e.authMapping[n],authorizations:[...e.authMapping[n].authorizations.slice(0,s),{...e.authMapping[n].authorizations[s],isVerifying:o},...e.authMapping[n].authorizations.slice(s+1)]}}}:e},toggleDeleteAuthorizationFlag(e,t){const{stepId:n,authId:i,isDeleting:o,error:s}=t,a=e.stepMapping[n].authorizations.findIndex((e=>e.authorizationId===i));return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,a),{...e.stepMapping[n].authorizations[a],isDeleting:o,error:s},...e.stepMapping[n].authorizations.slice(a+1)]}}}},toggleDeleteAppAuthorizationFlag(e,t){const{stepId:n,authId:i,isDeleting:o,error:s}=t,a=e.stepMapping[n].authorizations.findIndex((e=>e.authorizationId===i));return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,a),{...e.stepMapping[n].authorizations[a],isDeleting:o,error:s},...e.stepMapping[n].authorizations.slice(a+1)]}}}},setStepAuthId(e,t){const{stepId:n,authId:i}=t;return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],selectedAuthId:i}}}},setStepAuthorization(t,n,i,o,s,a){const l=t.stepState.steps[t.stepState.stepIndex],r=t.stepMapping[n],d=e.getState().stepState;if(l&&"CONFIRMATION"!==l.type&&"CONFIRMATION"!==d.currentStep?.type&&d.currentStep?.stepId===n){const{invalidFields:e}=l;o&&delete e[n];const d={...t.stepState.steps[t.stepState.stepIndex],invalidFields:e,isValid:Object.keys(e).length<1&&o,isCompleted:null!==r.selectedAuthId||o},p=t.stepMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));if(!(p>-1||p>-1))return{stepMapping:{...t.stepMapping,[n]:{...t.stepMapping[n],selectedAuthId:null}},stepDataMapping:a?t.stepDataMapping:{...t.stepDataMapping,[n]:{...t.stepDataMapping[n],...s.reduce(((e,i)=>({...e,[i]:{...t.stepDataMapping[n][i],value:""}})),{})}}};let c={};return Object.keys(t.stepMapping).forEach((e=>{const s=t.stepMapping[e],a=t.stepMapping[n];let l=s.authorizations;s.step.authorization_type.app.id===t.stepMapping[n].step.authorization_type.app.id&&n!==Number(e)&&(l=0===l.length?t.stepMapping[n].authorizations:[...s.authorizations.slice(0,p),{...t.stepMapping[n].authorizations[p],isVerified:o,isVerifying:!1,didFetchStatus:!0,error:""},...s.authorizations.slice(p+1)]),c={...c,[e]:{...s,selectedAuthId:o&&n===Number(e)||s.step.authorization_type.id===a.step.authorization_type.id?i:s.selectedAuthId,isAuthVerified:o,authorizations:Number(e)===n?[...s.authorizations.slice(0,p),{...s.authorizations[p],isVerified:o,isVerifying:!1,didFetchStatus:!0,error:""},...s.authorizations.slice(p+1)]:l}}})),{stepState:{...t.stepState,steps:[...t.stepState.steps.slice(0,t.stepState.stepIndex),d,...t.stepState.steps.slice(t.stepState.stepIndex+1)],currentStep:d,showValidation:!o&&!r.selectedAuthId},stepMapping:c,stepDataMapping:a?t.stepDataMapping:{...t.stepDataMapping,[n]:{...t.stepDataMapping[n],...s.reduce(((e,i)=>({...e,[i]:{...t.stepDataMapping[n][i],value:""}})),{})}}}}return t},resetCustomMappingData(e,t){const n=e.stepMapping[t].step.template_fields.filter((e=>"DYNAMIC"===e.activity_field?.type))[0]?.id;if(n){const i=e.stepDataMapping[t][n];return i&&(i.objectValue={}),{stepDataMapping:{...e.stepDataMapping,[t]:{...e.stepDataMapping[t],[n]:i}}}}return e},setStepFieldData(e,t){const{stepId:n,fieldId:i,value:o,passesRegexTest:s=!0}=t;return"CONFIRMATION"!==e.stepState.steps[e.stepState.stepIndex].type?{stepState:{...e.stepState,allStepsCompleted:!1},stepDataMapping:{...e.stepDataMapping,[n]:{...e.stepDataMapping[n],[i]:{...e.stepDataMapping[n][i],value:o,passesRegexTest:s}}}}:e},clearChildFields(e,t){const{stepId:n,fieldId:i}=t,o=e.stepState.steps[e.stepState.stepIndex];if(o&&"CONFIRMATION"!==o.type){const t=e.parentChildMapping[n];if(!t)return e;const o=Object.keys(t).find((e=>t[e].fieldId===i));if(!o)return e;const{childFields:s}=t[o];if(!s)return e;const a=e.stepDataMapping[n],l=Object.keys(a).reduce(((e,t)=>{const n=a[Number(t)];return s.includes(n.machineName)?{...e,[t]:{...n,value:""}}:{...e,[t]:n}}),{});return{...e,stepDataMapping:{...e.stepDataMapping,[n]:l}}}return e},setStepMappingData(e,t){const n=e.stepDataMapping[t.stepId][t.fieldId]?.objectValue;let i;return t.value?i={...e.stepDataMapping[t.stepId][t.fieldId]?.objectValue??{},[t.id]:t.value}:n&&(delete n[t.id],i=n,0===Object.keys(i).length&&(i=null)),i?{stepDataMapping:{...e.stepDataMapping,[t.stepId]:{...e.stepDataMapping[t.stepId],[t.fieldId]:{...e.stepDataMapping[t.stepId][t.fieldId],objectValue:i}}}}:e},resetTemplateFields:e=>({...e,stepMapping:oe.stepMapping,stepDataMapping:oe.stepDataMapping,stepState:oe.stepState,showSetupModal:oe.showSetupModal,showSetupInline:oe.showSetupInline,parentChildMapping:oe.parentChildMapping,integrationIdToEdit:oe.integrationIdToEdit,genericData:{...e.genericData,brandingApp:oe.genericData.brandingApp,templateId:oe.genericData.templateId}}),reset:()=>oe}),de=()=>function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__||window.top.__REDUX_DEVTOOLS_EXTENSION__,n=!1;return t?(e.devtools||(e.devtools=t.connect(),e.devtools.subscribe((function(t){"DISPATCH"===t.type&&t.state&&(n="JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type,e.setState(JSON.parse(t.state),!0))})),e.devtools.init(e.getState()),e.subscribe((function(t,i){var o=i&&i.name||"setState";n?n=!1:e.devtools.send(o,t)}))),e):(console.warn("Please install/enable Redux devtools extension"),e.devtools=null,e)}(function(e){var t=[];function n(e){for(var n=[],i=0;i<t.length;i++)t[i]===e?e=null:n.push(t[i]);t=n}function i(n,i,o){e=i?n:ie(ie({},e),n);for(var s=t,a=0;a<s.length;a++)s[a](e,o)}return e=e||{},{action:function(t){function n(e){i(e,!1,t)}return function(){for(var i=arguments,o=[e],s=0;s<arguments.length;s++)o.push(i[s]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:i,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}(oe));var pe=()=>![typeof window,typeof document].includes("undefined");const ce=e=>{if(!pe)return null;return new URLSearchParams(window.location.search).get(e)};function ue(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var _e={modal:"styles-module_modal__3ImBF",open:"styles-module_open__AAUJ5",modalContainer:"styles-module_modalContainer__o6TKt",inset:"styles-module_inset__-NimT",span:"styles-module_span__3nIVQ",contentWrap:"styles-module_contentWrap__2QGtd",content:"styles-module_content__3wdFn",close:"styles-module_close__2IqHP",closeCompact:"styles-module_closeCompact__25d-N",contentWrapCompact:"styles-module_contentWrapCompact__3QxL4",contentCompact:"styles-module_contentCompact__3sr68","marketplace-modal":"styles-module_marketplace-modal__2pr5w","request-app-modal":"styles-module_request-app-modal__1GIsL","success-pop-up":"styles-module_success-pop-up__1SWdg","confirmation-pop-up":"styles-module_confirmation-pop-up__eV-sh","media-gallery-modal":"styles-module_media-gallery-modal__1RZ25",appModal:"styles-module_appModal__1f5fh",flowAppsModal:"styles-module_flowAppsModal__2U8Z6",authConfirmation:"styles-module_authConfirmation__33OEu",marketplaceAppDisconnectConfirmation:"styles-module_marketplaceAppDisconnectConfirmation__3HNrX"};ue('.styles-module_modal__3ImBF {\n font-family: "Inter";\n display: none;\n z-index: 99;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow-y: auto;\n}\n.styles-module_modal__3ImBF.styles-module_open__AAUJ5 {\n position: fixed;\n display: block;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: flex;\n min-height: 100vh;\n align-items: flex-start;\n justify-content: center;\n text-align: center;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: block;\n padding: 0;\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_inset__-NimT {\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n opacity: 0.3;\n background-color: #000000;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: none;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: inline-block;\n height: 100vh;\n vertical-align: middle;\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n display: none;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n overflow-x: hidden;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd.styles-module_open__AAUJ5 {\n display: inline-block;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 100%;\n max-width: 730px;\n margin-top: 2rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #ededed;\n border: 1px solid #e7e7e7;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_content__3wdFn {\n position: relative;\n background: white;\n border-radius: 4px;\n height: calc(100% - 80px);\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_closeCompact__25d-N {\n position: absolute;\n cursor: pointer;\n top: 24px;\n right: 24px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 {\n display: none;\n min-height: 557px;\n max-height: 620px;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n overflow-x: hidden;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4.styles-module_open__AAUJ5 {\n display: inline-block;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 {\n width: 100%;\n max-width: 730px;\n margin-top: 2rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-thumb {\n background: #ededed;\n border: 1px solid #e7e7e7;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_contentCompact__3sr68 {\n position: relative;\n background: white;\n padding-bottom: 0px;\n border-radius: 4px;\n height: inherit;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_closeCompact__25d-N {\n position: absolute;\n cursor: pointer;\n top: 24px;\n right: 24px;\n}\n.styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 28px;\n right: 32px;\n z-index: 99;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n min-width: 420px;\n width: min-content;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n height: calc(100vh - 100px);\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 480px;\n max-width: 480px;\n }\n}\n@media (min-width: 857px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 800px;\n max-width: 800px;\n }\n}\n@media (min-width: 1237px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 1180px;\n max-width: 1180px;\n }\n}\n@media (min-height: 1152px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n max-height: 1000px;\n height: 1000px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 40px;\n z-index: 99;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 452px;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 587px;\n max-width: 587px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 0px;\n display: none;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n }\n}\n@media (min-width: 600px) {\n .styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 550px;\n max-width: 550px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 0px;\n display: none;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n max-width: 462px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n height: auto;\n max-height: 300px;\n }\n}\n@media (min-width: 600px) {\n .styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 462px;\n max-width: 462px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n max-height: calc(100vh - 200px);\n}\n.styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 6px;\n right: 6px;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 320px;\n max-width: 320px;\n }\n}\n@media (min-width: 857px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 550px;\n max-width: 550px;\n }\n}\n@media (min-width: 1237px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 800px;\n max-width: 800px;\n }\n}\n@media (min-height: 1152px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n max-height: 800px;\n height: 800px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_appModal__1f5fh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 25px;\n right: 27px;\n z-index: 99;\n width: 12px;\n height: 12px;\n}\n.styles-module_modal__3ImBF.styles-module_appModal__1f5fh .styles-module_modalContainer__o6TKt .styles-module_content__3wdFn {\n padding-bottom: 10px !important;\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n overflow: hidden;\n min-width: 605px;\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 18px;\n z-index: 99;\n width: 12px;\n height: 12px;\n right: 27px;\n}\n@media (max-width: 768px) {\n .styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n min-width: 312px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_content__3wdFn {\n padding-bottom: 10px !important;\n}\n\n.styles-module_authConfirmation__33OEu div {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu p {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu span {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu .styles-module_content__3wdFn {\n padding-bottom: 0 !important;\n}\n.styles-module_authConfirmation__33OEu .styles-module_contentWrap__2QGtd {\n max-width: 485px !important;\n}\n\n.styles-module_marketplaceAppDisconnectConfirmation__3HNrX .styles-module_contentWrap__2QGtd {\n min-width: 480px !important;\n max-width: 485px !important;\n}');class me extends g{render(){const{isOpen:e,CustomCloseElement:t,className:n,isCompact:i=!1}=this.props;return R`
|
|
17
|
+
var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function c(e){var t=e.parentNode;t&&t.removeChild(e)}function u(e,t,n){var i,o=arguments,s={};for(i in t)"key"!==i&&"ref"!==i&&(s[i]=t[i]);if(arguments.length>3)for(n=[n],i=3;i<arguments.length;i++)n.push(o[i]);if(null!=n&&(s.children=n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return _(e,s,t&&t.key,t&&t.ref)}function _(t,n,i,o){var s={type:t,props:n,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return e.vnode&&e.vnode(s),s}function m(){return{}}function h(e){return e.children}function g(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?y(e):null}function f(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return f(e)}}function v(t){(!t.__d&&(t.__d=!0)&&1===n.push(t)||o!==e.debounceRendering)&&((o=e.debounceRendering)||i)(x)}function x(){var e,t,i,o,s,a,l;for(n.sort((function(e,t){return t.__v.__b-e.__v.__b}));e=n.pop();)e.__d&&(i=void 0,o=void 0,a=(s=(t=e).__v).__e,(l=t.__P)&&(i=[],o=S(l,s,p({},s),t.__n,void 0!==l.ownerSVGElement,null,i,null==a?y(s):a),k(i,s),o!=a&&f(s)))}function w(e,t,n,i,o,s,a,d,p){var u,_,m,h,g,f,v,x=n&&n.__k||r,w=x.length;if(d==l&&(d=null!=s?s[0]:w?y(n,0):null),u=0,t.__k=b(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(m=x[u])||m&&n.key==m.key&&n.type===m.type)x[u]=void 0;else for(_=0;_<w;_++){if((m=x[_])&&n.key==m.key&&n.type===m.type){x[_]=void 0;break}m=null}if(h=S(e,n,m=m||l,i,o,s,a,d,p),(_=n.ref)&&m.ref!=_&&(v||(v=[]),m.ref&&v.push(m.ref,null,n),v.push(_,n.__c||h,n)),null!=h){if(null==f&&(f=h),null!=n.__d)h=n.__d,n.__d=null;else if(s==m||h!=d||null==h.parentNode){e:if(null==d||d.parentNode!==e)e.appendChild(h);else{for(g=d,_=0;(g=g.nextSibling)&&_<w;_+=2)if(g==h)break e;e.insertBefore(h,d)}"option"==t.type&&(e.value="")}d=h.nextSibling,"function"==typeof t.type&&(t.__d=h)}}return u++,n})),t.__e=f,null!=s&&"function"!=typeof t.type)for(u=s.length;u--;)null!=s[u]&&c(s[u]);for(u=w;u--;)null!=x[u]&&A(x[u],x[u]);if(v)for(u=0;u<v.length;u++)M(v[u],v[++u],v[++u])}function b(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var i=0;i<e.length;i++)b(e[i],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?_(null,e,null,null):null!=e.__e||null!=e.__c?_(e.type,e.props,e.key,null):e):e);return n}function $(e,t,n,i,o){var s;for(s in n)s in t||I(e,s,null,n[s],i);for(s in t)o&&"function"!=typeof t[s]||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],i)}function C(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===d.test(t)?n+"px":null==n?"":n}function I(e,t,n,i,o){var s,a,l,r,d;if(o?"className"===t&&(t="class"):"class"===t&&(t="className"),"key"===t||"children"===t);else if("style"===t)if(s=e.style,"string"==typeof n)s.cssText=n;else{if("string"==typeof i&&(s.cssText="",i=null),i)for(a in i)n&&a in n||C(s,a,"");if(n)for(l in n)i&&n[l]===i[l]||C(s,l,n[l])}else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),d=t.toLowerCase(),t=(d in e?d:t).slice(2),n?(i||e.addEventListener(t,L,r),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,L,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&!o&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n?e.removeAttribute(t):e.setAttribute(t,n))}function L(t){this.l[t.type](e.event?e.event(t):t)}function S(t,n,i,o,s,a,d,c,u){var _,m,y,f,v,x,C,I,L,S,k=n.type;if(void 0!==n.constructor)return null;(_=e.__b)&&_(n);try{e:if("function"==typeof k){if(I=n.props,L=(_=k.contextType)&&o[_.__c],S=_?L?L.props.value:_.__:o,i.__c?C=(m=n.__c=i.__c).__=m.__E:("prototype"in k&&k.prototype.render?n.__c=m=new k(I,S):(n.__c=m=new g(I,S),m.constructor=k,m.render=D),L&&L.sub(m),m.props=I,m.state||(m.state={}),m.context=S,m.__n=o,y=m.__d=!0,m.__h=[]),null==m.__s&&(m.__s=m.state),null!=k.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=p({},m.__s)),p(m.__s,k.getDerivedStateFromProps(I,m.__s))),f=m.props,v=m.state,y)null==k.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(null==k.getDerivedStateFromProps&&I!==f&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(I,S),!m.__e&&null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(I,m.__s,S)){for(m.props=I,m.state=m.__s,m.__d=!1,m.__v=n,n.__e=i.__e,n.__k=i.__k,m.__h.length&&d.push(m),_=0;_<n.__k.length;_++)n.__k[_]&&(n.__k[_].__=n);break e}null!=m.componentWillUpdate&&m.componentWillUpdate(I,m.__s,S),null!=m.componentDidUpdate&&m.__h.push((function(){m.componentDidUpdate(f,v,x)}))}m.context=S,m.props=I,m.state=m.__s,(_=e.__r)&&_(n),m.__d=!1,m.__v=n,m.__P=t,_=m.render(m.props,m.state,m.context),n.__k=b(null!=_&&_.type==h&&null==_.key?_.props.children:_),null!=m.getChildContext&&(o=p(p({},o),m.getChildContext())),y||null==m.getSnapshotBeforeUpdate||(x=m.getSnapshotBeforeUpdate(f,v)),w(t,n,i,o,s,a,d,c,u),m.base=n.__e,m.__h.length&&d.push(m),C&&(m.__E=m.__=null),m.__e=null}else n.__e=function(e,t,n,i,o,s,a,d){var p,c,u,_,m,h=n.props,g=t.props;if(o="svg"===t.type||o,null==e&&null!=s)for(p=0;p<s.length;p++)if(null!=(c=s[p])&&(null===t.type?3===c.nodeType:c.localName===t.type)){e=c,s[p]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),s=null}if(null===t.type)null!=s&&(s[s.indexOf(e)]=null),h===g||d||e.data==g||(e.data=g);else if(t!==n){if(null!=s&&(s=r.slice.call(e.childNodes)),u=(h=n.props||l).dangerouslySetInnerHTML,_=g.dangerouslySetInnerHTML,!d){if(h===l)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(_||u)&&(_&&u&&_.__html==u.__html||(e.innerHTML=_&&_.__html||""))}$(e,g,h,o,d),t.__k=t.props.children,_||w(e,t,n,i,"foreignObject"!==t.type&&o,s,a,l,d),d||("value"in g&&void 0!==g.value&&g.value!==e.value&&(e.value=null==g.value?"":g.value),"checked"in g&&void 0!==g.checked&&g.checked!==e.checked&&(e.checked=g.checked))}return e}(i.__e,n,i,o,s,a,d,u);(_=e.diffed)&&_(n)}catch(t){e.__e(t,n,i)}return n.__e}function k(t,n){e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(e){e.call(n)}))}catch(t){e.__e(t,n.__v)}}))}function M(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(t){e.__e(t,i)}}function A(t,n,i){var o,s,a;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||M(o,null,n)),i||"function"==typeof t.type||(i=null!=(s=t.__e)),t.__e=t.__d=null,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){e.__e(t,n)}o.base=o.__P=null}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&A(o[a],n,i);null!=s&&c(s)}function D(e,t,n){return this.constructor(e,n)}function T(t,n,i){var o,a,d;e.__&&e.__(t,n),a=(o=i===s)?null:i&&i.__k||n.__k,t=u(h,null,[t]),d=[],S(n,(o?n:i||n).__k=t,a||l,l,void 0!==n.ownerSVGElement,i&&!o?[i]:a?null:r.slice.call(n.childNodes),d,i||l,o),k(d,t)}function F(e){var t={},n={__c:"__cC"+a++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,o=this;return this.getChildContext||(i=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(t){e.value!==t.value&&i.some((function(e){e.context=t.value,v(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n}e={__e:function(e,t){for(var n,i;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(i=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(i=!0,n.componentDidCatch(e)),i)return v(n.__E=n)}catch(t){e=t}throw e}},t=function(e){return null!=e&&void 0===e.constructor},g.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&p(n,e),null!=e&&this.__v&&(this.__e=!1,t&&this.__h.push(t),v(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},g.prototype.render=h,n=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=l,a=0;var E=Object.freeze({__proto__:null,render:T,hydrate:function(e,t){T(e,t,s)},createElement:u,h:u,Fragment:h,createRef:m,get isValidElement(){return t},Component:g,cloneElement:function(e,t){return t=p(p({},e.props),t),arguments.length>2&&(t.children=r.slice.call(arguments,2)),_(e.type,t,t.key||e.key,t.ref||e.ref)},createContext:F,toChildArray:b,_unmount:A,get options(){return e}}),O=function(e,t,n,i){var o;t[0]=0;for(var s=1;s<t.length;s++){var a=t[s++],l=t[s]?(t[0]|=a?1:2,n[t[s++]]):t[++s];3===a?i[0]=l:4===a?i[1]=Object.assign(i[1]||{},l):5===a?(i[1]=i[1]||{})[t[++s]]=l:6===a?i[1][t[++s]]+=l+"":a?(o=e.apply(l,O(e,l,n,["",null])),i.push(o),l[0]?t[0]|=2:(t[s-2]=0,t[s]=o)):i.push(l)}return i},N=new Map;var R=function(e){var t=N.get(this);return t||(t=new Map,N.set(this,t)),(t=O(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,o="",s="",a=[0],l=function(e){1===i&&(e||(o=o.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(0,e,o):3===i&&(e||o)?(a.push(3,e,o),i=2):2===i&&"..."===o&&e?a.push(4,e,0):2===i&&o&&!e?a.push(5,0,!0,o):i>=5&&((o||!e&&5===i)&&(a.push(i,0,o,n),i=6),e&&(a.push(i,e,0,n),i=6)),o=""},r=0;r<e.length;r++){r&&(1===i&&l(),l(r));for(var d=0;d<e[r].length;d++)t=e[r][d],1===i?"<"===t?(l(),a=[a],i=3):o+=t:4===i?"--"===o&&">"===t?(i=1,o=""):o=t+o[0]:s?t===s?s="":o+=t:'"'===t||"'"===t?s=t:">"===t?(l(),i=1):i&&("="===t?(i=5,n=o,o=""):"/"===t&&(i<5||">"===e[r][d+1])?(l(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),i=2):o+=t),3===i&&"!--"===o&&(i=4,a=a[0])}return l(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(u),W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}function H(e){var t={exports:{}};return e(t,t.exports),t.exports}var P=z(E),B=H((function(e,t){var n=P;function i(e,t){for(var n in t)e[n]=t[n];return e}function o(e){this.getChildContext=function(){return{store:e.store}}}o.prototype.render=function(e){return e.children&&e.children[0]||e.children},t.connect=function(e,t){var o;return"function"!=typeof e&&("string"==typeof(o=e||{})&&(o=o.split(/\s*,\s*/)),e=function(e){for(var t={},n=0;n<o.length;n++)t[o[n]]=e[o[n]];return t}),function(o){function s(s,a){var l=this,r=a.store,d=e(r?r.getState():{},s),p=t?function(e,t){"function"==typeof e&&(e=e(t));var n={};for(var i in e)n[i]=t.action(e[i]);return n}(t,r):{store:r},c=function(){var t=e(r?r.getState():{},s);for(var n in t)if(t[n]!==d[n])return d=t,l.setState({});for(var i in d)if(!(i in t))return d=t,l.setState({})};this.componentWillReceiveProps=function(e){s=e,c()},this.componentDidMount=function(){r.subscribe(c)},this.componentWillUnmount=function(){r.unsubscribe(c)},this.render=function(e){return n.h(o,i(i(i({},p),e),d))}}return(s.prototype=new n.Component).constructor=s}},t.Provider=o}));function V(e,t){return t=t||{},new Promise((function(n,i){var o=new XMLHttpRequest,s=[],a=[],l={},r=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:r,headers:{keys:function(){return s},entries:function(){return a},get:function(e){return l[e.toLowerCase()]},has:function(e){return e.toLowerCase()in l}}}};for(var d in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){s.push(t=t.toLowerCase()),a.push([t,n]),l[t]=l[t]?l[t]+","+n:n})),n(r())},o.onerror=i,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(d,t.headers[d]);o.send(t.body||null)}))}class U extends Error{statusCode;response;constructor(e,t){super(e),this.name=this.constructor.name,this.statusCode=t?.status,this.response=t}}const Z=async e=>{if(e.ok)try{return{data:await e.json(),status:e.status}}catch(t){return{data:null,status:e.status}}else if(405===e.status)return{data:await e.json(),status:e.status};const t=new U(e.statusText,e);return Promise.reject(t)};class j{config;constructor(e){this.config=e}static addUrlSearchParams=(e,t)=>Object.keys(t).map((n=>void 0!==t[n]&&null!==t[n]&&e.searchParams.append(n,`${t[n]}`)));getTemplate=async(e,t,n)=>{const i=new URL(`${this.config.baseUrlv2}/template/${e}/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,self_api_key:this.config.apiKey||null,self_auth_id:this.config.authId||t||null,self_auth_extras:this.config.extras?JSON.stringify(this.config.extras):null,app_auth_id:n||null});try{return(await V(i.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAuthUrl=e=>{const t=new URL(`${this.config.baseUrl}/auth/login/${e}/`);return j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t.toString()};getAuthUrlByApp=e=>{const t=new URL(`${this.config.baseUrl}/auth/app/login/${e}/`);return j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t.toString()};getAppById=async e=>{const t=new URL(`${this.config.baseUrl}/api/apps/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,sdk_request:!0});try{return(await V(t.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getTemplateStep=async(e,t,n,i,o)=>{const s=new URL(`${this.config.baseUrl}/template_step/${e}/`);j.addUrlSearchParams(s,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,self_api_key:this.config.apiKey||null,self_auth_id:this.config.authId||i||null,integration_id:t?`${t}`:null,version_id:n?`${n}`:null,self_auth_extras:this.config.extras?JSON.stringify(this.config.extras):null,app_auth_id:o||null,v:"4.0"});try{return(await V(s.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};verifyOAuth=async e=>{const t=new URL(`${this.config.baseUrl}/${this.config.oauthVerifyPath}`);j.addUrlSearchParams(t,{authorization_id:`${e}`,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return!!(await V(t.toString(),{method:"POST"}).then(Z)).data}catch(e){return console.error(e),null}};verifyOAuthWithError=async e=>{const t=new URL(`${this.config.baseUrl}/${this.config.oauthVerifyPath}?return_error=true`);j.addUrlSearchParams(t,{authorization_id:`${e}`,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};deleteAuth=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/connected-accounts/${e}?force=${t??!1}`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{const e=await V(n.toString(),{method:"DELETE"}).then((e=>Z(e)));return{status:e.status,data:e.data}}catch(e){return console.error(e),null}};callDynamicDataEndpoint=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",o=arguments.length>3?arguments[3]:void 0;j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});try{return(await V(t.toString(),{method:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getTemplateListing=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle/${e}/`);(t||[]).length>0?j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(",")}):j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getTemplateListingV2=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/api/v1/sdk/flows/?page_size=9999&show_draft=true${t?`&deployment_id=${t}`:""}`);(e||[]).length>0?j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(e||[]).join(",")}):j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString()).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveIntegration=async e=>{const t=new URL(`${this.config.baseUrlv2}/integration/`);j.addUrlSearchParams(t,{async:!1,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,activate:this.config?.defaultIntegrationStatus??!0});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppsForAuthConnection=async e=>{const t=new URL(`${this.config.baseUrl}/api/v1/sdk/flow-apps/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,page:`${e?.page??""}`,tags:e?.tags??"",page_size:9999});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};updateIntegration=async(e,t,n)=>{const i=new URL(`${this.config.baseUrlv2}/integration/${e}/`);j.addUrlSearchParams(i,{async:!1,app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,activate:t});try{return(await V(i.toString(),{method:"PUT",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};renameIntegration=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}/rename/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PUT",body:JSON.stringify({name:t}),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};deleteIntegration=async e=>{const t=new URL(`${this.config.baseUrl}/setup/template/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"DELETE"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};toggleIntegration=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}/${t?"enable":"disable"}/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PUT"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getIntegrationById=async(e,t)=>{const n=new URL(`${this.config.baseUrlv2}/integration/${e}`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,is_read_only:!!t});try{return(await V(n.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getCustomFields=async e=>{const t=new URL(`${this.config.baseUrl}/endpoints/get_custom_fields/${e.activityFieldId}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,step_name:e.stepName||"",authorization_id:`${e.authorizationId}`,...e.endpointData||{}});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};verifyAuthConfig=async e=>{const t=new URL(`${this.config.baseUrl}/verify-sdk-config/`);e.deploymentId?j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle_id:e.deploymentId||""}):j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceApps=async e=>{const t=new URL(`${this.config.baseUrl}/sdk/bundle_apps/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle:e.marketplaceId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceAppDetail=async e=>{const t=new URL(`${this.config.baseUrl}/sdk/bundle_apps/${e.marketplaceAppId}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,bundle:e.marketplaceId,app_auth_id:e.app_auth_id||null});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};sendRequestForNewApp=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle/${e}/app_requests/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceDetails=async e=>{const t=new URL(`${this.config.baseUrl}/bundle/${e.marketplaceId}`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};setDefaultAuthorization=async e=>{const t=new URL(`${this.config.baseUrl}/connected-accounts/${e.authorizationId}/set_as_default/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,authorization_type:`${e.authorizationTypeId}`});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveAppDescription=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle_apps/${e}/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getIUTestingAccounts=async()=>{const e=new URL(`${this.config.baseUrl}/connected-accounts/list_workspace_connected_accounts/`);j.addUrlSearchParams(e,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(e.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};uploadFile=async e=>{const t=new URL(`${this.config.baseUrl}/api/files/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST",body:e}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};saveAppMedia=async(e,t)=>{const n=new URL(`${this.config.baseUrl}/bundle_apps/${e}/save_media/`);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t.media),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppInfo=async e=>{const t=new URL(`${this.config.baseUrl}/api/v1/sdk/apps/${e}/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAppFlows=async(e,t,n)=>{const i=new URL(`${this.config.baseUrl}/api/v1/sdk/apps/${e}/flows/`);n?j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(","),show_draft:!0,authorization_id:n,page_size:9999}):j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:(t||[]).join(","),show_draft:!0,page_size:9999});try{return(await V(i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAdminAppFlows=async e=>{let{appId:t,bundleId:n}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/bundle/${n}/apps/${t}/templates/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};executeFlow=async(e,t)=>{const n=new URL(e);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(n.toString(),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getApps=async e=>{let{tags:t=[],nextURL:n=null}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/flow-apps/`);(t||[]).length,j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,tags:t.join(","),show_draft:!0}),null===n&&j.addUrlSearchParams(i,{page_size:100});try{return(await V(n||i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getMarketplaceAppsV2=async e=>{let{cursor:t=null,search:n=""}=e;const i=new URL(`${this.config.baseAPIUrl}/apps/list/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId,page_size:30}),""!==n&&null!==n&&j.addUrlSearchParams(i,{search:n});const o={};null!==t&&(o._cursor=t);try{return(await V(i.toString(),{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getAdminApps=async e=>{let{nextURL:t=null,bundleId:n=0}=e;const i=new URL(`${this.config.baseUrl}/api/v1/sdk/bundle/${n}/apps/`);j.addUrlSearchParams(i,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t||i.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};callDynamicDataEndpointWithTags=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});let o={query_string_data:i};"object"==typeof i&&(o={...i,query_string_data:i});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();callSourceFlowIntegrationInvocationUrl=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};j.addUrlSearchParams(t,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,...n});try{return(await V(t.toString(),{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getUserVariables=async()=>{const e=new URL(`${this.config.baseUrl}/api/v1/app-user-variables/`);j.addUrlSearchParams(e,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(e.toString(),{method:"GET"}).then(Z)).data}catch(e){return console.error(e),null}};getFunctionDetails=(()=>{var e=this;return async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new URL(`${e.config.baseAPIUrl}/functions/${t}/get/`);j.addUrlSearchParams(i,{app_key:e.config.appKey,hash:e.config.hash,user_id:e.config.userId,include:"meta"});try{return(await V(i.toString(),{method:"POST",body:JSON.stringify({_variables:n}),headers:{"Content-Type":"application/json"}}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}}})();getFunctionSignature=async e=>{const t=new URL(`${this.config.baseAPIUrl}/functions/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"GET"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getConnectedAccounts=async e=>{const t=new URL(`${this.config.baseUrl}/apps/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};getApp=async e=>{const t=new URL(`${this.config.baseUrl}/apps/${e}/get/`);j.addUrlSearchParams(t,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId});try{return(await V(t.toString(),{method:"POST"}).then((e=>Z(e)))).data}catch(e){return console.error(e),null}};invokeFunction=async(e,t)=>{const n=new URL(e.url);j.addUrlSearchParams(n,{app_key:this.config.appKey,hash:this.config.hash,user_id:this.config.userId}),t&&j.addUrlSearchParams(n,{connected_account_id:t});try{const t=await V(n.toString(),{method:e.method,headers:e.headers,body:JSON.stringify({...e.args,...e.vars&&{_variables:e.vars}})});return await t.json()}catch(e){return new Error("Error while invoking function")}};getAuthConfig=()=>{let e="";return e=`app_key=${this.config.appKey}&hash=${this.config.hash}&user_id=${encodeURIComponent(this.config.userId)}`,e}}class K extends class{emitter;handler;constructor(e,t){this.emitter=e,this.handler=t}getHandler(){return this.handler}}{run(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.handler.apply(null,n)}}class q extends K{total;i=0;constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(super(e,t),this.total=n,this.total<1)throw new Error("{total} can not be less than 1")}run(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];super.run(e,...n),++this.i>=this.total&&this.emitter.off(e,this.handler)}}class G{events=(()=>Object.create(null))();on(e,t){this.addEventListener(e,new K(this,t))}once(e,t){this.addEventListener(e,new q(this,t,1))}off(e,t){const n=this.events[e];n?.length&&(this.events[e]=n.filter((e=>e.getHandler()!==t)))}offAll(){Object.keys(this.events).forEach((e=>{const t=this.events[e];t&&(t.length=0)})),this.events=Object.create(null)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const o=this.events[e];o&&o.forEach((t=>t.run(e,...n)))}addEventListener(e,t){const n=this.events[e];Array.isArray(n)?n.push(t):this.events[e]=[t]}}var J,X,Y,Q,ee,te,ne=F(null);function ie(e,t){for(var n in t)e[n]=t[n];return e}!function(e){e.COMPACT="COMPACT",e.COMFORTABLE="COMFORTABLE"}(J||(J={})),function(e){e.NARROW="COMPACT",e.WIDE="COMFORTABLE"}(X||(X={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE",e.DETACHED="DETACHED",e.CUSTOM="CUSTOM"}(Y||(Y={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE"}(Q||(Q={})),function(e){e.MODAL="MODAL",e.INLINE="INLINE"}(ee||(ee={})),function(e){e.GRID="GRID",e.LIST="LIST"}(te||(te={}));const oe={stepState:{steps:[],currentStep:{type:"CONFIRMATION"},stepIndex:0,fieldsListData:null,showValidation:!1,allStepsCompleted:!1},genericData:{deploymentId:null,implicitAuthEnabled:!1,templateId:null,stepWithActivityOutput:null,isPreviewMode:!1,brandingApp:null,name:"",authModalId:"",showAppAuthModal:!1,isAnonymous:!1,marketplaceId:null,marketplaceDetail:null,IUAccountsData:null,app_id:null,currentIntegrationStatus:"",isTestIntegration:!1,deploymentIdFromConfig:null,customFlowSetupRender:!1},stepMapping:{},authMapping:{},stepDataMapping:{},parentChildMapping:{},conditionalFieldMapping:{},fieldListMapping:{},integrations:[],templates:[],showFlowsListModal:!1,showAppsListModal:!1,showAppPageModal:!1,showSetupModal:!1,showSetupInline:!1,fetchingIntegrations:!1,fetchingTemplates:!1,integrationIdToEdit:null,mappingInfo:null,activatedTab:"",showMarketplaceModal:!1,showRequestAppModal:!1,requestAppFormData:{},showMarketplaceAppPageId:null,selectedAuthByAppId:{}},se=e=>{try{return JSON.parse(e)}catch(e){return null}},ae=(e,t,n)=>{let i=!1;for(let o=0;o<t.length;o+=1){const{parentFieldId:s,value:a}=t[o],l=n[e]&&n[e][s];if(l&&l.value===a){i=!0;break}}return i},le=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{is_hidden:n,is_default_value_auto_mapped:i}=e,o=[];return t?(n&&o.push({label:"Hidden",type:"grey"}),i&&o.push({label:"AI mapped",type:"grey"}),o):[]},re=e=>({setStoreState:(e,t)=>({...e,...t}),setBaseData:(e,t)=>({...e,integrations:t.integrations.map((e=>({...e,loading:!1}))),templates:t.templates,fetchingIntegrations:!1,fetchingTemplates:!1}),setSteps(e,t){const n=[];let i=-1;const o=[];return t.forEach((e=>{const{authorization_type:t}=e,{app:s}=t;if(!e.hide_authorization&&!o.includes(s.id)){o.push(s.id);let t=e.activity.app.name,a=e.activity.app.icon_url;"MAKE_HTTP_CALL"===e.activity.type&&(t=e.authorization_type.app.name,a=e.authorization_type.app.icon_url),i+=1,n.push({stepId:e.id,title:`${t} Account`,iconUrl:a,isCompleted:!1,isCurrentlyOpen:!1,type:"AUTH",requiredFields:[e.id],invalidFields:{[e.id]:""},isValid:!1,itemIndex:i})}})),t.forEach((e=>{if(e.is_visible&&e.template_fields.length>0){const t=e.template_fields.filter((e=>e.is_visible)).length>0,o=e.template_fields.filter((e=>e.is_required&&e.is_visible)).map((e=>e.id)),s=e.template_fields.filter((e=>e.is_required&&!e.default_value&&e.is_visible)).reduce(((e,t)=>({...e,[t.id]:""})),{}),a=Object.keys(s).length<1;t&&(i+=1,n.push({stepId:e.id,title:e.title,description:e.description||"",iconUrl:e.activity.app.icon_url,isCompleted:!1,isCurrentlyOpen:!1,type:"CONFIGURATION",requiredFields:o,invalidFields:s,isValid:a,itemIndex:i}))}})),{...e,stepState:{steps:n,fieldsListData:null,currentStep:n[0],stepIndex:0,showValidation:!1,allStepsCompleted:!1}}},setIntegrationLoadingState(e,t){const{integrationId:n,isLoading:i,op:o,nextVal:s}=t,a=e.integrations.findIndex((e=>e.id===n));if("delete"===o)return{...e,integrations:e.integrations.filter((e=>e.id!==n))};if("edit"===o&&a>-1){const t={...e.integrations[a],loading:i};return null!=s&&(t.status=s?"ACTIVE":"INACTIVE"),{...e,integrations:[...e.integrations.slice(0,a),t,...e.integrations.slice(a+1)]}}if("edit-name"===o&&a>-1){const n={...e.integrations[a],name:`${t.updatedName}`,loading:i};return{...e,integrations:[...e.integrations.slice(0,a),n,...e.integrations.slice(a+1)]}}return{...e}},showStepValidationState(e){const{stepState:t}=e;return{stepState:{...t,showValidation:!0}}},hideStepValidationState(e){const{stepState:t}=e;return{stepState:{...t,showValidation:!1}}},gotoNextStep(e){const{stepState:t}=e;if(t){const n=Number(t.stepIndex)+1,i=t.steps[Number(t.stepIndex)+1],o={...t.steps[e.stepState.stepIndex],isCompleted:!0};return i?{stepState:{...t,steps:[...t.steps.slice(0,t.stepIndex),o,...t.steps.slice(t.stepIndex+1)],currentStep:{...i},stepIndex:n,showValidation:!1}}:{stepState:{...t,steps:[...t.steps.slice(0,t.stepIndex),o,...t.steps.slice(t.stepIndex+1)],currentStep:{type:"CONFIRMATION"},stepIndex:n,allStepsCompleted:!0,showValidation:!1}}}return e},gotoPreviousStep(e){if(e.stepState){const t=Number(e.stepState.stepIndex)-1,n=e.stepState.steps[Number(e.stepState.stepIndex)-1];let i=!n.isValid;return e.genericData.isReadOnly&&(i=!1),{stepState:{...e.stepState,currentStep:n,stepIndex:t,showValidation:i}}}return e},gotoStepInPreview:(e,t)=>{const{stepState:n}=e,{stepId:i,type:o}=t;if(i&&"CONFIRMATION"!==o){const t=n.steps.findIndex((e=>e.stepId===i&&e.type===o));if(t>-1)return{stepState:{...e.stepState,currentStep:n.steps[t],stepIndex:t,allStepsCompleted:!1}}}return i||"CONFIRMATION"!==o?e:{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}}},gotoStep:(e,t)=>{const{stepState:n}=e,{stepIndex:i}=n;if(n){const{currentStep:o}=n,s=n.steps[t];if(e.genericData.isPreviewMode)return t===n.steps.length?{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}}:{stepState:{...e.stepState,currentStep:{...s},stepIndex:t,allStepsCompleted:!1}};if(e.genericData.isReadOnly)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t}};if(n.allStepsCompleted&&t===n.steps.length&&"CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isValid)return{stepState:{...n,currentStep:{type:"CONFIRMATION"},stepIndex:n.steps.length,allStepsCompleted:!0}};if(o&&"CONFIRMATION"!==o.type&&o.isValid&&i===n.steps.length-1&&t===n.steps.length){const e={...n.steps[i],isCompleted:!0};return{stepState:{...n,steps:[...n.steps.slice(0,i),e,...n.steps.slice(i+1)],currentStep:{type:"CONFIRMATION"},stepIndex:t,allStepsCompleted:!0}}}if(s&&s.isCompleted||s&&"CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isCompleted&&"CONFIRMATION"===s.type)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t,showValidation:!s.isValid}};if("CONFIRMATION"!==n.currentStep?.type&&n.currentStep?.isValid&&t===i+1){const o={...n.steps[i],isCompleted:!0,isValid:!0};return{stepState:{...e.stepState,steps:[...n.steps.slice(0,i),o,...n.steps.slice(i+1)],currentStep:{...s},stepIndex:t}}}if(n.steps[t-1]&&n.steps[t-1].isCompleted&&"CONFIRMATION"!==n.steps[t].type)return{stepState:{...e.stepState,currentStep:{...s},stepIndex:t}}}return e},verifyStepValidity(e,t){const{stepDataMapping:n,conditionalFieldMapping:i}=e,o=n[t];let s=[];s=o?Object.keys(o).map((e=>o[Number(e)])):[];const a=!(s.filter((e=>{const o=i[t][e.machineName];return!o||ae(t,o,n)})).filter((e=>{if(e.isRequired){if("SECTION"===e.type)return!1;if(!e.value&&!e.objectValue)return!0;if("CHECKBOX"===e.type&&"0"===e.value)return!0}return!(!e.value||e.passesRegexTest)})).length>0);return{stepState:{...e.stepState,currentStep:{...e.stepState.currentStep,isValid:a}}}},getStepState:()=>e.getState().stepState,setGenericData:(e,t)=>({genericData:{...e.genericData,...t}}),setStepMapping(e,t,n){const i=e.integrationIdToEdit||n,o=t.find((e=>e.activity&&("TRIGGER"===e.activity.type||"QUERY"===e.activity.type||"ADAPTER"===e.activity.type)))||null;let s={},a={},l="";s=t.map((e=>e.template_fields.reduce(((t,n)=>"FIELD_LIST"===n.activity_field?.type?{...t,[`{steps.${e.machine_name}.field_list}`]:{...n,stepId:e.id}}:t),{}))).filter((e=>Object.keys(e).length>0)).reduce(((e,t)=>({...e,...t})),{});const r=t.reduce(((t,n)=>{let o=0,s=!1;return e.genericData.isReadOnly&&i&&n.step_authorization?o=n.step_authorization:n.hide_authorization||e.genericData.isPreviewMode||n.is_workspace_app_step&&"FORM"===n.activity.type?(s=!0,o=n.step_authorization?n.step_authorization:n.authorization_type.authorizations[0]?.id??null):e.stepMapping[n.id]?o=e.stepMapping[n.id].selectedAuthId:i&&n.step_authorization&&(s=!0,o=n.step_authorization),{...t,[n.id]:{step:n,integrationStepId:n.step_instance,authorizations:n.authorization_type.authorizations?.map((e=>({authorizationId:e.id,userIdentity:e.user_identity,authType:e.authorization_type,disableLink:e.disable_link,isErrored:!1,isVerifying:!1,isVerified:!1,accessToken:e?.access_token||null})))??[],isAuthVerified:s,isUserinfoRequired:n.authorization_type?.is_userinfo_required,selectedAuthId:o,invalidFields:{},isValid:!!i,isCompleted:!!i}}}),{}),d=e.stepState.steps.map((e=>({...e,invalidFields:{},isValid:!!r[e.stepId].selectedAuthId,isCompleted:!!r[e.stepId].selectedAuthId})));function p(e,t){return e.reduce(((e,n)=>{let o=null,s=null,r=[];const d=!!i,c="FIELD_MAPPING"===n.activity_field?.type,u="DYNAMIC"===n.activity_field?.type,_=!!t.is_visible,m=!!n.is_visible,h=n.app_user_data&&n.app_user_data.length>0&&n.app_user_data[0]||null;if(d&&!c&&h&&m)if(u)try{s=JSON.parse(`${h.value||"{}"}`),r=JSON.parse(`${h.changed_dynamic_fields||"[]"}`)}catch(e){console.error(e)}else o=h.value;else if(_&&m)if(c&&h&&h.value){const e=JSON.parse(`${h.value}`);l=`${t.id}`,a=Object.fromEntries(Object.entries(e).filter((t=>{let[n]=t;return"string"==typeof e[n]})));const n=Object.fromEntries(Object.entries(e).filter((t=>{let[n]=t;return"string"!=typeof e[n]})));s=n[Object.keys(n)[0]]}else o="";else o=n.default_value,h&&h.value&&(o=h.value);const g={...e,[n.id]:{fieldId:n.id,value:o,objectValue:s,machineName:n.activity_field?.machine_name,isRequired:n.activity_field?.is_required||n.is_required,isVisible:n.is_visible,isDynamic:"DYNAMIC"===n.activity_field?.type||"FIELD_MAPPING"===n.activity_field?.type,integrationFieldId:n.app_user_data&&n.app_user_data.length>0?n.app_user_data[0].id:null,isAddedInMapping:!!n.added_in_mapping,type:n.activity_field?.type||n.type,regex:n.activity_field?.regex,regexErrorMessage:n.activity_field?.regex_error_message,passesRegexTest:!0,isChanged:!!h&&h.is_changed,changedDynamicFields:r}};return"SECTION"===n?.type&&n?.template_fields?{...g,...p(n.template_fields,t)}:g}),{})}const c=t.reduce(((t,n)=>({...t,[n.id]:{...e.stepDataMapping[n.id],...p(n.template_fields,n)}})),{});return Object.keys(a).length>0&&l&&Object.keys(c).forEach((e=>{const t=c[Number(e)];Object.keys(t).forEach((e=>{const n=t[Number(e)];a[n.machineName]&&(n.value=a[n.machineName])}))})),{stepState:i?{...e.stepState,steps:d,currentStep:d[0],showValidation:!i,allStepsCompleted:!!i}:e.stepState,stepMapping:{...e.stepMapping,...r},stepDataMapping:{...e.stepDataMapping,...c},fieldListMapping:s,genericData:{...e.genericData,stepWithActivityOutput:o}}},setActivityOutputData:(e,t)=>({...e,activityOutputData:t.activityOutputData}),setAppsAuthData:(e,t)=>({...e,appsAuthData:t.appsAuthData}),setDynamicFieldData:(e,t)=>({...e,dynamicFieldData:Object.keys(t.dynamicFieldData).reduce(((e,n)=>({...e,[`{${n}}`]:t.dynamicFieldData[n]})),{})}),setIncomingWebhookPayload:(e,t)=>({...e,incomingWebhookPayload:t.incomingWebhookPayload}),setParentChildMapping(e,t){const n=t.reduce(((t,n)=>({...t,[n.id]:{...e.parentChildMapping[n.id],...n.template_fields.reduce(((e,t)=>t.activity_field?{...e,[t.activity_field?.machine_name]:{fieldId:t.id,childFields:t.activity_field?.child_fields?JSON.parse(t.activity_field?.child_fields??"[]"):null,parentFields:t.activity_field?.parent_fields?JSON.parse(t.activity_field?.parent_fields??"[]"):null}}:e),{})}})),{});return{parentChildMapping:{...e.parentChildMapping,...n}}},setConditionalFieldMapping(e,t){const n=t.reduce(((t,n)=>({...t,[n.id]:{...e.conditionalFieldMapping[n.id],...n.template_fields.reduce(((e,t)=>{if(t.activity_field&&t.activity_field.conditional_fields){const n=t.activity_field?.machine_name,i=t.id,o=se(t?.activity_field?.conditional_fields)||[];return{...e,...o.reduce(((t,o)=>{const{value:s}=o,a=se(o.field_array)||[];return{...t,...a.reduce(((o,a)=>({...o,[a]:[...e[a]||[],...t[a]||[],{value:s,parentMachineName:n,parentFieldId:i}]})),{})}}),{})}}return e}),{})}})),{});return{conditionalFieldMapping:{...e.conditionalFieldMapping,...n}}},addAuthorization(e,t){const{stepId:n,authData:i}=t;return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations,i]}}}},addAppAuthorization(e,t){const{appId:n,authData:i}=t;return{authMapping:{...e.authMapping,[n]:{...e.authMapping[n],authorizations:[...e.authMapping[n]?.authorizations,i]}}}},setSelectedAuthByAppId(e,t){const{appId:n,authId:i}=t;return{selectedAuthByAppId:{...e.selectedAuthByAppId,[n]:i}}},removeAuthorization(e,t){const{stepId:n,authId:i}=t,o=e.stepMapping[n].authorizations.filter((e=>e.authorizationId!==i)),s=e.stepState.currentStep;return{stepState:{...e.stepState,currentStep:{...s,isValid:o.length>0&&s.isValid,isCompleted:o.length>0&&s.isCompleted}},stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:o}}}},toggleVerifyAuthorizationFlag(e,t){const{stepId:n,authId:i,isVerifying:o}=t,s=e.stepMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));return s>-1?{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,s),{...e.stepMapping[n].authorizations[s],isVerifying:o},...e.stepMapping[n].authorizations.slice(s+1)]}}}:e},toggleVerifyAppAuthorizationFlag(e,t){const{appId:n,authId:i,isVerifying:o}=t,s=e.authMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));return s>-1?{stepMapping:{...e.stepMapping,[n]:{...e.authMapping[n],authorizations:[...e.authMapping[n].authorizations.slice(0,s),{...e.authMapping[n].authorizations[s],isVerifying:o},...e.authMapping[n].authorizations.slice(s+1)]}}}:e},toggleDeleteAuthorizationFlag(e,t){const{stepId:n,authId:i,isDeleting:o,error:s}=t,a=e.stepMapping[n].authorizations.findIndex((e=>e.authorizationId===i));return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,a),{...e.stepMapping[n].authorizations[a],isDeleting:o,error:s},...e.stepMapping[n].authorizations.slice(a+1)]}}}},toggleDeleteAppAuthorizationFlag(e,t){const{stepId:n,authId:i,isDeleting:o,error:s}=t,a=e.stepMapping[n].authorizations.findIndex((e=>e.authorizationId===i));return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],authorizations:[...e.stepMapping[n].authorizations.slice(0,a),{...e.stepMapping[n].authorizations[a],isDeleting:o,error:s},...e.stepMapping[n].authorizations.slice(a+1)]}}}},setStepAuthId(e,t){const{stepId:n,authId:i}=t;return{stepMapping:{...e.stepMapping,[n]:{...e.stepMapping[n],selectedAuthId:i}}}},setStepAuthorization(t,n,i,o,s,a){const l=t.stepState.steps[t.stepState.stepIndex],r=t.stepMapping[n],d=e.getState().stepState;if(l&&"CONFIRMATION"!==l.type&&"CONFIRMATION"!==d.currentStep?.type&&d.currentStep?.stepId===n){const{invalidFields:e}=l;o&&delete e[n];const d={...t.stepState.steps[t.stepState.stepIndex],invalidFields:e,isValid:Object.keys(e).length<1&&o,isCompleted:null!==r.selectedAuthId||o},p=t.stepMapping[n]?.authorizations.findIndex((e=>e.authorizationId===i));if(!(p>-1||p>-1))return{stepMapping:{...t.stepMapping,[n]:{...t.stepMapping[n],selectedAuthId:null}},stepDataMapping:a?t.stepDataMapping:{...t.stepDataMapping,[n]:{...t.stepDataMapping[n],...s.reduce(((e,i)=>({...e,[i]:{...t.stepDataMapping[n][i],value:""}})),{})}}};let c={};return Object.keys(t.stepMapping).forEach((e=>{const s=t.stepMapping[e],a=t.stepMapping[n];let l=s.authorizations;s.step.authorization_type.app.id===t.stepMapping[n].step.authorization_type.app.id&&n!==Number(e)&&(l=0===l.length?t.stepMapping[n].authorizations:[...s.authorizations.slice(0,p),{...t.stepMapping[n].authorizations[p],isVerified:o,isVerifying:!1,didFetchStatus:!0,error:""},...s.authorizations.slice(p+1)]),c={...c,[e]:{...s,selectedAuthId:o&&n===Number(e)||s.step.authorization_type.id===a.step.authorization_type.id?i:s.selectedAuthId,isAuthVerified:o,authorizations:Number(e)===n?[...s.authorizations.slice(0,p),{...s.authorizations[p],isVerified:o,isVerifying:!1,didFetchStatus:!0,error:""},...s.authorizations.slice(p+1)]:l}}})),{stepState:{...t.stepState,steps:[...t.stepState.steps.slice(0,t.stepState.stepIndex),d,...t.stepState.steps.slice(t.stepState.stepIndex+1)],currentStep:d,showValidation:!o&&!r.selectedAuthId},stepMapping:c,stepDataMapping:a?t.stepDataMapping:{...t.stepDataMapping,[n]:{...t.stepDataMapping[n],...s.reduce(((e,i)=>({...e,[i]:{...t.stepDataMapping[n][i],value:""}})),{})}}}}return t},resetCustomMappingData(e,t){const n=e.stepMapping[t].step.template_fields.filter((e=>"DYNAMIC"===e.activity_field?.type))[0]?.id;if(n){const i=e.stepDataMapping[t][n];return i&&(i.objectValue={}),{stepDataMapping:{...e.stepDataMapping,[t]:{...e.stepDataMapping[t],[n]:i}}}}return e},setStepFieldData(e,t){const{stepId:n,fieldId:i,value:o,passesRegexTest:s=!0}=t;return"CONFIRMATION"!==e.stepState.steps[e.stepState.stepIndex].type?{stepState:{...e.stepState,allStepsCompleted:!1},stepDataMapping:{...e.stepDataMapping,[n]:{...e.stepDataMapping[n],[i]:{...e.stepDataMapping[n][i],value:o,passesRegexTest:s}}}}:e},clearChildFields(e,t){const{stepId:n,fieldId:i}=t,o=e.stepState.steps[e.stepState.stepIndex];if(o&&"CONFIRMATION"!==o.type){const t=e.parentChildMapping[n];if(!t)return e;const o=Object.keys(t).find((e=>t[e].fieldId===i));if(!o)return e;const{childFields:s}=t[o];if(!s)return e;const a=e.stepDataMapping[n],l=Object.keys(a).reduce(((e,t)=>{const n=a[Number(t)];return s.includes(n.machineName)?{...e,[t]:{...n,value:""}}:{...e,[t]:n}}),{});return{...e,stepDataMapping:{...e.stepDataMapping,[n]:l}}}return e},setStepMappingData(e,t){const n=e.stepDataMapping[t.stepId][t.fieldId]?.objectValue;let i;return t.value?i={...e.stepDataMapping[t.stepId][t.fieldId]?.objectValue??{},[t.id]:t.value}:n&&(delete n[t.id],i=n,0===Object.keys(i).length&&(i=null)),i?{stepDataMapping:{...e.stepDataMapping,[t.stepId]:{...e.stepDataMapping[t.stepId],[t.fieldId]:{...e.stepDataMapping[t.stepId][t.fieldId],objectValue:i}}}}:e},resetTemplateFields:e=>({...e,stepMapping:oe.stepMapping,stepDataMapping:oe.stepDataMapping,stepState:oe.stepState,showSetupModal:oe.showSetupModal,showSetupInline:oe.showSetupInline,parentChildMapping:oe.parentChildMapping,integrationIdToEdit:oe.integrationIdToEdit,genericData:{...e.genericData,brandingApp:oe.genericData.brandingApp,templateId:oe.genericData.templateId}}),reset:()=>oe}),de=()=>function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION__||window.top.__REDUX_DEVTOOLS_EXTENSION__,n=!1;return t?(e.devtools||(e.devtools=t.connect(),e.devtools.subscribe((function(t){"DISPATCH"===t.type&&t.state&&(n="JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type,e.setState(JSON.parse(t.state),!0))})),e.devtools.init(e.getState()),e.subscribe((function(t,i){var o=i&&i.name||"setState";n?n=!1:e.devtools.send(o,t)}))),e):(console.warn("Please install/enable Redux devtools extension"),e.devtools=null,e)}(function(e){var t=[];function n(e){for(var n=[],i=0;i<t.length;i++)t[i]===e?e=null:n.push(t[i]);t=n}function i(n,i,o){e=i?n:ie(ie({},e),n);for(var s=t,a=0;a<s.length;a++)s[a](e,o)}return e=e||{},{action:function(t){function n(e){i(e,!1,t)}return function(){for(var i=arguments,o=[e],s=0;s<arguments.length;s++)o.push(i[s]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:i,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}(oe));var pe=()=>![typeof window,typeof document].includes("undefined");const ce=e=>{if(!pe)return null;return new URLSearchParams(window.location.search).get(e)};function ue(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var _e={modal:"styles-module_modal__3ImBF",open:"styles-module_open__AAUJ5",modalContainer:"styles-module_modalContainer__o6TKt",inset:"styles-module_inset__-NimT",span:"styles-module_span__3nIVQ",contentWrap:"styles-module_contentWrap__2QGtd",content:"styles-module_content__3wdFn",close:"styles-module_close__2IqHP",closeCompact:"styles-module_closeCompact__25d-N",contentWrapCompact:"styles-module_contentWrapCompact__3QxL4",contentCompact:"styles-module_contentCompact__3sr68","marketplace-modal":"styles-module_marketplace-modal__2pr5w","request-app-modal":"styles-module_request-app-modal__1GIsL","success-pop-up":"styles-module_success-pop-up__1SWdg","confirmation-pop-up":"styles-module_confirmation-pop-up__eV-sh","media-gallery-modal":"styles-module_media-gallery-modal__1RZ25",appModal:"styles-module_appModal__1f5fh",flowAppsModal:"styles-module_flowAppsModal__2U8Z6",authConfirmation:"styles-module_authConfirmation__33OEu",marketplaceAppDisconnectConfirmation:"styles-module_marketplaceAppDisconnectConfirmation__3HNrX"};ue('.styles-module_modal__3ImBF {\n font-family: "Inter";\n display: none;\n z-index: 99;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow-y: auto;\n}\n.styles-module_modal__3ImBF.styles-module_open__AAUJ5 {\n position: fixed;\n display: block;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: flex;\n min-height: 100vh;\n align-items: flex-start;\n justify-content: center;\n text-align: center;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt {\n display: block;\n padding: 0;\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_inset__-NimT {\n position: fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n opacity: 0.3;\n background-color: #000000;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: none;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_span__3nIVQ {\n display: inline-block;\n height: 100vh;\n vertical-align: middle;\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n display: none;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n overflow-x: hidden;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd.styles-module_open__AAUJ5 {\n display: inline-block;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 100%;\n max-width: 730px;\n margin-top: 2rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #ededed;\n border: 1px solid #e7e7e7;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_content__3wdFn {\n position: relative;\n background: white;\n border-radius: 4px;\n height: calc(100% - 80px);\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_closeCompact__25d-N {\n position: absolute;\n cursor: pointer;\n top: 24px;\n right: 24px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 {\n display: none;\n min-height: 557px;\n max-height: 620px;\n position: relative;\n vertical-align: bottom;\n background: white;\n border-radius: 4px;\n text-align: left;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n overflow-x: hidden;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4.styles-module_open__AAUJ5 {\n display: inline-block;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 {\n width: 100%;\n max-width: 730px;\n margin-top: 2rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-thumb {\n background: #ededed;\n border: 1px solid #e7e7e7;\n border-radius: 10px;\n }\n .styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_contentCompact__3sr68 {\n position: relative;\n background: white;\n padding-bottom: 0px;\n border-radius: 4px;\n height: inherit;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 10px;\n right: 10px;\n}\n.styles-module_modal__3ImBF .styles-module_modalContainer__o6TKt .styles-module_contentWrapCompact__3QxL4 .styles-module_closeCompact__25d-N {\n position: absolute;\n cursor: pointer;\n top: 24px;\n right: 24px;\n}\n.styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 28px;\n right: 32px;\n z-index: 99;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n min-width: 420px;\n width: min-content;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n height: calc(100vh - 100px);\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 480px;\n max-width: 480px;\n }\n}\n@media (min-width: 857px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 800px;\n max-width: 800px;\n }\n}\n@media (min-width: 1237px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 1180px;\n max-width: 1180px;\n }\n}\n@media (min-height: 1152px) {\n .styles-module_modal__3ImBF.styles-module_marketplace-modal__2pr5w .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n max-height: 1000px;\n height: 1000px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 40px;\n z-index: 99;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 452px;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n /* Track */\n /* Handle */\n /* Handle on hover */\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar {\n width: 7px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb {\n background: #bdbdbd;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n }\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd::-webkit-scrollbar-thumb:hover {\n background: rgb(116, 116, 116);\n }\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_request-app-modal__1GIsL .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 587px;\n max-width: 587px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 0px;\n display: none;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n max-width: 480px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n }\n}\n@media (min-width: 600px) {\n .styles-module_modal__3ImBF.styles-module_success-pop-up__1SWdg .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 550px;\n max-width: 550px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n}\n.styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 0px;\n right: 0px;\n display: none;\n}\n@media (min-width: 320px) {\n .styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n max-width: 462px;\n margin-top: 3rem;\n margin-bottom: 0rem;\n vertical-align: middle;\n height: auto;\n max-height: 300px;\n }\n}\n@media (min-width: 600px) {\n .styles-module_modal__3ImBF.styles-module_confirmation-pop-up__eV-sh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 462px;\n max-width: 462px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n border-radius: 8px;\n max-height: calc(100vh - 200px);\n}\n.styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 6px;\n right: 6px;\n}\n@media (min-width: 640px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 320px;\n max-width: 320px;\n }\n}\n@media (min-width: 857px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 550px;\n max-width: 550px;\n }\n}\n@media (min-width: 1237px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: 800px;\n max-width: 800px;\n }\n}\n@media (min-height: 1152px) {\n .styles-module_modal__3ImBF.styles-module_media-gallery-modal__1RZ25 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n max-height: 800px;\n height: 800px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_appModal__1f5fh .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 25px;\n right: 27px;\n z-index: 99;\n width: 12px;\n height: 12px;\n}\n.styles-module_modal__3ImBF.styles-module_appModal__1f5fh .styles-module_modalContainer__o6TKt .styles-module_content__3wdFn {\n padding-bottom: 10px !important;\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n width: min-content;\n overflow: hidden;\n min-width: 605px;\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd .styles-module_close__2IqHP {\n position: absolute;\n cursor: pointer;\n top: 18px;\n z-index: 99;\n width: 12px;\n height: 12px;\n right: 27px;\n}\n@media (max-width: 768px) {\n .styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_contentWrap__2QGtd {\n min-width: 312px;\n }\n}\n.styles-module_modal__3ImBF.styles-module_flowAppsModal__2U8Z6 .styles-module_modalContainer__o6TKt .styles-module_content__3wdFn {\n padding-bottom: 10px !important;\n}\n\n.styles-module_authConfirmation__33OEu div {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu p {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu span {\n -webkit-user-select: none;\n user-select: none;\n}\n.styles-module_authConfirmation__33OEu .styles-module_content__3wdFn {\n padding-bottom: 0 !important;\n}\n.styles-module_authConfirmation__33OEu .styles-module_contentWrap__2QGtd {\n max-width: 485px !important;\n}\n\n.styles-module_marketplaceAppDisconnectConfirmation__3HNrX .styles-module_contentWrap__2QGtd {\n min-width: 480px !important;\n max-width: 485px !important;\n}');class me extends g{render(){const{isOpen:e,CustomCloseElement:t,className:n,isCompact:i=!1}=this.props;return R`
|
|
18
18
|
<div
|
|
19
19
|
id="sdk-modal"
|
|
20
20
|
class=${`${_e.modal} ${e?`${_e.open}`:""} ${_e[n||""]}`}
|
|
@@ -3377,13 +3377,15 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3377
3377
|
`;var i,o}))}
|
|
3378
3378
|
${l&&R` <a onClick=${()=>{u([...c,{}])}}>+ Add another ${t.title}</a> `}
|
|
3379
3379
|
</div>
|
|
3380
|
-
`};var Js={actionFormWrap:"styles-module_actionFormWrap__1--9G",noStepFields:"styles-module_noStepFields__1NQe1",unsupported:"styles-module_unsupported__2swxl",actionFormLoader:"styles-module_actionFormLoader__2AXe4"};ue('.styles-module_actionFormWrap__1--9G {\n width: 100%;\n}\n.styles-module_actionFormWrap__1--9G .styles-module_noStepFields__1NQe1 {\n font-family: "Inter";\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: #999999;\n}\n\n.styles-module_unsupported__2swxl {\n font-size: 12px;\n color: #ca8c1b;\n}\n\n.styles-module_actionFormLoader__2AXe4 {\n width: 15px;\n margin: 0 auto;\n}');var Xs=B.connect(["stepState","stepMapping","stepDataMapping","parentChildMapping","fieldListMapping","conditionalFieldMapping","embedConfig","activityOutputData","genericData","userConfig","authMapping"],re)(class extends g{constructor(e){super(e),this.state={loading:!1,dynamicFieldDataState:{}}}componentDidMount(){const{step:e,verifyStepValidity:t}=this.props;t(e.id);const n=this.props.genericData.stepWithActivityOutput;if(n){const{id:e}=n,t=this.getVisibleFieldsDataOnRootStep(e);this.setRootStepData(t)}else this.setRootStepData({})}componentDidUpdate(e){const{step:t,verifyStepValidity:n}=this.props;if(e.step.id!==t.id){n(t.id);const e=this.props.genericData.stepWithActivityOutput;if(e){const{id:t}=e,n=this.getVisibleFieldsDataOnRootStep(t);this.setRootStepData(n)}else this.setRootStepData({})}}getVisibleFieldsDataOnRootStep=e=>{const t=this.props.stepDataMapping[e];return Object.keys(t).filter((e=>t[Number(e)].value)).reduce(((e,n)=>{const i=t[Number(n)];return{...e,[i.machineName]:i.value}}),{})};refreshRootStepData=async e=>{const t=this.props.genericData.stepWithActivityOutput;if(t){const{id:n}=t,i=this.getVisibleFieldsDataOnRootStep(n);this.setRootStepData(i,!0,e)}else this.setRootStepData({},!0,e)};setActivityOutputFromSourceStep=(e,t,n)=>{const{setDynamicData:i}=this,o=this.setState.bind(this),s=this.props.step.source_steps,{stepMapping:a}=this.props,{props:l}=this;Object.keys(s).forEach((s=>{const r=l.step.source_steps[s];let d=!1;return Object.keys(a).every((p=>{const c=a[p].step.id;if(c&&(a[c].step.machine_name===s||a[c].step.machine_name===r.form_step_machine_name)&&!l.genericData.isTestIntegration){if(d=!0,r.activity_output_url){e||o({loading:!0});const n={},a=Object.keys(l.stepDataMapping[c]);for(let e=0;e<a.length;e+=1){const t=a[e],i=l.stepDataMapping[c][t];i.value&&(n[i.machineName]=i.value)}const d=r.activity_output_url.includes("functions/"),p=d?"POST":"GET";l.apiHandler.callDynamicDataEndpoint(new URL(r.activity_output_url),{authorization_id:`${l.stepMapping[c].selectedAuthId}`,...n},p).then((e=>{o({loading:!1});let n=!1;if(e){const t=e;d&&"output"in t?this.setActivityOutputFromIntegryObjectOrRawActivityOutput(t.output,r,s,!0):l.setActivityOutputData({activityOutputData:r.loop_variable_name?this.replaceContactPrefix(e,s,r):e})}else n=!0;t&&t(n)})),r.sample_data_endpoint_url&&c&&i(r.sample_data_endpoint_url,c,{...n})}else r.activity_output&&(o({loading:!1}),t&&t(),this.setActivityOutputFromIntegryObjectOrRawActivityOutput(n,r,s));return!1}return!((l.genericData.isTestIntegration||!r.app_id&&!this.canOverrideIntegryObject(n))&&r.activity_output)||(o({loading:!1}),t&&t(),d=!0,this.setActivityOutputFromRawActivityOutput(r,s),!1)})),!d&&r.activity_output?(this.setActivityOutputFromIntegryObjectOrRawActivityOutput(n,r,s),o({loading:!1}),t&&t(),d=!0,!1):!d}))};replaceContactPrefix=(e,t,n)=>{const i=`steps.${t}.out.${n.loop_variable_name?`${n.loop_variable_name}`:""}`;return e.map((e=>({...e,value:e.value.replace("contact_v1",i)})))};setActivityOutputFromRawActivityOutput=(()=>{var e=this;return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{let i={};i=t.activity_output;const o=Yo(i,"",`steps.${n}.out.${t.loop_variable_name?`${t.loop_variable_name}.`:""}`),s=Qo(i,"",`steps.${n}.out.${t.loop_variable_name?`${t.loop_variable_name}.`:""}`);e.props.setIncomingWebhookPayload({incomingWebhookPayload:i}),e.props.setActivityOutputData({activityOutputData:o||[]}),e.props.setDynamicFieldData({dynamicFieldData:s||{}}),e.setState({dynamicFieldDataState:s||{}})}catch(e){console.error(e)}}})();setDynamicData=(e,t,n)=>{this.props.apiHandler.callDynamicDataEndpoint(new URL(e),{authorization_id:`${this.props.stepMapping[t].selectedAuthId}`,...n}).then((e=>{e&&(this.props.setDynamicFieldData({dynamicFieldData:e}),this.setState({dynamicFieldDataState:e}))}))};canOverrideIntegryObject=e=>{if(e)try{const t=JSON.parse(e);if(this.props.userConfig?.objects?.[t.name])return!0}catch(e){return!1}return!1};setActivityOutputFromIntegryObjectOrRawActivityOutput=(()=>{var e=this;return function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t)try{let s={};if(o)s=t;else{const n=JSON.parse(t);s=e.props.userConfig?.objects?.[n.name]?e.props.userConfig?.objects?.[n.name]:JSON.parse(n.payload)}const a=Yo(s,"",`steps.${i}.out.${n.loop_variable_name?`${n.loop_variable_name}.`:""}`),l=Qo(s,"",`steps.${i}.out.${n.loop_variable_name?`${n.loop_variable_name}.`:""}`);e.props.setIncomingWebhookPayload({incomingWebhookPayload:s}),e.props.setActivityOutputData({activityOutputData:a||[]}),e.props.setDynamicFieldData({dynamicFieldData:l||{}}),e.setState({dynamicFieldDataState:l||{}})}catch(e){console.error(e)}else e.setActivityOutputFromRawActivityOutput(n,i)}})();setRootStepData=async(e,t,n)=>{const i=this.props.genericData.stepWithActivityOutput;let o=i?.template_fields.find((e=>"integry_webhook_object"===e.activity_field?.machine_name))?.default_value;if(o){let e={};try{e=JSON.parse(o||"{}")}catch(t){e={}}e={payload:o||"{}",name:i?.template_fields.find((e=>"payload_name"===e.activity_field?.machine_name))?.default_value||"payload"},o=JSON.stringify(e)}if(this.props.setActivityOutputData({activityOutputData:[]}),this.props.step.source_steps&&Object.keys(this.props.step.source_steps).length>0)this.setActivityOutputFromSourceStep(t,n,o);else if(i){const{id:s}=i;i.activity.activity_output_url?(t||this.setState({loading:!0}),this.props.apiHandler.callDynamicDataEndpoint(new URL(i.activity.activity_output_url),{authorization_id:`${this.props.stepMapping[s].selectedAuthId}`,...e}).then((e=>{this.setState({loading:!1}),n&&n(),e&&this.props.setActivityOutputData({activityOutputData:e})}))):i.activity.activity_output?(this.setActivityOutputFromIntegryObjectOrRawActivityOutput(o,i.activity),this.setState({loading:!1}),n&&n()):(this.setState({loading:!1}),n&&n()),i.activity.dynamic_field_data_endpoint&&this.setDynamicData(i.activity.dynamic_field_data_endpoint,s,e)}};removeCurlyBraces=e=>e.replace(/^{(.*)}$/,"$1");isNotJSON=e=>{try{return!(Array.isArray(e)&&e.length>0&&"object"==typeof e[0])&&(JSON.parse(e),!!Number(e))}catch(e){return!0}};arrayToNestedJSONWithFirstValue=(e,t)=>{let n={},i=[];e&&Array.isArray(e)&&(i=e),Object.keys(t||{}).forEach((e=>{const i=this.removeCurlyBraces(e);n={...n,[i]:t[e]||""}}));let o={};(i||[]).forEach((e=>{o={...o,[e.text]:t[e.value]||""}}));const s={};return(i||[]).forEach((e=>{if(!e.text||!e.value)return;const t=e.text.split(".");let i=s;t.forEach(((o,s)=>{i[o]||(s===t.length-1?n[e.value]&&n[e.value][0]&&this.isNotJSON(n[e.value][0])?i[o]=n[e.value][0]||"":i[o]="":i[o]={}),i=i[o]}))})),s};getFieldValFromActivityOutputRaw=(e,t)=>{const n=t.match(/{([^}]+)}/g);let i=t;return(n||[]).forEach((t=>{const n=t.replace(/{|}/g,"");(e||[]).forEach((e=>{e.text===n&&(i=i.replace(t,`{${e.value}}`))}))})),i};getStepVisibleFieldsData=e=>{const t=this.props.stepDataMapping[e];return Object.keys(t).filter((e=>t[Number(e)].value)).reduce(((e,n)=>{const i=t[Number(n)];return{...e,[i.machineName]:i.value}}),{})};areParentValuesFilled=(e,t)=>{let n=!0;for(let i=0;i<t.length;i+=1){const o=t[i];let s=null;this.props.parentChildMapping[e][o]&&(s=this.props.parentChildMapping[e][o].fieldId);const a=s&&this.props.stepDataMapping[e]&&this.props.stepDataMapping[e][s];if(!a||!a.value){n=!1;break}}return n};doParentFieldsHaveValues=(e,t)=>{let n=!0;const i=this.props.parentChildMapping[e][t];if(i&&i.parentFields)for(let t=0;t<i.parentFields.length;t+=1){const o=this.props.parentChildMapping[e][i.parentFields[t]],s=o&&this.props.stepDataMapping[e]&&this.props.stepDataMapping[e][o.fieldId];if(!s||!s.value){n=!1;break}}return n};shouldShowStep=e=>{const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t];if("BUTTON"===e.type||"HTML"===e.type||"SECTION"===e.type)return!0;if(n&&e.activity_field){if(this.props.userConfig&&this.props.userConfig.viewAsIU)return!0;const n=!e.is_hidden,i=!0,{parentFields:o}=this.props.parentChildMapping[t][e.activity_field.machine_name],s=this.props.conditionalFieldMapping[t][e.activity_field.machine_name];let a=!0,l=!0;o&&(a=this.areParentValuesFilled(t,o)),s&&(l=ae(t,s,this.props.stepDataMapping));const r=a&&l;return n&&i&&r}return!1};stepIsOfType=e=>{const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t];return e.indexOf(n.step.activity.type)>-1};textFieldParentHasValues=e=>{const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t],i=n.step.template_fields.filter((e=>e.is_visible)),o=!(!this.props?.userConfig||!this.props?.userConfig.viewAsIU)||n.selectedAuthId;if(!i.filter((e=>e.activity_field&&"DYNAMIC"===e.activity_field.type))[0])return!0;let s=!1;return i.forEach((t=>{const{activity_field:n}=t,{activity_field:i}=e;n?.child_fields?.includes(i.machine_name)&&(s=!0)})),!s||!!(i.length>0&&e&&e.activity_field&&o&&this.doParentFieldsHaveValues(t,e.activity_field.machine_name))};shouldShowOldMapping=()=>{const e=this.props.step.id,t=this.props.stepMapping&&this.props.stepMapping[e];if(this.stepIsOfType(["ADAPTER","ACTION"])){const n=t.step.template_fields.filter((e=>e.is_visible)),i=t.step.template_fields.filter((e=>e.is_visible&&"TEXTFIELD"===e.activity_field?.type)),o=t.selectedAuthId,s=n.filter((e=>e.activity_field&&"DYNAMIC"===e.activity_field.type))[0];if(i.length>0&&o&&!s&&!this.shouldShowNewMapping())return!0;if(!s)return!1;if(n.length>0&&o&&s&&s.activity_field&&this.doParentFieldsHaveValues(e,s.activity_field.machine_name)){const t=this.props.conditionalFieldMapping[e][s.activity_field.machine_name];return!t||ae(e,t,this.props.stepDataMapping)}return!1}return!1};shouldShowNewMapping=()=>{const{step:e,stepMapping:t}=this.props,n=t[e.id];if(this.stepIsOfType(["ADAPTER","ACTION"])){const e=n.step.template_fields.filter((e=>e.is_visible));if(e){if(e.filter((e=>e.activity_field&&"FIELD_MAPPING"===e.activity_field.type))[0])return!0}}return!1};getMappingDataInput=()=>{const e=this.props.step.id;return{authId:(this.props.stepMapping&&this.props.stepMapping[e]).selectedAuthId,fieldsData:this.getStepVisibleFieldsData(e)}};onFieldChange=e=>{let{stepId:t,fieldId:n,value:i,isRequired:o}=e;this.props.setStepFieldData({stepId:`${t}`,fieldId:`${n}`,value:i,isRequired:o}),this.props.clearChildFields({stepId:t,fieldId:n}),this.props.verifyStepValidity(Number(t))};fieldDynamicData=e=>{const t=this.props.step.id;if(this.props.stepMapping&&this.props.stepMapping[t]&&e.activity_field){const n=this.props.parentChildMapping[t][e.activity_field.machine_name]?.parentFields||null;if(n){return n.reduce(((e,n)=>{const{fieldId:i}=this.props.parentChildMapping[t][n];return i?{...e,[n]:this.props.stepDataMapping[t][i].value}:e}),{})}}return null};sourceFlowData=e=>{if(e.source_flow_integration_invocation_url){const{stepMapping:e,stepDataMapping:t}=this.props;return{steps:{...Object.keys(e).reduce(((n,i)=>{const{machine_name:o,id:s}=e[i].step;return o?{...n,[o]:{in:Object.keys(t[s]).reduce(((e,n)=>{const i=parseInt(n,10);if(t[s][i]){const{value:n,machineName:o}=t[s][i];return{...e,[o]:n}}return e}),{})}}:n}),{})}}}return null};isHTML=e=>!!/<\/?[a-z][\s\S]*>/i.test(e);getPlaceholder=e=>{let t="Incoming Webhook"===this.props.genericData.stepWithActivityOutput?.activity?.app?.name?this.props.genericData.selfAppName:this.props.genericData.stepWithActivityOutput?.activity?.app?.name||"";if(!t||t.includes("Webhook")){const e=this.props.step.source_steps,{stepMapping:n}=this.props,{props:i}=this;let o=null;Object.keys(e).forEach((e=>{const s=i.step.source_steps[e];o=s.app_id,s.app_name?t=s.app_name:Object.keys(n).every((e=>(n[e].step.authorization_type.app.id===s.app_id&&(t=n[e].step.activity.app.name),!0)))})),t?.includes("Incoming Webhook")&&null===o&&(t="Webhook")}return"TEXTAREA"===e.activity_field?.type||"TEXTFIELD"===e.activity_field?.type||"DYNAMIC"===e.activity_field?.type?!e.is_editable||e.is_mappable||e.allow_tags_in_text?!e.is_editable&&e.is_mappable?`Map to a ${t} field...`:e.is_editable&&(e.is_mappable||e.allow_tags_in_text)?`Enter text or map to a ${t} field...`:"Please enter a value":"Enter text...":"CHECKBOX"===e.activity_field?.type||"SELECT"===e.activity_field?.type||"RADIO"===e.activity_field?.type?!e.is_editable||e.is_mappable||e.allow_tags_in_text?!e.is_editable&&e.is_mappable?`Select a value or map to a ${t} field...`:e.is_editable&&e.allow_tags_in_text?`Enter text with ${t} fields or select a value...`:e.is_editable&&e.is_mappable?`Enter text, select a value or map to a ${t} field...`:"Select a value...":"Enter text or select a value...":"TEXTAREA"===e.activity_field?.type||"TEXTFIELD"===e.activity_field?.type?"Enter text...":"CHECKBOX"===e.activity_field?.type||"SELECT"===e.activity_field?.type||"RADIO"===e.activity_field?.type?"Select a value...":""};replacePlaceholders=(e,t)=>{const n={};return Object.entries(e).forEach((e=>{let[i,o]=e;if("string"==typeof o&&o.includes("{")){const e=o.match(/{(.*?)}/);if(e&&e[1]){const s=e[1],a=s.split(".").pop();void 0!==t[s]?n[i]=o.replace(e[0],t[s]):a&&void 0!==t[a]&&(n[i]=o.replace(e[0],t[a]))}}else"string"==typeof o&&o&&(n[i]=o)})),n};render(){const{step:e,stepMapping:t,stepDataMapping:n,setStepFieldData:i,showStepValidation:o,isReadOnly:s,accountConnected:a}=this.props,l=t[e.id]&&t[e.id].step,r=n&&n[e.id],d={}||this.props.activityOutputData||{},p=0===l.template_fields.length||!(this.props.userConfig&&this.props.userConfig.viewAsIU)&&0===l.template_fields.filter((e=>e.is_visible)).length;return R`
|
|
3380
|
+
`};var Js={actionFormWrap:"styles-module_actionFormWrap__1--9G",noStepFields:"styles-module_noStepFields__1NQe1",actionFormWrapAutoWidth:"styles-module_actionFormWrapAutoWidth__2Vs2x",unsupported:"styles-module_unsupported__2swxl",actionFormLoader:"styles-module_actionFormLoader__2AXe4"};ue('.styles-module_actionFormWrap__1--9G {\n width: 100%;\n}\n.styles-module_actionFormWrap__1--9G .styles-module_noStepFields__1NQe1 {\n font-family: "Inter";\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: #999999;\n}\n\n.styles-module_actionFormWrapAutoWidth__2Vs2x {\n margin-left: 24px;\n margin-right: 24px;\n width: auto;\n}\n\n.styles-module_unsupported__2swxl {\n font-size: 12px;\n color: #ca8c1b;\n}\n\n.styles-module_actionFormLoader__2AXe4 {\n width: 15px;\n margin: 0 auto;\n}');var Xs=B.connect(["stepState","stepMapping","stepDataMapping","parentChildMapping","fieldListMapping","conditionalFieldMapping","embedConfig","activityOutputData","genericData","userConfig","authMapping"],re)(class extends g{constructor(e){super(e),this.state={loading:!1,dynamicFieldDataState:{}}}componentDidMount(){const{step:e,verifyStepValidity:t}=this.props;t(e.id);const n=this.props.genericData.stepWithActivityOutput;if(n){const{id:e}=n,t=this.getVisibleFieldsDataOnRootStep(e);this.setRootStepData(t)}else this.setRootStepData({})}componentDidUpdate(e){const{step:t,verifyStepValidity:n}=this.props;if(e.step.id!==t.id){n(t.id);const e=this.props.genericData.stepWithActivityOutput;if(e){const{id:t}=e,n=this.getVisibleFieldsDataOnRootStep(t);this.setRootStepData(n)}else this.setRootStepData({})}}getVisibleFieldsDataOnRootStep=e=>{const t=this.props.stepDataMapping[e];return Object.keys(t).filter((e=>t[Number(e)].value)).reduce(((e,n)=>{const i=t[Number(n)];return{...e,[i.machineName]:i.value}}),{})};refreshRootStepData=async e=>{const t=this.props.genericData.stepWithActivityOutput;if(t){const{id:n}=t,i=this.getVisibleFieldsDataOnRootStep(n);this.setRootStepData(i,!0,e)}else this.setRootStepData({},!0,e)};setActivityOutputFromSourceStep=(e,t,n)=>{const{setDynamicData:i}=this,o=this.setState.bind(this),s=this.props.step.source_steps,{stepMapping:a}=this.props,{props:l}=this;Object.keys(s).forEach((s=>{const r=l.step.source_steps[s];let d=!1;return Object.keys(a).every((p=>{const c=a[p].step.id;if(c&&(a[c].step.machine_name===s||a[c].step.machine_name===r.form_step_machine_name)&&!l.genericData.isTestIntegration){if(d=!0,r.activity_output_url){e||o({loading:!0});const n={},a=Object.keys(l.stepDataMapping[c]);for(let e=0;e<a.length;e+=1){const t=a[e],i=l.stepDataMapping[c][t];i.value&&(n[i.machineName]=i.value)}const d=r.activity_output_url.includes("functions/"),p=d?"POST":"GET";l.apiHandler.callDynamicDataEndpoint(new URL(r.activity_output_url),{authorization_id:`${l.stepMapping[c].selectedAuthId}`,...n},p).then((e=>{o({loading:!1});let n=!1;if(e){const t=e;d&&"output"in t?this.setActivityOutputFromIntegryObjectOrRawActivityOutput(t.output,r,s,!0):l.setActivityOutputData({activityOutputData:r.loop_variable_name?this.replaceContactPrefix(e,s,r):e})}else n=!0;t&&t(n)})),r.sample_data_endpoint_url&&c&&i(r.sample_data_endpoint_url,c,{...n})}else r.activity_output&&(o({loading:!1}),t&&t(),this.setActivityOutputFromIntegryObjectOrRawActivityOutput(n,r,s));return!1}return!((l.genericData.isTestIntegration||!r.app_id&&!this.canOverrideIntegryObject(n))&&r.activity_output)||(o({loading:!1}),t&&t(),d=!0,this.setActivityOutputFromRawActivityOutput(r,s),!1)})),!d&&r.activity_output?(this.setActivityOutputFromIntegryObjectOrRawActivityOutput(n,r,s),o({loading:!1}),t&&t(),d=!0,!1):!d}))};replaceContactPrefix=(e,t,n)=>{const i=`steps.${t}.out.${n.loop_variable_name?`${n.loop_variable_name}`:""}`;return e.map((e=>({...e,value:e.value.replace("contact_v1",i)})))};setActivityOutputFromRawActivityOutput=(()=>{var e=this;return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{let i={};i=t.activity_output;const o=Yo(i,"",`steps.${n}.out.${t.loop_variable_name?`${t.loop_variable_name}.`:""}`),s=Qo(i,"",`steps.${n}.out.${t.loop_variable_name?`${t.loop_variable_name}.`:""}`);e.props.setIncomingWebhookPayload({incomingWebhookPayload:i}),e.props.setActivityOutputData({activityOutputData:o||[]}),e.props.setDynamicFieldData({dynamicFieldData:s||{}}),e.setState({dynamicFieldDataState:s||{}})}catch(e){console.error(e)}}})();setDynamicData=(e,t,n)=>{this.props.apiHandler.callDynamicDataEndpoint(new URL(e),{authorization_id:`${this.props.stepMapping[t].selectedAuthId}`,...n}).then((e=>{e&&(this.props.setDynamicFieldData({dynamicFieldData:e}),this.setState({dynamicFieldDataState:e}))}))};canOverrideIntegryObject=e=>{if(e)try{const t=JSON.parse(e);if(this.props.userConfig?.objects?.[t.name])return!0}catch(e){return!1}return!1};setActivityOutputFromIntegryObjectOrRawActivityOutput=(()=>{var e=this;return function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t)try{let s={};if(o)s=t;else{const n=JSON.parse(t);s=e.props.userConfig?.objects?.[n.name]?e.props.userConfig?.objects?.[n.name]:JSON.parse(n.payload)}const a=Yo(s,"",`steps.${i}.out.${n.loop_variable_name?`${n.loop_variable_name}.`:""}`),l=Qo(s,"",`steps.${i}.out.${n.loop_variable_name?`${n.loop_variable_name}.`:""}`);e.props.setIncomingWebhookPayload({incomingWebhookPayload:s}),e.props.setActivityOutputData({activityOutputData:a||[]}),e.props.setDynamicFieldData({dynamicFieldData:l||{}}),e.setState({dynamicFieldDataState:l||{}})}catch(e){console.error(e)}else e.setActivityOutputFromRawActivityOutput(n,i)}})();setRootStepData=async(e,t,n)=>{const i=this.props.genericData.stepWithActivityOutput;let o=i?.template_fields.find((e=>"integry_webhook_object"===e.activity_field?.machine_name))?.default_value;if(o){let e={};try{e=JSON.parse(o||"{}")}catch(t){e={}}e={payload:o||"{}",name:i?.template_fields.find((e=>"payload_name"===e.activity_field?.machine_name))?.default_value||"payload"},o=JSON.stringify(e)}if(this.props.setActivityOutputData({activityOutputData:[]}),this.props.step.source_steps&&Object.keys(this.props.step.source_steps).length>0)this.setActivityOutputFromSourceStep(t,n,o);else if(i){const{id:s}=i;i.activity.activity_output_url?(t||this.setState({loading:!0}),this.props.apiHandler.callDynamicDataEndpoint(new URL(i.activity.activity_output_url),{authorization_id:`${this.props.stepMapping[s].selectedAuthId}`,...e}).then((e=>{this.setState({loading:!1}),n&&n(),e&&this.props.setActivityOutputData({activityOutputData:e})}))):i.activity.activity_output?(this.setActivityOutputFromIntegryObjectOrRawActivityOutput(o,i.activity),this.setState({loading:!1}),n&&n()):(this.setState({loading:!1}),n&&n()),i.activity.dynamic_field_data_endpoint&&this.setDynamicData(i.activity.dynamic_field_data_endpoint,s,e)}};removeCurlyBraces=e=>e.replace(/^{(.*)}$/,"$1");isNotJSON=e=>{try{return!(Array.isArray(e)&&e.length>0&&"object"==typeof e[0])&&(JSON.parse(e),!!Number(e))}catch(e){return!0}};arrayToNestedJSONWithFirstValue=(e,t)=>{let n={},i=[];e&&Array.isArray(e)&&(i=e),Object.keys(t||{}).forEach((e=>{const i=this.removeCurlyBraces(e);n={...n,[i]:t[e]||""}}));let o={};(i||[]).forEach((e=>{o={...o,[e.text]:t[e.value]||""}}));const s={};return(i||[]).forEach((e=>{if(!e.text||!e.value)return;const t=e.text.split(".");let i=s;t.forEach(((o,s)=>{i[o]||(s===t.length-1?n[e.value]&&n[e.value][0]&&this.isNotJSON(n[e.value][0])?i[o]=n[e.value][0]||"":i[o]="":i[o]={}),i=i[o]}))})),s};getFieldValFromActivityOutputRaw=(e,t)=>{const n=t.match(/{([^}]+)}/g);let i=t;return(n||[]).forEach((t=>{const n=t.replace(/{|}/g,"");(e||[]).forEach((e=>{e.text===n&&(i=i.replace(t,`{${e.value}}`))}))})),i};getStepVisibleFieldsData=e=>{const t=this.props.stepDataMapping[e];return Object.keys(t).filter((e=>t[Number(e)].value)).reduce(((e,n)=>{const i=t[Number(n)];return{...e,[i.machineName]:i.value}}),{})};areParentValuesFilled=(e,t)=>{let n=!0;for(let i=0;i<t.length;i+=1){const o=t[i];let s=null;this.props.parentChildMapping[e][o]&&(s=this.props.parentChildMapping[e][o].fieldId);const a=s&&this.props.stepDataMapping[e]&&this.props.stepDataMapping[e][s];if(!a||!a.value){n=!1;break}}return n};doParentFieldsHaveValues=(e,t)=>{let n=!0;const i=this.props.parentChildMapping[e][t];if(i&&i.parentFields)for(let t=0;t<i.parentFields.length;t+=1){const o=this.props.parentChildMapping[e][i.parentFields[t]],s=o&&this.props.stepDataMapping[e]&&this.props.stepDataMapping[e][o.fieldId];if(!s||!s.value){n=!1;break}}return n};shouldShowStep=e=>{if(!this.props.showStepValidation)return!0;const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t];if("BUTTON"===e.type||"HTML"===e.type||"SECTION"===e.type)return!0;if(n&&e.activity_field){if(this.props.userConfig&&this.props.userConfig.viewAsIU)return!0;const n=!e.is_hidden,i=!0,{parentFields:o}=this.props.parentChildMapping[t][e.activity_field.machine_name],s=this.props.conditionalFieldMapping[t][e.activity_field.machine_name];let a=!0,l=!0;o&&(a=this.areParentValuesFilled(t,o)),s&&(l=ae(t,s,this.props.stepDataMapping));const r=a&&l;return n&&i&&r}return!1};stepIsOfType=e=>{const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t]||{step:this.props.step};return e.indexOf(n.step.activity?.type)>-1};textFieldParentHasValues=e=>{const t=this.props.step.id,n=this.props.stepMapping&&this.props.stepMapping[t]||{step:this.props.step},i=n.step.template_fields.filter((e=>e.is_visible)),o=!(!this.props?.userConfig||!this.props?.userConfig.viewAsIU)||n.selectedAuthId;if(!i.filter((e=>e.activity_field&&"DYNAMIC"===e.activity_field.type))[0])return!0;let s=!1;return i.forEach((t=>{const{activity_field:n}=t,{activity_field:i}=e;n?.child_fields?.includes(i.machine_name)&&(s=!0)})),!s||!!(i.length>0&&e&&e.activity_field&&o&&this.doParentFieldsHaveValues(t,e.activity_field.machine_name))};shouldShowOldMapping=()=>{const e=this.props.step.id,t=this.props.stepMapping&&this.props.stepMapping[e];if(this.stepIsOfType(["ADAPTER","ACTION"])){const n=t.step.template_fields.filter((e=>e.is_visible)),i=t.step.template_fields.filter((e=>e.is_visible&&"TEXTFIELD"===e.activity_field?.type)),o=t.selectedAuthId,s=n.filter((e=>e.activity_field&&"DYNAMIC"===e.activity_field.type))[0];if(i.length>0&&o&&!s&&!this.shouldShowNewMapping())return!0;if(!s)return!1;if(n.length>0&&o&&s&&s.activity_field&&this.doParentFieldsHaveValues(e,s.activity_field.machine_name)){const t=this.props.conditionalFieldMapping[e][s.activity_field.machine_name];return!t||ae(e,t,this.props.stepDataMapping)}return!1}return!1};shouldShowNewMapping=()=>{const{step:e,stepMapping:t}=this.props,n=t[e.id];if(this.stepIsOfType(["ADAPTER","ACTION"])){const e=n.step.template_fields.filter((e=>e.is_visible));if(e){if(e.filter((e=>e.activity_field&&"FIELD_MAPPING"===e.activity_field.type))[0])return!0}}return!1};getMappingDataInput=()=>{const e=this.props.step.id;return{authId:(this.props.stepMapping&&this.props.stepMapping[e]).selectedAuthId,fieldsData:this.getStepVisibleFieldsData(e)}};onFieldChange=e=>{let{stepId:t,fieldId:n,value:i,isRequired:o}=e;this.props.setStepFieldData({stepId:`${t}`,fieldId:`${n}`,value:i,isRequired:o}),this.props.clearChildFields({stepId:t,fieldId:n}),this.props.verifyStepValidity(Number(t))};fieldDynamicData=e=>{const t=this.props.step.id;if(this.props.stepMapping&&this.props.stepMapping[t]&&e.activity_field){const n=this.props.parentChildMapping[t][e.activity_field.machine_name]?.parentFields||null;if(n){return n.reduce(((e,n)=>{const{fieldId:i}=this.props.parentChildMapping[t][n];return i?{...e,[n]:this.props.stepDataMapping[t][i].value}:e}),{})}}return null};sourceFlowData=e=>{if(e.source_flow_integration_invocation_url){const{stepMapping:e,stepDataMapping:t}=this.props;return{steps:{...Object.keys(e).reduce(((n,i)=>{const{machine_name:o,id:s}=e[i].step;return o?{...n,[o]:{in:Object.keys(t[s]).reduce(((e,n)=>{const i=parseInt(n,10);if(t[s][i]){const{value:n,machineName:o}=t[s][i];return{...e,[o]:n}}return e}),{})}}:n}),{})}}}return null};isHTML=e=>!!/<\/?[a-z][\s\S]*>/i.test(e);getPlaceholder=e=>{let t="Incoming Webhook"===this.props.genericData.stepWithActivityOutput?.activity?.app?.name?this.props.genericData.selfAppName:this.props.genericData.stepWithActivityOutput?.activity?.app?.name||"";if(!t||t.includes("Webhook")){const e=this.props.step.source_steps,{stepMapping:n}=this.props,{props:i}=this;let o=null;Object.keys(e).forEach((e=>{const s=i.step.source_steps[e];o=s.app_id,s.app_name?t=s.app_name:Object.keys(n).every((e=>(n[e].step.authorization_type.app.id===s.app_id&&(t=n[e].step.activity.app.name),!0)))})),t?.includes("Incoming Webhook")&&null===o&&(t="Webhook")}return"TEXTAREA"===e.activity_field?.type||"TEXTFIELD"===e.activity_field?.type||"DYNAMIC"===e.activity_field?.type?!e.is_editable||e.is_mappable||e.allow_tags_in_text?!e.is_editable&&e.is_mappable?`Map to a ${t} field...`:e.is_editable&&(e.is_mappable||e.allow_tags_in_text)?`Enter text or map to a ${t} field...`:"Please enter a value":"Enter text...":"CHECKBOX"===e.activity_field?.type||"SELECT"===e.activity_field?.type||"RADIO"===e.activity_field?.type?!e.is_editable||e.is_mappable||e.allow_tags_in_text?!e.is_editable&&e.is_mappable?`Select a value or map to a ${t} field...`:e.is_editable&&e.allow_tags_in_text?`Enter text with ${t} fields or select a value...`:e.is_editable&&e.is_mappable?`Enter text, select a value or map to a ${t} field...`:"Select a value...":"Enter text or select a value...":"TEXTAREA"===e.activity_field?.type||"TEXTFIELD"===e.activity_field?.type?"Enter text...":"CHECKBOX"===e.activity_field?.type||"SELECT"===e.activity_field?.type||"RADIO"===e.activity_field?.type?"Select a value...":""};replacePlaceholders=(e,t)=>{const n={};return Object.entries(e).forEach((e=>{let[i,o]=e;if("string"==typeof o&&o.includes("{")){const e=o.match(/{(.*?)}/);if(e&&e[1]){const s=e[1],a=s.split(".").pop();void 0!==t[s]?n[i]=o.replace(e[0],t[s]):a&&void 0!==t[a]&&(n[i]=o.replace(e[0],t[a]))}}else"string"==typeof o&&o&&(n[i]=o)})),n};render(){const{step:e,stepMapping:t,stepDataMapping:n,setStepFieldData:i,showStepValidation:o,isReadOnly:s,accountConnected:a}=this.props,l=t[e.id]&&t[e.id].step||e,r=n&&n[e.id]||{},d={}||this.props.activityOutputData||{},p=0===l.template_fields?.length||!(this.props.userConfig&&this.props.userConfig.viewAsIU)&&0===l.template_fields?.filter((e=>e.is_visible)).length;return R`
|
|
3381
3381
|
${this.state.loading?R`<div class=${Js.actionFormLoader}><${Ye} /></div>`:R`
|
|
3382
3382
|
${l?R`
|
|
3383
|
-
<div
|
|
3383
|
+
<div
|
|
3384
|
+
class=${`${Js.actionFormWrap} ${this.props.selectedAuthId&&this.props.accountConnected?`${Js.actionFormWrapAutoWidth}`:""}`}
|
|
3385
|
+
>
|
|
3384
3386
|
${p?R`<span class=${Js.noStepFields}
|
|
3385
3387
|
>There’s nothing to configure, please proceed.</span
|
|
3386
|
-
>`:l.template_fields
|
|
3388
|
+
>`:l.template_fields?.map((t=>{if(this.shouldShowStep(t)&&(t.activity_field||"SECTION"===t.type)){const n=r&&r[t.id]||null,p=t.description&&!this.isHTML(t.description)?t.description:t.activity_field?.description&&!this.isHTML(t.activity_field?.description)?t.activity_field?.description:"";let c=t.activity_field?.type||t.type;const u=t.ui_field,_=u?.data_source.url||"";switch("OBJECT"===t.data_type?c="OBJECT":"OBJECT[]"===t.data_type&&(c="OBJECT[]"),c){case"CHECKBOX":case"RADIO":case"SELECT":return R`
|
|
3387
3389
|
<div key=${t.id} class=${`${Js.actionStepFieldWrap} integry-action-field-wrap`}>
|
|
3388
3390
|
<${Us}
|
|
3389
3391
|
field=${t}
|
|
@@ -3411,8 +3413,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3411
3413
|
activityOutputData=${d}
|
|
3412
3414
|
}
|
|
3413
3415
|
type=${t.activity_field?.type}
|
|
3414
|
-
selectedAuthId=${`${this.props.stepMapping[this.props.step.id]?.selectedAuthId||""}`}
|
|
3415
|
-
disabled=${!this.props.stepMapping[this.props.step.id]?.isAuthVerified}
|
|
3416
|
+
selectedAuthId=${`${this.props.stepMapping[this.props.step.id]?.selectedAuthId||this.props.selectedAuthId||""}`}
|
|
3417
|
+
disabled=${!this.props.stepMapping[this.props.step.id]?.isAuthVerified&&!this.props.accountConnected}
|
|
3416
3418
|
sourceFlowData=${this.sourceFlowData(t)}
|
|
3417
3419
|
sourceFlowIntegrataionInvocationUrl=${t.source_flow_integration_invocation_url}
|
|
3418
3420
|
skipOptionFetch=${this.props.userConfig?.viewAsIU}
|
|
@@ -3459,8 +3461,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3459
3461
|
value=${r&&r[t.id]&&r[t.id].value&&"x-integry-skipped-field"!==r[t.id].value&&r[t.id].value||t.default_value||""}
|
|
3460
3462
|
placeholder=${this.getPlaceholder(t)}
|
|
3461
3463
|
showStepValidation=${o}
|
|
3462
|
-
regex=${r[t.id].regex}
|
|
3463
|
-
regexErrorMessage=${r[t.id].regexErrorMessage}
|
|
3464
|
+
regex=${r[t.id]?r[t.id].regex:""}
|
|
3465
|
+
regexErrorMessage=${r[t.id]?r[t.id].regexErrorMessage:""}
|
|
3464
3466
|
isRequired=${t.is_required}
|
|
3465
3467
|
isHidden=${t.is_hidden}
|
|
3466
3468
|
onChange=${(n,o)=>{i({stepId:`${e.id}`,fieldId:`${t.id}`,value:this.getFieldValFromActivityOutputRaw(this.props.activityOutputData,n),isRequired:t.is_required,passesRegexTest:o}),this.props.verifyStepValidity(e.id)}}
|
|
@@ -3510,8 +3512,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3510
3512
|
value=${r&&r[t.id]&&r[t.id].value||""}
|
|
3511
3513
|
placeholder=${t.placeholder||"Please enter a URL"}
|
|
3512
3514
|
showStepValidation=${o}
|
|
3513
|
-
regex=${r[t.id].regex}
|
|
3514
|
-
regexErrorMessage=${r[t.id].regexErrorMessage}
|
|
3515
|
+
regex=${r[t.id]?r[t.id].regex:""}
|
|
3516
|
+
regexErrorMessage=${r[t.id]?r[t.id].regexErrorMessage:""}
|
|
3515
3517
|
isRequired=${t.is_required}
|
|
3516
3518
|
onChange=${(n,o)=>{i({stepId:`${e.id}`,fieldId:`${t.id}`,value:n,isRequired:t.is_required,passesRegexTest:o}),this.props.verifyStepValidity(e.id)}}
|
|
3517
3519
|
isReadOnly=${s}
|
|
@@ -3584,8 +3586,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3584
3586
|
description=${p}
|
|
3585
3587
|
value=${r&&r[t.id]&&r[t.id].value||""}
|
|
3586
3588
|
placeholder=${t.placeholder||t.activity_field?.placeholder||"Please enter a value"}
|
|
3587
|
-
regex=${r[t.id].regex}
|
|
3588
|
-
regexErrorMessage=${r[t.id].regexErrorMessage}
|
|
3589
|
+
regex=${r[t.id]?r[t.id].regex:""}
|
|
3590
|
+
regexErrorMessage=${r[t.id]?r[t.id].regexErrorMessage:""}
|
|
3589
3591
|
showStepValidation=${o}
|
|
3590
3592
|
isRequired=${t.is_required}
|
|
3591
3593
|
onChange=${n=>{i({stepId:`${e.id}`,fieldId:`${t.id}`,value:n,isRequired:t.is_required}),this.props.verifyStepValidity(e.id)}}
|
|
@@ -3605,8 +3607,8 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
3605
3607
|
description=${p}
|
|
3606
3608
|
value=${r&&r[t.id]&&r[t.id].value&&"x-integry-skipped-field"!==r[t.id].value&&r[t.id].value||t.default_value||""}
|
|
3607
3609
|
placeholder=${this.getPlaceholder(t)}
|
|
3608
|
-
regex=${r[t.id].regex}
|
|
3609
|
-
regexErrorMessage=${r[t.id].regexErrorMessage}
|
|
3610
|
+
regex=${r[t.id].regex?r[t.id].regex:""}
|
|
3611
|
+
regexErrorMessage=${r[t.id]?r[t.id].regexErrorMessage:""}
|
|
3610
3612
|
showStepValidation=${o}
|
|
3611
3613
|
isRequired=${t.is_required}
|
|
3612
3614
|
isHidden=${t.is_hidden}
|
|
@@ -6998,7 +7000,7 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
6998
7000
|
</div>
|
|
6999
7001
|
</div>
|
|
7000
7002
|
`}
|
|
7001
|
-
`}});const Rd={getAuthHash:async function(e,t){const n=e=>new Uint8Array([...unescape(encodeURIComponent(e))].map((e=>e.charCodeAt(0)))),i=n(t),o=n(e),s=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!0,["sign"]),a=await crypto.subtle.sign("HMAC",s,o);return[...new Uint8Array(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}};class Wd{static SDK_VERSION="4.5.
|
|
7003
|
+
`}});const Rd={getAuthHash:async function(e,t){const n=e=>new Uint8Array([...unescape(encodeURIComponent(e))].map((e=>e.charCodeAt(0)))),i=n(t),o=n(e),s=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!0,["sign"]),a=await crypto.subtle.sign("HMAC",s,o);return[...new Uint8Array(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}};class Wd{static SDK_VERSION="4.5.5";config;apiHandler;initConfig;eventEmitter=(()=>new G)();static html=(()=>R)();static RenderModes=(()=>ee)();static TemplateFormRenderModes=(()=>Y)();static Layouts=(()=>X)();static ViewStyles=(()=>J)();static MarketplaceRenderModes=(()=>Q)();static Helpers;authModalId="";forceRerender=!1;constructor(e){let t;const n=e.baseUrl||"https://app.integry.io",i=e;if(i.user){const{userId:e,apiKey:t,...n}=i.user;"userId"in i||(i.userId=""),"userId"in i&&(i.userId=e.toString()),i.xIntegryConfig||(i.xIntegryConfig={}),i.xIntegryConfig.appAuth||(i.xIntegryConfig.appAuth={}),i.xIntegryConfig.appAuth.extras||(i.xIntegryConfig.appAuth.extras={}),i.xIntegryConfig.appAuth.apiKey=(t||"").toString(),i.xIntegryConfig.appAuth.extras=n}const o={oauthVerifyPath:"auth/verify",endpointsUrl:"https://integry-app.appspot.com",baseUrl:n,baseUrlv2:`${n}/v2`,baseAPIUrl:"https://api.integry.io",apiKey:i.xIntegryConfig?.appAuth?.apiKey,authId:i.xIntegryConfig?.appAuth?.authId,extras:i.xIntegryConfig?.appAuth?.extras},s=i.options||i.userConfig||{};if(i.options&&i.payloads&&(i.options.objects=e.payloads),"appKey"in i)t={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId},this.config={...i,...o,appKey:i.appKey,hash:i.hash,userId:i.userId,deploymentId:i.deploymentId,userConfig:i.deploymentId?{...s,tags:s?.tags?[...s?.tags,`${i.deploymentId}`]:[`${i.deploymentId}`]}:s};else{const e=this.getAuthParamsFromUrl()||{};t={...o,...e},this.config={...o,...e,userConfig:i.userConfig}}this.authModalId=this.getRandomFlowId(6),this.apiHandler=new j(t),this.verifyAuthConfig().then((e=>{e?.config_verified?this.eventEmitter.emit("ready",{isReady:!0}):console.error("IntegrySDK: Auth config verification failed, are your auth parameters correct?")})).catch((e=>console.error(e))),this.initConfig={containerId:"",renderMode:Y.INLINE}}SDKFailedHandler=(e,t)=>{const n=e.options||e.userConfig||{},i=document.getElementById(t);throw i&&T(R`
|
|
7002
7004
|
<${nl}
|
|
7003
7005
|
message="SDK failed to load"
|
|
7004
7006
|
debug=${n.debug}
|
|
@@ -7275,4 +7277,21 @@ var e,t,n,i,o,s,a,l={},r=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]
|
|
|
7275
7277
|
fieldId=${n.fieldId}
|
|
7276
7278
|
enableTagify=${n.enableTagify}
|
|
7277
7279
|
/>`}
|
|
7278
|
-
</div>`,i):console.warn(`Integry SDK render target with id ${t} was not found`)};
|
|
7280
|
+
</div>`,i):console.warn(`Integry SDK render target with id ${t} was not found`)};renderFlowStep=(e,t,n)=>{const i=document.getElementById(e);if(i){const e=de();T(R`<div>
|
|
7281
|
+
<${ne.Provider}
|
|
7282
|
+
value=${{apiHandler:this.apiHandler,eventEmitter:this.eventEmitter,isPreviewMode:!1}}
|
|
7283
|
+
>
|
|
7284
|
+
<${B.Provider} store=${e} key=${this.getRandomFlowId(10)}>
|
|
7285
|
+
<${Xs}
|
|
7286
|
+
step=${t}
|
|
7287
|
+
stepType=${"CONFIGURE"}
|
|
7288
|
+
showStepValidation=${!1}
|
|
7289
|
+
apiHandler=${this.apiHandler}
|
|
7290
|
+
eventEmitter=${this.eventEmitter}
|
|
7291
|
+
isReadOnly="${!1}"
|
|
7292
|
+
selectedAuthId="${n}"
|
|
7293
|
+
accountConnected=${!0}
|
|
7294
|
+
/>
|
|
7295
|
+
<//>
|
|
7296
|
+
<//>
|
|
7297
|
+
</div>`,i)}else console.warn(`Integry SDK render target with id ${e} was not found`)};verifyAuthConfig=()=>this.apiHandler.verifyAuthConfig({deploymentId:this.config.deploymentId});getUserVariables=async()=>{try{const e=await this.apiHandler.getUserVariables();return e?e.results:[]}catch(e){return console.error(e),[]}};destroy=()=>{try{this.eventEmitter.offAll();const e=document.getElementById(this.authModalId);e&&e.remove()}catch(e){console.error("There was an error unsubscribing from all events")}};static setFieldValue=(e,t)=>{const n=document.getElementById(e)?.querySelector("input");if(n&&n instanceof HTMLInputElement){n.value=t;const e=new KeyboardEvent("keyup",{key:"a",bubbles:!0,cancelable:!0});n.dispatchEvent(e)}const i=document.getElementById(`tagify_${e}`);if(i&&i instanceof HTMLInputElement){i.value=t;const e=new KeyboardEvent("keyup",{key:"a",bubbles:!0,cancelable:!0});i.dispatchEvent(e)}};getMethod=()=>"POST";getBaseAPIUrl=()=>"https://api.integry.io";getHeaders=()=>({"Content-Type":"application/json"})}export{Rd as Helpers,Wd as IntegryJS,R as html};
|
package/dist/umd/index.umd.d.ts
CHANGED
|
@@ -697,6 +697,7 @@ declare class IntegryJS {
|
|
|
697
697
|
containerId: string;
|
|
698
698
|
multipurposeFieldProps: MultipurposeFieldType;
|
|
699
699
|
}) => void;
|
|
700
|
+
renderFlowStep: (containerId: string, step: any, connectedAccountId: string) => void;
|
|
700
701
|
verifyAuthConfig: () => Promise<{
|
|
701
702
|
config_verified: boolean;
|
|
702
703
|
meta: any;
|