Current File : /home/mdkeenpw/shafqattraders.com/wp-content/plugins/suretriggers/app/build/main.js
!function(){var e,t={293:function(e,t,n){const r=n(196),a=r.forwardRef((function({title:e,titleId:t,...n},a){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:a,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"}))}));e.exports=a},163:function(e,t,n){"use strict";var r=window.wp.element,a=n(196),o=n.n(a),i=window.ReactDOM,s=n.n(i);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,d,f,m,g,p=["type"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y,b,w={currentPage:"home",initials:[],siteContentAccessKey:(null===(u=sureTriggerData)||void 0===u||null===(d=u.siteContent)||void 0===d?void 0:d.accessKey)||"",suretriggercontentProjectID:(null===(f=sureTriggerData)||void 0===f||null===(m=f.siteContent)||void 0===m?void 0:m.projectID)||"",enabledIntegrations:null===(g=sureTriggerData)||void 0===g?void 0:g.enabledIntegrations,saveNotification:!1,projects:sureTriggerData.projects||[],notificationMessage:""},E=(0,a.createContext)(),x=function(){return(0,a.useContext)(E)};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}(b=y||(y={})).Pop="POP",b.Push="PUSH",b.Replace="REPLACE";const T="popstate";function _(e,t){if(!1===e||null==e)throw new Error(t)}function N(e,t){return{usr:e.state,key:e.key,idx:t}}function C(e,t,n,r){return void 0===n&&(n=null),O({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?k(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function S(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function k(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var R;function L(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(R||(R={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class j extends Error{}const I=["post","put","patch","delete"],A=(new Set(I),["get",...I]);function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(this,arguments)}new Set(A),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,Symbol("deferred");const M=a.createContext(null),B=a.createContext(null),F=a.createContext(null),z=a.createContext({outlet:null,matches:[],isDataRoute:!1});function K(){return null!=a.useContext(F)}function W(e){a.useContext(B).static||a.useLayoutEffect(e)}function H(){let{isDataRoute:e}=a.useContext(z);return e?function(){let{router:e}=function(e){let t=a.useContext(M);return t||_(!1),t}(G.UseNavigateStable),t=function(e){let t=function(e){let t=a.useContext(z);return t||_(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||_(!1),n.route.id}(Y.UseNavigateStable),n=a.useRef(!1);return W((()=>{n.current=!0})),a.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,U({fromRouteId:t},a)))}),[e,t])}():function(){K()||_(!1);let{basename:e,navigator:t}=a.useContext(B),{matches:n}=a.useContext(z),{pathname:r}=(K()||_(!1),a.useContext(F).location),o=JSON.stringify(function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(n).map((e=>e.pathnameBase))),i=a.useRef(!1);return W((()=>{i.current=!0})),a.useCallback((function(n,a){if(void 0===a&&(a={}),!i.current)return;if("number"==typeof n)return void t.go(n);let s=function(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=k(e):(a=O({},e),_(!a.pathname||!a.pathname.includes("?"),L("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),L("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),L("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(r||null==s)o=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?k(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:P(r),hash:D(a)}}(a,o),l=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!l&&!u||(c.pathname+="/"),c}(n,JSON.parse(o),r,"path"===a.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:[e,s.pathname].join("/").replace(/\/\/+/g,"/")),(a.replace?t.replace:t.push)(s,a.state,a)}),[e,t,o,r])}()}class q extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?React.createElement(z.Provider,{value:this.props.routeContext},React.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}var G,Y,Q,V,$;function J(e){let{basename:t="/",children:n=null,location:r,navigationType:o=y.Pop,navigator:i,static:s=!1}=e;K()&&_(!1);let c=t.replace(/^\/*/,"/"),l=a.useMemo((()=>({basename:c,navigator:i,static:s})),[c,i,s]);"string"==typeof r&&(r=k(r));let{pathname:u="/",search:d="",hash:f="",state:m=null,key:g="default"}=r,p=a.useMemo((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(u,c);return null==e?null:{location:{pathname:e,search:d,hash:f,state:m,key:g},navigationType:o}}),[c,u,d,f,m,g,o]);return null==p?null:a.createElement(B.Provider,{value:l},a.createElement(F.Provider,{children:n,value:p}))}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(G||(G={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(Y||(Y={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Q||(Q={})),new Promise((()=>{}));class X extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,a=Q.pending;if(n instanceof Promise)if(this.state.error){Q.error;let e=this.state.error;Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?void 0!==r._error?Q.error:void 0!==r._data?Q.success:Q.pending:(Q.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else Q.success,Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(a===Q.error&&r._error instanceof AbortedDeferredError)throw neverSettledPromise;if(a===Q.error&&!t)throw r._error;if(a===Q.error)return React.createElement(AwaitContext.Provider,{value:r,children:t});if(a===Q.success)return React.createElement(AwaitContext.Provider,{value:r,children:e});throw r}}function Z(e){let{basename:t,children:n,window:r}=e,o=a.useRef();var i;null==o.current&&(o.current=(void 0===(i={window:r,v5Compat:!0})&&(i={}),function(e,t,n,r){void 0===r&&(r={});let{window:a=document.defaultView,v5Compat:o=!1}=r,i=a.history,s=y.Pop,c=null,l=u();function u(){return(i.state||{idx:null}).idx}function d(){s=y.Pop;let e=u(),t=null==e?null:e-l;l=e,c&&c({action:s,location:m.location,delta:t})}function f(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:S(e);return _(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==l&&(l=0,i.replaceState(O({},i.state,{idx:l}),""));let m={get action(){return s},get location(){return e(a,i)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(T,d),c=e,()=>{a.removeEventListener(T,d),c=null}},createHref(e){return t(a,e)},createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=y.Push;let r=C(m.location,e,t);n&&n(r,e),l=u()+1;let d=N(r,l),f=m.createHref(r);try{i.pushState(d,"",f)}catch(e){a.location.assign(f)}o&&c&&c({action:s,location:m.location,delta:1})},replace:function(e,t){s=y.Replace;let r=C(m.location,e,t);n&&n(r,e),l=u();let a=N(r,l),d=m.createHref(r);i.replaceState(a,"",d),o&&c&&c({action:s,location:m.location,delta:0})},go(e){return i.go(e)}};return m}((function(e,t){let{pathname:n,search:r,hash:a}=e.location;return C("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:S(t)}),null,i)));let s=o.current,[c,l]=a.useState({action:s.action,location:s.location});return a.useLayoutEffect((()=>s.listen(l)),[s]),a.createElement(J,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:s})}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,_x,o,i=[],_n=!0,s=!1;try{if(_x=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(i.push(r.value),i.length!==t);_n=!0);}catch(e){s=!0,a=e}finally{try{if(!_n&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return i}}(e,t)||te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=re(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"}(V||(V={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}($||($={}));var ae=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=re(e))&&(r&&(r+=" "),r+=t);return r};function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ie(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function se(e){return"number"==typeof e&&!isNaN(e)}function ce(e){return"boolean"==typeof e}function le(e){return"string"==typeof e}function ue(e){return"function"==typeof e}function de(e){return le(e)||ue(e)?e:null}function fe(e){return 0===e||e}var me=!("undefined"==typeof window||!window.document||!window.document.createElement);function ge(e){return(0,a.isValidElement)(e)||le(e)||ue(e)||se(e)}var pe={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},he={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function ve(e){var t=e.enter,n=e.exit,r=e.appendPosition,i=void 0!==r&&r,s=e.collapse,c=void 0===s||s,l=e.collapseDuration,u=void 0===l?300:l;return function(e){var r=e.children,s=e.position,l=e.preventExitTransition,d=e.done,f=e.nodeRef,m=e.isIn,g=i?t+"--"+s:t,p=i?n+"--"+s:n,h=(0,a.useRef)(),v=(0,a.useRef)(0);function y(e){if(e.target===f.current){var t=f.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",y),t.removeEventListener("animationcancel",y),0===v.current&&(t.className=h.current)}}function b(){var e=f.current;e.removeEventListener("animationend",b),c?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=r+"px",a.transition="all "+n+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)}))}))}(e,d,u):d()}return(0,a.useLayoutEffect)((function(){var e;e=f.current,h.current=e.className,e.className+=" "+g,e.addEventListener("animationend",y),e.addEventListener("animationcancel",y)}),[]),(0,a.useEffect)((function(){m||(l?b():function(){v.current=1;var e=f.current;e.className+=" "+p,e.addEventListener("animationend",b)}())}),[m]),o().createElement(o().Fragment,null,r)}}var ye={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];this.list.has(e)&&this.list.get(e).forEach((function(n){var a=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(a)}))}},be=["delay","staleId"];function we(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Ee(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function xe(e){var t=e.closeToast,n=e.theme,r=e.ariaLabel,o=void 0===r?"close":r;return(0,a.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},(0,a.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Oe(e){var t,n,r=e.delay,o=e.isRunning,i=e.closeToast,s=e.type,c=e.hide,l=e.className,u=e.style,d=e.controlledProgress,f=e.progress,m=e.rtl,g=e.isIn,p=e.theme,h=oe({},u,{animationDuration:r+"ms",animationPlayState:o?"running":"paused",opacity:c?0:1});d&&(h.transform="scaleX("+f+")");var v=ae("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+p,"Toastify__progress-bar--"+s,((t={})["Toastify__progress-bar--rtl"]=m,t)),y=ue(l)?l({rtl:m,type:s,defaultClassName:v}):ae(v,l),b=((n={})[d&&f>=1?"onTransitionEnd":"onAnimationEnd"]=d&&f<1?null:function(){g&&i()},n);return(0,a.createElement)("div",Object.assign({role:"progressbar","aria-hidden":c?"true":"false","aria-label":"notification timer",className:y,style:h},b))}Oe.defaultProps={type:he.DEFAULT,hide:!1};var Te=["theme","type"],_e=function(e){var t=e.theme,n=e.type,r=ie(e,Te);return(0,a.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+n+")"},r))},Ne={info:function(e){return(0,a.createElement)(_e,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,a.createElement)(_e,Object.assign({},e),(0,a.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,a.createElement)(_e,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return(0,a.createElement)(_e,Object.assign({},e),(0,a.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return(0,a.createElement)("div",{className:"Toastify__spinner"})}},Ce=function(e){var t,n,r=function(e){var t=(0,a.useState)(!1),n=t[0],r=t[1],o=(0,a.useState)(!1),i=o[0],s=o[1],c=(0,a.useRef)(null),l=(0,a.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=(0,a.useRef)(e),d=e.autoClose,f=e.pauseOnHover,m=e.closeToast,g=e.onClick,p=e.closeOnClick;function h(t){if(e.draggable){l.didMove=!1,document.addEventListener("mousemove",w),document.addEventListener("mouseup",E),document.addEventListener("touchmove",w),document.addEventListener("touchend",E);var n=c.current;l.canCloseOnClick=!0,l.canDrag=!0,l.boundingRect=n.getBoundingClientRect(),n.style.transition="",l.x=we(t.nativeEvent),l.y=Ee(t.nativeEvent),"x"===e.draggableDirection?(l.start=l.x,l.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(l.start=l.y,l.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function v(){if(l.boundingRect){var t=l.boundingRect,n=t.top,r=t.bottom,a=t.left,o=t.right;e.pauseOnHover&&l.x>=a&&l.x<=o&&l.y>=n&&l.y<=r?b():y()}}function y(){r(!0)}function b(){r(!1)}function w(t){var r=c.current;l.canDrag&&r&&(l.didMove=!0,n&&b(),l.x=we(t),l.y=Ee(t),"x"===e.draggableDirection?l.delta=l.x-l.start:l.delta=l.y-l.start,l.start!==l.x&&(l.canCloseOnClick=!1),r.style.transform="translate"+e.draggableDirection+"("+l.delta+"px)",r.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function E(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",E);var t=c.current;if(l.canDrag&&l.didMove&&t){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,a.useEffect)((function(){u.current=e})),(0,a.useEffect)((function(){return c.current&&c.current.addEventListener("d",y,{once:!0}),ue(e.onOpen)&&e.onOpen((0,a.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;ue(e.onClose)&&e.onClose((0,a.isValidElement)(e.children)&&e.children.props)}}),[]),(0,a.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",b))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:h,onTouchStart:h,onMouseUp:v,onTouchEnd:v};return d&&f&&(x.onMouseEnter=b,x.onMouseLeave=y),p&&(x.onClick=function(e){g&&g(e),l.canCloseOnClick&&m()}),{playToast:y,pauseToast:b,isRunning:n,preventExitTransition:i,toastRef:c,eventHandlers:x}}(e),o=r.isRunning,i=r.preventExitTransition,s=r.toastRef,c=r.eventHandlers,l=e.closeButton,u=e.children,d=e.autoClose,f=e.onClick,m=e.type,g=e.hideProgressBar,p=e.closeToast,h=e.transition,v=e.position,y=e.className,b=e.style,w=e.bodyClassName,E=e.bodyStyle,x=e.progressClassName,O=e.progressStyle,T=e.updateId,_=e.role,N=e.progress,C=e.rtl,S=e.toastId,k=e.deleteToast,R=e.isIn,L=e.isLoading,P=e.icon,D=e.theme,j=ae("Toastify__toast","Toastify__toast-theme--"+D,"Toastify__toast--"+m,((t={})["Toastify__toast--rtl"]=C,t)),I=ue(y)?y({rtl:C,position:v,type:m,defaultClassName:j}):ae(j,y),A=!!N,U=Ne[m],M={theme:D,type:m},B=U&&U(M);return!1===P?B=void 0:ue(P)?B=P(M):(0,a.isValidElement)(P)?B=(0,a.cloneElement)(P,M):le(P)?B=P:L&&(B=Ne.spinner()),(0,a.createElement)(h,{isIn:R,done:k,position:v,preventExitTransition:i,nodeRef:s},(0,a.createElement)("div",Object.assign({id:S,onClick:f,className:I},c,{style:b,ref:s}),(0,a.createElement)("div",Object.assign({},R&&{role:_},{className:ue(w)?w({type:m}):ae("Toastify__toast-body",w),style:E}),B&&(0,a.createElement)("div",{className:ae("Toastify__toast-icon",(n={},n["Toastify--animate-icon Toastify__zoom-enter"]=!L,n))},B),(0,a.createElement)("div",null,u)),function(e){if(e){var t={closeToast:p,type:m,theme:D};return ue(e)?e(t):(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t):void 0}}(l),(d||A)&&(0,a.createElement)(Oe,Object.assign({},T&&!A?{key:"pb-"+T}:{},{rtl:C,theme:D,delay:d,isRunning:o,isIn:R,closeToast:p,hide:g,type:m,style:O,className:x,controlledProgress:A,progress:N}))))},Se=ve({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),ke=function(e){var t=function(e){var t=(0,a.useReducer)((function(e){return e+1}),0)[1],n=(0,a.useState)([]),r=n[0],o=n[1],i=(0,a.useRef)(null),s=(0,a.useRef)(new Map).current,c=function(e){return-1!==r.indexOf(e)},l=(0,a.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:c,getToast:function(e){return s.get(e)}}).current;function u(e){var t=e.containerId;!l.props.limit||t&&l.containerId!==t||(l.count-=l.queue.length,l.queue=[])}function d(e){o((function(t){return fe(e)?t.filter((function(t){return t!==e})):[]}))}function f(){var e=l.queue.shift();g(e.toastContent,e.toastProps,e.staleId)}function m(e,n){var r=n.delay,o=n.staleId,c=ie(n,be);if(ge(e)&&!function(e){return!i.current||l.props.enableMultiContainer&&e.containerId!==l.props.containerId||s.has(e.toastId)&&null==e.updateId}(c)){var u=c.toastId,m=c.updateId,p=c.data,h=l.props,v=function(){return d(u)},y=null==m;y&&l.count++;var b,w,E={toastId:u,updateId:m,isLoading:c.isLoading,theme:c.theme||h.theme,icon:null!=c.icon?c.icon:h.icon,isIn:!1,key:c.key||l.toastKey++,type:c.type,closeToast:v,closeButton:c.closeButton,rtl:h.rtl,position:c.position||h.position,transition:c.transition||h.transition,className:de(c.className||h.toastClassName),bodyClassName:de(c.bodyClassName||h.bodyClassName),style:c.style||h.toastStyle,bodyStyle:c.bodyStyle||h.bodyStyle,onClick:c.onClick||h.onClick,pauseOnHover:ce(c.pauseOnHover)?c.pauseOnHover:h.pauseOnHover,pauseOnFocusLoss:ce(c.pauseOnFocusLoss)?c.pauseOnFocusLoss:h.pauseOnFocusLoss,draggable:ce(c.draggable)?c.draggable:h.draggable,draggablePercent:c.draggablePercent||h.draggablePercent,draggableDirection:c.draggableDirection||h.draggableDirection,closeOnClick:ce(c.closeOnClick)?c.closeOnClick:h.closeOnClick,progressClassName:de(c.progressClassName||h.progressClassName),progressStyle:c.progressStyle||h.progressStyle,autoClose:!c.isLoading&&(b=c.autoClose,w=h.autoClose,!1===b||se(b)&&b>0?b:w),hideProgressBar:ce(c.hideProgressBar)?c.hideProgressBar:h.hideProgressBar,progress:c.progress,role:c.role||h.role,deleteToast:function(){s.delete(u);var e=l.queue.length;if(l.count=fe(u)?l.count-1:l.count-l.displayedToast,l.count<0&&(l.count=0),e>0){var n=fe(u)?1:l.props.limit;if(1===e||1===n)l.displayedToast++,f();else{var r=n>e?e:n;l.displayedToast=r;for(var a=0;a<r;a++)f()}}else t()}};ue(c.onOpen)&&(E.onOpen=c.onOpen),ue(c.onClose)&&(E.onClose=c.onClose),E.closeButton=h.closeButton,!1===c.closeButton||ge(c.closeButton)?E.closeButton=c.closeButton:!0===c.closeButton&&(E.closeButton=!ge(h.closeButton)||h.closeButton);var x=e;(0,a.isValidElement)(e)&&!le(e.type)?x=(0,a.cloneElement)(e,{closeToast:v,toastProps:E,data:p}):ue(e)&&(x=e({closeToast:v,toastProps:E,data:p})),h.limit&&h.limit>0&&l.count>h.limit&&y?l.queue.push({toastContent:x,toastProps:E,staleId:o}):se(r)&&r>0?setTimeout((function(){g(x,E,o)}),r):g(x,E,o)}}function g(e,t,n){var r=t.toastId;n&&s.delete(n),s.set(r,{content:e,props:t}),o((function(e){return[].concat(e,[r]).filter((function(e){return e!==n}))}))}return(0,a.useEffect)((function(){return l.containerId=e.containerId,ye.cancelEmit(3).on(0,m).on(1,(function(e){return i.current&&d(e)})).on(5,u).emit(2,l),function(){return ye.emit(3,l)}}),[]),(0,a.useEffect)((function(){l.isToastActive=c,l.displayedToast=r.length,ye.emit(4,r.length,e.containerId)}),[r]),(0,a.useEffect)((function(){l.props=e})),{getToastToRender:function(t){var n=new Map,r=Array.from(s.values());return e.newestOnTop&&r.reverse(),r.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:i,isToastActive:c}}(e),n=t.getToastToRender,r=t.containerRef,o=t.isToastActive,i=e.className,s=e.style,c=e.rtl,l=e.containerId;function u(e){var t,n=ae("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=c,t));return ue(i)?i({position:e,rtl:c,defaultClassName:n}):ae(n,de(i))}return(0,a.createElement)("div",{ref:r,className:"Toastify",id:l},n((function(e,t){var n=t.length?oe({},s):oe({},s,{pointerEvents:"none"});return(0,a.createElement)("div",{className:u(e),style:n,key:"container-"+e},t.map((function(e){var t=e.content,n=e.props;return(0,a.createElement)(Ce,Object.assign({},n,{isIn:o(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?xe:n.closeButton}),t)})))})))};ke.defaultProps={position:pe.TOP_RIGHT,transition:Se,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:xe,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Re,Le,Pe,De=new Map,je=[],Ie=!1;function Ae(){return Math.random().toString(36).substring(2,9)}function Ue(e){return e&&(le(e.toastId)||se(e.toastId))?e.toastId:Ae()}function Me(e,t){return De.size>0?ye.emit(0,e,t):(je.push({content:e,options:t}),Ie&&me&&(Ie=!1,Le=document.createElement("div"),document.body.appendChild(Le),(0,i.render)((0,a.createElement)(ke,Object.assign({},Pe)),Le))),t.toastId}function Be(e,t){return oe({},t,{type:t&&t.type||e,toastId:Ue(t)})}function Fe(e){return function(t,n){return Me(t,Be(e,n))}}function ze(e,t){return Me(e,Be(he.DEFAULT,t))}ze.loading=function(e,t){return Me(e,Be(he.DEFAULT,oe({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},ze.promise=function(e,t,n){var r,a=t.pending,o=t.error,i=t.success;a&&(r=le(a)?ze.loading(a,n):ze.loading(a.render,oe({},n,a)));var s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=function(e,t,a){if(null!=t){var o=oe({type:e},s,n,{data:a}),i=le(t)?{render:t}:t;return r?ze.update(r,oe({},o,i)):ze(i.render,oe({},o,i)),a}ze.dismiss(r)},l=ue(e)?e():e;return l.then((function(e){return c("success",i,e)})).catch((function(e){return c("error",o,e)})),l},ze.success=Fe(he.SUCCESS),ze.info=Fe(he.INFO),ze.error=Fe(he.ERROR),ze.warning=Fe(he.WARNING),ze.warn=ze.warning,ze.dark=function(e,t){return Me(e,Be(he.DEFAULT,oe({theme:"dark"},t)))},ze.dismiss=function(e){return ye.emit(1,e)},ze.clearWaitingQueue=function(e){return void 0===e&&(e={}),ye.emit(5,e)},ze.isActive=function(e){var t=!1;return De.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},ze.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=De.get(n||Re);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,a=n.content,o=oe({},r,t,{toastId:t.toastId||e,updateId:Ae()});o.toastId!==e&&(o.staleId=e);var i=o.render||a;delete o.render,Me(i,o)}}),0)},ze.done=function(e){ze.update(e,{progress:1})},ze.onChange=function(e){return ue(e)&&ye.on(4,e),function(){ue(e)&&ye.off(4,e)}},ze.configure=function(e){void 0===e&&(e={}),Ie=!0,Pe=e},ze.POSITION=pe,ze.TYPE=he,ye.on(2,(function(e){Re=e.containerId||e,De.set(Re,e),je.forEach((function(e){ye.emit(0,e.content,e.options)})),je=[]})).on(3,(function(e){De.delete(e.containerId||e),0===De.size&&ye.off(0).off(1).off(5),me&&Le&&document.body.removeChild(Le)}));var Ke=window.wp.apiFetch,We=n.n(Ke),He=window.wp.i18n;function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ge=function(){var e=H(),t=x(),n=ne(t,2),o=(n[0].notificationMessage,n[1]),i=function(){var e=ne((0,a.useState)(!1),2),t=e[0],n=e[1];return(0,a.useEffect)((function(){var e=document.documentElement.getAttribute("dir");n("rtl"===e)}),[]),t}();(0,a.useEffect)((function(){var t=new URLSearchParams(window.location.search),n=t.get("message-data")||"";n&&o({type:"set",saveNotification:!0,notificationMessage:n});var r=function(e,t){var n,r=[],a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(a.s();!(n=a.n()).done;){var o=ne(n.value,2),i=o[0],s=o[1];if("page"===i){var c="".concat(i,"=").concat(s);r.push(c)}}}catch(e){a.e(e)}finally{a.f()}return r.toString()}(0,t);e(window.location.pathname+"?"+r)}),[]);var s=sureTriggerData.siteContent,c=s.connectUrl,l=s.connectNonce,u=s.siteUrl,d=s.siteTitle,f=s.sourceType,m=(s.adminLanguage,(sureTriggerData.stSaasURL?new URL(sureTriggerData.stSaasURL):{}).origin);return window.addEventListener("message",(function(e){var t,n,r,a;if(e.origin===m){var o,i;if("changeAccount"===(null===(t=e.data)||void 0===t?void 0:t.playload)&&(!1,(o=new URLSearchParams).set("url",u),o.set("redirect",window.location.href),o.set("connectNonce",l),o.set("sc-authorize",!0),o.set("site-title",d),o.set("source_type",f),window.open("".concat(c,"?").concat(o.toString()),"_self")),"accountDisconnect"===(null===(n=e.data)||void 0===n?void 0:n.playload)&&(i=We()({method:"POST",headers:{"ST-Authorization":"Bearer "+sureTriggerData.siteContent.accessKey},data:{testData:"TestData"},path:sureTriggerData.apiSlug+"/connection/disconnect"}).then((function(e){ze.dismiss(),e.success?(ze.success("Connection disconnected",{delay:650}),location.reload()):ze.error("Request was not success",{delay:650})})),ze.promise(i,{pending:(0,He.__)("Disconnecting","suretriggers"),error:(0,He.__)("Something went wrong! please try again later","suretriggers")})),"resetURL"===(null===(r=e.data)||void 0===r?void 0:r.playload)){var s,g=null===(s=e.data)||void 0===s?void 0:s.resetURL,p=new URL(g,window.location.origin);p.origin===window.location.origin&&p.pathname.startsWith("/")&&(window.location.href=p.pathname+p.search+p.hash)}"windowReload"===(null===(a=e.data)||void 0===a?void 0:a.playload)&&location.reload()}}),!1),(0,r.createElement)("div",null,(0,r.createElement)("iframe",{id:i?"st-iframe-rtl":"st-iframe",title:"SAAS Dashboard",name:"saas_dashboard",allow:"clipboard-write",frameborder:"0",src:"".concat(sureTriggerData.stSaasURL,"?path=dashboard&st-code=").concat(t[0].siteContentAccessKey,"&base_url=").concat(sureTriggerData.siteContent.siteUrl,"&reset_url=").concat(sureTriggerData.siteContent.resetUrl,"&admin_lang=").concat(sureTriggerData.siteContent.adminLanguage)}),(0,r.createElement)(ke,{position:"bottom-right"}))},Ye=function(){var e=sureTriggerData.siteContent,t=e.connectUrl,n=e.connectNonce,r=e.siteUrl,a=e.siteTitle,o=e.sourceType,i=new URLSearchParams;i.set("url",r),i.set("redirect",window.location.href),i.set("connectNonce",n),i.set("sc-authorize",!0),i.set("site-title",a),i.set("source_type",o),window.open("".concat(t,"?").concat(i.toString()),"_self")},Qe=n(293),Ve=function(){return(0,r.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/AutomateRepetiveTasks.svg"),alt:"OttoKit"})},$e=function(){return(0,r.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/SaveTimeMoney.svg"),alt:"OttoKit"})},Je=function(){return(0,r.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/manage.svg"),alt:"OttoKit"})},Xe=function(){return(0,r.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/drag.svg"),alt:"OttoKit"})},Ze=function(){return(0,r.createElement)("img",{className:"block h-7 w-7 mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/increase.svg"),alt:"OttoKit"})},et=function(){return(0,r.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/smile.svg"),alt:"OttoKit"})},tt=function(){var e=[{name:"Automate Repetitive Tasks",description:"Create workflows that connect different apps and perform actions based on specific triggers.",icon:Ve},{name:"Save Time & Money",description:"OttoKit can help you save time and increase productivity by automating repetitive tasks.",icon:$e},{name:"Manage Data Effectively",description:"Use OttoKit to organize and manage your data by consolidating it from multiple apps into one location",icon:Je},{name:"Just Drag & Drop",description:"Integrate your apps and build workflows from drag and drop builder. No coding skills required.",icon:Xe},{name:"Increase Your Efficiency",description:"Automate workflows and reduce the need for manual data entry. Increasing your efficiency.",icon:Ze},{name:"Reduce Errors",description:"Automate your tasks easily and reduce the risk of human error. Improve accuracy and reliability.",icon:et}];return(0,a.useEffect)((function(){var e=document.querySelector("#wpadminbar ");e&&(e.style.display="none");var t=document.querySelector("html.wp-toolbar");t&&(t.style.padding="0");var n=document.querySelector("#wpbody-content");n&&(n.style.paddingBottom="0");var r=document.querySelector("#wpcontent");r&&(r.style.marginLeft="0");var a=document.querySelector("#adminmenuwrap");a&&(a.style.display="none");var o=document.querySelector("#adminmenuback");o&&(o.style.display="none");var i=document.querySelector("#wpfooter");i&&(i.style.display="none",i.style.marginLeft="0")}),[]),(0,r.createElement)("div",{className:"w-full bg-[#F8FAFC] flex"},(0,r.createElement)("div",{className:"max-w-[856px] shadow-xl rounded mx-auto mt-16 mb-40 bg-white text-center py-12"},(0,r.createElement)("img",{className:"block h-12 w-auto mx-auto mb-8",src:"".concat(sureTriggerData.stPluginURL,"assets/images/OttoKitLogoDarkLightBG.svg"),alt:"OttoKit"}),(0,r.createElement)("div",{className:"max-w-[560px] m-auto mb-6"},sureTriggerData.reConnectSorryMsg&&(0,r.createElement)("div",{className:"bg-teal-100 rounded-b text-teal-900 px-4 py-3 shadow-md",role:"alert"},(0,r.createElement)("p",{className:"font-bold"}," ","We have recently updated our Authorization process."," "),(0,r.createElement)("p",{className:"text-sm"},(0,r.createElement)("p",null,"Your all previous work is safe with us."),(0,r.createElement)("p",null," You need to re-connect this site."))),(0,r.createElement)("div",{className:"flex flex-col m-auto mb-6"},(0,r.createElement)("h1",{className:"text-app-heading text-2xl leading-7 font-bold mb-4"},"Welcome to the OttoKit Setup Wizard!"),(0,r.createElement)("p",{className:"text-sm text-app-text"},"OttoKit is a powerful workflow platform that helps you connect your various plugins and apps together. It allows you to automate repetitive tasks, so you can focus on more important work."))),(0,r.createElement)("div",{className:"flex flex-col items-center justify-center"},(0,r.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-4 py-3 mb-4 w-80 gap-3 rounded-[3px] justify-center border border-transparent text-sm font-medium rounded text-white bg-app-primary focus:outline-none",onClick:function(){Ye()}},(0,r.createElement)("span",{className:"text-base font-medium"},"Get Started Now"),(0,r.createElement)(Qe,{className:"h-5 w-5 text-white","aria-hidden":"true"})),(0,r.createElement)("a",{href:"".concat(window.origin,"/wp-admin"),className:"text-app-inactive-icon tex-[13px] underline leading-6"},"Go Back to the dashboard"),(0,r.createElement)("div",{className:"m-auto mt-8 mb-10 mx-12"},(0,r.createElement)("iframe",{width:"560",height:"315",src:"https://www.youtube-nocookie.com/embed/MpxE2p8piSw?controls=0",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}))),(0,r.createElement)("div",{className:"bg-app-secondary py-10 px-12 mb-10"},(0,r.createElement)("div",{className:"mx-auto max-w-7xl"},(0,r.createElement)("div",{className:"grid grid-cols-1 gap-x-5 gap-y-6 md:grid-cols-2 "},e.map((function(e){return(0,r.createElement)("div",{key:e.name,className:"relative flex flex-col gap-3 sm:flex-row"},(0,r.createElement)(e.icon,{className:"h-7 w-7 text-app-heading","aria-hidden":"true"}),(0,r.createElement)("div",{className:"sm:min-w-0 sm:flex-1 text-left  space-y-2"},(0,r.createElement)("p",{className:"text-lg font-medium text-app-heading"},e.name),(0,r.createElement)("p",{className:"text-base leading-6 text-app-text"},e.description)))}))))),(0,r.createElement)("h2",{className:"text-app-heading text-2xl font-bold leading-6 mb-12"},"Trusted by Worlds Top Brands to Connect Their Apps"),(0,r.createElement)("img",{className:"w-auto mx-auto mb-12 max-w-[760px]",src:"".concat(sureTriggerData.stPluginURL,"assets/images/logogrids.png"),alt:"OttoKit"}),(0,r.createElement)("div",{className:"flex flex-col items-center justify-center"},(0,r.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-4 py-3 mb-4 w-80 gap-3 rounded-[3px] justify-center border border-transparent text-sm font-medium rounded text-white bg-app-primary focus:outline-none",onClick:function(){Ye()}},(0,r.createElement)("span",{className:"text-base font-medium"},"Get Started Now"),(0,r.createElement)(Qe,{className:"h-5 w-5 text-white","aria-hidden":"true"})),(0,r.createElement)("a",{href:"".concat(window.origin,"/wp-admin"),className:"text-app-inactive-icon tex-[13px] underline leading-6"},"Go Back to the dashboard"))))};function nt(e,t,n,r,a,o,i){try{var s=e[o](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,a)}function rt(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){nt(o,r,a,i,s,"next",e)}function s(e){nt(o,r,a,i,s,"throw",e)}i(void 0)}))}}function at(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ot=window.regeneratorRuntime,it=n.n(ot);const st=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,t,n)=>n?n.toUpperCase():t.toLowerCase())))(e);return t.charAt(0).toUpperCase()+t.slice(1)},ct=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim(),lt=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var ut={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const dt=(0,a.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...c},l)=>(0,a.createElement)("svg",{ref:l,...ut,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ct("lucide",o),...!i&&!lt(c)&&{"aria-hidden":"true"},...c},[...s.map((([e,t])=>(0,a.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),ft=(e,t)=>{const n=(0,a.forwardRef)((({className:n,...r},o)=>{return(0,a.createElement)(dt,{ref:o,iconNode:t,className:ct(`lucide-${i=st(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i}));return n.displayName=st(e),n},mt=ft("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),gt=ft("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var pt=function(){var e,t,n=(0,a.useRef)(null),o=(0,a.useRef)(null),i=ne((0,a.useState)(""),2),s=i[0],c=i[1],l=ne((0,a.useState)(""),2),u=l[0],d=l[1],f=(0,a.useMemo)((function(){var e,t=new Map;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersList)||[]).forEach((function(e){t.set(String(e.ID||e.id),e)})),t}),[]),m=(0,a.useMemo)((function(){var e,t=new Map;return Object.entries((null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersRoles)||{}).forEach((function(e){var n=ne(e,2),r=n[0],a=n[1];t.set(r,a)})),t}),[]),g=(0,a.useMemo)((function(){var e;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.enabledUsers)||[]).map((function(e){var t=f.get(String(e));return t?t.display_name:""})).filter((function(e){return""!==e}))}),[f]),p=(0,a.useMemo)((function(){var e;return((null===(e=window.sureTriggerData)||void 0===e?void 0:e.enabledUserRoles)||[]).map((function(e){return m.get(e)||""})).filter((function(e){return""!==e}))}),[m]),h=ne((0,a.useState)(g),2),v=h[0],y=h[1],b=ne((0,a.useState)(p),2),w=b[0],E=b[1],x=ne((0,a.useState)(!1),2),O=x[0],T=x[1],_=ne((0,a.useState)(!1),2),N=_[0],C=_[1],S=ne((0,a.useState)(""),2),k=S[0],R=S[1],L=ne((0,a.useState)(!1),2),P=L[0],D=L[1],j=ne((0,a.useState)(!1),2),I=j[0],A=j[1],U=ne((0,a.useState)(!1),2),M=U[0],B=U[1],F=(null===(e=window.sureTriggerData)||void 0===e?void 0:e.usersList)||[],z=(null===(t=window.sureTriggerData)||void 0===t?void 0:t.usersRoles)||{},K=(0,a.useMemo)((function(){return F.filter((function(e){return!v.includes(e.display_name)}))}),[F,v]),W=(0,a.useMemo)((function(){return Object.entries(z).filter((function(e){var t=ne(e,2),n=(t[0],t[1]);return!w.includes(n)}))}),[z,w]),H=(0,a.useMemo)((function(){return K.filter((function(e){return e.display_name.toLowerCase().includes(s.toLowerCase())}))}),[K,s]),q=(0,a.useMemo)((function(){return W.filter((function(e){var t=ne(e,2);return t[0],t[1].toLowerCase().includes(u.toLowerCase())}))}),[W,u]),G=(0,a.useCallback)((function(e){y((function(t){return[].concat(at(t),[e.display_name])})),D(!1)}),[]),Y=(0,a.useCallback)((function(e){y((function(t){return t.filter((function(t){return t!==e}))}))}),[]),Q=(0,a.useCallback)((function(e){var t=ne(e,2),n=(t[0],t[1]);E((function(e){return[].concat(at(e),[n])})),A(!1)}),[]),V=(0,a.useCallback)((function(e){E((function(t){return t.filter((function(t){return t!==e}))}))}),[]),$=(0,a.useCallback)((function(e){return"string"!=typeof e?"":e.replace(/[<>]/g,"")}),[]),J=(0,a.useCallback)((function(){var e,t=new FormData;t.append("action","suretriggers_save_settings");var n=new Map;F.forEach((function(e){n.set(e.display_name,String(e.ID||e.id))}));var r=new Map;return Object.entries(z).forEach((function(e){var t=ne(e,2),n=t[0],a=t[1];r.set(a,n)})),v.length>0?v.forEach((function(e){var r=n.get(e);r&&t.append("st_selected_users[]",$(r))})):t.append("st_selected_users",""),w.length>0?w.forEach((function(e){var n=r.get(e);n&&t.append("st_selected_user_roles[]",$(n))})):t.append("st_selected_user_roles",""),t.append("st_submit_user_roles",!0),t.append("suretriggers_settings_nonce",(null===(e=window.sureTriggerData)||void 0===e?void 0:e.settingsNonce)||""),t}),[F,z,v,w,$]),X=(0,a.useCallback)((function(){B(!0)}),[]),Z=(0,a.useCallback)(rt(it().mark((function e(){var t,n,r,a,o,i;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),R(""),B(!1),e.prev=3,n=J(),r=(null===(t=window.sureTriggerData)||void 0===t?void 0:t.ajaxurl)||("undefined"!=typeof ajaxurl?ajaxurl:"/wp-admin/admin-ajax.php"),e.next=8,fetch(r,{method:"POST",body:n,credentials:"same-origin"});case 8:if((a=e.sent).ok){e.next=11;break}throw new Error("HTTP error! Status: ".concat(a.status));case 11:return e.next=13,a.json();case 13:(o=e.sent).success?(R((0,He.__)("Settings saved successfully!","suretriggers")),C(!0)):R((null===(i=o.data)||void 0===i?void 0:i.message)||(0,He.__)("Failed to save settings. Please try again.","suretriggers")),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),R((0,He.__)("Network error. Please check your connection and try again.","suretriggers"));case 20:return e.prev=20,T(!1),setTimeout((function(){return C(!1)}),3e3),setTimeout((function(){return R("")}),3e3),e.finish(20);case 25:case"end":return e.stop()}}),e,null,[[3,17,20,25]])}))),[J]),ee=(0,a.useCallback)((function(e){n.current&&!n.current.contains(e.target)&&D(!1),o.current&&!o.current.contains(e.target)&&A(!1)}),[]),te=0===v.length?(0,He.__)("no users","suretriggers"):1===v.length?(0,He.__)("user","suretriggers"):(0,He.__)("users","suretriggers"),re=0===w.length?(0,He.__)("no roles","suretriggers"):1===w.length?(0,He.__)("role","suretriggers"):(0,He.__)("roles","suretriggers");return(0,a.useEffect)((function(){return document.addEventListener("mousedown",ee),function(){document.removeEventListener("mousedown",ee)}}),[ee]),(0,a.useEffect)((function(){P||c("")}),[P]),(0,a.useEffect)((function(){I||d("")}),[I]),(0,r.createElement)("div",{className:"p-12 bg-gray-50 min-h-screen"},(0,r.createElement)("div",{className:" bg-white p-6 rounded-lg border border-gray-200 w-full"},(0,r.createElement)("h1",{className:"text-2xl font-semibold mb-6"},(0,He.__)("Control who can access the OttoKit Interface","suretriggers")),(0,r.createElement)("div",{className:"mb-6"},(0,r.createElement)("p",{className:"text-gray-600"},(0,He.__)("Only administrators can access OttoKit by default. Use the options below to grant access to other users or roles. Anyone not added here won’t see OttoKit in their WordPress admin menu.","suretriggers"))),(0,r.createElement)("div",{className:"mb-4"},(0,r.createElement)("label",{className:"block text-sm font-semibold text-gray-700 mb-2"},(0,He.__)("Select Users","suretriggers")),(0,r.createElement)("div",{className:"relative",ref:n},(0,r.createElement)("input",{type:"text",placeholder:(0,He.__)("Select users who can view and access the OttoKit interface.","suretriggers"),className:"w-full lg:w-1/2 max-w-full px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1e3b8a] placeholder:text-xs placeholder:font-medium placeholder:text-slate-400",onFocus:function(){return D(!0)},onChange:function(e){return c(e.target.value)},value:s}),P&&(0,r.createElement)("ul",{className:"absolute z-10 w-full lg:w-1/2 max-w-full bg-white border border-gray-300 rounded-md mt-1 shadow-lg max-h-40 overflow-y-auto"},H.length>0?H.map((function(e){return(0,r.createElement)("li",{key:e.id,className:"p-2 hover:bg-blue-100 cursor-pointer flex items-center",onMouseDown:function(){return G(e)}},e.display_name)})):(0,r.createElement)("li",{className:"p-2 text-gray-500 text-center"},(0,He.__)("No options","suretriggers")))),(0,r.createElement)("div",{className:"mt-2 flex flex-wrap gap-2"},v.map((function(e){return(0,r.createElement)("div",{key:e,className:"flex items-center bg-gray-100 px-3 py-1 rounded-full"},(0,r.createElement)("span",null,e),(0,r.createElement)("button",{onClick:function(){return Y(e)},className:"ml-1 aspect-square px-1 text-gray-500 hover:text-gray-700 hover:rounded-full hover:bg-red-200"},"✕"))})))),(0,r.createElement)("div",{className:"mb-4"},(0,r.createElement)("label",{className:"block text-sm font-semibold text-gray-700 mb-2"},(0,He.__)("Select Roles","suretriggers")),(0,r.createElement)("div",{className:"relative",ref:o},(0,r.createElement)("input",{type:"text",placeholder:(0,He.__)("Select user roles who can view and access the OttoKit interface.","suretriggers"),className:"w-full lg:w-1/2 max-w-full px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1e3b8a] placeholder:text-xs placeholder:font-medium placeholder:text-slate-400",onFocus:function(){return A(!0)},onChange:function(e){return d(e.target.value)},value:u}),I&&(0,r.createElement)("ul",{className:"absolute z-10 w-full lg:w-1/2 max-w-full bg-white border border-gray-300 rounded-md mt-1 shadow-lg max-h-40 overflow-y-auto"},q.length>0?q.map((function(e){var t=ne(e,2),n=t[0],a=t[1];return(0,r.createElement)("li",{key:n,className:"p-2 hover:bg-blue-100 cursor-pointer flex items-center",onMouseDown:function(){return Q([n,a])}},a)})):(0,r.createElement)("li",{className:"p-2 text-gray-500 text-center"},(0,He.__)("No options","suretriggers")))),(0,r.createElement)("div",{className:"mt-2 flex flex-wrap gap-2"},w.map((function(e){return(0,r.createElement)("div",{key:e,className:"flex items-center bg-gray-100 px-3 py-1 rounded-full"},(0,r.createElement)("span",null,e),(0,r.createElement)("button",{onClick:function(){return V(e)},className:"ml-1 aspect-square px-1 text-gray-500 hover:text-gray-700 hover:rounded-full hover:bg-red-200"},"✕"))})))),(0,r.createElement)("div",null,(0,r.createElement)("button",{className:"bg-[#145384] disabled:cursor-not-allowed disabled:opacity-50 text-white px-4 py-2 text-base font-medium rounded-md hover:bg-[#0f4c6b]/90 h-10 w-21 flex justify-center items-center",onClick:X,disabled:O},O?(0,r.createElement)(mt,{className:"h-4 w-4 animate-spin"}):N?(0,r.createElement)(gt,{className:"w-5 h-4 text-white","aria-hidden":"true"}):(0,He.__)("Save","suretriggers")),k&&(0,r.createElement)("p",{className:"mt-2 text-sm ".concat(k.includes("success")?"text-green-600":"text-red-600")},k)),(0,r.createElement)("p",{className:"text-sm text-[#64748b] mt-4 font-normal"},(0,r.createElement)("strong",null,(0,He.__)("Note:","suretriggers"))," ",(0,He.__)("Administrators already have full access by default - you don’t need to add them here.","suretriggers")),M&&(0,r.createElement)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},(0,r.createElement)("div",{className:"bg-white p-6 rounded-lg shadow-lg max-w-md w-full"},(0,r.createElement)("h3",{className:"text-lg font-medium mb-4",style:{color:0===v.length&&0===w.length?"#d32f2f":"#2e7d32"}},0===v.length&&0===w.length?(0,He.__)("Confirm Access Removal","suretriggers"):(0,He.__)("Confirm Access Grant","suretriggers")),(0,r.createElement)("p",{className:"text-sm text-gray-600 mb-4"},0===v.length&&0===w.length?(0,He.__)("You are about to remove all non-administrator access to the OttoKit Interface. After this change, only administrators will be able to access OttoKit from their WordPress dashboard. Are you sure you want to restrict access to administrators only?","suretriggers"):(0,He.__)("By continuing, the selected","suretriggers")+" "+te+" "+(0,He.__)("and","suretriggers")+" "+re+" "+(0,He.__)("will be able to access and view the OttoKit Interface from their WordPress dashboard. Are you sure you want to allow this?","suretriggers")),(0,r.createElement)("div",{className:"flex justify-end gap-3"},(0,r.createElement)("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200",onClick:function(){return B(!1)}},(0,He.__)("Cancel","suretriggers")),(0,r.createElement)("button",{className:"px-4 py-2 text-sm font-medium text-white rounded-md ".concat(0===v.length&&0===w.length?"bg-[#d32f2f] hover:bg-[#b71c1c]":"bg-[#145384] hover:bg-[#0f4c6b]"),onClick:Z},0===v.length&&0===w.length?(0,He.__)("Remove Access","suretriggers"):(0,He.__)("Grant Access","suretriggers")))))))},ht=("page",new URL(window.location.href).searchParams.get("page"));document.getElementById("sure-triggger-entry")&&s().render((0,r.createElement)((function(e){var t=e.reducer,n=e.initialState,o=e.children;return(0,r.createElement)(E.Provider,{value:(0,a.useReducer)(t,n)},o)}),{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,p);return"set"===n?v(v({},e),r):e},initialState:w},(0,r.createElement)((function(){var e,t;return"suretriggers"===ht&&(e=""!==(t=ne(x(),1)[0].siteContentAccessKey)&&null!==t&&!1!==t&&"connection-denied"!==t?(0,r.createElement)("div",{className:"dashboard-container"},(0,r.createElement)(Ge,null)):(0,r.createElement)(tt,null)),"ottokit-settings"===ht&&(e=(0,r.createElement)(pt,null)),(0,r.createElement)(Z,null,e)}),null)),document.getElementById("sure-triggger-entry"));var vt=document.getElementById("ottokit-settings-page");vt&&s().render((0,r.createElement)(pt,null),vt)},196:function(e){"use strict";e.exports=window.React}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=function(t,n,a,o){if(!n){var i=1/0;for(u=0;u<e.length;u++){n=e[u][0],a=e[u][1],o=e[u][2];for(var s=!0,c=0;c<n.length;c++)(!1&o||i>=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[c])}))?n.splice(c--,1):(s=!1,o<i&&(i=o));if(s){e.splice(u--,1);var l=a();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,a,o]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={179:0,278:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,o,i=n[0],s=n[1],c=n[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(c)var u=c(r)}for(t&&t(n);l<i.length;l++)o=i[l],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=self.webpackChunksuretriggers=self.webpackChunksuretriggers||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var a=r.O(void 0,[278],(function(){return r(163)}));a=r.O(a)}();