PageSourceSearch

https://connectappypie.com/main-es2015.0f0c66ca75cee50c6c78.js

js connectappypie.com collected 2026-10-08 12:49:12 UTC 3,632,013 bytes, 1 lines download raw bytes

1var Wie=Object.defineProperty,Kie=Object.defineProperties,Xie=Object.getOwnPropertyDescriptors,eA=Object.getOwnPropertySymbols,XZ=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,CO=(t,e,n)=>e in t?Wie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ht=(t,e)=>{for(var n in e||(e={}))XZ.call(e,n)&&CO(t,n,e[n]);if(eA)for(var n of eA(e))eS.call(e,n)&&CO(t,n,e[n]);return t},Ji=(t,e)=>Kie(t,Xie(e)),tS=(t,e)=>{var n={};for(var i in t)XZ.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&eA)for(var i of eA(t))e.indexOf(i)<0&&eS.call(t,i)&&(n[i]=t[i]);return n},Oi=(t,e,n)=>(CO(t,"symbol"!=typeof e?e+"":e,n),n);(self.webpackChunkclient=self.webpackChunkclient||[]).push([[179],{8255:function(t){function e(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}e.keys=function(){return[]},e.resolve=e,e.id=8255,t.exports=e},4364:function(t,e,n){"use strict";n.d(e,{mr:function(){return _},ez:function(){return Lt},K0:function(){return c},uU:function(){return Nt},JJ:function(){return qt},x:function(){return O},Do:function(){return w},V_:function(){return u},Ye:function(){return y},S$:function(){return b},mk:function(){return vt},sg:function(){return xt},O5:function(){return Ct},PC:function(){return Ot},RF:function(){return Zt},n9:function(){return kt},ED:function(){return Tt},tP:function(){return Mt},b0:function(){return C},Zx:function(){return Ut},lw:function(){return l},OU:function(){return Dt},rS:function(){return Pt},Tn:function(){return M},EM:function(){return Rt},JF:function(){return Ht},p6:function(){return G},Mn:function(){return N},ol:function(){return P},UT:function(){return q},NF:function(){return jt},w_:function(){return a},bD:function(){return Jt},q:function(){return r},Mx:function(){return mt},HT:function(){return s}});var i=n(2316);let o=null;function r(){return o}function s(t){o||(o=t)}class a{}const c=new i.OlP("DocumentToken");let l=(()=>{class t{historyGo(t){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:d,token:t,providedIn:"platform"}),t})();function d(){return(0,i.LFG)(p)}const u=new i.OlP("Location Initialized");let p=(()=>{class t extends l{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return r().getBaseHref(this._doc)}onPopState(t){const e=r().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){const e=r().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){h()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){h()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(c))},t.\u0275prov=(0,i.Yz7)({factory:g,token:t,providedIn:"platform"}),t})();function h(){return!!window.history.pushState}function g(){return new p((0,i.LFG)(c))}function f(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function v(t){return t&&"?"!==t[0]?"?"+t:t}let b=(()=>{class t{historyGo(t){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:x,token:t,providedIn:"root"}),t})();function x(t){const e=(0,i.LFG)(c).location;return new C((0,i.LFG)(l),e&&e.origin||"")}const _=new i.OlP("appBaseHref");let C=(()=>{class t extends b{constructor(t,e){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.on
1HashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return f(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+v(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,i){const o=this.prepareExternalUrl(n+v(i));this._platformLocation.pushState(t,e,o)}replaceState(t,e,n,i){const o=this.prepareExternalUrl(n+v(i));this._platformLocation.replaceState(t,e,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var e,n;null===(n=(e=this._platformLocation).historyGo)||void 0===n||n.call(e,t)}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(l),i.LFG(_,8))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})(),w=(()=>{class t extends b{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=e&&(this._baseHref=e)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=f(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,i){let o=this.prepareExternalUrl(n+v(i));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,e,o)}replaceState(t,e,n,i){let o=this.prepareExternalUrl(n+v(i));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var e,n;null===(n=(e=this._platformLocation).historyGo)||void 0===n||n.call(e,t)}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(l),i.LFG(_,8))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})(),y=(()=>{class t{constructor(t,e){this._subject=new i.vpe,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(Z(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+v(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Z(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+v(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+v(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var e,n;null===(n=(e=this._platformStrategy).historyGo)||void 0===n||n.call(e,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(b),i.LFG(l))},t.normalizeQueryParams=v,t.joinWithSlash=f,t.stripTrailingSlash=m,t.\u0275prov=(0,i.Yz7)({factory:A,token:t,providedIn:"root"}),t})();function A(){return new y((0,i.LFG)(b),(0,i.LFG)(l))}function Z(t){return t.replace(/\/index.html$/,"")}var k=(()=>((k=k||{})[k.Decimal=0]="Decimal",k[k.Percent=1]="Percent",k[k.Currency=2]="Currency",k[k.Scientific=3]="Scientific",k))(),T=(()=>((T=T||{})[T.Zero=0]="Zero",T[T.One=1]="One",T[T.Two=2]="Two",T[T.Few=3]="Few",T[T.Many=4]="Many",T[T.Other=5]="Other",T))(),O=(()=>((O=O||{})[O.Format=0]="Format",O[O.Standalone=1]="Standalone",O))(),M=(()=>((M=M||{})[M.Narrow=0]="Narrow",M[M.Abbreviated=1]="Abbreviated",M[M.Wide=2]="Wide",M[M.Short=3]="Short",M))(),I=(()=>((I=I||{})[I.Short=0]="Short",I[I.Medium=1]="Medium",I[I.Long=2]="Long",I[I.Full=3]="Full",I))(),S=(()=>((S=S||{})[S.Decimal=0]="Decimal",S[S.Group=1]="Group",S[S.List=2]="List",S[S.PercentSign=3]="PercentSign",S[S.PlusSign=4]="PlusSign",S[S.MinusSign=5]="MinusSign",S[S.Exponential=6]="Exponential",S[S.SuperscriptingExponent=7]="SuperscriptingExponent",S[S.PerMille=8]="PerMille",S[S.Infinity=9]="Infinity",S[S.NaN=10]="NaN",S[S.TimeSeparator=11]="TimeSeparator",S[S.CurrencyDecimal=12]="CurrencyDecimal",S[S.
1CurrencyGroup=13]="CurrencyGroup",S))();function P(t,e,n){const o=(0,i.cg1)(t),r=R([o[i.wAp.DayPeriodsFormat],o[i.wAp.DayPeriodsStandalone]],e);return R(r,n)}function N(t,e,n){const o=(0,i.cg1)(t),r=R([o[i.wAp.DaysFormat],o[i.wAp.DaysStandalone]],e);return R(r,n)}function q(t,e,n){const o=(0,i.cg1)(t),r=R([o[i.wAp.MonthsFormat],o[i.wAp.MonthsStandalone]],e);return R(r,n)}function U(t,e){return R((0,i.cg1)(t)[i.wAp.DateFormat],e)}function E(t,e){return R((0,i.cg1)(t)[i.wAp.TimeFormat],e)}function F(t,e){return R((0,i.cg1)(t)[i.wAp.DateTimeFormat],e)}function D(t,e){const n=(0,i.cg1)(t),o=n[i.wAp.NumberSymbols][e];if(void 0===o){if(e===S.CurrencyDecimal)return n[i.wAp.NumberSymbols][S.Decimal];if(e===S.CurrencyGroup)return n[i.wAp.NumberSymbols][S.Group]}return o}function L(t,e){return(0,i.cg1)(t)[i.wAp.NumberFormats][e]}const J=i.kL8;function j(t){if(!t[i.wAp.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[i.wAp.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function R(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function $(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}const B=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,H={},Q=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Y=(()=>((Y=Y||{})[Y.Short=0]="Short",Y[Y.ShortGMT=1]="ShortGMT",Y[Y.Long=2]="Long",Y[Y.Extended=3]="Extended",Y))(),z=(()=>((z=z||{})[z.FullYear=0]="FullYear",z[z.Month=1]="Month",z[z.Date=2]="Date",z[z.Hours=3]="Hours",z[z.Minutes=4]="Minutes",z[z.Seconds=5]="Seconds",z[z.FractionalSeconds=6]="FractionalSeconds",z[z.Day=7]="Day",z))(),V=(()=>((V=V||{})[V.DayPeriods=0]="DayPeriods",V[V.Days=1]="Days",V[V.Months=2]="Months",V[V.Eras=3]="Eras",V))();function G(t,e,n,i){let o=function(t){if(lt(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[e,n=1,i=1]=t.split("-").map(t=>+t);return W(e,n-1,i)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(B))return function(t){const e=new Date(0);let n=0,i=0;const o=t[8]?e.setUTCFullYear:e.setFullYear,r=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),o.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-n,a=Number(t[5]||0)-i,c=Number(t[6]||0),l=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return r.call(e,s,a,c,l),e}(n)}const e=new Date(t);if(!lt(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=K(n,e)||e;let r,s=[];for(;e;){if(r=Q.exec(e),!r){s.push(e);break}{s=s.concat(r.slice(1));const t=s.pop();if(!t)break;e=t}}let a=o.getTimezoneOffset();i&&(a=ct(i,a),o=function(t,e,n){const i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(ct(e,i)-i))}(o,i));let c="";return s.forEach(t=>{const e=function(t){if(at[t])return at[t];let e;switch(t){case"G":case"GG":case"GGG":e=nt(V.Eras,M.Abbreviated);break;case"GGGG":e=nt(V.Eras,M.Wide);break;case"GGGGG":e=nt(V.Eras,M.Narrow);break;case"y":e=et(z.FullYear,1,0,!1,!0);break;case"yy":e=et(z.FullYear,2,0,!0,!0);break;case"yyy":e=et(z.FullYear,3,0,!1,!0);break;case"yyyy":e=et(z.FullYear,4,0,!1,!0);break;case"Y":e=st(1);break;case"YY":e=st(2,!0);break;case"YYY":e=st(3);break;case"YYYY":e=st(4);break;case"M":case"L":e=et(z.Month,1,1);break;case"MM":case"LL":e=et(z.Month,2,1);break;case"MMM":e=nt(V.Months,M.Abbreviated);break;case"MMMM":e=nt(V.Months,M.Wide);break;case"MMMMM":e=nt(V.Months,M.Narrow);break;case"LLL":e=nt(V.Months,M.Abbreviated,O.Standalone);break;case"LLLL":e=nt(V.Months,M.Wide,O.Standalone);break;case"LLLLL":e=nt(V.Months,M.Narrow,O.Standalone);break;case"w":e=rt(1);break;case"ww":e=rt(2);break;case"W":e=rt(1,!0);break;case"d":e=et(z.Date,1);break;case"dd":e=et(z.Date,2);break;case"c":case"cc":e=et(z.Day,1);break;case"ccc":e=nt(V.Days,M.Abbreviated,O.Standalone);break;case"cccc":e=nt(V.Days,M.Wide,O.Standalone);break;case"ccccc":e=nt(V.Days,M.Narrow,O.Standalone);break;case"cccccc":e=nt(V.Days,M.Short,O.Standalone);break;case"E":case"EE":case"EEE":e=nt(V.Days,M.Abbreviated);break;case"EEEE":e=nt(V.Days,M.Wide);break;case"EEEEE":e=nt(V.Days,M.Narrow);break;case"EEEEEE":e=nt(V.Days,M.Short);break;case"a":case"aa":case"aaa":e=nt(V.DayPeriods,M.Abbreviated);break;case"aaaa":e=nt(V.DayPeriods,M.Wide);break;case"aaaaa":e=nt(V.DayPeriods,M.Narrow);break;
1case"b":case"bb":case"bbb":e=nt(V.DayPeriods,M.Abbreviated,O.Standalone,!0);break;case"bbbb":e=nt(V.DayPeriods,M.Wide,O.Standalone,!0);break;case"bbbbb":e=nt(V.DayPeriods,M.Narrow,O.Standalone,!0);break;case"B":case"BB":case"BBB":e=nt(V.DayPeriods,M.Abbreviated,O.Format,!0);break;case"BBBB":e=nt(V.DayPeriods,M.Wide,O.Format,!0);break;case"BBBBB":e=nt(V.DayPeriods,M.Narrow,O.Format,!0);break;case"h":e=et(z.Hours,1,-12);break;case"hh":e=et(z.Hours,2,-12);break;case"H":e=et(z.Hours,1);break;case"HH":e=et(z.Hours,2);break;case"m":e=et(z.Minutes,1);break;case"mm":e=et(z.Minutes,2);break;case"s":e=et(z.Seconds,1);break;case"ss":e=et(z.Seconds,2);break;case"S":e=et(z.FractionalSeconds,1);break;case"SS":e=et(z.FractionalSeconds,2);break;case"SSS":e=et(z.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=it(Y.Short);break;case"ZZZZZ":e=it(Y.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=it(Y.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=it(Y.Long);break;default:return null}return at[t]=e,e}(t);c+=e?e(o,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function W(t,e,n){const i=new Date(0);return i.setFullYear(t,e,n),i.setHours(0,0,0),i}function K(t,e){const n=function(t){return(0,i.cg1)(t)[i.wAp.LocaleId]}(t);if(H[n]=H[n]||{},H[n][e])return H[n][e];let o="";switch(e){case"shortDate":o=U(t,I.Short);break;case"mediumDate":o=U(t,I.Medium);break;case"longDate":o=U(t,I.Long);break;case"fullDate":o=U(t,I.Full);break;case"shortTime":o=E(t,I.Short);break;case"mediumTime":o=E(t,I.Medium);break;case"longTime":o=E(t,I.Long);break;case"fullTime":o=E(t,I.Full);break;case"short":const e=K(t,"shortTime"),n=K(t,"shortDate");o=X(F(t,I.Short),[e,n]);break;case"medium":const i=K(t,"mediumTime"),r=K(t,"mediumDate");o=X(F(t,I.Medium),[i,r]);break;case"long":const s=K(t,"longTime"),a=K(t,"longDate");o=X(F(t,I.Long),[s,a]);break;case"full":const c=K(t,"fullTime"),l=K(t,"fullDate");o=X(F(t,I.Full),[c,l])}return o&&(H[n][e]=o),o}function X(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function tt(t,e,n="-",i,o){let r="";(t<0||o&&t<=0)&&(o?t=1-t:(t=-t,r=n));let s=String(t);for(;s.length<e;)s="0"+s;return i&&(s=s.substr(s.length-e)),r+s}function et(t,e,n=0,i=!1,o=!1){return function(r,s){let a=function(t,e){switch(t){case z.FullYear:return e.getFullYear();case z.Month:return e.getMonth();case z.Date:return e.getDate();case z.Hours:return e.getHours();case z.Minutes:return e.getMinutes();case z.Seconds:return e.getSeconds();case z.FractionalSeconds:return e.getMilliseconds();case z.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}(t,r);if((n>0||a>-n)&&(a+=n),t===z.Hours)0===a&&-12===n&&(a=12);else if(t===z.FractionalSeconds)return function(t,e){return tt(t,3).substr(0,e)}(a,e);const c=D(s,S.MinusSign);return tt(a,e,c,i,o)}}function nt(t,e,n=O.Format,o=!1){return function(r,s){return function(t,e,n,o,r,s){switch(n){case V.Months:return q(e,r,o)[t.getMonth()];case V.Days:return N(e,r,o)[t.getDay()];case V.DayPeriods:const a=t.getHours(),c=t.getMinutes();if(s){const t=function(t){const e=(0,i.cg1)(t);return j(e),(e[i.wAp.ExtraData][2]||[]).map(t=>"string"==typeof t?$(t):[$(t[0]),$(t[1])])}(e),n=function(t,e,n){const o=(0,i.cg1)(t);j(o);const r=R([o[i.wAp.ExtraData][0],o[i.wAp.ExtraData][1]],e)||[];return R(r,n)||[]}(e,r,o),s=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,i=a>=e.hours&&c>=e.minutes,o=a<n.hours||a===n.hours&&c<n.minutes;if(e.hours<n.hours){if(i&&o)return!0}else if(i||o)return!0}else if(t.hours===a&&t.minutes===c)return!0;return!1});if(-1!==s)return n[s]}return P(e,r,o)[a<12?0:1];case V.Eras:return function(t,e){return R((0,i.cg1)(t)[i.wAp.Eras],e)}(e,o)[t.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${n}`)}}(r,s,t,e,n,o)}}function it(t){return function(e,n,i){const o=-1*i,r=D(n,S.MinusSign),s=o>0?Math.floor(o/60):Math.ceil(o/60);switch(t){case Y.Short:return(o>=0?"+":"")+tt(s,2,r)+tt(Math.abs(o%60),2,r);case Y.ShortGMT:return"GMT"+(o>=0?"+":"")+tt(s,1,r);case Y.Long:return"GMT"+(o>=0?"+":"")+tt(s,2,r)+":"+tt(Math.abs(o%60),2,r);case Y.Extended:return 0===i?"Z":(o>=0?"+":"")+tt(s,2,r)+":"+tt(Math.abs(o%60),2,r);default:throw new Error(`Unknown zone width "${t}"`)}}}function ot(t){return W(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function rt(t,e=!1){return function(n,i){let o;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();o=1+Math.floor((e+t)/7)}else{const t=ot(n),e=function(t){const e=W(t,0,1).getDay();return W(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),i=t.getTime()-e.getTime();o=1+Math.round(i/6048e5)}return tt(o,t,D(i,S.MinusSign))}}function st(t,e=!1){return function(n,i){return tt(ot(n).getFullYear(),t,D(i,S.MinusSign),e)}}const at={};function ct(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function lt(t){return t instanceof Date&&!isNaN(t.valueOf())}const dt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function ut(t,e,n,i,o,r,s=!1){let a="",c=!1;if(isFinite(t)){let l=function(t){let e,n,i,o,r,s=Math.abs(t)+"",a=0;for((n=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(n<0&&(n=i),n+=+s.slice(i+1),s=s.substring(0,i)):n<0&&(n=s.length),i=0;"0"===s.charAt(i);i++);if(i===(r=s.length))e=[0],n=1;else{for(r--;"0"===s.charAt(r);)r--;for(n-=i,e=[],o=0;i<=r;i++,o++)e[o]=Number(s.charAt(i))}return n>22&&(e=e.splice(0,21),a=n-1,n=1),{digits:e,exponent:a,integerLen:n}}(t);
vendor: 11,389 bytes, line 1
1s&&(l=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(l));let d=e.minInt,u=e.minFrac,p=e.maxFrac;if(r){const t=r.match(dt);if(null===t)throw new Error(`${r} is not a valid digit info`);const e=t[1],n=t[3],i=t[5];null!=e&&(d=ht(e)),null!=n&&(u=ht(n)),null!=i?p=ht(i):null!=n&&u>p&&(p=u)}!function(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let i=t.digits,o=i.length-t.integerLen;const r=Math.min(Math.max(e,o),n);let s=r+t.integerLen,a=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let t=s;t<i.length;t++)i[t]=0}else{o=Math.max(0,o),t.integerLen=1,i.length=Math.max(1,s=r+1),i[0]=0;for(let t=1;t<s;t++)i[t]=0}if(a>=5)if(s-1<0){for(let e=0;e>s;e--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;o<Math.max(0,r);o++)i.push(0);let c=0!==r;const l=e+t.integerLen,d=i.reduceRight(function(t,e,n,i){return i[n]=(e+=t)<10?e:e-10,c&&(0===i[n]&&n>=l?i.pop():c=!1),e>=10?1:0},0);d&&(i.unshift(d),t.integerLen++)}(l,u,p);let h=l.digits,g=l.integerLen;const f=l.exponent;let m=[];for(c=h.every(t=>!t);g<d;g++)h.unshift(0);for(;g<0;g++)h.unshift(0);g>0?m=h.splice(g,h.length):(m=h,h=[0]);const v=[];for(h.length>=e.lgSize&&v.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)v.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&v.unshift(h.join("")),a=v.join(D(n,i)),m.length&&(a+=D(n,o)+m.join("")),f&&(a+=D(n,S.Exponential)+"+"+f)}else a=D(n,S.Infinity);return a=t<0&&!c?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf,a}function pt(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(";"),o=i[0],r=i[1],s=-1!==o.indexOf(".")?o.split("."):[o.substring(0,o.lastIndexOf("0")+1),o.substring(o.lastIndexOf("0")+1)],a=s[0],c=s[1]||"";n.posPre=a.substr(0,a.indexOf("#"));for(let d=0;d<c.length;d++){const t=c.charAt(d);"0"===t?n.minFrac=n.maxFrac=d+1:"#"===t?n.maxFrac=d+1:n.posSuf+=t}const l=a.split(",");if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,r){const t=o.length-n.posPre.length-n.posSuf.length,e=r.indexOf("#");n.negPre=r.substr(0,e).replace(/'/g,""),n.negSuf=r.substr(e+t).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}function ht(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}class gt{}let ft=(()=>{class t extends gt{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(J(e||this.locale)(t)){case T.Zero:return"zero";case T.One:return"one";case T.Two:return"two";case T.Few:return"few";case T.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(i.soG))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})();function mt(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,o]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}let vt=(()=>{class t{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&((0,i.sIi)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${(0,i.AaK)(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.ZZ4),i.Y36(i.aQg),i.Y36(i.SBq),i.Y36(i.Qsj))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class bt{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let xt=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error(`Cannot find a differ supporting object '${e}' of type '${function(t){return t.name||typeof t}(e)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new bt(null,this._ngForOf,-1,-1),null===i?void 0:i),o=new _t(t,n);e.push(o)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const o=this._viewContainer.get(n);this._viewContainer.move(o,i);const r=new _t(t,o);e.push(r)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=i,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.s_b),i.Y36(i.Rgc),i.Y36(i.ZZ4))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class _t{constructor(t,e){this.record=t,this.view=e}}let Ct=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new wt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){yt("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){yt("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.s_b),i.Y36(i.Rgc))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class wt{constructor(){this.$implicit=null,this.ngIf=null}}function yt(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${(0,i.AaK)(e)}'.`)}class At{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Zt=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),t})(),kt=(()=>{class t{constructor(t,e,n){this.ngSwitch=n,n._addCase(),this._view=new At(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.s_b),i.Y36(i.Rgc),i.Y36(Zt,9))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),Tt=(()=>{class t{constructor(t,e,n){n._addDefault(new At(t,e))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.s_b),i.Y36(i.Rgc),i.Y36(Zt,9))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),Ot=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,i]=t.split(".");null!=(e=null!=e&&i?`${e}${i}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(i.aQg),i.Y36(i.Qsj))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}
1),t})(),Mt=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(t.ngTemplateOutlet){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.s_b))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[i.TTD]}),t})();function It(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${(0,i.AaK)(t)}'`)}const St=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
1D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let Pt=(()=>{class t{transform(e){if(null==e)return null;if("string"!=typeof e)throw It(t,e);return e.replace(St,t=>t[0].toUpperCase()+t.substr(1).toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Yjl({name:"titlecase",type:t,pure:!0}),t})(),Nt=(()=>{class t{constructor(t){this.locale=t}transform(e,n="mediumDate",i,o){if(null==e||""===e||e!=e)return null;try{return G(e,n,o||this.locale,i)}catch(r){throw It(t,r.message)}}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.soG,16))},t.\u0275pipe=i.Yjl({name:"date",type:t,pure:!0}),t})(),qt=(()=>{class t{constructor(t){this._locale=t}transform(e,n,i){if(!Et(e))return null;i=i||this._locale;try{return function(t,e,n){return ut(t,pt(L(e,k.Decimal),D(e,S.MinusSign)),e,S.Group,S.Decimal,n)}(Ft(e),i,n)}catch(o){throw It(t,o.message)}}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.soG,16))},t.\u0275pipe=i.Yjl({name:"number",type:t,pure:!0}),t})(),Ut=(()=>{class t{constructor(t){this._locale=t}transform(e,n,i){if(!Et(e))return null;i=i||this._locale;try{return function(t,e,n){return ut(t,pt(L(e,k.Percent),D(e,S.MinusSign)),e,S.Group,S.Decimal,n,!0).replace(new RegExp("%","g"),D(e,S.PercentSign))}(Ft(e),i,n)}catch(o){throw It(t,o.message)}}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.soG,16))},t.\u0275pipe=i.Yjl({name:"percent",type:t,pure:!0}),t})();function Et(t){return!(null==t||""===t||t!=t)}
1function Ft(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(`${t} is not a number`);return t}let Dt=(()=>{class t{transform(e,n,i){if(null==e)return null;if(!this.supports(e))throw It(t,e);return e.slice(n,i)}supports(t){return"string"==typeof t||Array.isArray(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Yjl({name:"slice",type:t,pure:!1}),t})(),Lt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({providers:[{provide:gt,useClass:ft}]}),t})();const Jt="browser";function jt(t){return t===Jt}let Rt=(()=>{class t{}return t.\u0275prov=(0,i.Yz7)({token:t,providedIn:"root",factory:()=>new $t((0,i.LFG)(c),window)}),t})();class $t{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let i=n.currentNode;for(;i;){const t=i.shadowRoot;if(t){const n=t.getElementById(e)||t.querySelector(`[name="${e}"]`);if(n)return n}i=n.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),this.attemptFocus(e))}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(n-o[0],i-o[1])}attemptFocus(t){return t.focus(),this.document.activeElement===t}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=Bt(this.window.history)||Bt(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(t){return!1}}}function Bt(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Ht{}},3882:function(t,e,n){"use strict";n.d(e,{eN:function(){return I},JF:function(){return $},UA:function(){return O},WM:function(){return p}});var i=n(4364),o=n(2316),r=n(1134),s=n(9544),a=n(6816),c=n(9170),l=n(3927);class d{}class u{}class p{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),o=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(o):this.headers.set(i,[o])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof p?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new p;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof p?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const o=t.value;if(o){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===o.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEac
1h(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class h{encodeKey(t){return m(t)}encodeValue(t){return m(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const g=/%(\d[a-f0-9])/gi,f={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function m(t){return encodeURIComponent(t).replace(g,(t,e)=>{var n;return null!==(n=f[e])&&void 0!==n?n:t})}function v(t){return`${t}`}class b{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new h,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(t=>{const i=t.indexOf("="),[o,r]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],s=n.get(o)||[];s.push(r),n.set(o,s)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(n=>{const i=t[n];Array.isArray(i)?i.forEach(t=>{e.push({param:n,value:t,op:"a"})}):e.push({param:n,value:i,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new b({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(v(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(v(t.value));-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class x{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}keys(){return this.map.keys()}}function _(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function C(t){return"undefined"!=typeof Blob&&t instanceof Blob}function w(t){return"undefined"!=typeof FormData&&t instanceof FormData}class y{constructor(t,e,n,i){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,o=i):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new p),this.context||(this.context=new x),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new b,this.urlWithParams=e}serializeBody(){return null===this.body?null:_(this.body)||C(this.body)||w(this.body)||"undefined"!=typeof URLSearchParams&&this.body instanceof URLSearchParams||"string"==typeof this.body?this.body:this.body instanceof b?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||w(this.body)?null:C(this.body)?this.body.type||null:_(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof b?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(t={}){var e;const n=t.method||this.method,i=t.url||this.url,o=t.responseType||this.responseType,r=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let c=t.headers||this.headers,l=t.params||this.params;const d=null!==(e=t.context)&&void 0!==e?e:this.context;return void 0!==t.setHeaders&&(c=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),c)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new y(n,i,r,{params:l,headers:c,context:d,reportProgress:a,responseType:o,withCredentials:s})}}var A=(()=>((A=A||{}
1)[A.Sent=0]="Sent",A[A.UploadProgress=1]="UploadProgress",A[A.ResponseHeader=2]="ResponseHeader",A[A.DownloadProgress=3]="DownloadProgress",A[A.Response=4]="Response",A[A.User=5]="User",A))();class Z{constructor(t,e=200,n="OK"){this.headers=t.headers||new p,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class k extends Z{constructor(t={}){super(t),this.type=A.ResponseHeader}clone(t={}){return new k({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class T extends Z{constructor(t={}){super(t),this.type=A.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new T({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class O extends Z{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function M(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let I=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof y)i=t;else{let o,r;o=n.headers instanceof p?n.headers:new p(n.headers),n.params&&(r=n.params instanceof b?n.params:new b({fromObject:n.params})),i=new y(t,e,void 0!==n.body?n.body:null,{headers:o,context:n.context,params:r,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const o=(0,r.of)(i).pipe((0,a.b)(t=>this.handler.handle(t)));if(t instanceof y||"events"===n.observe)return o;const s=o.pipe((0,c.h)(t=>t instanceof T));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return s.pipe((0,l.U)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe((0,l.U)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe((0,l.U)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));default:return s.pipe((0,l.U)(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new b).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,M(n,e))}post(t,e,n={}){return this.request("POST",t,M(n,e))}put(t,e,n={}){return this.request("PUT",t,M(n,e))}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(d))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();class S{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const P=new o.OlP("HTTP_INTERCEPTORS");let N=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const q=/^\)\]\}',?\n/;let U=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.y(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let o=null;const r=()=>{if(null!==o)return o;const e=1223===n.status?204:n.status,i=n.statusText||"OK",r=new p(n.getAllResponseHeaders()),s=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return o=new k({headers:r,status:e,statusText:i,url:s}),o},s=()=>{let{headers:i,status:o,statusText:s,url:a}=r(),c=null;204!==o&&(c=void 0===n.response?n.responseText:n.response),0===o&&(o=c?200:0);let l=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof c){const t=c;c=c.replace(q,"");try{c=""!==c?JSON.parse(c):null}catch(d){c=t,l&&(l=!1,c={error:d,text:c})}}l?(e.next(new T({body:c,headers:i,status:o,statusText:s,url:a||void 0})),e.complete()):e.error(new O({error:c,headers:i,status:o,statusText:s,url:a||void 0}))},a=t=>{const{url:i}=r(),o=new O({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});e.error(o)};let c=!1;const l=i=>{c||(e.next(r()),c=!0);let o={type:A.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(o.total=i.total),"text"===t.responseType&&!!n.responseText&&(o.partialText=n.responseText),e.next(o)},d=t=>{let n={type:A.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",s),n.addEventListener("error",a),n.addEventListener("timeout",a),n.addEventListener("abort",a),t.reportProgress&&(n.addEventListener("progress",l),null!==i&&n.upload&&n.upload.addEventListener("progress",d)),n.send(i),e.next({type:A.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("abort",a),n.removeEventListener("load",s),n.removeEventListener("timeout",a),t.reportProgress&&(n.removeEventListener("progress",l),null!==i&&n.upload&&n.upload.removeEventListener("progress",d)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.JF))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const E=new o.OlP("XSRF_COOKIE_NAME"),F=new o.OlP("XSRF_HEADER_NAME");class D{}let L=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,i.Mx)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.K0),o.LFG(o.Lbi),o.LFG(E))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),J=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null!==i&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(D),o.LFG(F))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),j=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(P,[]);this.chain=t.reduceRight((t,e)=>new S(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(u),o.LFG(o.zs3))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),R=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:J,useClass:N}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:E,useValue:e.cookieName}:[],e.headerName?{provide:F,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:[J,{provide:P,useExisting:J,multi:!0},{provide:D,useClass:L},{provide:E,useValue:"XSRF-TOKEN"},{provide:F,useValue:"X-XSRF-TOKEN"}
1]}),t})(),$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:[I,{provide:d,useClass:j},U,{provide:u,useExisting:U}],imports:[[R.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})()},2316:function(t,e,n){"use strict";n.d(e,{deG:function(){return pn},tb:function(){return Od},AFp:function(){return yd},ip1:function(){return Cd},CZH:function(){return wd},hGG:function(){return Cu},z2F:function(){return uu},sBO:function(){return ul},Sil:function(){return Ld},_Vd:function(){return Uc},EJc:function(){return Sd},SBq:function(){return Lc},qLn:function(){return yo},vpe:function(){return td},gxx:function(){return Lr},tBr:function(){return Fn},XFs:function(){return I},OlP:function(){return un},zs3:function(){return ts},IIB:function(){return _d},ZZ4:function(){return ol},aQg:function(){return sl},soG:function(){return Id},YKP:function(){return Cl},v3s:function(){return hu},h0i:function(){return _l},PXZ:function(){return su},R0b:function(){return Rd},FiY:function(){return Dn},Lbi:function(){return Td},g9A:function(){return kd},Qsj:function(){return Rc},FYo:function(){return jc},JOm:function(){return Jn},Tiy:function(){return Bc},q3G:function(){return vo},tp0:function(){return Ln},EAV:function(){return mu},Rgc:function(){return ml},dDg:function(){return Vd},DyG:function(){return hn},q4F:function(){return Qc},GfV:function(){return Hc},s_b:function(){return yl},ifc:function(){return E},eFA:function(){return au},G48:function(){return iu},Gpc:function(){return h},f3M:function(){return Pn},X6Q:function(){return nu},_c5:function(){return xu},VLi:function(){return Kd},c2e:function(){return Md},zSh:function(){return jr},wAp:function(){return ka},vHH:function(){return m},EiD:function(){return fo},mCW:function(){return Wi},qzn:function(){return Li},JVY:function(){return ji},pB0:function(){return Hi},eBb:function(){return $i},L6k:function(){return Ri},LAX:function(){return Bi},cg1:function(){return ya},Tjo:function(){return bu},kL8:function(){return Aa},yhl:function(){return Ji},dqk:function(){return J},sIi:function(){return ds},CqO:function(){return Es},QGY:function(){return qs},F4k:function(){return Us},RDi:function(){return kt},AaK:function(){return d},z3N:function(){return Di},qOj:function(){return ns},TTD:function(){return bt},_Bn:function(){return Sc},xp6:function(){return jo},uIk:function(){return bs},Tol:function(){return ta},DjV:function(){return ba},ekj:function(){return Xs},Suo:function(){return gd},Xpm:function(){return W},lG2:function(){return rt},Yz7:function(){return C},cJS:function(){return w},oAB:function(){return nt},Yjl:function(){return st},Y36:function(){return ys},_UZ:function(){return Ms},GkF:function(){return Ps},BQk:function(){return Ss},ynx:function(){return Is},qZA:function(){return Os},TgZ:function(){return Ts},EpF:function(){return Ns},n5z:function(){return nn},Ikx:function(){return xa},SDv:function(){return Cc},QtT:function(){return yc},pQV:function(){return wc},LFG:function(){return Sn},$8M:function(){return rn},$Z:function(){return As},NdJ:function(){return Fs},CRH:function(){return fd},kcU:function(){return Ce},O4$:function(){return _e},oxw:function(){return Js},ALo:function(){return Yl},lcZ:function(){return zl},xi3:function(){return Vl},Dn7:function(){return Gl},Hsn:function(){return $s},F$t:function(){return Rs},Q6J:function(){return Zs},s9C:function(){return Bs},MGl:function(){return Hs},DdM:function(){return Dl},VKq:function(){return Ll},WLB:function(){return Jl},kEZ:function(){return jl},qbA:function(){return Rl},iGM:function(){return pd},MAs:function(){return ws},evT:function(){return ko},Jf7:function(){return Zo},CHM:function(){return Ht},oJD:function(){return bo},LSH:function(){return xo},B6R:function(){return K},kYT:function(){return it},Udp:function(){return Ks},YNc:function(){return Cs},W1O:function(){return xd},_uU:function(){return pa},Oqu:function(){return ha},hij:function(){return ga},AsE:function(){return fa},lnq:function(){return ma},HOy:function(){return va},Gf:function(){return hd}});var i=n(5119),o=n(1318),r=n(9544),s=n(9919),a=n(1992);function c(t){for(let e in t)if(t[e]===c)return e;throw Error("Could not find renamed property on target object.")}function l(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function d(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(d).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function u(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const p=c({__forward_ref__:c});function h(t){return t.__forward_ref__=h,t.toString=function(){return d(this())},t}function g(t){return f(t)?t():t}function f(t){return"function"==typeof t&&t.hasOwnProperty(p)&&t.__forward_ref__===h}
1class m extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function v(t){return"string"==typeof t?t:null==t?"":String(t)}function b(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():v(t)}function x(t,e){const n=e?` in ${e}`:"";throw new m("201",`No provider for ${b(t)} found${n}`)}function _(t,e,n,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${n} ${i} ${e} <=Actual]`))}function C(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function w(t){return{providers:t.providers||[],imports:t.imports||[]}}function y(t){return A(t,k)||A(t,O)}function A(t,e){return t.hasOwnProperty(e)?t[e]:null}function Z(t){return t&&(t.hasOwnProperty(T)||t.hasOwnProperty(M))?t[T]:null}const k=c({"\u0275prov":c}),T=c({"\u0275inj":c}),O=c({ngInjectableDef:c}),M=c({ngInjectorDef:c});var I=(()=>((I=I||{})[I.Default=0]="Default",I[I.Host=1]="Host",I[I.Self=2]="Self",I[I.SkipSelf=4]="SkipSelf",I[I.Optional=8]="Optional",I))();let S;function P(t){const e=S;return S=t,e}function N(t,e,n){const i=y(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:n&I.Optional?null:void 0!==e?e:void x(d(t),"Injector")}function q(t){return{toString:t}.toString()}var U=(()=>((U=U||{})[U.OnPush=0]="OnPush",U[U.Default=1]="Default",U))(),E=(()=>((E=E||{})[E.Emulated=0]="Emulated",E[E.None=2]="None",E[E.ShadowDom=3]="ShadowDom",E))();const F="undefined"!=typeof globalThis&&globalThis,D="undefined"!=typeof window&&window,L="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,J=F||"undefined"!=typeof global&&global||D||L,j={},R=[],$=c({"\u0275cmp":c}),B=c({"\u0275dir":c}),H=c({"\u0275pipe":c}),Q=c({"\u0275mod":c}),Y=c({"\u0275loc":c}),z=c({"\u0275fac":c}),V=c({__NG_ELEMENT_ID__:c});let G=0;function W(t){return q(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===U.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||R,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||E.Emulated,id:"c",styles:t.styles||R,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,o=t.features,r=t.pipes;return n.id+=G++,n.inputs=ot(t.inputs,e),n.outputs=ot(t.outputs),o&&o.forEach(t=>t(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(X):null,n.pipeDefs=r?()=>("function"==typeof r?r():r).map(tt):null,n})}function K(t,e,n){const i=t.\u0275cmp;i.directiveDefs=()=>e.map(X),i.pipeDefs=()=>n.map(tt)}function X(t){return at(t)||function(t){return t[B]||null}(t)}function tt(t){return function(t){return t[H]||null}(t)}const et={};function nt(t){return q(()=>{const e={type:t.type,bootstrap:t.bootstrap||R,declarations:t.declarations||R,imports:t.imports||R,exports:t.exports||R,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(et[t.id]=t.type),e})}function it(t,e){return q(()=>{const n=ct(t,!0);n.declarations=e.declarations||R,n.imports=e.imports||R,n.exports=e.exports||R})}function ot(t,e){if(null==t)return j;const n={};for(const i in t)if(t.hasOwnProperty(i)){let o=t[i],r=o;Array.isArray(o)&&(r=o[1],o=o[0]),n[o]=i,e&&(e[o]=r)}return n}const rt=W;function st(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function at(t){return t[$]||null}function ct(t,e){const n=t[Q]||null;if(!n&&!0===e)throw new Error(`Type ${d(t)} does not have '\u0275mod' property.`);return n}function lt(t){return Array.isArray(t)&&"object"==typeof t[1]}function dt(t){return Array.isArray(t)&&!0===t[1]}function ut(t){return 0!=(8&t.flags)}function pt(t){return 2==(2&t.flags)}function ht(t){return 1==(1&t.flags)}function gt(t){return null!==t.template}function ft(t){return 0!=(512&t[2])}function mt(t,e){return t.hasOwnProperty(z)?t[z]:null}class vt{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function bt(){return xt}function xt(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ct),_t}function _t(){const t=yt(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===j)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Ct(t,e,n,i){const o=yt(t)||function(t,e){return t[wt]=e}(t,{previous:j,current:null}),r=o.current||(o.current={}),s=o.previous,a=this.declaredInputs[n],c=s[a];r[a]=new vt(c&&c.currentValue,e,s===j),t[i]=e}bt.ngInherit=!0;const wt="__ngSimpleChanges__";function yt(t){return t[wt]||null}const At="http://www.w3.org/2000/svg";let Zt;function kt(t){Zt=t}function Tt(){return void 0!==Zt?Zt:"undefined"!=typeof document?document:void 0}function Ot(t){return!!t.listen}const Mt={createRenderer:(t,e)=>Tt()};function It(t){for(;Array.isArray(t);)t=t[0];return t}function St(t,e){return It(e[t])}function Pt(t,e){return It(e[t.index])}function Nt(t,e){return t.data[e]}function qt(t,e){return t[e]}function Ut(t,e){const n=e[t];return lt(n)?n:n[0]}function Et(t){return 4==(4&t[2])}function Ft(t){return 128==(128&t[2])}function Dt(t,e){return null==e?null:t[e]}function Lt(t){t[18]=0}function Jt(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const jt={lFrame:he(null),bindingsEnabled:!0,isInCheckNoChangesMo
vendor: 4,636 bytes, line 1
1de:!1};function Rt(){return jt.bindingsEnabled}function $t(){return jt.lFrame.lView}function Bt(){return jt.lFrame.tView}function Ht(t){return jt.lFrame.contextLView=t,t[8]}function Qt(){let t=Yt();for(;null!==t&&64===t.type;)t=t.parent;return t}function Yt(){return jt.lFrame.currentTNode}function zt(){const t=jt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Vt(t,e){const n=jt.lFrame;n.currentTNode=t,n.isParent=e}function Gt(){return jt.lFrame.isParent}function Wt(){jt.lFrame.isParent=!1}function Kt(){return jt.isInCheckNoChangesMode}function Xt(t){jt.isInCheckNoChangesMode=t}function te(){const t=jt.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function ee(){return jt.lFrame.bindingIndex}function ne(){return jt.lFrame.bindingIndex++}function ie(t){const e=jt.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function oe(t){jt.lFrame.inI18n=t}function re(t,e){const n=jt.lFrame;n.bindingIndex=n.bindingRootIndex=t,se(e)}function se(t){jt.lFrame.currentDirectiveIndex=t}function ae(){return jt.lFrame.currentQueryIndex}function ce(t){jt.lFrame.currentQueryIndex=t}function le(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function de(t,e,n){if(n&I.SkipSelf){let i=e,o=t;for(;!(i=i.parent,null!==i||n&I.Host||(i=le(o),null===i||(o=o[15],10&i.type))););if(null===i)return!1;e=i,t=o}const i=jt.lFrame=pe();return i.currentTNode=e,i.lView=t,!0}function ue(t){const e=pe(),n=t[1];jt.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function pe(){const t=jt.lFrame,e=null===t?null:t.child;return null===e?he(t):e}function he(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function ge(){const t=jt.lFrame;return jt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const fe=ge;function me(){const t=ge();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function ve(){return jt.lFrame.selectedIndex}function be(t){jt.lFrame.selectedIndex=t}function xe(){const t=jt.lFrame;return Nt(t.tView,t.selectedIndex)}function _e(){jt.lFrame.currentNamespace=At}function Ce(){jt.lFrame.currentNamespace=null}function we(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n<i;n++){const e=t.data[n].type.prototype,{ngAfterContentInit:i,ngAfterContentChecked:o,ngAfterViewInit:r,ngAfterViewChecked:s,ngOnDestroy:a}=e;i&&(t.contentHooks||(t.contentHooks=[])).push(-n,i),o&&((t.contentHooks||(t.contentHooks=[])).push(n,o),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,o)),r&&(t.viewHooks||(t.viewHooks=[])).push(-n,r),s&&((t.viewHooks||(t.viewHooks=[])).push(n,s),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,s)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(n,a)}}function ye(t,e,n){ke(t,e,3,n)}function Ae(t,e,n,i){(3&t[2])===n&&ke(t,e,n,i)}function Ze(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function ke(t,e,n,i){const o=null!=i?i:-1,r=e.length-1;let s=0;for(let a=void 0!==i?65535&t[18]:0;a<r;a++)if("number"==typeof e[a+1]){if(s=e[a],null!=i&&s>=i)break}else e[a]<0&&(t[18]+=65536),(s<o||-1==o)&&(Te(t,n,e,a),t[18]=(4294901760&t[18])+a+2),a++}function Te(t,e,n,i){const o=n[i]<0,r=n[i+1],s=t[o?-n[i]:n[i]];if(o){if(t[2]>>11<t[18]>>16&&(3&t[2])===e){t[2]+=2048;try{r.call(s)}finally{}}}else try{r.call(s)}finally{}}class Oe{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Me(t,e,n){const i=Ot(t);let o=0;for(;o<n.length;){const r=n[o];if("number"==typeof r){if(0!==r)break;o++;const s=n[o++],a=n[o++],c=n[o++];i?t.setAttribute(e,a,c,s):e.setAttributeNS(s,a,c)}else{const s=r,a=n[++o];Se(s)?i&&t.setProperty(e,s,a):i?t.setAttribute(e,s,a):e.setAttribute(s,a),o++}}return o}function Ie(t){return 3===t||4===t||6===t}function Se(t){return 64===t.charCodeAt(0)}function Pe(t,e){if(null!==e&&0!==e.length)if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let i=0;i<e.length;i++){const o=e[i];"number"==typeof o?n=o:0===n||Ne(t,n,o,null,-1===n||2===n?e[++i]:null)}}return t}function Ne(t,e,n,i,o){let r=0,s=t.length;if(-1===e)s=-1;else for(;r<t.length;){const n=t[r++];if("number"==typeof n){if(n===e){s=-1;break}if(n>e){s=r-1;break}}}for(;r<t.length;){const e=t[r];if("number"==typeof e)break;
1if(e===n){if(null===i)return void(null!==o&&(t[r+1]=o));if(i===t[r+1])return void(t[r+2]=o)}r++,null!==i&&r++,null!==o&&r++}-1!==s&&(t.splice(s,0,e),r=s+1),t.splice(r++,0,n),null!==i&&t.splice(r++,0,i),null!==o&&t.splice(r++,0,o)}function qe(t){return-1!==t}function Ue(t){return 32767&t}function Ee(t,e){let n=function(t){return t>>16}(t),i=e;for(;n>0;)i=i[15],n--;return i}let Fe=!0;function De(t){const e=Fe;return Fe=t,e}let Le=0;function Je(t,e){const n=Re(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,je(i.data,t),je(e,null),je(i.blueprint,null));const o=$e(t,e),r=t.injectorIndex;if(qe(o)){const t=Ue(o),n=Ee(o,e),i=n[1].data;for(let o=0;o<8;o++)e[r+o]=n[t+o]|i[t+o]}return e[r+8]=o,r}function je(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Re(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function $e(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,i=null,o=e;for(;null!==o;){const t=o[1],e=t.type;if(i=2===e?t.declTNode:1===e?o[6]:null,null===i)return-1;if(n++,o=o[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return-1}function Be(t,e,n){!function(t,e,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(V)&&(i=n[V]),null==i&&(i=n[V]=Le++);const o=255&i;e.data[t+(o>>5)]|=1<<o}(t,e,n)}function He(t,e,n){if(n&I.Optional)return t;x(e,"NodeInjector")}function Qe(t,e,n,i){if(n&I.Optional&&void 0===i&&(i=null),0==(n&(I.Self|I.Host))){const o=t[9],r=P(void 0);try{return o?o.get(e,i,n&I.Optional):N(e,i,n&I.Optional)}finally{P(r)}}return He(i,e,n)}function Ye(t,e,n,i=I.Default,o){if(null!==t){const r=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(V)?t[V]:void 0;return"number"==typeof e?e>=0?255&e:Ve:e}(n);if("function"==typeof r){if(!de(e,t,i))return i&I.Host?He(o,n,i):Qe(e,n,i,o);try{const t=r(i);if(null!=t||i&I.Optional)return t;x(n)}finally{fe()}}else if("number"==typeof r){let o=null,s=Re(t,e),a=-1,c=i&I.Host?e[16][6]:null;for((-1===s||i&I.SkipSelf)&&(a=-1===s?$e(t,e):e[s+8],-1!==a&&tn(i,!1)?(o=e[1],s=Ue(a),e=Ee(a,e)):s=-1);-1!==s;){const t=e[1];if(Xe(r,s,t.data)){const t=Ge(s,e,n,o,i,c);if(t!==ze)return t}a=e[s+8],-1!==a&&tn(i,e[1].data[s+8]===c)&&Xe(r,s,e)?(o=t,s=Ue(a),e=Ee(a,e)):s=-1}}}return Qe(e,n,i,o)}const ze={};function Ve(){return new en(Qt(),$t())}function Ge(t,e,n,i,o,r){const s=e[1],a=s.data[t+8],c=We(a,s,n,null==i?pt(a)&&Fe:i!=s&&0!=(3&a.type),o&I.Host&&r===a);return null!==c?Ke(e,s,c,a):ze}function We(t,e,n,i,o){const r=t.providerIndexes,s=e.data,a=1048575&r,c=t.directiveStart,l=r>>20,d=o?a+l:t.directiveEnd;for(let u=i?a:a+l;u<d;u++){const t=s[u];if(u<c&&n===t||u>=c&&t.type===n)return u}if(o){const t=s[c];if(t&&gt(t)&&t.type===n)return c}return null}function Ke(t,e,n,i){let o=t[n];const r=e.data;if(function(t){return t instanceof Oe}(o)){const s=o;s.resolving&&function(t,e){throw new m("200",`Circular dependency in DI detected for ${t}`)}(b(r[n]));const a=De(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?P(s.injectImpl):null;de(t,i,I.Default);try{o=t[n]=s.factory(void 0,r,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{ngOnChanges:i,ngOnInit:o,ngDoCheck:r}=e.type.prototype;if(i){const i=xt(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,o),r&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r))}(n,r[n],e)}finally{null!==c&&P(c),De(a),s.resolving=!1,fe()}}return o}function Xe(t,e,n){return!!(n[e+(t>>5)]&1<<t)}function tn(t,e){return!(t&I.Self||t&I.Host&&e)}class en{constructor(t,e){this._tNode=t,this._lView=e}get(t,e,n){return Ye(this._tNode,this._lView,t,n,e)}}function nn(t){return q(()=>{const e=t.prototype.constructor,n=e[z]||on(e),i=Object.prototype;let o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==i;){const t=o[z]||on(o);if(t&&t!==n)return t;o=Object.getPrototypeOf(o)}return t=>new t})}function on(t){return f(t)?()=>{const e=on(g(t));return e&&e()}:mt(t)}function rn(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const n=t.attrs;if(n){const t=n.length;let i=0;for(;i<t;){const o=n[i];if(Ie(o))break;if(0===o)i+=2;else if("number"==typeof o)for(i++;i<t&&"string"==typeof n[i];)i++;else{if(o===e)return n[i+1];i+=2}}}return null}(Qt(),t)}const sn="__parameters__",an="__prop__metadata__";function cn(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}function ln(t,e,n){return q(()=>{const i=cn(e);function o(...t){if(this instanceof o)return i.apply(this,t),this;const e=new o(...t);return n.annotation=e,n;function n(t,n,i){const o=t.hasOwnProperty(sn)?t[sn]:Object.defineProperty(t,sn,{value:[]})[sn];for(;o.length<=i;)o.push(null);return(o[i]=o[i]||[]).push(e),t}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}function dn(t,e,n,i){return q(()=>{const o=cn(e);function r(...t){if(this instanceof r)return o.apply(this,t),this;const e=new r(...t);return function(n,o){const r=n.constructor,s=r.hasOwnProperty(an)?r[an]:Object.defineProperty(r,an,{value:{}})[an];s[o]=s.hasOwnProperty(o)&&s[o]||[],s[o].unshift(e),i&&i(n,o,...t)}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class un{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=C({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const pn=new un("AnalyzeForEntryComponents"),hn=Function;function gn(t,e){void 0===e&&(e=t);for(let n=0;n<t.length;n++){let i=t[n];Array.isArray(i)?(e===t&&(e=t.slice(0,n)),gn(i,e)):e!==t&&e.push(i)}return e}function fn(t,e){t.forEach(t=>Array.isArray(t)?fn(t,e):e(t))}function mn(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function vn(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function bn(t,e){const n=[];for(let i=0;i<t;i++)n.push(e);return n}function xn(t,e,n){let i=Cn(t,e);return i>=0?t[1|i]=n:(i=~i,function(t,e,n,i){let o=t.length;if(o==e)t.push(n,i);else if(1===o)t.push(i,t[0]),t[0]=n;else{for(o--,t.push(t[o-1],t[o]);o>e;)t[o]=t[o-2],o--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function _n(t,e){const n=Cn(t,e);if(n>=0)return t[1|n]}function Cn(t,e){return function(t,e,n){let i=0,o=t.length>>n;for(;o!==i;){const r=i+(o-i>>1),s=t[r<<n];if(e===s)return r<<n;s>e?o=r:i=r+1}return~(o<<n)}(t,e,1)}const wn={},yn="__NG_DI_FLAG__",An="ngTempTokenPath",Zn=/\n/gm,kn="__source",Tn=c({provide:String,useValue:c});let On;function Mn(t){const e=On;return On=t,e}function In(t,e=I.Default){if(void 0===On)throw new Error("inject() must be called from an injection context");return null===On?N(t,void 0,e):On.get(t,e&I.Optional?null:void 0,e)}function Sn(t,e=I.Default){return(S||In)(g(t),e)}const Pn=Sn;function Nn(t){const e=[];for(let n=0;n<t.length;n++){const i=g(t[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let t,n=I.Default;for(let e=0;e<i.length;e++){const o=i[e],r=Un(o);"number"==typeof r?-1===r?t=o.token:n|=r:t=o}e.push(Sn(t,n))}else e.push(Sn(i))}return e}function qn(t,e){return t[yn]=e,t.prototype[yn]=e,t}function Un(t){return t[yn]}function En(t,e,n,i){const o=t[An];throw e[kn]&&o.unshift(e[kn]),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let o=d(e);if(Array.isArray(e))o=e.map(d).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];
1t.push(n+":"+("string"==typeof i?JSON.stringify(i):d(i)))}o=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${o}]: ${t.replace(Zn,"\n  ")}`}("\n"+t.message,o,n,i),t.ngTokenPath=o,t[An]=null,t}const Fn=qn(ln("Inject",t=>({token:t})),-1),Dn=qn(ln("Optional"),8),Ln=qn(ln("SkipSelf"),4);var Jn=(()=>((Jn=Jn||{})[Jn.Important=1]="Important",Jn[Jn.DashCase=2]="DashCase",Jn))();const jn=/^>|^->|<!--|-->|--!>|<!-$/g,Rn=/(<|>)/;const $n="__ngContext__";function Bn(t,e){t[$n]=e}function Hn(t){const e=function(t){return t[$n]||null}(t);return e?Array.isArray(e)?e:e.lView:null}let Qn;function Yn(t,e){return Qn(t,e)}function zn(t){const e=t[3];return dt(e)?e[3]:e}function Vn(t){return Wn(t[13])}function Gn(t){return Wn(t[4])}function Wn(t){for(;null!==t&&!dt(t);)t=t[4];return t}function Kn(t,e,n,i,o){if(null!=i){let r,s=!1;dt(i)?r=i:lt(i)&&(s=!0,i=i[0]);const a=It(i);0===t&&null!==n?null==o?di(e,n,a):li(e,n,a,o||null,!0):1===t&&null!==n?li(e,n,a,o||null,!0):2===t?Ai(e,a,s):3===t&&e.destroyNode(a),null!=r&&function(t,e,n,i,o){const r=n[7];r!==It(n)&&Kn(e,t,i,r,o);for(let s=10;s<n.length;s++){const o=n[s];ki(o[1],o,t,e,i,r)}}(e,t,r,n,o)}}function Xn(t,e){return Ot(t)?t.createText(e):t.createTextNode(e)}function ti(t,e,n){Ot(t)?t.setValue(e,n):e.textContent=n}function ei(t,e){return t.createComment(function(t){return t.replace(jn,t=>t.replace(Rn,"\u200b$1\u200b"))}(e))}function ni(t,e,n){return Ot(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function ii(t,e){const n=t[9],i=n.indexOf(e),o=e[3];1024&e[2]&&(e[2]&=-1025,Jt(o,-1)),n.splice(i,1)}function oi(t,e){if(t.length<=10)return;const n=10+e,i=t[n];if(i){const o=i[17];null!==o&&o!==t&&ii(o,i),e>0&&(t[n-1][4]=i[4]);const r=vn(t,10+e);!function(t,e){ki(t,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const s=r[19];null!==s&&s.detachView(r[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function ri(t,e){if(!(256&e[2])){const n=e[11];Ot(n)&&n.destroyNode&&ki(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return si(t[1],t);for(;e;){let n=null;if(lt(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)lt(e)&&si(e[1],e),e=e[3];null===e&&(e=t),lt(e)&&si(e[1],e),n=e&&e[4]}e=n}}(e)}}function si(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i<n.length;i+=2){const t=e[n[i]];if(!(t instanceof Oe)){const e=n[i+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2){const i=t[e[n]],o=e[n+1];try{o.call(i)}finally{}}else try{e.call(t)}finally{}}}}(t,e),function(t,e){const n=t.cleanup,i=e[7];let o=-1;if(null!==n)for(let r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){const t=n[r+1],s="function"==typeof t?t(e):It(e[t]),a=i[o=n[r+2]],c=n[r+3];"boolean"==typeof c?s.removeEventListener(n[r],a,c):c>=0?i[o=c]():i[o=-c].unsubscribe(),r+=2}else{const t=i[o=n[r+1]];n[r].call(t)}if(null!==i){for(let t=o+1;t<i.length;t++)i[t]();e[7]=null}}(t,e),1===e[1].type&&Ot(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&dt(e[3])){n!==e[3]&&ii(n,e);const i=e[19];null!==i&&i.detachView(t)}}}function ai(t,e,n){return ci(t,e.parent,n)}function ci(t,e,n){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return n[0];if(2&i.flags){const e=t.data[i.directiveStart].encapsulation;if(e===E.None||e===E.Emulated)return null}return Pt(i,n)}function li(t,e,n,i,o){Ot(t)?t.insertBefore(e,n,i,o):e.insertBefore(n,i,o)}function di(t,e,n){Ot(t)?t.appendChild(e,n):e.appendChild(n)}function ui(t,e,n,i,o){null!==i?li(t,e,n,i,o):di(t,e,n)}function pi(t,e){return Ot(t)?t.parentNode(e):e.parentNode}function hi(t,e,n){return bi(t,e,n)}function gi(t,e,n){return 40&t.type?Pt(t,n):null}let fi,mi,vi,bi=gi;function xi(t,e){bi=t,fi=e}function _i(t,e,n,i){const o=ai(t,i,e),r=e[11],s=hi(i.parent||e[6],i,e);if(null!=o)if(Array.isArray(n))for(let a=0;a<n.length;a++)ui(r,o,n[a],s,!1);else ui(r,o,n,s,!1);void 0!==fi&&fi(r,i,e,n,o)}function Ci(t,e){if(null!==e){const n=e.type;if(3&n)return Pt(e,t);if(4&n)return yi(-1,t[e.index]);if(8&n){const n=e.child;if(null!==n)return Ci(t,n);{const n=t[e.index];return dt(n)?yi(-1,n):It(n)}}if(32&n)return Yn(e,t)()||It(t[e.index]);{const n=wi(t,e);return null!==n?Array.isArray(n)?n[0]:Ci(zn(t[16]),n):Ci(t,e.next)}}return null}function wi(t,e){return null!==e?t[16][6].projection[e.projection]:null}function yi(t,e){const n=10+t+1;
vendor: 4,942 bytes, line 1
1if(n<e.length){const t=e[n],i=t[1].firstChild;if(null!==i)return Ci(t,i)}return e[7]}function Ai(t,e,n){const i=pi(t,e);i&&function(t,e,n,i){Ot(t)?t.removeChild(e,n,i):e.removeChild(n)}(t,i,e,n)}function Zi(t,e,n,i,o,r,s){for(;null!=n;){const a=i[n.index],c=n.type;if(s&&0===e&&(a&&Bn(It(a),i),n.flags|=4),64!=(64&n.flags))if(8&c)Zi(t,e,n.child,i,o,r,!1),Kn(e,t,o,a,r);else if(32&c){const s=Yn(n,i);let c;for(;c=s();)Kn(e,t,o,c,r);Kn(e,t,o,a,r)}else 16&c?Ti(t,e,i,n,o,r):Kn(e,t,o,a,r);n=s?n.projectionNext:n.next}}function ki(t,e,n,i,o,r){Zi(n,i,t.firstChild,e,o,r,!1)}function Ti(t,e,n,i,o,r){const s=n[16],a=s[6].projection[i.projection];if(Array.isArray(a))for(let c=0;c<a.length;c++)Kn(e,t,o,a[c],r);else Zi(t,e,a,s[3],o,r,!0)}function Oi(t,e,n){Ot(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Mi(t,e,n){Ot(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}function Ii(t){var e;return(null===(e=function(){if(void 0===mi&&(mi=null,J.trustedTypes))try{mi=J.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return mi}())||void 0===e?void 0:e.createHTML(t))||t}function Si(t){var e;return(null===(e=function(){if(void 0===vi&&(vi=null,J.trustedTypes))try{vi=J.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return vi}())||void 0===e?void 0:e.createHTML(t))||t}class Pi{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class Ni extends Pi{getTypeName(){return"HTML"}}class qi extends Pi{getTypeName(){return"Style"}}class Ui extends Pi{getTypeName(){return"Script"}}class Ei extends Pi{getTypeName(){return"URL"}}class Fi extends Pi{getTypeName(){return"ResourceURL"}}function Di(t){return t instanceof Pi?t.changingThisBreaksApplicationSecurity:t}function Li(t,e){const n=Ji(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see https://g.co/ng/security#xss)`)}return n===e}function Ji(t){return t instanceof Pi&&t.getTypeName()||null}function ji(t){return new Ni(t)}function Ri(t){return new qi(t)}function $i(t){return new Ui(t)}function Bi(t){return new Ei(t)}function Hi(t){return new Fi(t)}function Qi(t){const e=new zi(t);return function(){try{return!!(new window.DOMParser).parseFromString(Ii(""),"text/html")}catch(t){return!1}}()?new Yi(e):e}class Yi{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(Ii(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class zi{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Ii(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=Ii(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0<i;i--){const n=e.item(i).name;("xmlns:ns1"===n||0===n.indexOf("ns1:"))&&t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const Vi=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,Gi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Wi(t){return(t=String(t)).match(Vi)||t.match(Gi)?t:"unsafe:"+t}function Ki(t){return(t=String(t)).split(",").map(t=>Wi(t.trim())).join(", ")}function Xi(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function to(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const eo=Xi("area,br,col,hr,img,wbr"),no=Xi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),io=Xi("rp,rt"),oo=to(eo,to(no,Xi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),to(io,Xi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),to(io,no)),ro=Xi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),so=Xi("srcset"),ao=to(ro,so,Xi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,c
1olspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Xi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),co=Xi("script,style,template");class lo{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!oo.hasOwnProperty(e))return this.sanitizedSomething=!0,!co.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i),e=t.name,o=e.toLowerCase();if(!ao.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let r=t.value;ro[o]&&(r=Wi(r)),so[o]&&(r=Ki(r)),this.buf.push(" ",e,'="',ho(r),'"')}return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();oo.hasOwnProperty(e)&&!eo.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(ho(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const uo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,po=/([^\#-~ |!])/g;function ho(t){return t.replace(/&/g,"&amp;").replace(uo,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(po,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let go;function fo(t,e){let n=null;try{go=go||Qi(t);let i=e?String(e):"";n=go.getInertBodyElement(i);let o=5,r=i;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,i=r,r=n.innerHTML,n=go.getInertBodyElement(i)}while(i!==r);return Ii((new lo).sanitizeChildren(mo(n)||n))}finally{if(n){const t=mo(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function mo(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var vo=(()=>((vo=vo||{})[vo.NONE=0]="NONE",vo[vo.HTML=1]="HTML",vo[vo.STYLE=2]="STYLE",vo[vo.SCRIPT=3]="SCRIPT",vo[vo.URL=4]="URL",vo[vo.RESOURCE_URL=5]="RESOURCE_URL",vo))();function bo(t){const e=_o();return e?Si(e.sanitize(vo.HTML,t)||""):Li(t,"HTML")?Si(Di(t)):fo(Tt(),v(t))}function xo(t){const e=_o();return e?e.sanitize(vo.URL,t)||"":Li(t,"URL")?Di(t):Wi(v(t))}function _o(){const t=$t();return t&&t[12]}function Co(t){return t.ngOriginalError}function wo(t,...e){t.error(...e)}class yo{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=(o=t)&&o.ngErrorLogger||wo;var o;i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?t.ngDebugContext||this._findContext(Co(t)):null}_findOriginalError(t){let e=t&&Co(t);for(;e&&Co(e);)e=Co(e);return e||null}}const Ao=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(J))();function Zo(t){return t.ownerDocument.defaultView}function ko(t){return t.ownerDocument}function To(t){return t instanceof Function?t():t}function Oo(t,e,n){let i=t.length;for(;;){const o=t.indexOf(e,n);if(-1===o)return o;if(0===o||t.charCodeAt(o-1)<=32){const n=e.length;if(o+n===i||t.charCodeAt(o+n)<=32)return o}n=o+1}}const Mo="ng-template";function Io(t,e,n){let i=0;for(;i<t.length;){let o=t[i++];if(n&&"class"===o){if(o=t[i],-1!==Oo(o.toLowerCase(),e,0))return!0}else if(1===o){for(;i<t.length&&"string"==typeof(o=t[i++]);
vendor: 14,418 bytes, line 1
1)if(o.toLowerCase()===e)return!0;return!1}}return!1}function So(t){return 4===t.type&&t.value!==Mo}function Po(t,e,n){return e===(4!==t.type||n?t.value:Mo)}function No(t,e,n){let i=4;const o=t.attrs||[],r=function(t){for(let e=0;e<t.length;e++)if(Ie(t[e]))return e;return t.length}(o);let s=!1;for(let a=0;a<e.length;a++){const c=e[a];if("number"!=typeof c){if(!s)if(4&i){if(i=2|1&i,""!==c&&!Po(t,c,n)||""===c&&1===e.length){if(qo(i))return!1;s=!0}}else{const l=8&i?c:e[++a];if(8&i&&null!==t.attrs){if(!Io(t.attrs,l,n)){if(qo(i))return!1;s=!0}continue}const d=Uo(8&i?"class":c,o,So(t),n);if(-1===d){if(qo(i))return!1;s=!0;continue}if(""!==l){let t;t=d>r?"":o[d+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==Oo(e,l,0)||2&i&&l!==t){if(qo(i))return!1;s=!0}}}}else{if(!s&&!qo(i)&&!qo(c))return!1;if(s&&qo(c))continue;s=!1,i=c|1&i}}return qo(i)||s}function qo(t){return 0==(1&t)}function Uo(t,e,n,i){if(null===e)return-1;let o=0;if(i||!n){let n=!1;for(;o<e.length;){const i=e[o];if(i===t)return o;if(3===i||6===i)n=!0;else{if(1===i||2===i){let t=e[++o];for(;"string"==typeof t;)t=e[++o];continue}if(4===i)break;if(0===i){o+=4;continue}}o+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const i=t[n];if("number"==typeof i)return-1;if(i===e)return n;n++}return-1}(e,t)}function Eo(t,e,n=!1){for(let i=0;i<e.length;i++)if(No(t,e[i],n))return!0;return!1}function Fo(t,e){t:for(let n=0;n<e.length;n++){const i=e[n];if(t.length===i.length){for(let e=0;e<t.length;e++)if(t[e]!==i[e])continue t;return!0}}return!1}function Do(t,e){return t?":not("+e.trim()+")":e}function Lo(t){let e=t[0],n=1,i=2,o="",r=!1;for(;n<t.length;){let s=t[n];if("string"==typeof s)if(2&i){const e=t[++n];o+="["+s+(e.length>0?'="'+e+'"':"")+"]"}else 8&i?o+="."+s:4&i&&(o+=" "+s);else""!==o&&!qo(s)&&(e+=Do(r,o),o=""),i=s,r=r||!qo(i);n++}return""!==o&&(e+=Do(r,o)),e}const Jo={};function jo(t){Ro(Bt(),$t(),ve()+t,Kt())}function Ro(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&ye(e,i,n)}else{const i=t.preOrderHooks;null!==i&&Ae(e,i,0,n)}be(n)}function $o(t,e){return t<<17|e<<2}function Bo(t){return t>>17&32767}function Ho(t){return 2|t}function Qo(t){return(131068&t)>>2}function Yo(t,e){return-131069&t|e<<2}function zo(t){return 1|t}function Vo(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const o=n[i],r=n[i+1];if(-1!==r){const n=t.data[r];ce(o),n.contentQueries(2,e[r],r)}}}function Go(t,e,n,i,o,r,s,a,c,l){const d=e.blueprint.slice();return d[0]=o,d[2]=140|i,Lt(d),d[3]=d[15]=t,d[8]=n,d[10]=s||t&&t[10],d[11]=a||t&&t[11],d[12]=c||t&&t[12]||null,d[9]=l||t&&t[9]||null,d[6]=r,d[16]=2==e.type?t[16]:d,d}function Wo(t,e,n,i,o){let r=t.data[e];if(null===r)r=Ko(t,e,n,i,o),jt.lFrame.inI18n&&(r.flags|=64);else if(64&r.type){r.type=n,r.value=i,r.attrs=o;const t=zt();r.injectorIndex=null===t?-1:t.injectorIndex}return Vt(r,!0),r}function Ko(t,e,n,i,o){const r=Yt(),s=Gt(),a=t.data[e]=function(t,e,n,i,o,r){return{type:n,index:i,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:o,attrs:r,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,s?r:r&&r.parent,n,e,i,o);return null===t.firstChild&&(t.firstChild=a),null!==r&&(s?null==r.child&&null!==a.parent&&(r.child=a):null===r.next&&(r.next=a)),a}function Xo(t,e,n,i){if(0===n)return-1;const o=e.length;for(let r=0;r<n;r++)e.push(i),t.blueprint.push(i),t.data.push(null);return o}function tr(t,e,n){ue(e);try{const i=t.viewQuery;null!==i&&Sr(1,i,n);const o=t.template;null!==o&&ir(t,e,o,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Vo(t,e),t.staticViewQueries&&Sr(2,t.viewQuery,n);const r=t.components;null!==r&&function(t,e){for(let n=0;n<e.length;n++)kr(t,e[n])}(e,r)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),i}finally{e[2]&=-5,me()}}function er(t,e,n,i){const o=e[2];if(256==(256&o))return;ue(e);const r=Kt();try{Lt(e),function(t){jt.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==n&&ir(t,e,n,2,i);const s=3==(3&o);if(!r)if(s){const n=t.preOrderCheckHooks;null!==n&&ye(e,n,null)}else{const n=t.preOrderHooks;null!==n&&Ae(e,n,0,null),Ze(e,0)}if(function(t){for(let e=Vn(t);null!==e;e=Gn(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],i=n[3];0==(1024&n[2])&&Jt(i,1),n[2]|=1024}}}(e),function(t){for(let e=Vn(t);null!==e;e=Gn(e))for(let t=10;t<e.length;t++){const n=e[t],i=n[1];Ft(n)&&er(i,n,i.template,n[8])}}(e),null!==t.contentQueries&&Vo(t,e),!r)if(s){const n=t.contentCheckHooks;null!==n&&ye(e,n)}else{const n=t.contentHooks;null!==n&&Ae(e,n,1),Ze(e,1)}!function(t,e){const n=t.hostBindingOpCodes;if(null!==n)try{for(let t=0;t<n.length;t++){const i=n[t];if(i<0)be(~i);else{const o=i,r=n[++t],s=n[++t];re(r,o),s(2,e[o])}}}finally{be(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)Ar(t,e[n])}(e,a);const c=t.viewQuery;if(null!==c&&Sr(2,c,i),!r)if(s){const n=t.viewCheckHooks;null!==n&&ye(e,n)}else{const n=t.viewHooks;null!==n&&Ae(e,n,2),Ze(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),r||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Jt(e[3],-1))}finally{me()}}function nr(t,e,n,i){const o=e[10],r=!Kt(),s=Et(e);try{r&&!s&&o.begin&&o.begin(),s&&tr(t,e,i),er(t,e,n,i)}finally{r&&!s&&o.end&&o.end()}}function ir(t,e,n,i,o){const r=ve(),s=2&i;try{be(-1),s&&e.length>20&&Ro(t,e,20,Kt()),n(i,o)}finally{be(r)}}function or(t,e,n){if(ut(e)){const i=e.directiveEnd;for(let o=e.directiveStart;o<i;o++){const e=t.data[o];e.contentQueries&&e.contentQueries(1,n[o],o)}}}function rr(t,e,n){!Rt()||(function(t,e,n,i){const o=n.directiveStart,r=n.directiveEnd;t.firstCreatePass||Je(n,e),Bn(i,e);const s=n.initialInputs;for(let a=o;a<r;a++){const i=t.data[a],r=gt(i);r&&xr(e,n,i);const c=Ke(e,t,a,n);Bn(c,e),null!==s&&Cr(0,a-o,c,i,0,s),r&&(Ut(n.index,e)[8]=c)}}(t,e,n,Pt(n,e)),128==(128&n.flags)&&function(t,e,n){const i=n.directiveStart,o=n.directiveEnd,r=n.index,s=jt.lFrame.currentDirectiveIndex;try{be(r);for(let n=i;n<o;n++){const i=t.data[n],o=e[n];se(n),(null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs)&&gr(i,o)}}finally{be(-1),se(s)}}(t,e,n))}function sr(t,e,n=Pt){const i=e.localNames;if(null!==i){let o=e.index+1;for(let r=0;r<i.length;r+=2){const s=i[r+1],a=-1===s?n(e,t):t[s];t[o++]=a}}}function ar(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=cr(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function cr(t,e,n,i,o,r,s,a,c,l){const d=20+i,u=d+o,p=function(t,e){const n=[];for(let i=0;i<e;i++)n.push(i<t?null:Jo);return n}(d,u),h="function"==typeof l?l():l;return p[1]={type:t,blueprint:p,template:n,queries:null,viewQuery:a,declTNode:e,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof r?r():r,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:c,consts:h,incompleteFirstPass:!1}}function lr(t,e,n,i){const o=Nr(e);null===n?o.push(i):(o.push(n),t.firstCreatePass&&qr(t).push(i,o.length-1))}function dr(t,e,n){for(let i in t)if(t.hasOwnProperty(i)){const o=t[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(e,o):n[i]=[e,o]}return n}function ur(t,e,n,i,o,r,s,a){const c=Pt(e,n);let l,d=e.inputs;!a&&null!=d&&(l=d[i])?(Er(t,n,l,i,o),pt(e)&&function(t,e){const n=Ut(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3&e.type&&(i=function(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(i),o=null!=s?s(o,e.value||"",i):o,Ot(r)?r.setProperty(c,i,o):Se(i)||(c.setProperty?c.setProperty(i,o):c[i]=o))}function pr(t,e,n,i){let o=!1;if(Rt()){const r=function(t,e,n){const i=t.directiveRegistry;let o=null;if(i)for(let r=0;r<i.length;r++){const s=i[r];Eo(n,s.selectors,!1)&&(o||(o=[]),Be(Je(n,e),t,s.type),gt(s)?(fr(t,n),o.unshift(s)):o.push(s))}return o}(t,e,n),s=null===i?null:{"":-1};if(null!==r){o=!0,vr(n,t.data.length,r.length);for(let t=0;t<r.length;t++){const e=r[t];e.providersResolver&&e.providersResolver(e)}let i=!1,a=!1,c=Xo(t,e,r.length,null);for(let o=0;o<r.length;o++){const l=r[o];n.mergedAttrs=Pe(n.mergedAttrs,l.hostAttrs),br(t,n,e,c,l),mr(c,l,s),null!==l.contentQueries&&(n.flags|=8),(null!==l.hostBindings||null!==l.hostAttrs||0!==l.hostVars)&&(n.flags|=128);const d=l.type.prototype;!i&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index),i=!0),!a&&(d.ngOnChanges||d.ngDoCheck)&&((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index),a=!0),c++}!function(t,e){const n=e.directiveEnd,i=t.data,o=e.attrs,r=[];let s=null,a=null;for(let c=e.directiveStart;c<n;c++){const t=i[c],n=t.inputs,l=null===o||So(e)?null:wr(n,o);r.push(l),s=dr(n,c,s),a=dr(t.outputs,c,a)}null!==s&&(s.hasOwnProperty("class")&&(e.flags|=16),s.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=r,e.inputs=s,e.outputs=a}(t,n)}s&&function(t,e,n){if(e){const i=t.localNames=[];for(let t=0;t<e.length;t+=2){const o=n[e[t+1]];if(null==o)throw new m("301",`Export of name '${e[t+1]}' not found!`);i.push(e[t],o)}}}(n,i,s)}return n.mergedAttrs=Pe(n.mergedAttrs,n.attrs),o}function hr(t,e,n,i,o,r){const s=r.hostBindings;if(s){let n=t.hostBindingOpCodes;null===n&&(n=t.hostBindingOpCodes=[]);const r=~e.index;(function(t){let e=t.length;for(;e>0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=r&&n.push(r),n.push(i,o,s)}}function gr(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function fr(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function mr(t,e,n){if(n){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;gt(e)&&(n[""]=t)}}function vr(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function br(t,e,n,i,o){t.data[i]=o;const r=o.factory||(o.factory=mt(o.type)),s=new Oe(r,gt(o),null);t.blueprint[i]=s,n[i]=s,hr(t,e,0,i,Xo(t,n,o.hostVars,Jo),o)}function xr(t,e,n){const i=Pt(e,t),o=ar(n),r=t[10],s=Tr(t,Go(t,o,null,n.onPush?64:16,i,e,r,r.createRenderer(i,n),null,null));t[e.index]=s}function _r(t,e,n,i,o,r,s){if(null==r)Ot(t)?t.removeAttribute(e,o,n):e.removeAttribute(o);else{const a=null==s?v(r):s(r,i||"",o);Ot(t)?t.setAttribute(e,o,a,n):n?e.setAttributeNS(n,o,a):e.setAttribute(o,a)}}function Cr(t,e,n,i,o,r){const s=r[e];if(null!==s){const t=i.setInput;for(let e=0;e<s.length;){const o=s[e++],r=s[e++],a=s[e++];null!==t?i.setInput(n,a,o,r):n[r]=a}}}function wr(t,e){let n=null,i=0;for(;i<e.length;){const o=e[i];if(0!==o)if(5!==o){if("number"==typeof o)break;t.hasOwnProperty(o)&&(null===n&&(n=[]),n.push(o,t[o],e[i+1])),i+=2}else i+=2;else i+=4}return n}function yr(t,e,n,i){return new Array(t,!0,!1,e,null,0,i,n,null,null)}function Ar(t,e){const n=Ut(e,t);if(Ft(n)){const t=n[1];80&n[2]?er(t,n,t.template,n[8]):n[5]>0&&Zr(n)}}function Zr(t){for(let n=Vn(t);null!==n;n=Gn(n))for(let t=10;t<n.length;t++){const e=n[t];if(1024&e[2]){const t=e[1];er(t,e,t.template,e[8])}else e[5]>0&&Zr(e)}const e=t[1].components;if(null!==e)for(let n=0;n<e.length;n++){const i=Ut(e[n],t);Ft(i)&&i[5]>0&&Zr(i)}}function kr(t,e){const n=Ut(e,t),i=n[1];(function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])})(i,n),tr(i,n,n[8])}function Tr(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Or(t){for(;t;){t[2]|=64;const e=zn(t);if(ft(t)&&!e)return t;t=e}return null}function Mr(t,e,n){const i=e[10];i.begin&&i.begin();try{er(t,e,t.template,n)}catch(o){throw Ur(e,o),o}finally{i.end&&i.end()}}function Ir(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],i=Hn(n),o=i[1];nr(o,i,o.template,n)}}(t[8])}function Sr(t,e,n){ce(0),e(t,n)}const Pr=(()=>Promise.resolve(null))();function Nr(t){return t[7]||(t[7]=[])}function qr(t){return t.cleanup||(t.cleanup=[])}function Ur(t,e){const n=t[9],i=n?n.get(yo,null):null;i&&i.handleError(e)}function Er(t,e,n,i,o){for(let r=0;r<n.length;){const s=n[r++],a=n[r++],c=e[s],l=t.data[s];null!==l.setInput?l.setInput(c,o,i,a):c[a]=o}}function Fr(t,e,n){const i=St(e,t);ti(t[11],i,n)}function Dr(t,e,n){let i=n?t.styles:null,o=n?t.classes:null,r=0;if(null!==e)for(let s=0;s<e.length;s++){const t=e[s];"number"==typeof t?r=t:1==r?o=u(o,t):2==r&&(i=u(i,t+": "+e[++s]+";"))}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=o:t.classesWithoutHost=o}const Lr=new un("INJECTOR",-1);class Jr{get(t,e=wn){if(e===wn){const e=new Error(`NullInjectorError: No provider for ${d(t)}!`);throw e.name="NullInjectorError",e}return e}}const jr=new un("Set Injector scope."),Rr={},$r={};let Br;function Hr(){return void 0===Br&&(Br=new Jr),Br}function Qr(t,e=null,n=null,i){return new Yr(t,n,e||Hr(),i)}class Yr{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const o=[];e&&fn(e,n=>this.processProvider(n,t,e)),fn([t],t=>this.processInjectorType(t,[],o)),this.records.set(Lr,Gr(void 0,this));const r=this.records.get(jr);this.scope=null!=r?r.value:null,this.source=i||("object"==typeof t?null:d(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=wn,n=I.Default){this.assertNotDestroyed();const i=Mn(this),o=P(void 0);try{if(!(n&I.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(r=t)||"object"==typeof r&&r instanceof un)&&y(t);e=n&&this.injectableDefInScope(n)?Gr(zr(t),Rr):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&I.Self?Hr():this.parent).get(t,e=n&I.Optional&&e===wn?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[An]=s[An]||[]).unshift(d(t)),i)throw s;return En(s,t,"R3InjectorError",this.source)}throw s}finally{P(o),Mn(i)}var r}
vendor: 5,752 bytes, line 1
1_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(d(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=g(t)))return!1;let i=Z(t);const o=null==i&&t.ngModule||void 0,r=void 0===o?t:o,s=-1!==n.indexOf(r);if(void 0!==o&&(i=Z(o)),null==i)return!1;if(null!=i.imports&&!s){let t;n.push(r);try{fn(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:i}=t[e];fn(i,t=>this.processProvider(t,n,i||R))}}this.injectorDefTypes.add(r);const a=mt(r)||(()=>new r);this.records.set(r,Gr(a,Rr));const c=i.providers;if(null!=c&&!s){const e=t;fn(c,t=>this.processProvider(t,e,c))}return void 0!==o&&void 0!==t.providers}processProvider(t,e,n){let i=Kr(t=g(t))?t:g(t&&t.provide);const o=(r=t,Wr(r)?Gr(void 0,r.useValue):Gr(Vr(r),Rr));var r;if(Kr(t)||!0!==t.multi)this.records.get(i);else{let e=this.records.get(i);e||(e=Gr(void 0,Rr,!0),e.factory=()=>Nn(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,o)}hydrate(t,e){return e.value===Rr&&(e.value=$r,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value;var n}injectableDefInScope(t){if(!t.providedIn)return!1;const e=g(t.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function zr(t){const e=y(t),n=null!==e?e.factory:mt(t);if(null!==n)return n;if(t instanceof un)throw new Error(`Token ${d(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=bn(e,"?");throw new Error(`Can't resolve all parameters for ${d(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[k]||t[O]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Vr(t,e,n){let i;if(Kr(t)){const e=g(t);return mt(e)||zr(e)}if(Wr(t))i=()=>g(t.useValue);else if(function(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...Nn(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Sn(g(t.useExisting));else{const e=g(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return mt(e)||zr(e);i=()=>new e(...Nn(t.deps))}return i}function Gr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Wr(t){return null!==t&&"object"==typeof t&&Tn in t}function Kr(t){return"function"==typeof t}const Xr=function(t,e,n){return function(t,e=null,n=null,i){const o=Qr(t,e,n,i);return o._resolveInjectorDefTypes(),o}({name:n},e,t,n)};let ts=(()=>{class t{static create(t,e){return Array.isArray(t)?Xr(t,e,""):Xr(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=wn,t.NULL=new Jr,t.\u0275prov=C({token:t,providedIn:"any",factory:()=>Sn(Lr)}),t.__NG_ELEMENT_ID__=-1,t})();function es(t,e){we(Hn(t)[1],Qt())}function ns(t){let e=function(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),n=!0;const i=[t];for(;e;){let o;if(gt(t))o=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");o=e.\u0275dir}if(o){if(n){i.push(o);const e=t;e.inputs=is(t.inputs),e.declaredInputs=is(t.declaredInputs),e.outputs=is(t.outputs);const n=o.hostBindings;n&&ss(t,n);const r=o.viewQuery,s=o.contentQueries;if(r&&os(t,r),s&&rs(t,s),l(t.inputs,o.inputs),l(t.declaredInputs,o.declaredInputs),l(t.outputs,o.outputs),gt(o)&&o.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(o.data.animation)}}const e=o.features;if(e)for(let i=0;i<e.length;i++){const o=e[i];o&&o.ngInherit&&o(t),o===ns&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,n=null;for(let i=t.length-1;i>=0;i--){const o=t[i];o.hostVars=e+=o.hostVars,o.hostAttrs=Pe(o.hostAttrs,n=Pe(n,o.hostAttrs))}}(i)}function is(t){return t===j?{}:t===R?[]:t}function os(t,e){const n=t.viewQuery;t.viewQuery=n?(t,i)=>{e(t,i),n(t,i)}:e}function rs(t,e){const n=t.contentQueries;t.contentQueries=n?(t,i,o)=>{e(t,i,o),n(t,i,o)}:e}function ss(t,e){const n=t.hostBindings;t.hostBindings=n?(t,i)=>{e(t,i),n(t,i)}:e}let as=null;function cs(){if(!as){const t=J.Symbol;if(t&&t.iterator)as=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(as=n)}}}return as}class ls{constructor(t){this.wrapped=t}static wrap(t){return new ls(t)}static unwrap(t){return ls.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof ls}}function ds(t){return!!us(t)&&(Array.isArray(t)||!(t instanceof Map)&&cs()in t)}function us(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function ps(t,e,n){return t[e]=n}function hs(t,e){return t[e]}function gs(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function fs(t,e,n,i){const o=gs(t,e,n);return gs(t,e+1,i)||o}function ms(t,e,n,i,o){const r=fs(t,e,n,i);return gs(t,e+2,o)||r}function vs(t,e,n,i,o,r){const s=fs(t,e,n,i);return fs(t,e+2,o,r)||s}function bs(t,e,n,i){const o=$t();return gs(o,ne(),e)&&(Bt(),function(t,e,n,i,o,r){const s=Pt(t,e);_r(e[11],s,r,t.value,n,i,o)}(xe(),o,t,e,n,i)),bs}function xs(t,e,n,i){return gs(t,ne(),n)?e+v(n)+i:Jo}
vendor: 2,818 bytes, line 1
1function _s(t,e,n,i,o,r,s,a,c,l){const d=vs(t,ee(),n,o,s,c);return ie(4),d?e+v(n)+i+v(o)+r+v(s)+a+v(c)+l:Jo}function Cs(t,e,n,i,o,r,s,a){const c=$t(),l=Bt(),d=t+20,u=l.firstCreatePass?function(t,e,n,i,o,r,s,a,c){const l=e.consts,d=Wo(e,t,4,s||null,Dt(l,a));pr(e,n,d,Dt(l,c)),we(e,d);const u=d.tViews=cr(2,d,i,o,r,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l);return null!==e.queries&&(e.queries.template(e,d),u.queries=e.queries.embeddedTView(d)),d}(d,l,c,e,n,i,o,r,s):l.data[d];Vt(u,!1);const p=c[11].createComment("");_i(l,c,p,u),Bn(p,c),Tr(c,c[d]=yr(p,c,p,u)),ht(u)&&rr(l,c,u),null!=s&&sr(c,u,a)}function ws(t){return qt(jt.lFrame.contextLView,20+t)}function ys(t,e=I.Default){const n=$t();return null===n?Sn(t,e):Ye(Qt(),n,g(t),e)}function As(){throw new Error("invalid")}function Zs(t,e,n){const i=$t();return gs(i,ne(),e)&&ur(Bt(),xe(),i,t,e,i[11],n,!1),Zs}function ks(t,e,n,i,o){const r=o?"class":"style";Er(t,n,e.inputs[r],r,i)}function Ts(t,e,n,i){const o=$t(),r=Bt(),s=20+t,a=o[11],c=o[s]=ni(a,e,jt.lFrame.currentNamespace),l=r.firstCreatePass?function(t,e,n,i,o,r,s){const a=e.consts,c=Wo(e,t,2,o,Dt(a,r));return pr(e,n,c,Dt(a,s)),null!==c.attrs&&Dr(c,c.attrs,!1),null!==c.mergedAttrs&&Dr(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(s,r,o,0,e,n,i):r.data[s];Vt(l,!0);const d=l.mergedAttrs;null!==d&&Me(a,c,d);const u=l.classes;null!==u&&Mi(a,c,u);const p=l.styles;null!==p&&Oi(a,c,p),64!=(64&l.flags)&&_i(r,o,c,l),0===jt.lFrame.elementDepthCount&&Bn(c,o),jt.lFrame.elementDepthCount++,ht(l)&&(rr(r,o,l),or(r,l,o)),null!==i&&sr(o,l)}function Os(){let t=Qt();Gt()?Wt():(t=t.parent,Vt(t,!1));const e=t;jt.lFrame.elementDepthCount--;const n=Bt();n.firstCreatePass&&(we(n,t),ut(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&ks(n,e,$t(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&ks(n,e,$t(),e.stylesWithoutHost,!1)}function Ms(t,e,n,i){Ts(t,e,n,i),Os()}function Is(t,e,n){const i=$t(),o=Bt(),r=t+20,s=o.firstCreatePass?function(t,e,n,i,o){const r=e.consts,s=Dt(r,i),a=Wo(e,t,8,"ng-container",s);return null!==s&&Dr(a,s,!0),pr(e,n,a,Dt(r,o)),null!==e.queries&&e.queries.elementStart(e,a),a}(r,o,i,e,n):o.data[r];Vt(s,!0);const a=i[r]=i[11].createComment("");_i(o,i,a,s),Bn(a,i),ht(s)&&(rr(o,i,s),or(o,s,i)),null!=n&&sr(i,s)}function Ss(){let t=Qt();const e=Bt();Gt()?Wt():(t=t.parent,Vt(t,!1)),e.firstCreatePass&&(we(e,t),ut(t)&&e.queries.elementEnd(t))}function Ps(t,e,n){Is(t,e,n),Ss()}function Ns(){return $t()}function qs(t){return!!t&&"function"==typeof t.then}function Us(t){return!!t&&"function"==typeof t.subscribe}const Es=Us;function Fs(t,e,n,i){const o=$t(),r=Bt(),s=Qt();return function(t,e,n,i,o,r,s,a){const c=ht(i),l=t.firstCreatePass&&qr(t),d=e[8],u=Nr(e);let p=!0;
vendor: 4,754 bytes, line 1
1if(3&i.type||a){const h=Pt(i,e),g=a?a(h):h,f=u.length,m=a?t=>a(It(t[i.index])):i.index;if(Ot(n)){let s=null;if(!a&&c&&(s=function(t,e,n,i){const o=t.cleanup;if(null!=o)for(let r=0;r<o.length-1;r+=2){const t=o[r];if(t===n&&o[r+1]===i){const t=e[7],n=o[r+2];return t.length>n?t[n]:null}"string"==typeof t&&(r+=2)}return null}(t,e,o,i.index)),null!==s)(s.__ngLastListenerFn__||s).__ngNextListenerFn__=r,s.__ngLastListenerFn__=r,p=!1;else{r=Ls(i,e,d,r,!1);const t=n.listen(g,o,r);u.push(r,t),l&&l.push(o,m,f,f+1)}}else r=Ls(i,e,d,r,!0),g.addEventListener(o,r,s),u.push(r),l&&l.push(o,m,f,s)}else r=Ls(i,e,d,r,!1);const h=i.outputs;let g;if(p&&null!==h&&(g=h[o])){const t=g.length;if(t)for(let n=0;n<t;n+=2){const t=e[g[n]][g[n+1]].subscribe(r),s=u.length;u.push(r,t),l&&l.push(o,i.index,s,-(s+1))}}}(r,o,o[11],s,t,e,!!n,i),Fs}function Ds(t,e,n,i){try{return!1!==n(i)}catch(o){return Ur(t,o),!1}}function Ls(t,e,n,i,o){return function n(r){if(r===Function)return i;const s=2&t.flags?Ut(t.index,e):e;0==(32&e[2])&&Or(s);let a=Ds(e,0,i,r),c=n.__ngNextListenerFn__;for(;c;)a=Ds(e,0,c,r)&&a,c=c.__ngNextListenerFn__;return o&&!1===a&&(r.preventDefault(),r.returnValue=!1),a}}function Js(t=1){return function(t){return(jt.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,jt.lFrame.contextLView))[8]}(t)}function js(t,e){let n=null;const i=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let o=0;o<e.length;o++){const r=e[o];if("*"!==r){if(null===i?Eo(t,r,!0):Fo(i,r))return o}else n=o}return n}function Rs(t){const e=$t()[16][6];if(!e.projection){const n=e.projection=bn(t?t.length:1,null),i=n.slice();let o=e.child;for(;null!==o;){const e=t?js(o,t):0;null!==e&&(i[e]?i[e].projectionNext=o:n[e]=o,i[e]=o),o=o.next}}}function $s(t,e=0,n){const i=$t(),o=Bt(),r=Wo(o,20+t,16,null,n||null);null===r.projection&&(r.projection=e),Wt(),64!=(64&r.flags)&&function(t,e,n){Ti(e[11],0,e,n,ai(t,n,e),hi(n.parent||e[6],n,e))}(o,i,r)}function Bs(t,e,n){return Hs(t,"",e,"",n),Bs}function Hs(t,e,n,i,o){const r=$t(),s=xs(r,e,n,i);return s!==Jo&&ur(Bt(),xe(),r,t,s,r[11],o,!1),Hs}function Qs(t,e,n,i,o){const r=t[n+1],s=null===e;let a=i?Bo(r):Qo(r),c=!1;for(;0!==a&&(!1===c||s);){const n=t[a+1];Ys(t[a],e)&&(c=!0,t[a+1]=i?zo(n):Ho(n)),a=i?Bo(n):Qo(n)}c&&(t[n+1]=i?Ho(r):zo(r))}function Ys(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Cn(t,e)>=0}const zs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Vs(t){return t.substring(zs.key,zs.keyEnd)}function Gs(t,e){const n=zs.textEnd;return n===e?-1:(e=zs.keyEnd=function(t,e,n){for(;e<n&&t.charCodeAt(e)>32;)e++;return e}(t,zs.key=e,n),Ws(t,e,n))}function Ws(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function Ks(t,e,n){return na(t,e,n,!1),Ks}function Xs(t,e){return na(t,e,null,!0),Xs}function ta(t){ia(xn,ea,t,!0)}function ea(t,e){for(let n=function(t){return function(t){zs.key=0,zs.keyEnd=0,zs.value=0,zs.valueEnd=0,zs.textEnd=t.length}(t),Gs(t,Ws(t,0,zs.textEnd))}(e);n>=0;n=Gs(e,n))xn(t,Vs(e),!0)}function na(t,e,n,i){const o=$t(),r=Bt(),s=ie(2);r.firstUpdatePass&&ra(r,t,s,i),e!==Jo&&gs(o,s,e)&&ca(r,r.data[ve()],o,o[11],t,o[s+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=d(Di(t)))),t}(e,n),i,s)}function ia(t,e,n,i){const o=Bt(),r=ie(2);o.firstUpdatePass&&ra(o,null,r,i);const s=$t();if(n!==Jo&&gs(s,r,n)){const a=o.data[ve()];if(ua(a,i)&&!oa(o,r)){let t=i?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=u(t,n||"")),ks(o,a,s,n,i)}else!function(t,e,n,i,o,r,s,a){o===Jo&&(o=R);let c=0,l=0,d=0<o.length?o[0]:null,u=0<r.length?r[0]:null;for(;null!==d||null!==u;){const p=c<o.length?o[c+1]:void 0,h=l<r.length?r[l+1]:void 0;let g,f=null;d===u?(c+=2,l+=2,p!==h&&(f=u,g=h)):null===u||null!==d&&d<u?(c+=2,f=d):(l+=2,f=u,g=h),null!==f&&ca(t,e,n,i,f,g,s,a),d=c<o.length?o[c]:null,u=l<r.length?r[l]:null}}(o,a,s,s[11],s[r+1],s[r+1]=function(t,e,n){if(null==n||""===n)return R;const i=[],o=Di(n);if(Array.isArray(o))for(let r=0;r<o.length;r++)t(i,o[r],!0);else if("object"==typeof o)for(const r in o)o.hasOwnProperty(r)&&t(i,r,o[r]);else"string"==typeof o&&e(i,o);return i}(t,e,n),i,r)}}function oa(t,e){return e>=t.expandoStartIndex}function ra(t,e,n,i){const o=t.data;if(null===o[n+1]){const r=o[ve()],s=oa(t,n);ua(r,i)&&null===e&&!s&&(e=!1),e=function(t,e,n,i){const o=function(t){const e=jt.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let r=i?e.residualClasses:e.residualStyles;if(null===o)0===(i?e.classBindings:e.styleBindings)&&(n=aa(n=sa(null,t,e,n,i),e.attrs,i),r=null);else{const s=e.directiveStylingLast;if(-1===s||t[s]!==o)if(n=sa(o,t,e,n,i),null===r){let n=function(t,e,n){const i=n?e.classBindings:e.styleBindings;
vendor: 3,203 bytes, line 1
1if(0!==Qo(i))return t[Bo(i)]}(t,e,i);void 0!==n&&Array.isArray(n)&&(n=sa(null,t,e,n[1],i),n=aa(n,e.attrs,i),function(t,e,n,i){t[Bo(n?e.classBindings:e.styleBindings)]=i}(t,e,i,n))}else r=function(t,e,n){let i;const o=e.directiveEnd;for(let r=1+e.directiveStylingLast;r<o;r++)i=aa(i,t[r].hostAttrs,n);return aa(i,e.attrs,n)}(t,e,i)}return void 0!==r&&(i?e.residualClasses=r:e.residualStyles=r),n}(o,r,e,i),function(t,e,n,i,o,r){let s=r?e.classBindings:e.styleBindings,a=Bo(s),c=Qo(s);t[i]=n;let l,d=!1;if(Array.isArray(n)){const t=n;l=t[1],(null===l||Cn(t,l)>0)&&(d=!0)}else l=n;if(o)if(0!==c){const e=Bo(t[a+1]);t[i+1]=$o(e,a),0!==e&&(t[e+1]=Yo(t[e+1],i)),t[a+1]=function(t,e){return 131071&t|e<<17}(t[a+1],i)}else t[i+1]=$o(a,0),0!==a&&(t[a+1]=Yo(t[a+1],i)),a=i;else t[i+1]=$o(c,0),0===a?a=i:t[c+1]=Yo(t[c+1],i),c=i;d&&(t[i+1]=Ho(t[i+1])),Qs(t,l,i,!0),Qs(t,l,i,!1),function(t,e,n,i,o){const r=o?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof e&&Cn(r,e)>=0&&(n[i+1]=zo(n[i+1]))}(e,l,t,i,r),s=$o(a,c),r?e.classBindings=s:e.styleBindings=s}(o,r,e,n,s,i)}}function sa(t,e,n,i,o){let r=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<s&&(r=e[a],i=aa(i,r.hostAttrs,o),r!==t);)a++;return null!==t&&(n.directiveStylingLast=a),i}function aa(t,e,n){const i=n?1:2;let o=-1;if(null!==e)for(let r=0;r<e.length;r++){const s=e[r];"number"==typeof s?o=s:o===i&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),xn(t,s,!!n||e[++r]))}return void 0===t?null:t}function ca(t,e,n,i,o,r,s,a){if(!(3&e.type))return;const c=t.data,l=c[a+1];da(function(t){return 1==(1&t)}(l)?la(c,e,n,o,Qo(l),s):void 0)||(da(r)||function(t){return 2==(2&t)}(l)&&(r=la(c,null,n,o,a,s)),function(t,e,n,i,o){const r=Ot(t);if(e)o?r?t.addClass(n,i):n.classList.add(i):r?t.removeClass(n,i):n.classList.remove(i);else{let e=-1===i.indexOf("-")?void 0:Jn.DashCase;if(null==o)r?t.removeStyle(n,i,e):n.style.removeProperty(i);else{const s="string"==typeof o&&o.endsWith("!important");s&&(o=o.slice(0,-10),e|=Jn.Important),r?t.setStyle(n,i,o,e):n.style.setProperty(i,o,s?"important":"")}}}(i,s,St(ve(),n),o,r))}function la(t,e,n,i,o,r){const s=null===e;let a;for(;o>0;){const e=t[o],r=Array.isArray(e),c=r?e[1]:e,l=null===c;let d=n[o+1];d===Jo&&(d=l?R:void 0);let u=l?_n(d,i):c===i?d:void 0;if(r&&!da(u)&&(u=_n(e,i)),da(u)&&(a=u,s))return a;const p=t[o+1];o=s?Bo(p):Qo(p)}if(null!==e){let t=r?e.residualClasses:e.residualStyles;null!=t&&(a=_n(t,i))}return a}function da(t){return void 0!==t}function ua(t,e){return 0!=(t.flags&(e?16:32))}function pa(t,e=""){const n=$t(),i=Bt(),o=t+20,r=i.firstCreatePass?Wo(i,o,1,e,null):i.data[o],s=n[o]=Xn(n[11],e);_i(i,n,s,r),Vt(r,!1)}function ha(t){return ga("",t,""),ha}function ga(t,e,n){const i=$t(),o=xs(i,t,e,n);return o!==Jo&&Fr(i,ve(),o),ga}function fa(t,e,n,i,o){const r=$t(),s=function(t,e,n,i,o,r){const s=fs(t,ee(),n,o);return ie(2),s?e+v(n)+i+v(o)+r:Jo}(r,t,e,n,i,o);return s!==Jo&&Fr(r,ve(),s),fa}function ma(t,e,n,i,o,r,s){const a=$t(),c=function(t,e,n,i,o,r,s,a){const c=ms(t,ee(),n,o,s);return ie(3),c?e+v(n)+i+v(o)+r+v(s)+a:Jo}(a,t,e,n,i,o,r,s);return c!==Jo&&Fr(a,ve(),c),ma}function va(t,e,n,i,o,r,s,a,c){const l=$t(),d=_s(l,t,e,n,i,o,r,s,a,c);
1return d!==Jo&&Fr(l,ve(),d),va}function ba(t,e,n,i,o,r,s,a,c){ia(xn,ea,_s($t(),t,e,n,i,o,r,s,a,c),!0)}function xa(t,e,n){const i=$t();return gs(i,ne(),e)&&ur(Bt(),xe(),i,t,e,i[11],n,!0),xa}const _a=void 0;var Ca=["en",[["a","p"],["AM","PM"],_a],[["AM","PM"],_a,_a],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],_a,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],_a,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",_a,"{1} 'at' {0}",_a],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){const e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let wa={};function ya(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Za(e);if(n)return n;const i=e.split("-")[0];if(n=Za(i),n)return n;if("en"===i)return Ca;throw new Error(`Missing locale data for the locale "${t}".`)}function Aa(t){return ya(t)[ka.PluralCase]}function Za(t){return t in wa||(wa[t]=J.ng&&J.ng.common&&J.ng.common.locales&&J.ng.common.locales[t]),wa[t]}var ka=(()=>((ka=ka||{})[ka.LocaleId=0]="LocaleId",ka[ka.DayPeriodsFormat=1]="DayPeriodsFormat",ka[ka.DayPeriodsStandalone=2]="DayPeriodsStandalone",ka[ka.DaysFormat=3]="DaysFormat",ka[ka.DaysStandalone=4]="DaysStandalone",ka[ka.MonthsFormat=5]="MonthsFormat",ka[ka.MonthsStandalone=6]="MonthsStandalone",ka[ka.Eras=7]="Eras",ka[ka.FirstDayOfWeek=8]="FirstDayOfWeek",ka[ka.WeekendRange=9]="WeekendRange",ka[ka.DateFormat=10]="DateFormat",ka[ka.TimeFormat=11]="TimeFormat",ka[ka.DateTimeFormat=12]="DateTimeFormat",ka[ka.NumberSymbols=13]="NumberSymbols",ka[ka.NumberFormats=14]="NumberFormats",ka[ka.CurrencyCode=15]="CurrencyCode",ka[ka.CurrencySymbol=16]="CurrencySymbol",ka[ka.CurrencyName=17]="CurrencyName",ka[ka.Currencies=18]="Currencies",ka[ka.Directionality=19]="Directionality",ka[ka.PluralCase=20]="PluralCase",ka[ka.ExtraData=21]="ExtraData",ka))();const Ta=["zero","one","two","few","many"],Oa="en-US",Ma={marker:"element"},Ia={marker:"ICU"};var Sa=(()=>((Sa=Sa||{})[Sa.SHIFT=2]="SHIFT",Sa[Sa.APPEND_EAGERLY=1]="APPEND_EAGERLY",Sa[Sa.COMMENT=2]="COMMENT",Sa))();let Pa=Oa;function Na(t){(function(t,e){null==t&&_(e,t,null,"!=")})(t,"Expected localeId to be defined"),"string"==typeof t&&(Pa=t.toLowerCase().replace(/_/g,"-"))}function qa(t,e,n){const i=e.insertBeforeIndex,o=Array.isArray(i)?i[0]:i;return null===o?gi(t,0,n):It(n[o])}function Ua(t,e,n,i,o){const r=e.insertBeforeIndex;if(Array.isArray(r)){let s=i,a=null;if(3&e.type||(a=s,s=o),null!==s&&0==(2&e.flags))for(let e=1;e<r.length;e++)li(t,s,n[r[e]],a,!1)}}function Ea(t,e){if(t.push(e),t.length>1)for(let n=t.length-2;n>=0;n--){const i=t[n];Fa(i)||Da(i,e)&&null===La(i)&&Ja(i,e.index)}}function Fa(t){return!(64&t.type)}function Da(t,e){return Fa(e)||t.index>e.index}function La(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function Ja(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(xi(qa,Ua),t.insertBeforeIndex=e)}function ja(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function Ra(t,e,n){const i=Ko(t,n,64,null,null);return Ea(e,i),i}function $a(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}function Ba(t){return t>>>17}function Ha(t){return(131070&t)>>>1}let Qa=0,Ya=0;function za(t,e,n,i){const o=n[11];let r,s=null;for(let a=0;a<e.length;a++){const c=e[a];if("string"==typeof c){const t=e[++a];null===n[t]&&(n[t]=Xn(o,c))}else if("number"==typeof c)switch(1&c){case 0:const l=Ba(c);let d,u;if(null===s&&(s=l,r=pi(o,i)),l===s?(d=i,u=r):(d=null,u=It(n[l])),null!==u){const e=Ha(c);li(o,u,n[e],d,!1);const i=ja(t,e);if(null!==i&&"object"==typeof i){const e=$a(i,n);null!==e&&za(t,i.create[e],n,n[i.anchorIdx])}}break;case 1:const p=e[++a],h=e[++a];_r(o,St(c>>>1,n),null,null,p,h,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${c}"`)}else switch(c){case Ia:const t=e[++a],i=e[++a];null===n[i]&&Bn(n[i]=ei(o,t),n);break;case Ma:const r=e[++a],s=e[++a];null===n[s]&&Bn(n[s]=ni(o,r,null),n)}}}function Va(t,e,n,i,o){for(let r=0;r<n.length;r++){const s=n[r],a=n[++r];if(s&o){let o="";for(let s=r+1;s<=r+a;s++){const r=n[s];if("string"==typeof r)o+=r;else if("number"==typeof r)if(r<0)o+=v(e[i-r]);else{const a=r>>>2;switch(3&r){case 1:const r=n[++s],c=n[++s],l=t.data[a];"string"==typeof l?_r(e[11],e[a],null,l,r,o,c):ur(t,l,e,r,o,e[11],c,!1);break;case 0:const d=e[a];null!==d&&ti(e[11],d,o);break;case 2:Wa(t,ja(t,a),e,o);break;case 3:Ga(t,ja(t,a),i,e)}}}}else{const o=n[r+1];if(o>0&&3==(3&o)){const n=ja(t,o>>>2);e[n.currentCaseLViewIndex]<0&&Ga(t,n,i,e)}}r+=a}}function Ga(t,e,n,i){let o=i[e.currentCaseLViewIndex];if(null!==o){let r=Qa;o<0&&(o=i[e.currentCaseLViewIndex]=~o,r=-1),Va(t,i,e.update[o],n,r)}}function Wa(t,e,n,i){const o=function(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const i=function(t,e){const n=Aa(e)(parseInt(t,10)),i=Ta[n];return void 0!==i?i:"other"}(e,Pa);n=t.cases.indexOf(i),-1===n&&"other"!==i&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,i);if($a(e,n)!==o&&(Ka(t,e,n),n[e.currentCaseLViewIndex]=null===o?null:~o,null!==o)
1){const i=n[e.anchorIdx];i&&za(t,e.create[o],n,i)}}function Ka(t,e,n){let i=$a(e,n);if(null!==i){const o=e.remove[i];for(let e=0;e<o.length;e++){const i=o[e];if(i>0){const t=St(i,n);null!==t&&Ai(n[11],t)}else Ka(t,ja(t,~i),n)}}}function Xa(){const t=[];let e,n,i=-1;function o(t,e){i=0;const o=$a(t,e);n=null!==o?t.remove[o]:R}function r(){if(i<n.length){const s=n[i++];return s>0?e[s]:(t.push(i,n),o(e[1].data[~s],e),r())}return 0===t.length?null:(n=t.pop(),i=t.pop(),r())}return function(n,i){for(e=i;t.length;)t.pop();return o(n.value,i),r}}const tc=/\ufffd(\d+):?\d*\ufffd/gi,ec=/\ufffd(\d+)\ufffd/,nc=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,ic=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,oc=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,rc=/\uE500/g;function sc(t,e,n,i,o,r,s){const a=Xo(t,i,1,null);let c=a<<Sa.SHIFT,l=zt();e===l&&(l=null),null===l&&(c|=Sa.APPEND_EAGERLY),s&&(c|=Sa.COMMENT,function(t){void 0===Qn&&(Qn=t())}(Xa)),o.push(c,null===r?"":r);const d=Ko(t,a,s?32:1,null===r?"":r,null);Ea(n,d);const u=d.index;return Vt(d,!1),null!==l&&e!==l&&function(t,e){let n=t.insertBeforeIndex;null===n?(xi(qa,Ua),n=t.insertBeforeIndex=[null,e]):(function(t,e,n){t!=e&&_(n,t,e,"==")}(Array.isArray(n),!0,"Expecting array here"),n.push(e))}(l,u),d}function ac(t,e,n,i,o,r,s){const a=s.match(tc),c=sc(t,e,n,r,i,a?null:s,!1);a&&cc(o,s,c.index,null,0,null)}function cc(t,e,n,i,o,r){const s=t.length,a=s+1;t.push(null,null);const c=s+2,l=e.split(tc);let d=0;for(let u=0;u<l.length;u++){const e=l[u];if(1&u){const n=o+parseInt(e,10);t.push(-1-n),d|=lc(n)}else""!==e&&t.push(e)}return t.push(n<<2|(i?1:0)),i&&t.push(i,r),t[s]=d,t[a]=t.length-c,d}function lc(t){return 1<<Math.min(t,31)}function dc(t){let e,n,i="",o=0,r=!1;for(;null!==(e=ic.exec(t));)r?e[0]===`\ufffd/*${n}\ufffd`&&(o=e.index,r=!1):(i+=t.substring(o,e.index+e[0].length),n=e[1],r=!0);return i+=t.substr(o),i}function uc(t,e,n,i,o,r){let s=0;const a={type:o.type,currentCaseLViewIndex:Xo(t,e,1,null),anchorIdx:r,cases:[],create:[],remove:[],update:[]};(function(t,e,n){t.push(lc(e.mainBinding),2,-1-e.mainBinding,n<<2|2)})(n,o,r),function(t,e,n){const i=t.data[e];null===i?t.data[e]=n:i.value=n}(t,r,a);const c=o.values;for(let l=0;l<c.length;l++){const r=c[l],d=[];for(let t=0;t<r.length;t++){const e=r[t];if("string"!=typeof e){const n=d.push(e)-1;r[t]=`\x3c!--\ufffd${n}\ufffd--\x3e`}}s=gc(t,a,e,n,i,o.cases[l],r.join(""),d)|s}s&&function(t,e,n){t.push(e,1,n<<2|3)}(n,s,r)}function pc(t){const e=[],n=[];let i=1,o=0;const r=hc(t=t.replace(nc,function(t,e,n){return i="select"===n?0:1,o=parseInt(e.substr(1),10),""}));for(let s=0;s<r.length;){let t=r[s++].trim();1===i&&(t=t.replace(/\s*(?:=)?(\w+)\s*/,"$1")),t.length&&e.push(t);const o=hc(r[s++]);e.length>n.length&&n.push(o)}return{type:i,mainBinding:o,cases:e,values:n}}function hc(t){if(!t)return[];let e=0;const n=[],i=[],o=/[{}]/g;let r;for(o.lastIndex=0;r=o.exec(t);){const o=r.index;if("}"==r[0]){if(n.pop(),0==n.length){const n=t.substring(e,o);nc.test(n)?i.push(pc(n)):i.push(n),e=o+1}}else{if(0==n.length){const n=t.substring(e,o);i.push(n),e=o+1}n.push("{")}}const s=t.substring(e);return i.push(s),i}function gc(t,e,n,i,o,r,s,a){const c=[],l=[],d=[];e.cases.push(r),e.create.push(c),e.remove.push(l),e.update.push(d);const u=Qi(Tt()).getInertBodyElement(s),p=mo(u)||u;return p?fc(t,e,n,i,c,l,d,p,o,a,0):0}function fc(t,e,n,i,o,r,s,a,c,l,d){let u=0,p=a.firstChild;for(;p;){const a=Xo(t,n,1,null);switch(p.nodeType){case Node.ELEMENT_NODE:const h=p,g=h.tagName.toLowerCase();if(oo.hasOwnProperty(g)){bc(o,Ma,g,c,a),t.data[a]=g;const f=h.attributes;for(let t=0;t<f.length;t++){const e=f.item(t),n=e.name.toLowerCase();e.value.match(tc)?ao.hasOwnProperty(n)&&cc(s,e.value,a,e.name,0,ro[n]?Wi:so[n]?Ki:null):xc(o,a,e)}u=fc(t,e,n,i,o,r,s,p,a,l,d+1)|u,mc(r,a,d)}break;case Node.TEXT_NODE:const f=p.textContent||"",m=f.match(tc);bc(o,null,m?"":f,c,a),mc(r,a,d),m&&(u=cc(s,f,a,null,0,null)|u);break;case Node.COMMENT_NODE:const v=ec.exec(p.textContent||"");if(v){const e=l[parseInt(v[1],10)];bc(o,Ia,"",c,a),uc(t,n,i,c,e,a),vc(r,a,d)}}p=p.nextSibling}return u}function mc(t,e,n){0===n&&t.push(e)}function vc(t,e,n){0===n&&(t.push(~e),t.push(e))}function bc(t,e,n,i,o){null!==e&&t.push(e),t.push(n,o,function(t,e,n){return 0|e<<17|n<<1}(0,i,o))}function xc(t,e,n){t.push(e<<1|1,n.name,n.value)}
1function _c(t,e,n=-1){const i=Bt(),o=$t(),r=20+t,s=Dt(i.consts,e),a=zt();i.firstCreatePass&&function(t,e,n,i,o,r){const s=zt(),a=[],c=[],l=[[]];o=function(t,e){if(function(t){return-1===t}(e))return dc(t);{const n=t.indexOf(`:${e}\ufffd`)+2+e.toString().length,i=t.search(new RegExp(`\ufffd\\/\\*\\d+:${e}\ufffd`));return dc(t.substring(n,i))}}(o,r);const d=function(t){return t.replace(rc," ")}(o).split(oc);for(let u=0;u<d.length;u++){let i=d[u];if(0==(1&u)){const r=hc(i);for(let i=0;i<r.length;i++){let d=r[i];if(0==(1&i)){const e=d;""!==e&&ac(t,s,l[0],a,c,n,e)}else{const i=d;if("object"!=typeof i)throw new Error(`Unable to parse ICU expression in "${o}" message.`);uc(t,n,c,e,i,sc(t,s,l[0],n,a,"",!0).index)}}}else{const e=47===i.charCodeAt(0),n=(i.charCodeAt(e?1:0),20+Number.parseInt(i.substring(e?2:1)));if(e)l.shift(),Vt(zt(),!1);else{const e=Ra(t,l[0],n);l.unshift([]),Vt(e,!0)}}}t.data[i]={create:a,update:c}}(i,null===a?0:a.index,o,r,s,n);const c=i.data[r],l=ci(i,a===o[6]?null:a,o);(function(t,e,n,i){const o=t[11];for(let r=0;r<e.length;r++){const s=e[r++],a=e[r],c=(s&Sa.COMMENT)===Sa.COMMENT,l=(s&Sa.APPEND_EAGERLY)===Sa.APPEND_EAGERLY,d=s>>>Sa.SHIFT;let u=t[d];null===u&&(u=t[d]=c?o.createComment(a):Xn(o,a)),l&&null!==n&&li(o,n,u,i,!1)}})(o,c.create,l,a&&8&a.type?o[a.index]:null),oe(!0)}function Cc(t,e,n){_c(t,e,n),oe(!1)}function wc(t){return function(t){t&&(Qa|=1<<Math.min(Ya,31)),Ya++}(gs($t(),ne(),t)),wc}function yc(t){!function(t,e,n){if(Ya>0){const i=t.data[n];Va(t,e,Array.isArray(i)?i:i.update,ee()-Ya-1,Qa)}Qa=0,Ya=0}(Bt(),$t(),t+20)}function Ac(t,e,n,i,o){if(t=g(t),Array.isArray(t))for(let r=0;r<t.length;r++)Ac(t[r],e,n,i,o);else{const r=Bt(),s=$t();let a=Kr(t)?t:g(t.provide),c=Vr(t);const l=Qt(),d=1048575&l.providerIndexes,u=l.directiveStart,p=l.providerIndexes>>20;if(Kr(t)||!t.multi){const i=new Oe(c,o,ys),h=Tc(a,e,o?d:d+p,u);-1===h?(Be(Je(l,s),r,a),Zc(r,t,e.length),e.push(a),l.directiveStart++,l.directiveEnd++,o&&(l.providerIndexes+=1048576),n.push(i),s.push(i)):(n[h]=i,s[h]=i)}else{const h=Tc(a,e,d+p,u),g=Tc(a,e,d,d+p),f=h>=0&&n[h],m=g>=0&&n[g];if(o&&!m||!o&&!f){Be(Je(l,s),r,a);const d=function(t,e,n,i,o){const r=new Oe(t,n,ys);return r.multi=[],r.index=e,r.componentProviders=0,kc(r,o,i&&!n),r}(o?Mc:Oc,n.length,o,i,c);!o&&m&&(n[g].providerFactory=d),Zc(r,t,e.length,0),e.push(a),l.directiveStart++,l.directiveEnd++,o&&(l.providerIndexes+=1048576),n.push(d),s.push(d)}else Zc(r,t,h>-1?h:g,kc(n[o?g:h],c,!o&&i));!o&&i&&m&&n[g].componentProviders++}}}function Zc(t,e,n,i){const o=Kr(e);if(o||function(t){return!!t.useClass}(e)){const r=(e.useClass||e).prototype.ngOnDestroy;if(r){const s=t.destroyHooks||(t.destroyHooks=[]);if(!o&&e.multi){const t=s.indexOf(n);-1===t?s.push(n,[i,r]):s[t+1].push(i,r)}else s.push(n,r)}}}function kc(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Tc(t,e,n,i){for(let o=n;o<i;o++)if(e[o]===t)return o;return-1}function Oc(t,e,n,i){return Ic(this.multi,[])}function Mc(t,e,n,i){const o=this.multi;let r;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=Ke(n,n[1],this.providerFactory.index,i);r=e.slice(0,t),Ic(o,r);for(let n=t;n<e.length;n++)r.push(e[n])}else r=[],Ic(o,r);return r}function Ic(t,e){for(let n=0;n<t.length;n++)e.push((0,t[n])());return e}function Sc(t,e=[]){return n=>{n.providersResolver=(n,i)=>function(t,e,n){const i=Bt();if(i.firstCreatePass){const o=gt(t);Ac(n,i.data,i.blueprint,o,!0),Ac(e,i.data,i.blueprint,o,!1)}}(n,i?i(t):t,e)}}class Pc{}const Nc="ngComponent";class qc{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${d(t)}. Did you add it to @NgModule.entryComponents?`);return e[Nc]=t,e}(t)}}let Uc=(()=>{class t{}return t.NULL=new qc,t})();function Ec(...t){}function Fc(t,e){return new Lc(Pt(t,e))}const Dc=function(){return Fc(Qt(),$t())};let Lc=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=Dc,t})();function Jc(t){return t instanceof Lc?t.nativeElement:t}class jc{}let Rc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>$c(),t})();const $c=function(){const t=$t(),e=Ut(Qt().index,t);return function(t){return t[11]}(lt(e)?e:t)};let Bc=(()=>{class t{}return t.\u0275prov=C({token:t,providedIn:"root",factory:()=>null}),t})();class Hc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const Qc=new Hc("12.2.17");class Yc{constructor(){}supports(t){return ds(t)}create(t){return new Vc(t)}}const zc=(t,e)=>e;class Vc{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||zc}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,o=null;for(;e||n;){const r=!n||e&&e.currentIndex<Xc(n,i,o)?e:n,s=Xc(r,i,o),a=r.currentIndex;if(r===n)i--,n=n._nextRemoved;else if(e=e._next,null==r.previousIndex)i++;else{o||(o=[]);const t=s-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<o.length?o[n]:o[n]=0,r=i+n;e<=r&&r<t&&(o[n]=i+1)}o[r.previousIndex]=e-t}}s!==a&&t(r,s,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;
vendor: 11,839 bytes, line 1
1e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!ds(t))throw new Error(`Error trying to diff '${d(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,o=this._itHead,r=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],i=this._trackByFn(e,n),null!==o&&Object.is(o.trackById,i)?(r&&(o=this._verifyReinsertion(o,n,i,e)),Object.is(o.item,n)||this._addIdentityChange(o,n)):(o=this._mismatch(o,n,i,e),r=!0),o=o._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[cs()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==o&&Object.is(o.trackById,i)?(r&&(o=this._verifyReinsertion(o,t,i,e)),Object.is(o.item,t)||this._addIdentityChange(o,t)):(o=this._mismatch(o,t,i,e),r=!0),o=o._next,e++}),this.length=e;return this._truncate(o),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,i)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,i)):t=this._addAfter(new Gc(e,n),o,i),t}_verifyReinsertion(t,e,n,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==o?t=this._reinsertAfter(o,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,o=t._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Kc),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Kc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Gc{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Wc{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class Kc{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Wc,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Xc(t,e,n){const i=t.previousIndex;if(null===i)return i;let o=0;return n&&i<n.length&&(o=n[i]),i+e+o}class tl{constructor(){}supports(t){return t instanceof Map||us(t)}create(){return new el}}class el{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||us(t)))throw new Error(`Error trying to diff '${d(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,o=n._next;return i&&(i._next=o),o&&(o._prev=i),n._next=null,n._prev=null,n}const n=new nl(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class nl{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function il(){return new ol([new Yc])}let ol=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||il()),deps:[[t,new Ln,new Dn]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${function(t){return t.name||typeof t}(t)}'`)}}return t.\u0275prov=C({token:t,providedIn:"root",factory:il}),t})();function rl(){return new sl([new tl])}let sl=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||rl()),deps:[[t,new Ln,new Dn]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=C({token:t,providedIn:"root",factory:rl}),t})();function al(t,e,n,i,o=!1){for(;null!==n;){const r=e[n.index];if(null!==r&&i.push(It(r)),dt(r))for(let t=10;t<r.length;t++){const e=r[t],n=e[1].firstChild;null!==n&&al(e[1],e,n,i)}const s=n.type;if(8&s)al(t,e,n.child,i);else if(32&s){const t=Yn(n,e);let o;for(;o=t();)i.push(o)}else if(16&s){const t=wi(e,n);if(Array.isArray(t))i.push(...t);else{const n=zn(e[16]);al(n[1],n,t,i,!0)}}n=o?n.projectionNext:n.next}return i}class cl{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const t=this._lView,e=t[1];return al(e,t,e.firstChild,[])}get context(){return this._lView[8]}set context(t){this._lView[8]=t}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[3];if(dt(t)){const e=t[8],n=e?e.indexOf(this):-1;n>-1&&(oi(t,n),vn(e,n))}this._attachedToViewContainer=!1}ri(this._lView[1],this._lView)}onDestroy(t){lr(this._lView[1],this._lView,null,t)}markForCheck(){Or(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Mr(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){Xt(!0);try{Mr(t,e,n)}finally{Xt(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,ki(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a Vie
1wContainer!");this._appRef=t}}class ll extends cl{constructor(t){super(t),this._view=t}detectChanges(){Ir(this._view)}checkNoChanges(){!function(t){Xt(!0);try{Ir(t)}finally{Xt(!1)}}(this._view)}get context(){return null}}const dl=function(t){return function(t,e,n){if(pt(t)&&!n){const n=Ut(t.index,e);return new cl(n,n)}return 47&t.type?new cl(e[16],e):null}(Qt(),$t(),16==(16&t))};let ul=(()=>{class t{}return t.__NG_ELEMENT_ID__=dl,t})();const pl=[new tl],hl=new ol([new Yc]),gl=new sl(pl),fl=function(){return xl(Qt(),$t())};let ml=(()=>{class t{}return t.__NG_ELEMENT_ID__=fl,t})();const vl=ml,bl=class extends vl{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=Go(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const i=this._declarationLView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),tr(e,n,t),new cl(n)}};function xl(t,e){return 4&t.type?new bl(e,t,Fc(t,e)):null}class _l{}class Cl{}const wl=function(){return Ol(Qt(),$t())};let yl=(()=>{class t{}return t.__NG_ELEMENT_ID__=wl,t})();const Al=yl,Zl=class extends Al{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return Fc(this._hostTNode,this._hostLView)}get injector(){return new en(this._hostTNode,this._hostLView)}get parentInjector(){const t=$e(this._hostTNode,this._hostLView);if(qe(t)){const e=Ee(t,this._hostLView),n=Ue(t);return new en(e[1].data[n+8],e)}return new en(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=kl(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,o){const r=n||this.parentInjector;if(!o&&null==t.ngModule&&r){const t=r.get(_l,null);t&&(o=t)}const s=t.create(r,i,void 0,o);return this.insert(s.hostView,e),s}insert(t,e){const n=t._lView,i=n[1];if(dt(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new Zl(e,e[6],e[3]);i.detach(i.indexOf(t))}}const o=this._adjustIndex(e),r=this._lContainer;!function(t,e,n,i){const o=10+i,r=n.length;i>0&&(n[o-1][4]=e),i<r-10?(e[4]=n[o],mn(n,10+i,e)):(n.push(e),e[4]=null),e[3]=n;const s=e[17];null!==s&&n!==s&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(s,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(i,n,r,o);const s=yi(o,r),a=n[11],c=pi(a,r[7]);return null!==c&&function(t,e,n,i,o,r){i[0]=o,i[6]=e,ki(t,i,n,1,o,r)}(i,r[6],a,n,c,s),t.attachToViewContainerRef(),mn(Tl(r),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){const e=kl(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){const e=this._adjustIndex(t,-1),n=oi(this._lContainer,e);n&&(vn(Tl(this._lContainer),e),ri(n[1],n))}detach(t){const e=this._adjustIndex(t,-1),n=oi(this._lContainer,e);return n&&null!=vn(Tl(this._lContainer),e)?new cl(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}};function kl(t){return t[8]}function Tl(t){return t[8]||(t[8]=[])}function Ol(t,e){let n;const i=e[t.index];if(dt(i))n=i;else{let o;if(8&t.type)o=It(i);else{const n=e[11];o=n.createComment("");const i=Pt(t,e);li(n,pi(n,i),o,function(t,e){return Ot(t)?t.nextSibling(e):e.nextSibling}(n,i),!1)}e[t.index]=n=yr(i,e,o,t),Tr(e,n)}return new Zl(n,t,e)}const Ml={};class Il extends Uc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=at(t);return new Nl(e,this.ngModule)}}function Sl(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Pl=new un("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Ao});class Nl extends Pc{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Lo).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Sl(this.componentDef.inputs)}get outputs(){return Sl(this.componentDef.outputs)}create(t,e,n,i){const o=(i=i||this.ngModule)?function(t,e){return{get:(n,i,o)=>{const r=t.get(n,Ml,o);return r!==Ml||i===Ml?r:e.get(n,i,o)}}}(t,i.injector):t,r=o.get(jc,Mt),s=o.get(Bc,null),a=r.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",l=n?function(t,e,n){if(Ot(t))return t.selectRootElement(e,n===E.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):ni(r.createRenderer(null,this.componentDef),c,function(t){const e=t.toLowerCase();return"svg"===e?At:"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,u=function(t,e){return{components:[],scheduler:t||Ao,clean:Pr,playerHandler:e||null,flags:0}}(),p=cr(0,null,null,1,0,null,null,null,null,null),h=Go(null,p,u,d,null,null,r,a,s,o);let g,f;ue(h);try{const t=function(t,e,n,i,o,r){const s=n[1];n[20]=t;const a=Wo(s,20,2,"#host",null),c=a.mergedAttrs=e.hostAttrs;null!==c&&(Dr(a,c,!0),null!==t&&(Me(o,t,c),null!==a.classes&&Mi(o,t,a.classes),null!==a.styles&&Oi(o,t,a.styles)));const l=i.createRenderer(t,e),d=Go(n,ar(e),null,e.onPush?64:16,n[20],a,i,l,r||null,null);return s.firstCreatePass&&(Be(Je(a,n),s,e.type),fr(s,a),vr(a,n.length,1)),Tr(n,d),n[20]=d}(l,this.componentDef,h,r,a);if(l)if(n)Me(a,l,["ng-version",Qc.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,o=2;for(;i<t.length;){let r=t[i];if("string"==typeof r)2===o?""!==r&&e.push(r,t[++i]):8===o&&n.push(r);else{if(!qo(o))break;o=r}i++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&Me(a,l,t),e&&e.length>0&&Mi(a,l,e.join(" "))}if(f=Nt(p,20),void 0!==e){const t=f.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=e[n];t.push(null!=i?Array.from(i):null)}}g=function(t,e,n,i,o){const r=n[1],s=function(t,e,n){const i=Qt();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),br(t,i,e,Xo(t,e,1,null),n));const o=Ke(e,t,i.directiveStart,i);Bn(o,e);const r=Pt(i,e);return r&&Bn(r,e),o}(r,n,e);if(i.components.push(s),t[8]=s,o&&o.forEach(t=>t(s,e)),e.contentQueries){const t=Qt();e.contentQueries(1,s,t.directiveStart)}const a=Qt();return!r.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(be(a.index),hr(n[1],a,0,a.directiveStart,a.directiveEnd,e),gr(e,s)),s}(t,this.componentDef,h,u,[es]),tr(p,h,null)}finally{me()}return new ql(this.componentType,g,Fc(f,h),h,f)}}class ql extends class{}{constructor(t,e,n,i,o){super(),this.location=n,this._rootLView=i,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new ll(i),this.componentType=t}get injector(){return new en(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const Ul=new Map;class El extends _l{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Il(this);const n=ct(t),i=t[Y]||null;i&&Na(i),this._bootstrapComponents=To(n.bootstrap),this._r3Injector=Qr(t,e,[{provide:_l,useValue:this},{provide:Uc,useValue:this.componentFactoryResolver}],d(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ts.THROW_IF_NOT_FOUND,n=I.Default){return t===ts||t===_l||t===Lr?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;
vendor: 1,280 bytes, line 1
1!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Fl extends Cl{constructor(t){super(),this.moduleType=t,null!==ct(t)&&function(t){const e=new Set;!function t(n){const i=ct(n,!0),o=i.id;null!==o&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${d(e)} vs ${d(e.name)}`)}(o,Ul.get(o),n),Ul.set(o,n));const r=To(i.imports);for(const s of r)e.has(s)||(e.add(s),t(s))}(t)}(t)}create(t){return new El(this.moduleType,t)}}function Dl(t,e,n){const i=te()+t,o=$t();return o[i]===Jo?ps(o,i,n?e.call(n):e()):hs(o,i)}function Ll(t,e,n,i){return Bl($t(),te(),t,e,n,i)}function Jl(t,e,n,i,o){return Hl($t(),te(),t,e,n,i,o)}function jl(t,e,n,i,o,r){return Ql($t(),te(),t,e,n,i,o,r)}function Rl(t,e,n,i,o,r,s,a){const c=te()+t,l=$t(),d=vs(l,c,n,i,o,r);return gs(l,c+4,s)||d?ps(l,c+5,a?e.call(a,n,i,o,r,s):e(n,i,o,r,s)):hs(l,c+5)}function $l(t,e){const n=t[e];return n===Jo?void 0:n}function Bl(t,e,n,i,o,r){const s=e+n;return gs(t,s,o)?ps(t,s+1,r?i.call(r,o):i(o)):$l(t,s+1)}function Hl(t,e,n,i,o,r,s){const a=e+n;return fs(t,a,o,r)?ps(t,a+2,s?i.call(s,o,r):i(o,r)):$l(t,a+2)}function Ql(t,e,n,i,o,r,s,a){const c=e+n;return ms(t,c,o,r,s)?ps(t,c+3,a?i.call(a,o,r,s):i(o,r,s)):$l(t,c+3)}
1function Yl(t,e){const n=Bt();let i;const o=t+20;n.firstCreatePass?(i=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const i=e[n];if(t===i.name)return i}throw new m("302",`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[o]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(o,i.onDestroy)):i=n.data[o];const r=i.factory||(i.factory=mt(i.type)),s=P(ys);try{const t=De(!1),e=r();return De(t),function(t,e,n,i){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=i}(n,$t(),o,e),e}finally{P(s)}}function zl(t,e,n){const i=t+20,o=$t(),r=qt(o,i);return Kl(o,Wl(o,i)?Bl(o,te(),e,r.transform,n,r):r.transform(n))}function Vl(t,e,n,i){const o=t+20,r=$t(),s=qt(r,o);return Kl(r,Wl(r,o)?Hl(r,te(),e,s.transform,n,i,s):s.transform(n,i))}function Gl(t,e,n,i,o){const r=t+20,s=$t(),a=qt(s,r);return Kl(s,Wl(s,r)?Ql(s,te(),e,a.transform,n,i,o,a):a.transform(n,i,o))}function Wl(t,e){return t[1].data[e].pure}function Kl(t,e){return ls.isWrapped(e)&&(e=ls.unwrap(e),t[ee()]=Jo),e}function Xl(t){return e=>{setTimeout(t,void 0,e)}}const td=class extends i.xQ{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){var i,r,s;let a=t,c=e||(()=>null),l=n;if(t&&"object"==typeof t){const e=t;a=null===(i=e.next)||void 0===i?void 0:i.bind(e),c=null===(r=e.error)||void 0===r?void 0:r.bind(e),l=null===(s=e.complete)||void 0===s?void 0:s.bind(e)}this.__isAsync&&(c=Xl(c),a&&(a=Xl(a)),l&&(l=Xl(l)));const d=super.subscribe({next:a,error:c,complete:l});return t instanceof o.w&&t.add(d),d}};function ed(){return this._results[cs()]()}class nd{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=cs(),n=nd.prototype;n[e]||(n[e]=ed)}get changes(){return this._changes||(this._changes=new td)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const n=this;n.dirty=!1;const i=gn(t);(this._changesDetected=!function(t,e,n){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){let o=t[i],r=e[i];if(n&&(o=n(o),r=n(r)),r!==o)return!1}return!0}(n._results,i,e))&&(n._results=i,n.length=i.length,n.last=i[this.length-1],n.first=i[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}Symbol;class id{constructor(t){this.queryList=t,this.matches=null}clone(){return new id(this.queryList)}setDirty(){this.queryList.setDirty()}}class od{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);i.push(this.queries[n.indexInDeclarationView].clone())}return new od(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==bd(t,e).matches&&this.queries[e].setDirty()}}class rd{constructor(t,e,n=null){this.predicate=t,this.flags=e,this.read=n}}class sd{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const i=null!==e?e.length:0,o=this.getByIndex(n).embeddedTView(t,i);o&&(o.indexInDeclarationView=n,null!==e?e.push(o):e=[o])}return null!==e?new sd(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class ad{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new ad(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&8&n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}
1matchTNode(t,e){const n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){const o=n[i];this.matchTNodeWithReadOption(t,e,cd(e,o)),this.matchTNodeWithReadOption(t,e,We(e,t,o,!1,!1))}else n===ml?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,We(e,t,n,!1,!1))}matchTNodeWithReadOption(t,e,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===Lc||i===yl||i===ml&&4&e.type)this.addMatch(e.index,-2);else{const n=We(e,t,i,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function cd(t,e){const n=t.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1];return null}function ld(t,e,n,i){return-1===n?function(t,e){return 11&t.type?Fc(t,e):4&t.type?xl(t,e):null}(e,t):-2===n?function(t,e,n){return n===Lc?Fc(e,t):n===ml?xl(e,t):n===yl?Ol(e,t):void 0}(t,e,i):Ke(t,t[1],n,e)}function dd(t,e,n,i){const o=e[19].queries[i];if(null===o.matches){const i=t.data,r=n.matches,s=[];for(let t=0;t<r.length;t+=2){const o=r[t];s.push(o<0?null:ld(e,i[o],r[t+1],n.metadata.read))}o.matches=s}return o.matches}function ud(t,e,n,i){const o=t.queries.getByIndex(n),r=o.matches;if(null!==r){const s=dd(t,e,o,n);for(let t=0;t<r.length;t+=2){const n=r[t];if(n>0)i.push(s[t/2]);else{const o=r[t+1],s=e[-n];for(let t=10;t<s.length;t++){const e=s[t];e[17]===e[3]&&ud(e[1],e,o,i)}if(null!==s[9]){const t=s[9];for(let e=0;e<t.length;e++){const n=t[e];ud(n[1],n,o,i)}}}}}return i}function pd(t){const e=$t(),n=Bt(),i=ae();ce(i+1);const o=bd(n,i);if(t.dirty&&Et(e)===(2==(2&o.metadata.flags))){if(null===o.matches)t.reset([]);else{const r=o.crossesNgTemplate?ud(n,e,i,[]):dd(n,e,o,i);t.reset(r,Jc),t.notifyOnChanges()}return!0}return!1}function hd(t,e,n){const i=Bt();i.firstCreatePass&&(vd(i,new rd(t,e,n),-1),2==(2&e)&&(i.staticViewQueries=!0)),md(i,$t(),e)}function gd(t,e,n,i){const o=Bt();if(o.firstCreatePass){const r=Qt();vd(o,new rd(e,n,i),r.index),function(t,e){const n=t.contentQueries||(t.contentQueries=[]);e!==(n.length?n[n.length-1]:-1)&&n.push(t.queries.length-1,e)}(o,t),2==(2&n)&&(o.staticContentQueries=!0)}md(o,$t(),n)}function fd(){return t=$t(),e=ae(),t[19].queries[e].queryList;var t,e}function md(t,e,n){const i=new nd(4==(4&n));lr(t,e,i,i.destroy),null===e[19]&&(e[19]=new od),e[19].queries.push(new id(i))}function vd(t,e,n){null===t.queries&&(t.queries=new sd),t.queries.track(new ad(e,n))}function bd(t,e){return t.queries.getByIndex(e)}function xd(t,e){return xl(t,e)}const _d=dn("Input",t=>({bindingPropertyName:t})),Cd=new un("Application Initializer");let wd=(()=>{class t{constructor(t){this.appInits=t,this.resolve=Ec,this.reject=Ec,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();if(qs(e))t.push(e);else if(Es(e)){const n=new Promise((t,n)=>{e.subscribe({complete:t,error:n})});t.push(n)}}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Sn(Cd,8))},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();const yd=new un("AppId"),Ad={provide:yd,useFactory:function(){return`${Zd()}${Zd()}${Zd()}`},deps:[]};function Zd(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const kd=new un("Platform Initializer"),Td=new un("Platform ID"),Od=new un("appBootstrapListener");let Md=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();const Id=new un("LocaleId"),Sd=new un("DefaultCurrencyCode");class Pd{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Nd=function(t){return new Fl(t)},qd=Nd,Ud=function(t){return Promise.resolve(Nd(t))},Ed=function(t){const e=Nd(t),n=To(ct(t).declarations).reduce((t,e)=>{const n=at(e);return n&&t.push(new Nl(n)),t},[]);return new Pd(e,n)},Fd=Ed,Dd=function(t){return Promise.resolve(Ed(t))};let Ld=(()=>{class t{constructor(){this.compileModuleSync=qd,this.compileModuleAsync=Ud,this.compileModuleAndAllComponentsSync=Fd,this.compileModuleAndAllComponentsAsync=Dd}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();const Jd=(()=>Promise.resolve(0))();
1function jd(t){"undefined"==typeof Zone?Jd.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Rd{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new td(!1),this.onMicrotaskEmpty=new td(!1),this.onStable=new td(!1),this.onError=new td(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!n&&e,i.shouldCoalesceRunChangeDetection=n,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function(){let t=J.requestAnimationFrame,e=J.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(J,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Hd(t),t.isCheckStableRunning=!0,Bd(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Hd(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,i,o,r,s,a)=>{try{return Qd(t),n.invokeTask(o,r,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&e(),Yd(t)}},onInvoke:(n,i,o,r,s,a,c)=>{try{return Qd(t),n.invoke(o,r,s,a,c)}finally{t.shouldCoalesceRunChangeDetection&&e(),Yd(t)}},onHasTask:(e,n,i,o)=>{e.hasTask(i,o),n===i&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,Hd(t),Bd(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,n,i,o)=>(e.handleError(i,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Rd.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Rd.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const o=this._inner,r=o.scheduleEventTask("NgZoneEvent: "+i,t,$d,Ec,Ec);try{return o.runTask(r,e,n)}finally{o.cancelTask(r)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}const $d={};function Bd(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Hd(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function Qd(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Yd(t){t._nesting--,Bd(t)}class zd{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new td,this.onMicrotaskEmpty=new td,this.onStable=new td,this.onError=new td}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Vd=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>
vendor: 4,585 bytes, line 1
1{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Rd.assertNotInAngularZone(),jd(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())jd(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Sn(Rd))},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})(),Gd=(()=>{class t{constructor(){this._applications=new Map,Xd.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Xd.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();class Wd{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}function Kd(t){Xd=t}let Xd=new Wd,tu=!0,eu=!1;function nu(){return eu=!0,tu}function iu(){if(eu)throw new Error("Cannot enable prod mode after platform setup.");tu=!1}let ou;const ru=new un("AllowMultipleToken");class su{constructor(t,e){this.name=t,this.token=e}}function au(t,e,n=[]){const i=`Platform: ${e}`,o=new un(i);return(e=[])=>{let r=cu();if(!r||r.injector.get(ru,!1))if(t)t(n.concat(e).concat({provide:o,useValue:!0}));else{const t=n.concat(e).concat({provide:o,useValue:!0},{provide:jr,useValue:"platform"});!function(t){if(ou&&!ou.destroyed&&!ou.injector.get(ru,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");ou=t.get(lu);const e=t.get(kd,null);e&&e.forEach(t=>t())}(ts.create({providers:t,name:i}))}return function(t){const e=cu();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(o)}}function cu(){return ou&&!ou.destroyed?ou:null}let lu=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new zd:("zone.js"===t?void 0:t)||new Rd({enableLongStackTrace:nu(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),n}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),i=[{provide:Rd,useValue:n}];return n.run(()=>{const o=ts.create({providers:i,parent:this.injector,name:t.moduleType.name}),r=t.create(o),s=r.injector.get(yo,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.runOutsideAngular(()=>{const t=n.onError.subscribe({next:t=>{s.handleError(t)}});r.onDestroy(()=>{pu(this._modules,r),t.unsubscribe()})}),function(t,n,i){try{const e=i();return qs(e)?e.catch(e=>{throw n.runOutsideAngular(()=>t.handleError(e)),e}):e}catch(e){throw n.runOutsideAngular(()=>t.handleError(e)),e}}(s,n,()=>{const t=r.injector.get(wd);
1return t.runInitializers(),t.donePromise.then(()=>(Na(r.injector.get(Id,Oa)||Oa),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const n=du({},e);return function(t,e,n){const i=new Fl(n);return Promise.resolve(i)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(uu);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${d(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Sn(ts))},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();function du(t,e){return Array.isArray(e)?e.reduce(du,t):Object.assign(Object.assign({},t),e)}let uu=(()=>{class t{constructor(t,e,n,i,o){this._zone=t,this._injector=e,this._exceptionHandler=n,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const c=new r.y(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),l=new r.y(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{Rd.assertNotInAngularZone(),jd(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Rd.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=(0,s.T)(c,l.pipe((0,a.B)()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof Pc?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=function(t){return t.isBoundToModule}(n)?void 0:this._injector.get(_l),o=n.create(ts.NULL,[],e||n.selector,i),r=o.location.nativeElement,s=o.injector.get(Vd,null),a=s&&o.injector.get(Gd);return s&&a&&a.registerApplication(r,s),o.onDestroy(()=>{this.detachView(o.hostView),pu(this.components,o),a&&a.unregisterApplication(r)}),this._loadComponent(o),o}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;pu(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Od,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Sn(Rd),Sn(ts),Sn(yo),Sn(Uc),Sn(wd))},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();function pu(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class hu{}class gu{}const fu={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let mu=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||fu}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,i]=t.split("#");return void 0===i&&(i="default"),n(8255)(e).then(t=>t[i]).then(t=>vu(t,e,i)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,i]=t.split("#"),o="NgFactory";return void 0===i&&(i="default",o=""),n(8255)(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[i+o]).then(t=>vu(t,e,i))}}return t.\u0275fac=function(e){return new(e||t)(Sn(Ld),Sn(gu,8))},t.\u0275prov=C({token:t,factory:t.\u0275fac}),t})();function vu(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const bu=function(t){return null},xu=au(null,"core",[{provide:Td,useValue:"unknown"},{provide:lu,deps:[ts]},{provide:Gd,deps:[]},{provide:Md,deps:[]}]),_u=[{provide:uu,useClass:uu,deps:[Rd,ts,yo,Uc,wd]},{provide:Pl,deps:[Rd],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:wd,useClass:wd,deps:[[new Dn,Cd]]},{provide:Ld,useClass:Ld,deps:[]},Ad,{provide:ol,useFactory:function(){return hl},deps:[]},{provide:sl,useFactory:function(){return gl},deps:[]},{provide:Id,useFactory:function(t){return Na(t=t||"undefined"!=typeof $localize&&$localize.locale||Oa),t},deps:[[new Fn(Id),new Dn,new Ln]]},{provide:Sd,useValue:"USD"}];let Cu=(()=>{class t{constructor(t){}}return t.\u0275fac=function(e){return new(e||t)(Sn(uu))},t.\u0275mod=nt({type:t}),t.\u0275inj=w({providers:_u}),t})()},1707:function(t,e,n){"use strict";n.d(e,{Wl:function(){return p},Fj:function(){return f},qu:function(){return le},u:function(){return Jt},sg:function(){return Dt},u5:function(){return ae},nD:function(){return ie},Fd:function(){return Wt},qQ:function(){return Xt},Cf:function(){return b},JU:function(){return d},a5:function(){return Q},JJ:function(){return z},JL:function(){return V},F:function(){return yt},On:function(){return kt},YN:function(){return Bt},wV:function(){return Mt},c5:function(){return re},_:function(){return Nt},eT:function(){return Ut},UX:function(){return ce},Q7:function(){return ee},EJ:function(){return $t},kI:function(){return C},_Y:function(){return Tt},Kr:function(){return zt}});var i=n(2316),o=n(4364),r=n(400),s=n(2720),a=n(3927);let c=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}setProperty(t,e){this._renderer.setProperty(this._elementRef.nativeElement,t,e)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.Qsj),i.Y36(i.SBq))},t.\u0275dir=i.lG2({type:t}),t})(),l=(()=>{class t extends c{}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,features:[i.qOj]}),t})();const d=new i.OlP("NgValueAccessor"),u={provide:d,useExisting:(0,i.Gpc)(()=>p),multi:!0};let p=(()=>{class t extends l{writeValue(t){this.setProperty("checked",t)}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&i.NdJ("
1change",function(t){return e.onChange(t.target.checked)})("blur",function(){return e.onTouched()})},features:[i._Bn([u]),i.qOj]}),t})();const h={provide:d,useExisting:(0,i.Gpc)(()=>f),multi:!0},g=new i.OlP("CompositionEventMode");let f=(()=>{class t extends c{constructor(t,e,n){super(t,e),this._compositionMode=n,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=(0,o.q)()?(0,o.q)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this.setProperty("value",null==t?"":t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.Qsj),i.Y36(i.SBq),i.Y36(g,8))},t.\u0275dir=i.lG2({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&i.NdJ("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[i._Bn([h]),i.qOj]}),t})();function m(t){return null==t||0===t.length}function v(t){return null!=t&&"number"==typeof t.length}const b=new i.OlP("NgValidators"),x=new i.OlP("NgAsyncValidators"),_=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class C{static min(t){return w(t)}static max(t){return y(t)}static required(t){return A(t)}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return m((e=t).value)||_.test(e.value)?null:{email:!0};var e}static minLength(t){return e=t,t=>m(t.value)||!v(t.value)?null:t.value.length<e?{minlength:{requiredLength:e,actualLength:t.value.length}}:null;var e}static maxLength(t){return Z(t)}static pattern(t){return k(t)}static nullValidator(t){return null}static compose(t){return N(t)}static composeAsync(t){return U(t)}}function w(t){return e=>{if(m(e.value)||m(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}function y(t){return e=>{if(m(e.value)||m(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function A(t){return m(t.value)?{required:!0}:null}function Z(t){return e=>v(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function k(t){if(!t)return T;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(m(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}function T(t){return null}function O(t){return null!=t}function M(t){const e=(0,i.QGY)(t)?(0,r.D)(t):t;return(0,i.CqO)(e),e}function I(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function S(t,e){return e.map(e=>e(t))}function P(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function N(t){if(!t)return null;const e=t.filter(O);return 0==e.length?null:function(t){return I(S(t,e))}}function q(t){return null!=t?N(P(t)):null}function U(t){if(!t)return null;const e=t.filter(O);return 0==e.length?null:function(t){const n=S(t,e).map(M);return(0,s.D)(n).pipe((0,a.U)(I))}}function E(t){return null!=t?U(P(t)):null}function F(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function D(t){return t._rawValidators}function L(t){return t._rawAsyncValidators}function J(t){return t?Array.isArray(t)?t:[t]:[]}function j(t,e){return Array.isArray(t)?t.includes(e):t===e}function R(t,e){const n=J(e);return J(t).forEach(t=>{j(n,t)||n.push(t)}),n}function $(t,e){return J(e).filter(e=>!j(t,e))}let B=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=q(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=E(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t}),t})(),H=(()=>{class t extends B{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,features:[i.qOj]}),t})();class Q extends B{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Y{constructor(t){this._cd=t}is(t){var e,n,i;return"submitted"===t?!!(null===(e=this._cd)||void 0===e?void 0:e.submitted):!!(null===(i=null===(n=this._cd)||void 0===n?void 0:n.control)||void 0===i?void 0:i[t])}}let z=(()=>{class t extends Y{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(Q,2))},t.\u0275dir=i.lG2({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.ekj("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[i.qOj]}),t})(),V=(()=>{class t extends Y{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(H,10))},t.\u0275dir=i.lG2({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,e){2&t&&i.ekj("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))("ng-submitted",e.is("submitted"))},features:[i.qOj]}),t})();function G(t,e){return[...e.path,t]}function W(t,e){tt(t,e),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&nt(t,e)})}(t,e),function(t,e){const n=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&nt(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function K(t,e,n=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),et(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function X(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)}
1)}function tt(t,e){const n=D(t);null!==e.validator?t.setValidators(F(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const i=L(t);null!==e.asyncValidator?t.setAsyncValidators(F(i,e.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const o=()=>t.updateValueAndValidity();X(e._rawValidators,o),X(e._rawAsyncValidators,o)}function et(t,e){let n=!1;if(null!==t){if(null!==e.validator){const i=D(t);if(Array.isArray(i)&&i.length>0){const o=i.filter(t=>t!==e.validator);o.length!==i.length&&(n=!0,t.setValidators(o))}}if(null!==e.asyncValidator){const i=L(t);if(Array.isArray(i)&&i.length>0){const o=i.filter(t=>t!==e.asyncValidator);o.length!==i.length&&(n=!0,t.setAsyncValidators(o))}}}const i=()=>{};return X(e._rawValidators,i),X(e._rawAsyncValidators,i),n}function nt(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function it(t,e){tt(t,e)}function ot(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}function rt(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function st(t,e){if(!e)return null;let n,i,o;return Array.isArray(e),e.forEach(t=>{t.constructor===f?n=t:function(t){return Object.getPrototypeOf(t.constructor)===l}(t)?i=t:o=t}),o||i||n||null}function at(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ct="VALID",lt="INVALID",dt="PENDING",ut="DISABLED";function pt(t){return(mt(t)?t.validators:t)||null}function ht(t){return Array.isArray(t)?q(t):t||null}function gt(t,e){return(mt(e)?e.asyncValidators:t)||null}function ft(t){return Array.isArray(t)?E(t):t||null}function mt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class vt{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=ht(this._rawValidators),this._composedAsyncValidatorFn=ft(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===ct}get invalid(){return this.status===lt}get pending(){return this.status==dt}get disabled(){return this.status===ut}get enabled(){return this.status!==ut}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=ht(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ft(t)}addValidators(t){this.setValidators(R(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(R(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators($(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators($(t,this._rawAsyncValidators))}hasValidator(t){return j(this._rawValidators,t)}hasAsyncValidator(t){return j(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=dt,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}
1disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=ut,this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=ct,this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ct||this.status===dt)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ut:ct}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=dt,this._hasOwnPendingAsyncValidator=!0;const e=M(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e||(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length))return null;let i=t;return e.forEach(t=>{i=i instanceof xt?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof _t&&i.at(t)||null}),i}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new i.vpe,this.statusChanges=new i.vpe}_calculateStatus(){return this._allControlsDisabled()?ut:this.errors?lt:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(dt)?dt:this._anyControlsHaveStatus(lt)?lt:ct}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){mt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class bt extends vt{constructor(t=null,e,n){super(pt(e),gt(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>
vendor: 4,119 bytes, line 1
1t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){at(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){at(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class xt extends vt{constructor(t,e,n){super(pt(e),gt(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof bt?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n        There are no form controls registered with this group yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class _t extends vt{constructor(t,e,n){super(pt(e),gt(n,e)),this.controls=t,this._initOb
1servables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[t]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof bt?t.value:t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n        There are no form controls registered with this array yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.at(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Ct={provide:H,useExisting:(0,i.Gpc)(()=>yt)},wt=(()=>Promise.resolve(null))();let yt=(()=>{class t extends H{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new i.vpe,this.form=new xt({},q(t),E(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){wt.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),W(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}
1removeControl(t){wt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),at(this._directives,t)})}addFormGroup(t){wt.then(()=>{const e=this._findContainer(t.path),n=new xt({});it(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){wt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){wt.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,rt(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(b,10),i.Y36(x,10))},t.\u0275dir=i.lG2({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&i.NdJ("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i._Bn([Ct]),i.qOj]}),t})();const At={provide:Q,useExisting:(0,i.Gpc)(()=>kt)},Zt=(()=>Promise.resolve(null))();let kt=(()=>{class t extends Q{constructor(t,e,n,o){super(),this.control=new bt,this._registered=!1,this.update=new i.vpe,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=st(0,o)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),ot(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?G(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){W(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){Zt.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;Zt.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(H,9),i.Y36(b,10),i.Y36(x,10),i.Y36(d,10))},t.\u0275dir=i.lG2({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[i._Bn([At]),i.qOj,i.TTD]}),t})(),Tt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const Ot={provide:d,useExisting:(0,i.Gpc)(()=>Mt),multi:!0};let Mt=(()=>{class t extends l{writeValue(t){this.setProperty("value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&i.NdJ("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[i._Bn([Ot]),i.qOj]}),t})();const It={provide:d,useExisting:(0,i.Gpc)(()=>Nt),multi:!0};let St=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({}),t})(),Pt=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}
1select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:St}),t})(),Nt=(()=>{class t extends l{constructor(t,e,n,i){super(t,e),this._registry=n,this._injector=i,this.onChange=()=>{}}ngOnInit(){this._control=this._injector.get(Q),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this.setProperty("checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.Qsj),i.Y36(i.SBq),i.Y36(Pt),i.Y36(i.zs3))},t.\u0275dir=i.lG2({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&i.NdJ("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i._Bn([It]),i.qOj]}),t})();const qt={provide:d,useExisting:(0,i.Gpc)(()=>Ut),multi:!0};let Ut=(()=>{class t extends l{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&i.NdJ("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[i._Bn([qt]),i.qOj]}),t})();const Et=new i.OlP("NgModelWithFormControlWarning"),Ft={provide:H,useExisting:(0,i.Gpc)(()=>Dt)};let Dt=(()=>{class t extends H{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new i.vpe,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(et(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return W(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}
1removeControl(t){K(t.control||null,t,!1),at(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,rt(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=t.control,n=this.form.get(t.path);e!==n&&(K(e||null,t),n instanceof bt&&(W(n,t),t.control=n))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const e=this.form.get(t.path);it(e,t),e.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const e=this.form.get(t.path);e&&function(t,e){return et(t,e)}(e,t)&&e.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){tt(this.form,this),this._oldForm&&et(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(b,10),i.Y36(x,10))},t.\u0275dir=i.lG2({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&i.NdJ("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i._Bn([Ft]),i.qOj,i.TTD]}),t})();const Lt={provide:Q,useExisting:(0,i.Gpc)(()=>Jt)};let Jt=(()=>{class t extends Q{constructor(t,e,n,o,r){super(),this._ngModelWarningConfig=r,this._added=!1,this.update=new i.vpe,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=st(0,o)}set isDisabled(t){}ngOnChanges(t){this._added||this._setUpControl(),ot(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(H,13),i.Y36(b,10),i.Y36(x,10),i.Y36(d,10),i.Y36(Et,8))},t.\u0275dir=i.lG2({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i._Bn([Lt]),i.qOj,i.TTD]}),t._ngModelWarningSentOnce=!1,t})();const jt={provide:d,useExisting:(0,i.Gpc)(()=>$t),multi:!0};function Rt(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let $t=(()=>{class t extends l{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this.setProperty("selectedIndex",-1);const n=Rt(e,t);this.setProperty("value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&i.NdJ("
1change",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[i._Bn([jt]),i.qOj]}),t})(),Bt=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Rt(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(i.Qsj),i.Y36($t,9))},t.\u0275dir=i.lG2({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const Ht={provide:d,useExisting:(0,i.Gpc)(()=>Yt),multi:!0};function Qt(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Yt=(()=>{class t extends l{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const i=t.item(e),o=this._getOptionValue(i.value);n.push(o)}}else{const t=e.options;for(let e=0;e<t.length;e++){const i=t.item(e);if(i.selected){const t=this._getOptionValue(i.value);n.push(t)}}}this.value=n,t(n)}}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&i.NdJ("change",function(t){return e.onChange(t.target)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[i._Bn([Ht]),i.qOj]}),t})(),zt=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Qt(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Qt(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(i.Qsj),i.Y36(Yt,9))},t.\u0275dir=i.lG2({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let Vt=(()=>{class t{constructor(){this._validator=T}handleChanges(t){if(this.inputName in t){const e=this.normalizeInput(t[this.inputName].currentValue);this._validator=this.createValidator(e),this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t}),t})();const Gt={provide:b,useExisting:(0,i.Gpc)(()=>Wt),multi:!0};let Wt=(()=>{class t extends Vt{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=t=>parseFloat(t),this.createValidator=t=>y(t)}ngOnChanges(t){this.handleChanges(t)}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,e){if(2&t){let t;i.uIk("max",null!==(t=e.max)&&void 0!==t?t:null)}},inputs:{max:"max"},features:[i._Bn([Gt]),i.qOj,i.TTD]}),t})();const Kt={provide:b,useExisting:(0,i.Gpc)(()=>Xt),multi:!0};let Xt=(()=>{class t extends Vt{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=t=>parseFloat(t),this.createValidator=t=>w(t)}ngOnChanges(t){this.handleChanges(t)}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=i.n5z(t)))(n||t)}}(),t.\u0275dir=i.lG2({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,e){if(2&t){let t;i.uIk("min",null!==(t=e.min)&&void 0!==t?t:null)}},inputs:{min:"min"},features:[i._Bn([Kt]),i.qOj,i.TTD]}),t})();const te={provide:b,useExisting:(0,i.Gpc)(()=>ee),multi:!0};let ee=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&"false"!=`${t}`,this._onChange&&this._onChange()}validate(t){return this.required?A(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&i.uIk("required",e.required?"":null)},inputs:{required:"required"},features:[i._Bn([te])]}),t})();const ne={provide:b,useExisting:(0,i.Gpc)(()=>ie),multi:!0};let ie=(()=>
1{class t{constructor(){this._validator=T}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return this.enabled()?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=this.enabled()?Z(function(t){return"number"==typeof t?t:parseInt(t,10)}(this.maxlength)):T}enabled(){return null!=this.maxlength}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.uIk("maxlength",e.enabled()?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[i._Bn([ne]),i.TTD]}),t})();const oe={provide:b,useExisting:(0,i.Gpc)(()=>re),multi:!0};let re=(()=>{class t{constructor(){this._validator=T}ngOnChanges(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=k(this.pattern)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.lG2({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.uIk("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[i._Bn([oe]),i.TTD]}),t})(),se=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[[St]]}),t})(),ae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[se]}),t})(),ce=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Et,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[se]}),t})(),le=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let i,o=null,r=null;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(o=null!=e.validators?e.validators:null,r=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(o=null!=e.validator?e.validator:null,r=null!=e.asyncValidator?e.asyncValidator:null)),new xt(n,{asyncValidators:r,updateOn:i,validators:o})}control(t,e,n){return new bt(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new _t(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof bt||t instanceof xt||t instanceof _t?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:ce}),t})()},1570:function(t,e,n){"use strict";n.d(e,{b2:function(){return F},H7:function(){return N},q6:function(){return U},se:function(){return y}});var i=n(4364),o=n(2316);class r extends i.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class s extends r{static makeCurrent(){(0,i.HT)(new s)}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=(c=c||document.querySelector("base"),c?c.getAttribute("href"):null);return null==e?null:function(t){a=a||document.createElement("a"),a.setAttribute("href",t);const e=a.pathname;return"/"===e.charAt(0)?e:`/${e}`}(e)}resetBaseElement(){c=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return(0,i.Mx)(document.cookie,t)}}let a,c=null;const l=new o.OlP("TRANSITION_ID"),d=[{provide:o.ip1,useFactory:function(t,e,n){return()=>{n.get(o.CZH).donePromise.then(()=>{const n=(0,i.q)(),o=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let t=0;t<o.length;t++)n.remove(o[t])})}},deps:[l,i.K0,o.zs3],multi:!0}];class u{static init(){(0,o.VLi)(new u)}addToWindow(t){o.dqk.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},o.dqk.getAllAngularTestabilities=()=>t.getAllTestabilities(),o.dqk.getAllAngularRootElements=()=>t.getAllRootElements(),o.dqk.frameworkStabilizers||(o.dqk.frameworkStabilizers=[]),o.dqk.frameworkStabilizers.push(t=>{const e=o.dqk.getAllAngularTestabilities();let n=e.length,i=!1;const r=function(e){i=i||e,n--,0==n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const o=t.getTestability(e);return null!=o?o:n?(0,i.q)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}let p=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const h=new o.OlP("EventManagerPlugins");let g=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(h),o.LFG(o.R0b))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();class f{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const o=(0,i.q)().getGlobalEventTarget(this._doc,t);if(!o)throw new Error(`Unsupported event target ${o} for event ${e}`);return this.addEventListener(o,e,n)}}let m=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),v=(()=>{class t extends m{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,e,n){t.forEach(t=>{const i=this._doc.createElement("style");i.textContent=t,n.push(e.appendChild(i))})}addHost(t){const e=[];this._addStylesToHost(this._stylesSet,t,e),this._hostNodes.set(t,e)}removeHost(t){const e=this._hostNodes.get(t);e&&e.forEach(b),this._hostNodes.delete(t)}
vendor: 5,814 bytes, line 1
1onStylesAdded(t){this._hostNodes.forEach((e,n)=>{this._addStylesToHost(t,n,e)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(b))}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.K0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();function b(t){(0,i.q)().remove(t)}const x={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_=/%COMP%/g;function C(t,e,n){for(let i=0;i<e.length;i++){let o=e[i];Array.isArray(o)?C(t,o,n):(o=o.replace(_,t),n.push(o))}return n}function w(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let y=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new A(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case o.ifc.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Z(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case o.ifc.ShadowDom:return new k(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=C(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(g),o.LFG(v),o.LFG(o.AFp))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();class A{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(x[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const o=x[i];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=x[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&(o.JOm.DashCase|o.JOm.Important)?t.style.setProperty(e,n,i&o.JOm.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&o.JOm.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,w(n)):this.eventManager.addEventListener(t,e,w(n))}}class Z extends A{constructor(t,e,n,i){super(t),this.component=n;const o=C(i+"-"+n.id,n.styles,[]);e.addStyles(o),this.contentAttr="_ngcontent-%COMP%".replace(_,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(_,i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class k extends A{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=C(i.id,i.styles,[]);for(let r=0;r<o.length;r++){const t=document.createElement("style");t.textContent=o[r],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let T=(()=>{class t extends f{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.K0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const O=["alt","control","meta","shift"],M={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},I={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},S={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let P=(()=>{class t extends f{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,o){const r=t.parseEventName(n),s=t.eventCallback(r.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,i.q)().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const o=t._normalizeKey(n.pop());let r="";if(O.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),r+=t+".")}),r+=o,0!=n.length||0===o.length)return null;const s={};return s.domEventName=i,s.fullKey=r,s}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&I.hasOwnProperty(e)&&(e=I[e]))}return M[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),O.forEach(i=>
1{i!=n&&S[i](t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return o=>{t.getEventFullKey(o)===e&&i.runGuarded(()=>n(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.K0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),N=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,o.Yz7)({factory:function(){return(0,o.LFG)(q)},token:t,providedIn:"root"}),t})(),q=(()=>{class t extends N{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case o.q3G.NONE:return e;case o.q3G.HTML:return(0,o.qzn)(e,"HTML")?(0,o.z3N)(e):(0,o.EiD)(this._doc,String(e)).toString();case o.q3G.STYLE:return(0,o.qzn)(e,"Style")?(0,o.z3N)(e):e;case o.q3G.SCRIPT:if((0,o.qzn)(e,"Script"))return(0,o.z3N)(e);throw new Error("unsafe value used in a script context");case o.q3G.URL:return(0,o.yhl)(e),(0,o.qzn)(e,"URL")?(0,o.z3N)(e):(0,o.mCW)(String(e));case o.q3G.RESOURCE_URL:if((0,o.qzn)(e,"ResourceURL"))return(0,o.z3N)(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return(0,o.JVY)(t)}bypassSecurityTrustStyle(t){return(0,o.L6k)(t)}bypassSecurityTrustScript(t){return(0,o.eBb)(t)}bypassSecurityTrustUrl(t){return(0,o.LAX)(t)}bypassSecurityTrustResourceUrl(t){return(0,o.pB0)(t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.K0))},t.\u0275prov=(0,o.Yz7)({factory:function(){return function(t){return new q(t.get(i.K0))}((0,o.LFG)(o.gxx))},token:t,providedIn:"root"}),t})();const U=(0,o.eFA)(o._c5,"browser",[{provide:o.Lbi,useValue:i.bD},{provide:o.g9A,useValue:function(){s.makeCurrent(),u.init()},multi:!0},{provide:i.K0,useFactory:function(){return(0,o.RDi)(document),document},deps:[]}]),E=[[],{provide:o.zSh,useValue:"root"},{provide:o.qLn,useFactory:function(){return new o.qLn},deps:[]},{provide:h,useClass:T,multi:!0,deps:[i.K0,o.R0b,o.Lbi]},{provide:h,useClass:P,multi:!0,deps:[i.K0]},[],{provide:y,useClass:y,deps:[g,v,o.AFp]},{provide:o.FYo,useExisting:y},{provide:m,useExisting:v},{provide:v,useClass:v,deps:[i.K0]},{provide:o.dDg,useClass:o.dDg,deps:[o.R0b]},{provide:g,useClass:g,deps:[h,o.R0b]},{provide:i.JF,useClass:p,deps:[]},[]];let F=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:o.AFp,useValue:e.appId},{provide:l,useExisting:o.AFp},d]}}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(t,12))},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:E,imports:[i.ez,o.hGG]}),t})();"undefined"!=typeof window&&window},3873:function(t,e,n){"use strict";n.d(e,{gz:function(){return Xt},gk:function(){return z},m2:function(){return Y},Q3:function(){return V},OD:function(){return Q},Av:function(){return tt},F0:function(){return wn},rH:function(){return An},Od:function(){return Tn},yS:function(){return Zn},Bz:function(){return Dn},lC:function(){return On}});var i=n(4364),o=n(2316);const r=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();var s=n(9544),a=n(400),c=n(8117);function l(t){return new s.y(e=>{let n;try{n=t()}catch(i){return void e.error(i)}return(n?(0,a.D)(n):(0,c.c)()).subscribe(e)})}var d=n(1134),u=n(6491),p=n(1486),h=n(3972),g=n(2494),f=n(5119),m=n(1003);function v(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new b(t,e,n))}}class b{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new x(t,this.accumulator,this.seed,this.hasSeed))}}class x extends m.L{constructor(t,e,n,i){super(t),this.accumulator=e,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}var _=n(9170),C=n(4873);function w(t){return function(e){return 0===t?(0,c.c)():e.lift(new y(t))}}class y{constructor(t){if(this.total=t,this.total<0)throw new C.W}call(t,e){return e.subscribe(new A(t,this.total))}}class A extends m.L{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let o=0;o<n;o++){const o=e++%n;t.next(i[o])}}t.complete()}}function Z(t=O){return e=>e.lift(new k(t))}class k{constructor(t){this.errorFactory=t}
1call(t,e){return e.subscribe(new T(t,this.errorFactory))}}class T extends m.L{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function O(){return new r}function M(t=null){return e=>e.lift(new I(t))}class I{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new S(t,this.defaultValue))}}class S extends m.L{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}var P=n(7206),N=n(3466);function q(t,e){const n=arguments.length>=2;return i=>i.pipe(t?(0,_.h)((e,n)=>t(e,n,i)):P.y,(0,N.q)(1),n?M(e):Z(()=>new r))}var U=n(3927),E=n(9902),F=n(1143),D=n(8293),L=n(6816),J=n(5816),j=n(8636),R=n(7085),$=n(1435),B=n(6324);class H{constructor(t,e){this.id=t,this.url=e}}class Q extends H{constructor(t,e,n="imperative",i=null){super(t,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Y extends H{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class z extends H{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class V extends H{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class G extends H{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W extends H{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class K extends H{constructor(t,e,n,i,o){super(t,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class X extends H{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tt extends H{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class et{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class nt{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class it{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ot{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rt{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class st{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class at{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const ct="primary";class lt{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function dt(t){return new lt(t)}const ut="ngNavigationCancelingError";function pt(t){const e=Error("NavigationCancelingError: "+t);return e[ut]=!0,e}function ht(t,e,n){const i=n.path.split("/");if(i.length>t.length||"full"===n.pathMatch&&(e.hasChildren()||i.length<t.length))return null;const o={};for(let r=0;r<i.length;r++){const e=i[r],n=t[r];
1if(e.startsWith(":"))o[e.substring(1)]=n;else if(e!==n.path)return null}return{consumed:t.slice(0,i.length),posParams:o}}function gt(t,e){const n=t?Object.keys(t):void 0,i=e?Object.keys(e):void 0;if(!n||!i||n.length!=i.length)return!1;let o;for(let r=0;r<n.length;r++)if(o=n[r],!ft(t[o],e[o]))return!1;return!0}function ft(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const n=[...t].sort(),i=[...e].sort();return n.every((t,e)=>i[e]===t)}return t===e}function mt(t){return Array.prototype.concat.apply([],t)}function vt(t){return t.length>0?t[t.length-1]:null}function bt(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function xt(t){return(0,o.CqO)(t)?t:(0,o.QGY)(t)?(0,a.D)(Promise.resolve(t)):(0,d.of)(t)}const _t={exact:function t(e,n,i){if(!Mt(e.segments,n.segments)||!Zt(e.segments,n.segments,i)||e.numberOfChildren!==n.numberOfChildren)return!1;for(const o in n.children)if(!e.children[o]||!t(e.children[o],n.children[o],i))return!1;return!0},subset:yt},Ct={exact:function(t,e){return gt(t,e)},subset:function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>ft(t[n],e[n]))},ignored:()=>!0};function wt(t,e,n){return _t[n.paths](t.root,e.root,n.matrixParams)&&Ct[n.queryParams](t.queryParams,e.queryParams)&&!("exact"===n.fragment&&t.fragment!==e.fragment)}function yt(t,e,n){return At(t,e,e.segments,n)}function At(t,e,n,i){if(t.segments.length>n.length){const o=t.segments.slice(0,n.length);return!(!Mt(o,n)||e.hasChildren()||!Zt(o,n,i))}if(t.segments.length===n.length){if(!Mt(t.segments,n)||!Zt(t.segments,n,i))return!1;for(const n in e.children)if(!t.children[n]||!yt(t.children[n],e.children[n],i))return!1;return!0}{const o=n.slice(0,t.segments.length),r=n.slice(t.segments.length);return!!(Mt(t.segments,o)&&Zt(t.segments,o,i)&&t.children[ct])&&At(t.children[ct],e,r,i)}}function Zt(t,e,n){return e.every((e,i)=>Ct[n](t[i].parameters,e.parameters))}class kt{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=dt(this.queryParams)),this._queryParamMap}toString(){return Pt.serialize(this)}}class Tt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,bt(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Nt(this)}}class Ot{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=dt(this.parameters)),this._parameterMap}toString(){return Jt(this)}}function Mt(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}class It{}class St{parse(t){const e=new Ht(t);return new kt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${qt(t.root,!0)}`,n=function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${Et(e)}=${Et(t)}`).join("&"):`${Et(e)}=${Et(n)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(t.queryParams);var i;return`${e}${n}${"string"==typeof t.fragment?`#${i=t.fragment,encodeURI(i)}`:""}`}}const Pt=new St;function Nt(t){return t.segments.map(t=>Jt(t)).join("/")}function qt(t,e){if(!t.hasChildren())return Nt(t);if(e){const e=t.children[ct]?qt(t.children[ct],!1):"",n=[];return bt(t.children,(t,e)=>{e!==ct&&n.push(`${e}:${qt(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function(t,e){let n=[];return bt(t.children,(t,i)=>{i===ct&&(n=n.concat(e(t,i)))}),bt(t.children,(t,i)=>{i!==ct&&(n=n.concat(e(t,i)))}),n}(t,(e,n)=>n===ct?[qt(t.children[ct],!1)]:[`${n}:${qt(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[ct]?`${Nt(t)}/${e[0]}`:`${Nt(t)}/(${e.join("//")})`}}function Ut(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Et(t){return Ut(t).replace(/%3B/gi,";")}function Ft(t){return Ut(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Dt(t){return decodeURIComponent(t)}function Lt(t){return Dt(t.replace(/\+/g,"%20"))}function Jt(t){return`${Ft(t.path)}${function(t){return Object.keys(t).map(e=>`;${Ft(e)}=${Ft(t[e])}`).join("")}(t.parameters)}`}const jt=/^[^\/()?;=#]+/;function Rt(t){const e=t.match(jt);return e?e[0]:""}const $t=/^[^=?&#]+/,Bt=/^[^?&#]+/;class Ht{constructor(t){this.url=t,this.remaining=t}
vendor: 4,747 bytes, line 1
1parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Tt([],{}):new Tt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[ct]=new Tt(t,e)),n}parseSegment(){const t=Rt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new Ot(Dt(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Rt(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Rt(this.remaining);t&&(n=t,this.capture(n))}t[Dt(e)]=Dt(n)}parseQueryParam(t){const e=function(t){const e=t.match($t);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Bt);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const i=Lt(e),o=Lt(n);if(t.hasOwnProperty(i)){let e=t[i];Array.isArray(e)||(e=[e],t[i]=e),e.push(o)}else t[i]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Rt(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let o;n.indexOf(":")>-1?(o=n.substr(0,n.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=ct);const r=this.parseChildren();e[o]=1===Object.keys(r).length?r[ct]:new Tt([],r),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class Qt{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Yt(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Yt(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=zt(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return zt(t,this._root).map(t=>t.value)}}function Yt(t,e){if(t===e.value)return e;for(const n of e.children){const e=Yt(t,n);if(e)return e}return null}function zt(t,e){if(t===e.value)return[e];for(const n of e.children){const i=zt(t,n);if(i.length)return i.unshift(e),i}return[]}class Vt{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Gt(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class Wt extends Qt{constructor(t,e){super(t),this.snapshot=e,ie(this,t)}toString(){return this.snapshot.toString()}}function Kt(t,e){const n=function(t,e){const n=new ee([],{},{},"",{},ct,e,null,t.root,-1,{});return new ne("",new Vt(n,[]))}(t,e),i=new u.X([new Ot("",{})]),o=new u.X({}),r=new u.X({}),s=new u.X({}),a=new u.X(""),c=new Xt(i,o,s,a,r,ct,e,n.root);return c.snapshot=n.root,new Wt(new Vt(c,[]),n)}class Xt{constructor(t,e,n,i,o,r,s,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=r,this.component=s,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe((0,U.U)(t=>dt(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,U.U)(t=>dt(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function te(t,e="emptyOnly"){const n=t.pathFromRoot;let i=0;if("always"!==e)for(i=n.length-1;i>=1;){const t=n[i],e=n[i-1];if(t.routeConfig&&""===t.routeConfig.path)i--;else{if(e.component)break;
1i--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class ee{constructor(t,e,n,i,o,r,s,a,c,l,d){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=r,this.component=s,this.routeConfig=a,this._urlSegment=c,this._lastPathIndex=l,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=dt(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=dt(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ne extends Qt{constructor(t,e){super(e),this.url=t,ie(this,e)}toString(){return oe(this._root)}}function ie(t,e){e.value._routerState=t,e.children.forEach(e=>ie(t,e))}function oe(t){const e=t.children.length>0?` { ${t.children.map(oe).join(", ")} } `:"";return`${t.value}${e}`}function re(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,gt(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),gt(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!gt(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),gt(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function se(t,e){const n=gt(t.params,e.params)&&function(t,e){return Mt(t,e)&&t.every((t,n)=>gt(t.parameters,e[n].parameters))}(t.url,e.url);return n&&!(!t.parent!=!e.parent)&&(!t.parent||se(t.parent,e.parent))}function ae(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const i=n.value;i._futureSnapshot=e.value;const o=function(t,e,n){return e.children.map(e=>{for(const i of n.children)if(t.shouldReuseRoute(e.value,i.value.snapshot))return ae(t,e,i);return ae(t,e)})}(t,e,n);return new Vt(i,o)}{if(t.shouldAttach(e.value)){const n=t.retrieve(e.value);if(null!==n){const t=n.route;return ce(e,t),t}}const n=function(t){return new Xt(new u.X(t.url),new u.X(t.params),new u.X(t.queryParams),new u.X(t.fragment),new u.X(t.data),t.outlet,t.component,t)}(e.value),i=e.children.map(e=>ae(t,e));return new Vt(n,i)}}function ce(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let n=0;n<t.children.length;++n)ce(t.children[n],e.children[n])}function le(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function de(t){return"object"==typeof t&&null!=t&&t.outlets}function ue(t,e,n,i,o){let r={};return i&&bt(i,(t,e)=>{r[e]=Array.isArray(t)?t.map(t=>`${t}`):`${t}`}),new kt(n.root===t?e:pe(n.root,t,e),r,o)}function pe(t,e,n){const i={};return bt(t.children,(t,o)=>{i[o]=t===e?n:pe(t,e,n)}),new Tt(t.segments,i)}class he{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&le(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(de);if(i&&i!==vt(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ge{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function fe(t,e,n){if(t||(t=new Tt([],{})),0===t.segments.length&&t.hasChildren())return me(t,e,n);const i=function(t,e,n){let i=0,o=e;const r={match:!1,pathIndex:0,commandIndex:0};for(;o<t.segments.length;){if(i>=n.length)return r;const e=t.segments[o],s=n[i];if(de(s))break;const a=`${s}`,c=i<n.length-1?n[i+1]:null;if(o>0&&void 0===a)break;if(a&&c&&"object"==typeof c&&void 0===c.outlets){if(!_e(a,c,e))return r;i+=2}else{if(!_e(a,{},e))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}(t,e,n),o=n.slice(i.commandIndex);
1if(i.match&&i.pathIndex<t.segments.length){const e=new Tt(t.segments.slice(0,i.pathIndex),{});return e.children[ct]=new Tt(t.segments.slice(i.pathIndex),t.children),me(e,0,o)}return i.match&&0===o.length?new Tt(t.segments,{}):i.match&&!t.hasChildren()?ve(t,e,n):i.match?me(t,0,o):ve(t,e,n)}function me(t,e,n){if(0===n.length)return new Tt(t.segments,{});{const i=function(t){return de(t[0])?t[0].outlets:{[ct]:t}}(n),o={};return bt(i,(n,i)=>{"string"==typeof n&&(n=[n]),null!==n&&(o[i]=fe(t.children[i],e,n))}),bt(t.children,(t,e)=>{void 0===i[e]&&(o[e]=t)}),new Tt(t.segments,o)}}function ve(t,e,n){const i=t.segments.slice(0,e);let o=0;for(;o<n.length;){const r=n[o];if(de(r)){const t=be(r.outlets);return new Tt(i,t)}if(0===o&&le(n[0])){i.push(new Ot(t.segments[e].path,xe(n[0]))),o++;continue}const s=de(r)?r.outlets[ct]:`${r}`,a=o<n.length-1?n[o+1]:null;s&&a&&le(a)?(i.push(new Ot(s,xe(a))),o+=2):(i.push(new Ot(s,{})),o++)}return new Tt(i,{})}function be(t){const e={};return bt(t,(t,n)=>{"string"==typeof t&&(t=[t]),null!==t&&(e[n]=ve(new Tt([],{}),0,t))}),e}function xe(t){const e={};return bt(t,(t,n)=>e[n]=`${t}`),e}function _e(t,e,n){return t==n.path&&gt(e,n.parameters)}class Ce{constructor(t,e,n,i){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=i}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),re(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const i=Gt(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,i[e],n),delete i[e]}),bt(i,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const i=t.value,o=e?e.value:null;if(i===o)if(i.component){const o=n.getContext(i.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:i})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet),i=n&&t.value.component?n.children:e,o=Gt(t);for(const r of Object.keys(o))this.deactivateRouteAndItsChildren(o[r],i);n&&n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated(),n.attachRef=null,n.resolver=null,n.route=null)}activateChildRoutes(t,e,n){const i=Gt(e);t.children.forEach(t=>{this.activateRoutes(t,i[t.value.outlet],n),this.forwardEvent(new st(t.value.snapshot))}),t.children.length&&this.forwardEvent(new ot(t.value.snapshot))}activateRoutes(t,e,n){const i=t.value,o=e?e.value:null;if(re(i),i===o)if(i.component){const o=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,n);else if(i.component){const e=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const t=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),we(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),o=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=i,e.resolver=o,e.outlet&&e.outlet.activateWith(i,o),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function we(t){re(t.value),t.children.forEach(we)}class ye{constructor(t,e){this.routes=t,this.module=e}}function Ae(t){return"function"==typeof t}function Ze(t){return t instanceof kt}const ke=Symbol("INITIAL_VALUE");function Te(){return(0,E.w)(t=>(0,p.aj)(t.map(t=>t.pipe((0,N.q)(1),(0,F.O)(ke)))).pipe(v((t,e)=>{let n=!1;return e.reduce((t,i,o)=>t!==ke?t:(i===ke&&(n=!0),n||!1!==i&&o!==e.length-1&&!Ze(i)?t:i),t)},ke),(0,_.h)(t=>t!==ke),(0,U.U)(t=>Ze(t)?t:!0===t),(0,N.q)(1)))}let Oe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&o._UZ(0,"router-outlet")},directives:function(){return[On]},encapsulation:2}),t})();function Me(t,e=""){for(let n=0;n<t.length;n++){const i=t[n];Ie(i,Se(e,i))}}function Ie(t,e){t.children&&Me(t.children,e)}function Se(t,e){return e?t||e.path?t&&!e.path?`${t}/`:!t&&e.path?e.path:`${t}/${e.path}`:"":t}function Pe(t){const e=t.children&&t.children.map(Pe),n=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!n.component&&(e||n.loadChildren)&&n.outlet&&n.outlet!==ct&&(n.component=Oe),n}function Ne(t){return t.outlet||ct}function qe(t,e){const n=t.filter(t=>Ne(t)===e);return n.push(...t.filter(t=>Ne(t)!==e)),n}const Ue={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function Ee(t,e,n){var i;if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?Object.assign({},Ue):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const o=(e.matcher||ht)(n,t,e);if(!o)return Object.assign({},Ue);const r={};bt(o.posParams,(t,e)=>{r[e]=t.path});const s=o.consumed.length>0?Object.assign(Object.assign({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:s,positionalParamSegments:null!==(i=o.posParams)&&void 0!==i?i:{}}}function Fe(t,e,n,i,o="corrected"){if(n.length>0&&function(t,e,n){return n.some(n=>De(t,e,n)&&Ne(n)!==ct)}(t,n,i)){const o=new Tt(e,function(t,e,n,i){const o={};o[ct]=i,i._sourceSegment=t,i._segmentIndexShift=e.length;for(const r of n)if(""===r.path&&Ne(r)!==ct){const n=new Tt([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,o[Ne(r)]=n}return o}(t,e,i,new Tt(n,t.children)));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>De(t,e,n))}
1(t,n,i)){const r=new Tt(t.segments,function(t,e,n,i,o,r){const s={};for(const a of i)if(De(t,n,a)&&!o[Ne(a)]){const n=new Tt([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===r?t.segments.length:e.length,s[Ne(a)]=n}return Object.assign(Object.assign({},o),s)}(t,e,n,i,t.children,o));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}const r=new Tt(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:n}}function De(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path}function Le(t,e,n,i){return!!(Ne(t)===i||i!==ct&&De(e,n,t))&&("**"===t.path||Ee(e,t,n).matched)}function Je(t,e,n){return 0===e.length&&!t.children[n]}class je{constructor(t){this.segmentGroup=t||null}}class Re{constructor(t){this.urlTree=t}}function $e(t){return new s.y(e=>e.error(new je(t)))}function Be(t){return new s.y(e=>e.error(new Re(t)))}function He(t){return new s.y(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Qe{constructor(t,e,n,i,r){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=r,this.allowRedirects=!0,this.ngModule=t.get(o.h0i)}apply(){const t=Fe(this.urlTree.root,[],[],this.config).segmentGroup,e=new Tt(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,ct).pipe((0,U.U)(t=>this.createUrlTree(Ye(t),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,D.K)(t=>{if(t instanceof Re)return this.allowRedirects=!1,this.match(t.urlTree);throw t instanceof je?this.noMatchError(t):t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,ct).pipe((0,U.U)(e=>this.createUrlTree(Ye(e),t.queryParams,t.fragment))).pipe((0,D.K)(t=>{throw t instanceof je?this.noMatchError(t):t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const i=t.segments.length>0?new Tt([],{[ct]:t}):t;return new kt(i,e,n)}expandSegmentGroup(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe((0,U.U)(t=>new Tt([],t))):this.expandSegment(t,n,e,n.segments,i,!0)}expandChildren(t,e,n){const i=[];for(const o of Object.keys(n.children))"primary"===o?i.unshift(o):i.push(o);return(0,a.D)(i).pipe((0,L.b)(i=>{const o=n.children[i],r=qe(e,i);return this.expandSegmentGroup(t,r,o,i).pipe((0,U.U)(t=>({segment:t,outlet:i})))}),v((t,e)=>(t[e.outlet]=e.segment,t),{}),function(t,e){const n=arguments.length>=2;return i=>i.pipe(t?(0,_.h)((e,n)=>t(e,n,i)):P.y,w(1),n?M(e):Z(()=>new r))}())}expandSegment(t,e,n,i,o,s){return(0,a.D)(n).pipe((0,L.b)(r=>this.expandSegmentAgainstRoute(t,e,n,r,i,o,s).pipe((0,D.K)(t=>{if(t instanceof je)return(0,d.of)(null);throw t}))),q(t=>!!t),(0,D.K)((t,n)=>{if(t instanceof r||"EmptyError"===t.name){if(Je(e,i,o))return(0,d.of)(new Tt([],{}));throw new je(e)}throw t}))}expandSegmentAgainstRoute(t,e,n,i,o,r,s){return Le(i,e,o,r)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,o,r):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,o,r):$e(e):$e(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,i,o,r){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,r):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,o,r)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,i){const o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Be(o):this.lineralizeSegments(n,o).pipe((0,J.zg)(n=>{const o=new Tt(n,{});return this.expandSegment(t,o,e,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,o,r){const{matched:s,consumedSegments:a,lastChild:c,positionalParamSegments:l}=Ee(e,i,o);if(!s)return $e(e);const d=this.applyRedirectCommands(a,i.redirectTo,l);return i.redirectTo.startsWith("/")?Be(d):this.lineralizeSegments(i,d).pipe((0,J.zg)(i=>this.expandSegment(t,e,n,i.concat(o.slice(c)),r,!1)))}matchSegmentAgainstRoute(t,e,n,i,o){if("**"===n.path)return n.loadChildren?(n._loadedConfig?(0,d.of)(n._loadedConfig):this.configLoader.load(t.injector,n)).pipe((0,U.U)(t=>(n._loadedConfig=t,new Tt(i,{})))):(0,d.of)(new Tt(i,{}));const{matched:r,consumedSegments:s,lastChild:a}=Ee(e,n,i);if(!r)return $e(e);const c=i.slice(a);return this.getChildConfig(t,n,i).pipe((0,J.zg)(t=>{const i=t.module,r=t.routes,{segmentGroup:a,slicedSegments:l}=Fe(e,s,c,r),u=new Tt(a.segments,a.children);if(0===l.length&&u.hasChildren())return this.expandChildren(i,r,u).pipe((0,U.U)(t=>new Tt(s,t)));if(0===r.length&&0===l.length)return(0,d.of)(new Tt(s,{}));const p=Ne(n)===o;return this.expandSegment(i,u,r,l,p?ct:o,!0).pipe((0,U.U)(t=>new Tt(s.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?(0,d.of)(new ye(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?(0,d.of)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe((0,J.zg)(n=>{return n?this.configLoader.load(t.injector,e).pipe((0,U.U)(t=>(e._loadedConfig=t,t))):(i=e,new s.y(t=>t.error(pt(`Cannot load children because the guard of the route "path: '${i.path}'" returned false`))));var i})):(0,d.of)(new ye([],t))}runCanLoadGuards(t,e,n){const i=e.canLoad;if(!i||0===i.length)return(0,d.of)(!0);const o=i.map(i=>{const o=t.get(i);let r;if((s=o)&&Ae(s.canLoad))r=o.canLoad(e,n);else{if(!Ae(o))throw new Error("Invalid CanLoad guard");r=o(e,n)}var s;return xt(r)});return(0,d.of)(o).pipe(Te(),(0,j.b)(t=>{if(!Ze(t))return;const e=pt(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),(0,U.U)(t=>!0===t))}lineralizeSegments(t,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return(0,d.of)(n);if(i.numberOfChildren>1||!i.children[ct])return He(t.redirectTo);i=i.children[ct]}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,i){const o=this.createSegmentGroup(t,e.root,n,i);return new kt(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return bt(t,(t,i)=>{if("string"==typeof t&&t.startsWith(":")){const o=t.substring(1);n[i]=e[o]}else n[i]=t}),n}createSegmentGroup(t,e,n,i){const o=this.createSegments(t,e.segments,n,i);let r={};return bt(e.children,(e,o)=>{r[o]=this.createSegmentGroup(t,e,n,i)}),new Tt(o,r)}createSegments(t,e,n,i){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,i):this.findOrReturn(e,n))}findPosParam(t,e,n){const i=n[e.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return i}findOrReturn(t,e){let n=0;for(const i of e){if(i.path===t.path)return e.splice(n),i;n++}return t}}function Ye(t){const e={};for(const n of Object.keys(t.children)){const i=Ye(t.children[n]);(i.segments.length>0||i.hasChildren())&&(e[n]=i)}return function(t){if(1===t.numberOfChildren&&t.children[ct]){const e=t.children[ct];
1return new Tt(t.segments.concat(e.segments),e.children)}return t}(new Tt(t.segments,e))}class ze{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Ve{constructor(t,e){this.component=t,this.route=e}}function Ge(t,e,n){const i=t._root;return Ke(i,e?e._root:null,n,[i.value])}function We(t,e,n){const i=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function Ke(t,e,n,i,o={canDeactivateChecks:[],canActivateChecks:[]}){const r=Gt(e);return t.children.forEach(t=>{(function(t,e,n,i,o={canDeactivateChecks:[],canActivateChecks:[]}){const r=t.value,s=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(s&&r.routeConfig===s.routeConfig){const c=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Mt(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Mt(t.url,e.url)||!gt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!se(t,e)||!gt(t.queryParams,e.queryParams);default:return!se(t,e)}}(s,r,r.routeConfig.runGuardsAndResolvers);c?o.canActivateChecks.push(new ze(i)):(r.data=s.data,r._resolvedData=s._resolvedData),Ke(t,e,r.component?a?a.children:null:n,i,o),c&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new Ve(a.outlet.component,s))}else s&&Xe(e,a,o),o.canActivateChecks.push(new ze(i)),Ke(t,null,r.component?a?a.children:null:n,i,o)})(t,r[t.value.outlet],n,i.concat([t.value]),o),delete r[t.value.outlet]}),bt(r,(t,e)=>Xe(t,n.getContext(e),o)),o}function Xe(t,e,n){const i=Gt(t),o=t.value;bt(i,(t,i)=>{Xe(t,o.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new Ve(o.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,o))}class tn{}function en(t){return new s.y(e=>e.error(t))}class nn{constructor(t,e,n,i,o,r){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=r}recognize(){const t=Fe(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,ct);if(null===e)return null;const n=new ee([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},ct,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Vt(n,e),o=new ne(this.url,i);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(t){const e=t.value,n=te(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=[];for(const o of Object.keys(e.children)){const i=e.children[o],r=qe(t,o),s=this.processSegmentGroup(r,i,o);if(null===s)return null;n.push(...s)}const i=rn(n);return i.sort((t,e)=>t.value.outlet===ct?-1:e.value.outlet===ct?1:t.value.outlet.localeCompare(e.value.outlet)),i}processSegment(t,e,n,i){for(const o of t){const t=this.processSegmentAgainstRoute(o,e,n,i);if(null!==t)return t}return Je(e,n,i)?[]:null}processSegmentAgainstRoute(t,e,n,i){if(t.redirectTo||!Le(t,e,n,i))return null;let o,r=[],s=[];if("**"===t.path){const i=n.length>0?vt(n).parameters:{};o=new ee(n,i,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,cn(t),Ne(t),t.component,t,sn(e),an(e)+n.length,ln(t))}else{const i=Ee(e,t,n);if(!i.matched)return null;r=i.consumedSegments,s=n.slice(i.lastChild),o=new ee(r,i.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,cn(t),Ne(t),t.component,t,sn(e),an(e)+r.length,ln(t))}const a=(d=t).children?d.children:d.loadChildren?d._loadedConfig.routes:[],{segmentGroup:c,slicedSegments:l}=Fe(e,r,s,a.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution);var d;if(0===l.length&&c.hasChildren()){const t=this.processChildren(a,c);return null===t?null:[new Vt(o,t)]}if(0===a.length&&0===l.length)return[new Vt(o,[])];const u=Ne(t)===i,p=this.processSegment(a,c,l,u?ct:i);return null===p?null:[new Vt(o,p)]}}function on(t){const e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function rn(t){const e=[],n=new Set;for(const i of t){if(!on(i)){e.push(i);continue}const t=e.find(t=>i.value.routeConfig===t.value.routeConfig);void 0!==t?(t.children.push(...i.children),n.add(t)):e.push(i)}for(const i of n){const t=rn(i.children);e.push(new Vt(i.value,t))}return e.filter(t=>!n.has(t))}function sn(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function an(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function cn(t){return t.data||{}}function ln(t){return t.resolve||{}}function dn(t){return(0,E.w)(e=>{const n=t(e);return n?(0,a.D)(n).pipe((0,U.U)(()=>e)):(0,d.of)(e)})}class un extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const pn=new o.OlP("ROUTES");class hn{constructor(t,e,n,i){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=i}load(t,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const n=this.loadModuleFactory(e.loadChildren).pipe((0,U.U)(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const i=n.create(t);return new ye(mt(i.injector.get(pn,void 0,o.XFs.Self|o.XFs.Optional)).map(Pe),i)}),(0,D.K)(t=>{throw e._loader$=void 0,t}));return e._loader$=new g.c(n,()=>new f.xQ).pipe((0,R.x)()),e._loader$}loadModuleFactory(t){return"string"==typeof t?(0,a.D)(this.loader.load(t)):xt
1(t()).pipe((0,J.zg)(t=>t instanceof o.YKP?(0,d.of)(t):(0,a.D)(this.compiler.compileModuleAsync(t))))}}class gn{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new fn,this.attachRef=null}}class fn{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new gn,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class mn{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function vn(t){throw t}function bn(t,e,n){return e.parse("/")}function xn(t,e){return(0,d.of)(null)}const _n={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Cn={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let wn=(()=>{class t{constructor(t,e,n,i,r,s,a,c){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=i,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new f.xQ,this.errorHandler=vn,this.malformedUriErrorHandler=bn,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:xn,afterPreactivation:xn},this.urlHandlingStrategy=new mn,this.routeReuseStrategy=new un,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=r.get(o.h0i),this.console=r.get(o.c2e);const l=r.get(o.R0b);this.isNgZoneEnabled=l instanceof o.R0b&&o.R0b.isInAngularZone(),this.resetConfig(c),this.currentUrlTree=new kt(new Tt([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new hn(s,a,t=>this.triggerEvent(new et(t)),t=>this.triggerEvent(new nt(t))),this.routerState=Kt(this.currentUrlTree,this.rootComponentType),this.transitions=new u.X({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const e=this.events;return t.pipe((0,_.h)(t=>0!==t.id),(0,U.U)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),(0,E.w)(t=>{let n=!1,i=!1;return(0,d.of)(t).pipe((0,j.b)(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),(0,E.w)(t=>{const n=this.browserUrlTree.toString(),o=!this.navigated||t.extractedUrl.toString()!==n||n!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||o)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return yn(t.source)&&(this.browserUrlTree=t.extractedUrl),(0,d.of)(t).pipe((0,E.w)(t=>{const n=this.transitions.getValue();return e.next(new Q(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?c.E:Promise.resolve(t)}),function(t,e,n,i){return(0,E.w)(o=>function(t,e,n,i,o){return new Qe(t,e,n,i,o).apply()}(t,e,n,o.extractedUrl,i).pipe((0,U.U)(t=>Object.assign(Object.assign({},o),{urlAfterRedirects:t}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),(0,j.b)(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,o,r){return(0,J.zg)(s=>function(t,e,n,o,r="emptyOnly",s="legacy"){try{const i=new nn(t,e,n,o,r,s).recognize();return null===i?en(new tn):(0,d.of)(i)}catch(i){return en(i)}}(t,e,s.urlAfterRedirects,n(s.urlAfterRedirects),o,r).pipe((0,U.U)(t=>Object.assign(Object.assign({},s),{targetSnapshot:t}))))}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),(0,j.b)(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,t),this.browserUrlTree=t.urlAfterRedirects);
1const n=new G(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));if(o&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:o,restoredState:r,extras:s}=t,a=new Q(n,this.serializeUrl(i),o,r);e.next(a);const c=Kt(i,this.rootComponentType).snapshot;return(0,d.of)(Object.assign(Object.assign({},t),{targetSnapshot:c,urlAfterRedirects:i,extras:Object.assign(Object.assign({},s),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),c.E}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:o,extras:{skipLocationChange:r,replaceUrl:s}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!r,replaceUrl:!!s})}),(0,j.b)(t=>{const e=new W(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),(0,U.U)(t=>Object.assign(Object.assign({},t),{guards:Ge(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return(0,J.zg)(n=>{const{targetSnapshot:i,currentSnapshot:o,guards:{canActivateChecks:r,canDeactivateChecks:s}}=n;return 0===s.length&&0===r.length?(0,d.of)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return(0,a.D)(t).pipe((0,J.zg)(t=>function(t,e,n,i,o){const r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!r||0===r.length)return(0,d.of)(!0);const s=r.map(r=>{const s=We(r,e,o);let a;if(function(t){return t&&Ae(t.canDeactivate)}(s))a=xt(s.canDeactivate(t,e,n,i));else{if(!Ae(s))throw new Error("Invalid CanDeactivate guard");a=xt(s(t,e,n,i))}return a.pipe(q())});return(0,d.of)(s).pipe(Te())}(t.component,t.route,n,e,i)),q(t=>!0!==t,!0))}(s,i,o,t).pipe((0,J.zg)(n=>n&&function(t){return"boolean"==typeof t}(n)?function(t,e,n,i){return(0,a.D)(e).pipe((0,L.b)(e=>(0,h.z)(function(t,e){return null!==t&&e&&e(new it(t)),(0,d.of)(!0)}(e.route.parent,i),function(t,e){return null!==t&&e&&e(new rt(t)),(0,d.of)(!0)}(e.route,i),function(t,e,n){const i=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>l(()=>{const o=e.guards.map(o=>{const r=We(o,e.node,n);let s;if(function(t){return t&&Ae(t.canActivateChild)}(r))s=xt(r.canActivateChild(i,t));else{if(!Ae(r))throw new Error("Invalid CanActivateChild guard");s=xt(r(i,t))}return s.pipe(q())});return(0,d.of)(o).pipe(Te())}));return(0,d.of)(o).pipe(Te())}(t,e.path,n),function(t,e,n){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return(0,d.of)(!0);const o=i.map(i=>l(()=>{const o=We(i,e,n);let r;if(function(t){return t&&Ae(t.canActivate)}(o))r=xt(o.canActivate(e,t));else{if(!Ae(o))throw new Error("Invalid CanActivate guard");r=xt(o(e,t))}return r.pipe(q())}));return(0,d.of)(o).pipe(Te())}(t,e.route,n))),q(t=>!0!==t,!0))}(i,r,t,e):(0,d.of)(n)),(0,U.U)(t=>Object.assign(Object.assign({},n),{guardsResult:t})))})}(this.ngModule.injector,t=>this.triggerEvent(t)),(0,j.b)(t=>{if(Ze(t.guardsResult)){const e=pt(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}const e=new K(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),(0,_.h)(t=>!!t.guardsResult||(this.restoreHistory(t),this.cancelNavigationTransition(t,""),!1)),dn(t=>{if(t.guards.canActivateChecks.length)return(0,d.of)(t).pipe((0,j.b)(t=>{const e=new X(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),(0,E.w)(t=>{let e=!1;return(0,d.of)(t).pipe(function(t,e){return(0,J.zg)(n=>{const{targetSnapshot:i,guards:{canActivateChecks:o}}=n;if(!o.length)return(0,d.of)(n);let r=0;return(0,a.D)(o).pipe((0,L.b)(n=>function(t,e,n,i){return function(t,e,n,i){const o=Object.keys(t);if(0===o.length)return(0,d.of)({});const r={};return(0,a.D)(o).pipe((0,J.zg)(o=>function(t,e,n,i){const o=We(t,e,i);return xt(o.resolve?o.resolve(e,n):o(e,n))}(t[o],e,n,i).pipe((0,j.b)(t=>{r[o]=t}
1))),w(1),(0,J.zg)(()=>Object.keys(r).length===o.length?(0,d.of)(r):c.E))}(t._resolve,t,e,i).pipe((0,U.U)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),te(t,n).resolve),null)))}(n.route,i,t,e)),(0,j.b)(()=>r++),w(1),(0,J.zg)(t=>r===o.length?(0,d.of)(n):c.E))})}(this.paramsInheritanceStrategy,this.ngModule.injector),(0,j.b)({next:()=>e=!0,complete:()=>{e||(this.restoreHistory(t),this.cancelNavigationTransition(t,"At least one route resolver didn't emit any value."))}}))}),(0,j.b)(t=>{const e=new tt(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:o,extras:{skipLocationChange:r,replaceUrl:s}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!r,replaceUrl:!!s})}),(0,U.U)(t=>{const e=function(t,e,n){const i=ae(t,e._root,n?n._root:void 0);return new Wt(i,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),(0,j.b)(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(t.urlAfterRedirects,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,t),this.browserUrlTree=t.urlAfterRedirects)}),((t,e,n)=>(0,U.U)(i=>(new Ce(e,i.targetRouterState,i.currentRouterState,n).activate(t),i)))(this.rootContexts,this.routeReuseStrategy,t=>this.triggerEvent(t)),(0,j.b)({next(){n=!0},complete(){n=!0}}),(0,$.x)(()=>{var e;if(!n&&!i){const e=`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`;"replace"===this.canceledNavigationResolution?(this.restoreHistory(t),this.cancelNavigationTransition(t,e)):this.cancelNavigationTransition(t,e)}(null===(e=this.currentNavigation)||void 0===e?void 0:e.id)===t.id&&(this.currentNavigation=null)}),(0,D.K)(n=>{if(i=!0,function(t){return t&&t[ut]}(n)){const i=Ze(n.url);i||(this.navigated=!0,this.restoreHistory(t,!0));const o=new z(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(o),i?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree),i={skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||yn(t.source)};this.scheduleNavigation(e,"imperative",null,i,{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.restoreHistory(t,!0);const i=new V(t.id,this.serializeUrl(t.extractedUrl),n);e.next(i);try{t.resolve(this.errorHandler(n))}catch(o){t.reject(o)}}return c.E}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:i}=e,o={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,delete t.\u0275routerPageId,0!==Object.keys(t).length&&(o.state=t)}this.scheduleNavigation(i,t,n,o)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return e.transitionId!==t.transitionId||!n||!("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Me(t),this.config=t.map(Pe),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,e={}){const{relativeTo:n,queryParams:i,fragment:o,queryParamsHandling:r,preserveFragment:s}=e,a=n||this.routerState.root,c=s?this.currentUrlTree.fragment:o;let l=null;switch(r){case"merge":l=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=i||null}return null!==l&&(l=this.removeEmptyProps(l)),function(t,e,n,i,o){if(0===n.length)return ue(e.root,e.root,e,i,o);const r=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new he(!0,0,t);let e=0,n=!1;const i=t.reduce((t,i,o)=>
1{if("object"==typeof i&&null!=i){if(i.outlets){const e={};return bt(i.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(i.segmentPath)return[...t,i.segmentPath]}return"string"!=typeof i?[...t,i]:0===o?(i.split("/").forEach((i,o)=>{0==o&&"."===i||(0==o&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))}),t):[...t,i]},[]);return new he(n,e,i)}(n);if(r.toRoot())return ue(e.root,new Tt([],{}),e,i,o);const s=function(t,e,n){if(t.isAbsolute)return new ge(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new ge(t,t===e.root,0)}const i=le(t.commands[0])?0:1;return function(t,e,n){let i=t,o=e,r=n;for(;r>o;){if(r-=o,i=i.parent,!i)throw new Error("Invalid number of '../'");o=i.segments.length}return new ge(i,!1,o-r)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(r,e,t),a=s.processChildren?me(s.segmentGroup,s.index,r.commands):fe(s.segmentGroup,s.index,r.commands);return ue(s.segmentGroup,a,e,i,o)}(a,this.currentUrlTree,t,l,null!=c?c:null)}navigateByUrl(t,e={skipLocationChange:!1}){const n=Ze(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const n=t[e];if(null==n)throw new Error(`The requested path contains ${n} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}isActive(t,e){let n;if(n=!0===e?Object.assign({},_n):!1===e?Object.assign({},Cn):e,Ze(t))return wt(this.currentUrlTree,t,n);const i=this.parseUrl(t);return wt(this.currentUrlTree,i,n)}removeEmptyProps(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return null!=i&&(e[n]=i),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new Y(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,e,n,i,o){var r,s;if(this.disposed)return Promise.resolve(!1);const a=this.getTransition(),c=yn(e)&&a&&!yn(a.source),l=(this.lastSuccessfulId===a.id||this.currentNavigation?a.rawUrl:a.urlAfterRedirects).toString()===t.toString();if(c&&l)return Promise.resolve(!0);let d,u,p;o?(d=o.resolve,u=o.reject,p=o.promise):p=new Promise((t,e)=>{d=t,u=e});const h=++this.navigationId;let g;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(n=this.location.getState()),g=n&&n.\u0275routerPageId?n.\u0275routerPageId:i.replaceUrl||i.skipLocationChange?null!==(r=this.browserPageId)&&void 0!==r?r:0:(null!==(s=this.browserPageId)&&void 0!==s?s:0)+1):g=0,this.setTransition({id:h,targetPageId:g,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:d,reject:u,promise:p,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),p.catch(t=>Promise.reject(t))}setBrowserUrl(t,e){const n=this.urlSerializer.serialize(t),i=Object.assign(Object.assign({},e.extras.state),this.generateNgRouterState(e.id,e.targetPageId));this.location.isCurrentPathEqualTo(n)||e.extras.replaceUrl?this.location.replaceState(n,"",i):this.location.go(n,"",i)}restoreHistory(t,e=!1){var n,i;if("computed"===this.canceledNavigationResolution){const e=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(n=this.currentNavigation)||void 0===n?void 0:n.finalUrl)||0===e?this.currentUrlTree===(null===(i=this.currentNavigation)||void 0===i?void 0:i.finalUrl)&&0===e&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(e)}else"replace"===this.canceledNavigationResolution&&(e&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,e){const n=new z(t.id,this.serializeUrl(t.extractedUrl),e);this.triggerEvent(n),t.resolve(!1)}generateNgRouterState(t,e){return"computed"===this.canceledNavigationResolution?{navigationId:t,"\u0275routerPageId":e}:{navigationId:t}}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.DyG),o.LFG(It),o.LFG(fn),o.LFG(i.Ye),o.LFG(o.zs3),o.LFG(o.v3s),o.LFG(o.Sil),o.LFG(void 0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();function yn(t){return"imperative"!==t}let An=(()=>{class t{constructor(t,e,n,i,o){this.router=t,this.route=e,this.commands=[],this.onChanges=new f.xQ,null==n&&i.setAttribute(o.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:kn(this.skipLocationChange),replaceUrl:kn(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:kn(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wn),o.Y36(Xt),o.$8M("tabindex"),o.Y36(o.Qsj),o.Y36(o.SBq))},t.\u0275dir=o.lG2({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&o.NdJ("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[o.TTD]}),t})(),Zn=(()=>{class t{constructor(t,e,n){this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.onChanges=new f.xQ,this.subscription=t.events.subscribe(t=>{t instanceof Y&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,n,i,o){if(0!==t||e||n||i||o||"string"==typeof this.target&&"_self"!=this.target)return!0;const r={skipLocationChange:kn(this.skipLocationChange),replaceUrl:kn(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,r),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:kn(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wn),o.Y36(Xt),o.Y36(i.S$))},t.\u0275dir=o.lG2({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(o.Ikx("href",e.href,o.LSH),o.uIk("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[o.TTD]}),t})();function kn(t){return""===t||!!t}let Tn=(()=>{class t{constructor(t,e,n,i,o,r){this.router=t,this.element=e,this.renderer=n,this.cdr=i,this.link=o,this.linkWithHref=r,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Y&&this.update()})}ngAfterContentInit(){(0,d.of)(this.links.changes,this.linksWithHrefs.changes,(0,d.of)(null)).pipe((0,B.J)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=(0,a.D)(e).pipe((0,B.J)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEac
1h(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){const e=function(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return n=>t.isActive(n.urlTree,e)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wn),o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(o.sBO),o.Y36(An,8),o.Y36(Zn,8))},t.\u0275dir=o.lG2({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,n){if(1&t&&(o.Suo(n,An,5),o.Suo(n,Zn,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.links=t),o.iGM(t=o.CRH())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[o.TTD]}),t})(),On=(()=>{class t{constructor(t,e,n,i,r){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=r,this.activated=null,this._activatedRoute=null,this.activateEvents=new o.vpe,this.deactivateEvents=new o.vpe,this.name=i||ct,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,o=new Mn(t,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,o),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(fn),o.Y36(o.s_b),o.Y36(o._Vd),o.$8M("name"),o.Y36(o.sBO))},t.\u0275dir=o.lG2({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class Mn{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===Xt?this.route:t===fn?this.childContexts:this.parent.get(t,e)}}class In{}class Sn{preload(t,e){return(0,d.of)(null)}}let Pn=(()=>{class t{constructor(t,e,n,i,o){this.router=t,this.injector=i,this.preloadingStrategy=o,this.loader=new hn(e,n,e=>t.triggerEvent(new et(e)),e=>t.triggerEvent(new nt(e)))}setUpPreloading(){this.subscription=this.router.events.pipe((0,_.h)(t=>t instanceof Y),(0,L.b)(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(o.h0i);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const i of e)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const t=i._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(t,i)):i.children&&n.push(this.processRoutes(t,i.children));return(0,a.D)(n).pipe((0,B.J)(),(0,U.U)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>(e._loadedConfig?(0,d.of)(e._loadedConfig):this.loader.load(t.injector,e)).pipe((0,J.zg)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(wn),o.LFG(o.v3s),o.LFG(o.Sil),o.LFG(o.zs3),o.LFG(In))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),Nn=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anch
1orScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Q?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Y&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof at&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new at(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(wn),o.LFG(i.EM),o.LFG(void 0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const qn=new o.OlP("ROUTER_CONFIGURATION"),Un=new o.OlP("ROUTER_FORROOT_GUARD"),En=[i.Ye,{provide:It,useClass:St},{provide:wn,useFactory:function(t,e,n,i,o,r,s,a={},c,l){const d=new wn(null,t,e,n,i,o,r,mt(s));return c&&(d.urlHandlingStrategy=c),l&&(d.routeReuseStrategy=l),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(a,d),a.enableTracing&&d.events.subscribe(t=>{var e,n;null===(e=console.group)||void 0===e||e.call(console,`Router Event: ${t.constructor.name}`),console.log(t.toString()),console.log(t),null===(n=console.groupEnd)||void 0===n||n.call(console)}),d},deps:[It,fn,i.Ye,o.zs3,o.v3s,o.Sil,pn,qn,[class{},new o.FiY],[class{},new o.FiY]]},fn,{provide:Xt,useFactory:function(t){return t.routerState.root},deps:[wn]},{provide:o.v3s,useClass:o.EAV},Pn,Sn,class{preload(t,e){return e().pipe((0,D.K)(()=>(0,d.of)(null)))}},{provide:qn,useValue:{enableTracing:!1}}];function Fn(){return new o.PXZ("Router",wn)}let Dn=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[En,Rn(e),{provide:Un,useFactory:jn,deps:[[wn,new o.FiY,new o.tp0]]},{provide:qn,useValue:n||{}},{provide:i.S$,useFactory:Jn,deps:[i.lw,[new o.tBr(i.mr),new o.FiY],qn]},{provide:Nn,useFactory:Ln,deps:[wn,i.EM,qn]},{provide:In,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Sn},{provide:o.PXZ,multi:!0,useFactory:Fn},[$n,{provide:o.ip1,multi:!0,useFactory:Bn,deps:[$n]},{provide:Qn,useFactory:Hn,deps:[$n]},{provide:o.tb,multi:!0,useExisting:Qn}]]}}static forChild(e){return{ngModule:t,providers:[Rn(e)]}}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(Un,8),o.LFG(wn,8))},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({}),t})();function Ln(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Nn(t,e,n)}function Jn(t,e,n={}){return n.useHash?new i.Do(t,e):new i.b0(t,e)}function jn(t){return"guarded"}function Rn(t){return[{provide:o.deG,multi:!0,useValue:t},{provide:pn,multi:!0,useValue:t}]}let $n=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new f.xQ}appInitializer(){return this.injector.get(i.V_,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let t=null;const e=new Promise(e=>t=e),n=this.injector.get(wn),i=this.injector.get(qn);return"disabled"===i.initialNavigation?(n.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(n.hooks.afterPreactivation=()=>this.initNavigation?(0,d.of)(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(qn),n=this.injector.get(Pn),i=this.injector.get(Nn),r=this.injector.get(wn),s=this.injector.get(o.z2F);t===s.components[0]&&(("enabledNonBlocking"===e.initialNavigation||void 0===e.initialNavigation)&&r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(s.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.zs3))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();function Bn(t){return t.appInitializer.bind(t)}function Hn(t){return t.bootstrapListener.bind(t)}const Qn=new o.OlP("Router Initializer")},3454:function(t,e,n){t.exports={graphlib:n(7952),layout:n(8332),debug:n(2373),util:{time:n(7110).time,notime:n(7110).notime},version:n(6765)}},5266:function(t,e,n){"use strict";let i=n(136),o=n(7110).uniqueId;t.exports={run:function(t){var e;("greedy"===t.graph().acyclicer?i(t,(e=t,t=>e.edge(t).weight)):function(t){let e=[],n={},i={};
1return t.nodes().forEach(function o(r){Object.hasOwn(i,r)||(i[r]=!0,n[r]=!0,t.outEdges(r).forEach(t=>{Object.hasOwn(n,t.w)?e.push(t):o(t.w)}),delete n[r])}),e}(t)).forEach(e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,o("rev"))})},undo:function(t){t.edges().forEach(e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let i=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,i)}})}}},354:function(t,e,n){let i=n(7110);function o(t,e,n,o,r,s){let a=r[e][s-1],c=i.addDummyNode(t,"border",{width:0,height:0,rank:s,borderType:e},n);r[e][s]=c,t.setParent(c,o),a&&t.setEdge(a,c,{weight:1})}t.exports=function(t){t.children().forEach(function e(n){let i=t.children(n),r=t.node(n);if(i.length&&i.forEach(e),Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let e=r.minRank,i=r.maxRank+1;e<i;++e)o(t,"borderLeft","_bl",n,r,e),o(t,"borderRight","_br",n,r,e)}})}},6895:function(t){"use strict";function e(t){t.nodes().forEach(e=>n(t.node(e))),t.edges().forEach(e=>n(t.edge(e)))}function n(t){let e=t.width;t.width=t.height,t.height=e}function i(t){t.y=-t.y}function o(t){let e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){let n=t.graph().rankdir.toLowerCase();("lr"===n||"rl"===n)&&e(t)},undo:function(t){let n=t.graph().rankdir.toLowerCase();("bt"===n||"rl"===n)&&function(t){t.nodes().forEach(e=>
1i(t.node(e))),t.edges().forEach(e=>{let n=t.edge(e);n.points.forEach(i),Object.hasOwn(n,"y")&&i(n)})}(t),("lr"===n||"rl"===n)&&(function(t){t.nodes().forEach(e=>o(t.node(e))),t.edges().forEach(e=>{let n=t.edge(e);n.points.forEach(o),Object.hasOwn(n,"x")&&o(n)})}(t),e(t))}}},7318:function(t){function e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function n(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],e=this._sentinel,i=e._prev;for(;i!==e;)t.push(JSON.stringify(i,n)),i=i._prev;return"["+t.join(", ")+"]"}}},2373:function(t,e,n){let i=n(7110),o=n(7952).Graph;t.exports={debugOrdering:function(t){let e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach(e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}
1),t.edges().forEach(t=>n.setEdge(t.v,t.w,{},t.name)),e.forEach((t,e)=>{n.setNode("layer"+e,{rank:"same"}),t.reduce((t,e)=>(n.setEdge(t,e,{style:"invis"}),e))}),n}}},136:function(t,e,n){let i=n(7952).Graph,o=n(7318);t.exports=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new i,r=0,s=0;t.nodes().forEach(t=>{n.setNode(t,{v:t,in:0,out:0})}),t.edges().forEach(t=>{let i=n.edge(t.v,t.w)||0,o=e(t);n.setEdge(t.v,t.w,i+o),s=Math.max(s,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)});let c=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(s+r+3).map(()=>new o),l=r+1;return n.nodes().forEach(t=>{a(c,l,n.node(t))}),{graph:n,buckets:c,zeroIdx:l}}(t,e||r);return function(t,e,n){let i,o=[],r=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;i=a.dequeue();)s(t,e,n,i);for(;i=r.dequeue();)s(t,e,n,i);if(t.nodeCount())for(let r=e.length-2;r>0;--r)if(i=e[r].dequeue(),i){o=o.concat(s(t,e,n,i,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx).flatMap(e=>t.outEdges(e.v,e.w))};let r=()=>1;function s(t,e,n,i,o){let r=o?[]:void 0;return t.inEdges(i.v).forEach(i=>{let s=t.edge(i),c=t.node(i.v);o&&r.push({v:i.v,w:i.w}),c.out-=s,a(e,n,c)}),t.outEdges(i.v).forEach(i=>{let o=t.edge(i),r=t.node(i.w);r.in-=o,a(e,n,r)}),t.removeNode(i.v),r}function a(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8332:function(t,e,n){"use strict";let i=n(5266),o=n(9800),r=n(3816),s=n(7110).normalizeRanks,a=n(878),c=n(7110).removeEmptyRanks,l=n(9850),d=n(354),u=n(6895),p=n(843),h=n(8987),g=n(7110),f=n(7952).Graph;t.exports=function(t,e){let n=e&&e.debugTiming?g.time:g.notime;n("layout",()=>{let k=n("  buildLayoutGraph",()=>function(t){let e=new f({multigraph:!0,compound:!0}),n=Z(t.graph());return e.setGraph(Object.assign({},v,A(n,m),g.pick(n,b))),t.nodes().forEach(n=>{const i=A(Z(t.node(n)),x);Object.keys(_).forEach(t=>{void 0===i[t]&&(i[t]=_[t])}),e.setNode(n,i),e.setParent(n,t.parent(n))}
1),t.edges().forEach(n=>{let i=Z(t.edge(n));e.setEdge(n,Object.assign({},w,A(i,C),g.pick(i,y)))}),e}(t));n("  runLayout",()=>function(t,e,n){e("    makeSpaceForEdgeLabels",()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach(n=>{let i=t.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)})}(t)),e("    removeSelfEdges",()=>function(t){t.edges().forEach(e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}(t)),e("    acyclic",()=>i.run(t)),e("    nestingGraph.run",()=>l.run(t)),e("    rank",()=>r(g.asNonCompoundGraph(t))),e("    injectEdgeLabelProxies",()=>function(t){t.edges().forEach(e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}})}(t)),e("    removeEmptyRanks",()=>c(t)),e("    nestingGraph.cleanup",()=>l.cleanup(t)),e("    normalizeRanks",()=>s(t)),e("    assignRankMinMax",()=>function(t){let e=0;t.nodes().forEach(n=>{let i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=Math.max(e,i.maxRank))}),t.graph().maxRank=e}(t)),e("    removeEdgeLabelProxies",()=>function(t){t.nodes().forEach(e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}(t)),e("    normalize.run",()=>o.run(t)),e("    parentDummyChains",()=>a(t)),e("    addBorderSegments",()=>d(t)),e("    order",()=>p(t,n)),e("    insertSelfEdges",()=>function(t){g.buildLayerMatrix(t).forEach(e=>{var n=0;e.forEach((e,i)=>{var o=t.node(e);o.order=i+n,(o.selfEdges||[]).forEach(e=>{g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}(t)),e("    adjustCoordinateSystem",()=>u.adjust(t)),e("    position",()=>h(t)),e("    positionSelfEdges",()=>function(t){t.nodes().forEach(e=>{var n=t.node(e);if("selfedge"===n.dummy){var i=t.node(n.e.v),o=i.x+i.width/2,r=i.y,s=n.x-o,a=i.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:o+2*s/3,y:r-a},{x:o+5*s/6,y:r-a},{x:o+s,y:r},{x:o+5*s/6,y:r+a},{x:o+2*s/3,y:r+a}],n.label.x=n.x,n.label.y=n.y}})}(t)),e("    removeBorderNodes",()=>function(t){t.nodes().forEach(e=>{if(t.children(e).length){let n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),r=t.node(n.borderLeft[n.borderLeft.length-1]),s=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-r.x),n.height=Math.abs(o.y-i.y),n.x=r.x+n.width/2,n.y=i.y+n.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}(t)),e("    normalize.undo",()=>o.undo(t)),e("    fixupEdgeLabelCoords",()=>
vendor: 1,205 bytes, line 1
1function(t){t.edges().forEach(e=>{let n=t.edge(e);if(Object.hasOwn(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(t)),e("    undoCoordinateSystem",()=>u.undo(t)),e("    translateGraph",()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,r=t.graph(),s=r.marginx||0,a=r.marginy||0;function c(t){let r=t.x,s=t.y,a=t.width,c=t.height;e=Math.min(e,r-a/2),n=Math.max(n,r+a/2),i=Math.min(i,s-c/2),o=Math.max(o,s+c/2)}t.nodes().forEach(e=>c(t.node(e))),t.edges().forEach(e=>{let n=t.edge(e);Object.hasOwn(n,"x")&&c(n)}),e-=s,i-=a,t.nodes().forEach(n=>{let o=t.node(n);o.x-=e,o.y-=i}),t.edges().forEach(n=>{let o=t.edge(n);o.points.forEach(t=>{t.x-=e,t.y-=i}),Object.hasOwn(o,"x")&&(o.x-=e),Object.hasOwn(o,"y")&&(o.y-=i)}),r.width=n-e+s,r.height=o-i+a}(t)),e("    assignNodeIntersects",()=>function(t){t.edges().forEach(e=>{let n,i,o=t.edge(e),r=t.node(e.v),s=t.node(e.w);o.points?(n=o.points[0],i=o.points[o.points.length-1]):(o.points=[],n=s,i=r),o.points.unshift(g.intersectRect(r,n)),o.points.push(g.intersectRect(s,i))})}(t)),e("    reversePoints",()=>
1function(t){t.edges().forEach(e=>{let n=t.edge(e);n.reversed&&n.points.reverse()})}(t)),e("    acyclic.undo",()=>i.undo(t))}(k,n,e)),n("  updateInputGraph",()=>function(t,e){t.nodes().forEach(n=>{let i=t.node(n),o=e.node(n);i&&(i.x=o.x,i.y=o.y,i.rank=o.rank,e.children(n).length&&(i.width=o.width,i.height=o.height))}),t.edges().forEach(n=>{let i=t.edge(n),o=e.edge(n);i.points=o.points,Object.hasOwn(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,k))})};let m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},C=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},y=["labelpos"];function A(t,e){return g.mapValues(g.pick(t,e),Number)}function Z(t){var e={};return t&&Object.entries(t).forEach(([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n}),e}},9850:function(t,e,n){let i=n(7110);function o(t,e,n,r,s,a,c){let l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));let d=i.addBorderNode(t,"_bt"),u=i.addBorderNode(t,"_bb"),p=t.node(c);t.setParent(d,c),p.borderTop=d,t.setParent(u,c),p.borderBottom=u,l.forEach(i=>{o(t,e,n,r,s,a,i);let l=t.node(i),p=l.borderTop?l.borderTop:i,h=l.borderBottom?l.borderBottom:i,g=l.borderTop?r:2*r,f=p!==h?1:s-a[c]+1;t.setEdge(d,p,{weight:g,minlen:f,nestingEdge:!0}),t.setEdge(h,u,{weight:g,minlen:f,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,d,{weight:0,minlen:s+a[c]})}t.exports={run:function(t){let e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var r=t.children(i);r&&r.length&&r.forEach(t=>n(t,o+1)),e[i]=o}
1return t.children().forEach(t=>n(t,1)),e}(t),r=Object.values(n),s=i.applyWithChunking(Math.max,r)-1,a=2*s+1;t.graph().nestingRoot=e,t.edges().forEach(e=>t.edge(e).minlen*=a);let c=function(t){return t.edges().reduce((e,n)=>e+t.edge(n).weight,0)}(t)+1;t.children().forEach(i=>o(t,e,a,c,s,n,i)),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach(e=>{t.edge(e).nestingEdge&&t.removeEdge(e)})}}},9800:function(t,e,n){"use strict";let i=n(7110);t.exports={run:function(t){t.graph().dummyChains=[],t.edges().forEach(e=>function(t,e){let n,o,r,s=e.v,a=t.node(s).rank,c=e.w,l=t.node(c).rank,d=e.name,u=t.edge(e),p=u.labelRank;if(l!==a+1){for(t.removeEdge(e),r=0,++a;a<l;++r,++a)u.points=[],o={width:0,height:0,edgeLabel:u,edgeObj:e,rank:a},n=i.addDummyNode(t,"edge",o,"_d"),a===p&&(o.width=u.width,o.height=u.height,o.dummy="edge-label",o.labelpos=u.labelpos),t.setEdge(s,n,{weight:u.weight},d),0===r&&t.graph().dummyChains.push(n),s=n;t.setEdge(s,c,{weight:u.weight},d)}}(t,e))},undo:function(t){t.graph().dummyChains.forEach(e=>{let n,i=t.node(e),o=i.edgeLabel;for(t.setEdge(i.edgeObj,o);i.dummy;)n=t.successors(e)[0],t.removeNode(e),o.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),i=t.node(e=n)})}}},4945:function(t){t.exports=function(t,e,n){let i,o={};n.forEach(n=>{let r,s,a=t.parent(n);for(;a;){if(r=t.parent(a),r?(s=o[r],o[r]=a):(s=i,i=a),s&&s!==a)return void e.setEdge(s,a);a=r}})}},3371:function(t){t.exports=function(t,e=[]){return e.map(e=>{let n=t.inEdges(e);if(n.length){let i=n.reduce((e,n)=>{let i=t.edge(n),o=t.node(n.v);return{sum:e.sum+i.weight*o.order,weight:e.weight+i.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}},1898:function(t,e,n){let i=n(7952).Graph,o=n(7110);t.exports=function(t,e,n){let r=function(t){for(var e;t.hasNode(e=o.uniqueId("_root")););return e}(t),s=new i({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(e=>t.node(e));return t.nodes().forEach(i=>{let o=t.node(i),a=t.parent(i);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(s.setNode(i),s.setParent(i,a||r),t[n](i).forEach(e=>{let n=e.v===i?e.w:e.v,o=s.edge(n,i),r=void 0!==o?o.weight:0;s.setEdge(n,i,{weight:t.edge(e).weight+r})}),Object.hasOwn(o,"minRank")&&s.setNode(i,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),s}},4162:function(t,e,n){"use strict";let i=n(7110).zipObject;function o(t,e,n){let o=i(n,n.map((t,e)=>e)),r=e.flatMap(e=>t.outEdges(e).map(e=>({pos:o[e.w],weight:t.edge(e).weight})).sort((t,e)=>t.pos-e.pos)),s=1;for(;s<n.length;)s<<=1;let a=2*s-1;s-=1;let c=new Array(a).fill(0),l=0;return r.forEach(t=>{let e=t.pos+s;c[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=c[e+1]),e=e-1>>1,c[e]+=t.weight;l+=t.weight*n}),l}t.exports=function(t,e){let n=0;for(let i=1;i<e.length;++i)n+=o(t,e[i-1],e[i]);return n}},843:function(t,e,n){"use strict";let i=n(3281),o=n(4162),r=n(2218),s=n(1898),a=n(4945),c=n(7952).Graph,l=n(7110);function d(t,e,n){return e.map(function(e){return s(t,e,n)})}function u(t,e){let n=new c;t.forEach(function(t){let i=t.graph().root,o=r(t,i,n,e);o.vs.forEach((e,n)=>t.node(e).order=n),a(t,n,o.vs)})}function p(t,e){Object.values(e).forEach(e=>e.forEach((e,n)=>t.node(e).order=n))}t.exports=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let r=l.maxRank(e),s=d(e,l.range(1,r+1),"inEdges"),a=d(e,l.range(r-1,-1,-1),"outEdges"),c=i(e);if(p(e,c),n&&n.disableOptimalOrderHeuristic)return;let h,g=Number.POSITIVE_INFINITY;for(let i=0,d=0;d<4;++i,++d){u(i%2?s:a,i%4>=2),c=l.buildLayerMatrix(e);let t=o(e,c);t<g&&(d=0,h=Object.assign({},c),g=t)}p(e,h)}},3281:function(t,e,n){"use strict";let i=n(7110);t.exports=function(t){let e={},n=t.nodes().filter(e=>!t.children(e).length),o=n.map(e=>t.node(e).rank),r=i.applyWithChunking(Math.max,o),s=i.range(r+1).map(()=>[]);return n.sort((e,n)=>t.node(e).rank-t.node(n).rank).forEach(function n(i){if(e[i])return;e[i]=!0;let o=t.node(i);s[o.rank].push(i),t.successors(i).forEach(n)}),s}},8692:function(t,e,n){"use strict";let i=n(7110);t.exports=function(t,e){let n={};return t.forEach((t,e)=>{let i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(i.barycenter=t.barycenter,i.weight=t.weight)}
1),e.edges().forEach(t=>{let e=n[t.v],i=n[t.w];void 0!==e&&void 0!==i&&(i.indegree++,e.out.push(n[t.w]))}),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,i=0;t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function o(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let i=t.pop();e.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(o(i))}return e.filter(t=>!t.merged).map(t=>i.pick(t,["vs","i","barycenter","weight"]))}(Object.values(n).filter(t=>!t.indegree))}},2218:function(t,e,n){let i=n(3371),o=n(8692),r=n(3869);t.exports=function t(e,n,s,a){let c=e.children(n),l=e.node(n),d=l?l.borderLeft:void 0,u=l?l.borderRight:void 0,p={};d&&(c=c.filter(t=>t!==d&&t!==u));let h=i(e,c);h.forEach(n=>{if(e.children(n.v).length){let i=t(e,n.v,s,a);p[n.v]=i,Object.hasOwn(i,"barycenter")&&function(t,e){void 0!==t.barycenter?(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight):(t.barycenter=e.barycenter,t.weight=e.weight)}(n,i)}});let g=o(h,s);!function(t,e){t.forEach(t=>{t.vs=t.vs.flatMap(t=>e[t]?e[t].vs:t)})}(g,p);let f=r(g,a);if(d&&(f.vs=[d,f.vs,u].flat(!0),e.predecessors(d).length)){let t=e.node(e.predecessors(d)[0]),n=e.node(e.predecessors(u)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+t.order+n.order)/(f.weight+2),f.weight+=2}return f}},3869:function(t,e,n){let i=n(7110);function o(t,e,n){let i;for(;e.length&&(i=e[e.length-1]).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){let n=i.partition(t,t=>Object.hasOwn(t,"barycenter")),r=n.lhs,s=n.rhs.sort((t,e)=>e.i-t.i),a=[],c=0,l=0,d=0;r.sort(function(t){return(e,n)=>e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:t?n.i-e.i:e.i-n.i}(!!e)),d=o(a,s,d),r.forEach(t=>{d+=t.vs.length,a.push(t.vs),c+=t.barycenter*t.weight,l+=t.weight,d=o(a,s,d)});let u={vs:a.flat(!0)};return l&&(u.barycenter=c/l,u.weight=l),u}},878:function(t){t.exports=function(t){let e=function(t){let e={},n=0;
1return t.children().forEach(function i(o){let r=n;t.children(o).forEach(i),e[o]={low:r,lim:n++}}),e}(t);t.graph().dummyChains.forEach(n=>{let i=t.node(n),o=i.edgeObj,r=function(t,e,n,i){let o,r,s=[],a=[],c=Math.min(e[n].low,e[i].low),l=Math.max(e[n].lim,e[i].lim);o=n;do{o=t.parent(o),s.push(o)}while(o&&(e[o].low>c||l>e[o].lim));for(r=o,o=i;(o=t.parent(o))!==r;)a.push(o);return{path:s.concat(a.reverse()),lca:r}}(t,e,o.v,o.w),s=r.path,a=r.lca,c=0,l=s[c],d=!0;for(;n!==o.w;){if(i=t.node(n),d){for(;(l=s[c])!==a&&t.node(l).maxRank<i.rank;)c++;l===a&&(d=!1)}if(!d){for(;c<s.length-1&&t.node(l=s[c+1]).minRank<=i.rank;)c++;l=s[c]}t.setParent(n,l),n=t.successors(n)[0]}})}},2829:function(t,e,n){"use strict";let i=n(7952).Graph,o=n(7110);function r(t,e){let n={};return e.length&&e.reduce(function(e,i){let o=0,r=0,s=e.length,c=i[i.length-1];return i.forEach((e,l)=>{let d=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find(e=>t.node(e).dummy)}(t,e),u=d?t.node(d).order:s;(d||e===c)&&(i.slice(r,l+1).forEach(e=>{t.predecessors(e).forEach(i=>{let r=t.node(i),s=r.order;(s<o||u<s)&&(!r.dummy||!t.node(e).dummy)&&a(n,i,e)})}),r=l+1,o=u)}),i}),n}function s(t,e){let n={};function i(e,i,r,s,c){let l;o.range(i,r).forEach(i=>{l=e[i],t.node(l).dummy&&t.predecessors(l).forEach(e=>{let i=t.node(e);i.dummy&&(i.order<s||i.order>c)&&a(n,e,l)})})}return e.length&&e.reduce(function(e,n){let o,r=-1,s=0;return n.forEach((a,c)=>{if("border"===t.node(a).dummy){let e=t.predecessors(a);e.length&&(o=t.node(e[0]).order,i(n,s,c,r,o),s=c,r=o)}i(n,s,n.length,o,e.length)}),n}),n}function a(t,e,n){if(e>n){let t=e;e=n,n=t}let i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&Object.hasOwn(t[e],n)}function l(t,e,n,i){let o={},r={},s={};return e.forEach(t=>{t.forEach((t,e)=>{o[t]=t,r[t]=t,s[t]=e})}),e.forEach(t=>{let e=-1;t.forEach(t=>{let a=i(t);if(a.length){a=a.sort((t,e)=>s[t]-s[e]);let i=(a.length-1)/2;for(let l=Math.floor(i),d=Math.ceil(i);l<=d;++l){let i=a[l];r[t]===t&&e<s[i]&&!c(n,t,i)&&(r[i]=t,r[t]=o[t]=o[i],e=s[i])}}})}),{root:o,align:r}}function d(t,e,n,o,r){let s={},a=function(t,e,n,o){let r=new i,s=t.graph(),a=function(t,e,n){return(i,o,r)=>{let s,a=i.node(o),c=i.node(r),l=0;if(l+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2}if(s&&(l+=n?s:-s),s=0,l+=(a.dummy?e:t)/2,l+=(c.dummy?e:t)/2,l+=c.width/2,Object.hasOwn(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,o);return e.forEach(e=>{let i;e.forEach(e=>{let o=n[e];if(r.setNode(o),i){var s=n[i],c=r.edge(s,o);r.setEdge(s,o,Math.max(a(t,e,i),c||0))}i=e})}),r}(t,e,n,r),c=r?"borderLeft":"borderRight";function l(t,e){let n=a.nodes(),i=n.pop(),o={};for(;i;)o[i]?t(i):(o[i]=!0,n.push(i),n=n.concat(e(i))),i=n.pop()}return l(function(t){s[t]=a.inEdges(t).reduce((t,e)=>Math.max(t,s[e.v]+a.edge(e)),0)},a.predecessors.bind(a)),l(function(e){let n=a.outEdges(e).reduce((t,e)=>Math.min(t,s[e.w]-a.edge(e)),Number.POSITIVE_INFINITY),i=t.node(e);n!==Number.POSITIVE_INFINITY&&i.borderType!==c&&(s[e]=Math.max(s[e],n))},a.successors.bind(a)),Object.keys(o).forEach(t=>s[t]=s[n[t]]),s}function u(t,e){return Object.values(e).reduce((e,n)=>{let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([e,n])=>{let r=function(t,e){return t.node(e).width}(t,e)/2;i=Math.max(n+r,i),o=Math.min(n-r,o)});const r=i-o;return r<e[0]&&(e=[r,n]),e},[Number.POSITIVE_INFINITY,null])[1]}function p(t,e){let n=Object.values(e),i=o.applyWithChunking(Math.min,n),r
1=o.applyWithChunking(Math.max,n);["u","d"].forEach(n=>{["l","r"].forEach(s=>{let a=n+s,c=t[a];if(c===e)return;let l=Object.values(c),d=i-o.applyWithChunking(Math.min,l);"l"!==s&&(d=r-o.applyWithChunking(Math.max,l)),d&&(t[a]=o.mapValues(c,t=>t+d))})})}function h(t,e){return o.mapValues(t.ul,(n,i)=>{if(e)return t[e.toLowerCase()][i];{let e=Object.values(t).map(t=>t[i]).sort((t,e)=>t-e);return(e[1]+e[2])/2}})}t.exports={positionX:function(t){let e,n=o.buildLayerMatrix(t),i=Object.assign(r(t,n),s(t,n)),a={};["u","d"].forEach(r=>{e="u"===r?n:Object.values(n).reverse(),["l","r"].forEach(n=>{"r"===n&&(e=e.map(t=>Object.values(t).reverse()));let s=("u"===r?t.predecessors:t.successors).bind(t),c=l(0,e,i,s),u=d(t,e,c.root,c.align,"r"===n);"r"===n&&(u=o.mapValues(u,t=>-t)),a[r+n]=u})});let c=u(t,a);return p(a,c),h(a,t.graph().align)},findType1Conflicts:r,findType2Conflicts:s,addConflict:a,hasConflict:c,verticalAlignment:l,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:u,balance:h}},8987:function(t,e,n){"use strict";let i=n(7110),o=n(2829).positionX;t.exports=function(t){(function(t){let e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;e.forEach(e=>{const i=e.reduce((e,n)=>{const i=t.node(n).height;return e>i?e:i},0);e.forEach(e=>t.node(e).y=o+i/2),o+=i+n})})(t=i.asNonCompoundGraph(t)),Object.entries(o(t)).forEach(([e,n])=>t.node(e).x=n)}},6427:function(t,e,n){"use strict";var i=n(7952).Graph,o=n(8267).slack;function r(t,e){return t.nodes().forEach(function n(i){e.nodeEdges(i).forEach(r=>{var s=r.v,a=i===s?r.w:s;!t.hasNode(a)&&!o(e,r)&&(t.setNode(a,{}),t.setEdge(i,a,{}),n(a))})}),t.nodeCount()}function s(t,e){return e.edges().reduce((n,i)=>{let r=Number.POSITIVE_INFINITY;return t.hasNode(i.v)!==t.hasNode(i.w)&&(r=o(e,i)),r<n[0]?[r,i]:n},[Number.POSITIVE_INFINITY,null])[1]}function a(t,e,n){t.nodes().forEach(t=>e.node(t).rank+=n)}t.exports=function(t){var e,n,c=new i({directed:!1}),l=t.nodes()[0],d=t.nodeCount();for(c.setNode(l,{});r(c,t)<d;)e=s(c,t),n=c.hasNode(e.v)?o(t,e):-o(t,e),a(c,t,n);return c}},3816:function(t,e,n){"use strict";var i=n(8267).longestPath,o=n(6427),r=n(5191);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){r(t)}(t);break;case"tight-tree":!function(t){i(t),o(t)}(t);break;case"longest-path":s(t)}};var s=i},5191:function(t,e,n){"use strict";var i=n(6427),o=n(8267).slack,r=n(8267).longestPath,s=n(7952).alg.preorder,a=n(7952).alg.postorder,c=n(7110).simplify;function l(t){t=c(t),r(t);var e,n=i(t);for(p(n),d(n,t);e=g(n);)m(n,t,e,f(n,t,e))}function d(t,e){var n=a(t,t.nodes());(n=n.slice(0,n.length-1)).forEach(n=>function(t,e,n){var i=t.node(n);t.edge(n,i.parent).cutvalue=u(t,e,n)}(t,e,n))}function u(t,e,n){var i=t.node(n).parent,o=!0,r=e.edge(n,i),s=0;return r||(o=!1,r=e.edge(i,n)),s=r.weight,e.nodeEdges(n).forEach(r=>{var a=r.v===n,c=a?r.w:r.v;if(c!==i){var l=a===o,d=e.edge(r).weight;if(s+=l?d:-d,function(t,e,n){return t.hasEdge(e,n)}(t,n,c)){var u=t.edge(n,c).cutvalue;s+=l?-u:u}}}),s}function p(t,e){arguments.length<2&&(e=t.nodes()[0]),h(t,{},1,e)}function h(t,e,n,i,o){var r=n,s=t.node(i);return e[i]=!0,t.neighbors(i).forEach(o=>{Object.hasOwn(e,o)||(n=h(t,e,n,o,i))}),s.low=r,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(t){return t.edges().find(e=>t.edge(e).cutvalue<0)}function f(t,e,n){var i=n.v,r=n.w;e.hasEdge(i,r)||(i=n.w,r=n.v);var s=t.node(i),a=t.node(r),c=s,l=!1;return s.lim>a.lim&&(c=a,l=!0),e.edges().filter(e=>l===v(0,t.node(e.v),c)&&l!==v(0,t.node(e.w),c)).reduce((t,n)=>o(e,n)<o(e,t)?n:t)}function m(t,e,n,i){t.removeEdge(n.v,n.w),t.setEdge(i.v,i.w,{}),p(t),d(t,e),function(t,e){var n=t.nodes().find(t=>!e.node(t).parent),i=s(t,n);(i=i.slice(1)).forEach(n=>{var i=t.node(n).parent,o=e.edge(n,i),r=!1;o||(o=e.edge(i,n),r=!0),e.node(n).rank=e.node(i).rank+(r?o.minlen:-o.minlen)})}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=p,l.initCutValues=d,l.calcCutValue=u,l.leaveEdge=g,l.enterEdge=f,l.exchangeEdges=m},8267:function(t,e,n){"use strict";const{applyWithChunking:i}=n(7110);t.exports={longestPath:function(t){var e={};
1t.sources().forEach(function n(o){var r=t.node(o);if(Object.hasOwn(e,o))return r.rank;e[o]=!0;let s=t.outEdges(o).map(e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen);var a=i(Math.min,s);return a===Number.POSITIVE_INFINITY&&(a=0),r.rank=a})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},7110:function(t,e,n){"use strict";let i=n(7952).Graph;function o(t,e,n,i){let o;do{o=c(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}t.exports={addBorderNode:function(t,e,n,i){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),o(t,"border",r,e)},addDummyNode:o,applyWithChunking:r,asNonCompoundGraph:function(t){let e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach(n=>{t.children(n).length||e.setNode(n,t.node(n))}),t.edges().forEach(n=>{e.setEdge(n,t.edge(n))}),e},buildLayerMatrix:function(t){let e=l(s(t)+1).map(()=>[]);return t.nodes().forEach(n=>{let i=t.node(n),o=i.rank;void 0!==o&&(e[o][i.order]=n)}),e},intersectRect:function(t,e){let n,i,o=t.x,r=t.y,s=e.x-o,a=e.y-r,c=t.width/2,l=t.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(s)*l?(a<0&&(l=-l),n=l*s/a,i=l):(s<0&&(c=-c),n=c,i=c*a/s),{x:o+n,y:r+i}},mapValues:function(t,e){let n=e;return"string"==typeof e&&(n=t=>t[e]),Object.entries(t).reduce((t,[e,i])=>(t[e]=n(i,e),t),{})},maxRank:s,normalizeRanks:function(t){let e=t.nodes().map(e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n}),n=r(Math.min,e);t.nodes().forEach(e=>{let i=t.node(e);Object.hasOwn(i,"rank")&&(i.rank-=n)})},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach(t=>{e(t)?n.lhs.push(t):n.rhs.push(t)}),n},pick:function(t,e){const n={};for(const i of e)void 0!==t[i]&&(n[i]=t[i]);return n},predecessorWeights:function(t){let e=t.nodes().map(e=>{let n={};return t.inEdges(e).forEach(e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return d(t.nodes(),e)},range:l,removeEmptyRanks:function(t){let e=t.nodes().map(e=>t.node(e).rank),n=r(Math.min,e),i=[];t.nodes().forEach(e=>{let o=t.node(e).rank-n;i[o]||(i[o]=[]),i[o].push(e)});let o=0,s=t.graph().nodeRankFactor;Array.from(i).forEach((e,n)=>{void 0===e&&n%s!=0?--o:void 0!==e&&o&&e.forEach(e=>t.node(e).rank+=o)})},simplify:function(t){let e=(new i).setGraph(t.graph());return t.nodes().forEach(n=>
1e.setNode(n,t.node(n))),t.edges().forEach(n=>{let i=e.edge(n.v,n.w)||{weight:0,minlen:1},o=t.edge(n);e.setEdge(n.v,n.w,{weight:i.weight+o.weight,minlen:Math.max(i.minlen,o.minlen)})}),e},successorWeights:function(t){let e=t.nodes().map(e=>{let n={};return t.outEdges(e).forEach(e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return d(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:c,zipObject:d};function r(t,e){if(e.length>65535){const n=function(t,e=65535){const n=[];for(let i=0;i<t.length;i+=e){const o=t.slice(i,i+e);n.push(o)}return n}(e);return t.apply(null,n.map(e=>t.apply(null,e)))}return t.apply(null,e)}function s(t){const e=t.nodes().map(e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n});return r(Math.max,e)}let a=0;function c(t){var e=++a;return toString(t)+e}function l(t,e,n=1){null==e&&(e=t,t=0);let i=t=>t<e;n<0&&(i=t=>e<t);const o=[];for(let r=t;i(r);r+=n)o.push(r);return o}function d(t,e){return t.reduce((t,n,i)=>(t[n]=e[i],t),{})}},6765:function(t){t.exports="1.1.4"},7952:function(t,e,n){var i=n(7101);t.exports={Graph:i.Graph,json:n(7143),alg:n(1862),version:i.version}},3980:function(t){t.exports=function(t){var e,n={},i=[];function o(i){Object.hasOwn(n,i)||(n[i]=!0,e.push(i),t.successors(i).forEach(o),t.predecessors(i).forEach(o))}return t.nodes().forEach(function(t){e=[],o(t),e.length&&i.push(e)}),i}},1162:function(t){function e(t,e,n,o){for(var r=[[t,!1]];r.length>0;){var s=r.pop();s[1]?o.push(s[0]):Object.hasOwn(n,s[0])||(n[s[0]]=!0,r.push([s[0],!0]),i(e(s[0]),t=>r.push([t,!1])))}}function n(t,e,n,o){for(var r=[t];r.length>0;){var s=r.pop();Object.hasOwn(n,s)||(n[s]=!0,o.push(s),i(e(s),t=>r.push(t)))}}function i(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}t.exports=function(t,i,o){Array.isArray(i)||(i=[i]);var r=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),s="post"===o?e:n,a=[],c={};return i.forEach(e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);s(e,r,c,a)}),a}},1224:function(t,e,n){var i=n(7982);t.exports=function(t,e,n){return t.nodes().reduce(function(o,r){return o[r]=i(t,r,e,n),o},{})}},7982:function(t,e,n){var i=n(9380);t.exports=function(t,e,n,r){return function(t,e,n,o){var r,s,a={},c=new i,l=function(t){var e=t.v!==r?t.v:t.w,i=a[e],o=n(t),l=s.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+o);l<i.distance&&(i.distance=l,i.predecessor=r,c.decrease(e,l))};for(t.nodes().forEach(function(t){var n=t===e?0:Number.POSITIVE_INFINITY;a[t]={distance:n},c.add(t,n)});c.size()>0&&(r=c.removeMin(),(s=a[r]).distance!==Number.POSITIVE_INFINITY);)o(r).forEach(l);return a}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=()=>1},9905:function(t,e,n){var i=n(4357);t.exports=function(t){return i(t).filter(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}},6571:function(t){t.exports=function(t,n,i){return function(t,e,n){var i={},o=t.nodes();return o.forEach(function(t){i[t]={},i[t][t]={distance:0},o.forEach(function(e){t!==e&&(i[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var o=n.v===t?n.w:n.v,r=e(n);i[t][o]={distance:r,predecessor:t}})}),o.forEach(function(t){var e=i[t];o.forEach(function(n){var r=i[n];o.forEach(function(n){var i=e[n],o=r[n],s=r[t].distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),i}(t,n||e,i||function(e){return t.outEdges(e)})};var e=()=>1},1862:function(t,e,n){t.exports={components:n(3980),dijkstra:n(7982),dijkstraAll:n(1224),findCycles:n(9905),floydWarshall:n(6571),isAcyclic:n(5760),postorder:n(502),preorder:n(2499),prim:n(8472),tarjan:n(4357),topsort:n(6594)}},5760:function(t,e,n){var i=n(6594);t.exports=function(t){try{i(t)}catch(e){if(e instanceof i.CycleException)return!1;throw e}return!0}},502:function(t,e,n){var i=n(1162);t.exports=function(t,e){return i(t,e,"post")}},2499:function(t,e,n){var i=n(1162);t.exports=function(t,e){return i(t,e,"pre")}},8472:function(t,e,n){var i=n(886),o=n(9380);t.exports=function(t,e){var n,r=new i,s={},a=new o;function c(t){var i=t.v===n?t.w:t.v,o=a.priority(i);if(void 0!==o){var r=e(t);r<o&&(s[i]=n,a.decrease(i,r))}}if(0===t.nodeCount())return r;
1t.nodes().forEach(function(t){a.add(t,Number.POSITIVE_INFINITY),r.setNode(t)}),a.decrease(t.nodes()[0],0);for(var l=!1;a.size()>0;){if(n=a.removeMin(),Object.hasOwn(s,n))r.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(c)}return r}},4357:function(t){t.exports=function(t){var e=0,n=[],i={},o=[];function r(s){var a=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach(function(t){Object.hasOwn(i,t)?i[t].onStack&&(a.lowlink=Math.min(a.lowlink,i[t].index)):(r(t),a.lowlink=Math.min(a.lowlink,i[t].lowlink))}),a.lowlink===a.index){var c,l=[];do{c=n.pop(),i[c].onStack=!1,l.push(c)}while(s!==c);o.push(l)}}return t.nodes().forEach(function(t){Object.hasOwn(i,t)||r(t)}),o}},6594:function(t){function e(t){var e={},i={},o=[];if(t.sinks().forEach(function r(s){if(Object.hasOwn(i,s))throw new n;Object.hasOwn(e,s)||(i[s]=!0,e[s]=!0,t.predecessors(s).forEach(r),delete i[s],o.push(s))}),Object.keys(e).length!==t.nodeCount())throw new n;return o}class n extends Error{constructor(){super(...arguments)}}t.exports=e,e.CycleException=n},9380:function(t){t.exports=class{constructor(){Oi(this,"_arr",[]),Oi(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!Object.hasOwn(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)}_heapify(t){var e=this._arr,n=2*t,i=n+1,o=t;n<e.length&&(o=e[n].priority<e[o].priority?n:o,i<e.length&&(o=e[i].priority<e[o].priority?i:o),o!==t&&(this._swap(t,o),this._heapify(o)
1))}_decrease(t){for(var e,n=this._arr,i=n[t].priority;0!==t&&!(n[e=t>>1].priority<i);)this._swap(t,e),t=e}_swap(t,e){var n=this._arr,i=this._keyIndices,o=n[t],r=n[e];n[t]=r,n[e]=o,i[r.key]=t,i[o.key]=e}}},886:function(t){"use strict";var e="\0";function n(t,e){t[e]?t[e]++:t[e]=1}function i(t,e){--t[e]||delete t[e]}function o(t,e,n,i){var o=""+e,r=""+n;if(!t&&o>r){var s=o;o=r,r=s}return o+"\x01"+r+"\x01"+(void 0===i?"\0":i)}function r(t,e){return o(t,e.v,e.w,e.name)}t.exports=class{constructor(t){Oi(this,"_isDirected",!0),Oi(this,"_isMultigraph",!1),Oi(this,"_isCompound",!1),Oi(this,"_label"),Oi(this,"_defaultNodeLabelFn",()=>{}),Oi(this,"_defaultEdgeLabelFn",()=>{}),Oi(this,"_nodes",{}),Oi(this,"_in",{}),Oi(this,"_preds",{}),Oi(this,"_out",{}),Oi(this,"_sucs",{}),Oi(this,"_edgeObjs",{}),Oi(this,"_edgeLabels",{}),Oi(this,"_nodeCount",0),Oi(this,"_edgeCount",0),Oi(this,"_parent"),Oi(this,"_children"),t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&
1(this._parent={},this._children={},this._children[e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(e=>0===Object.keys(t._in[e]).length)}sinks(){var t=this;return this.nodes().filter(e=>0===Object.keys(t._out[e]).length)}setNodes(t,e){var n=arguments,i=this;return t.forEach(function(t){n.length>1?i.setNode(t,e):i.setNode(t)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=e,this._children[t]={},this._children[e][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var e=this;if(Object.hasOwn(this._nodes,t)){var n=t=>e.removeEdge(e._edgeObjs[t]);
1delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(t){e.setParent(t)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===n)n=e;else{for(var i=n+="";void 0!==i;i=this.parent(i))if(i===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==e)return n}}children(t=e){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===e)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const i=new Set(e);for(var n of this.successors(t))i.add(n);return Array.from(i.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,i]){t(n)&&e.setNode(n,i)}),Object.values(this._edgeObjs).forEach(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))});var i={};function o(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:o(r)}return this._isCompound&&e.nodes().forEach(t=>e.setParent(t,o(t))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,i=arguments;return t.reduce(function(t,o){return i.length>1?n.setEdge(t,o,e):n.setEdge(t,o),o}),this}setEdge(){var t,e,i,r,s=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,i=a.name,2===arguments.length&&(r=arguments[1],s=!0)):(t=a,e=arguments[1],i=arguments[3],arguments.length>2&&(r=arguments[2],s=!0)),void 0!==i&&(i=""+i);var c=o(this._isDirected,t=""+t,e=""+e,i);if(Object.hasOwn(this._edgeLabels,c))return s&&(this._edgeLabels[c]=r),this;if(void 0!==i&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=s?r:this._defaultEdgeLabelFn(t,e,i);var l=function(t,e,n,i){var o=""+e,r=""+n;if(!t&&o>r){var s=o;o=r,r=s}var a={v:o,w:r};return i&&(a.name=i),a}(this._isDirected,t,e,i);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,n(this._preds[e],t),n(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this}edge(t,e,n){var i=1===arguments.length?r(this._isDirected,arguments[0]):o(this._isDirected,t,e,n);return this._edgeLabels[i]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var i=1===arguments.length?r(this._isDirected,arguments[0]):o(this._isDirected,t,e,n);return Object.hasOwn(this._edgeLabels,i)}removeEdge(t,e,n){var s=1===arguments.length?r(this._isDirected,arguments[0]):o(this._isDirected,t,e,n),a=this._edgeObjs[s];return a&&(t=a.v,e=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var i=Object.values(n);return e?i.filter(t=>t.v===e):i}}outEdges(t,e){var n=this._out[t];if(n){var i=Object.values(n);return e?i.filter(t=>t.w===e):i}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}},7101:function(t,e,n){t.exports={Graph:n(886),version:n(6735)}},7143:function(t,e,n){var i=n(886);function o(t){return t.nodes().map(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return void 0!==n&&(o.value=n),void 0!==i&&(o.parent=i),o})}function r(t){return t.edges().map(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return void 0!==e.name&&(i.name=e.name),void 0!==n&&(i.value=n),i})}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:r(t)};return void 0!==t.graph()&&(e.value=structuredClone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);
1return t.nodes.forEach(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),t.edges.forEach(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}}},6735:function(t){t.exports="2.2.4"},4342:function(t,e,n){"use strict";n.d(e,{J:function(){return i}});const i="production"},6702:function(t,e,n){"use strict";n.d(e,{X:function(){return i}});const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},3212:function(t,e,n){"use strict";n.d(e,{cc:function(){return l},fH:function(){return c},RP:function(){return d}});var i=n(7769),o=n(4824),r=n(6150),s=n(7821),a=n(6702);function c(){return(0,i.YO)("globalEventProcessors",()=>[])}function l(t){c().push(t)}function d(t,e,n,i=0){return new o.cW((o,c)=>{const l=t[i];if(null===e||"function"!=typeof l)o(e);else{const u=l(ht({},e),n);a.X&&l.id&&null===u&&r.kg.log(`Event processor "${l.id}" dropped event`),(0,s.J8)(u)?u.then(e=>d(t,e,n,i+1).then(o)).then(null,c):d(t,u,n,i+1).then(o).then(null,c)}})}},766:function(t,e,n){"use strict";n.d(e,{n_:function(){return d},eN:function(){return l},Tb:function(){return c},cg:function(){return b},s3:function(){return h},nZ:function(){return g},v:function(){return u},yj:function(){return f},$e:function(){return p}});var i=n(7769),o=n(4342),r=n(468),s=n(2936),a=n(6562);function c(t,e){return(0,r.Gd)().captureException(t,(0,a.U0)(e))}function l(t,e){return(0,r.Gd)().captureEvent(t,e)}function d(t,e){(0,r.Gd)().addBreadcrumb(t,e)}function u(t,e){(0,r.Gd)().setContext(t,e)}function p(...t){const e=(0,r.Gd)();if(2===t.length){const[n,i]=t;return e.withScope(n?()=>(e.getStackTop().scope=n,i(n)):i)}return e.withScope(t[0])}function h(){return(0,r.Gd)().getClient()}function g(){return(0,r.Gd)().getScope()}function f(t){const e=h(),n=(0,r.aF)(),a=g(),{release:c,environment:l=o.J}=e&&e.getOptions()||{},{userAgent:d}=i.n2.navigator||{},u=(0,s.Hv)(ht(ht({release:c,environment:l,user:a.getUser()||n.getUser()},d&&{userAgent:d}),t)),p=n.getSession();return p&&"ok"===p.status&&(0,s.CT)(p,{status:"exited"}),m(),n.setSession(u),a.setSession(u),u}function m(){const t=(0,r.aF)(),e=g(),n=e.getSession()||t.getSession();n&&(0,s.RJ)(n),v(),t.setSession(),e.setSession()}function v(){const t=(0,r.aF)(),e=g(),n=h(),i=e.getSession()||t.getSession();i&&n&&n.captureSession&&n.captureSession(i)}function b(t=!1){t?m():v()}},468:function(t,e,n){"use strict";n.d(e,{Gd:function(){return b},aF:function(){return x},cu:function(){return m}});var i=n(7821),o=n(4799),r=n(7135),s=n(6150),a=n(7769),c=n(4342),l=n(6702),d=n(4541),u=n(2936),p=n(6220);const h=parseFloat(p.J),g=100;class f{constructor(t,e,n,i=h){let o,r;this._version=i,e?o=e:(o=new d.sX,o.setClient(t)),n?r=n:(r=new d.sX,r.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=r}isOlderThan(t){return this._version<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(o){throw this.popScope(),o}return(0,i.J8)(n)?n.then(t=>(this.popScope(),t),t=>{throw this.popScope(),t}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:(0,o.DM)(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,Ji(ht({originalException:t,syntheticException:i},e),{event_id:n})),n}captureMessage(t,e,n){const i=this._lastEventId=n&&n.event_id?n.event_id:(0,o.DM)(),r=new Error(t);return this.getScope().captureMessage(t,e,Ji(ht({originalException:t,syntheticException:r},n),{event_id:i})),i}captureEvent(t,e){const n=e&&e.event_id?e.event_id:(0,o.DM)();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,Ji(ht({},e),{event_id:n})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:a=g}=i.getOptions&&i.getOptions()||{};if(a<=0)return;const c=(0,r.yW)(),l=ht({timestamp:c},t),d=o?(0,s.Cf)(()=>o(l,e)):l;null!==d&&(i.emit&&i.emit("beforeAddBreadcrumb",d,e),n.addBreadcrumb(d,a))}
1setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=v(this);try{t(this)}finally{v(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(n){return l.X&&s.kg.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return l.X&&!n&&(this.getClient()?s.kg.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):s.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&(0,u.RJ)(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:i,environment:o=c.J}=n&&n.getOptions()||{},{userAgent:r}=a.n2.navigator||{},s=(0,u.Hv)(ht(ht({release:i,environment:o,user:e.getUser()},r&&{userAgent:r}),t)),l=e.getSession&&e.getSession();return l&&"ok"===l.status&&(0,u.CT)(l,{status:"exited"}),this.endSession(),e.setSession(s),s}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=m().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);l.X&&s.kg.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function m(){return a.n2.__SENTRY__=a.n2.__SENTRY__||{extensions:{},hub:void 0},a.n2}function v(t){const e=m(),n=_(e);return C(e,t),n}function b(){const t=m();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=m()){return(!function(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}(t)||_(t).isOlderThan(h))&&C(t,new f),_(t)}(t)}function x(){return b().getIsolationScope()}function _(t){return(0,a.YO)("hub",()=>new f,t)}function C(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}},4541:function(t,e,n){"use strict";n.d(e,{sX:function(){return u},lW:function(){return p}});var i=n(7821),o=n(7135),r=n(4799),s=n(6150),a=n(3212),c=n(2936),l=n(7667);let d;class u{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=h()}static clone(t){return t?t.clone():new u}clone(){const t=new u;return t._breadcrumbs=[...this._breadcrumbs],t._tags=ht({},this._tags),t._extra=ht({},this._extra),t._contexts=ht({},this._contexts),t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=ht({},this._sdkProcessingMetadata),t._propagationContext=ht({},this._propagationContext),t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&(0,c.CT)(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=ht(ht({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,e){return this._tags=Ji(ht({},this._tags),{[t]:e}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=ht(ht({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,e){return this._extra=Ji(ht({},this._extra),{[t]:e}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const e="function"==typeof t?t(this):t;if(e instanceof u){const t=e.getScopeData();this._tags=ht(ht({},this._tags),t.tags),this._extra=ht(ht({},this._extra),t.extra),this._contexts=ht(ht({},this._contexts),t.contexts),t.user&&Object.keys(t.user).length&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint.length&&(this._fingerprint=t.fingerprint),e.getRequestSession()&&(this._requestSession=e.getRequestSession()),t.propagationContext&&(this._propagationContext=t.propagationContext)}else if((0,i.PO)(e)){const e=t;this._tags=ht(ht({},this._tags),e.tags),this._extra=ht(ht({},this._extra),e.extra),this._contexts=ht(ht({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=h(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const i=ht({timestamp:(0,o.yW)()},t),r=this._breadcrumbs;return r.push(i),this._breadcrumbs=r.length>n?r.slice(-n):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}
1getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:i,_extra:o,_user:r,_level:s,_fingerprint:a,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:u,_span:p}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:i,extra:o,user:r,level:s,fingerprint:a||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:d,transactionName:u,span:p}}applyToEvent(t,e={},n=[]){(0,l.gi)(t,this.getScopeData());const i=[...n,...(0,a.fH)(),...this._eventProcessors];return(0,a.RP)(i,t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=ht(ht({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:(0,r.DM)();if(!this._client)return s.kg.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,Ji(ht({originalException:t,syntheticException:i},e),{event_id:n}),this),n}captureMessage(t,e,n){const i=n&&n.event_id?n.event_id:(0,r.DM)();if(!this._client)return s.kg.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,e,Ji(ht({originalException:t,syntheticException:o},n),{event_id:i}),this),i}captureEvent(t,e){const n=e&&e.event_id?e.event_id:(0,r.DM)();return this._client?(this._client.captureEvent(t,Ji(ht({},e),{event_id:n}),this),n):(s.kg.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function p(){return d||(d=new u),d}function h(){return{traceId:(0,r.DM)(),spanId:(0,r.DM)().substring(16)}}},2936:function(t,e,n){"use strict";n.d(e,{RJ:function(){return c},Hv:function(){return s},CT:function(){return a}});var i=n(7135),o=n(4799),r=n(5953);function s(t){const e=(0,i.ph)(),n={sid:(0,o.DM)(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return(0,r.Jr)({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&a(n,t),n}function a(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||(0,i.ph)(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:(0,o.DM)()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function c(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),a(t,n)}},8523:function(t,e,n){"use strict";n.d(e,{_:function(){return c},j:function(){return l}});var i=n(5953),o=n(4342),r=n(766),s=n(9225),a=n(1825);function c(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:a}=n&&n.getUser()||{},c=(0,i.Jr)({environment:r.environment||o.J,release:r.release,user_segment:a,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",c),c}function l(t){const e=(0,r.s3)();if(!e)return{};const n=c((0,a.XU)(t).trace_id||"",e,(0,r.nZ)()),i=(0,s.G)(t);if(!i)return n;const o=i&&i._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:l,source:d}=i.metadata;null!=l&&(n.sample_rate=`${l}`);const u=(0,a.XU)(i);return d&&"url"!==d&&(n.transaction=u.description),n.sampled=String((0,a.Tt)(i)),e.emit&&e.emit("createDsc",n),n}},7667:function(t,e,n){"use strict";n.d(e,{gi:function(){return c},yo:function(){return l}});var i=n(5953),o=n(4799),r=n(8523),s=n(9225),a=n(1825);function c(t,e){const{fingerprint:n,span:c,breadcrumbs:l,sdkProcessingMetadata:d}=e;(function(t,e){const{extra:n,tags:o,user:r,contexts:s,level:a,transactionName:c}=e,l=(0,i.Jr)(n);l&&Object.keys(l).length&&(t.extra=ht(ht({},l),t.extra));const d=(0,i.Jr)(o);d&&Object.keys(d).length&&(t.tags=ht(ht({},d),t.tags));const u=(0,i.Jr)(r);u&&Object.keys(u).length&&(t.user=ht(ht({},u),t.user));const p=(0,i.Jr)(s);p&&Object.keys(p).length&&(t.contexts=ht(ht({},p),t.contexts)),a&&(t.level=a),c&&(t.transaction=c)})(t,e),c&&function(t,e){t.contexts=ht({trace:(0,a.wy)(e)},t.contexts);const n=(0,s.G)(e);if(n){t.sdkProcessingMetadata=ht({dynamicSamplingContext:(0,r.j)(e)},t.sdkProcessingMetadata);const i=(0,a.XU)(n).description;i&&(t.tags=ht({transaction:i},t.tags))}}(t,c),function(t,e){t.fingerprint=t.fingerprint?(0,o.lE)(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,l),function(t,e){t.sdkProcessingMetadata=ht(ht({},t.sdkProcessingMetadata),e)}(t,d)}function l(t,e){const{extra:n,tags:i,user:o,contexts:r,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:p,propagationContext:h,transactionName:g,span:f}=e;d(t,"extra",n),d(t,"tags",i),d(t,"user",o),d(t,"contexts",r),d(t,"sdkProcessingMetadata",a),s&&(t.level=s),g&&(t.transactionName=g),f&&(t.span=f),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),l.length&&(t.fingerprint=[...t.fingerprint,...l]),u.length&&(t.eventProcessors=[...t.eventProcessors,...u]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext=ht(ht({},t.propagationContext),h)}function d(t,e,n){if(n&&Object.keys(n).length){t[e]=ht({},t[e]);for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[e][i]=n[i])}}},9225:function(t,e,n){"use strict";function i(t){return t.transaction}n.d(e,{G:function(){return i}})},6562:function(t,e,n){"use strict";n.d(e,{U0:function(){return f},R:function(){return h}});var i=n(4799),o=n(7135),r=n(4635),s=n(7769),a=n(2060),c=n(4342),l=n(3212),d=n(4541),u=n(7667),p=n(1825);
1function h(t,e,n,h,f,m){const{normalizeDepth:v=3,normalizeMaxBreadth:b=1e3}=t,x=Ji(ht({},e),{event_id:e.event_id||n.event_id||(0,i.DM)(),timestamp:e.timestamp||(0,o.yW)()}),_=n.integrations||t.integrations.map(t=>t.name);(function(t,e){const{environment:n,release:i,dist:o,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:c.J),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==o&&(t.dist=o),t.message&&(t.message=(0,r.$G)(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=(0,r.$G)(a.value,s));const l=t.request;l&&l.url&&(l.url=(0,r.$G)(l.url,s))})(x,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(x,_),void 0===e.type&&function(t,e){const n=s.n2._sentryDebugIds;if(!n)return;let i;const o=g.get(e);o?i=o:(i=new Map,g.set(e,i));const r=Object.keys(n).reduce((t,o)=>{let r;const s=i.get(o);s?r=s:(r=e(o),i.set(o,r));for(let e=r.length-1;e>=0;e--){const i=r[e];if(i.filename){t[i.filename]=n[o];break}}return t},{});try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}catch(v){}}(x,t.stackParser);const C=function(t,e){if(!e)return t;const n=t?t.clone():new d.sX;return n.update(e),n}(h,n.captureContext);n.mechanism&&(0,i.EG)(x,n.mechanism);const w=f&&f.getEventProcessors?f.getEventProcessors():[],y=(0,d.lW)().getScopeData();if(m){const t=m.getScopeData();(0,u.yo)(y,t)}if(C){const t=C.getScopeData();(0,u.yo)(y,t)}const A=[...n.attachments||[],...y.attachments];A.length&&(n.attachments=A),(0,u.gi)(x,y);const Z=[...w,...(0,l.fH)(),...y.eventProcessors];return(0,l.RP)(Z,x,n).then(t=>(t&&function(t){const e={};try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})})}catch(h){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})})}(t),"number"==typeof v&&v>0?function(t,e,n){if(!t)return null;const i=ht(ht(ht(ht(ht({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>ht(ht({},t),t.data&&{data:(0,a.Fv)(t.data,e,n)}))}),t.user&&{user:(0,a.Fv)(t.user,e,n)}),t.contexts&&{contexts:(0,a.Fv)(t.contexts,e,n)}),t.extra&&{extra:(0,a.Fv)(t.extra,e,n)});return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=(0,a.Fv)(t.contexts.trace.data,e,n))),t.spans&&(i.spans=t.spans.map(t=>{const i=(0,p.XU)(t).data;return i&&(t.data=(0,a.Fv)(i,e,n)),t})),i}(t,v,b):t))}const g=new WeakMap;function f(t){if(t)return function(t){return t instanceof d.sX||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>m.includes(t))}(t)?{captureContext:t}:t}const m=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},1825:function(t,e,n){"use strict";n.d(e,{ve:function(){return s},i0:function(){return a},Tt:function(){return h},$k:function(){return d},XU:function(){return p},wy:function(){return c},Hb:function(){return l}});var i=n(5953),o=n(4652),r=n(7135);const s=0,a=1;function c(t){const{spanId:e,traceId:n}=t.spanContext(),{data:o,op:r,parent_span_id:s,status:a,tags:c,origin:l}=p(t);return(0,i.Jr)({data:o,op:r,parent_span_id:s,span_id:e,status:a,tags:c,trace_id:n,origin:l})}function l(t){const{traceId:e,spanId:n}=t.spanContext(),i=h(t);return(0,o.$p)(e,n,i)}function d(t){return"number"==typeof t?u(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?u(t.getTime()):(0,r.ph)()}function u(t){return t>9999999999?t/1e3:t}function p(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function h(t){const{traceFlags:e}=t.spanContext();return Boolean(e&a)}},6220:function(t,e,n){"use strict";n.d(e,{J:function(){return i}});const i="7.120.0"},622:function(t,e,n){"use strict";n.d(e,{bU:function(){return s},EN:function(){return l},IQ:function(){return d}});var i=n(3024),o=n(7821),r=n(6150);const s="baggage",a="sentry-",c=/^sentry-/;function l(t){if(!(0,o.HD)(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>{const n=u(e);for(const i of Object.keys(n))t[i]=n[i];return t},{});else{if(!t)return;e=u(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(c)&&(t[e.slice(a.length)]=n),t),{});return Object.keys(n).length>0?n:void 0}function d(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],o)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,a=0===o?s:`${t},${s}`;return a.length>8192?(i.X&&r.kg.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):a},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${a}${e}`]=n),t),{}))}function u(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}},4711:function(t,e,n){"use strict";n.d(e,{iY:function(){return l},qT:function(){return c},l4:function(){return a},Rt:function(){return r}});var i=n(7821);const o=(0,n(7769).Rf)();function r(t,e={}){if(!t)return"<unknown>";try{let n=t;const i=5,o=[];let r=0,a=0;const c=" > ",l=c.length;let d;const u=Array.isArray(e)?e:e.keyAttrs,p=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&r++<i&&(d=s(n,u),!("html"===d||r>1&&a+o.length*l+d.length>=p));)o.push(d),a+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(n){return"<unknown>"}}function s(t,e){const n=t,r=[];let s,a,c,l,d;if(!n||!n.tagName)return"";if(o.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(u&&u.length)u.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&(0,i.HD)(s))for(a=s.split(/\s+/),d=0;d<a.length;d++)r.push(`.${a[d]}`);const p=["aria-label","type","name","title","alt"];for(d=0;d<p.length;d++)c=p[d],l=n.getAttribute(c),l&&r.push(`[${c}="${l}"]`);return r.join("")}function a(){try{return o.document.location.href}catch(t){return""}}function c(t){return o.document&&o.document.querySelector?o.document.querySelector(t):null}function l(t){if(!o.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}},3024:function(t,e,n){"use strict";n.d(e,{X:function(){return i}});const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},7821:function(t,e,n){"use strict";n.d(e,{TX:function(){return a},fm:function(){return c},kK:function(){return g},VZ:function(){return o},VW:function(){return s},cO:function(){return h},V9:function(){return x},i2:function(){return b},Le:function(){return d},PO:function(){return p},pt:function(){return u},Kj:function(){return f},HD:function(){return l},Cy:function(){return v},J8:function(){return m},y1:function(){return _}});const i=Object.prototype.toString;function o(t){switch(i.call(t)){case"[object Error]":case"[object E
1xception]":case"[object DOMException]":return!0;default:return x(t,Error)}}function r(t,e){return i.call(t)===`[object ${e}]`}function s(t){return r(t,"ErrorEvent")}function a(t){return r(t,"DOMError")}function c(t){return r(t,"DOMException")}function l(t){return r(t,"String")}function d(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function u(t){return null===t||d(t)||"object"!=typeof t&&"function"!=typeof t}function p(t){return r(t,"Object")}function h(t){return"undefined"!=typeof Event&&x(t,Event)}function g(t){return"undefined"!=typeof Element&&x(t,Element)}function f(t){return r(t,"RegExp")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function v(t){return p(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function b(t){return"number"==typeof t&&t!=t}function x(t,e){try{return t instanceof e}catch(n){return!1}}function _(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}},6150:function(t,e,n){"use strict";n.d(e,{RU:function(){return r},Cf:function(){return a},kg:function(){return c},LD:function(){return s}});var i=n(3024),o=n(7769);const r=["debug","info","warn","error","log","assert","trace"],s={};function a(t){if(!("console"in o.n2))return t();const e=o.n2.console,n={},i=Object.keys(s);i.forEach(t=>{const i=s[t];n[t]=e[t],e[t]=i});try{return t()}finally{i.forEach(t=>{e[t]=n[t]})}}const c=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return r.forEach(i.X?n=>{e[n]=(...e)=>{t&&a(()=>{o.n2.console[n](`Sentry Logger [${n}]:`,...e)})}}:t=>{e[t]=()=>{}}),e}()},4799:function(t,e,n){"use strict";n.d(e,{EG:function(){return l},Db:function(){return c},lE:function(){return u},YO:function(){return d},jH:function(){return a},DM:function(){return r}});var i=n(5953),o=n(7769);function r(){const t=o.n2,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(i){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&n())>>t/4).toString(16))}function s(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function a(t){const{message:e,event_id:n}=t;if(e)return e;const i=s(t);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function c(t,e,n){const i=t.exception=t.exception||{},o=i.values=i.values||[],r=o[0]=o[0]||{};r.value||(r.value=e||""),r.type||(r.type=n||"Error")}function l(t,e){const n=s(t);if(!n)return;const i=n.mechanism;if(n.mechanism=ht(ht(ht({},{type:"generic",handled:!0}),i),e),e&&"data"in e){const t=ht(ht({},i&&i.data),e.data);n.mechanism.data=t}}function d(t){if(t&&t.__sentry_captured__)return!0;try{(0,i.xp)(t,"__sentry_captured__",!0)}catch(e){}return!1}function u(t){return Array.isArray(t)?t:[t]}},2060:function(t,e,n){"use strict";n.d(e,{Fv:function(){return s},Qy:function(){return a}});var i=n(7821),o=n(5953),r=n(4717);function s(t,e=100,n=1/0){try{return c("",t,e,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function a(t,e=3,n=102400){const i=s(t,e);return function(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}(i)>n?a(t,e-1,n):i}function c(t,e,n=1/0,s=1/0,a=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[l,d]=a;if(null==e||["number","boolean","string"].includes(typeof e)&&!(0,i.i2)(e))return e;const u=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if((0,i.y1)(e))return"[VueViewModel]";if((0,i.Cy)(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${(0,r.$P)(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const n=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}(t,e);if(!u.startsWith("[object "))return u;if(e.__sentry_skip_normalization__)return e;const p="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===p)return u.replace("object ","");if(l(e))return"[Circular ~]";const h=e;if(h&&"function"==typeof h.toJSON)try{return c("",h.toJSON(),p-1,s,a)}catch(v){}const g=Array.isArray(e)?[]:{};let f=0;const m=(0,o.Sh)(e);for(const i in m)if(Object.prototype.hasOwnProperty.call(m,i)){if(f>=s){g[i]="[MaxProperties ~]";break}g[i]=c(i,m[i],p-1,s,a),f++}return d(e),g}},5953:function(t,e,n){"use strict";n.d(e,{xp:function(){return l},Sh:function(){return h},Jr:function(){return v},zf:function(){return m},hl:function(){return c},HK:function(){return u},$Q:function(){return d},_j:function(){return p}});var i=n(4711),o=n(3024),r=n(7821),s=n(6150),a=n(4635);function c(t,e,n){if(!(e in t))return;const i=t[e],o=n(i);"function"==typeof o&&d(o,i),t[e]=o}function l(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(i){o.X&&s.kg.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function d(t,e){try{t.prototype=e.prototype=e.prototype||{},l(t,"__sentry_original__",e)}catch(n){}}function u(t){return t.__sentry_original__}function p(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function h(t){if((0,r.VZ)(t))return ht({message:t.message,name:t.name,stack:t.stack},f(t));if((0,r.cO)(t)){const e=ht({type:t.type,target:g(t.target),currentTarget:g(t.currentTarget)},f(t));return"undefined"!=typeof CustomEvent&&(0,r.V9)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function g(t){try{return(0,r.kK)(t)?(0,i.Rt)(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function f(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function m(t,e=40){const n=Object.keys(h(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return(0,a.$G)(n[0],e);for(let i=n.length;i>0;i--){const t=n.slice(0,i).join(", ");
1if(!(t.length>e))return i===n.length?t:(0,a.$G)(t,e)}return""}function v(t){return b(t,new Map)}function b(t,e){if(function(t){if(!(0,r.PO)(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(e){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const i={};e.set(t,i);for(const o of Object.keys(t))void 0!==t[o]&&(i[o]=b(t[o],e));return i}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const i=[];return e.set(t,i),t.forEach(t=>{i.push(b(t,e))}),i}return t}},4717:function(t,e,n){"use strict";n.d(e,{pE:function(){return r},$P:function(){return c},Sq:function(){return s}});const i=/\(error: (.*)\)/,o=/captureMessage|captureException/;function r(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],s=t.split("\n");for(let o=n;o<s.length;o++){const t=s[o];if(t.length>1024)continue;const n=i.test(t)?t.replace(i,"$1"):t;if(!n.match(/\S*Error: /)){for(const t of e){const e=t(n);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),o.test(e[e.length-1].function||"")&&(e.pop(),o.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,50).map(t=>Ji(ht({},t),{filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}function s(t){return Array.isArray(t)?r(...t):t}const a="<anonymous>";function c(t){try{return t&&"function"==typeof t&&t.name||a}catch(e){return a}}},4635:function(t,e,n){"use strict";n.d(e,{nK:function(){return r},U0:function(){return s},$G:function(){return o}});var i=n(7821);function o(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function r(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const e=t[r];try{(0,i.y1)(e)?n.push("[VueViewModel]"):n.push(String(e))}catch(o){n.push("[value cannot be serialized]")}}return n.join(e)}function s(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!(0,i.HD)(t)&&((0,i.Kj)(e)?e.test(t):!!(0,i.HD)(e)&&(n?t===e:t.includes(e)))}(t,e,n))}},4824:function(t,e,n){"use strict";n.d(e,{cW:function(){return c},$2:function(){return a},WD:function(){return s}});var i,o,r=n(7821);function s(t){return new c(e=>{e(t)})}function a(t){return new c((e,n)=>{n(t)})}(o=i||(i={}))[o.PENDING=0]="PENDING",o[o.RESOLVED=1]="RESOLVED",o[o.REJECTED=2]="REJECTED";class c{constructor(t){c.prototype.__init.call(this),c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),this._state=i.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,e){return new c((n,i)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(o){i(o)}else n(e)},t=>{if(e)try{n(e(t))}catch(o){i(o)}else i(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new c((e,n)=>{let i,o;return this.then(e=>{o=!1,i=e,t&&t()},e=>{o=!0,i=e,t&&t()}).then(()=>{o?n(i):e(i)})})}__init(){this._resolve=t=>{this._setResult(i.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(i.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{if(this._state===i.PENDING){if((0,r.J8)(e))return void e.then(this._resolve,this._reject);this._state=t,this._value=e,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===i.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===i.RESOLVED&&t[1](this._value),this._state===i.REJECTED&&t[2](this._value),t[0]=!0)})}}}},7135:function(t,e,n){"use strict";n.d(e,{Z1:function(){return a},yW:function(){return o},ph:function(){return r}});var i=n(7769);function o(){return Date.now()/1e3}const r=function(){const{performance:t}=i.n2;if(!t||!t.now)return o;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/1e3}();let s;const a=(()=>{const{performance:t}=i.n2;if(!t||!t.now)return void(s="none");const e=36e5,n=t.now(),o=Date.now(),r=t.timeOrigin?Math.abs(t.timeOrigin+n-o):e,a=r<e,c=t.timing&&t.timing.navigationStart,l="number"==typeof c?Math.abs(c+n-o):e;return a||l<e?r<=l?(s="timeOrigin",t.timeOrigin):(s="navigationStart",c):(s="dateNow",o)})()},4652:function(t,e,n){"use strict";n.d(e,{$p:function(){return a},pT:function(){return s}});var i=n(622),o=n(4799);const r=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function s(t,e){const n=function(t){if(!t)return;const e=t.match(r);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),s=(0,i.EN)(e),{traceId:a,parentSpanId:c,parentSampled:l}=n||{};return n?{traceId:a||(0,o.DM)(),parentSpanId:c||(0,o.DM)().substring(16),spanId:(0,o.DM)().substring(16),sampled:l,dsc:s||{}}:{traceId:a||(0,o.DM)(),spanId:(0,o.DM)().substring(16)}}function a(t=(0,o.DM)(),e=(0,o.DM)().substring(16),n){let i="";return void 0!==n&&(i=n?"-1":"-0"),`${t}-${e}${i}`}},7769:function(t,e,n){"use strict";function i(t){return t&&t.Math==Math?t:void 0}n.d(e,{n2:function(){return o},Rf:function(){return r},YO:function(){return s}});const o="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof global&&i(global)||function(){return this}()||{};function r(){return o}function s(t,e,n){const i=n||o,r=i.__SENTRY__=i.__SENTRY__||{};return r[t]||(r[t]=e())}},202:function(t,e,n){var i;t=n.nmd(t),(function(){var o,r="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=1/0,l=9007199254740991,d=4294967295,u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],p="[object Arguments]",h="[object Array]",g="[object Boolean]",f="[object Date]",m="[object Error]",v="[object Function]",b="[object GeneratorFunction]",x="[object Map]",_="[object Number]",C="[object Object]",w="[object Promise]",y="[object RegExp]",A="[object Set]",Z="[object String]",k="[object Symbol]",T="[object WeakMap]",O="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",S="[object Float64Array
vendor: 7,115 bytes, line 1
1]",P="[object Int8Array]",N="[object Int16Array]",q="[object Int32Array]",U="[object Uint8Array]",E="[object Uint8ClampedArray]",F="[object Uint16Array]",D="[object Uint32Array]",L=/\b__p \+= '';/g,J=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,B=RegExp(R.source),H=RegExp($.source),Q=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,X=RegExp(K.source),tt=/^\s+/,et=/\s/,nt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,it=/\{\n\/\* \[wrapped with (.+)\] \*/,ot=/,? & /,rt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,st=/[()=,{}\[\]\/\s]/,at=/\\(\\)?/g,ct=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ut=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,ht=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,ft=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,vt=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",xt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_t="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",wt="A-Z\\xc0-\\xd6\\xd8-\\xde",yt="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Zt="["+bt+"]",kt="["+At+"]",Tt="["+xt+"]",Ot="\\d+",Mt="["+_t+"]",It="["+Ct+"]",St="[^"+bt+At+Ot+_t+Ct+wt+"]",Pt="\\ud83c[\\udffb-\\udfff]",Nt="[^"+bt+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="["+wt+"]",Ft="(?:"+It+"|"+St+")",Dt="(?:"+Et+"|"+St+")",Lt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Jt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",jt="(?:"+Tt+"|"+Pt+")?",Rt="["+yt+"]?",$t=Rt+jt+"(?:\\u200d(?:"+[Nt,qt,Ut].join("|")+")"+Rt+jt+")*",Bt="(?:"+[Mt,qt,Ut].join("|")+")"+$t,Ht="(?:"+[Nt+Tt+"?",Tt,qt,Ut,Zt].join("|")+")",Qt=RegExp("['\u2019]","g"),Yt=RegExp(Tt,"g"),zt=RegExp(Pt+"(?="+Pt+")|"+Ht+$t,"g"),Vt=RegExp([Et+"?"+It+"+"+Lt+"(?="+[kt,Et,"$"].join("|")+")",Dt+"+"+Jt+"(?="+[kt,Et+Ft,"$"].join("|")+")",Et+"?"+Ft+"+"+Lt,Et+"+"+Jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ot,Bt].join("|"),"g"),Gt=RegExp("[\\u200d"+bt+xt+yt+"]"),Wt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xt=-1,te={};te[I]=te[S]=te[P]=te[N]=te[q]=te[U]=te[E]=te[F]=te[D]=!0,te[p]=te[h]=te[O]=te[g]=te[M]=te[f]=te[m]=te[v]=te[x]=te[_]=te[C]=te[y]=te[A]=te[Z]=te[T]=!1;var ee={};ee[p]=ee[h]=ee[O]=ee[M]=ee[g]=ee[f]=ee[I]=ee[S]=ee[P]=ee[N]=ee[q]=ee[x]=ee[_]=ee[C]=ee[y]=ee[A]=ee[Z]=ee[k]=ee[U]=ee[E]=ee[F]=ee[D]=!0,ee[m]=ee[v]=ee[T]=!1;var ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ie=parseFloat,oe=parseInt,re="object"==typeof global&&global&&global.Object===Object&&global,se="object"==typeof self&&self&&self.Object===Object&&self,ae=re||se||Function("return this")(),ce=e&&!e.nodeType&&e,le=ce&&t&&!t.nodeType&&t,de=le&&le.exports===ce,ue=de&&re.process,pe=function(){try{return le&&le.require&&le.require("util").types||ue&&ue.binding&&ue.binding("util")}catch(t){}}(),he=pe&&pe.isArrayBuffer,ge=pe&&pe.isDate,fe=pe&&pe.isMap,me=pe&&pe.isRegExp,ve=pe&&pe.isSet,be=pe&&pe.isTypedArray;function xe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function _e(t,e,n,i){for(var o=-1,r=null==t?0:t.length;++o<r;){var s=t[o];e(i,s,n(s),t)}return i}function Ce(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ye(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function Ae(t,e){for(var n=-1,i=null==t?0:t.length,o=0,r=[];++n<i;){var s=t[n];e(s,n,t)&&(r[o++]=s)}return r}function Ze(t,e){return!(null==t||!t.length)&&Ue(t,e,0)>-1}function ke(t,e,n){for(var i=-1,o=null==t?0:t.length;++i<o;)if(n(e,t[i]))return!0;return!1}function Te(t,e){for(var n=-1,i=null==t?0:t.length,o=Array(i);++n<i;)o[n]=e(t[n],n,t);return o}function Oe(t,e){for(var n=-1,i=e.length,o=t.length;++n<i;)t[o+n]=e[n];return t}function Me(t,e,n,i){var o=-1,r=null==t?0:t.length;for(i&&r&&(n=t[++o]);++o<r;)n=e(n,t[o],o,t);return n}function Ie(t,e,n,i){var o=null==t?0:t.length;for(i&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Se(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Pe=Le("length");function Ne(t,e,n){var i;return n(t,function(t,n,o){if(e(t,n,o))return i=n,!1}),i}function qe(t,e,n,i){for(var o=t.length,r=n+(i?1:-1);i?r--:++r<o;)if(e(t[r],r,t))return r;return-1}function Ue(t,e,n){return e==e?function(t,e,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===e)return i;return-1}(t,e,n):qe(t,Fe,n)}function Ee(t,e,n,i){for(var o=n-1,r=t.length;++o<r;)if(i(t[o],e))return o;return-1}function Fe(t){return t!=t}function De(t,e){var n=null==t?0:t.length;return n?Re(t,e)/n:NaN}function Le(t){return function(e){return null==e?o:e[t]}}function Je(t){return function(e){return null==t?o:t[e]}}function je(t,e,n,i,o){return o(t,function(t,o,r){n=i?(i=!1,t):e(n,t,o,r)}),n}function Re(t,e){for(var n,i=-1,r=t.length;++i<r;){var s=e(t[i]);s!==o&&(n=n===o?s:n+s)}return n}function $e(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Be(t){return t&&t.slice(0,cn(t)+1).replace(tt,"")}function He(t){return function(e){return t(e)}}function Qe(t,e){return Te(e,function(e){return t[e]})}function Ye(t,e){return t.has(e)}function ze(t,e){for(var n=-1,i=t.length;++n<i&&Ue(e,t[n],0)>-1;);return n}function Ve(t,e){for(var n=t.length;n--&&Ue(e,t[n],0)>-1;);return n}function Ge(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}var We=Je({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"
1c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Ke=Je({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Xe(t){return"\\"+ne[t]}function tn(t){return Gt.test(t)}function en(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}function nn(t,e){return function(n){return t(e(n))}}function on(t,e){for(var n=-1,i=t.length,o=0,r=[];++n<i;){var s=t[n];(s===e||s===a)&&(t[n]=a,r[o++]=n)}return r}function rn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function sn(t){return tn(t)?function(t){for(var e=zt.lastIndex=0;zt.test(t);)++e;return e}(t):Pe(t)}function an(t){return tn(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.split("")}(t)}function cn(t){for(var e=t.length;e--&&et.test(t.charAt(e)););return e}var ln=Je({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dn=function t(e){var n,i=(e=null==e?ae:dn.defaults(ae.Object(),e,dn.pick(ae,Kt))).Array,et=e.Date,bt=e.Error,xt=e.Function,_t=e.Math,Ct=e.Object,wt=e.RegExp,yt=e.String,At=e.TypeError,Zt=i.prototype,kt=Ct.prototype,Tt=e["__core-js_shared__"],Ot=xt.prototype.toString,Mt=kt.hasOwnProperty,It=0,St=(n=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Pt=kt.toString,Nt=Ot.call(Ct),qt=ae._,Ut=wt("^"+Ot.call(Mt).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Et=de?e.Buffer:o,Ft=e.Symbol,Dt=e.Uint8Array,Lt=Et?Et.allocUnsafe:o,Jt=nn(Ct.getPrototypeOf,Ct),jt=Ct.create,Rt=kt.propertyIsEnumerable,$t=Zt.splice,Bt=Ft?Ft.isConcatSpreadable:o,Ht=Ft?Ft.iterator:o,zt=Ft?Ft.toStringTag:o,Gt=function(){try{var t=rr(Ct,"defineProperty");return t({},"",{}),t}catch(Ir){}}(),ne=e.clearTimeout!==ae.clearTimeout&&e.clearTimeout,re=et&&et.now!==ae.Date.now&&et.now,se=e.setTimeout!==ae.setTimeout&&e.setTimeout,ce=_t.ceil,le=_t.floor,ue=Ct.getOwnPropertySymbols,pe=Et?Et.isBuffer:o,Pe=e.isFinite,Je=Zt.join,un=nn(Ct.keys,Ct),pn=_t.max,hn=_t.min,gn=et.now,fn=e.parseInt,mn=_t.random,vn=Zt.reverse,bn=rr(e,"DataView"),xn=rr(e,"Map"),_n=rr(e,"Promise"),Cn=rr(e,"Set"),wn=rr(e,"WeakMap"),yn=rr(Ct,"create"),An=wn&&new wn,Zn={},kn=qr(bn),Tn=qr(xn),On=qr(_n),Mn=qr(Cn),In=qr(wn),Sn=Ft?Ft.prototype:o,Pn=Sn?Sn.valueOf:o,Nn=Sn?Sn.toString:o;function qn(t){if(Ws(t)&&!Js(t)&&!(t instanceof Dn)){if(t instanceof Fn)return t;if(Mt.call(t,"__wrapped__"))return Ur(t)}return new Fn(t)}var Un=function(){function t(){}return function(e){if(!Gs(e))return{};if(jt)return jt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function En(){}function Fn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Dn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Rn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new jn;++e<n;)this.add(t[e])}function $n(t){var e=this.__data__=new Jn(t);this.size=e.size}function Bn(t,e){var n=Js(t),i=!n&&Ls(t),o=!n&&!i&&Bs(t),r=!n&&!i&&!o&&ra(t),s=n||i||o||r,a=s?$e(t.length,yt):[],c=a.length;for(var l in t)(e||Mt.call(t,l))&&(!s||!("length"==l||o&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||pr(l,c)))&&a.push(l);return a}function Hn(t){var e=t.length;return e?t[ji(0,e-1)]:o}function Qn(t,e){return Mr(yo(t),ei(e,0,t.length))}function Yn(t){return Mr(yo(t))}function zn(t,e,n){(n!==o&&!Es(t[e],n)||n===o&&!(e in t))&&Xn(t,e,n)}function Vn(t,e,n){var i=t[e];(!Mt.call(t,e)||!Es(i,n)||n===o&&!(e in t))&&Xn(t,e,n)}function Gn(t,e){for(var n=t.length;n--;)if(Es(t[n][0],e))return n;return-1}function Wn(t,e,n,i){return si(t,function(t,o,r){e(i,t,n(t),r)}),i}function Kn(t,e){return t&&Ao(e,Ta(e),t)}function Xn(t,e,n){"__proto__"==e&&Gt?Gt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ti(t,e){for(var n=-1,r=e.length,s=i(r),a=null==t;++n<r;)s[n]=a?o:wa(t,e[n]);return s}function ei(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ni(t,e,n,i,r,s){var a,c=1&e,l=2&e,d=4&e;if(n&&(a=r?n(t,i,r,s):n(t)),a!==o)return a;
vendor: 4,062 bytes, line 1
1if(!Gs(t))return t;var u=Js(t);if(u){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return yo(t,a)}else{var h=cr(t),m=h==v||h==b;if(Bs(t))return vo(t,c);if(h==C||h==p||m&&!r){if(a=l||m?{}:dr(t),!c)return l?function(t,e){return Ao(t,ar(t),e)}(t,function(t,e){return t&&Ao(e,Oa(e),t)}(a,t)):function(t,e){return Ao(t,sr(t),e)}(t,Kn(a,t))}else{if(!ee[h])return r?t:{};a=function(t,e,n){var i=t.constructor;switch(e){case O:return bo(t);case g:case f:return new i(+t);case M:return function(t,e){var n=e?bo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case I:case S:case P:case N:case q:case U:case E:case F:case D:return xo(t,n);case x:return new i;case _:case Z:return new i(t);case y:return function(t){var e=new t.constructor(t.source,lt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new i;case k:return function(t){return Pn?Ct(Pn.call(t)):{}}(t)}}(t,h,c)}}s||(s=new $n);var w=s.get(t);if(w)return w;s.set(t,a),na(t)?t.forEach(function(i){a.add(ni(i,e,n,i,t,s))}):Ks(t)&&t.forEach(function(i,o){a.set(o,ni(i,e,n,o,t,s))});var T=u?o:(d?l?Ko:Wo:l?Oa:Ta)(t);return Ce(T||t,function(i,o){T&&(i=t[o=i]),Vn(a,o,ni(i,e,n,o,t,s))}),a}function ii(t,e,n){var i=n.length;if(null==t)return!i;for(t=Ct(t);i--;){var r=n[i],s=t[r];if(s===o&&!(r in t)||!(0,e[r])(s))return!1}return!0}function oi(t,e,n){if("function"!=typeof t)throw new At(r);return Zr(function(){t.apply(o,n)},e)}function ri(t,e,n,i){var o=-1,r=Ze,s=!0,a=t.length,c=[],l=e.length;if(!a)return c;n&&(e=Te(e,He(n))),i?(r=ke,s=!1):e.length>=200&&(r=Ye,s=!1,e=new Rn(e));t:for(;++o<a;){var d=t[o],u=null==n?d:n(d);if(d=i||0!==d?d:0,s&&u==u){for(var p=l;p--;)if(e[p]===u)continue t;c.push(d)}else r(e,u,i)||c.push(d)}return c}qn.templateSettings={escape:Q,evaluate:Y,interpolate:z,variable:"",imports:{_:qn}},(qn.prototype=En.prototype).constructor=qn,(Fn.prototype=Un(En.prototype)).constructor=Fn,(Dn.prototype=Un(En.prototype)).constructor=Dn,Ln.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},Ln.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ln.prototype.get=function(t){var e=this.__data__;if(yn){var n=e[t];return n===s?o:n}return Mt.call(e,t)?e[t]:o},Ln.prototype.has=function(t){var e=this.__data__;return yn?e[t]!==o:Mt.call(e,t)},Ln.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yn&&e===o?s:e,this},Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=Gn(e,t);return!(n<0||(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,0))},Jn.prototype.get=function(t){var e=this.__data__,n=Gn(e,t);return n<0?o:e[n][1]},Jn.prototype.has=function(t){return Gn(this.__data__,t)>-1},Jn.prototype.set=function(t,e){var n=this.__data__,i=Gn(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Ln,map:new(xn||Jn),string:new Ln}},jn.prototype.delete=function(t){var e=ir(this,t).delete(t);return this.size-=e?1:0,e},jn.prototype.get=function(t){return ir(this,t).get(t)},jn.prototype.has=function(t){return ir(this,t).has(t)},jn.prototype.set=function(t,e){var n=ir(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Rn.prototype.add=Rn.prototype.push=function(t){return this.__data__.set(t,s),this},Rn.prototype.has=function(t){return this.__data__.has(t)},$n.prototype.clear=function(){this.__data__=new Jn,this.size=0},$n.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},$n.prototype.get=function(t){return this.__data__.get(t)},$n.prototype.has=function(t){return this.__data__.has(t)},$n.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Jn){var i=n.__data__;if(!xn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new jn(i)}return n.set(t,e),this.size=n.size,this};var si=To(gi),ai=To(fi,!0);function ci(t,e){var n=!0;
vendor: 2,538 bytes, line 1
1return si(t,function(t,i,o){return n=!!e(t,i,o)}),n}function li(t,e,n){for(var i=-1,r=t.length;++i<r;){var s=t[i],a=e(s);if(null!=a&&(c===o?a==a&&!oa(a):n(a,c)))var c=a,l=s}return l}function di(t,e){var n=[];return si(t,function(t,i,o){e(t,i,o)&&n.push(t)}),n}function ui(t,e,n,i,o){var r=-1,s=t.length;for(n||(n=ur),o||(o=[]);++r<s;){var a=t[r];e>0&&n(a)?e>1?ui(a,e-1,n,i,o):Oe(o,a):i||(o[o.length]=a)}return o}var pi=Oo(),hi=Oo(!0);function gi(t,e){return t&&pi(t,e,Ta)}function fi(t,e){return t&&hi(t,e,Ta)}function mi(t,e){return Ae(e,function(e){return Ys(t[e])})}function vi(t,e){for(var n=0,i=(e=ho(e,t)).length;null!=t&&n<i;)t=t[Nr(e[n++])];return n&&n==i?t:o}function bi(t,e,n){var i=e(t);return Js(t)?i:Oe(i,n(t))}function xi(t){return null==t?t===o?"[object Undefined]":"[object Null]":zt&&zt in Ct(t)?function(t){var e=Mt.call(t,zt),n=t[zt];try{t[zt]=o;var i=!0}catch(s){}var r=Pt.call(t);return i&&(e?t[zt]=n:delete t[zt]),r}(t):function(t){return Pt.call(t)}(t)}function _i(t,e){return t>e}function Ci(t,e){return null!=t&&Mt.call(t,e)}function wi(t,e){return null!=t&&e in Ct(t)}function yi(t,e,n){for(var r=n?ke:Ze,s=t[0].length,a=t.length,c=a,l=i(a),d=1/0,u=[];c--;){var p=t[c];c&&e&&(p=Te(p,He(e))),d=hn(p.length,d),l[c]=!n&&(e||s>=120&&p.length>=120)?new Rn(c&&p):o}p=t[0];var h=-1,g=l[0];t:for(;++h<s&&u.length<d;){var f=p[h],m=e?e(f):f;if(f=n||0!==f?f:0,!(g?Ye(g,m):r(u,m,n))){for(c=a;--c;){var v=l[c];if(!(v?Ye(v,m):r(t[c],m,n)))continue t}g&&g.push(m),u.push(f)}}return u}function Ai(t,e,n){var i=null==(t=Cr(t,e=ho(e,t)))?t:t[Nr(Qr(e))];return null==i?o:xe(i,t,n)}function Zi(t){return Ws(t)&&xi(t)==p}function ki(t,e,n,i,r){return t===e||(null==t||null==e||!Ws(t)&&!Ws(e)?t!=t&&e!=e:function(t,e,n,i,r,s){var a=Js(t),c=Js(e),l=a?h:cr(t),d=c?h:cr(e),u=(l=l==p?C:l)==C,v=(d=d==p?C:d)==C,b=l==d;if(b&&Bs(t)){if(!Bs(e))return!1;a=!0,u=!1}if(b&&!u)return s||(s=new $n),a||ra(t)?Vo(t,e,n,i,r,s):function(t,e,n,i,o,r,s){switch(n){case M:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O:return!(t.byteLength!=e.byteLength||!r(new Dt(t),new Dt(e)));case g:case f:case _:return Es(+t,+e);case m:return t.name==e.name&&t.message==e.message;case y:case Z:return t==e+"";case x:var a=en;case A:if(a||(a=rn),t.size!=e.size&&!(1&i))return!1;var c=s.get(t);if(c)return c==e;i|=2,s.set(t,e);var l=Vo(a(t),a(e),i,o,r,s);return s.delete(t),l;case k:if(Pn)return Pn.call(t)==Pn.call(e)}return!1}(t,e,l,n,i,r,s);if(!(1&n)){var w=u&&Mt.call(t,"__wrapped__"),T=v&&Mt.call(e,"__wrapped__");
vendor: 16,347 bytes, line 1
1if(w||T){var I=w?t.value():t,S=T?e.value():e;return s||(s=new $n),r(I,S,n,i,s)}}return!!b&&(s||(s=new $n),function(t,e,n,i,r,s){var a=1&n,c=Wo(t),l=c.length;if(l!=Wo(e).length&&!a)return!1;for(var d=l;d--;){var u=c[d];if(!(a?u in e:Mt.call(e,u)))return!1}var p=s.get(t),h=s.get(e);if(p&&h)return p==e&&h==t;var g=!0;s.set(t,e),s.set(e,t);for(var f=a;++d<l;){var m=t[u=c[d]],v=e[u];if(i)var b=a?i(v,m,u,e,t,s):i(m,v,u,t,e,s);if(!(b===o?m===v||r(m,v,n,i,s):b)){g=!1;break}f||(f="constructor"==u)}if(g&&!f){var x=t.constructor,_=e.constructor;x!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _)&&(g=!1)}return s.delete(t),s.delete(e),g}(t,e,n,i,r,s))}(t,e,n,i,ki,r))}function Ti(t,e,n,i){var r=n.length,s=r,a=!i;if(null==t)return!s;for(t=Ct(t);r--;){var c=n[r];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++r<s;){var l=(c=n[r])[0],d=t[l],u=c[1];if(a&&c[2]){if(d===o&&!(l in t))return!1}else{var p=new $n;if(i)var h=i(d,u,l,t,e,p);if(!(h===o?ki(u,d,3,i,p):h))return!1}}return!0}function Oi(t){return!(!Gs(t)||function(t){return!!St&&St in t}(t))&&(Ys(t)?Ut:pt).test(qr(t))}function Mi(t){return"function"==typeof t?t:null==t?Xa:"object"==typeof t?Js(t)?qi(t[0],t[1]):Ni(t):cc(t)}function Ii(t){if(!vr(t))return un(t);var e=[];for(var n in Ct(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Si(t,e){return t<e}function Pi(t,e){var n=-1,o=Rs(t)?i(t.length):[];return si(t,function(t,i,r){o[++n]=e(t,i,r)}),o}function Ni(t){var e=or(t);return 1==e.length&&e[0][2]?xr(e[0][0],e[0][1]):function(n){return n===t||Ti(n,t,e)}}function qi(t,e){return gr(t)&&br(e)?xr(Nr(t),e):function(n){var i=wa(n,t);return i===o&&i===e?ya(n,t):ki(e,i,3)}}function Ui(t,e,n,i,r){t!==e&&pi(e,function(s,a){if(r||(r=new $n),Gs(s))!function(t,e,n,i,r,s,a){var c=yr(t,n),l=yr(e,n),d=a.get(l);if(d)zn(t,n,d);else{var u=s?s(c,l,n+"",t,e,a):o,p=u===o;if(p){var h=Js(l),g=!h&&Bs(l),f=!h&&!g&&ra(l);u=l,h||g||f?Js(c)?u=c:$s(c)?u=yo(c):g?(p=!1,u=vo(l,!0)):f?(p=!1,u=xo(l,!0)):u=[]:ta(l)||Ls(l)?(u=c,Ls(c)?u=ha(c):(!Gs(c)||Ys(c))&&(u=dr(l))):p=!1}p&&(a.set(l,u),r(u,l,i,s,a),a.delete(l)),zn(t,n,u)}}(t,e,a,n,Ui,i,r);else{var c=i?i(yr(t,a),s,a+"",t,e,r):o;c===o&&(c=s),zn(t,a,c)}},Oa)}function Ei(t,e){var n=t.length;if(n)return pr(e+=e<0?n:0,n)?t[e]:o}function Fi(t,e,n){e=e.length?Te(e,function(t){return Js(t)?function(e){return vi(e,1===t.length?t[0]:t)}:t}):[Xa];var i=-1;return e=Te(e,He(nr())),function(t,e){var i=t.length;for(t.sort(function(t,e){return function(t,e,n){for(var i=-1,o=t.criteria,r=e.criteria,s=o.length,a=n.length;++i<s;){var c=_o(o[i],r[i]);if(c)return i>=a?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)});i--;)t[i]=t[i].value;return t}(Pi(t,function(t,n,o){return{criteria:Te(e,function(e){return e(t)}),index:++i,value:t}}))}function Di(t,e,n){for(var i=-1,o=e.length,r={};++i<o;){var s=e[i],a=vi(t,s);n(a,s)&&Qi(r,ho(s,t),a)}return r}function Li(t,e,n,i){var o=i?Ee:Ue,r=-1,s=e.length,a=t;for(t===e&&(e=yo(e)),n&&(a=Te(t,He(n)));++r<s;)for(var c=0,l=e[r],d=n?n(l):l;(c=o(a,d,c,i))>-1;)a!==t&&$t.call(a,c,1),$t.call(t,c,1);return t}function Ji(t,e){for(var n=t?e.length:0,i=n-1;n--;){var o=e[n];if(n==i||o!==r){var r=o;pr(o)?$t.call(t,o,1):oo(t,o)}}return t}function ji(t,e){return t+le(mn()*(e-t+1))}function Ri(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=le(e/2))&&(t+=t)}while(e);return n}function $i(t,e){return kr(_r(t,e,Xa),t+"")}function Bi(t){return Hn(Ea(t))}function Hi(t,e){var n=Ea(t);return Mr(n,ei(e,0,n.length))}function Qi(t,e,n,i){if(!Gs(t))return t;for(var r=-1,s=(e=ho(e,t)).length,a=s-1,c=t;null!=c&&++r<s;){var l=Nr(e[r]),d=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=a){var u=c[l];(d=i?i(u,l,c):o)===o&&(d=Gs(u)?u:pr(e[r+1])?[]:{})}Vn(c,l,d),c=c[l]}return t}var Yi=An?function(t,e){return An.set(t,e),t}:Xa,zi=Gt?function(t,e){return Gt(t,"toString",{configurable:!0,enumerable:!1,value:Ga(e),writable:!0})}:Xa;function Vi(t){return Mr(Ea(t))}function Gi(t,e,n){var o=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var s=i(r);++o<r;)s[o]=t[o+e];return s}function Wi(t,e){var n;return si(t,function(t,i,o){return!(n=e(t,i,o))}),!!n}function Ki(t,e,n){var i=0,o=null==t?i:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;i<o;){var r=i+o>>>1,s=t[r];null!==s&&!oa(s)&&(n?s<=e:s<e)?i=r+1:o=r}return o}return Xi(t,e,Xa,n)}function Xi(t,e,n,i){var r=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,c=null===e,l=oa(e),d=e===o;r<s;){var u=le((r+s)/2),p=n(t[u]),h=p!==o,g=null===p,f=p==p,m=oa(p);if(a)var v=i||f;else v=d?f&&(i||h):c?f&&h&&(i||!g):l?f&&h&&!g&&(i||!m):!g&&!m&&(i?p<=e:p<e);v?r=u+1:s=u}return hn(s,4294967294)}function to(t,e){for(var n=-1,i=t.length,o=0,r=[];++n<i;){var s=t[n],a=e?e(s):s;if(!n||!Es(a,c)){var c=a;r[o++]=0===s?0:s}}return r}function eo(t){return"number"==typeof t?t:oa(t)?NaN:+t}function no(t){if("string"==typeof t)return t;if(Js(t))return Te(t,no)+"";if(oa(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-c?"-0":e}function io(t,e,n){var i=-1,o=Ze,r=t.length,s=!0,a=[],c=a;if(n)s=!1,o=ke;else if(r>=200){var l=e?null:$o(t);if(l)return rn(l);s=!1,o=Ye,c=new Rn}else c=e?[]:a;t:for(;++i<r;){var d=t[i],u=e?e(d):d;if(d=n||0!==d?d:0,s&&u==u){for(var p=c.length;p--;)if(c[p]===u)continue t;e&&c.push(u),a.push(d)}else o(c,u,n)||(c!==a&&c.push(u),a.push(d))}return a}function oo(t,e){return null==(t=Cr(t,e=ho(e,t)))||delete t[Nr(Qr(e))]}function ro(t,e,n,i){return Qi(t,e,n(vi(t,e)),i)}function so(t,e,n,i){for(var o=t.length,r=i?o:-1;(i?r--:++r<o)&&e(t[r],r,t););return n?Gi(t,i?0:r,i?r+1:o):Gi(t,i?r+1:0,i?o:r)}function ao(t,e){var n=t;return n instanceof Dn&&(n=n.value()),Me(e,function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))},n)}function co(t,e,n){var o=t.length;if(o<2)return o?io(t[0]):[];for(var r=-1,s=i(o);++r<o;)for(var a=t[r],c=-1;++c<o;)c!=r&&(s[r]=ri(s[r]||a,t[c],e,n));return io(ui(s,1),e,n)}function lo(t,e,n){for(var i=-1,r=t.length,s=e.length,a={};++i<r;)n(a,t[i],i<s?e[i]:o);return a}function uo(t){return $s(t)?t:[]}function po(t){return"function"==typeof t?t:Xa}function ho(t,e){return Js(t)?t:gr(t,e)?[t]:Pr(ga(t))}var go=$i;function fo(t,e,n){var i=t.length;return n=n===o?i:n,!e&&n>=i?t:Gi(t,e,n)}var mo=ne||function(t){return ae.clearTimeout(t)};function vo(t,e){if(e)return t.slice();var n=t.length,i=Lt?Lt(n):new t.constructor(n);return t.copy(i),i}function bo(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function xo(t,e){var n=e?bo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function _o(t,e){if(t!==e){var n=t!==o,i=null===t,r=t==t,s=oa(t),a=e!==o,c=null===e,l=e==e,d=oa(e);if(!c&&!d&&!s&&t>e||s&&a&&l&&!c&&!d||i&&a&&l||!n&&l||!r)return 1;if(!i&&!s&&!d&&t<e||d&&n&&r&&!i&&!s||c&&n&&r||!a&&r||!l)return-1}return 0}function Co(t,e,n,o){for(var r=-1,s=t.length,a=n.length,c=-1,l=e.length,d=pn(s-a,0),u=i(l+d),p=!o;++c<l;)u[c]=e[c];for(;++r<a;)(p||r<s)&&(u[n[r]]=t[r]);for(;d--;)u[c++]=t[r++];return u}function wo(t,e,n,o){for(var r=-1,s=t.length,a=-1,c=n.length,l=-1,d=e.length,u=pn(s-c,0),p=i(u+d),h=!o;++r<u;)p[r]=t[r];for(var g=r;++l<d;)p[g+l]=e[l];for(;++a<c;)(h||r<s)&&(p[g+n[a]]=t[r++]);return p}function yo(t,e){var n=-1,o=t.length;for(e||(e=i(o));++n<o;)e[n]=t[n];return e}function Ao(t,e,n,i){var r=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var c=e[s],l=i?i(n[c],t[c],c,n,t):o;l===o&&(l=t[c]),r?Xn(n,c,l):Vn(n,c,l)}return n}function Zo(t,e){return function(n,i){var o=Js(n)?_e:Wn,r=e?e():{};return o(n,t,nr(i,2),r)}}function ko(t){return $i(function(e,n){var i=-1,r=n.length,s=r>1?n[r-1]:o,a=r>2?n[2]:o;for(s=t.length>3&&"function"==typeof s?(r--,s):o,a&&hr(n[0],n[1],a)&&(s=r<3?o:s,r=1),e=Ct(e);++i<r;){var c=n[i];c&&t(e,c,i,s)}return e})}function To(t,e){return function(n,i){if(null==n)return n;if(!Rs(n))return t(n,i);for(var o=n.length,r=e?o:-1,s=Ct(n);(e?r--:++r<o)&&!1!==i(s[r],r,s););return n}}function Oo(t){return function(e,n,i){for(var o=-1,r=Ct(e),s=i(e),a=s.length;a--;){var c=s[t?a:++o];if(!1===n(r[c],c,r))break}return e}}function Mo(t){return function(e){var n=tn(e=ga(e))?an(e):o,i=n?n[0]:e.charAt(0),r=n?fo(n,1).join(""):e.slice(1);return i[t]()+r}}function Io(t){return function(e){return Me(Ya(La(e).replace(Qt,"")),t,"")}}function So(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),i=t.apply(n,e);return Gs(i)?i:n}}function Po(t){return function(e,n,i){var r=Ct(e);if(!Rs(e)){var s=nr(n,3);e=Ta(e),n=function(t){return s(r[t],t,r)}}var a=t(e,n,i);return a>-1?r[s?e[a]:a]:o}}function No(t){return Go(function(e){var n=e.length,i=n,s=Fn.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new At(r);if(s&&!c&&"wrapper"==tr(a))var c=new Fn([],!0)}for(i=c?i:n;++i<n;){var l=tr(a=e[i]),d="wrapper"==l?Xo(a):o;c=d&&fr(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?c[tr(d[0])].apply(c,d[3]):1==a.length&&fr(a)?c[l]():c.thru(a)}return function(){var t=arguments,i=t[0];if(c&&1==t.length&&Js(i))return c.plant(i).value();for(var o=0,r=n?e[o].apply(this,t):i;++o<n;)r=e[o].call(this,r);return r}})}function qo(t,e,n,r,s,a,c,l,d,u){var p=128&e,h=1&e,g=2&e,f=24&e,m=512&e,v=g?o:So(t);return function o(){for(var b=arguments.length,x=i(b),_=b;_--;)x[_]=arguments[_];if(f)var C=er(o),w=Ge(x,C);if(r&&(x=Co(x,r,s,f)),a&&(x=wo(x,a,c,f)),b-=w,f&&b<u){var y=on(x,C);return jo(t,e,qo,o.placeholder,n,x,y,l,d,u-b)}var A=h?n:this,Z=g?A[t]:t;return b=x.length,l?x=wr(x,l):m&&b>1&&x.reverse(),p&&d<b&&(x.length=d),this&&this!==ae&&this instanceof o&&(Z=v||So(Z)),Z.apply(A,x)}}function Uo(t,e){return function(n,i){return function(t,e,n,i){return gi(t,function(t,o,r){e(i,n(t),o,r)}),i}(n,t,e(i),{})}}function Eo(t,e){return function(n,i){var r;if(n===o&&i===o)return e;if(n!==o&&(r=n),i!==o){if(r===o)return i;"string"==typeof n||"string"==typeof i?(n=no(n),i=no(i)):(n=eo(n),i=eo(i)),r=t(n,i)}return r}}function Fo(t){return Go(function(e){return e=Te(e,He(nr())),$i(function(n){var i=this;return t(e,function(t){return xe(t,i,n)})})})}function Do(t,e){var n=(e=e===o?" ":no(e)).length;if(n<2)return n?Ri(e,t):e;var i=Ri(e,ce(t/sn(e)));return tn(e)?fo(an(i),0,t).join(""):i.slice(0,t)}function Lo(t){return function(e,n,r){return r&&"number"!=typeof r&&hr(e,n,r)&&(n=r=o),e=la(e),n===o?(n=e,e=0):n=la(n),function(t,e,n,o){for(var r=-1,s=pn(ce((e-t)/(n||1)),0),a=i(s);s--;)a[o?s:++r]=t,t+=n;return a}(e,n,r=r===o?e<n?1:-1:la(r),t)}}function Jo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=pa(e),n=pa(n)),t(e,n)}}function jo(t,e,n,i,r,s,a,c,l,d){var u=8&e;e|=u?32:64,4&(e&=~(u?64:32))||(e&=-4);var p=[t,e,r,u?s:o,u?a:o,u?o:s,u?o:a,c,l,d],h=n.apply(o,p);return fr(t)&&Ar(h,p),h.placeholder=i,Tr(h,t,e)}function Ro(t){var e=_t[t];return function(t,n){if(t=pa(t),(n=null==n?0:hn(da(n),292))&&Pe(t)){var i=(ga(t)+"e").split("e");return+((i=(ga(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var $o=Cn&&1/rn(new Cn([,-0]))[1]==c?function(t){return new Cn(t)}:oc;function Bo(t){return function(e){var n=cr(e);return n==x?en(e):n==A?function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}(e):function(t,e){return Te(e,function(e){return[e,t[e]]})}(e,t(e))}}function Ho(t,e,n,s,c,l,d,u){var p=2&e;if(!p&&"function"!=typeof t)throw new At(r);var h=s?s.length:0;if(h||(e&=-97,s=c=o),d=d===o?d:pn(da(d),0),u=u===o?u:da(u),h-=c?c.length:0,64&e){var g=s,f=c;s=c=o}var m=p?o:Xo(t),v=[t,e,n,s,c,g,f,l,d,u];if(m&&function(t,e){var n=t[1],i=e[1],o=n|i;if(!(o<131||(128==i&&8==n||128==i&&256==n&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n)))return t;1&i&&(t[2]=e[2],o|=1&n?0:4);var r=e[3];if(r){var s=t[3];t[3]=s?Co(s,r,e[4]):r,t[4]=s?on(t[3],a):e[4]}(r=e[5])&&(t[5]=(s=t[5])?wo(s,r,e[6]):r,t[6]=s?on(t[5],a):e[6]),(r=e[7])&&(t[7]=r),128&i&&(t[8]=null==t[8]?e[8]:hn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(v,m),t=v[0],e=v[1],n=v[2],s=v[3],c=v[4],!(u=v[9]=v[9]===o?p?0:t.length:pn(v[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var r=So(t);return function s(){for(var a=arguments.length,c=i(a),l=a,d=er(s);l--;)c[l]=arguments[l];var u=a<3&&c[0]!==d&&c[a-1]!==d?[]:on(c,d);return(a-=u.length)<n?jo(t,e,qo,s.placeholder,o,c,u,o,o,n-a):xe(this&&this!==ae&&this instanceof s?r:t,this,c)}}(t,e,u):32!=e&&33!=e||c.length?qo.apply(o,v):function(t,e,n,o){var r=1&e,s=So(t);return function e(){for(var a=-1,c=arguments.length,l=-1,d=o.length,u=i(d+c),p=this&&this!==ae&&this instanceof e?s:t;++l<d;)u[l]=o[l];for(;c--;)u[l++]=arguments[++a];return xe(p,r?n:this,u)}}(t,e,n,s);else var b=function(t,e,n){var i=1&e,o=So(t);return function e(){return(this&&this!==ae&&this instanceof e?o:t).apply(i?n:this,arguments)}}(t,e,n);return Tr((m?Yi:Ar)(b,v),t,e)}function Qo(t,e,n,i){return t===o||Es(t,kt[n])&&!Mt.call(i,n)?e:t}function Yo(t,e,n,i,r,s){return Gs(t)&&Gs(e)&&(s.set(e,t),Ui(t,e,o,Yo,s),s.delete(e)),t}function zo(t){return ta(t)?o:t}function Vo(t,e,n,i,r,s){var a=1&n,c=t.length,l=e.length;if(c!=l&&!(a&&l>c))return!1;var d=s.get(t),u=s.get(e);if(d&&u)return d==e&&u==t;var p=-1,h=!0,g=2&n?new Rn:o;for(s.set(t,e),s.set(e,t);++p<c;){var f=t[p],m=e[p];if(i)var v=a?i(m,f,p,e,t,s):i(f,m,p,t,e,s);if(v!==o){if(v)continue;h=!1;break}if(g){if(!Se(e,function(t,e){if(!Ye(g,e)&&(f===t||r(f,t,n,i,s)))return g.push(e)})){h=!1;break}}else if(f!==m&&!r(f,m,n,i,s)){h=!1;break}}return s.delete(t),s.delete(e),h}function Go(t){return kr(_r(t,o,jr),t+"")}function Wo(t){return bi(t,Ta,sr)}function Ko(t){return bi(t,Oa,ar)}var Xo=An?function(t){return An.get(t)}:oc;function tr(t){for(var e=t.name+"",n=Zn[e],i=Mt.call(Zn,e)?n.length:0;i--;){var o=n[i],r=o.func;if(null==r||r==t)return o.name}return e}function er(t){return(Mt.call(qn,"placeholder")?qn:t).placeholder}function nr(){var t=qn.iteratee||tc;return t=t===tc?Mi:t,arguments.length?t(arguments[0],arguments[1]):t}function ir(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function or(t){for(var e=Ta(t),n=e.length;n--;){var i=e[n],o=t[i];e[n]=[i,o,br(o)]}return e}function rr(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Oi(n)?n:o}var sr=ue?function(t){return null==t?[]:(t=Ct(t),Ae(ue(t),function(e){return Rt.call(t,e)}))}:uc,ar=ue?function(t){for(var e=[];t;)Oe(e,sr(t)),t=Jt(t);return e}:uc,cr=xi;function lr(t,e,n){for(var i=-1,o=(e=ho(e,t)).length,r=!1;++i<o;){var s=Nr(e[i]);if(!(r=null!=t&&n(t,s)))break;t=t[s]}return r||++i!=o?r:!!(o=null==t?0:t.length)&&Vs(o)&&pr(s,o)&&(Js(t)||Ls(t))}function dr(t){return"function"!=typeof t.constructor||vr(t)?{}:Un(Jt(t))}function ur(t){return Js(t)||Ls(t)||!!(Bt&&t&&t[Bt])}function pr(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&gt.test(t))&&t>-1&&t%1==0&&t<e}function hr(t,e,n){if(!Gs(n))return!1;var i=typeof e;return!!("number"==i?Rs(n)&&pr(e,n.length):"string"==i&&e in n)&&Es(n[e],t)}function gr(t,e){if(Js(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!oa(t))||G.test(t)||!V.test(t)||null!=e&&t in Ct(e)}function fr(t){var e=tr(t),n=qn[e];if("function"!=typeof n||!(e in Dn.prototype))return!1;if(t===n)return!0;var i=Xo(n);return!!i&&t===i[0]}(bn&&cr(new bn(new ArrayBuffer(1)))!=M||xn&&cr(new xn)!=x||_n&&cr(_n.resolve())!=w||Cn&&cr(new Cn)!=A||wn&&cr(new wn)!=T)&&(cr=function(t){var e=xi(t),n=e==C?t.constructor:o,i=n?qr(n):"";if(i)switch(i){case kn:return M;case Tn:return x;case On:return w;case Mn:return A;case In:return T}return e});var mr=Tt?Ys:pc;function vr(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function br(t){return t==t&&!Gs(t)}function xr(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Ct(n))}}function _r(t,e,n){return e=pn(e===o?t.length-1:e,0),function(){for(var o=arguments,r=-1,s=pn(o.length-e,0),a=i(s);++r<s;)a[r]=o[e+r];r=-1;for(var c=i(e+1);++r<e;)c[r]=o[r];return c[e]=n(a),xe(t,this,c)}}function Cr(t,e){return e.length<2?t:vi(t,Gi(e,0,-1))}
vendor: 10,075 bytes, line 1
1function wr(t,e){for(var n=t.length,i=hn(e.length,n),r=yo(t);i--;){var s=e[i];t[i]=pr(s,n)?r[s]:o}return t}function yr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ar=Or(Yi),Zr=se||function(t,e){return ae.setTimeout(t,e)},kr=Or(zi);function Tr(t,e,n){var i=e+"";return kr(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(nt,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return Ce(u,function(n){var i="_."+n[0];e&n[1]&&!Ze(t,i)&&t.push(i)}),t.sort()}(function(t){var e=t.match(it);return e?e[1].split(ot):[]}(i),n)))}function Or(t){var e=0,n=0;return function(){var i=gn(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Mr(t,e){var n=-1,i=t.length,r=i-1;for(e=e===o?i:e;++n<e;){var s=ji(n,r),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ir,Sr,Pr=(Ir=Is(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,function(t,n,i,o){e.push(i?o.replace(at,"$1"):n||t)}),e},function(t){return 500===Sr.size&&Sr.clear(),t}),Sr=Ir.cache,Ir);function Nr(t){if("string"==typeof t||oa(t))return t;var e=t+"";return"0"==e&&1/t==-c?"-0":e}function qr(t){if(null!=t){try{return Ot.call(t)}catch(Ir){}try{return t+""}catch(Ir){}}return""}function Ur(t){if(t instanceof Dn)return t.clone();var e=new Fn(t.__wrapped__,t.__chain__);return e.__actions__=yo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Er=$i(function(t,e){return $s(t)?ri(t,ui(e,1,$s,!0)):[]}),Fr=$i(function(t,e){var n=Qr(e);return $s(n)&&(n=o),$s(t)?ri(t,ui(e,1,$s,!0),nr(n,2)):[]}),Dr=$i(function(t,e){var n=Qr(e);return $s(n)&&(n=o),$s(t)?ri(t,ui(e,1,$s,!0),o,n):[]});function Lr(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=null==n?0:da(n);return o<0&&(o=pn(i+o,0)),qe(t,nr(e,3),o)}function Jr(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return n!==o&&(r=da(n),r=n<0?pn(i+r,0):hn(r,i-1)),qe(t,nr(e,3),r,!0)}function jr(t){return null!=t&&t.length?ui(t,1):[]}function Rr(t){return t&&t.length?t[0]:o}var $r=$i(function(t){var e=Te(t,uo);return e.length&&e[0]===t[0]?yi(e):[]}),Br=$i(function(t){var e=Qr(t),n=Te(t,uo);return e===Qr(n)?e=o:n.pop(),n.length&&n[0]===t[0]?yi(n,nr(e,2)):[]}),Hr=$i(function(t){var e=Qr(t),n=Te(t,uo);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?yi(n,o,e):[]});function Qr(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Yr=$i(zr);function zr(t,e){return t&&t.length&&e&&e.length?Li(t,e):t}var Vr=Go(function(t,e){var n=null==t?0:t.length,i=ti(t,e);return Ji(t,Te(e,function(t){return pr(t,n)?+t:t}).sort(_o)),i});function Gr(t){return null==t?t:vn.call(t)}var Wr=$i(function(t){return io(ui(t,1,$s,!0))}),Kr=$i(function(t){var e=Qr(t);return $s(e)&&(e=o),io(ui(t,1,$s,!0),nr(e,2))}),Xr=$i(function(t){var e=Qr(t);return e="function"==typeof e?e:o,io(ui(t,1,$s,!0),o,e)});function ts(t){if(!t||!t.length)return[];var e=0;return t=Ae(t,function(t){if($s(t))return e=pn(t.length,e),!0}),$e(e,function(e){return Te(t,Le(e))})}function es(t,e){if(!t||!t.length)return[];var n=ts(t);return null==e?n:Te(n,function(t){return xe(e,o,t)})}var ns=$i(function(t,e){return $s(t)?ri(t,e):[]}),is=$i(function(t){return co(Ae(t,$s))}),os=$i(function(t){var e=Qr(t);return $s(e)&&(e=o),co(Ae(t,$s),nr(e,2))}),rs=$i(function(t){var e=Qr(t);return e="function"==typeof e?e:o,co(Ae(t,$s),o,e)}),ss=$i(ts),as=$i(function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,es(t,n)});function cs(t){var e=qn(t);return e.__chain__=!0,e}function ls(t,e){return e(t)}var ds=Go(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,r=function(e){return ti(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Dn&&pr(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:ls,args:[r],thisArg:o}),new Fn(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(r)}),us=Zo(function(t,e,n){Mt.call(t,n)?++t[n]:Xn(t,n,1)}),ps=Po(Lr),hs=Po(Jr);function gs(t,e){return(Js(t)?Ce:si)(t,nr(e,3))}function fs(t,e){return(Js(t)?we:ai)(t,nr(e,3))}var ms=Zo(function(t,e,n){Mt.call(t,n)?t[n].push(e):Xn(t,n,[e])}),vs=$i(function(t,e,n){var o=-1,r="function"==typeof e,s=Rs(t)?i(t.length):[];return si(t,function(t){s[++o]=r?xe(e,t,n):Ai(t,e,n)}),s}),bs=Zo(function(t,e,n){Xn(t,n,e)});function xs(t,e){return(Js(t)?Te:Pi)(t,nr(e,3))}var _s=Zo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Cs=$i(function(t,e){if(null==t)return[];var n=e.length;return n>1&&hr(t,e[0],e[1])?e=[]:n>2&&hr(e[0],e[1],e[2])&&(e=[e[0]]),Fi(t,ui(e,1),[])}),ws=re||function(){return ae.Date.now()};function ys(t,e,n){return e=n?o:e,Ho(t,128,o,o,o,o,e=t&&null==e?t.length:e)}function As(t,e){var n;if("function"!=typeof e)throw new At(r);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Zs=$i(function(t,e,n){var i=1;if(n.length){var o=on(n,er(Zs));i|=32}return Ho(t,i,e,n,o)}),ks=$i(function(t,e,n){var i=3;if(n.length){var o=on(n,er(ks));i|=32}return Ho(e,i,t,n,o)});function Ts(t,e,n){var i,s,a,c,l,d,u=0,p=!1,h=!1,g=!0;if("function"!=typeof t)throw new At(r);function f(e){var n=i,r=s;return i=s=o,u=e,c=t.apply(r,n)}function m(t){return u=t,l=Zr(b,e),p?f(t):c}function v(t){var n=t-d;return d===o||n>=e||n<0||h&&t-u>=a}function b(){var t=ws();if(v(t))return x(t);l=Zr(b,function(t){var n=e-(t-d);return h?hn(n,a-(t-u)):n}(t))}function x(t){return l=o,g&&i?f(t):(i=s=o,c)}function _(){var t=ws(),n=v(t);if(i=arguments,s=this,d=t,n){if(l===o)return m(d);if(h)return mo(l),l=Zr(b,e),f(d)}return l===o&&(l=Zr(b,e)),c}return e=pa(e)||0,Gs(n)&&(p=!!n.leading,a=(h="maxWait"in n)?pn(pa(n.maxWait)||0,e):a,g="trailing"in n?!!n.trailing:g),_.cancel=function(){l!==o&&mo(l),u=0,i=d=s=l=o},_.flush=function(){return l===o?c:x(ws())},_}var Os=$i(function(t,e){return oi(t,1,e)}),Ms=$i(function(t,e,n){return oi(t,pa(e)||0,n)});function Is(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new At(r);var n=function(){var i=arguments,o=e?e.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var s=t.apply(this,i);return n.cache=r.set(o,s)||r,s};return n.cache=new(Is.Cache||jn),n}function Ss(t){if("function"!=typeof t)throw new At(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Is.Cache=jn;var Ps=go(function(t,e){var n=(e=1==e.length&&Js(e[0])?Te(e[0],He(nr())):Te(ui(e,1),He(nr()))).length;return $i(function(i){for(var o=-1,r=hn(i.length,n);++o<r;)i[o]=e[o].call(this,i[o]);return xe(t,this,i)})}),Ns=$i(function(t,e){var n=on(e,er(Ns));return Ho(t,32,o,e,n)}),qs=$i(function(t,e){var n=on(e,er(qs));return Ho(t,64,o,e,n)}),Us=Go(function(t,e){return Ho(t,256,o,o,o,e)});function Es(t,e){return t===e||t!=t&&e!=e}var Fs=Jo(_i),Ds=Jo(function(t,e){return t>=e}),Ls=Zi(function(){return arguments}())?Zi:function(t){return Ws(t)&&Mt.call(t,"callee")&&!Rt.call(t,"callee")},Js=i.isArray,js=he?He(he):function(t){return Ws(t)&&xi(t)==O};function Rs(t){return null!=t&&Vs(t.length)&&!Ys(t)}function $s(t){return Ws(t)&&Rs(t)}var Bs=pe||pc,Hs=ge?He(ge):function(t){return Ws(t)&&xi(t)==f};function Qs(t){if(!Ws(t))return!1;var e=xi(t);return e==m||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ta(t)}function Ys(t){if(!Gs(t))return!1;var e=xi(t);return e==v||e==b||"[object AsyncFunction]"==e||"[object Proxy]"==e}function zs(t){return"number"==typeof t&&t==da(t)}function Vs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Gs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ws(t){return null!=t&&"object"==typeof t}var Ks=fe?He(fe):function(t){return Ws(t)&&cr(t)==x};function Xs(t){return"number"==typeof t||Ws(t)&&xi(t)==_}function ta(t){if(!Ws(t)||xi(t)!=C)return!1;var e=Jt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Nt}var ea=me?He(me):function(t){return Ws(t)&&xi(t)==y},na=ve?He(ve):function(t){return Ws(t)&&cr(t)==A};function ia(t){return"string"==typeof t||!Js(t)&&Ws(t)&&xi(t)==Z}function oa(t){return"symbol"==typeof t||Ws(t)&&xi(t)==k}var ra=be?He(be):function(t){return Ws(t)&&Vs(t.length)&&!!te[xi(t)]},sa=Jo(Si),aa=Jo(function(t,e){return t<=e});function ca(t){if(!t)return[];if(Rs(t))return ia(t)?an(t):yo(t);if(Ht&&t[Ht])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ht]());var e=cr(t);return(e==x?en:e==A?rn:Ea)(t)}function la(t){return t?(t=pa(t))===c||t===-c?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=la(t),n=e%1;return e==e?n?e-n:e:0}function ua(t){return t?ei(da(t),0,d):0}function pa(t){if("number"==typeof t)return t;if(oa(t))return NaN;if(Gs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Gs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Be(t);var n=ut.test(t);return n||ht.test(t)?oe(t.slice(2),n?2:8):dt.test(t)?NaN:+t}function ha(t){return Ao(t,Oa(t))}function ga(t){return null==t?"":no(t)}var fa=ko(function(t,e){if(vr(e)||Rs(e))Ao(e,Ta(e),t);else for(var n in e)Mt.call(e,n)&&Vn(t,n,e[n])}),ma=ko(function(t,e){Ao(e,Oa(e),t)}),va=ko(function(t,e,n,i){Ao(e,Oa(e),t,i)}),ba=ko(function(t,e,n,i){Ao(e,Ta(e),t,i)}),xa=Go(ti),_a=$i(function(t,e){t=Ct(t);var n=-1,i=e.length,r=i>2?e[2]:o;for(r&&hr(e[0],e[1],r)&&(i=1);++n<i;)for(var s=e[n],a=Oa(s),c=-1,l=a.length;++c<l;){var d=a[c],u=t[d];(u===o||Es(u,kt[d])&&!Mt.call(t,d))&&(t[d]=s[d])}return t}),Ca=$i(function(t){return t.push(o,Yo),xe(Ia,o,t)});function wa(t,e,n){var i=null==t?o:vi(t,e);return i===o?n:i}function ya(t,e){return null!=t&&lr(t,e,wi)}var Aa=Uo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Pt.call(e)),t[e]=n},Ga(Xa)),Za=Uo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Pt.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]},nr),ka=$i(Ai);function Ta(t){return Rs(t)?Bn(t):Ii(t)}function Oa(t){return Rs(t)?Bn(t,!0):function(t){if(!Gs(t))return function(t){var e=[];
vendor: 9,239 bytes, line 1
1if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=vr(t),n=[];for(var i in t)"constructor"==i&&(e||!Mt.call(t,i))||n.push(i);return n}(t)}var Ma=ko(function(t,e,n){Ui(t,e,n)}),Ia=ko(function(t,e,n,i){Ui(t,e,n,i)}),Sa=Go(function(t,e){var n={};if(null==t)return n;var i=!1;e=Te(e,function(e){return e=ho(e,t),i||(i=e.length>1),e}),Ao(t,Ko(t),n),i&&(n=ni(n,7,zo));for(var o=e.length;o--;)oo(n,e[o]);return n}),Pa=Go(function(t,e){return null==t?{}:function(t,e){return Di(t,e,function(e,n){return ya(t,n)})}(t,e)});function Na(t,e){if(null==t)return{};var n=Te(Ko(t),function(t){return[t]});return e=nr(e),Di(t,n,function(t,n){return e(t,n[0])})}var qa=Bo(Ta),Ua=Bo(Oa);function Ea(t){return null==t?[]:Qe(t,Ta(t))}var Fa=Io(function(t,e,n){return e=e.toLowerCase(),t+(n?Da(e):e)});function Da(t){return Qa(ga(t).toLowerCase())}function La(t){return(t=ga(t))&&t.replace(ft,We).replace(Yt,"")}var Ja=Io(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),ja=Io(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ra=Mo("toLowerCase"),$a=Io(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Ba=Io(function(t,e,n){return t+(n?" ":"")+Qa(e)}),Ha=Io(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Qa=Mo("toUpperCase");function Ya(t,e,n){return t=ga(t),(e=n?o:e)===o?function(t){return Wt.test(t)}(t)?function(t){return t.match(Vt)||[]}(t):function(t){return t.match(rt)||[]}(t):t.match(e)||[]}var za=$i(function(t,e){try{return xe(t,o,e)}catch(Sr){return Qs(Sr)?Sr:new bt(Sr)}}),Va=Go(function(t,e){return Ce(e,function(e){e=Nr(e),Xn(t,e,Zs(t[e],t))}),t});function Ga(t){return function(){return t}}var Wa=No(),Ka=No(!0);function Xa(t){return t}function tc(t){return Mi("function"==typeof t?t:ni(t,1))}var ec=$i(function(t,e){return function(n){return Ai(n,t,e)}}),nc=$i(function(t,e){return function(n){return Ai(t,n,e)}});function ic(t,e,n){var i=Ta(e),o=mi(e,i);null==n&&(!Gs(e)||!o.length&&i.length)&&(n=e,e=t,t=this,o=mi(e,Ta(e)));var r=!(Gs(n)&&"chain"in n&&!n.chain),s=Ys(t);return Ce(o,function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(r||e){var n=t(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Oe([this.value()],arguments))})}),t}function oc(){}var rc=Fo(Te),sc=Fo(ye),ac=Fo(Se);function cc(t){return gr(t)?Le(Nr(t)):function(t){return function(e){return vi(e,t)}}(t)}var lc=Lo(),dc=Lo(!0);function uc(){return[]}function pc(){return!1}var hc=Eo(function(t,e){return t+e},0),gc=Ro("ceil"),fc=Eo(function(t,e){return t/e},1),mc=Ro("floor"),vc=Eo(function(t,e){return t*e},1),bc=Ro("round"),xc=Eo(function(t,e){return t-e},0);return qn.after=function(t,e){if("function"!=typeof e)throw new At(r);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=ys,qn.assign=fa,qn.assignIn=ma,qn.assignInWith=va,qn.assignWith=ba,qn.at=xa,qn.before=As,qn.bind=Zs,qn.bindAll=Va,qn.bindKey=ks,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Js(t)?t:[t]},qn.chain=cs,qn.chunk=function(t,e,n){e=(n?hr(t,e,n):e===o)?1:pn(da(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var s=0,a=0,c=i(ce(r/e));s<r;)c[a++]=Gi(t,s,s+=e);return c},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,o=[];++e<n;){var r=t[e];r&&(o[i++]=r)}return o},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Oe(Js(n)?yo(n):[n],ui(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=nr();return t=e?Te(t,function(t){if("function"!=typeof t[1])throw new At(r);return[n(t[0]),t[1]]}):[],$i(function(n){for(var i=-1;++i<e;){var o=t[i];if(xe(o[0],this,n))return xe(o[1],this,n)}})},qn.conforms=function(t){return function(t){var e=Ta(t);return function(n){return ii(n,t,e)}}(ni(t,1))},qn.constant=Ga,qn.countBy=us,qn.create=function(t,e){var n=Un(t);return null==e?n:Kn(n,e)},qn.curry=function t(e,n,i){var r=Ho(e,8,o,o,o,o,o,n=i?o:n);return r.placeholder=t.placeholder,r},qn.curryRight=function t(e,n,i){var r=Ho(e,16,o,o,o,o,o,n=i?o:n);return r.placeholder=t.placeholder,r},qn.debounce=Ts,qn.defaults=_a,qn.defaultsDeep=Ca,qn.defer=Os,qn.delay=Ms,qn.difference=Er,qn.differenceBy=Fr,qn.differenceWith=Dr,qn.drop=function(t,e,n){var i=null==t?0:t.length;return i?Gi(t,(e=n||e===o?1:da(e))<0?0:e,i):[]},qn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?Gi(t,0,(e=i-(e=n||e===o?1:da(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?so(t,nr(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?so(t,nr(e,3),!0):[]},qn.fill=function(t,e,n,i){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&hr(t,e,n)&&(n=0,i=r),function(t,e,n,i){var r=t.length;for((n=da(n))<0&&(n=-n>r?0:r+n),(i=i===o||i>r?r:da(i))<0&&(i+=r),i=n>i?0:ua(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},qn.filter=function(t,e){return(Js(t)?Ae:di)(t,nr(e,3))},qn.flatMap=function(t,e){return ui(xs(t,e),1)},qn.flatMapDeep=function(t,e){return ui(xs(t,e),c)},qn.flatMapDepth=function(t,e,n){return n=n===o?1:da(n),ui(xs(t,e),n)},qn.flatten=jr,qn.flattenDeep=function(t){return null!=t&&t.length?ui(t,c):[]},qn.flattenDepth=function(t,e){return null!=t&&t.length?ui(t,e=e===o?1:da(e)):[]},qn.flip=function(t){return Ho(t,512)},qn.flow=Wa,qn.flowRight=Ka,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var o=t[e];i[o[0]]=o[1]}return i},qn.functions=function(t){return null==t?[]:mi(t,Ta(t))},qn.functionsIn=function(t){return null==t?[]:mi(t,Oa(t))},qn.groupBy=ms,qn.initial=function(t){return null!=t&&t.length?Gi(t,0,-1):[]},qn.intersection=$r,qn.intersectionBy=Br,qn.intersectionWith=Hr,qn.invert=Aa,qn.invertBy=Za,qn.invokeMap=vs,qn.iteratee=tc,qn.keyBy=bs,qn.keys=Ta,qn.keysIn=Oa,qn.map=xs,qn.mapKeys=function(t,e){var n={};return e=nr(e,3),gi(t,function(t,i,o){Xn(n,e(t,i,o),t)}),n},qn.mapValues=function(t,e){var n={};return e=nr(e,3),gi(t,function(t,i,o){Xn(n,i,e(t,i,o))}),n},qn.matches=function(t){return Ni(ni(t,1))},qn.matchesProperty=function(t,e){return qi(t,ni(e,1))},qn.memoize=Is,qn.merge=Ma,qn.mergeWith=Ia,qn.method=ec,qn.methodOf=nc,qn.mixin=ic,qn.negate=Ss,qn.nthArg=function(t){return t=da(t),$i(function(e){return Ei(e,t)})},qn.omit=Sa,qn.omitBy=function(t,e){return Na(t,Ss(nr(e)))},qn.once=function(t){return As(2,t)},qn.orderBy=function(t,e,n,i){return null==t?[]:(Js(e)||(e=null==e?[]:[e]),Js(n=i?o:n)||(n=null==n?[]:[n]),Fi(t,e,n))},qn.over=rc,qn.overArgs=Ps,qn.overEvery=sc,qn.overSome=ac,qn.partial=Ns,qn.partialRight=qs,qn.partition=_s,qn.pick=Pa,qn.pickBy=Na,qn.property=cc,qn.propertyOf=function(t){return function(e){return null==t?o:vi(t,e)}},qn.pull=Yr,qn.pullAll=zr,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Li(t,e,nr(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Li(t,e,o,n):t},qn.pullAt=Vr,qn.range=lc,qn.rangeRight=dc,qn.rearg=Us,qn.reject=function(t,e){return(Js(t)?Ae:di)(t,Ss(nr(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,o=[],r=t.length;for(e=nr(e,3);++i<r;){var s=t[i];e(s,i,t)&&(n.push(s),o.push(i))}return Ji(t,o),n},qn.rest=function(t,e){if("function"!=typeof t)throw new At(r);return $i(t,e=e===o?e:da(e))},qn.reverse=Gr,qn.sampleSize=function(t,e,n){return e=(n?hr(t,e,n):e===o)?1:da(e),(Js(t)?Qn:Hi)(t,e)},qn.set=function(t,e,n){return null==t?t:Qi(t,e,n)},qn.setWith=function(t,e,n,i){return i="function"==typeof i?i:o,null==t?t:Qi(t,e,n,i)},qn.shuffle=function(t){return(Js(t)?Yn:Vi)(t)},qn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&hr(t,e,n)?(e=0,n=i):(e=null==e?0:da(e),n=n===o?i:da(n)),Gi(t,e,n)):[]},qn.sortBy=Cs,qn.sortedUniq=function(t){return t&&t.length?to(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?to(t,nr(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&hr(t,e,n)&&(e=n=o),(n=n===o?d:n>>>0)?(t=ga(t))&&("string"==typeof e||null!=e&&!ea(e))&&!(e=no(e))&&tn(t)?fo(an(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new At(r);return e=null==e?0:pn(da(e),0),$i(function(n){var i=n[e],o=fo(n,0,e);return i&&Oe(o,i),xe(t,this,o)})},qn.tail=function(t){var e=null==t?0:t.length;return e?Gi(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?Gi(t,0,(e=n||e===o?1:da(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?Gi(t,(e=i-(e=n||e===o?1:da(e)))<0?0:e,i):[]},qn.takeRightWhile=function(t,e){return t&&t.length?so(t,nr(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?so(t,nr(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new At(r);return Gs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ts(t,e,{leading:i,maxWait:e,trailing:o})},qn.thru=ls,qn.toArray=ca,qn.toPairs=qa,qn.toPairsIn=Ua,qn.toPath=function(t){return Js(t)?Te(t,Nr):oa(t)?[t]:yo(Pr(ga(t)))},qn.toPlainObject=ha,qn.transform=function(t,e,n){var i=Js(t),o=i||Bs(t)||ra(t);if(e=nr(e,4),null==n){var r=t&&t.constructor;n=o?i?new r:[]:Gs(t)&&Ys(r)?Un(Jt(t)):{}}return(o?Ce:gi)(t,function(t,i,o){return e(n,t,i,o)}),n},qn.unary=function(t){return ys(t,1)},qn.union=Wr,qn.unionBy=Kr,qn.unionWith=Xr,qn.uniq=function(t){return t&&t.length?
vendor: 4,475 bytes, line 1
1io(t):[]},qn.uniqBy=function(t,e){return t&&t.length?io(t,nr(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?io(t,o,e):[]},qn.unset=function(t,e){return null==t||oo(t,e)},qn.unzip=ts,qn.unzipWith=es,qn.update=function(t,e,n){return null==t?t:ro(t,e,po(n))},qn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:o,null==t?t:ro(t,e,po(n),i)},qn.values=Ea,qn.valuesIn=function(t){return null==t?[]:Qe(t,Oa(t))},qn.without=ns,qn.words=Ya,qn.wrap=function(t,e){return Ns(po(e),t)},qn.xor=is,qn.xorBy=os,qn.xorWith=rs,qn.zip=ss,qn.zipObject=function(t,e){return lo(t||[],e||[],Vn)},qn.zipObjectDeep=function(t,e){return lo(t||[],e||[],Qi)},qn.zipWith=as,qn.entries=qa,qn.entriesIn=Ua,qn.extend=ma,qn.extendWith=va,ic(qn,qn),qn.add=hc,qn.attempt=za,qn.camelCase=Fa,qn.capitalize=Da,qn.ceil=gc,qn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=pa(n))==n?n:0),e!==o&&(e=(e=pa(e))==e?e:0),ei(pa(t),e,n)},qn.clone=function(t){return ni(t,4)},qn.cloneDeep=function(t){return ni(t,5)},qn.cloneDeepWith=function(t,e){return ni(t,5,e="function"==typeof e?e:o)},qn.cloneWith=function(t,e){return ni(t,4,e="function"==typeof e?e:o)},qn.conformsTo=function(t,e){return null==e||ii(t,e,Ta(e))},qn.deburr=La,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=fc,qn.endsWith=function(t,e,n){t=ga(t),e=no(e);var i=t.length,r=n=n===o?i:ei(da(n),0,i);return(n-=e.length)>=0&&t.slice(n,r)==e},qn.eq=Es,qn.escape=function(t){return(t=ga(t))&&H.test(t)?t.replace($,Ke):t},qn.escapeRegExp=function(t){return(t=ga(t))&&X.test(t)?t.replace(K,"\\$&"):t},qn.every=function(t,e,n){var i=Js(t)?ye:ci;return n&&hr(t,e,n)&&(e=o),i(t,nr(e,3))},qn.find=ps,qn.findIndex=Lr,qn.findKey=function(t,e){return Ne(t,nr(e,3),gi)},qn.findLast=hs,qn.findLastIndex=Jr,qn.findLastKey=function(t,e){return Ne(t,nr(e,3),fi)},qn.floor=mc,qn.forEach=gs,qn.forEachRight=fs,qn.forIn=function(t,e){return null==t?t:pi(t,nr(e,3),Oa)},qn.forInRight=function(t,e){return null==t?t:hi(t,nr(e,3),Oa)},qn.forOwn=function(t,e){return t&&gi(t,nr(e,3))},qn.forOwnRight=function(t,e){return t&&fi(t,nr(e,3))},qn.get=wa,qn.gt=Fs,qn.gte=Ds,qn.has=function(t,e){return null!=t&&lr(t,e,Ci)},qn.hasIn=ya,qn.head=Rr,qn.identity=Xa,qn.includes=function(t,e,n,i){t=Rs(t)?t:Ea(t),n=n&&!i?da(n):0;var o=t.length;return n<0&&(n=pn(o+n,0)),ia(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Ue(t,e,n)>-1},qn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=null==n?0:da(n);return o<0&&(o=pn(i+o,0)),Ue(t,e,o)},qn.inRange=function(t,e,n){return e=la(e),n===o?(n=e,e=0):n=la(n),function(t,e,n){return t>=hn(e,n)&&t<pn(e,n)}(t=pa(t),e,n)},qn.invoke=ka,qn.isArguments=Ls,qn.isArray=Js,qn.isArrayBuffer=js,qn.isArrayLike=Rs,qn.isArrayLikeObject=$s,qn.isBoolean=function(t){return!0===t||!1===t||Ws(t)&&xi(t)==g},qn.isBuffer=Bs,qn.isDate=Hs,qn.isElement=function(t){return Ws(t)&&1===t.nodeType&&!ta(t)},qn.isEmpty=function(t){if(null==t)return!0;if(Rs(t)&&(Js(t)||"string"==typeof t||"function"==typeof t.splice||Bs(t)||ra(t)||Ls(t)))return!t.length;var e=cr(t);if(e==x||e==A)return!t.size;if(vr(t))return!Ii(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return ki(t,e)},qn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:o)?n(t,e):o;return i===o?ki(t,e,o,n):!!i},qn.isError=Qs,qn.isFinite=function(t){return"number"==typeof t&&Pe(t)},qn.isFunction=Ys,qn.isInteger=zs,qn.isLength=Vs,qn.isMap=Ks,qn.isMatch=function(t,e){return t===e||Ti(t,e,or(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Ti(t,e,or(e),n)},qn.isNaN=function(t){return Xs(t)&&t!=+t},qn.isNative=function(t){if(mr(t))throw new bt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Oi(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=Xs,qn.isObject=Gs,qn.isObjectLike=Ws,qn.isPlainObject=ta,qn.isRegExp=ea,qn.isSafeInteger=function(t){return zs(t)&&t>=-l&&t<=l},qn.isSet=na,qn.isString=ia,qn.isSymbol=oa,qn.isTypedArray=ra,qn.isUndefined=function(t){return t===o},qn.isWeakMap=function(t){return Ws(t)&&cr(t)==T},qn.isWeakSet=function(t){return Ws(t)&&"[object WeakSet]"==xi(t)},qn.join=function(t,e){return null==t?"":Je.call(t,e)},qn.kebabCase=Ja,qn.last=Qr,qn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i;return n!==o&&(r=(r=da(n))<0?pn(i+r,0):hn(r,i-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,r):qe(t,Fe,r,!0)}
vendor: 4,184 bytes, line 1
1,qn.lowerCase=ja,qn.lowerFirst=Ra,qn.lt=sa,qn.lte=aa,qn.max=function(t){return t&&t.length?li(t,Xa,_i):o},qn.maxBy=function(t,e){return t&&t.length?li(t,nr(e,2),_i):o},qn.mean=function(t){return De(t,Xa)},qn.meanBy=function(t,e){return De(t,nr(e,2))},qn.min=function(t){return t&&t.length?li(t,Xa,Si):o},qn.minBy=function(t,e){return t&&t.length?li(t,nr(e,2),Si):o},qn.stubArray=uc,qn.stubFalse=pc,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=vc,qn.nth=function(t,e){return t&&t.length?Ei(t,da(e)):o},qn.noConflict=function(){return ae._===this&&(ae._=qt),this},qn.noop=oc,qn.now=ws,qn.pad=function(t,e,n){t=ga(t);var i=(e=da(e))?sn(t):0;if(!e||i>=e)return t;var o=(e-i)/2;return Do(le(o),n)+t+Do(ce(o),n)},qn.padEnd=function(t,e,n){t=ga(t);var i=(e=da(e))?sn(t):0;return e&&i<e?t+Do(e-i,n):t},qn.padStart=function(t,e,n){t=ga(t);var i=(e=da(e))?sn(t):0;return e&&i<e?Do(e-i,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),fn(ga(t).replace(tt,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&hr(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=la(t),e===o?(e=t,t=0):e=la(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var r=mn();return hn(t+r*(e-t+ie("1e-"+((r+"").length-1))),e)}return ji(t,e)},qn.reduce=function(t,e,n){var i=Js(t)?Me:je,o=arguments.length<3;return i(t,nr(e,4),n,o,si)},qn.reduceRight=function(t,e,n){var i=Js(t)?Ie:je,o=arguments.length<3;return i(t,nr(e,4),n,o,ai)},qn.repeat=function(t,e,n){return e=(n?hr(t,e,n):e===o)?1:da(e),Ri(ga(t),e)},qn.replace=function(){var t=arguments,e=ga(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var i=-1,r=(e=ho(e,t)).length;for(r||(r=1,t=o);++i<r;){var s=null==t?o:t[Nr(e[i])];s===o&&(i=r,s=n),t=Ys(s)?s.call(t):s}return t},qn.round=bc,qn.runInContext=t,qn.sample=function(t){return(Js(t)?Hn:Bi)(t)},qn.size=function(t){if(null==t)return 0;if(Rs(t))return ia(t)?sn(t):t.length;var e=cr(t);return e==x||e==A?t.size:Ii(t).length},qn.snakeCase=$a,qn.some=function(t,e,n){var i=Js(t)?Se:Wi;return n&&hr(t,e,n)&&(e=o),i(t,nr(e,3))},qn.sortedIndex=function(t,e){return Ki(t,e)},qn.sortedIndexBy=function(t,e,n){return Xi(t,e,nr(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=Ki(t,e);if(i<n&&Es(t[i],e))return i}return-1},qn.sortedLastIndex=function(t,e){return Ki(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return Xi(t,e,nr(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Ki(t,e,!0)-1;if(Es(t[n],e))return n}return-1},qn.startCase=Ba,qn.startsWith=function(t,e,n){return t=ga(t),n=null==n?0:ei(da(n),0,t.length),e=no(e),t.slice(n,n+e.length)==e},qn.subtract=xc,qn.sum=function(t){return t&&t.length?Re(t,Xa):0},qn.sumBy=function(t,e){return t&&t.length?Re(t,nr(e,2)):0},qn.template=function(t,e,n){var i=qn.templateSettings;n&&hr(t,e,n)&&(e=o),t=ga(t),e=va({},e,i,Qo);var r,s,a=va({},e.imports,i.imports,Qo),c=Ta(a),l=Qe(a,c),d=0,u=e.interpolate||mt,p="__p += '",h=wt((e.escape||mt).source+"|"+u.source+"|"+(u===z?ct:mt).source+"|"+(e.evaluate||mt).source+"|$","g"),g="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xt+"]")+"\n";t.replace(h,function(e,n,i,o,a,c){return i||(i=o),p+=t.slice(d,c).replace(vt,Xe),n&&(r=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),i&&(p+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),d=c+e.length,e}),p+="';\n";var f=Mt.call(e,"variable")&&e.variable;if(f){if(st.test(f))throw new bt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(L,""):p).replace(J,"$1").replace(j,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=za(function(){return xt(c,g+"return "+p).apply(o,l)});if(m.source=p,Qs(m))throw m;return m},qn.times=function(t,e){if((t=da(t))<1||t>l)return[];var n=d,i=hn(t,d);e=nr(e),t-=d;for(var o=$e(i,e);++n<t;)e(n);return o}
vendor: 6,652 bytes, line 1
1,qn.toFinite=la,qn.toInteger=da,qn.toLength=ua,qn.toLower=function(t){return ga(t).toLowerCase()},qn.toNumber=pa,qn.toSafeInteger=function(t){return t?ei(da(t),-l,l):0===t?t:0},qn.toString=ga,qn.toUpper=function(t){return ga(t).toUpperCase()},qn.trim=function(t,e,n){if((t=ga(t))&&(n||e===o))return Be(t);if(!t||!(e=no(e)))return t;var i=an(t),r=an(e);return fo(i,ze(i,r),Ve(i,r)+1).join("")},qn.trimEnd=function(t,e,n){if((t=ga(t))&&(n||e===o))return t.slice(0,cn(t)+1);if(!t||!(e=no(e)))return t;var i=an(t);return fo(i,0,Ve(i,an(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=ga(t))&&(n||e===o))return t.replace(tt,"");if(!t||!(e=no(e)))return t;var i=an(t);return fo(i,ze(i,an(e))).join("")},qn.truncate=function(t,e){var n=30,i="...";if(Gs(e)){var r="separator"in e?e.separator:r;n="length"in e?da(e.length):n,i="omission"in e?no(e.omission):i}var s=(t=ga(t)).length;if(tn(t)){var a=an(t);s=a.length}if(n>=s)return t;var c=n-sn(i);if(c<1)return i;var l=a?fo(a,0,c).join(""):t.slice(0,c);if(r===o)return l+i;if(a&&(c+=l.length-c),ea(r)){if(t.slice(c).search(r)){var d,u=l;for(r.global||(r=wt(r.source,ga(lt.exec(r))+"g")),r.lastIndex=0;d=r.exec(u);)var p=d.index;l=l.slice(0,p===o?c:p)}}else if(t.indexOf(no(r),c)!=c){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i},qn.unescape=function(t){return(t=ga(t))&&B.test(t)?t.replace(R,ln):t},qn.uniqueId=function(t){var e=++It;return ga(t)+e},qn.upperCase=Ha,qn.upperFirst=Qa,qn.each=gs,qn.eachRight=fs,qn.first=Rr,ic(qn,function(){var t={};return gi(qn,function(e,n){Mt.call(qn.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),qn.VERSION="4.17.21",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){qn[t].placeholder=qn}),Ce(["drop","take"],function(t,e){Dn.prototype[t]=function(n){n=n===o?1:pn(da(n),0);var i=this.__filtered__&&!e?new Dn(this):this.clone();return i.__filtered__?i.__takeCount__=hn(n,i.__takeCount__):i.__views__.push({size:hn(n,d),type:t+(i.__dir__<0?"Right":"")}),i},Dn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ce(["filter","map","takeWhile"],function(t,e){var n=e+1,i=1==n||3==n;Dn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:nr(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}}),Ce(["head","last"],function(t,e){var n="take"+(e?"Right":"");Dn.prototype[t]=function(){return this[n](1).value()[0]}}),Ce(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Dn.prototype[t]=function(){return this.__filtered__?new Dn(this):this[n](1)}}),Dn.prototype.compact=function(){return this.filter(Xa)},Dn.prototype.find=function(t){return this.filter(t).head()},Dn.prototype.findLast=function(t){return this.reverse().find(t)},Dn.prototype.invokeMap=$i(function(t,e){return"function"==typeof t?new Dn(this):this.map(function(n){return Ai(n,t,e)})}),Dn.prototype.reject=function(t){return this.filter(Ss(nr(t)))},Dn.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Dn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Dn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dn.prototype.toArray=function(){return this.take(d)},gi(Dn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),r=qn[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);!r||(qn.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,c=e instanceof Dn,l=a[0],d=c||Js(e),u=function(t){var e=r.apply(qn,Oe([t],a));return i&&p?e[0]:e};d&&n&&"function"==typeof l&&1!=l.length&&(c=d=!1);var p=this.__chain__,h=!!this.__actions__.length,g=s&&!p,f=c&&!h;if(!s&&d){e=f?e:new Dn(this);var m=t.apply(e,a);return m.__actions__.push({func:ls,args:[u],thisArg:o}),new Fn(m,p)}return g&&f?t.apply(this,a):(m=this.thru(u),g?i?m.value()[0]:m.value():m)})}),Ce(["pop","push","shift","sort","splice","unshift"],function(t){var e=Zt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var o=this.value();return e.apply(Js(o)?o:[],t)}return this[n](function(n){return e.apply(Js(n)?n:[],t)})}}),gi(Dn.prototype,function(t,e){var n=qn[e];if(n){var i=n.name+"";Mt.call(Zn,i)||(Zn[i]=[]),Zn[i].push({name:e,func:n})}}),Zn[qo(o,2).name]=[{name:"wrapper",func:o}],Dn.prototype.clone=function(){var t=new Dn(this.__wrapped__);return t.__actions__=yo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=yo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=yo(this.__views__),t},Dn.prototype.reverse=function(){if(this.__filtered__){var t=new Dn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Dn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Js(t),i=e<0,o=n?t.length:0,r=function(t,e,n){for(var i=-1,o=n.length;++i<o;){var r=n[i],s=r.size;switch(r.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=hn(e,t+s);break;case"takeRight":t=pn(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=r.start,a=r.end,c=a-s,l=i?a:s-1,d=this.__iteratees__,u=d.length,p=0,h=hn(c,this.__takeCount__);if(!n||!i&&o==c&&h==c)return ao(t,this.__actions__);var g=[];t:for(;c--&&p<h;){for(var f=-1,m=t[l+=e];++f<u;){var v=d[f],b=v.type,x=(0,v.iteratee)(m);if(2==b)m=x;else if(!x){if(1==b)continue t;break t}}g[p++]=m}return g},qn.prototype.at=ds,qn.prototype.chain=function(){return cs(this)},qn.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===o&&(this.__values__=ca(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof En;){var i=Ur(n);i.__index__=0,i.__values__=o,e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Dn){var e=t;return this.__actions__.length&&(e=new Dn(this)),(e=e.reverse()).__actions__.push({func:ls,args:[Gr],thisArg:o}),new Fn(e,this.__chain__)}return this.thru(Gr)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return ao(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,Ht&&(qn.prototype[Ht]=function(){return this}),qn}();ae._=dn,(i=(function(){return dn}).call(e,n,e,t))!==o&&(t.exports=i)}).call(this)},4691:function(t,e,n){"use strict";n.d(e,{oj:function(){return c}});var i=n(2316),o=n(7025),r=n(9653);class s{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}
1class a{constructor(t,e,n,o,r,s,a,c){this._viewContainerRef=t,this._renderer=e,this._elementRef=n,this._injector=o,this._componentFactoryResolver=r,this._ngZone=s,this._applicationRef=a,this._posService=c,this.onBeforeShow=new i.vpe,this.onShown=new i.vpe,this.onBeforeHide=new i.vpe,this.onHidden=new i.vpe,this._providers=[],this._isHiding=!1,this.containerDefaultSelector="body",this._listenOpts={},this._globalListener=Function.prototype}get isShown(){return!this._isHiding&&!!this._componentRef}attach(t){return this._componentFactory=this._componentFactoryResolver.resolveComponentFactory(t),this}to(t){return this.container=t||this.container,this}position(t){return t?(this.attachment=t.attachment||this.attachment,this._elementRef=t.target||this._elementRef,this):this}provide(t){return this._providers.push(t),this}show(t={}){if(this._subscribePositioning(),this._innerComponent=void 0,!this._componentRef){this.onBeforeShow.emit(),this._contentRef=this._getContentRef(t.content,t.context,t.initialState);const e=i.zs3.create({providers:this._providers,parent:this._injector});if(!this._componentFactory)return;if(this._componentRef=this._componentFactory.create(e,this._contentRef.nodes),this._applicationRef.attachView(this._componentRef.hostView),this.instance=this._componentRef.instance,Object.assign(this._componentRef.instance,t),this.container instanceof i.SBq&&this.container.nativeElement.appendChild(this._componentRef.location.nativeElement),"string"==typeof this.container&&"undefined"!=typeof document){const t=document.querySelector(this.container)||document.querySelector(this.containerDefaultSelector);if(!t)return;t.appendChild(this._componentRef.location.nativeElement)}!this.container&&this._elementRef&&this._elementRef.nativeElement.parentElement&&this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement),this._contentRef.componentRef&&(this._innerComponent=this._contentRef.componentRef.instance,this._contentRef.componentRef.changeDetectorRef.markForCheck(),this._contentRef.componentRef.changeDetectorRef.detectChanges()),this._componentRef.changeDetectorRef.markForCheck(),this._componentRef.changeDetectorRef.detectChanges(),this.onShown.emit(t.id?{id:t.id}:this._componentRef.instance)}return this._registerOutsideClick(),this._componentRef}hide(t){var e,n,i;if(!this._componentRef)return this;this._posService.deletePositionElement(this._componentRef.location),this.onBeforeHide.emit(this._componentRef.instance);const o=this._componentRef.location.nativeElement;return o.parentNode.removeChild(o),(null===(e=this._contentRef)||void 0===e?void 0:e.componentRef)&&this._contentRef.componentRef.destroy(),this._viewContainerRef&&(null===(n=this._contentRef)||void 0===n?void 0:n.viewRef)&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef)),(null===(i=this._contentRef)||void 0===i?void 0:i.viewRef)&&this._contentRef.viewRef.destroy(),this._contentRef=void 0,this._componentRef=void 0,this._removeGlobalListener(),this.onHidden.emit(t?{id:t}:null),this}toggle(){this.isShown?this.hide():this.show()}dispose(){this.isShown&&this.hide(),this._unsubscribePositioning(),this._unregisterListenersFn&&this._unregisterListenersFn()}listen(t){var e;this.triggers=t.triggers||this.triggers,this._listenOpts.outsideClick=t.outsideClick,this._listenOpts.outsideEsc=t.outsideEsc,t.target=t.target||(null===(e=this._elementRef)||void 0===e?void 0:e.nativeElement);const n=this._listenOpts.hide=()=>t.hide?t.hide():void this.hide(),i=this._listenOpts.show=e=>{t.show?t.show(e):this.show(e),e()};return this._renderer&&(this._unregisterListenersFn=(0,o.wo)(this._renderer,{target:t.target,triggers:t.triggers,show:i,hide:n,toggle:t=>{this.isShown?n():i(t)}})),this}_removeGlobalListener(){this._globalListener&&(this._globalListener(),this._globalListener=Function.prototype)}attachInline(t,e){return t&&e&&(this._inlineViewRef=t.createEmbeddedView(e)),this}_registerOutsideClick(){if(this._componentRef&&this._componentRef.location){if(this._listenOpts.outsideClick){const t=this._componentRef.location.nativeElement;setTimeout(()=>{this._renderer&&this._elementRef&&(this._globalListener=(0,o.Rg)(this._renderer,{targets:[t,this._elementRef.nativeElement],outsideClick:this._listenOpts.outsideClick,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()}))})}this._listenOpts.outsideEsc&&this._renderer&&this._elementRef&&(this._globalListener=(0,o.C)(this._renderer,{targets:[this._componentRef.location.nativeElement,this._elementRef.nativeElement],outsideEsc:this._listenOpts.outsideEsc,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()}))}}getInnerComponent(){return this._innerComponent}_subscribePositioning(){this._zoneSubscription||!this.attachment||(this.onShown.subscribe(()=>{var t;this._posService.position({element:null===(t=this._componentRef)||void 0===t?void 0:t.location,target:this._elementRef,attachment:this.attachment,appendToBody:"body"===this.container})}),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>{!this._componentRef||this._posService.calcPosition()}))}_unsubscribePositioning(){!this._zoneSubscription||(this._zoneSubscription.unsubscribe(),this._zoneSubscription=void 0)}_getContentRef(t,e,n){if(!t)return new s([]);if(t instanceof i.Rgc){if(this._viewContainerRef){const n=this._viewContainerRef.createEmbeddedView(t,e);return n.markForCheck(),new s([n.rootNodes],n)}const n=t.createEmbeddedView({});return this._applicationRef.attachView(n),new s([n.rootNodes],n)}if("function"==typeof t){const e=this._componentFactoryResolver.resolve
1ComponentFactory(t),o=i.zs3.create({providers:this._providers,parent:this._injector}),r=e.create(o);return Object.assign(r.instance,n),this._applicationRef.attachView(r.hostView),new s([[r.location.nativeElement]],r.hostView,r)}const o=this._renderer?[this._renderer.createText(`${t}`)]:[];return new s([o])}}let c=(()=>{class t{constructor(t,e,n,i,o){this._componentFactoryResolver=t,this._ngZone=e,this._injector=n,this._posService=i,this._applicationRef=o}createLoader(t,e,n){return new a(e,n,t,this._injector,this._componentFactoryResolver,this._ngZone,this._applicationRef,this._posService)}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(i._Vd),i.LFG(i.R0b),i.LFG(i.zs3),i.LFG(r.sA),i.LFG(i.z2F))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(i._Vd),(0,i.LFG)(i.R0b),(0,i.LFG)(i.gxx),(0,i.LFG)(r.sA),(0,i.LFG)(i.z2F))},token:t,providedIn:"root"}),t})()},7284:function(t,e,n){"use strict";n.d(e,{UZ:function(){return C},tT:function(){return O},zk:function(){return M}});var i=n(2316),o=n(7025),r=n(4691),s=n(9653),a=n(4364),c=n(3466);let l,d=(()=>{class t{constructor(){this._focusTrapStack=[]}register(t){this._focusTrapStack=this._focusTrapStack.filter(e=>e!==t);let e=this._focusTrapStack;e.length&&e[e.length-1]._disable(),e.push(t),t._enable()}deregister(t){t._disable();const e=this._focusTrapStack,n=e.indexOf(t);-1!==n&&(e.splice(n,1),e.length&&e[e.length-1]._enable())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})();try{l="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(I){l=!1}let u=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?(0,a.NF)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!l)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(i.Lbi))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(i.Lbi))},token:t,providedIn:"root"}),t})(),p=(()=>{class t{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(e){return null}}(function(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}(t));if(e&&(-1===g(e)||!this.isVisible(e)))return!1;let n=t.nodeName.toLowerCase(),i=g(t);return t.hasAttribute("contenteditable")?-1!==i:!("iframe"===n||"object"===n||this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===n?!!t.hasAttribute("controls")&&-1!==i:"video"===n?-1!==i&&(null!==i||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||h(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(u))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(u))},token:t,providedIn:"root"}),t})();function h(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function g(t){if(!h(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function f(t){return null!=t&&"false"!=`${t}`}class m{constructor(t,e,n,i,o=!1){this._element=t,this._checker=e,this._ngZone=n,this._document=i,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);for(let n=0;n<e.length;n++)e[n].hasAttribute(`cdk-focus-${t}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[n]):e[n].hasAttribute(`cdk-focus-region-${t}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[n]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),!this._checker.isFocusable(t)){const e=this._getFirstTabbableElement(t);return null==e||e.focus(),!!e}return t.focus(),!0}return this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=0;n<e.length;n++){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=e.length-1;n>=0;n--){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe((0,c.q)(1)).subscribe(t)}}let v=(()=>{class t{constructor(t,e,n){this._checker=t,this._ngZone=e,this._document=n}create(t,e=!1){return new m(t,this._checker,this._ngZone,this._document,e)}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(p),i.LFG(i.R0b),i.LFG(a.K0))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(p),(0,i.LFG)(i.R0b),(0,i.LFG)(a.K0))},token:t,providedIn:"root"}),t})(),b=(()=>{class t{constructor(t,e,n){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._autoCapture=!1,this._document=n,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}get enabled(){return this.focusTrap.enabled}set enabled(t){this.focusTrap.enabled=f(t)}
1get autoCapture(){return this._autoCapture}set autoCapture(t){this._autoCapture=f(t)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(t){const e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(v),i.Y36(a.K0))},t.\u0275dir=i.lG2({type:t,selectors:[["","focusTrap",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["focusTrap"],features:[i.TTD]}),t})(),x=(()=>{class t{static forRoot(){return{ngModule:t,providers:[d,u,p]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[[a.ez]]}),t})();const _=["*"];let C=(()=>{class t{constructor(){this.hide=()=>{},this.setClass=()=>{}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})(),w=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})();const y={backdrop:!0,keyboard:!0,focus:!0,show:!1,ignoreBackdropClick:!1,class:"",animated:!0,initialState:{},closeInterceptor:void 0},A=new i.OlP("override-default-config");let Z=(()=>{class t{constructor(t,e,n){this._element=e,this._renderer=n,this.isShown=!1,this.isAnimated=!1,this.isModalHiding=!1,this.clickStartedInContent=!1,this.config=Object.assign({},t)}ngOnInit(){this.isAnimated&&this._renderer.addClass(this._element.nativeElement,"fade"),this._renderer.setStyle(this._element.nativeElement,"display","block"),setTimeout(()=>{this.isShown=!0,this._renderer.addClass(this._element.nativeElement,(0,o.XA)()?"in":"show")},this.isAnimated?150:0),document&&document.body&&(this.bsModalService&&1===this.bsModalService.getModalsCount()&&(this.bsModalService.checkScrollbar(),this.bsModalService.setScrollbar()),this._renderer.addClass(document.body,"modal-open"),this._renderer.setStyle(document.body,"overflow-y","hidden")),this._element.nativeElement&&this._element.nativeElement.focus()}onClickStarted(t){this.clickStartedInContent=t.target!==this._element.nativeElement}onClickStop(t){var e;this.config.ignoreBackdropClick||"static"===this.config.backdrop||t.target!==this._element.nativeElement||this.clickStartedInContent?this.clickStartedInContent=!1:(null===(e=this.bsModalService)||void 0===e||e.setDismissReason("backdrop-click"),this.hide())}onPopState(){var t;null===(t=this.bsModalService)||void 0===t||t.setDismissReason("browser-back-navigation-clicked"),this.hide()}onEsc(t){var e,n;!this.isShown||((27===t.keyCode||"Escape"===t.key)&&t.preventDefault(),this.config.keyboard&&this.level===(null===(e=this.bsModalService)||void 0===e?void 0:e.getModalsCount())&&(null===(n=this.bsModalService)||void 0===n||n.setDismissReason("esc"),this.hide()))}ngOnDestroy(){this.isShown&&this._hide()}hide(){if(!this.isModalHiding&&this.isShown){if(this.config.closeInterceptor)return void this.config.closeInterceptor().then(()=>this._hide(),()=>{});this._hide()}}_hide(){this.isModalHiding=!0,this._renderer.removeClass(this._element.nativeElement,(0,o.XA)()?"in":"show"),setTimeout(()=>{var t,e;this.isShown=!1,document&&document.body&&1===(null===(t=this.bsModalService)||void 0===t?void 0:t.getModalsCount())&&(this._renderer.removeClass(document.body,"modal-open"),this._renderer.setStyle(document.body,"overflow-y","")),null===(e=this.bsModalService)||void 0===e||e.hide(this.config.id),this.isModalHiding=!1},this.isAnimated?300:0)}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(w),i.Y36(i.SBq),i.Y36(i.Qsj))},t.\u0275cmp=i.Xpm({type:t,selectors:[["modal-container"]],hostAttrs:["role","dialog","tabindex","-1",1,"modal"],hostVars:3,hostBindings:function(t,e){1&t&&i.NdJ("mousedown",function(t){return e.onClickStarted(t)})("click",function(t){return e.onClickStop(t)})("popstate",function(){return e.onPopState()},!1,i.Jf7)("keydown.esc",function(t){return e.onEsc(t)},!1,i.Jf7),2&t&&i.uIk("aria-modal",!0)("aria-labelledby",e.config.ariaLabelledBy)("aria-describedby",e.config.ariaDescribedby)},ngContentSelectors:_,decls:3,vars:2,consts:[["role","document","focusTrap",""],[1,"modal-content"]],template:function(t,e){1&t&&(i.F$t(),i.TgZ(0,"div",0),i.TgZ(1,"div",1),i.Hsn(2),i.qZA(),i.qZA()),2&t&&i.Tol("modal-dialog"+(e.config.class?" "+e.config.class:""))},directives:[b],encapsulation:2}),t})(),k=(()=>{class t{constructor(t,e){this._isAnimated=!1,this._isShown=!1,this.element=t,this.renderer=e}get isAnimated(){return this._isAnimated}set isAnimated(t){this._isAnimated=t}
1get isShown(){return this._isShown}set isShown(t){this._isShown=t,t?this.renderer.addClass(this.element.nativeElement,"in"):this.renderer.removeClass(this.element.nativeElement,"in"),(0,o.XA)()||(t?this.renderer.addClass(this.element.nativeElement,"show"):this.renderer.removeClass(this.element.nativeElement,"show"))}ngOnInit(){this.isAnimated&&(this.renderer.addClass(this.element.nativeElement,"fade"),o.cQ.reflow(this.element.nativeElement)),this.isShown=!0}}return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(i.Qsj))},t.\u0275cmp=i.Xpm({type:t,selectors:[["bs-modal-backdrop"]],hostAttrs:[1,"modal-backdrop"],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})(),T=1,O=(()=>{class t{constructor(t,e,n){this.clf=e,this.modalDefaultOption=n,this.onShow=new i.vpe,this.onShown=new i.vpe,this.onHide=new i.vpe,this.onHidden=new i.vpe,this.isBodyOverflowing=!1,this.originalBodyPadding=0,this.scrollbarWidth=0,this.modalsCount=0,this.loaders=[],this._backdropLoader=this.clf.createLoader(),this._renderer=t.createRenderer(null,null),this.config=n?Object.assign({},y,n):y}show(t,e){this.modalsCount++,this._createLoaders();const n=(null==e?void 0:e.id)||T++;return this.config=this.modalDefaultOption?Object.assign({},y,this.modalDefaultOption,e):Object.assign({},y,e),this.config.id=n,this._showBackdrop(),this.lastDismissReason=void 0,this._showModal(t)}hide(t){(1===this.modalsCount||null==t)&&(this._hideBackdrop(),this.resetScrollbar()),this.modalsCount=this.modalsCount>=1&&null!=t?this.modalsCount-1:0,setTimeout(()=>{this._hideModal(t),this.removeLoaders(t)},this.config.animated?150:0)}_showBackdrop(){const t=!0===this.config.backdrop||"static"===this.config.backdrop,e=!this.backdropRef||!this.backdropRef.instance.isShown;1===this.modalsCount&&(this.removeBackdrop(),t&&e&&(this._backdropLoader.attach(k).to("body").show({isAnimated:this.config.animated}),this.backdropRef=this._backdropLoader._componentRef))}_hideBackdrop(){this.backdropRef&&(this.backdropRef.instance.isShown=!1,setTimeout(()=>this.removeBackdrop(),this.config.animated?150:0))}_showModal(t){var e;const n=this.loaders[this.loaders.length-1];if(this.config&&this.config.providers)for(const i of this.config.providers)n.provide(i);const o=new C,r=n.provide({provide:w,useValue:this.config}).provide({provide:C,useValue:o}).attach(Z).to("body");return o.hide=()=>{var t;return null===(t=r.instance)||void 0===t?void 0:t.hide()},o.setClass=t=>{r.instance&&(r.instance.config.class=t)},o.onHidden=new i.vpe,o.onHide=new i.vpe,this.copyEvent(n.onBeforeHide,o.onHide),this.copyEvent(n.onHidden,o.onHidden),r.show({content:t,isAnimated:this.config.animated,initialState:this.config.initialState,bsModalService:this,id:this.config.id}),r.instance&&(r.instance.level=this.getModalsCount(),o.content=n.getInnerComponent(),o.id=null===(e=r.instance.config)||void 0===e?void 0:e.id),o}_hideModal(t){if(null!=t){const e=this.loaders.findIndex(e=>{var n;return(null===(n=e.instance)||void 0===n?void 0:n.config.id)===t}),n=this.loaders[e];n&&n.hide(t)}else this.loaders.forEach(t=>{t.instance&&t.hide(t.instance.config.id)})}getModalsCount(){return this.modalsCount}setDismissReason(t){this.lastDismissReason=t}removeBackdrop(){this._renderer.removeClass(document.body,"modal-open"),this._renderer.setStyle(document.body,"overflow-y",""),this._backdropLoader.hide(),this.backdropRef=void 0}checkScrollbar(){this.isBodyOverflowing=document.body.clientWidth<window.innerWidth,this.scrollbarWidth=this.getScrollbarWidth()}setScrollbar(){!document||(this.originalBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")||"0",10),this.isBodyOverflowing&&(document.body.style.paddingRight=`${this.originalBodyPadding+this.scrollbarWidth}px`))}resetScrollbar(){document.body.style.paddingRight=`${this.originalBodyPadding}px`}getScrollbarWidth(){const t=this._renderer.createElement("div");this._renderer.addClass(t,"modal-scrollbar-measure"),this._renderer.appendChild(document.body,t);const e=t.offsetWidth-t.clientWidth;return this._renderer.removeChild(document.body,t),e}_createLoaders(){const t=this.clf.createLoader();this.copyEvent(t.onBeforeShow,this.onShow),this.copyEvent(t.onShown,this.onShown),this.copyEvent(t.onBeforeHide,this.onHide),this.copyEvent(t.onHidden,this.onHidden
1),this.loaders.push(t)}removeLoaders(t){if(null!=t){const e=this.loaders.findIndex(e=>{var n;return(null===(n=e.instance)||void 0===n?void 0:n.config.id)===t});e>=0&&(this.loaders.splice(e,1),this.loaders.forEach((t,e)=>{t.instance&&(t.instance.level=e+1)}))}else this.loaders.splice(0,this.loaders.length)}copyEvent(t,e){t.subscribe(t=>{e.emit(this.lastDismissReason||t)})}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(i.FYo),i.LFG(r.oj),i.LFG(A,8))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac}),t})();x.forRoot();let M=(()=>{class t{static forRoot(){return{ngModule:t,providers:[O,r.oj,s.sA]}}static forChild(){return{ngModule:t,providers:[O,r.oj,s.sA]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({imports:[[x]]}),t})()},9653:function(t,e,n){"use strict";n.d(e,{Bz:function(){return g},sA:function(){return K}});var i=n(7025),o=n(2316),r=n(4364),s=n(9511),a=n(1660);const c=new class extends a.v{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,i=-1,o=e.length;t=t||e.shift();do{if(n=t.execute(t.state,t.delay))break}while(++i<o&&(t=e.shift()));if(this.active=!1,n){for(;++i<o&&(t=e.shift());)t.unsubscribe();throw n}}}(class extends s.o{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(t,e,n);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});var l=n(5119),d=n(9919),u=n(2516),p=n(1134),h=(()=>{return(t=h||(h={})).top="top",t.bottom="bottom",t.left="left",t.right="right",t.auto="auto",t.end="right",t.start="left",t["top left"]="top left",t["top right"]="top right",t["right top"]="right top",t["right bottom"]="right bottom",t["bottom right"]="bottom right",t["bottom left"]="bottom left",t["left bottom"]="left bottom",t["left top"]="left top",t["top start"]="top left",t["top end"]="top right",t["end top"]="right top",t["end bottom"]="right bottom",t["bottom end"]="bottom right",t["bottom start"]="bottom left",t["start bottom"]="start bottom",t["start top"]="left top",h;var t})(),g=(()=>{return(t=g||(g={})).top="top",t.bottom="bottom",t.left="start",t.right="end",t.auto="auto",t.end="end",t.start="start",t["top left"]="top start",t["top right"]="top end",t["right top"]="end top",t["right bottom"]="end bottom",t["bottom right"]="bottom end",t["bottom left"]="bottom start",t["left bottom"]="start bottom",t["left top"]="start top",t["top start"]="top start",t["top end"]="top end",t["end top"]="end top",t["end bottom"]="end bottom",t["bottom end"]="bottom end",t["bottom start"]="bottom start",t["start bottom"]="start bottom",t["start top"]="start top",g;var t})();function f(t,e){if(1!==t.nodeType)return[];const n=t.ownerDocument.defaultView,i=null==n?void 0:n.getComputedStyle(t,null);return e?i&&i[e]:i}const m="undefined"!=typeof window&&"undefined"!=typeof document,v=m&&!(!window.MSInputMethodContext||!document.documentMode),b=m&&!(!window.MSInputMethodContext||!/MSIE 10/.test(navigator.userAgent));function x(t){return 11===t?v:10===t?b:v||b}function _(t){if(!t)return document.documentElement;const e=x(10)?document.body:null;let n,i=null==t?void 0:t.offsetParent;for(;i===e&&t.nextElementSibling&&n!==t.nextElementSibling;)n=t.nextElementSibling,i=n.offsetParent;const o=i&&i.nodeName;return o&&"BODY"!==o&&"HTML"!==o?i&&-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===f(i,"position")?_(i):i:n?n.ownerDocument.documentElement:document.documentElement}function C(t){return null!==t.parentNode?C(t.parentNode):t}function w(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;const n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);const s=r.commonAncestorContainer;if(t!==s&&e!==s||i.contains(o))return function(t){const{nodeName:e}=t;return"BODY"!==e&&("HTML"===e||_(t.firstElementChild)===t)}(s)?s:_(s);const a=C(t);return a.host?w(a.host,e):w(t,C(e).host)}function y(t){if(!t||!t.parentElement||x())return document.documentElement;let e=t.parentElement;for(;(null==e?void 0:e.parentElement)&&"none"===f(e,"transform");)e=e.parentElement;return e||document.documentElement}function A(t,e){const n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t[`border${n}Width`])+parseFloat(t[`border${i}Width`])}function Z(t,e,n,i){const o=n,r=i;return Math.max(e[`offset${t}`],e[`scroll${t}`],o[`client${t}`],o[`offset${t}`],o[`scroll${t}`],x(10)?parseInt(o[`offset${t}`],10)+parseInt(r["margin"+("Height"===t?"Top":"Left")],10)+parseInt(r["margin"+("Height"===t?"Bottom":"Right")],10):0)}function k(t){const e=t.body,n=t.documentElement,i=x(10)?getComputedStyle(n):void 0;return{height:Z("Height",e,n,i),width:Z("Width",e,n,i)}}function T(t,e="top"){const n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){const e=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||e)[n]}return t[n]}function O(t){return Object.assign(Object.assign({},t),{right:(t.left||0)+t.width,bottom:(t.top||0)+t.height})}function M(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function I(t){const e=t.getBoundingClientRect();try{if(x(10)){const n=T(t,"top"),i=T(t,"left");e&&M(e.top)&&M(e.left)&&M(e.bottom)&&M(e.right)&&(e.top+=n,e.left+=i,e.bottom+=n,e.right+=i)}}catch(c){return e}if(!(e&&M(e.top)&&M(e.left)&&M(e.bottom)&&M(e.right)))return e;const n={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i="HTML"===t.nodeName?k(t.ownerDocument):void 0,o=(null==i?void 0:i.width)||t.clientWidth||M(e.right)&&M(n.left)&&e.right-n.left||0,r=(null==i?void 0:i.height)||t.clientHeight||M(e.bottom)&&M(n.top)&&e.bottom-n.top||0;let s=t.offsetWidth-o,a=t.offsetHeight-r;if(s||a){const e=f(t);s-=A(e,"x"),a-=A(e,"y"),n.width-=s,n.height-=a}return O(n)}function S(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function P(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}const{overflow:e,overflowX:n,overflowY:i}=f(t);return/(auto|scroll|overlay)/.test(String(e)+String(i)+String(n))?t:P(S(t))}function N(t,e,n=!1){var i,o,r,s,a,c;
1const l=x(10),d="HTML"===e.nodeName,u=I(t),p=I(e),h=P(t),g=f(e),m=parseFloat(g.borderTopWidth),v=parseFloat(g.borderLeftWidth);n&&d&&(p.top=Math.max(null!==(i=p.top)&&void 0!==i?i:0,0),p.left=Math.max(null!==(o=p.left)&&void 0!==o?o:0,0));let b=O({top:(null!==(r=u.top)&&void 0!==r?r:0)-(null!==(s=p.top)&&void 0!==s?s:0)-m,left:(null!==(a=u.left)&&void 0!==a?a:0)-(null!==(c=p.left)&&void 0!==c?c:0)-v,width:u.width,height:u.height});if(b.marginTop=0,b.marginLeft=0,!l&&d){const t=parseFloat(g.marginTop),e=parseFloat(g.marginLeft);M(b.top)&&(b.top-=m-t),M(b.bottom)&&(b.bottom-=m-t),M(b.left)&&(b.left-=v-e),M(b.right)&&(b.right-=v-e),b.marginTop=t,b.marginLeft=e}return(l&&!n?e.contains(h):e===h&&"BODY"!==h.nodeName)&&(b=function(t,e,n=!1){const i=T(e,"top"),o=T(e,"left"),r=n?-1:1;return M(t.top)&&(t.top+=i*r),M(t.bottom)&&(t.bottom+=i*r),M(t.left)&&(t.left+=o*r),M(t.right)&&(t.right+=o*r),t}(b,e)),b}function q(t){const e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===f(t,"position")||q(S(t)))}function U(t,e,n=0,i,o=!1){let r={top:0,left:0};const s=o?y(t):w(t,e);if("viewport"===i)r=function(t,e=!1){const n=t.ownerDocument.documentElement,i=N(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:T(n),a=e?0:T(n,"left");return O({top:s-Number(null==i?void 0:i.top)+Number(null==i?void 0:i.marginTop),left:a-Number(null==i?void 0:i.left)+Number(null==i?void 0:i.marginLeft),width:o,height:r})}(s,o);else{let n;"scrollParent"===i?(n=P(S(e)),"BODY"===n.nodeName&&(n=t.ownerDocument.documentElement)):n="window"===i?t.ownerDocument.documentElement:i;const a=N(n,s,o);if(a&&"HTML"===n.nodeName&&!q(s)){const{height:e,width:n}=k(t.ownerDocument);M(r.top)&&M(a.top)&&M(a.marginTop)&&(r.top+=a.top-a.marginTop),M(r.top)&&(r.bottom=Number(e)+Number(a.top)),M(r.left)&&M(a.left)&&M(a.marginLeft)&&(r.left+=a.left-a.marginLeft),M(r.top)&&
1(r.right=Number(n)+Number(a.left))}else a&&(r=a)}return M(r.left)&&(r.left+=n),M(r.top)&&(r.top+=n),M(r.right)&&(r.right-=n),M(r.bottom)&&(r.bottom-=n),r}function E({width:t,height:e}){return t*e}function F(t,e,n,o,r=["top","bottom","right","left"],s="viewport",a=0){var c,l,d,u;if(-1===t.indexOf("auto"))return t;const p=U(n,o,a,s),h={top:{width:null!==(c=p.width)&&void 0!==c?c:0,height:e.top&&p.top?e.top-p.top:0},right:{width:p.right&&e.right?p.right-e.right:0,height:null!==(l=p.height)&&void 0!==l?l:0},bottom:{width:null!==(d=p.width)&&void 0!==d?d:0,height:p.bottom&&e.bottom?p.bottom-e.bottom:0},left:{width:e.left&&p.left?e.left-p.left:0,height:null!==(u=p.height)&&void 0!==u?u:0}},f=Object.keys(h).map(t=>Object.assign(Object.assign({key:t},h[t]),{area:E(h[t])})).sort((t,e)=>e.area-t.area);let m=f.filter(({width:t,height:e})=>t>=n.clientWidth&&e>=n.clientHeight);m=m.filter(t=>r.some(e=>e===t.key));const v=m.length>0?m[0].key:f[0].key,b=t.split(" ")[1];return n.className=n.className.replace(/bs-tooltip-auto/g,`bs-tooltip-${(0,i.Wl)().isBs5?g[v]:v}`),v+(b?`-${b}`:"")}const D=(t,e=0)=>t?parseFloat(t):e;function L(t){const e=t.ownerDocument.defaultView,n=null==e?void 0:e.getComputedStyle(t),i=D(null==n?void 0:n.marginTop)+D(null==n?void 0:n.marginBottom),o=D(null==n?void 0:n.marginLeft)+D(null==n?void 0:n.marginRight);return{width:Number(t.offsetWidth)+o,height:Number(t.offsetHeight)+i}}function J(t,e,n){return N(e,n?y(t):w(t,e),n)}function j(t,e,n){var i,o,r;const s=n.split(" ")[0],a=L(t),c={width:a.width,height:a.height},l=-1!==["right","left"].indexOf(s),d=l?"top":"left",u=l?"left":"top",p=l?"height":"width",h=l?"width":"height";return c[d]=(null!==(i=e[d])&&void 0!==i?i:0)+e[p]/2-a[p]/2,c[u]=s===u?(null!==(o=e[u])&&void 0!==o?o:0)-a[h]:null!==(r=e[function(t){const e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,t=>e[t])}(u)])&&void 0!==r?r:0,c}function R(t,e){var n;return!!(null===(n=t.modifiers[e])||void 0===n?void 0:n.enabled)}const $={top:["top","top start","top end"],bottom:["bottom","bottom start","bottom end"],start:["start","start top","start bottom"],end:["end","end top","end bottom"]};function B(t,e){return!!(0,i.Wl)().isBs5&&$[e].includes(t)}function H(t,e,n){!t||!e||Object.keys(e).forEach(i=>{let o="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(Number(t))}(e[i])&&(o="px"),n?n.setStyle(t,i,`${String(e[i])}${o}`):t.style[i]=String(e[i])+o})}function Q(t){var e,n,i,o,r,s;let a=t.offsets.target;const c=t.instance.target.querySelector(".arrow");if(!c)return t;const l=-1!==["left","right"].indexOf(t.placement.split(" ")[0]),d=l?"height":"width",u=l?"Top":"Left",p=u.toLowerCase(),h=l?"left"
1:"top",g=l?"bottom":"right",m=L(c)[d],v=t.placement.split(" ")[1];(null!==(e=t.offsets.host[g])&&void 0!==e?e:0)-m<(null!==(n=a[p])&&void 0!==n?n:0)&&(a[p]-=(null!==(i=a[p])&&void 0!==i?i:0)-((null!==(o=t.offsets.host[g])&&void 0!==o?o:0)-m)),Number(t.offsets.host[p])+Number(m)>(null!==(r=a[g])&&void 0!==r?r:0)&&(a[p]+=Number(t.offsets.host[p])+Number(m)-Number(a[g])),a=O(a);const b=f(t.instance.target),x=parseFloat(b[`margin${u}`])||0,_=parseFloat(b[`border${u}Width`])||0;let C;if(v){const e=parseFloat(b.borderRadius)||0,n=Number(x+_+e);C=p===v?Number(t.offsets.host[p])+n:Number(t.offsets.host[p])+Number(t.offsets.host[d]-n)}else C=Number(t.offsets.host[p])+Number(t.offsets.host[d]/2-m/2);let w=C-(null!==(s=a[p])&&void 0!==s?s:0)-x-_;return w=Math.max(Math.min(a[d]-(m+5),w),0),t.offsets.arrow={[p]:Math.round(w),[h]:""},t.instance.arrow=c,t}function Y(t){if(t.offsets.target=O(t.offsets.target),!R(t.options,"flip"))return t.offsets.target=Object.assign(Object.assign({},t.offsets.target),j(t.instance.target,t.offsets.host,t.placement)),t;const e=U(t.instance.target,t.instance.host,0,"viewport",!1);let n=t.placement.split(" ")[0],i=t.placement.split(" ")[1]||"";const o=F("auto",t.offsets.host,t.instance.target,t.instance.host,t.options.allowedPositions),r=[n,o];return r.forEach((o,s)=>{var a,c,l,d,u,p,h,g,f,m,v,b,x,_,C,w;if(n!==o||r.length===s+1)return;n=t.placement.split(" ")[0];const y="left"===n&&Math.floor(null!==(a=t.offsets.target.right)&&void 0!==a?a:0)>Math.floor(null!==(c=t.offsets.host.left)&&void 0!==c?c:0)||"right"===n&&Math.floor(null!==(l=t.offsets.target.left)&&void 0!==l?l:0)<Math.floor(null!==(d=t.offsets.host.right)&&void 0!==d?d:0)||"top"===n&&Math.floor(null!==(u=t.offsets.target.bottom)&&void 0!==u?u:0)>Math.floor(null!==(p=t.offsets.host.top)&&void 0!==p?p:0)||"bottom"===n&&Math.floor(null!==(h=t.offsets.target.top)&&void 0!==h?h:0)<Math.floor(null!==(g=t.offsets.host.bottom)&&void 0!==g?g:0),A=Math.floor(null!==(f=t.offsets.target.left)&&void 0!==f?f:0)<Math.floor(null!==(m=e.left)&&void 0!==m?m:0),Z=Math.floor(null!==(v=t.offsets.target.right)&&void 0!==v?v:0)>Math.floor(null!==(b=e.right)&&void 0!==b?b:0),k=Math.floor(null!==(x=t.offsets.target.top)&&void 0!==x?x:0)<Math.floor(null!==(_=e.top)&&void 0!==_?_:0),T=Math.floor(null!==(C=t.offsets.target.bottom)&&void 0!==C?C:0)>Math.floor(null!==(w=e.bottom)&&void 0!==w?w:0),O="left"===n&&A||"right"===n&&Z||"top"===n&&k||"bottom"===n&&T,M=-1!==["top","bottom"].indexOf(n),I=M&&"left"===i&&A||M&&"right"===i&&Z||!M&&"left"===i&&k||!M&&"right"===i&&T;(y||O||I)&&((y||O)&&(n=r[s+1]),I&&(i=function(t){return"right"===t?"left":"left"===t?"right":t}(i)),t.placement=n+(i?` ${i}`:""),t.offsets.target=Object.assign(Object.assign({},t.offsets.target),j(t.instance.target,t.offsets.host,t.placement)))}),t}function z(t){var e;if(!R(t.options,"preventOverflow"))return t;const n="transform",i=t.instance.target.style,{top:o,left:r,[n]:s}=i;i.top="",i.left="",i[n]="";const a=U(t.instance.target,t.instance.host,0,(null===(e=t.options.modifiers.preventOverflow)||void 0===e?void 0:e.boundariesElement)||"scrollParent",!1);i.top=o,i.left=r,i[n]=s;const c={primary(e){var n,i,o,r;let s=t.offsets.target[e];return(null!==(n=t.offsets.target[e])&&void 0!==n?n:0)<(null!==(i=a[e])&&void 0!==i?i:0)&&(s=Math.max(null!==(o=t.offsets.target[e])&&void 0!==o?o:0,null!==(r=a[e])&&void 0!==r?r:0)),{[e]:s}},secondary(e){var n,i,o,r,s,c,l,d;const u="right"===e?"left":"top";let p=t.offsets.target[u];return(null!==(n=t.offsets.target[e])&&void 0!==n?n:0)<(null!==(i=a[e])&&void 0!==i?i:0)&&"right"!==e&&(p=Math.min(null!==(o=t.offsets.target[u])&&void 0!==o?o:0,(null!==(r=a[e])&&void 0!==r?r:0)-t.offsets.target.height)),(null!==(s=t.offsets.target[e])&&void 0!==s?s:0)>(null!==(c=a[e])&&void 0!==c?c:0)&&"right"===e&&(p=Math.min(null!==(l=t.offsets.target[u])&&void 0!==l?l:0,(null!==(d=a[e])&&void 0!==d?d:0)-t.offsets.target.width)),{[u]:p}}};return["left","right","top","bottom"].forEach(e=>{const n=-1!==["left","top","start"].indexOf(e)?c.primary:c.secondary;t.offsets.target=Object.assign(Object.assign({},t.offsets.target),n(e))}),t}function V(t){var e;const n=t.placement,i=n.split(" ")[0],o=n.split(" ")[1];if(o){const{host:n,target:r}=t.offsets,s=-1!==["bottom","top"].indexOf(i),a=s?"left":"top",c=s?"width":"height",l={start:{[a]:n[a]}
1,end:{[a]:(null!==(e=n[a])&&void 0!==e?e:0)+n[c]-r[c]}};t.offsets.target=Object.assign(Object.assign({},r),{[a]:a===o?l.start[a]:l.end[a]})}return t}const G=new class{position(t,e){return this.offset(t,e)}offset(t,e){return J(e,t)}positionElements(t,e,n,i,o){const r=[Y,V,z,Q],s=function(t,e,n,i){if(!t||!e)return;const o=J(t,e);!n.match(/^(auto)*\s*(left|right|top|bottom|start|end)*$/)&&!n.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)&&(n="auto");const r=!!n.match(/auto/g);let s=n.match(/auto\s(left|right|top|bottom|start|end)/)?n.split(" ")[1]||"auto":n;const a=s.match(/^(left|right|top|bottom|start|end)* ?(?!\1)(left|right|top|bottom|start|end)?/);return a&&(s=a[1]+(a[2]?` ${a[2]}`:"")),-1!==["left right","right left","top bottom","bottom top"].indexOf(s)&&(s="auto"),s=F(s,o,t,e,i?i.allowedPositions:void 0),{options:i||{modifiers:{}},instance:{target:t,host:e,arrow:void 0},offsets:{target:j(t,o,s),host:o,arrow:void 0},positionFixed:!1,placement:s,placementAuto:r}}(e,t,h[n],o);if(s)return r.reduce((t,e)=>e(t),s)}};function W(t,e,n,o,r,s){const a=G.positionElements(t,e,n,o,r);if(!a)return;const c=function(t){var e,n,i,o;return{width:t.offsets.target.width,height:t.offsets.target.height,left:Math.floor(null!==(e=t.offsets.target.left)&&void 0!==e?e:0),top:Math.round(null!==(n=t.offsets.target.top)&&void 0!==n?n:0),bottom:Math.round(null!==(i=t.offsets.target.bottom)&&void 0!==i?i:0),right:Math.floor(null!==(o=t.offsets.target.right)&&void 0!==o?o:0)}}(a);H(e,{"will-change":"transform",top:"0px",left:"0px",transform:`translate3d(${c.left}px, ${c.top}px, 0px)`},s),a.instance.arrow&&H(a.instance.arrow,a.offsets.arrow,s),function(t,e){const n=t.instance.target;let o=n.className;const r=(0,i.Wl)().isBs5?g[t.placement]:t.placement;t.placementAuto&&(o=o.replace(/bs-popover-auto/g,`bs-popover-${r}`),o=o.replace(/ms-2|me-2|mb-2|mt-2/g,""),o=o.replace(/bs-tooltip-auto/g,`bs-tooltip-${r}`),o=o.replace(/\sauto/g,` ${r}`),-1!==o.indexOf("popover")&&(o=o+" "+function(t){return(0,i.Wl)().isBs5?B(t,"end")?"ms-2":B(t,"start")?"me-2":B(t,"top")?"mb-2":B(t,"bottom")?"mt-2":"":""}(r)),-1!==o.indexOf("popover")&&-1===o.indexOf("popover-auto")&&(o+=" popover-auto"),-1!==o.indexOf("tooltip")&&-1===o.indexOf("tooltip-auto")&&(o+=" tooltip-auto")),o=o.replace(/left|right|top|bottom|end|start/g,`${r.split(" ")[0]}`),e?e.setAttribute(n,"class",o):n.className=o}(a,s)}let K=(()=>{class t{constructor(t,e,n){this.update$$=new l.xQ,this.positionElements=new Map,this.isDisabled=!1,(0,r.NF)(n)&&t.runOutsideAngular(()=>{this.triggerEvent$=(0,d.T)((0,u.R)(window,"scroll",{passive:!0}),(0,u.R)(window,"resize",{passive:!0}),(0,p.of)(0,c),this.update$$),this.triggerEvent$.subscribe(()=>{this.isDisabled||this.positionElements.forEach(t=>{W(X(t.target),X(t.element),t.attachment,t.appendToBody,this.options,e.createRenderer(null,null))})})})}position(t){this.addPositionElement(t)}get event$(){return this.triggerEvent$}disable(){this.isDisabled=!0}enable(){this.isDisabled=!1}addPositionElement(t){this.positionElements.set(X(t.element),t)}calcPosition(){this.update$$.next()}deletePositionElement(t){this.positionElements.delete(X(t))}setOptions(t){this.options=t}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.R0b),o.LFG(o.FYo),o.LFG(o.Lbi))},t.\u0275prov=(0,o.Yz7)({factory:function(){return new t((0,o.LFG)(o.R0b),(0,o.LFG)(o.FYo),(0,o.LFG)(o.Lbi))},token:t,providedIn:"root"}),t})();function X(t){return"string"==typeof t?document.querySelector(t):t instanceof o.SBq?t.nativeElement:null!=t?t:null}},7025:function(t,e,n){"use strict";n.d(e,{GU:function(){return b},cQ:function(){return x},tj:function(){return u},Wl:function(){return v},XA:function(){return f},wo:function(){return a},AL:function(){return s},C:function(){return l},Rg:function(){return c},O4:function(){return w},u9:function(){return d}});var i=n(2316);class o{constructor(t,e){this.open=t,this.close=e||t}isManual(){return"manual"===this.open||"manual"===this.close}}const r={hover:["mouseover","mouseout"],focus:["focusin","focusout"]};function s(t,e=r){const n=(t||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(t=>t.split(":")).map(t=>{const n=e[t[0]]||t;return new o(n[0],n[1])}),s=i.filter(t=>t.isManual());if(s.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(1===s.length&&i.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return i}function a(t,e){const n=s(e.triggers),i=e.target;if(1===n.length&&n[0].isManual())return Function.prototype;const o=[],r=[],a=()=>{r.forEach(t=>o.push(t())),r.length=0};
1return n.forEach(n=>{const s=n.open===n.close,c=s?e.toggle:e.show;if(!s&&n.close&&e.hide){const o=t.listen(i,n.close,e.hide);r.push(()=>o)}c&&o.push(t.listen(i,n.open,()=>c(a)))}),()=>{o.forEach(t=>t())}}function c(t,e){return e.outsideClick?t.listen("document","click",t=>{e.target&&e.target.contains(t.target)||e.targets&&e.targets.some(e=>e.contains(t.target))||e.hide&&e.hide()}):Function.prototype}function l(t,e){return e.outsideEsc?t.listen("document","keyup.esc",t=>{e.target&&e.target.contains(t.target)||e.targets&&e.targets.some(e=>e.contains(t.target))||e.hide&&e.hide()}):Function.prototype}const d="undefined"!=typeof window&&window||{},u=d.document;var p=(()=>{return(t=p||(p={})).isBs3="bs3",t.isBs4="bs4",t.isBs5="bs5",p;var t})();let h;function g(){if(void 0===d.document)return"bs4";const t=d.document.createElement("span");t.innerText="testing bs version",t.classList.add("d-none"),t.classList.add("visually-hidden"),d.document.head.appendChild(t);const e=t.getBoundingClientRect(),n=d.getComputedStyle(t).overflow;return d.document.head.removeChild(t),!e||e&&0!==e.top?"bs3":n&&"hidden"===n?"bs5":"bs4"}function f(){return void 0===d||(void 0===d.__theme?(h||(h=g()),"bs3"===h):"bs3"===d.__theme)}function m(){return!f()&&(h||(h=g()),"bs4"===h)}function v(){return{isBs3:f(),isBs4:m(),isBs5:!f()&&!m()&&(h||(h=g()),"bs5"===h)}}function b(){return function(t,e){const n=` __${e}Value`;Object.defineProperty(t,e,{get(){return this[n]},set(t){const i=this[n];this[n]=t,i!==t&&this[e+"Change"]&&this[e+"Change"].emit(t)}})}}class x{static reflow(t){}static getStyles(t){let e=t.ownerDocument.defaultView;return(!e||!e.opener)&&(e=d),e.getComputedStyle(t)}static stackOverflowConfig(){const t=function(){const t=v(),e=Object.keys(t).find(e=>t[e]);return p[e]}();return{crossorigin:"bs3"!==t?"anonymous":void 0,integrity:"bs5"===t?"sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We":"bs4"===t?"sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2":void 0,cdnLink:"bs5"===t?"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css":"bs4"===t?"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css":"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"}}}const _={},C="undefined"==typeof console||!("warn"in console);function w(t){!(0,i.X6Q)()||C||t in _||(_[t]=!0,console.warn(t))}},5602:function(t,e,n){"use strict";n.d(e,{N:function(){return r}});var i=n(2316),o=n(4364);let r=(()=>{class t{constructor(t,e){this.document=t,this.platformId=e,this.documentIsAccessible=(0,o.NF)(this.platformId)}static getCookieRegExp(t){const e=t.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+e+"|;\\s*"+e+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(t){try{return decodeURIComponent(t)}catch(e){return t}}check(e){return!!this.documentIsAccessible&&(e=encodeURIComponent(e),t.getCookieRegExp(e).test(this.document.cookie))}get(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);const n=t.getCookieRegExp(e).exec(this.document.cookie);return n[1]?t.safeDecodeURIComponent(n[1]):""}return""}getAll(){if(!this.documentIsAccessible)return{};const e={},n=this.document;return n.cookie&&""!==n.cookie&&n.cookie.split(";").forEach(n=>{const[i,o]=n.split("=");e[t.safeDecodeURIComponent(i.replace(/^ /,""))]=t.safeDecodeURIComponent(o)}),e}set(t,e,n,i,o,r,s){if(!this.documentIsAccessible)return;if("number"==typeof n||n instanceof Date||i||o||r||s)return void this.set(t,e,{expires:n,path:i,domain:o,secure:r,sameSite:s||"Lax"});let a=encodeURIComponent(t)+"="+encodeURIComponent(e)+";";const c=n||{};c.expires&&(a+="number"==typeof c.expires?"expires="+new Date((new Date).getTime()+1e3*c.expires*60*60*24).toUTCString()+";":"expires="+c.expires.toUTCString()+";"),c.path&&(a+="path="+c.path+";"),c.domain&&(a+="domain="+c.domain+";"),!1===c.secure&&"None"===c.sameSite&&(c.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${t} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),c.secure&&(a+="secure;"),c.sameSite||(c.sameSite="Lax"),a+="sameSite="+c.sameSite+";",this.document.cookie=a}delete(t,e,n,i,o="Lax"){if(!this.documentIsAccessible)return;const r=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(t,"",{expires:r,path:e,domain:n,secure:i,sameSite:o})}deleteAll(t,e,n,i="Lax"){if(!this.documentIsAccessible)return;const o=this.getAll();for(const r in o)o.hasOwnProperty(r)&&this.delete(r,t,e,n,i)}}return t.\u0275fac=function(e){return new(e||t)(i.LFG(o.K0),i.LFG(i.Lbi))},t.\u0275prov=i.Yz7({factory:function(){return new t(i.LFG(o.K0),i.LFG(i.Lbi))},token:t,providedIn:"root"}),t})()},6491:function(t,e,n){"use strict";n.d(e,{X:function(){return r}});var i=n(5119),o=n(6874);class r extends i.xQ{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.N;return this._value}next(t){super.next(this._value=t)}}},898:function(t,e,n){"use strict";n.d(e,{d:function(){return o}});var i=n(1003);class o extends i.L{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}}
1,9544:function(t,e,n){"use strict";n.d(e,{y:function(){return l}});var i=n(1003),o=n(9975),r=n(269),s=n(6165),a=n(7206);var c=n(4572);let l=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:s}=this,a=function(t,e,n){if(t){if(t instanceof i.L)return t;if(t[o.b])return t[o.b]()}return t||e||n?new i.L(t,e,n):new i.L(r.c)}(t,e,n);if(a.add(s?s.call(a,this.source):this.source||c.v.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.v.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(e){c.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:o}=t;if(e||o)return!1;t=n&&n instanceof i.L?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=d(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(o){n(o),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[s.L](){return this}pipe(...t){return 0===t.length?this:function(t){return 0===t.length?a.y:1===t.length?t[0]:function(e){return t.reduce((t,e)=>e(t),e)}}(t)(this)}toPromise(t){return new(t=d(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function d(t){if(t||(t=c.v.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},269:function(t,e,n){"use strict";n.d(e,{c:function(){return r}});var i=n(4572),o=n(6901);const r={closed:!0,next(t){},error(t){if(i.v.useDeprecatedSynchronousErrorHandling)throw t;(0,o.z)(t)},complete(){}}},8237:function(t,e,n){"use strict";n.d(e,{L:function(){return o}});var i=n(1003);class o extends i.L{notifyNext(t,e,n,i,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}},5119:function(t,e,n){"use strict";n.d(e,{xQ:function(){return d},Yc:function(){return l}});var i=n(9544),o=n(1003),r=n(1318),s=n(6874);class a extends r.w{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}var c=n(9975);class l extends o.L{constructor(t){super(t),this.destination=t}}let d=(()=>{class t extends i.y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[c.b](){return new l(this)}lift(t){const e=new u(this,this);return e.operator=t,e}next(t){if(this.closed)throw new s.N;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let o=0;o<n;o++)i[o].next(t)}}error(t){if(this.closed)throw new s.N;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let o=0;o<n;o++)i[o].error(t);this.observers.length=0}complete(){if(this.closed)throw new s.N;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new s.N;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new s.N;return this.hasError?(t.error(this.thrownError),r.w.EMPTY):this.isStopped?(t.complete(),r.w.EMPTY):(this.observers.push(t),new a(this,t))}asObservable(){const t=new i.y;return t.source=this,t}}return t.create=(t,e)=>new u(t,e),t})();class u extends d{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):r.w.EMPTY}}},1003:function(t,e,n){"use strict";n.d(e,{L:function(){return l}});var i=n(18),o=n(269),r=n(1318),s=n(9975),a=n(4572),c=n(6901);class l extends r.w{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=o.c;break;case 1:if(!t){this.destination=o.c;break}if("object"==typeof t){t instanceof l?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new d(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new d(this,t,e,n)}}[s.b](){return this}static create(t,e,n){const i=new l(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class d extends l{constructor(t,e,n,r){super(),this._parentSubscriber=t;let s,a=this;
1(0,i.m)(e)?s=e:e&&(s=e.next,n=e.error,r=e.complete,e!==o.c&&(a=Object.create(e),(0,i.m)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=s,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=a.v;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,c.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,c.z)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),a.v.useDeprecatedSynchronousErrorHandling)throw n;(0,c.z)(n)}}__tryOrSetError(t,e,n){if(!a.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return a.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):((0,c.z)(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},1318:function(t,e,n){"use strict";n.d(e,{w:function(){return a}});var i=n(9861),o=n(1533),r=n(18);const s=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();class a{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_unsubscribe:n,_subscriptions:c}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof a)e.remove(this);else if(null!==e)for(let i=0;i<e.length;++i)e[i].remove(this);if((0,r.m)(n))try{n.call(this)}catch(d){t=d instanceof s?l(d.errors):[d]}if((0,i.k)(c)){let e=-1,n=c.length;for(;++e<n;){const n=c[e];if((0,o.K)(n))try{n.unsubscribe()}catch(u){t=t||[],u instanceof s?t=t.concat(l(u.errors)):t.push(u)}}}if(t)throw new s(t)}add(t){let e=t;if(!t)return a.EMPTY;switch(typeof t){case"function":e=new a(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!(e instanceof a)){const t=e;e=new a,e._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:n}=e;if(null===n)e._parentOrParents=this;else if(n instanceof a){if(n===this)return e;e._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return e;n.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[e]:i.push(e),e}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}var c;function l(t){return t.reduce((t,e)=>t.concat(e instanceof s?e.errors:e),[])}a.EMPTY=((c=new a).closed=!0,c)},4572:function(t,e,n){"use strict";n.d(e,{v:function(){return o}});let i=!1;const o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},2494:function(t,e,n){"use strict";n.d(e,{c:function(){return a},N:function(){return c}});var i=n(5119),o=n(9544),r=n(1318),s=n(7085);class a extends o.y{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}
1_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new r.w,t.add(this.source.subscribe(new l(this.getSubject(),this))),t.closed&&(this._connection=null,t=r.w.EMPTY)),t}refCount(){return(0,s.x)()(this)}}const c=(()=>{const t=a.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class l extends i.Yc{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}},1486:function(t,e,n){"use strict";n.d(e,{aj:function(){return l}});var i=n(6770),o=n(9861),r=n(8237),s=n(6648),a=n(3446);const c={};function l(...t){let e=null,n=null;return(0,i.K)(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&(0,o.k)(t[0])&&(t=t[0]),(0,a.n)(t,n).lift(new d(e))}class d{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new u(t,this.resultSelector))}}class u extends r.L{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(c),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add((0,s.D)(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,i,o){const r=this.values,s=this.toRespond?r[n]===c?--this.toRespond:this.toRespond:0;r[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}},3972:function(t,e,n){"use strict";n.d(e,{z:function(){return r}});var i=n(1134),o=n(6324);function r(...t){return(0,o.J)(1)((0,i.of)(...t))}},8117:function(t,e,n){"use strict";n.d(e,{E:function(){return o},c:function(){return r}});var i=n(9544);const o=new i.y(t=>t.complete());function r(t){return t?function(t){return new i.y(e=>t.schedule(()=>e.complete()))}(t):o}},2720:function(t,e,n){"use strict";n.d(e,{D:function(){return c}});var i=n(9544),o=n(9861),r=n(3927),s=n(1533),a=n(400);function c(...t){if(1===t.length){const e=t[0];if((0,o.k)(e))return l(e,null);if((0,s.K)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return l(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return l(t=1===t.length&&(0,o.k)(t[0])?t[0]:t,null).pipe((0,r.U)(t=>e(...t)))}return l(t,null)}function l(t,e){return new i.y(n=>{const i=t.length;if(0===i)return void n.complete();const o=new Array(i);let r=0,s=0;for(let c=0;c<i;c++){const l=(0,a.D)(t[c]);let d=!1;n.add(l.subscribe({next:t=>{d||(d=!0,s++),o[c]=t},error:t=>n.error(t),complete:()=>{r++,(r===i||!d)&&(s===i&&n.next(e?e.reduce((t,e,n)=>(t[e]=o[n],t),{}):o),n.complete())}}))}})}},400:function(t,e,n){"use strict";n.d(e,{D:function(){return u}});var i=n(9544),o=n(7888),r=n(1318),s=n(6165),a=n(4049),c=n(2611),l=n(5751),d=n(984);function u(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[s.L]}(t))return function(t,e){return new i.y(n=>{const i=new r.w;return i.add(e.schedule(()=>{const o=t[s.L]();i.add(o.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if((0,l.t)(t))return function(t,e){return new i.y(n=>{const i=new r.w;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if((0,d.z)(t))return(0,a.r)(t,e);if(function(t){return t&&"function"==typeof t[c.hZ]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new i.y(n=>{const i=new r.w;let o;return i.add(()=>{o&&"function"==typeof o.return&&o.return()}),i.add(e.schedule(()=>{o=t[c.hZ](),i.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=o.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())}))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof i.y?t:new i.y((0,o.s)(t))}},3446:function(t,e,n){"use strict";n.d(e,{n:function(){return s}});var i=n(9544),o=n(76),r=n(4049);
1function s(t,e){return e?(0,r.r)(t,e):new i.y((0,o.V)(t))}},2516:function(t,e,n){"use strict";n.d(e,{R:function(){return a}});var i=n(9544),o=n(9861),r=n(18),s=n(3927);function a(t,e,n,l){return(0,r.m)(n)&&(l=n,n=void 0),l?a(t,e,n).pipe((0,s.U)(t=>(0,o.k)(t)?l(...t):l(t))):new i.y(i=>{c(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function c(t,e,n,i,o){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,o),r=()=>i.removeEventListener(e,n,o)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),r=()=>i.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(e,n),r=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let r=0,s=t.length;r<s;r++)c(t[r],e,n,i,o)}i.add(r)}},9919:function(t,e,n){"use strict";n.d(e,{T:function(){return a}});var i=n(9544),o=n(6770),r=n(6324),s=n(3446);function a(...t){let e=Number.POSITIVE_INFINITY,n=null,a=t[t.length-1];return(0,o.K)(a)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof a&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof i.y?t[0]:(0,r.J)(e)((0,s.n)(t,n))}},1134:function(t,e,n){"use strict";n.d(e,{of:function(){return s}});var i=n(6770),o=n(3446),r=n(4049);function s(...t){let e=t[t.length-1];return(0,i.K)(e)?(t.pop(),(0,r.r)(t,e)):(0,o.n)(t)}},8293:function(t,e,n){"use strict";n.d(e,{K:function(){return s}});var i=n(8237),o=n(898),r=n(6648);function s(t){return function(e){const n=new a(t),i=e.lift(n);return n.caught=i}}class a{constructor(t){this.selector=t}call(t,e){return e.subscribe(new c(t,this.selector,this.caught))}}class c extends i.L{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const i=new o.d(this,void 0,void 0);this.add(i);const s=(0,r.D)(this,n,void 0,void 0,i);s!==i&&this.add(s)}}}},6816:function(t,e,n){"use strict";n.d(e,{b:function(){return o}});var i=n(5816);function o(t,e){return(0,i.zg)(t,e,1)}},9170:function(t,e,n){"use strict";n.d(e,{h:function(){return o}});var i=n(1003);function o(t,e){return function(n){return n.lift(new r(t,e))}}
1class r{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))}}class s extends i.L{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}},1435:function(t,e,n){"use strict";n.d(e,{x:function(){return r}});var i=n(1003),o=n(1318);function r(t){return e=>e.lift(new s(t))}class s{constructor(t){this.callback=t}call(t,e){return e.subscribe(new a(t,this.callback))}}class a extends i.L{constructor(t,e){super(t),this.add(new o.w(e))}}},3927:function(t,e,n){"use strict";n.d(e,{U:function(){return o}});var i=n(1003);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new r(t,e))}}class r{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new s(t,this.project,this.thisArg))}}class s extends i.L{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}},6324:function(t,e,n){"use strict";n.d(e,{J:function(){return r}});var i=n(5816),o=n(7206);function r(t=Number.POSITIVE_INFINITY){return(0,i.zg)(o.y,t)}},5816:function(t,e,n){"use strict";n.d(e,{zg:function(){return c}});var i=n(6648),o=n(8237),r=n(898),s=n(3927),a=n(400);function c(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(c((n,i)=>(0,a.D)(t(n,i)).pipe((0,s.U)((t,o)=>e(n,t,i,o))),n)):("number"==typeof e&&(n=e),e=>e.lift(new l(t,n)))}class l{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new d(t,this.project,this.concurrent))}}class d extends o.L{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){const o=new r.d(this,e,n),s=this.destination;s.add(o);const a=(0,i.D)(this,t,void 0,void 0,o);a!==o&&s.add(a)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t,e,n,i,o){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},7085:function(t,e,n){"use strict";n.d(e,{x:function(){return o}});var i=n(1003);function o(){return function(t){return t.lift(new r(t))}}
1class r{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new s(t,n),o=e.subscribe(i);return i.closed||(i.connection=n.connect()),o}}class s extends i.L{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,i&&(!n||i===n)&&i.unsubscribe()}}},1992:function(t,e,n){"use strict";n.d(e,{B:function(){return a}});var i=n(2494);var o=n(7085),r=n(5119);function s(){return new r.xQ}function a(){return t=>(0,o.x)()(function(t,e){return function(e){let n;n="function"==typeof t?t:function(){return t};const o=Object.create(e,i.N);return o.source=e,o.subjectFactory=n,o}}(s)(t))}},1143:function(t,e,n){"use strict";n.d(e,{O:function(){return r}});var i=n(3972),o=n(6770);function r(...t){const e=t[t.length-1];return(0,o.K)(e)?(t.pop(),n=>(0,i.z)(t,n,e)):e=>(0,i.z)(t,e)}},9902:function(t,e,n){"use strict";n.d(e,{w:function(){return c}});var i=n(8237),o=n(898),r=n(6648),s=n(3927),a=n(400);function c(t,e){return"function"==typeof e?n=>n.pipe(c((n,i)=>(0,a.D)(t(n,i)).pipe((0,s.U)((t,o)=>e(n,t,i,o))))):e=>e.lift(new l(t))}class l{constructor(t){this.project=t}call(t,e){return e.subscribe(new d(t,this.project))}}class d extends i.L{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e,t,n)}_innerSub(t,e,n){const i=this.innerSubscription;i&&i.unsubscribe();const s=new o.d(this,e,n),a=this.destination;a.add(s),this.innerSubscription=(0,r.D)(this,t,void 0,void 0,s),this.innerSubscription!==s&&a.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,i,o){this.destination.next(e)}}},3466:function(t,e,n){"use strict";n.d(e,{q:function(){return s}});var i=n(1003),o=n(4873),r=n(8117);function s(t){return e=>0===t?(0,r.c)():e.lift(new a(t))}class a{constructor(t){if(this.total=t,this.total<0)throw new o.W}call(t,e){return e.subscribe(new c(t,this.total))}}class c extends i.L{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}},8636:function(t,e,n){"use strict";n.d(e,{b:function(){return s}});var i=n(1003),o=n(2941),r=n(18);function s(t,e,n){return function(i){return i.lift(new a(t,e,n))}}class a{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new c(t,this.nextOrObserver,this.error,this.complete))}}class c extends i.L{constructor(t,e,n,i){super(t),this._tapNext=o.Z,this._tapError=o.Z,this._tapComplete=o.Z,this._tapError=n||o.Z,this._tapComplete=i||o.Z,(0,r.m)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||o.Z,this._tapError=e.error||o.Z,this._tapComplete=e.complete||o.Z)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}},4049:function(t,e,n){"use strict";n.d(e,{r:function(){return r}});var i=n(9544),o=n(1318);function r(t,e){return new i.y(n=>{const i=new o.w;let r=0;return i.add(e.schedule(function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()})),i})}},9511:function(t,e,n){"use strict";n.d(e,{o:function(){return r}});var i=n(1318);class o extends i.w{constructor(t,e){super()}schedule(t,e=0){return this}}
1class r extends o{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n,i=!1;try{this.work(t)}catch(o){i=!0,n=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}},1660:function(t,e,n){"use strict";n.d(e,{v:function(){return o}});let i=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class o extends i{constructor(t,e=i.now){super(t,()=>o.delegate&&o.delegate!==this?o.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return o.delegate&&o.delegate!==this?o.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}},2611:function(t,e,n){"use strict";n.d(e,{hZ:function(){return i}});const i="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},6165:function(t,e,n){"use strict";n.d(e,{L:function(){return i}});const i="function"==typeof Symbol&&Symbol.observable||"@@observable"},9975:function(t,e,n){"use strict";n.d(e,{b:function(){return i}});const i="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},4873:function(t,e,n){"use strict";n.d(e,{W:function(){return i}});const i=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})()},6874:function(t,e,n){"use strict";n.d(e,{N:function(){return i}});const i=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},6901:function(t,e,n){"use strict";function i(t){setTimeout(()=>{throw t},0)}n.d(e,{z:function(){return i}})},7206:function(t,e,n){"use strict";function i(t){return t}n.d(e,{y:function(){return i}})},9861:function(t,e,n){"use strict";n.d(e,{k:function(){return i}});const i=Array.isArray||(t=>t&&"number"==typeof t.length)},984:function(t,e,n){"use strict";n.d(e,{z:function(){return i}});const i=t=>t&&"number"==typeof t.length&&"function"!=typeof t},18:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,{m:function(){return i}})},1533:function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,{K:function(){return i}})},5751:function(t,e,n){"use strict";function i(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:function(){return i}})},6770:function(t,e,n){"use strict";function i(t){return t&&"function"==typeof t.schedule}n.d(e,{K:function(){return i}})},2941:function(t,e,n){"use strict";function i(){}n.d(e,{Z:function(){return i}})},7888:function(t,e,n){"use strict";n.d(e,{s:function(){return d}});var i=n(76),o=n(6901),r=n(2611),s=n(6165),a=n(984),c=n(5751),l=n(1533);const d=t=>{if(t&&"function"==typeof t[s.L])return(t=>e=>{const n=t[s.L]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)})(t);if((0,a.z)(t))return(0,i.V)(t);if((0,c.t)(t))return(t=>e=>(t.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,o.z),e))(t);if(t&&"function"==typeof t[r.hZ])return(t=>e=>{const n=t[r.hZ]();for(;;){const t=n.next();if(t.done){e.complete();break}if(e.next(t.value),e.closed)break}return"function"==typeof n.return&&e.add(()=>{n.return&&n.return()}),e})(t);
1{const e=`You provided ${(0,l.K)(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}}},76:function(t,e,n){"use strict";n.d(e,{V:function(){return i}});const i=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.complete()}},6648:function(t,e,n){"use strict";n.d(e,{D:function(){return s}});var i=n(898),o=n(7888),r=n(9544);function s(t,e,n,s,a=new i.d(t,n,s)){if(!a.closed)return e instanceof r.y?e.subscribe(a):(0,o.s)(e)(a)}},5830:function(t,e,n){"use strict";n.d(e,{s:function(){return h}});var i=n(2321),o=n(5119),r=n(3927),s=n(8293),a=n(2340),c=n(766),l=n(2316),d=n(3882),u=n(5602),p=n(3873);let h=(()=>{class t{constructor(t,e,n){this.http=t,this.cookieService=e,this.router=n,this.usersLogout=new o.xQ,this.buildVersionOfUI=new o.xQ,this.accessSuspended=new o.xQ,this.apiURL=a.N.apiEndPoint,this.token=null}isPublicEmail(t){var e,n;if(!t)return!0;const i=null===(n=null===(e=t.split("@")[1])||void 0===e?void 0:e.split(".")[0])||void 0===n?void 0:n.toLowerCase();return["gmail","yahoo","outlook","hotmail","mail","protonmail","aol","googlemail","rediffmail","yopmail"].includes(i)}getUserDetails(){if(!this.token)return null;const t=this.token.split(".")[1];return JSON.parse(atob(t))}handleRedirect(t){var e;let n=!1;if(t.isSignedUp){["/purchase","/dashboard","/connects"].includes(t.originUrl)||(localStorage.setItem("originUrl",encodeURIComponent(t.originUrl)),n=!0);const i=t.originUrl.includes("apps__for__");if(n&&-1===(null===(e=null==t?void 0:t.originUrl)||void 0===e?void 0:e.indexOf("build-your-connect"))&&!i)this.router.navigateByUrl(t.originUrl);else{const e=t.originUrl.split("apps__for__");let n=[];e.length>1&&(n=e[1].split("_")),n.length>1?(this.cookieService.set("onboarding_completed","false",7,"/","",!0,"Strict"),this.fetchAndSetAppData(n).then(()=>{this.router.navigateByUrl("/setup-editor-integrate")}).catch(t=>{console.error("Error fetching app details:",t),this.router.navigateByUrl("/setup-editor-integrate")})):1===n.length?this.fetchAndSetSingleAppData(n[0]).then(()=>{this.router.navigateByUrl("/setup-editor")}).catch(t=>{this.router.navigateByUrl("/setup-editor")}):this.router.navigateByUrl("/setup-editor")}}else t.originUrl.includes("build-your-connect")&&this.cookieService.get("triggerAppObject")&&this.cookieService.get("actionAppObject")&&(localStorage.setItem("originUrl",encodeURIComponent(t.originUrl)),this.router.navigateByUrl("/setup-editor-integrate"));t.originUrl.includes("https:%2F%2Fdeveloper.appypie.com")&&(window.location.href="https://developer.appypie.com/")}isLoggedIn(){return!!this.getUserDetails()||(this.usersLogout.next(!0),!1)}saveToken(t){this.token=t,t?(this.cookieService.set("token_in_",t,30,"/","",!0,"Strict"),this.usersLogout.next(!1)):(this.usersLogout.next(!0),localStorage.clear(),this.cookieService.deleteAll("/"))}getToken(){return this.cookieService.get("token_in_")}request(t,e,n){let i,o={Authorization:`Bearer ${this.getToken()}`,cookies:document.cookie,buildID:localStorage.getItem("buildID")||"Global"};switch("logoutAssist"===e&&(this.saveToken(null),localStorage.clear()),t){case"post":i="signup"===e||"loginAssist"===e?this.http.post(`${this.apiURL}${e}`,n):this.http.post(`${this.apiURL}${e}`,n,{headers:o});break;case"put":i=this.http.put(`${this.apiURL}${e}`,n,{headers:o});break;case"get":o.userFeeds=JSON.stringify(n),i=this.http.get(`${this.apiURL}${e}`,{headers:o});break;case"delete":o.userFeeds=JSON.stringify(n),i=this.http.delete(`${this.apiURL}${e}`,{headers:o});break;default:throw new Error("Unsupported HTTP method")}return i.pipe((0,r.U)(t=>this.handleResponse(t)),(0,s.K)(n=>this.handleError(n,t,e)))}handleResponse(t){var e;return"object"!=typeof t?t:(null===(e=null==t?void 0:t.auth)||void 0===e?void 0:e.token)?(this.saveToken(t.auth.token),localStorage.removeItem("customerId"),this.cookieService.set("customerId",t.auth.customerId,30,"/","",!0,"Strict"),(t.auth.isSignedUp||t.auth.originUrl)&&this.handleRedirect(t.auth),t.auth.buildId&&this.buildVersionOfUI.next(t.auth.buildId),t):!1===t.success?this.handleErrorConditions(t):t}handleErrorConditions(t){return"Invalid token"===t.msg?(this.saveToken(null),localStorage.clear(),null):"Deactivated User"===t.msg?(this.router.navigateByUrl("/accountDisabled"),null):"Access Suspended"===t.msg?(this.accessSuspended.next(!0),null):"ACCOUNT_DELETED"===t.code||"Account deleted"===t.msg?(this.saveToken(null),localStorage.clear(),window.location.href="/auth/cognito/account-deleted",null):"Older UI version detected. Please reload the page."===t.msg?(this.buildVersionOfUI.next(t.latestBuildID),console.error("%cOlder UI version detected. Please reload the page.","color: red; font-size: 16px; font-weight: bold;"),null):t}fetchAndSetSingleAppData(t){return(0,i.mG)(this,void 0,void 0,function*(){try{const e=yield this.request("post","common/multiappdetails",{apps:[t]}).toPromise();if(!(e&&e.app_detail&&e.app_detail.length>0))throw console.error("Invalid single app API response:",e),new Error("Invalid response format for single app");{const t=e.app_detail[0],n=btoa(encodeURIComponent(JSON.stringify({appId:t.appId,displayName:t.displayName||t.name,name:t.name,image:t.image,categoryId:t.categoryId}))),i="https:"===window.location.protocol||"localhost"===window.location.hostname;this.cookieService.set("triggerAppObject",n,7,"/","",i),this.cookieService.delete("actionAppObject","/")}}catch(e){throw console.error("Error fetching single app details:",e),e}})}fetchAndSetAppData(t){var e,n;return(0,i.mG)(this,void 0,void 0,function*(){if(t.length<2)throw new Error("At least 2 app IDs are required");try{const i=yield this.request("post","common/multiappdetails",{apps:t}).toPromise();if(!(i&&i.app_detail&&i.app_detail.length>=2))throw console.error("Invalid API response:",{hasResponse:!!i,hasAppDetail:!(!i||!i.app_detail),appDetail
1Length:(null===(e=null==i?void 0:i.app_detail)||void 0===e?void 0:e.length)||0,response:i}),new Error(`Invalid response format or insufficient app details. Expected 2 apps, got ${(null===(n=null==i?void 0:i.app_detail)||void 0===n?void 0:n.length)||0}`);{let e=i.app_detail.find(e=>e.appId===t[0]),n=i.app_detail.find(e=>e.appId===t[1]);e||(e=i.app_detail[0]),n||(n=i.app_detail[1]);const o={appId:n.appId,displayName:n.displayName||n.name,name:n.name,image:n.image,categoryId:n.categoryId,appType:n.appType},r=btoa(encodeURIComponent(JSON.stringify({appId:e.appId,displayName:e.displayName||e.name,name:e.name,image:e.image,categoryId:e.categoryId}))),s=btoa(encodeURIComponent(JSON.stringify(o))),a="https:"===window.location.protocol||"localhost"===window.location.hostname;this.cookieService.set("triggerAppObject",r,7,"/","",a),this.cookieService.set("actionAppObject",s,7,"/","",a),setTimeout(()=>{this.cookieService.get("triggerAppObject"),this.cookieService.get("actionAppObject")},100)}}catch(i){throw console.error("Error fetching app details:",i),i.status&&(console.error("HTTP Status:",i.status),console.error("Error details:",i.error)),i}})}createModerator(t){return this.request("post","common/createModerator",t)}getSubUsersList(t){return this.request("post","customer/customers/getSubUsersList",{customerId:t})}deleteSubUser(t){return this.request("delete",`customer/customers/deleteSubUser/${t}`)}deleteModeratorUser(t){return this.request("delete","customer/customers/deleteModeratorUser",{userId:t})}toggleModeratorUserStatus(t,e){return this.request("post","customer/customers/toggleModeratorUserStatus",{userId:t,enabled:e})}getModeratorUserSettings(t){return this.request("get",`customer/customers/getUserSettings/${t}`)}handleError(t,e,n){var i;const o="number"==typeof(null==t?void 0:t.status)?t.status:-1;if(401===o&&"REAUTH_REQUIRED"===(null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)){const e=encodeURIComponent(window.location.pathname+window.location.search);return window.location.href=`/auth/cognito/login?returnUrl=${e}`,[{message:t.error.msg||"Please sign in again to continue.",success:!1}]}const r=`${(e||"request").toUpperCase()} ${n||"unknown"}`;return 0===o||o>=500?c.Tb(new Error(`API ${r} failed with status ${o}`),{tags:{api_endpoint:n||"unknown",http_status:String(o)}}):c.n_({category:"api",level:"warning",message:`API ${r} -> ${o}`}),t.error&&t.error.text?[{message:t.error.text}]:[{message:t.status+"---\x3e  "+JSON.stringify(t.error?t.error:""),success:!1}]}}return t.\u0275fac=function(e){return new(e||t)(l.LFG(d.eN),l.LFG(u.N),l.LFG(p.F0))},t.\u0275prov=l.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},5620:function(t,e,n){"use strict";n.d(e,{v:function(){return a}});var i=n(6491),o=n(9544),r=n(2316),s=n(5830);let a=(()=>{class t{constructor(t){this.apiService=t,this.data=new i.X(!0),this.data$=this.data.asObservable()}getApp(t){return this.apiService.request("get","common/getApp/"+t,null)}getAppDetailBycallBackUrl(t){return this.apiService.request("post","common/getAppDetailBycallBackUrl",t)}getAppOptions(t,e){return this.apiService.request("post","common/appoptions/"+t,e)}setItemWithExpiry(t,e,n){const i={value:e,expiry:(new Date).getTime()+n};localStorage.setItem(t,JSON.stringify(i))}getItemWithExpiry(t){const e=localStorage.getItem(t);if(!e)return null;const n=JSON.parse(e);return(new Date).getTime()>n.expiry?(localStorage.removeItem(t),null):n.value}getAppsCustom(t,e){const n=e?`appsCustom_${t}_${e}`:`appsCustom_${t}`,i=this.getItemWithExpiry(n);if(i)return new o.y(t=>{t.next(i),t.complete()});{const i=e?`common/getAppsCustom/${t}?source=${e}`:`common/getAppsCustom/${t}`;return new o.y(t=>{this.apiService.request("get",i,null).subscribe(e=>{this.setItemWithExpiry(n,e,36e5),t.next(e),t.complete()},e=>{t.error(e)})})}}getAppOptionsByAppId(t,e){const n=`${t}_${(null==e?void 0:e.type)||"action"}`,i=this.getItemWithExpiry(n);return new o.y(i?t=>{t.next(i),t.complete()}:i=>{this.apiService.request("post","common/getAppOptionsByAppId/"+t,e).subscribe(t=>{this.setItemWithExpiry(n,t,36e5),i.next(t),i.complete()},t=>{i.error(t)})})}getAppOptionsByAppIdShort(t,e){return this.apiService.request("post","common/getAppOptionsByAppIdShort/"+t,e)}getResponseData(t){return this.apiService.request("post","common/getResponseData/",t)}saveResponseData(t){return this.apiService.request("post","common/saveResponseData/",t)}triggerTestAction(t,e,n,i,o){return this.apiService.request("post",t+"/"+e,Object.assign({data:n,editOptions:n,authData:o,filterEditOptions:i},o))}connectTestMultiAction(t){return this.apiService.request("post","common/connecttestmultiaction/",t)}testAIAgentEndpoint(t){return this.apiService.request("post","ai-agent/testAIAgent",t)}executeOpenAiAgent(t){return this.apiService.request("post","ai-agent/executeOpenAiAgent",t)}generateToolParamDescriptions(t){return this.apiService.request("post","ai-agent/generateToolParamDescriptions",t)}GetPopularMatchesListFilter(t){return this.apiService.request("post","common/GetPopularMatchesListFilter",t)}GetPopularMatchesTriggerAction(t){return this.apiService.request("post","common/GetPopularMatchesTriggerAction",t)}GetPopularMatchesList(t){return this.apiService.request("post","common/popularmatchesList",t)}getAppsList(){return this.apiService.request("get","common/getAppsList",{})}GetConnectAppDetails(t){return this.apiService.request("get","common/connectappdetails/"+t,{})}GetPopularMatchDetails(t){return this.apiService.request("get","common/popularMatchDetails/"+t,{})}GetMultiAppDetails(t){return this.apiService.request("post","common/multiappdetails",{apps:t})}searchRecommendedConnectsList(t){return this.apiService.request("get","common/searchRecommendedConnectsList/"+t.searchTxt+"/"+t.page,{})}sendFeedback(t){return this.apiService.request("post","common/sendFeedback",t)}GetCustomerCountry(t){return this.apiService.request("get","common/customercountry/"+t,{})}GetRecommendedConnectsList(t){return this.apiService.request("get","common/recommendedconnectsList/"+t,{})}getAppsTriggerData(t){return this.apiService.request("post","common/getAppsTriggerData",t)}GetAllCountries(){return this.apiService.request("get","common/countries/",{})}getApprovedWithReconnectApp(t){return this.apiService.request("post","common/getApprovedWithReconnectApp",t)}isSideBarActive(t){this.data.next(t)}showToast(t){var e=document.createElement("div");
1e.className="copyToast",e.textContent=t,document.body.appendChild(e),setTimeout(function(){document.body.removeChild(e)},3e3)}getAIMapping(t){return this.apiService.request("post","common/getAIMapping",t)}getConnectEventsFromTextPrompt(t){return this.apiService.request("post","common/getConnectEventsFromTextPrompt",t)}copilotChat(t){return this.apiService.request("post","common/copilotChat",t)}copilotSplitIntents(t){return this.apiService.request("post","common/copilotSplitIntents",t)}getCopilotConversations(){return this.apiService.request("get","common/copilotConversations",null)}getCopilotConversation(t){return this.apiService.request("get","common/copilotConversation/"+t,null)}getCopilotConversationByConnect(t){return this.apiService.request("get","common/copilotConversationByConnect/"+t,null)}saveCopilotConversation(t){return this.apiService.request("post","common/copilotConversationSave",t)}deleteCopilotConversation(t){return this.apiService.request("delete","common/copilotConversation/"+t,null)}updateTextToConnectDocument(t){return this.apiService.request("post","common/updateTextToConnectDocument",t)}}return t.\u0275fac=function(e){return new(e||t)(r.LFG(s.s))},t.\u0275prov=r.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},2204:function(t,e,n){"use strict";n.d(e,{f:function(){return c}});var i=n(5119),o=n(2316),r=n(7284),s=n(4364);const a=function(t,e){return{"theme-bgcl border-0":t,btn_delete:e}};let c=(()=>{class t{constructor(t){this.bsModalRef=t,this.IsDelete=!1}ngOnInit(){this.onClose=new i.xQ}confirmDeleteConnect(t){this.onClose.next(!0),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(r.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-delete-confirm-pop-up"]],decls:14,vars:8,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn",3,"click"],[1,"si","si-close"],[1,"modal-body","py-0"],[1,"text-start"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","link",1,"btn","btn-default","rounded-pill","btn_confirm",3,"ngClass","click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(4,"i",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"p"),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"div",6),o.TgZ(10,"a",7),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(11),o.qZA(),o.TgZ(12,"a",8),o.NdJ("click",function(){return e.confirmDeleteConnect(e.modelConnectId)}),o._uU(13),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(6),o.Oqu(e.modelContent),o.xp6(3),o.Oqu(e.translation.CANCEL),o.xp6(1),o.Q6J("ngClass",o.WLB(5,a,!e.IsDelete,e.IsDelete)),o.xp6(1),o.Oqu(e.translation.CONFIRM))},directives:[s.mk],styles:[""]}),t})()},2340:function(t,e,n){"use strict";n.d(e,{N:function(){return i}});const i={production:!0,checkBuildId:!1,sentryDsn:"https://f46a1d78d2a0bb523dcc3f9a10eb27ff@o4511714974564352.ingest.us.sentry.io/4511749095751680",sentryEnv:"production",apiEndPoint:"/",localesPath:"assets/locales",baseUrl:"",commonLoginUrl:"https://accounts.appypie.com",commonPaymentUrl:"https://checkout.appypie.com",cdnMediaPath:"https://mediaconnect.appypie.com/media/icons/128x128/",stripeTestPublishableKey:"",stripeLivePublishableKey:"",paypalTestBusiness:"",paypalLiveBusiness:"",innerTrends:"",supportEmail:"[email protected]",mindbodyId:"k40w4oiz0jwo11f3cegggc7s",defaultMinimumRequiredBalance:"10",sandboxAllowEmail:[""],USER_PLAN:{ZERO:0,ONE:1,TWO:2,THREE:3},USER_TYPE:{ADMIN:1,SUB_USER:0},EXPLAINATION:{USER_PLAN:{ONE:"for registered user as a trial",TWO:"for Payment Done (Paid) users.",THREE:"Free User or when Downgrade the user"},USER_TYPE:{ADMIN:"By Default when regester a user.",SUB_USER:"Invite users"}}}},4033:function(t,e,n){"use strict";var i=n(1570),o=n(2316),r=n(766),s=n(6150),a=n(4799),c=n(4635),l=n(6702),d=n(3212),u=n(468);const p=[];function h(t){const e=t.defaultIntegrations||[],n=t.integrations;let i;e.forEach(t=>{t.isDefaultInstance=!0}),i=Array.isArray(n)?[...e,...n]:"function"==typeof n?(0,a.lE)(n(e)):e;const o=function(t){const e={};return t.forEach(t=>{const{name:n}=t,i=e[n];i&&!i.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(i),r=function(t,e){for(let n=0;n<t.length;n++)if(!0==("Debug"===t[n].name))return n;return-1}(o);if(-1!==r){const[t]=o.splice(r,1);o.push(t)}return o}function g(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function f(t,e,n){if(n[e.name])l.X&&s.kg.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,-1===p.indexOf(e.name)&&(e.setupOnce(d.cc,u.Gd),p.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(e,i)=>n(e,i,t))}if(t.addEventProcessor&&"function"==typeof e.processEvent){const n=e.processEvent.bind(e),i=Object.assign((e,i)=>n(e,i,t),{id:e.name});t.addEventProcessor(i)}l.X&&s.kg.log(`Integration installed: ${e.name}`)}}function m(t,e){return Object.assign(function(...t){return e(...t)},{id:t})}const v=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],b=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],x="InboundFilters",_=(t={})=>({name:x,setupOnce(){},processEvent(e,n,i){const o=i.getOptions(),r=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:v],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:b],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,o);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(e){}return!1}(t)?(l.X&&s.kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0,a.jH)(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){const e=[];let n;t.message&&e.push(t.message);try{n=t.exception.values[t.exception.values.length-1]}catch(i){}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),l.X&&0===e.length&&s.kg.error(`Could not extract message for event ${(0,a.jH)(t)}`),e}(t).some(t=>(0,c.U0)(t,e))}(t,e.ignoreErrors)?(l.X&&s.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,a.jH)(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&(0,c.U0)(n,e)}(t,e.ignoreTransactions)?(l.X&&s.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${(0,a.jH)(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=C(t);return!!n&&(0,c.U0)(n,e)}(t,e.denyUrls)?(l.X&&s.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,a.jH)(t)}.\nUrl: ${C(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=C(t);return!n||(0,c.U0)(n,e)}(t,e.allowUrls)&&(l.X&&s.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,a.jH)(t)}.\nUrl: ${C(t)}`),!0)}(e,r)?null:e}});function C(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(e){}return n?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return l.X&&s.kg.error(`Cannot extract url for event ${(0,a.jH)(t)}`),null}}m(x,_);var w=n(5953);let y;const A="FunctionToString",Z=new WeakMap,k=()=>({name:A,setupOnce(){y=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=(0,w.HK)(this),n=Z.has((0,r.s3)())&&void 0!==e?e:this;return y.apply(n,t)}}catch(Dh){}},setup(t){Z.set(t,!0)}});m(A,k);var T=n(3024);
1const O=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function M(t,e=!1){const{host:n,path:i,pass:o,port:r,projectId:s,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&o?`:${o}`:""}@${n}${r?`:${r}`:""}/${i&&`${i}/`}${s}`}function I(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function S(t){const e="string"==typeof t?function(t){const e=O.exec(t);if(!e)return void(0,s.Cf)(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[n,i,o="",r,a="",c]=e.slice(1);let l="",d=c;const u=d.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),d=u.pop()),d){const t=d.match(/^\d+/);t&&(d=t[0])}return I({host:r,pass:o,path:l,projectId:d,port:a,protocol:n,publicKey:i})}(t):I(t);if(e&&function(t){if(!T.X)return!0;const{port:e,projectId:n,protocol:i}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(s.kg.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(i)?e&&isNaN(parseInt(e,10))&&(s.kg.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(s.kg.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(s.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}function P(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}var N=n(4717),q=n(7769);const U=(0,q.Rf)();function E(){if(!("fetch"in U))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(Dh){return!1}}function F(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const D=(0,q.Rf)(),L={},J={};function j(t,e){L[t]=L[t]||[],L[t].push(e)}function R(t,e){J[t]||(e(),J[t]=!0)}function B(t,e){const n=t&&L[t];if(n)for(const o of n)try{o(e)}catch(i){T.X&&s.kg.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${(0,N.$P)(o)}\nError:`,i)}}const H=q.n2;let Q;function Y(t){const e="history";j(e,t),R(e,z)}function z(){if(!function(){const t=D.chrome;return!(t&&t.app&&t.app.runtime||!("history"in D)||!D.history.pushState||!D.history.replaceState)}())return;const t=H.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=Q,e=String(n);Q=e,B("history",{from:t,to:e})}return t.apply(this,e)}}H.onpopstate=function(...e){const n=H.location.href,i=Q;if(Q=n,B("history",{from:i,to:n}),t)try{return t.apply(this,e)}catch(o){}},(0,w.hl)(H.history,"pushState",e),(0,w.hl)(H.history,"replaceState",e)}var V=n(7821),G=n(4824),W=n(2060);function K(t,e=[]){return[t,e]}function X(t,e){const[n,i]=t;return[n,[...i,e]]}function tt(t,e){const n=t[1];for(const i of n)if(e(i,i[0].type))return!0;return!1}function et(t,e){return(e||new TextEncoder).encode(t)}function nt(t,e){const[n,i]=t;let o=JSON.stringify(n);function r(t){"string"==typeof o?o="string"==typeof t?o+t:[et(o,e),t]:o.push("string"==typeof t?et(t,e):t)}for(const a of i){const[t,e]=a;if(r(`\n${JSON.stringify(t)}\n`),"string"==typeof e||e instanceof Uint8Array)r(e);else{let t;try{t=JSON.stringify(e)}catch(s){t=JSON.stringify((0,W.Fv)(e))}r(t)}}return"string"==typeof o?o:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let i=0;for(const o of t)n.set(o,i),i+=o.length;return n}(o)}function it(t,e){const n="string"==typeof t.data?et(t.data,e):t.data;return[(0,w.Jr)({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const ot={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rt(t){return ot[t]}function st(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}class at extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}var ct=n(2936),lt=n(8523),dt=n(6562);const ut="Not capturing exception because it's already been captured.";function pt(t){return void 0===t.type}function gt(t){return"transaction"===t.type}var ft=n(6220);function mt(t,e,n=[e],i="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map(t=>({name:`${i}:@sentry/${t}`,version:ft.J})),version:ft.J}),t._metadata=o}var vt=n(7135);const bt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function xt(t,e){const n=Ct(t,e),i={type:e&&e.name,value:yt(e)};return n.length&&(i.stacktrace={frames:n}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function _t(t,e){return{exception:{values:[xt(t,e)]}}}function Ct(t,e){const n=e.stacktrace||e.stack||"",i=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(wt.test(t.message))return 1}return 0}(e);try{return t(n,i)}catch(o){}return[]}const wt=/Minified React error #\d+;/i;function yt(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function At(t,e,n,i,o){let s;if((0,V.VW)(e)&&e.error)return _t(t,e.error);if((0,V.TX)(e)||(0,V.fm)(e)){const o=e;if("stack"in e)s=_t(t,e);else{const e=o.name||((0,V.TX)(o)?"DOMError":"DOMException"),r=o.message?`${e}: ${o.message}`:e;s=Zt(t,r,n,i),(0,a.Db)(s,r)}return"code"in o&&(s.tags=Ji(ht({},s.tags),{"DOMException.code":`${o.code}`})),s}return(0,V.VZ)(e)?_t(t,e):(0,V.PO)(e)||(0,V.cO)(e)?(s=function(t,e,n,i){const o=(0,r.s3)(),s=o&&o.getOptions().normalizeDepth,a={exception:{values:[{type:(0,V.cO)(e)?e.constructor.name:i?"UnhandledRejection":"Error",value:kt(e,{isUnhandledRejection:i})}]},extra:{__serialized__:(0,W.Qy)(e,s)}};if(n){const e=Ct(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,o),(0,a.EG)(s,{synthetic:!0}),s):(s=Zt(t,e,n,i),(0,a.Db)(s,`${e}`,void 0),(0,a.EG)(s,{synthetic:!0}),s)}function Zt(t,e,n,i){const o={};if(i&&n){const i=Ct(t,n);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}
1if((0,V.Le)(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return o.logentry={message:t,params:n},o}return o.message=e,o}function kt(t,{isUnhandledRejection:e}){const n=(0,w.zf)(t),i=e?"promise rejection":"exception";return(0,V.VW)(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:(0,V.cO)(t)?`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}const Tt=q.n2;let Ot=0;function Mt(){return Ot>0}function It(){Ot++,setTimeout(()=>{Ot--})}function St(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return"function"==typeof e?e:t;if((0,w.HK)(t))return t}catch(o){return t}const i=function(){const i=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=i.map(t=>St(t,e));return t.apply(this,o)}catch(o){throw It(),(0,r.$e)(t=>{t.addEventProcessor(t=>(e.mechanism&&((0,a.Db)(t,void 0,void 0),(0,a.EG)(t,e.mechanism)),t.extra=Ji(ht({},t.extra),{arguments:i}),t)),(0,r.Tb)(o)}),o}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e])}catch(o){}(0,w.$Q)(i,t),(0,w.xp)(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>t.name})}catch(o){}return i}class Pt extends class{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=S(t.dsn):l.X&&s.kg.warn("No DSN provided, client will not send events."),this._dsn){const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${P(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return(0,w._j)(ht({sentry_key:t.publicKey,sentry_version:"7"},e&&{sentry_client:`${e.name}/${e.version}`}))}(t,n)}`}(this._dsn,t);this._transport=t.transport(Ji(ht({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:e}))}}captureException(t,e,n){if((0,a.YO)(t))return void(l.X&&s.kg.log(ut));let i=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{i=t})),i}captureMessage(t,e,n,i){let o=n&&n.event_id;const r=(0,V.Le)(t)?t:String(t),s=(0,V.pt)(t)?this.eventFromMessage(r,e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,i)).then(t=>{o=t})),o}captureEvent(t,e,n){if(e&&e.originalException&&(0,a.YO)(e.originalException))return void(l.X&&s.kg.log(ut));let i=e&&e.event_id;return this._process(this._captureEvent(t,e,(t.sdkProcessingMetadata||{}).capturedSpanScope||n).then(t=>{i=t})),i}captureSession(t){"string"!=typeof t.release?l.X&&s.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),(0,ct.CT)(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t))):(0,G.WD)(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return l.X&&s.kg.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const e=this._integrations[t.name];f(this,t,this._integrations),e||g(this,[t])}sendEvent(t,e={}
1){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,i){const o=st(n),r=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const s=function(t,e,n,i){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return ht(ht(ht({event_id:t.event_id,sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n&&i&&{dsn:M(i)}),o&&{trace:(0,w.Jr)(ht({},o))})}(t,o,i,e);return delete t.sdkProcessingMetadata,K(s,[[{type:r},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of e.attachments||[])n=X(n,it(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then(e=>this.emit("afterSendEvent",t,e),null)}sendSession(t){const e=function(t,e,n,i){const o=st(n);return K(ht(ht({sent_at:(new Date).toISOString()},o&&{sdk:o}),!!i&&e&&{dsn:M(e)}),["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const i="number"==typeof n?n:1,o=`${t}:${e}`;l.X&&s.kg.log(`Recording outcome: "${o}"${i>1?` (${i} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+i}}captureAggregateMetrics(t){l.X&&s.kg.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const e=function(t,e,n,i){const o={sent_at:(new Date).toISOString()};n&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),i&&e&&(o.dsn=M(e));const r=function(t){const e=function(t){let e="";for(const n of t){const t=Object.entries(n.tags),i=t.length>0?`|#${t.map(([t,e])=>`${t}:${e}`).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${i}|T${n.timestamp}\n`}return e}(t);return[{type:"statsd",length:e.length},e]}(t);return K(o,[r])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach(e=>{e&&f(t,e,n)}),n}(this,t),g(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,e){let n=!1,i=!1;const o=e.exception&&e.exception.values;if(o){i=!0;for(const t of o){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const r="ok"===t.status;(r&&0===t.errors||r&&n)&&((0,ct.CT)(t,Ji(ht({},n&&{status:"crashed"}),{errors:t.errors||Number(i||n)})),this.captureSession(t))}_isClientDoneProcessing(t){return new G.cW(e=>{let n=0;const i=setInterval(()=>{0==this._numProcessing?(clearInterval(i),e(!0)):(n+=1,t&&n>=t&&(clearInterval(i),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,i=(0,u.aF)()){const o=this.getOptions(),r=Object.keys(this._integrations);return!e.integrations&&r.length>0&&(e.integrations=r),this.emit("preprocessEvent",t,e),(0,dt.R)(o,t,e,n,this,i).then(t=>{if(null===t)return t;const e=ht(ht({},i.getPropagationContext()),n?n.getPropagationContext():void 0);if((!t.contexts||!t.contexts.trace)&&e){const{traceId:i,spanId:o,parentSpanId:r,dsc:s}=e;t.contexts=ht({trace:{trace_id:i,span_id:o,parent_span_id:r}},t.contexts);const a=s||(0,lt._)(i,this,n);t.sdkProcessingMetadata=ht({dynamicSamplingContext:a},t.sdkProcessingMetadata)}return t})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if(l.X){const e=t;"log"===e.logLevel?s.kg.log(e.message):s.kg.warn(e)}})}_processEvent(t,e,n){const i=this.getOptions(),{sampleRate:o}=i,r=gt(t),s=pt(t),a=t.type||"error",c=`before send for type \`${a}\``;if(s&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),(0,G.$2)(new at(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===a?"replay":a;return this._prepareEvent(t,e,n,(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new at("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const o=function(t,e,n){const{beforeSend:i,beforeSendTransaction:o}=t;if(pt(e)&&i)return i(e,n);if(gt(e)&&o){if(e.spans){const t=e.spans.length;e.sdkProcessingMetadata=Ji(ht({},e.sdkProcessingMetadata),{spanCountBeforeProcessing:t})}return o(e,n)}return e}(i,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if((0,V.J8)(t))return t.then(t=>{if(!(0,V.PO)(t)&&null!==t)throw new at(n);return t},t=>{throw new at(`${e} rejected with ${t}`)});if(!(0,V.PO)(t)&&null!==t)throw new at(n);return t}(o,c)}).then(i=>{if(null===i)throw this.recordDroppedEvent("before_send",l,t),r&&this.recordDroppedEvent("before_send","span",1+(t.spans||[]).length),new at(`${c} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();if(!r&&o&&this._updateSessionFromEvent(o,i),r){const t=(i.sdkProcessingMetadata&&i.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const s=i.transaction_info;if(r&&s&&i.transaction!==t.transaction){const t="custom";i.transaction_info=Ji(ht({},s),{source:t})}return this.sendEvent(i,e),i}).then(null,t=>{throw t instanceof at?t:(this.captureException(t,{data:{__sentry__:!0},originalException:t}),new at(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`))})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}
1_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,t=>{l.X&&s.kg.error("Error while sending event:",t)});l.X&&s.kg.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,i]=e.split(":");return{reason:n,category:i,quantity:t[e]}})}}{constructor(t){mt(t,"browser",["browser"],Tt.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Tt.document&&Tt.document.addEventListener("visibilitychange",()=>{"hidden"===Tt.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,i){const o=At(t,e,n&&n.syntheticException||void 0,i);return(0,a.EG)(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),(0,G.WD)(o)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",i,o){const r=Zt(t,e,i&&i.syntheticException||void 0,o);return r.level=n,i&&i.event_id&&(r.event_id=i.event_id),(0,G.WD)(r)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(bt&&s.kg.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:i}){const o=ht(ht({event_id:t.event_id,sent_at:(new Date).toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!i&&{dsn:M(i)}),r=function(t){return[{type:"user_report"},t]}(t);return K(o,[r])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(bt&&s.kg.log("No outcomes to send"));if(!this._dsn)return void(bt&&s.kg.log("No dsn provided, will not send outcomes"));bt&&s.kg.log("Sending outcomes:",t);const e=function(t,e,n){return K(e?{dsn:e}:{},[[{type:"client_report"},{timestamp:(0,vt.yW)(),discarded_events:t}]])}(t,this._options.tunnel&&M(this._dsn));this._sendEnvelope(e)}}function Nt(){"console"in q.n2&&s.RU.forEach(function(t){t in q.n2.console&&(0,w.hl)(q.n2.console,t,function(e){return s.LD[t]=e,function(...e){B("console",{args:e,level:t});const n=s.LD[t];n&&n.apply(q.n2.console,e)}})})}const qt=q.n2;let Ut,Et,Ft;function Dt(){if(!qt.document)return;const t=B.bind(null,"dom"),e=Lt(t,!0);qt.document.addEventListener("click",e,!1),qt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=qt[e]&&qt[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||((0,w.hl)(n,"addEventListener",function(e){return function(n,i,o){if("click"===n||"keypress"==n)try{const i=this,r=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const i=Lt(t);s.handler=i,e.call(this,n,i,o)}s.refCount++}catch(r){}return e.call(this,n,i,o)}}),(0,w.hl)(n,"removeEventListener",function(t){return function(e,n,i){if("click"===e||"keypress"==e)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},r=o[e];r&&(r.refCount--,r.refCount<=0&&(t.call(this,e,r.handler,i),r.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(o){}return t.call(this,e,n,i)}}))})}function Lt(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const i=function(t){try{return t.target}catch(e){return null}}(n);if(function(t,e){return!("keypress"!==t||e&&e.tagName&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable))}(n.type,i))return;(0,w.xp)(n,"_sentryCaptured",!0),i&&!i._sentryId&&(0,w.xp)(i,"_sentryId",(0,a.DM)());const o="keypress"===n.type?"input":n.type;(function(t){if(t.type!==Et)return!1;try{if(!t.target||t.target._sentryId!==Ft)return!1}catch(e){}return!0})(n)||(t({event:n,name:o,global:e}),Et=n.type,Ft=i?i._sentryId:void 0),clearTimeout(Ut),Ut=qt.setTimeout(()=>{Ft=void 0,Et=void 0},1e3)}}const Jt=q.n2,jt="__sentry_xhr_v3__";function Rt(t){j("xhr",t),R("xhr",$t)}function $t(){if(!Jt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;(0,w.hl)(t,"open",function(t){return function(...e){const n=Date.now(),i=(0,V.HD)(e[0])?e[0].toUpperCase():void 0,o=function(e){if((0,V.HD)(e))return e;try{return e.toString()}catch(t){}}(e[1]);if(!i||!o)return t.apply(this,e);this[jt]={method:i,url:o,request_headers:{}}
1,"POST"===i&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const r=()=>{const t=this[jt];if(t&&4===this.readyState){try{t.status_code=this.status}catch(e){}B("xhr",{args:[i,o],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,w.hl)(this,"onreadystatechange",function(t){return function(...e){return r(),t.apply(this,e)}}):this.addEventListener("readystatechange",r),(0,w.hl)(this,"setRequestHeader",function(t){return function(...e){const[n,i]=e,o=this[jt];return o&&(0,V.HD)(n)&&(0,V.HD)(i)&&(o.request_headers[n.toLowerCase()]=i),t.apply(this,e)}}),t.apply(this,e)}}),(0,w.hl)(t,"send",function(t){return function(...e){const n=this[jt];return n?(void 0!==e[0]&&(n.body=e[0]),B("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,e)):t.apply(this,e)}})}function Bt(t){const e="fetch";j(e,t),R(e,Ht)}function Ht(){!function(){if("string"==typeof EdgeRuntime)return!0;if(!E())return!1;if(F(U.fetch))return!0;let t=!1;const e=U.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");
1n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=F(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){T.X&&s.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}()||(0,w.hl)(q.n2,"fetch",function(t){return function(...e){const{method:n,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Yt(e),method:Qt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Yt(e),method:Qt(e,"method")?String(e.method).toUpperCase():"GET"}}(e),o={args:e,fetchData:{method:n,url:i},startTimestamp:Date.now()};return B("fetch",ht({},o)),t.apply(q.n2,e).then(t=>(B("fetch",Ji(ht({},o),{endTimestamp:Date.now(),response:t})),t),t=>{throw B("fetch",Ji(ht({},o),{endTimestamp:Date.now(),error:t})),t})}})}function Qt(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Yt(t){return"string"==typeof t?t:t?Qt(t,"url")?t.url:t.toString?t.toString():"":""}var zt=n(4711);const Vt=["fatal","error","warning","log","info","debug"];function Gt(t){return"warn"===t?"warning":Vt.includes(t)?t:"log"}function Wt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",i=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:i,relative:e[5]+n+i}}const Kt="Breadcrumbs",Xt=(t={})=>{const e=ht({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Kt,setupOnce(){},setup(t){e.console&&function(t){const e="console";j(e,t),R(e,Nt)}(function(t){return function(e){if((0,r.s3)()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Gt(e.level),message:(0,c.nK)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${(0,c.nK)(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}(0,r.n_)(n,{input:e.args,level:e.level})}}(t)),e.dom&&function(t){j("dom",t),R("dom",Dt)}(function(t,e){return function(n){if((0,r.s3)()!==t)return;let i,o,a="object"==typeof e?e.serializeAttribute:void 0,c="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;c&&c>1024&&(bt&&s.kg.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${c} was configured. Sentry will use 1024 instead.`),c=1024),"string"==typeof a&&(a=[a]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;i=(0,zt.Rt)(e,{keyAttrs:a,maxStringLength:c}),o=(0,zt.iY)(e)}catch(d){i="<unknown>"}if(0===i.length)return;const l={category:`ui.${n.name}`,message:i};o&&(l.data={"ui.component_name":o}),(0,r.n_)(l,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&Rt(function(t){return function(e){if((0,r.s3)()!==t)return;const{startTimestamp:n,endTimestamp:i}=e,o=e.xhr[jt];if(!n||!i||!o)return;const{method:s,url:a,status_code:c,body:l}=o;(0,r.n_)({category:"xhr",data:{method:s,url:a,status_code:c},type:"http"},{xhr:e.xhr,input:l,startTimestamp:n,endTimestamp:i})}}(t)),e.fetch&&Bt(function(t){return function(e){if((0,r.s3)()!==t)return;const{startTimestamp:n,endTimestamp:i}=e;if(i&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error)(0,r.n_)({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args,startTimestamp:n,endTimestamp:i});else{const t=e.response,o=Ji(ht({},e.fetchData),{status_code:t&&t.status});(0,r.n_)({category:"fetch",data:o,type:"http"},{input:e.args,response:t,startTimestamp:n,endTimestamp:i})}}}(t)),e.history&&Y(function(t){return function(e){if((0,r.s3)()!==t)return;let n=e.from,i=e.to;const o=Wt(Tt.location.href);let s=n?Wt(n):void 0;const a=Wt(i);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),(0,r.n_)({category:"navigation",data:{from:n,to:i}})}}(t)),e.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(e){(0,r.s3)()===t&&(0,r.n_)({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:(0,a.jH)(e)},{event:e})}}(t))}}};m(Kt,Xt);const te=()=>{let t;return{name:"Dedupe",setupOnce(){},processEvent(e){if(e.type)return e;try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,i=e.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!ne(t,e)||!ee(t,e))}(t,e)&&!function(t,e){const n=ie(e),i=ie(t);return!!(n&&i&&n.type===i.type&&n.value===i.value&&ne(t,e)&&ee(t,e))}(t,e))}(e,t))return bt&&s.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return t=e}}};function ee(t,e){let n=oe(t),i=oe(e);if(!n&&!i)return!0;
1if(n&&!i||!n&&i||i.length!==n.length)return!1;for(let o=0;o<i.length;o++){const t=i[o],e=n[o];if(t.filename!==e.filename||t.lineno!==e.lineno||t.colno!==e.colno||t.function!==e.function)return!1}return!0}function ne(t,e){let n=t.fingerprint,i=e.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;try{return n.join("")===i.join("")}catch(o){return!1}}function ie(t){return t.exception&&t.exception.values&&t.exception.values[0]}function oe(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}}m("Dedupe",te);let re=null;function se(t){const e="error";j(e,t),R(e,ae)}function ae(){re=q.n2.onerror,q.n2.onerror=function(t,e,n,i,o){return B("error",{column:i,error:o,line:n,msg:t,url:e}),!(!re||re.__SENTRY_LOADER__)&&re.apply(this,arguments)},q.n2.onerror.__SENTRY_INSTRUMENTED__=!0}let ce=null;function le(t){const e="unhandledrejection";j(e,t),R(e,de)}function de(){ce=q.n2.onunhandledrejection,q.n2.onunhandledrejection=function(t){return B("unhandledrejection",t),!(ce&&!ce.__SENTRY_LOADER__)||ce.apply(this,arguments)},q.n2.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const ue="GlobalHandlers",pe=(t={})=>{const e=ht({onerror:!0,onunhandledrejection:!0},t);return{name:ue,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(function(t){se(e=>{const{stackParser:n,attachStacktrace:i}=fe();if((0,r.s3)()!==t||Mt())return;const{msg:o,url:s,line:a,column:c,error:l}=e,d=void 0===l&&(0,V.HD)(o)?function(t,e,n,i){let o=(0,V.VW)(t)?t.message:t,r="Error";const s=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return s&&(r=s[1],o=s[2]),he({exception:{values:[{type:r,value:o}]}},e,n,i)}(o,s,a,c):he(At(n,l||o,void 0,i,!1),s,a,c);d.level="error",(0,r.eN)(d,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}(t),ge("onerror")),e.onunhandledrejection&&(function(t){le(e=>{const{stackParser:n,attachStacktrace:i}=fe();if((0,r.s3)()!==t||Mt())return;const o=function(t){if((0,V.pt)(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(n){}return t}(e),s=(0,V.pt)(o)?function(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}(o):At(n,o,void 0,i,!0);s.level="error",(0,r.eN)(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(t),ge("onunhandledrejection"))}}};function he(t,e,n,i){const o=t.exception=t.exception||{},r=o.values=o.values||[],s=r[0]=r[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(i,10))?void 0:i,d=isNaN(parseInt(n,10))?void 0:n,u=(0,V.HD)(e)&&e.length>0?e:(0,zt.l4)();return 0===c.length&&c.push({colno:l,filename:u,function:"?",in_app:!0,lineno:d}),t}function ge(t){bt&&s.kg.log(`Global Handler attached: ${t}`)}function fe(){const t=(0,r.s3)();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}m(ue,pe);const me="HttpContext",ve=()=>({name:me,setupOnce(){},preprocessEvent(t){if(!Tt.navigator&&!Tt.location&&!Tt.document)return;const e=t.request&&t.request.url||Tt.location&&Tt.location.href,{referrer:n}=Tt.document||{},{userAgent:i}=Tt.navigator||{},o=ht(ht(ht({},t.request&&t.request.headers),n&&{Referer:n}),i&&{"User-Agent":i}),r=Ji(ht(ht({},t.request),e&&{url:e}),{headers:o});t.request=r}});function be(t,e,n=250,i,o,r,s){if(!(r.exception&&r.exception.values&&s&&(0,V.V9)(s.originalException,Error)))return;const a=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;a&&(r.exception.values=function(t,e){return t.map(t=>(t.value&&(t.value=(0,c.$G)(t.value,e)),t))}(xe(t,e,o,s.originalException,i,r.exception.values,a,0),n))}function xe(t,e,n,i,o,r,s,a){if(r.length>=n+1)return r;let c=[...r];if((0,V.V9)(i[o],Error)){_e(s,a);const r=t(e,i[o]),l=c.length;Ce(r,o,l,a),c=xe(t,e,n,i[o],o,[r,...c],r,l)}return Array.isArray(i.errors)&&i.errors.forEach((i,r)=>{if((0,V.V9)(i,Error)){_e(s,a);const l=t(e,i),d=c.length;Ce(l,`errors[${r}]`,d,a),c=xe(t,e,n,i,o,[l,...c],l,d)}}),c}function _e(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ji(ht(ht({},t.mechanism),"AggregateError"===t.type&&{is_exception_group:!0}
1),{exception_id:e})}function Ce(t,e,n,i){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ji(ht({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:i})}m(me,ve);const we="LinkedErrors",ye=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:we,setupOnce(){},preprocessEvent(t,i,o){const r=o.getOptions();be(xt,r.stackParser,r.maxValueLength,n,e,t,i)}}},Ae=(m(we,ye),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"]),Ze="TryCatch",ke=(t={})=>{const e=ht({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:Ze,setupOnce(){e.setTimeout&&(0,w.hl)(Tt,"setTimeout",Te),e.setInterval&&(0,w.hl)(Tt,"setInterval",Te),e.requestAnimationFrame&&(0,w.hl)(Tt,"requestAnimationFrame",Oe),e.XMLHttpRequest&&"XMLHttpRequest"in Tt&&(0,w.hl)(XMLHttpRequest.prototype,"send",Me);const t=e.eventTarget;t&&(Array.isArray(t)?t:Ae).forEach(Ie)}}};function Te(t){return function(...e){return e[0]=St(e[0],{mechanism:{data:{function:(0,N.$P)(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Oe(t){return function(e){return t.apply(this,[St(e,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,N.$P)(t)},handled:!1,type:"instrument"}})])}}function Me(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&(0,w.hl)(n,t,function(e){const n={mechanism:{data:{function:t,handler:(0,N.$P)(e)},handled:!1,type:"instrument"}},i=(0,w.HK)(e);return i&&(n.mechanism.data.handler=(0,N.$P)(i)),St(e,n)})}),t.apply(this,e)}}function Ie(t){const e=Tt[t]&&Tt[t].prototype;!e||!e.hasOwnProperty||!e.hasOwnProperty("addEventListener")||((0,w.hl)(e,"addEventListener",function(e){return function(n,i,o){try{"function"==typeof i.handleEvent&&(i.handleEvent=St(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,N.$P)(i),target:t},handled:!1,type:"instrument"}}))}catch(r){}return e.apply(this,[n,St(i,{mechanism:{data:{function:"addEventListener",handler:(0,N.$P)(i),target:t},handled:!1,type:"instrument"}}),o])}}),(0,w.hl)(e,"removeEventListener",function(t){return function(e,n,i){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&t.call(this,e,n,i)}catch(r){}return t.call(this,e,o,i)}}))}function Se(t,e,n,i){const o={filename:t,function:e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==i&&(o.colno=i),o}m(Ze,ke);const Pe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ne=/\((\S*)(?::(\d+))(?::(\d+))\)/,qe=[30,t=>{const e=Pe.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Ne.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=je(e[1]||"?",e[2]);return Se(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],Ue=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ee=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Fe=[50,t=>{const e=Ue.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ee.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||"?";return[n,t]=je(n,t),Se(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],De=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Le=[40,t=>{const e=De.exec(t);return e?Se(e[2],e[1]||"?",+e[3],e[4]?+e[4]:void 0):void 0}],Je=(0,N.pE)(qe,Fe,Le),je=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),i=-1!==t.indexOf("safari-web-extension");return n||i?[-1!==t.indexOf("@")?t.split("@")[0]:"?",n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function Re(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(i){if(!(void 0===t||e.length<t))return(0,G.$2)(new at("Not adding Promise because buffer limit was reached."));const o=i();return-1===e.indexOf(o)&&e.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o},drain:function(t){return new G.cW((n,i)=>{let o=e.length;if(!o)return n(!0);const r=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{(0,G.WD)(t).then(()=>{--o||(clearTimeout(r),n(!0))},i)})})}}}(t.bufferSize||30)){let i={};function o(o){const r=[];if(tt(o,(e,n)=>{const o=rt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(i,o)){const i=$e(e,n);t.recordDroppedEvent("ratelimit_backoff",o,i)}else r.push(e)}),0===r.length)return(0,G.WD)();const a=K(o[0],r),c=e=>{tt(a,(n,i)=>{const o=$e(n,i);t.recordDroppedEvent(e,rt(i),o)})};return n.add(()=>e({body:nt(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&l.X&&s.kg.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),i=function(t,{statusCode:e,headers:n},i=Date.now()){const o=ht({},t),r=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(r)for(const a of r.trim().split(",")){const[t,e,,,n]=a.split(":",5),r=parseInt(t,10),s=1e3*(isNaN(r)?60:r);if(e)for(const a of e.split(";"))"metric_bucket"===a?(!n||n.split(";").includes("custom"))&&(o[a]=i+s):o[a]=i+s;else o.all=i+s}else s?o.all=i+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const i=Date.parse(`${t}`);return isNaN(i)?6e4:i-e}(s,i):429===e&&(o.all=i+6e4);return o}(i,t),t),t=>{throw c("network_error"),t})).then(t=>t,t=>{if(t instanceof at)return l.X&&s.kg.error("Skipped sending event because buffer is full."),c("queue_overflow"),(0,G.WD)();throw t})}return o.__sentry__baseTransport__=!0,{send:o,flush:t=>n.drain(t)}}function $e(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}let Be;function He(t,e=function(){if(Be)return Be;if(F(Tt.fetch))return Be=Tt.fetch.bind(Tt);const t=Tt.document;let e=Tt.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const i=n.contentWindow;i&&i.fetch&&(e=i.fetch),t.head.removeChild(n)}catch(n){bt&&s.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n
1)}return Be=e.bind(Tt)}()){let n=0,i=0;return Re(t,function(o){const r=o.body.length;n+=r,i++;const s=ht({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&i<15},t.fetchOptions);try{return e(t.url,s).then(t=>(n-=r,i--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(a){return Be=void 0,n-=r,i--,(0,G.$2)(a)}})}function Qe(t){return Re(t,function(e){return new G.cW((n,i)=>{const o=new XMLHttpRequest;o.onerror=i,o.onreadystatechange=()=>{4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&o.setRequestHeader(e,t.headers[e]);o.send(e.body)})})}const Ye=[_(),k(),ke(),Xt(),pe(),ye(),te(),ve()];function ze(t){return[...Ye]}function Ve(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=ze()),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),Tt.SENTRY_RELEASE&&Tt.SENTRY_RELEASE.id&&(t.release=Tt.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e=Ji(ht({},t),{stackParser:(0,N.Sq)(t.stackParser||Je),integrations:h(t),transport:t.transport||(E()?He:Qe)});(function(t,e){!0===e.debug&&(l.X?s.kg.enable():(0,s.Cf)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),(0,r.nZ)().update(e.initialScope);const n=new t(e);(function(t){const e=(0,u.Gd)().getStackTop();e.client=t,e.scope.setClient(t)})(n),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(n)})(Pt,e),t.autoSessionTracking&&(void 0!==Tt.document?((0,r.yj)({ignoreDuration:!0}),(0,r.cg)(),Y(({from:t,to:e})=>{void 0!==t&&t!==e&&((0,r.yj)({ignoreDuration:!0}),(0,r.cg)())})):bt&&s.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."))}const Ge=(t={},e=(0,u.Gd)())=>{if(!Tt.document)return void(bt&&s.kg.error("Global document not defined in showReportDialog call"));const{client:n,scope:i}=e.getStackTop(),o=t.dsn||n&&n.getDsn();if(!o)return void(bt&&s.kg.error("DSN not configured for showReportDialog call"));i&&(t.user=ht(ht({},i.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=Tt.document.createElement("script");r.async=!0,r.crossOrigin="anonymous",r.src=function(t,e){const n=S(t);if(!n)return"";const i=`${P(n)}embed/error-page/`;let o=`dsn=${M(n)}`;for(const r in e)if("dsn"!==r&&"onClose"!==r)if("user"===r){const t=e.user;if(!t)continue;t.name&&(o+=`&name=${encodeURIComponent(t.name)}`),t.email&&(o+=`&email=${encodeURIComponent(t.email)}`)}else o+=`&${encodeURIComponent(r)}=${encodeURIComponent(e[r])}`;return`${i}?${o}`}(o,t),t.onLoad&&(r.onload=t.onLoad);const{onClose:a}=t;if(a){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{a()}finally{Tt.removeEventListener("message",t)}};Tt.addEventListener("message",t)}const c=Tt.document.head||Tt.document.body;c?c.appendChild(r):bt&&s.kg.error("Not injecting report dialog. No injection point found in HTML")};var We=n(1825);const Ke="sentry.source",Xe="sentry.sample_rate",tn="sentry.op",en="sentry.origin";var nn,on=n(9225);function rn(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);"unknown_error"!==n&&t.setStatus(n)}!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(nn||(nn={}));class sn{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class an{constructor(t={}){this._traceId=t.traceId||(0,a.DM)(),this._spanId=t.spanId||(0,a.DM)().substring(16),this._startTime=t.startTimestamp||(0,vt.ph)(),this.tags=t.tags?ht({},t.tags):{},this.data=t.data?ht({},t.data):{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes(ht({[en]:t.origin||"manual",[tn]:t.op},t.attributes)),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),void 0!==t.exclusiveTime&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?ht({},t.measurements):{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[tn]}set op(t){this.setAttribute(tn,t)}get origin(){return this._attributes[en]}set origin(t){this.setAttribute(en,t)}
1spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?We.i0:We.ve}}startChild(t){const e=new an(Ji(ht({},t),{parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId}));e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e);const n=(0,on.G)(this);if(e.transaction=n,l.X&&n){const i=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${(0,We.XU)(e).description||"< unknown name >"}' (${n.spanContext().spanId}).`;s.kg.log(i),this._logMessage=i}return e}setTag(t,e){return this.tags=Ji(ht({},this.tags),{[t]:e}),this}setData(t,e){return this.data=Ji(ht({},this.data),{[t]:e}),this}setAttribute(t,e){void 0===e?delete this._attributes[t]:this._attributes[t]=e}setAttributes(t){Object.keys(t).forEach(e=>this.setAttribute(e,t[e]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return rn(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return"ok"===this._status}finish(t){return this.end(t)}end(t){if(this._endTime)return;const e=(0,on.G)(this);if(l.X&&e&&e.spanContext().spanId!==this._spanId){const t=this._logMessage;t&&s.kg.log(t.replace("Starting","Finishing"))}this._endTime=(0,We.$k)(t)}toTraceparent(){return(0,We.Hb)(this)}toContext(){return(0,w.Jr)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return(0,We.wy)(this)}getSpanJSON(){return(0,w.Jr)({data:this._getData(),description:this._name,op:this._attributes[tn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[en],_metrics_summary:void 0,profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:e}=this,n=Object.keys(t).length>0,i=Object.keys(e).length>0;if(n||i)return n&&i?ht(ht({},t),e):n?t:e}}function cn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=(0,r.s3)(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function ln(t){if(!cn())return;const e=function(t){if(t.startTime){const e=ht({},t);return e.startTimestamp=(0,We.$k)(t.startTime),delete e.startTime,e}return t}(t),n=(0,u.Gd)(),i=t.scope?t.scope.getSpan():dn();if(t.onlyIfParent&&!i)return;const o=(t.scope||(0,r.nZ)()).clone();return function(t,{parentSpan:e,spanContext:n,forceTransaction:i,scope:o}){if(!cn())return;const r=(0,u.aF)();let s;if(e&&!i)s=e.startChild(n);else if(e){const i=(0,lt.j)(e),{traceId:o,spanId:r}=e.spanContext(),a=(0,We.Tt)(e);s=t.startTransaction(Ji(ht({traceId:o,parentSpanId:r,parentSampled:a},n),{metadata:ht({dynamicSamplingContext:i},n.metadata)}))}else{const{traceId:e,dsc:i,parentSpanId:a,sampled:c}=ht(ht({},r.getPropagationContext()),o.getPropagationContext());s=t.startTransaction(Ji(ht({traceId:e,parentSpanId:a,parentSampled:c},n),{metadata:ht({dynamicSamplingContext:i},n.metadata)}))}return o.setSpan(s),function(t,e,n){t&&((0,w.xp)(t,pn,n),(0,w.xp)(t,un,e))}(s,o,r),s}(n,{parentSpan:i,spanContext:e,forceTransaction:t.forceTransaction,scope:o})}function dn(){return(0,r.nZ)().getSpan()}const un="_sentryScope",pn="_sentryIsolationScope";class hn extends an{constructor(t,e){super(t),this._contexts={},this._hub=e||(0,u.Gd)(),this._name=t.name||"",this._metadata=ht({},t.metadata),this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext=ht({},n))}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return ht(ht(ht({source:"custom",spanMetadata:{}},this._metadata),this._attributes[Ke]&&{source:this._attributes[Ke]}),this._attributes[Xe]&&{sampleRate:this._attributes[Xe]})}set metadata(t){this._metadata=t}setName(t,e="custom"){this._name=t,this.setAttribute(Ke,e)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new sn(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this._metadata=ht(ht({},this._metadata),t)}end(t){const e=(0,We.$k)(t),n=this._finishTransaction(e);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();
1return(0,w.Jr)(Ji(ht({},t),{name:this._name,trimEnd:this._trimEnd}))}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return(0,lt.j)(this)}setHub(t){this._hub=t}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(t){if(void 0!==this._endTime)return;this._name||(l.X&&s.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this._sampled)return l.X&&s.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&(0,We.XU)(t).timestamp):[];if(this._trimEnd&&n.length>0){const t=n.map(t=>(0,We.XU)(t).timestamp).filter(Boolean);this._endTime=t.reduce((t,e)=>t>e?t:e)}const{scope:i,isolationScope:o}={scope:this[un],isolationScope:this[pn]},{metadata:r}=this,{source:a}=r,c=ht({contexts:Ji(ht({},this._contexts),{trace:(0,We.wy)(this)}),spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:ht(Ji(ht({},r),{capturedSpanScope:i,capturedSpanIsolationScope:o}),(0,w.Jr)({dynamicSamplingContext:(0,lt.j)(this)})),_metrics_summary:void 0},a&&{transaction_info:{source:a}});return Object.keys(this._measurements).length>0&&(l.X&&s.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),l.X&&s.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const gn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},fn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class mn extends sn{constructor(t,e,n,i){super(i),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const e=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),e.apply(t,n)),void 0===(0,We.XU)(t).timestamp&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class vn extends hn{constructor(t,e,n=gn.idleTimeout,i=gn.finalTimeout,o=gn.heartbeatInterval,r=!1,a=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=o,this._onScope=r,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=fn[4],this._autoFinishAllowed=!a,r&&(l.X&&s.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),e.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=fn[3],this.end())},this._finalTimeout)}end(t){const e=(0,We.$k)(t);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){l.X&&s.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanContext().spanId===this.spanContext().spanId)return!0;(0,We.XU)(t).timestamp||(t.setStatus("cancelled"),t.end(e),l.X&&s.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const{start_timestamp:n,timestamp:i}=(0,We.XU)(t),o=n&&n<e,r=i&&n&&i-n<(this._finalTimeout+this._idleTimeout)/1e3;if(l.X){const e=JSON.stringify(t,void 0,2);o?r||s.kg.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):s.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",e)}return o&&r}),l.X&&s.kg.log("[Tracing] flushing IdleTransaction")}else l.X&&s.kg.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new mn(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanContext().spanId,t),l.X&&s.kg.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=fn[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(l.X&&s.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&0===Object.keys(this.activities).length&&(this._finishReason=fn[1],this.end(t))},this._idleTimeout)}
1_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),l.X&&s.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,l.X&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(l.X&&s.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],l.X&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,vt.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=fn[5],this.end(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(l.X&&s.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=fn[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){l.X&&s.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}var bn=n(4652),xn=n(622);const _n="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Cn=(t,e,n)=>{let i,o;return r=>{e.value>=0&&(r||n)&&(o=e.value-(i||0),(o||void 0===i)&&(i=e.value,e.delta=o,t(e)))}},wn=q.n2,yn=()=>wn.__WEB_VITALS_POLYFILL__?wn.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=wn.performance.timing,e=wn.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const i in t)"navigationStart"!==i&&"toJSON"!==i&&(n[i]=Math.max(t[i]-t.navigationStart,0));return n})()):wn.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],An=()=>{const t=yn();return t&&t.activationStart||0},Zn=(t,e)=>{const n=yn();let i="navigate";return n&&(i=wn.document&&wn.document.prerendering||An()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},kn=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver(t=>{e(t.getEntries())});return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(i){}},Tn=(t,e)=>{const n=i=>{("pagehide"===i.type||"hidden"===wn.document.visibilityState)&&(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};wn.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let On=-1;const Mn=()=>(On<0&&(wn.document&&wn.document.visibilityState&&(On="hidden"!==wn.document.visibilityState||wn.document.prerendering?1/0:0),Tn(({timeStamp:t})=>{On=t},!0)),{get firstHiddenTime(){return On}});let In=0,Sn=1/0,Pn=0;const Nn=t=>{t.forEach(t=>{t.interactionId&&(Sn=Math.min(Sn,t.interactionId),Pn=Math.max(Pn,t.interactionId),In=Pn?(Pn-Sn)/7+1:0)})};let qn;const Un=()=>qn?In:performance.interactionCount||0,En=[],Fn={},Dn=t=>{const e=Fn[t.interactionId];if(e||En.length<10||t.duration>En[En.length-1].latency){if(e)e.entries.push(t),e.latency=Math.max(e.latency,t.duration);else{const e={id:t.interactionId,latency:t.duration,entries:[t]};Fn[e.id]=e,En.push(e)}En.sort((t,e)=>e.latency-t.latency),En.splice(10).forEach(t=>{delete Fn[t.id]})}},Ln={},Jn=t=>{!wn.document||(wn.document.prerendering?addEventListener("prerenderingchange",()=>Jn(t),!0):"complete"!==wn.document.readyState?addEventListener("load",()=>Jn(t),!0):setTimeout(t,0))},jn={},Rn={};let $n,Bn,Hn,Qn,Yn;function zn(t,e){return ni(t,e),Rn[t]||(function(t){const e={};"event"===t&&(e.durationThreshold=0),kn(t,e=>{Vn(t,{entries:e})},e)}(t),Rn[t]=!0),ii(t,e)}function Vn(t,e){const n=jn[t];if(n&&n.length)for(const o of n)try{o(e)}catch(i){_n&&s.kg.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${(0,N.$P)(o)}\nError:`,i)}}function Gn(){return((t,e={})=>{const n=Zn("CLS",0);let i,o=0,r=[];const s=t=>{t.forEach(t=>{if(!t.hadRecentInput){const e=r[0],s=r[r.length-1];o&&0!==r.length&&t.startTime-s.startTime<1e3&&t.startTime-e.startTime<5e3?(o+=t.value,r.push(t)):(o=t.value,r=[t]),o>n.value&&(n.value=o,n.entries=r,i&&i())}})},a=kn("layout-shift",s);if(a){i=Cn(t,n,e.reportAllChanges);const o=()=>{s(a.takeRecords()),i(!0)};return Tn(o),o}})(t=>{Vn("cls",{metric:t}),$n=t},{reportAllChanges:!0})}function Wn(){return(t=>{const e=Mn(),n=Zn("FID");let i;const o=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entr
1ies.push(t),i(!0))},r=t=>{t.forEach(o)},s=kn("first-input",r);i=Cn(t=>{Vn("fid",{metric:t}),Bn=t},n),s&&Tn(()=>{r(s.takeRecords()),s.disconnect()},!0)})()}function Kn(){return(t=>{const e=Mn(),n=Zn("LCP");let i;const o=t=>{const o=t[t.length-1];if(o){const t=Math.max(o.startTime-An(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[o],i())}},r=kn("largest-contentful-paint",o);if(r){i=Cn(t=>{Vn("lcp",{metric:t}),Hn=t},n);const t=()=>{Ln[n.id]||(o(r.takeRecords()),r.disconnect(),Ln[n.id]=!0,i(!0))};return["keydown","click"].forEach(e=>{wn.document&&addEventListener(e,t,{once:!0,capture:!0})}),Tn(t,!0),t}})()}function Xn(){return((t,e)=>{e=e||{};const n=Zn("TTFB"),i=Cn(t=>{Vn("ttfb",{metric:t}),Qn=t},n,e.reportAllChanges);Jn(()=>{const t=yn();if(t){if(n.value=Math.max(t.responseStart-An(),0),n.value<0||n.value>performance.now())return;n.entries=[t],i(!0)}})})()}function ti(){return((t,e)=>{e=e||{},"interactionCount"in performance||qn||(qn=kn("event",Nn,{type:"event",buffered:!0,durationThreshold:0}));const n=Zn("INP");let i;const o=t=>{t.forEach(t=>{t.interactionId&&Dn(t),"first-input"===t.entryType&&!En.some(e=>e.entries.some(e=>t.duration===e.duration&&t.startTime===e.startTime))&&Dn(t)});const e=(()=>{const t=Math.min(En.length-1,Math.floor(Un()/50));return En[t]})();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())},r=kn("event",o,{durationThreshold:e.durationThreshold||40});i=Cn(t,n,e.reportAllChanges),r&&(r.observe({type:"first-input",buffered:!0}),Tn(()=>{o(r.takeRecords()),n.value<0&&Un()>0&&(n.value=0,n.entries=[]),i(!0)}))})(t=>{Vn("inp",{metric:t}),Yn=t})}function ei(t,e,n,i,o=!1){let r;return ni(t,e),Rn[t]||(r=n(),Rn[t]=!0),i&&e({metric:i}),ii(t,e,o?r:void 0)}function ni(t,e){jn[t]=jn[t]||[],jn[t].push(e)}function ii(t,e,n){return()=>{n&&n();const i=jn[t];if(!i)return;const o=i.indexOf(e);-1!==o&&i.splice(o,1)}}const oi=["localhost",/^\/(?!\/)/],ri={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:oi,tracePropagationTargets:oi};function si(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:o,shouldCreateSpanForRequest:s,enableHTTPTimings:a}=ht({traceFetch:ri.traceFetch,traceXHR:ri.traceXHR},t),l="function"==typeof s?s:t=>!0,d=t=>function(t,e){return(0,c.U0)(t,e||oi)}(t,i||o),p={};e&&Bt(t=>{const e=function(t,e,n,i,o="auto.http.browser"){if(!cn()||!t.fetchData)return;const s=e(t.fetchData.url);if(t.endTimestamp&&s){const e=t.fetchData.__span;if(!e)return;const n=i[e];return void(n&&(function(t,e){if(e.response){rn(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const e=parseInt(n);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus("internal_error");t.end()}(n,t),delete i[e]))}const a=(0,r.nZ)(),c=(0,r.s3)(),{method:l,url:d}=t.fetchData,p=function(t){try{return new URL(t).href}catch(e){return}}(d),h=p?Wt(p).host:void 0,g=s?ln({name:`${l} ${d}`,onlyIfParent:!0,attributes:{url:d,type:"fetch","http.method":l,"http.url":p,"server.address":h,[en]:o},op:"http.client"}):void 0;if(g&&(t.fetchData.__span=g.spanContext().spanId,i[g.spanContext().spanId]=g),n(t.fetchData.url)&&c){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,i,o){const r=o||n.getSpan(),s=(0,u.aF)(),{traceId:a,spanId:c,sampled:l,dsc:d}=ht(ht({},s.getPropagationContext()),n.getPropagationContext()),p=r?(0,We.Hb)(r):(0,bn.$p)(a,c,l),h=(0,xn.IQ)(d||(r?(0,lt.j)(r):(0,lt._)(a,e,n))),g=i.headers||("undefined"!=typeof Request&&(0,V.V9)(t,Request)?t.headers:void 0);if(g){if("undefined"!=typeof Headers&&(0,V.V9)(g,Headers)){const t=new Headers(g);return t.append("sentry-trace",p),h&&t.append(xn.bU,h),t}if(Array.isArray(g)){const t=[...g,["sentry-trace",p]];return h&&t.push([xn.bU,h]),t}{const t="baggage"in g?g.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),h&&e.push(h),Ji(ht({},g),{"sentry-trace":p,baggage:e.length>0?e.join(","):void 0})}}return{"sentry-trace":p,baggage:h}}(e,c,a,n,g)}return g}(t,l,d,p);if(e){const n=li(t.fetchData.url),i=n?Wt(n).host:void 0;e.setAttributes({"http.url":n,"server.address":i})}a&&e&&ai(e)}),n&&Rt(t=>{const e=function(t,e,n,i){const o=t.xhr,s=o&&o[jt];if(!cn()||!o||o.__sentry_own_request__||!s)return;const a=e(s.url);if(t.endTimestamp&&a){const t=o.__sentry_xhr_span_id__;if(!t)return;const e=i[t];return void(e&&void 0!==s.status_code&&(rn(e,s.status_code),e.end(),delete i[t]))}const c=(0,r.nZ)(),l=(0,u.aF)(),d=li(s.url),p=d?Wt(d).host:void 0,h=a?ln({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,"http.url":d,url:s.url,"server.address":p,[en]:"auto.http.browser"},op:"http.client"}):void 0;h&&(o.__sentry_xhr_span_id__=h.spanContext().spanId,i[o.__sentry_xhr_span_id__]=h);const g=(0,r.s3)();if(o.setRequestHeader&&n(s.url)&&g){const{traceId:t,spanId:e,sampled:n,dsc:r}=ht(ht({},l.getPropagationContext()),c.getPropagationContext());!function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(xn.bU,n)}catch(i){}}(o,h?(0,We.Hb)(h):(0,bn.$p)(t,e,n),(0,xn.IQ)(r||(h?(0,lt.j)(h):(0,lt._)(t,g,c))))}return h}(t,l,d,p);a&&e&&ai(e)})}function ai(t){const{url:e}=(0,We.XU)(t).data||{};if(!e||"string"!=typeof e)return;const n=zn("resource",({entries:i})=>
1{i.forEach(i=>{(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)})(i)&&i.name.endsWith(e)&&(function(t){const{name:e,version:n}=function(t){let e="unknown",n="unknown",i="";for(const o of t){if("/"===o){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e="h"===i?"http":i,n=t.split(i)[1];break}i+=o}return i===t&&(e=i),{name:e,version:n}}(t.nextHopProtocol),i=[];return i.push(["network.protocol.version",n],["network.protocol.name",e]),vt.Z1?[...i,["http.request.redirect_start",ci(t.redirectStart)],["http.request.fetch_start",ci(t.fetchStart)],["http.request.domain_lookup_start",ci(t.domainLookupStart)],["http.request.domain_lookup_end",ci(t.domainLookupEnd)],["http.request.connect_start",ci(t.connectStart)],["http.request.secure_connection_start",ci(t.secureConnectionStart)],["http.request.connection_end",ci(t.connectEnd)],["http.request.request_start",ci(t.requestStart)],["http.request.response_start",ci(t.responseStart)],["http.request.response_end",ci(t.responseEnd)]]:i}(i).forEach(e=>t.setAttribute(...e)),setTimeout(n))})})}function ci(t=0){return((vt.Z1||performance.timeOrigin)+t)/1e3}function li(t){try{return new URL(t,wn.location.origin).href}catch(e){return}}ht(Ji(ht({},gn),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{}}),ri);var di=n(3882),ui=n(3873),pi=n(1318),hi=n(9170),gi=n(8636);const fi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mi="undefined"!=typeof Zone&&!!Zone.current;function vi(t){return mi?Zone.root.run(t):t()}function bi(t){if(t instanceof Error)return!0;if(null===t||"object"!=typeof t)return!1;const e=t;return(0,V.HD)(e.name)&&(0,V.HD)(e.message)&&(void 0===e.stack||(0,V.HD)(e.stack))}let xi=(()=>{class t{constructor(t){this._registeredAfterSendEventHandler=!1,this._options=Object.assign({logErrors:!0},t)}handleError(t){const e=this._extractError(t)||"Handled unknown error",n=vi(()=>r.Tb(e,{mechanism:{type:"angular",handled:!1}}));if(this._options.logErrors&&console.error(e),this._options.showDialog){const t=r.s3();t&&t.on&&!this._registeredAfterSendEventHandler?(t.on("afterSendEvent",t=>{t.type||Ge(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:t.event_id}))}),this._registeredAfterSendEventHandler=!0):(!t||!t.on)&&Ge(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:n}))}}_extractError(t){if(this._options.extractor){const e=this._defaultExtractor.bind(this);return this._options.extractor(t,e)}return this._defaultExtractor(t)}_defaultExtractor(t){const e=function(t){return t&&t.ngOriginalError?t.ngOriginalError:t}(t);return e instanceof di.UA?function(t){return bi(t.error)?t.error:t.error instanceof ErrorEvent&&t.error.message?t.error.message:"string"==typeof t.error?`Server returned code ${t.status} with body "${t.error}"`:t.message}(e):"string"==typeof e||bi(e)?e:null}}return t.\u0275fac=function(e){return new(e||t)(o.LFG("errorHandlerOptions"))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function _i(t){return new xi(t)}const Ci="ui.angular.routing";let wi,yi,Ai;function Zi(){return(0,r.nZ)().getTransaction()}let ki=(()=>{class t{constructor(t){this._router=t,this.navStart$=this._router.events.pipe((0,hi.h)(t=>t instanceof ui.OD),(0,gi.b)(t=>{if(!wi)return void(fi&&s.kg.error("Angular integration has tracing enabled, but Tracing integration is not configured"));this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);(0,r.s3)();const e=function(t){return t.split(/[\?#]/,1)[0]}(t.url);let n=Zi();!n&&Ai&&(n=yi({name:e,op:"navigation",origin:"auto.navigation.angular",attributes:{[Ke]:"url"}})),n&&(this._routingSpan=n.startChild({description:`${t.url}`,op:Ci,origin:"auto.ui.angular",tags:Object.assign({"routing.instrumentation":"@sentry/angular",url:e},t.navigationTrigger&&{navigationTrigger:t.navigationTrigger})}))})),this.resEnd$=this._router.events.pipe((0,hi.h)(t=>t instanceof ui.Av),(0,gi.b)(t=>{const e=function(t){const e=[];let n=t&&t.firstChild;for(;n;
1){const t=n&&n.routeConfig&&n.routeConfig.path;if(null==t)break;e.push(t),n=n.firstChild}const i=e.filter(t=>t).join("/");return i?`/${i}/`:"/"}(t.state.root),n=Zi(),i=n&&(0,We.XU)(n).data||{};n&&"url"===i[Ke]&&(n.updateName(e),n.setAttribute(Ke,"route"),n.setAttribute(en,`auto.${(0,We.XU)(n).op}.angular`))})),this.navEnd$=this._router.events.pipe((0,hi.h)(t=>t instanceof ui.m2||t instanceof ui.gk||t instanceof ui.Q3),(0,gi.b)(()=>{this._routingSpan&&(vi(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._subscription=new pi.w,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}ngOnDestroy(){this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(ui.F0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Ti(t){return(t||(0,u.Gd)()).getScope().getTransaction()}let Mi=!1;function Ii(){const t=Ti();if(t){const e="internal_error";l.X&&s.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}function Si(t,e,n){if(!cn(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setAttribute(Xe,Number(t.sampled)),t;let i;return"function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setAttribute(Xe,Number(i))):void 0!==n.parentSampled?i=n.parentSampled:void 0!==e.tracesSampleRate?(i=e.tracesSampleRate,t.setAttribute(Xe,Number(i))):(i=1,t.setAttribute(Xe,i)),Pi(i)?i?(t.sampled=Math.random()<i,t.sampled?(l.X&&s.kg.log(`[Tracing] starting ${t.op} transaction - ${(0,We.XU)(t).description}`),t):(l.X&&s.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),t)):(l.X&&s.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(l.X&&s.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function Pi(t){return(0,V.i2)(t)||"number"!=typeof t&&"boolean"!=typeof t?(l.X&&s.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):!(t<0||t>1)||(l.X&&s.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1)}function Ni(){const t=this.getScope().getSpan();return t?{"sentry-trace":(0,We.Hb)(t)}:{}}function qi(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},o=i.instrumenter||"sentry",r=t.instrumenter||"sentry";o!==r&&(l.X&&s.kg.error(`A transaction was started with instrumenter=\`${r}\`, but the SDK is configured with the \`${o}\` instrumenter.\nThe transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),t.sampled=!1);let a=new hn(t,this);return a=Si(a,i,ht({name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:ht(ht({},t.data),t.attributes)},e)),a.isRecording()&&a.initSpanRecorder(i._experiments&&i._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Ui(t,e,n,i,o,r,s,a=!1){const c=t.getClient(),l=c&&c.getOptions()||{};let d=new vn(e,t,n,i,s,o,a);return d=Si(d,l,ht({name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:ht(ht({},e.data),e.attributes)},r)),d.isRecording()&&d.initSpanRecorder(l._experiments&&l._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",d),d}function Ei(t){return[{type:"span"},t]}function Fi(t){return"number"==typeof t&&isFinite(t)}function Di(t,e){var n=e,{startTimestamp:i}=n,o=tS(n,["startTimestamp"]);return i&&t.startTimestamp>i&&(t.startTimestamp=i),t.startChild(ht({startTimestamp:i},o))}function Li(t){return t/1e3}function ji(){return wn&&wn.addEventListener&&wn.performance}Ii.tag="sentry_tracingErrorCallback";let Ri,$i,Bi=0,Hi={};function Qi(){const t=ji();if(t&&vt.Z1){t.mark&&wn.performance.mark("sentry-tracing-init");const e=ei("fid",({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Li(vt.Z1),i=Li(e.startTime);_n&&s.kg.log("[Measurements] Adding FID"),Hi.fid={value:t.value,unit:"millisecond"},Hi["mark.fid"]={value:n+i,unit:"second"}},Wn,Bn),n=function(t,e=!1){return ei("cls",t,Gn,$n,e)}(({metric:t})=>{const e=t.entries[t.entries.length-1];!e||(_n&&s.kg.log("[Measurements] Adding CLS"),Hi.cls={value:t.value,unit:""},$i=e)},!0),i=function(t,e=!1){return ei("lcp",t,Kn,Hn,e)}(({metric:t})=>{const e=t.entries[t.entries.length-1];!e||(_n&&s.kg.log("[Measurements] Adding LCP"),Hi.lcp={value:t.value,unit:"millisecond"},Ri=e)},!0),o=ei("ttfb",({metric:t})=>{!t.entries[t.entries.length-1]||(_n&&s.kg.log("[Measurements] Adding TTFB"),Hi.ttfb={value:t.value,unit:"millisecond"})},Xn,Qn);return()=>{e(),n(),i(),o()}}return()=>{}}const Yi={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function zi(t,e,n,i,o,r){const s=r?e[r]:e[`${n}End`],a=e[`${n}Start`];!a||!s||Di(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:i+Li(a),endTimestamp:i+Li(s)})}function Vi(t,e,n,i){const o=e[n];null!=o&&o<2147483647&&(t[i]=o)}const Gi=ht(Ji(ht({}
1,gn),{markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!wn||!wn.location)return void(_n&&s.kg.warn("Could not initialize routing instrumentation due to invalid location"));let i,o=wn.location.href;e&&(i=t({name:wn.location.pathname,startTimestamp:vt.Z1?vt.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&Y(({to:e,from:n})=>{void 0===n&&o&&-1!==o.indexOf(e)?o=void 0:n!==e&&(o=void 0,i&&(_n&&s.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=t({name:wn.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{}}),ri);function Wi(t){const e=(0,zt.qT)(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function Ki(t){return t.attributes&&t.attributes[Ke]||t.data&&t.data[Ke]||t.metadata&&t.metadata.source}var Xi=n(1707),to=n(4364);const eo=["captchaWrapperElem"];let no=(()=>{class t{constructor(t,e,n,i){this.renderer=t,this.zone=e,this.injector=n,this.scriptService=i,this.captchaElemPrefix="ngx_captcha_id_",this.setupCaptcha=!0,this.useGlobalDomain=!1,this.type="image",this.tabIndex=0,this.success=new o.vpe,this.load=new o.vpe,this.reset=new o.vpe,this.ready=new o.vpe,this.error=new o.vpe,this.expire=new o.vpe,this.setupAfterLoad=!1,this.resetCaptchaAfterSuccess=!1,this.isLoaded=!1}ngAfterViewInit(){this.control=this.injector.get(Xi.a5).control}ngAfterViewChecked(){this.setupCaptcha&&(this.setupCaptcha=!1,this.setupComponent())}ngOnChanges(t){t&&t.hl&&!t.hl.firstChange&&t.hl.currentValue!==t.hl.previousValue&&this.scriptService.cleanup(),t&&t.useGlobalDomain&&!t.useGlobalDomain.firstChange&&t.useGlobalDomain.currentValue!==t.useGlobalDomain.previousValue&&this.scriptService.cleanup(),this.setupCaptcha=!0}getResponse(){return this.reCaptchaApi.getResponse(this.captchaId)}getCaptchaId(){return this.captchaId}resetCaptcha(){this.zone.run(()=>{this.reCaptchaApi.reset(),this.onChange(void 0),this.onTouched(void 0),this.reset.next()})}getCurrentResponse(){return this.currentResponse}reloadCaptcha(){this.setupComponent()}ensureCaptchaElem(t){const e=document.getElementById(t);if(!e)throw Error(`Captcha element with id '${t}' was not found`);this.captchaElem=e}renderReCaptcha(){this.zone.runOutsideAngular(()=>{this.captchaId=this.reCaptchaApi.render(this.captchaElemId,this.getCaptchaProperties()),this.ready.next()})}handleCallback(t){this.currentResponse=t,this.success.next(t),this.zone.run(()=>{this.onChange(t),this.onTouched(t)}),this.resetCaptchaAfterSuccess&&this.resetCaptcha()}getPseudoUniqueNumber(){return(new Date).getUTCMilliseconds()+Math.floor(9999*Math.random())}setupComponent(){this.captchaSpecificSetup(),this.createAndSetCaptchaElem(),this.scriptService.registerCaptchaScript(this.useGlobalDomain,"explicit",t=>{this.onloadCallback(t)},this.hl)}onloadCallback(t){if(this.reCaptchaApi=t,!this.reCaptchaApi)throw Error("ReCaptcha Api was not initialized correctly");this.isLoaded=!0,this.load.next(),this.renderReCaptcha(),this.setupAfterLoad&&(this.setupAfterLoad=!1,this.setupComponent())}generateNewElemId(){return this.captchaElemPrefix+this.getPseudoUniqueNumber()}createAndSetCaptchaElem(){if(this.captchaElemId=this.generateNewElemId(),!this.captchaElemId)throw Error("Captcha elem Id is not set");if(!this.captchaWrapperElem)throw Error("Captcha DOM element is not initialized");this.captchaWrapperElem.nativeElement.innerHTML="";const t=this.renderer.createElement("div");t.id=this.captchaElemId,this.renderer.appendChild(this.captchaWrapperElem.nativeElement,t),this.ensureCaptchaElem(this.captchaElemId)}writeValue(t){}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}handleErrorCallback(){this.zone.run(()=>{this.onChange(void 0),this.onTouched(void 0)}),this.error.next()}handleExpireCallback(){this.expire.next(),this.resetCaptcha()}}return t.\u0275fac=function(t){o.$Z()},t.\u0275dir=o.lG2({type:t,inputs:{useGlobalDomain:"useGlobalDomain",type:"type",tabIndex:"tabIndex",siteKey:"siteKey",hl:"hl"},outputs:{success:"success",load:"load",reset:"reset",ready:"ready",error:"error",expire:"expire"},features:[o.TTD]}),t})();const io={InvisibleReCaptcha:0,ReCaptcha2:1};io[io.InvisibleReCaptcha]="InvisibleReCaptcha",io[io.ReCaptcha2]="ReCaptcha2";let oo=(()=>{class t{constructor(t){this.zone=t,this.windowGrecaptcha="grecaptcha",this.windowOnLoadCallbackProperty="ngx_captcha_onload_callback",this.globalDomain="recaptcha.net",this.defaultDomain="google.com"}registerCaptchaScript(t,e,n,i){if(this.grecaptchaScriptLoaded())return void this.zone.run(()=>{n(window[this.windowGrecaptcha])});window[this.windowOnLoadCallbackProperty]=()=>this.zone.run(n.bind(this,window[this.windowGrecaptcha]));const o=document.createElement("script");o.innerHTML="",o.src=this.getCaptchaScriptUrl(t,e,i),o.async=!0,o.defer=!0,document.getElementsByTagName("head")[0].appendChild(o)}cleanup(){window[this.windowOnLoadCallbackProperty]=void 0,window[this.windowGrecaptcha]=void 0}grecaptchaScriptLoaded(){return!(!window[this.windowOnLoadCallbackProperty]||!window[this.windowGrecaptcha])}
1getLanguageParam(t){return t?`&hl=${t}`:""}getCaptchaScriptUrl(t,e,n){return`https://www.${t?this.globalDomain:this.defaultDomain}/recaptcha/api.js?onload=${this.windowOnLoadCallbackProperty}&render=${e}${this.getLanguageParam(n)}`}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.R0b))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),ro=(()=>{class t extends no{constructor(t,e,n,i){super(t,e,n,i),this.renderer=t,this.zone=e,this.injector=n,this.scriptService=i,this.windowOnErrorCallbackProperty="ngx_captcha_error_callback",this.windowOnExpireCallbackProperty="ngx_captcha_expire_callback",this.theme="light",this.size="normal",this.recaptchaType=io.ReCaptcha2}ngOnChanges(t){super.ngOnChanges(t)}ngOnDestroy(){window[this.windowOnErrorCallbackProperty]={},window[this.windowOnExpireCallbackProperty]={}}captchaSpecificSetup(){this.registerCallbacks()}getCaptchaProperties(){return{sitekey:this.siteKey,callback:t=>this.zone.run(()=>this.handleCallback(t)),"expired-callback":()=>this.zone.run(()=>this.handleExpireCallback()),"error-callback":()=>this.zone.run(()=>this.handleErrorCallback()),theme:this.theme,type:this.type,size:this.size,tabindex:this.tabIndex}}registerCallbacks(){window[this.windowOnErrorCallbackProperty]=super.handleErrorCallback.bind(this),window[this.windowOnExpire
1CallbackProperty]=super.handleExpireCallback.bind(this)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.Qsj),o.Y36(o.R0b),o.Y36(o.zs3),o.Y36(oo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngx-recaptcha2"]],viewQuery:function(t,e){if(1&t&&o.Gf(eo,5),2&t){let t;o.iGM(t=o.CRH())&&(e.captchaWrapperElem=t.first)}},inputs:{theme:"theme",size:"size",hl:"hl"},features:[o._Bn([{provide:Xi.JU,useExisting:(0,o.Gpc)(()=>t),multi:!0}]),o.qOj,o.TTD],decls:2,vars:0,consts:[["captchaWrapperElem",""]],template:function(t,e){1&t&&o._UZ(0,"div",null,0)},encapsulation:2}),t})(),so=(()=>{class t{constructor(t,e){this.scriptService=t,this.zone=e}execute(t,e,n,i){this.executeAsPromise(t,e,i).then(n)}executeAsPromise(t,e,n){return new Promise((i,o)=>{this.scriptService.registerCaptchaScript(!(!n||!n.useGlobalDomain),t,n=>{this.zone.runOutsideAngular(()=>{try{n.execute(t,{action:e}).then(t=>this.zone.run(()=>i(t)))}catch(r){o(r)}})})})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(oo),o.LFG(o.R0b))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),ao=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:[oo,so],imports:[[to.ez]]}),t})();var co=n(5830),lo=n(5602);let uo=(()=>{class t{constructor(t,e){this.apiService=t,this.cookieService=e}login(t){return this.apiService.request("get","loginAssist",t)}logout(t){return this.clearToken(),this.apiService.request("get","logoutAssist",t)}clearToken(){localStorage.removeItem("token_in_"),this.cookieService.delete("token_in_","/"),this.cookieService.delete("visitorIPData","/")}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s),o.LFG(lo.N))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),po=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-loader"]],decls:4,vars:0,consts:[[1,"sonner-loader-toast"],[1,"sonner-loader-spinner"],[1,"sonner-loader-text"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o._UZ(1,"span",1),o.TgZ(2,"span",2),o._uU(3,"Loading..."),o.qZA(),o.qZA())},styles:[".sonner-loader-toast[_ngcontent-%COMP%]{position:fixed;top:16px;left:50%;transform:translate(-50%);z-index:99999;display:flex;align-items:center;grid-gap:10px;gap:10px;background:#fff;color:#111;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000001f,0 1px 4px #00000014;font-size:14px;font-weight:500;animation:sonner-slide-in .25s ease;white-space:nowrap;border:1px solid rgba(0,0,0,.08)}@keyframes sonner-slide-in{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.sonner-loader-spinner[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid rgba(0,0,0,.12);border-top-color:#111;border-radius:50%;animation:sonner-spin .6s linear infinite;flex-shrink:0}@keyframes sonner-spin{to{transform:rotate(360deg)}}.sonner-loader-text[_ngcontent-%COMP%]{line-height:1}body.theme-dark[_ngcontent-%COMP%]   .sonner-loader-toast[_ngcontent-%COMP%], html.theme-dark[_ngcontent-%COMP%]   .sonner-loader-toast[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .sonner-loader-toast[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .sonner-loader-toast[_ngcontent-%COMP%]{background:#1e2230;color:#e4e4e4;border-color:#ffffff1a;box-shadow:0 4px 20px #0006,0 1px 4px #0000004d}body.theme-dark[_ngcontent-%COMP%]   .sonner-loader-spinner[_ngcontent-%COMP%], html.theme-dark[_ngcontent-%COMP%]   .sonner-loader-spinner[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .sonner-loader-spinner[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .sonner-loader-spinner[_ngcontent-%COMP%]{border-color:#ffffff26;border-top-color:#e4e4e4}"]}),t})(),ho=(()=>{class t{constructor(t,e){this.authService=t,this.router=e}ngOnInit(){this.authService.logout({originUrl:this.router.url}).subscribe(t=>{this.clearCookies(["loop.flozic.ai",".flozic.ai","connectcloud.appypie.com",".appypie.com"]),t.redirectUrl&&(window.location.href=t.redirectUrl)})}clearCookies(t){document.cookie.split(";").forEach(e=>{const n=`${e.split("=")[0].trim()}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;t.forEach(t=>{document.cookie=`${n}; domain=${t}`}),document.cookie=`${n}`})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(uo),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-logout-page"]],decls:1,vars:0,template:function(t,e){1&t&&o._UZ(0,"app-loader")},directives:[po],styles:[""]}),t})();var go=n(2340),fo=n(5119),mo=n(7284);const vo=function(t,e){return{"btn-dashboard":t,"delete-button":e}};let bo=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.router=e,this.showDelete=!0}ngOnInit(){this.modelConnectCount>0&&(this.showDelete=!1),this.onClose=new fo.xQ}confirmDeleteConnect(t){this.modelConnectCount<=0?(this.onClose.next(t),this.bsModalRef.hide()):(this.bsModalRef.hide(),this.router.navigateByUrl("/connects"))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-delete-confirm-account"]],decls:10,vars:8,consts:[[1,"modal-body","text-start"],[1,"text-black","mb-1"],[1,"modal-footer","text-center","justify-content-end","border-0","gap-2"],[1,"rounded-pill","btn",3,"ngClass","click"],[1,"cancel-button","rounded-pill","btn",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"p"),o._uU(4),o.qZA(),o.qZA(),o.TgZ(5,"div",2),o.TgZ(6,"button",3),o.NdJ("click",function(){return e.confirmDeleteConnect(e.modelConnectId)}),o._uU(7),o.qZA(),o.TgZ(8,"button",4),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(9),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(2),o.Oqu(e.modelContent),o.xp6(2),o.Q6J("ngClass",o.WLB(5,vo,!e.showDelete,e.showDelete)),o.xp6(1),o.hij(" ",e.showDelete?e.translation.YES_DELETE_IT:e.translation.GO_TO_DASHBOARD," "),o.xp6(2),o.Oqu(e.translation.CANCEL))},directives:[to.mk],styles:[".buttons[_ngcontent-%COMP%]{display:flex;justify-content:center}.delete-button[_ngcontent-%COMP%]{background-color:#dc3545;color:#fff;width:140px}.delete-button[_ngcontent-%COMP%]:hover, .delete-button[_ngcontent-%COMP%]:focus{background-color:#dc3546a8}.cancel-button[_ngcontent-%COMP%]{background-color:#fff;color:#2967f6;width:140px;border:1px solid #2967F6}.cancel-button[_ngcontent-%COMP%]:hover{background:#2967f6;color:#fff}.btn-dashboard[_ngcontent-%COMP%]{background-color:#2967f6;color:#fff;width:170px;height:40px}.btn-dashboard[_ngcontent-%COMP%]:hover, .btn-dashboard[_ngcontent-%COMP%]:focus{background-color:#0a2d7f}@media (max-width: 767px){.cancel-button[_ngcontent-%COMP%]{width:110px;font-size:13px}.btn-dashboard[_ngcontent-%COMP%]{width:150px;font-size:13px}}"]}),t})();function xo(t,e){1&t&&(o.TgZ(0,"p",10),o._uU(1,"Nickname is already used!"),o.qZA())}const _o=function(t,e){return{"theme-bgcl border-0":t,btn_delete:e}};let Co=(()=>{class t{constructor(t){this.bsModalRef=t,this.newNickName="",this.isDelete=!1,this.isNickNameExist=!0,this.isNickNameTouched=!1}ngOnInit(){void 0===this.accountNickName&&(this.modelTitle="Add Account Nickname"),this.onClose=new fo.xQ,this.newNickName=this.accountNickName}save(t,e){e.stopPropagation(),this.onClose.next({newNickName:t,userConnectedAccountId:this.accountId}),this.bsModalRef.hide()}onNickNameChange(){""===this.newNickName&&(this.modelTitle="Add Account Nickname"),this.isNickNameTouched=!0,this.isNickNameExist=this.accountNickNames.some(t=>t.toLowerCase()===this.newNickName.toLowerCase())}isEmpty(){var t;return void 0===this.newNickName||""===(null===(t=this.newNickName)||void 0===t?void 0:t.trim())}cancel(t){t.stopPropagation(),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-edit-account-nickname-popup"]],decls:15,vars:10,consts:[[1,"modal-header","testfetch-header",3,"click"],[1,"modal-title","testfetch-title"],[1,"modal-body","py-0",3,"click"],[1,"text-start"],[1,"mb-3"],["placeholder","Add Nickname","name","","value","","maxlength","40",1,"form-control","rounded-3",3,"ngModel","ngModelChange","click"],["class","text-danger small",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0",3,"click"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","link",1,"btn","btn-default","rounded-pill","btn_confirm",3,"ngClass","disabled","click"],[1,"text-danger","small"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(4,"div",3),o.TgZ(5,"p"),o._uU(6),o.qZA(),o.TgZ(7,"div",4),o.TgZ(8,"input",5),o.NdJ("ngModelChange",function(t){return e.newNickName=t})("ngModelChange",function(){return e.onNickNameChange()})("click",function(t){return t.stopPropagation()}),o.qZA(),o.qZA(),o.YNc(9,xo,2,0,"p",6),o.qZA(),o.qZA(),o.TgZ(10,"div",7),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(11,"a",8),o.NdJ("click",function(t){return e.cancel(t)}),o._uU(12),o.qZA(),o.TgZ(13,"button",9),o.NdJ("click",function(t){return e.save(e.newNickName,t)})("click",function(t){return t.stopPropagation()}),o._uU(14,"Save"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(4),o.Oqu(e.modelContent),o.xp6(2),o.Q6J("ngModel",e.newNickName),o.xp6(1),o.Q6J("ngIf",e.isNickNameExist&&!e.isEmpty()&&e.isNickNameTouched),o.xp6(3),o.Oqu(e.translation.CANCEL),o.xp6(1),o.Q6J("ngClass",o.WLB(7,_o,!e.isDelete,e.isDelete))("disabled",e.isNickNameExist||!(null!=e.newNickName&&e.newNickName.trim())))},directives:[Xi.Fj,Xi.nD,Xi.JJ,Xi.On,to.O5,to.mk],styles:[".text-danger[_ngcontent-%COMP%]{color:#dc3545!important}.form-control[_ngcontent-%COMP%]{border:1px solid #9D9DAC}@media (max-width: 767px){.btn_cancel[_ngcontent-%COMP%]{min-width:130px}}"]}),t})();var wo=n(5620);let yo=(()=>{class t{constructor(t){this.apiService=t,this.confirmedDelete=!1}
1static getAllPaymentsStatment(t){throw new Error("Method not implemented.")}getCurrentUser(t){return this.apiService.request("get","customer/customers/currentcustomer",t)}updateCustomer(t,e){return this.apiService.request("put","customer/customers/"+t,e)}updatePhoneNumber(t,e){return this.apiService.request("put","customer/customers/update-phone-number/"+t,e)}updateCustomerNotifications(t,e){return this.apiService.request("put","customer/customers/updateCustNotifications/"+t,e)}getMyProfile(){return this.apiService.request("get","profile/me",{})}updateMyProfile(t){return this.apiService.request("put","profile/me",t)}updateMyNotifications(t){return this.apiService.request("put","profile/notifications",{notifications:t})}initiateEmailChange(t){return this.apiService.request("post","profile/email/initiate",{newEmail:t})}verifyEmailChange(t){return this.apiService.request("post","profile/email/verify",{code:t})}checkDeleteAccount(){return this.apiService.request("get","profile/delete-account/check",{})}deleteMyAccount(t,e="connect"){return this.apiService.request("post","profile/delete-account",{confirmEmail:t,scope:e})}getCustomerPaymentLogs(t){return this.apiService.request("get","customer/customers/getCustomerPaymentLogs",t)}getAppsList(t){return this.apiService.request("get","common/getAppsList",t)}getNotification(t){return this.apiService.request("get","customer/customers/notification",t)}updateNotificationStatus(t){return this.apiService.request("post","customer/customers/updateNotificationStatus",t)}GetCurrent(){return this.currentCustomer}setCurrent(t){this.currentCustomer=t}updateConnectByConnectId(t,e){return this.apiService.request("put","customerconnect/updateConnectByConnectId/"+t,e)}getCustomerActivityLog(t){return this.apiService.request("get","customer/customers/getCustomerActivityLog/"+t,{})}autoRechargeStatus(t){return this.apiService.request("post","customer/customers/autoRechargeStatus/",t)}getRechargeStatus(t){return this.apiService.request("post","customer/customers/getRechargeStatus/",t)}getCustomerBlance(){return this.apiService.request("post","customer/customers/getCustomerBlance/",{})}getFilterByConnect(t){return this.apiService.request("get","customer/customers/userFilterByConnect/"+t,{})}TestAccount(t){return t.nodeId=t.nodeId||"undefined",t.customerId=t.customerId||"undefined",this.apiService.request("post",t.endpoint+"/"+t.funName+"/"+t.appId+"/"+t.authId+"/"+t.nodeId+"/"+t.customerId,{})}getAllPaymentsStatment(t){return this.apiService.request("post","customer/customers/getAllPaymentsStatment",t)}getUserSessionData(){return this.apiService.request("post","customer/customers/getUserSessionData",{})}updateCustNotifications(t){return this.apiService.request("put","customer/customers/updateCustNotifications/"+t._id,t)}getGdprAllData(){return this.apiService.request("post","customer/customers/getGdprAllData",{})}gdprExportData(){return this.apiService.request("post","customer/customers/gdprExportData",{})}gdprDeleteData(){return this.apiService.request("post","customer/customers/gdprDeleteData",{})}gdprConsentData(t){return this.apiService.request("post","customer/customers/gdprConsentData",{})}gdprDeActivateAccount(){return this.apiService.request("post","customer/customers/gdprDeActivateAccount",{})}gdprDeleteAccount(){return this.apiService.request("post","customer/customers/gdprDeleteAccount",{})}updateme(t){return this.apiService.request("put","customer/customers/updateme/"+t._id,t)}setUserSessionData(t){return this.apiService.request("post","customer/customers/setUserSessionData",t)}updatePaymentMethod(t){return this.apiService.request("post","customer/customers/updatePaymentMethod/",t)}Update(t){return this.apiService.request("put","customer/customers/"+t._id,t)}updateLastTouchedApp(t){return this.apiService.request("post","customer/customers/updateLastTouchedApp/"+t._id,t)}getCurrentTaskFrequencyForConnect(t){return this.apiService.request("get","customerconnect/getCurrentTaskFrequencyForConnect/"+t,{})}getNodeStatusByConnectID(t){return this.apiService.request("post","customer/customers/get
1NodeStatusByConnectID",t)}updateCustomerAiMappingCheck(t){return this.apiService.request("put","customer/customers/updateCustomerAiMappingCheck",t)}updateCustomerAppointmentBookingCheck(t){return this.apiService.request("put","customer/customers/updateCustomerAppointmentBookingCheck",t)}getMcpServerUrl(t){return this.apiService.request("get","customer/customers/getMcpServerUrl/"+t.connectedAccountId+"/"+t.mcpId,{})}getMcpActions(){return this.apiService.request("get","customer/customers/getMcpActions",{})}getMcpActionsById(t){return this.apiService.request("get","customer/customers/getMcpActions/"+t,{})}updateMcpAction(t){return this.apiService.request("put","customer/customers/updateMcpAction",t)}createMcpAction(t){return this.apiService.request("post","customer/customers/createMcpAction",t)}deleteMcpAction(t){return this.apiService.request("delete","customer/customers/deleteMcpAction/"+t._id,{})}saveOnboardingData(t){return this.apiService.request("post","customer/customers/saveOnboardingData",t)}updateOnboardingData(t){return this.apiService.request("put","customer/customers/updateOnboardingData",t)}getOnboardingData(t){return this.apiService.request("get","customer/customers/getOnboardingData/"+t,{})}resetTrailMailTrack(){return this.apiService.request("put","customer/customers/resetTrailMailTrack",{})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Ao(t,e){1&t&&(o.TgZ(0,"div",14),o.TgZ(1,"label",27),o._uU(2,"What's the events for the app you're requesting? "),o.TgZ(3,"sup",16),o._uU(4,"*"),o.qZA(),o.qZA(),o._UZ(5,"input",28),o.qZA())}let Zo=(()=>{class t{constructor(t,e,n,i){this.bsModalRef=t,this.formBuilder=e,this.commonService=n,this.cusService=i,this.onClose=new fo.xQ,this.handleSuccessValue=0,this.captchaToken="",this.captchaError=!0,this.siteKey="6Lfee0gtAAAAAGT8yXRb1JHN5ozYunZzuxv1HuML",this.headerText="Add My App Request",this.subHeaderText="Request to add an app in Flozic",this.messageText="Please tell us more about the use case you are looking to solve using this app",this.customerInfo=this.cusService.GetCurrent()}ngOnInit(){this.initializeForms(),this.setupSanitization(),this.appName&&(this.headerText=`Request to add an event for ${this.appName}`,this.subHeaderText=`Request to add ${this.nodeType} event in Appy Pie Automate`,this.messageText=`Please tell us more about the use case you are looking to solve using this ${this.nodeType} event`)}closePopUp(){this.bsModalRef.hide()}initializeForms(){this.aFormGroup=this.formBuilder.group({recaptcha:["",Xi.kI.required]}),this.feedback=this.formBuilder.group(this.appName?{company:[""],companysize:[""],appsname:[this.appName],triggername:[""],message:[""]}:{company:[""],companysize:[""],appsname:[""],message:[""]})}setupSanitization(){this.appName?["company","companysize","appsname","triggername","message"].forEach(t=>{this.feedback.get(t).valueChanges.subscribe(e=>{this.feedback.get(t).setValue(this.sanitizeInput(e),{emitEvent:!1})})}):["company","companysize","appsname","message"].forEach(t=>{this.feedback.get(t).valueChanges.subscribe(e=>{this.feedback.get(t).setValue(this.sanitizeInput(e),{emitEvent:!1})})})}handleSuccess(t){this.captchaToken=t,this.handleSuccessValue=1}sendFeedback(){if(1!==this.handleSuccessValue)return void(this.captchaError=!1);if(this.captchaError=!0,this.feedback.invalid)return;this.bsModalRef.hide();const t=this.buildFormData();this.commonService.sendFeedback(t).subscribe(t=>{this.onClose.next(!0)})}buildFormData(){return{customerId:this.customerInfo.customerId,email:this.customerInfo.email,nodeType:this.nodeType,appName:this.sanitizeInput(this.feedback.value.appsname),triggername:this.sanitizeInput(this.feedback.value.triggername||""),appId:this.appId||"",feedback_taname:this.sanitizeInput(this.feedback.value.triggername||""),customerName:this.sanitizeInput(`${this.customerInfo.firstName} ${this.customerInfo.lastName}`),company:this.sanitizeInput(this.feedback.value.company),companysize:this.sanitizeInput(this.feedback.value.companysize),message:this.sanitizeInput(this.feedback.value.message),captchaToken:this.captchaToken}}sanitizeInput(t){return t.replace(/\b(https?:\/\/|www\.|[\w\-]+(\.[\w\-]+)+[\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])\b/g,"URL_REMOVED").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"SCRIPT_REMOVED")}
1}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(Xi.qu),o.Y36(wo.v),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-add-myapp-request"]],inputs:{nodeType:"nodeType",appName:"appName",appId:"appId"},decls:39,vars:8,consts:[[1,"modal-header","testfetch-header","pt-4","pb-0","px-4"],[1,"modal-title","testfetch-title","text-primary-color","fw-semibold"],["type","button",1,"btn","p-1","bg-transparent",3,"click"],["src","/assets/images/closeIcon.svg","alt","","width","25","height","25"],[1,"modal-body","py-0","px-4"],[1,"text-start"],[1,"f-14","mt-2","mb-4","font-w400",2,"color","#74748A"],[1,"container-fluid","px-0"],[1,"row","gy-4",3,"formGroup"],[1,"col-md-6"],["for","company",1,"f-14","mb-1","font-w400","text-black"],["type","text","id","company","formControlName","company",1,"form-control"],["for","companysize",1,"f-14","mb-1","font-w400","text-black"],["type","text","id","companysize","formControlName","companysize",1,"form-control"],[1,"col-md-12"],["for","appsname",1,"f-14","mb-1","font-w400","text-black"],[1,"text-danger","f18","lh-1"],["type","text","id","appsname","formControlName","appsname","required","",1,"form-control"],["class","col-md-12",4,"ngIf"],["for","message",1,"f-14","mb-1","font-w400","text-black"],["id","message","formControlName","message",1,"form-control"],[3,"formGroup"],["formControlName","recaptcha",3,"siteKey","success"],["captchaElem",""],[1,"text-danger","mt-1",3,"hidden"],[1,"modal-footer","text-center","justify-content-start","border-0","gap-2","px-4","py-3","pb-4"],["type","submit",1,"btn","btn-default","px-md-4","btn_confirm","mx-0","rounded-pill",3,"click"],["for","triggername",1,"f-14","mb-1","font-w400","text-black"],["type","text","id","triggername","formControlName","triggername","required","",1,"form-control"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.closePopUp()}),o._UZ(4,"img",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"h4",6),o._uU(8),o.qZA(),o.TgZ(9,"div",7),o.TgZ(10,"form",8),o.TgZ(11,"div",9),o.TgZ(12,"label",10),o._uU(13,"Your Company"),o.qZA(),o._UZ(14,"input",11),o.qZA(),o.TgZ(15,"div",9),o.TgZ(16,"label",12),o._uU(17,"Company Size"),o.qZA(),o._UZ(18,"input",13),o.qZA(),o.TgZ(19,"div",14),o.TgZ(20,"label",15),o._uU(21,"Name of the app(s) you want to request to be added for Automation"),o.TgZ(22,"sup",16),o._uU(23,"*"),o.qZA(),o.qZA(),o._UZ(24,"input",17),o.qZA(),o.YNc(25,Ao,6,0,"div",18),o.TgZ(26,"div",14),o.TgZ(27,"label",19),o._uU(28),o.qZA(),o._UZ(29,"textarea",20),o.qZA(),o.TgZ(30,"div",14),o.TgZ(31,"form",21),o.TgZ(32,"ngx-recaptcha2",22,23),o.NdJ("success",function(t){return e.handleSuccess(t)}),o.qZA(),o.qZA(),o.TgZ(34,"span",24),o._uU(35,"Please verify the captcha first."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(36,"div",25),o.TgZ(37,"button",26),o.NdJ("click",function(){return e.sendFeedback()}),o._uU(38,"Send Email"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.headerText),o.xp6(6),o.Oqu(e.subHeaderText),o.xp6(2),o.Q6J("formGroup",e.feedback),o.xp6(15),o.Q6J("ngIf",e.appName),o.xp6(3),o.Oqu(e.messageText),o.xp6(3),o.Q6J("formGroup",e.aFormGroup),o.xp6(1),o.Q6J("siteKey",e.siteKey),o.xp6(2),o.Q6J("hidden",e.captchaError))},directives:[Xi._Y,Xi.JL,Xi.sg,Xi.Fj,Xi.JJ,Xi.u,Xi.Q7,to.O5,ro],styles:[""]}),t})(),ko=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-loading"]],decls:3,vars:0,consts:[["id","loader",1,"position-absolute","top-0","start-0","w-100","h-100","d-flex","align-items-center","justify-content-center"],[1,"loader-5"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o._UZ(2,"span"),o.qZA(),o.qZA())},styles:[""]}),t})();function To(t,e){1&t&&(o.TgZ(0,"button",15),o.O4$(),o.TgZ(1,"svg",16),o.TgZ(2,"g",17),o._UZ(3,"path",18),o._UZ(4,"path",19),o.qZA(),o.qZA(),o.qZA())}function Oo(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",20),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeSearchData()}),o.O4$(),o.TgZ(1,"svg",3),o._UZ(2,"path",4),o.qZA(),o.qZA()}}function Mo(t,e){1&t&&o._UZ(0,"app-loading")}const Io=function(t){return{active:t}};function So(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",21),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw().openAuthWindow(e.appId)}),o._UZ(2,"img",22),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw();o.xp6(1),o.Q6J("ngClass",o.VKq(4,Io,n.appAccount)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(2),o.Oqu(t.displayName)}}function Po(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",23),o._UZ(1,"img",24),o.TgZ(2,"span",25),o._uU(3,"No Result Found!"),o.qZA(),o.TgZ(4,"p"),o._uU(5),o.TgZ(6,"a",26),o.NdJ("click",function(){return o.CHM(t),o.oxw().appAccountRequestPop()}),o._uU(7,"Click here to submit your request"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(5),o.hij('The "',t.searchText,'" app is available on request at the moment. ')}}let No=(()=>{class t{constructor(t,e,n,i){this.bsModalRef=t,this.commonService=e,this.cusService=n,this.modalService=i,this.IsDelete=!1,this.appsList=[],this.appyConfig=go.N,this.filteredAppsList=[],this.searchText="",this.isLoading=!1,this.loading=!1,this.loading=!0,this.isLoading=!0,this.commonService.getAppsCustom("trigger").subscribe(t=>{this.appsList=t.apps_list.filter(t=>!t.categoryId.includes("66ffa4b8edf853c2680514cd")),this.filteredAppsList=t.apps_list.filter(t=>!t.categoryId.includes("66ffa4b8edf853c2680514cd")),this.isLoading=!1,this.loading=!1}),this.currentUser=this.cusService.GetCurrent()}ngOnInit(){this.onClose=new fo.xQ}filterApps(){const t=this.searchText.trim().toLowerCase();this.filteredAppsList=this.appsList.filter(e=>e.displayName.toLowerCase().includes(t))}
1closePopUp(){this.bsModalRef.hide()}closeSearchData(){this.searchText="",this.filteredAppsList=this.appsList}checkChild(t){const e=setInterval(()=>{t.closed&&(clearInterval(e),this.onClose.next({status:"closed"}),this.bsModalRef.hide())},200)}openAuthWindow(t){this.commonService.getApp(t).subscribe(e=>{this.currentAppDetail=e;const n="_authWindowPop";if("jnpl1uik645c878la4sp"===t)window.open("https://apps.shopify.com/appypie-connect");else{const e=this.currentAppDetail.app_detail.credential.urlName;localStorage.setItem("connectAppId",t);const i=`${this.appyConfig.apiEndPoint}app/auth/${e}?id=${t}`;setTimeout(()=>{const t=window.open(i,n,"width=1050,height=700");localStorage.setItem("window_name",n),localStorage.setItem("closepopup","false"),this.checkChild(t)},100)}})}appAccountRequestPop(){this.bsModalRef.hide(),setTimeout(()=>{this.bsModalRef=this.modalService.show(Zo,{})},800)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(wo.v),o.Y36(yo),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-add-account-apps-popup"]],inputs:{currentApp:"currentApp",translation:"translation"},decls:17,vars:10,consts:[[1,"modal-header","text-black","border-0"],[1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn","text-black","fs-3","lh-1",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["d","M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"],[1,"modal-body"],[1,"position-relative","search-appWrap"],["type","text","placeholder","Search app you want to add","aria-label","Search app you want to add","aria-describedby","appAccount",1,"form-control",3,"ngModel","ngModelChange","input"],["type","button","class","bg-transparent border-0 btn","id","appAccount",4,"ngIf"],["type","button","class","bg-transparent border-0 btn","id","appAccount",3,"click",4,"ngIf"],[1,"mt-4","mb-3","position-relative",2,"min-height","290px"],[4,"ngIf"],[1,"gap-2","gap-lg-3","filteredAppsList"],[4,"ngFor","ngForOf"],["class","resultFound-wrap d-flex flex-column gap-3 align-items-center justify-content-center py-4",4,"ngIf"],["type","button","id","appAccount",1,"bg-transparent","border-0","btn"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["clip-path","url(#clip0_157_16792)"],["d","M9.1665 16.6667C13.3086 16.6667 16.6665 13.3089 16.6665 9.16675C16.6665 5.02461 13.3086 1.66675 9.1665 1.66675C5.02437 1.66675 1.6665 5.02461 1.6665 9.16675C1.6665 13.3089 5.02437 16.6667 9.1665 16.6667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M18.3332 18.3334L16.6665 16.6667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","button","id","appAccount",1,"bg-transparent","border-0","btn",3,"click"],["type","button",1,"btn","d-flex","align-items-center","gap-2","w-100","flex-column","p-0",3,"ngClass","click"],["width","128","height","128",3,"src","alt"],[1,"resultFound-wrap","d-flex","flex-column","gap-3","align-items-center","justify-content-center","py-4"],["src","/assets/images/result-found.svg","alt","found","width","78","height","78"],[1,"d-inline-block"],["href","javaScript:void(0);","title","Click here to submit your request","aria-label","Click here to submit your request",1,"d-inline-block",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"Add Account"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.closePopUp()}),o.O4$(),o.TgZ(4,"svg",3),o._UZ(5,"path",4),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",5),o.TgZ(7,"div",6),o.TgZ(8,"input",7),o.NdJ("ngModelChange",function(t){return e.searchText=t})("input",function(){return e.filterApps()}),o.qZA(),o.YNc(9,To,5,0,"button",8),o.YNc(10,Oo,3,0,"button",9),o.qZA(),o.TgZ(11,"div",10),o.YNc(12,Mo,1,0,"app-loading",11),o.TgZ(13,"ul",12),o.YNc(14,So,5,6,"li",13),o.ALo(15,"slice"),o.qZA(),o.YNc(16,Po,8,1,"div",14),o.qZA(),o.qZA()),2&t&&(o.xp6(8),o.Q6J("ngModel",e.searchText),o.xp6(1),o.Q6J("ngIf",!e.searchText),o.xp6(1),o.Q6J("ngIf",e.searchText),o.xp6(2),o.Q6J("ngIf",e.loading),o.xp6(2),o.Q6J("ngForOf",o.Dn7(15,6,e.filteredAppsList,0,18)),o.xp6(2),o.Q6J("ngIf",!e.isLoading&&0===e.filteredAppsList.length))},directives:[Xi.Fj,Xi.JJ,Xi.On,to.O5,to.sg,ko,to.mk],pipes:[to.OU],styles:[".search-appWrap[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{display:flex;padding:10px 40px 10px 16px;justify-content:space-between;align-items:center;border-radius:10px;border:1px solid #C7C8CA;background:#FFF;position:relative}#appAccount[_ngcontent-%COMP%]{position:absolute;top:0;right:0px;height:100%}.resultFound-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#1d1d1d!important;text-align:center;font-size:clamp(13px,2vw,16px)!important;font-weight:500!important;line-height:24px}.resultFound-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{color:var(--Primary-Color)}.resultFound-wrap[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#74748a;text-align:center;font-size:16px;font-weight:500;line-height:24px}.filteredAppsList[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{border-radius:5px;border:1px solid #E5E5E5;background:#FFF;display:flex;padding:10px;flex-direction:column;align-items:center;grid-gap:8px;gap:8px;flex:0 0 auto;max-width:104px}.filteredAppsList[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#1d1d1d;text-align:center;font-size:12px;font-weight:500;white-space:normal;overflow:hidden;text-overflow:ellipsis;line-height:18px;display:-webkit-inline-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.filteredAppsList[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{padding:.5rem;max-width:80%;height:auto;object-fit:contain;-o-object-fit:contain;object-position:center;-o-object-position:center}.filteredAppsList[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));display:grid}.search-appWrap[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus, .search-appWrap[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus-within{border-color:var(--Primary-Color)!important}@media (max-width:576px){.filteredAppsList[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(95px,1fr))}}.theme-dark[_ngcontent-%COMP%]   .app-account-popup[_ngcontent-%COMP%]   .resultFound-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .app-account-popup[_ngcontent-%COMP%]   .resultFound-wrap[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#fff!important}.theme-dark[_ngcontent-%COMP%]   .app-account-popup[_ngcontent-%COMP%]   .resultFound-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover, .theme-dark[_ngcontent-%COMP%]   .app-account-popup[_ngcontent-%COMP%]   .resultFound-wrap[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{color:#5371ff!important}"]}),t})();var qo=n(2720),Uo=n(3927);let Eo=(()=>{class t{constructor(t){this.httpClient=t}getTranslation(t,e){return this.httpClient.get(`${go.N.localesPath}/${t}/${t}.${e}.json`)}getModuleTranslation(t,e){return this.httpClient.get(`${go.N.localesPath}/${t}/${t}.${e}.json`).pipe((0,Uo.U)(t=>({mtranslation:t})))}getMultipleTranslation(t,e){const n=e.map(e=>this.httpClient.get(`${go.N.localesPath}/${t}/${t}.${e}.json`));return(0,qo.D)(n).pipe((0,Uo.U)(t=>t.reduce((t,e)=>Object.assign(Object.assign({},t),e),{})))}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(di.eN))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Fo=(()=>{class t{constructor(t){this.apiService=t}getUserConnectBy_Id(t){return this.apiService.request("get","customerconnect/getby_id/"+t,null)}getUserConnectData(t){return this.apiService.request("get","customerconnect/getByConnectId/"+t,null)}addUserConnect(t){return this.apiService.request("post","customerconnect/add",t)}updateUserConnectBy_Id(t,e){return this.apiService.request("put","customerconnect/updateBy_Id/"+t,e)}
1getNodeSampleData(t){return this.apiService.request("post","customerconnect/getNodeSampleData",t)}checkNodeStatusCompleted(t){return this.apiService.request("post","customerconnect/checkNodeStatusCompleted",t)}getUserConnectedAccountByAppId(t){return this.apiService.request("get","customerconnect/getConnectedAccountbyappid/"+t,null)}updateConnectByCondition(t){return this.apiService.request("put","customerconnect/updateConnectByCondition",t)}updateConnectStatus(t){return this.apiService.request("post","customerconnect/updateConnectStatus",{connectId:t})}readAuth(t,e,n,i,o){return this.apiService.request("post",`${t}/${t}Read/${e}/${n}/${i}/${o}`,{})}updateUserConnect(t,e){return this.apiService.request("put","customerconnect/update/"+t,e)}updateConnectByConnectId(t,e){return this.apiService.request("put","customerconnect/updateConnectByConnectId/"+t,e)}getUserConnectList(t){return this.apiService.request("post","customerconnect/getUserConnectsList",t)}getAgentBuilderAgents(){return this.apiService.request("get","customerconnect/getAgentBuilderAgents",null)}updateConnectedAccountNickName(t){return this.apiService.request("post","customerconnect/updateConnectedAccountNickName",t)}getUserConnect(t){return this.apiService.request("get","customerconnect/getbyid/"+t,{})}deleteUserConnectCronMultiple(t){return this.apiService.request("post","customerconnect/deleteCronMultiple",t)}deleteUserConnectsMultiple(t){return this.apiService.request("post","customerconnect/deleteConnectsMultiple",t)}updateConnectStatusByConnectId(t,e){return this.apiService.request("put","customerconnect/updateConnectStatusByConnectId/"+t,e)}deleteUserConnectCron(t){return this.apiService.request("delete","customerconnect/deleteCron/"+t,{})}deleteManyConnects(t){return this.apiService.request("post","customerconnect/deleteConnectsByList/",t)}getUserTaskHistory(t){return this.apiService.request("post","customerconnect/getUserTaskHistory",t)}deleteUserConnects(t){return this.apiService.request("delete","customerconnect/deleteConnects/"+t,{})}moveToTrash(t){return this.apiService.request("put","customerconnect/moveToTrash/"+t,{})}getTrashConnects(){return this.apiService.request("get","customerconnect/trash",{})}restoreFromTrash(t){return this.apiService.request("put","customerconnect/restoreFromTrash/"+t,{})}permanentDeleteConnect(t){return this.apiService.request("delete","customerconnect/permanentDelete/"+t,{})}getUserConnectedAccounts(){return this.apiService.request("get","customerconnect/getConnectedAccounts",{})}getUserConnectedAccountsCountList(t){return this.apiService.request("post","customerconnect/getConnectedAccountsCountList",{connectedAccounts:t})}disconnectThroughAppApi(t){return this.apiService.request("post","customerconnect/disconnectThroughAppApi/"+ +t,{})}disconnectApp(t){return this.apiService.request("delete","customerconnect/disConnectApp/"+t,{})}disconnectChildApp(t,e){return this.apiService.request("delete","customerconnect/disConnectApp/child/"+t+"/"+e,{})}deleteConnectNode(t){return this.apiService.request("delete","customerconnect/deleteConnectNode/"+t,{})}updateUserConnectOnFinishMultiple(t,e){return this.apiService.request("put","customerconnect/updateUserConnectOnFinish/multiple",{nodes:t,params:e})}updateUserConnectedTitle(t){return this.apiService.request("post","customerconnect/updateConnectedTitle",t)}createDuplicateConnect(t){return this.apiService.request("post","customerconnect/createDuplicateConnect",t)}revertTimeBack(t){return this.apiService.request("post","customerconnect/revertTimeBack",{orignalConnectId:t})}getConnectByAccId(t){return this.apiService.request("post","customerconnect/getConnectsByAccId",{accountId:t})}setTaskFrequencyForConnect(t){return this.apiService.request("post","customerconnect/setTaskFrequencyForConnect",t)}loadConnectPageDataAggregateQuery(t){return this.apiService.request("post","customerconnect/loadConnectPageDataAggregateQuery",t)}getEditOptionsByConnectId(t){return this.apiService.request("post","customerconnect/getEditOptionsByConnectId",t)}getDetailsByTemplateId(t){return this.apiService.request("post","customerconnect/getDetailsByTemplateId",t)}getAIModels(t){return this.apiService.request("post","customerconnect/getAIModels",t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var Do=n(7025),Lo=n(9653),Jo=n(2321),jo=n(4691),Ro=n(9544),$o=n(9511);const Bo=new(n(1660).v)($o.o);var Ho=n(9861);function Qo(t){return!(0,Ho.k)(t)&&t-parseFloat(t)+1>=0}var Yo=n(6770);function zo(t=0,e,n){let i=-1;return Qo(e)?i=Number(e)<1?1:Number(e):(0,Yo.K)(e)&&(n=e),(0,Yo.K)(n)||(n=Bo),new Ro.y(e=>{const o=Qo(t)?t:+t-n.now();return n.schedule(Vo,o,{index:0,period:i,subscriber:e})})}function Vo(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}const Go=["*"];let Wo=(()=>{class t{constructor(){this.adaptivePosition=!0,this.placement="top",this.triggers="hover focus",this.delay=0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,o.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ko=(()=>{class t{constructor(t){Object.assign(this,t)}get _bsVersions(){return(0,Do.Wl)()}ngAfterViewInit(){this.classMap={in:!1,fade:!1},this.placement&&(this._bsVersions.isBs5&&(this.placement=Lo.Bz[this.placement]),this.classMap[this.placement]=!0),this.classMap[`tooltip-${this.placement}`]=!0,this.classMap.in=!0,this.animation&&(this.classMap.fade=!0),this.containerClass&&(this.classMap[this.containerClass]=!0)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Wo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["bs-tooltip-container"]],hostAttrs:["role","tooltip"],hostVars:7,hostBindings:function(t,e){2&t&&(o.uIk("id",e.id),o.Tol("tooltip in tooltip-"+e.placement+" bs-tooltip-"+e.placement+" "+e.placement+" "+e.containerClass),o.ekj("show",!e._bsVersions.isBs3)("bs3",e._bsVersions.isBs3))},ngContentSelectors:Go,decls:3,vars:0,consts:[[1,"tooltip-arrow","arrow"],[1,"tooltip-inner"]],template:function(t,e){1&t&&(o.F$t(),o._UZ(0,"div",0),o.TgZ(1,"div",1),o.Hsn(2),o.qZA())},styles:[".tooltip[_nghost-%COMP%] {\n      display: block;\n      pointer-events: none;\n    }\n    .bs3.tooltip.top[_nghost-%COMP%] > .arrow[_ngcontent-%COMP%] {\n      margin-left: -2px;\n    }\n    .bs3.tooltip.bottom[_nghost-%COMP%] {\n      margin-top: 0px;\n    }\n    .bs3.bs-tooltip-left[_nghost-%COMP%], .bs3.bs-tooltip-right[_nghost-%COMP%]{\n      margin: 0px;\n    }\n    .bs3.bs-tooltip-right[_nghost-%COMP%]   .arrow[_ngcontent-%COMP%], .bs3.bs-tooltip-left[_nghost-%COMP%]   .arrow[_ngcontent-%COMP%] {\n      margin: .3rem 0;\n    }"],changeDetection:0}),t})(),Xo=0,tr=(()=>{class t{constructor(t,e,n,i,r,s){this._elementRef=i,this._renderer=r,this._positionService=s,this.tooltipId=Xo++,this.adaptivePosition=!0,this.tooltipChange=new o.vpe,this.placement="top",this.triggers="hover focus",this.containerClass="",this.isDisabled=!1,this.delay=0,this.tooltipAnimation=!0,this.tooltipFadeDuration=150,this.tooltipStateChanged=new o.vpe,this._tooltip=e.createLoader(this._elementRef,t,this._renderer).provide({provide:Wo,useValue:n}),Object.assign(this,n),this.onShown=this._tooltip.onShown,this.onHidden=this._tooltip.onHidden}get isOpen(){return this._tooltip.isShown}set isOpen(t){t?this.show():this.hide()}set htmlContent(t){(0,Do.O4)("tooltipHtml was deprecated, please use `tooltip` instead"),this.tooltip=t}set _placement(t){(0,Do.O4)("tooltipPlacement was deprecated, please use `placement` instead"),this.placement=t}set _isOpen(t){(0,Do.O4)("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen=t}get _isOpen(){return(0,Do.O4)("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen}set _enable(t){(0,Do.O4)("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled=!t}get _enable(){return(0,Do.O4)("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled}set _appendToBody(t){(0,Do.O4)('tooltipAppendToBody was deprecated, please use `container="body"` instead'),this.container=t?"body":this.container}get _appendToBody(){return(0,Do.O4)('tooltipAppendToBody was deprecated, please use `container="body"` instead'),"body"===this.container}set _popupClass(t){(0,Do.O4)("tooltipClass deprecated")}set _tooltipContext(t){(0,Do.O4)("tooltipContext deprecated")}set _tooltipPopupDelay(t){(0,Do.O4)("tooltipPopupDelay is deprecated, use `delay` instead"),this.delay=t}get _tooltipTrigger(){return(0,Do.O4)("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers}set _tooltipTrigger(t){(0,Do.O4)("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers=(t||"").toString()}ngOnInit(){this._tooltip.listen({triggers:this.triggers,show:()=>this.show()}),this.tooltipChange.subscribe(t=>{t||this._tooltip.hide()}),this.onShown.subscribe(()=>{this.setAriaDescribedBy()}),this.onHidden.subscribe(()=>{this.setAriaDescribedBy()})}setAriaDescribedBy(){this._ariaDescribedby=this.isOpen?`tooltip-${this.tooltipId}`:void 0,this._ariaDescribedby?this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ariaDescribedby):this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby")}toggle(){if(this.isOpen)return this.hide();this.show()}show(){if(this._positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition},preventOverflow:{enabled:this.adaptivePosition,boundariesElement:this.boundariesElement||"scrollParent"}}}),this.isOpen||this.isDisabled||this._delayTimeoutId||!this.tooltip)return;const t=()=>{this._delayTimeoutId&&(this._delayTimeoutId=void 0),this._tooltip.attach(Ko).to(this.container).position({attachment:this.placement}).show({content:this.tooltip,placement:this.placement,containerClass:this.containerClass,id:`tooltip-${this.tooltipId}`})},e=()=>{this._tooltipCancelShowFn&&this._tooltipCancelShowFn()};this.delay?(this._delaySubscription&&this._delaySubscription.unsubscribe(),this._delaySubscription=zo(this.delay).subscribe(()=>{t(),e()}
1),this.triggers&&(0,Do.AL)(this.triggers).forEach(t=>{!t.close||(this._tooltipCancelShowFn=this._renderer.listen(this._elementRef.nativeElement,t.close,()=>{var t;null===(t=this._delaySubscription)||void 0===t||t.unsubscribe(),e()}))})):t()}hide(){var t;this._delayTimeoutId&&(clearTimeout(this._delayTimeoutId),this._delayTimeoutId=void 0),this._tooltip.isShown&&((null===(t=this._tooltip.instance)||void 0===t?void 0:t.classMap)&&(this._tooltip.instance.classMap.in=!1),setTimeout(()=>{this._tooltip.hide()},this.tooltipFadeDuration))}ngOnDestroy(){this._tooltip.dispose(),this.tooltipChange.unsubscribe(),this._delaySubscription&&this._delaySubscription.unsubscribe(),this.onShown.unsubscribe(),this.onHidden.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.s_b),o.Y36(jo.oj),o.Y36(Wo),o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(Lo.sA))},t.\u0275dir=o.lG2({type:t,selectors:[["","tooltip",""],["","tooltipHtml",""]],inputs:{adaptivePosition:"adaptivePosition",placement:"placement",triggers:"triggers",containerClass:"containerClass",isDisabled:"isDisabled",delay:"delay",tooltipAnimation:"tooltipAnimation",tooltipFadeDuration:"tooltipFadeDuration",isOpen:"isOpen",htmlContent:["tooltipHtml","htmlContent"],tooltip:"tooltip",_placement:["tooltipPlacement","_placement"],_isOpen:["tooltipIsOpen","_isOpen"],_enable:["tooltipEnable","_enable"],_appendToBody:["tooltipAppendToBody","_appendToBody"],container:"container",_popupClass:["tooltipClass","_popupClass"],_tooltipContext:["tooltipContext","_tooltipContext"],_tooltipPopupDelay:["tooltipPopupDelay","_tooltipPopupDelay"],_tooltipTrigger:["tooltipTrigger","_tooltipTrigger"],boundariesElement:"boundariesElement"},outputs:{tooltipChange:"tooltipChange",tooltipStateChanged:"tooltipStateChanged",onShown:"onShown",onHidden:"onHidden"},exportAs:["bs-tooltip"]}),(0,Jo.gn)([(0,Do.GU)(),(0,Jo.w6)("design:type",Object)],t.prototype,"tooltip",void 0),t})(),er=(()=>{class t{static forRoot(){return{ngModule:t,providers:[jo.oj,Lo.sA]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),nr=(()=>{class t{transform(t,e){return e?t.filter(t=>{if(t){const n="string"==typeof t.accountNickName,i="string"==typeof t.appName;if("string"==typeof t.accountName&&t.accountName.trim().match(new RegExp(e.trim(),"i"))||i&&t.appName.trim().match(new RegExp(e.trim(),"i"))||n&&t.accountNickName.trim().match(new RegExp(e.trim(),"i")))return t}}):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"filterAccounts",type:t,pure:!0}),t})();function ir(t,e){if(1&t&&(o.TgZ(0,"div",30),o.TgZ(1,"div"),o.TgZ(2,"button",31),o._uU(3,"\xd7"),o.qZA(),o._UZ(4,"i"),o._uU(5,"\xa0\xa0"),o.TgZ(6,"span"),o._uU(7),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Tol("alert alert-"+t.flash.type+" alert-dismissable"),o.xp6(3),o.Tol("fa fa-"+t.flash.icontype+"-circle"),o.xp6(3),o.Oqu(t.flash.message)}}function or(t,e){1&t&&(o.TgZ(0,"button",32),o.O4$(),o.TgZ(1,"svg",33),o._UZ(2,"path",34),o._UZ(3,"path",35),o.qZA(),o.qZA())}function rr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",36),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeSearchCross()}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"path",38),o.qZA(),o.qZA()}}function sr(t,e){if(1&t&&(o.TgZ(0,"div",39),o.TgZ(1,"div",40),o.TgZ(2,"div",41),o.O4$(),o.TgZ(3,"svg",42),o._UZ(4,"path",43),o._UZ(5,"path",44),o._UZ(6,"path",45),o._UZ(7,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"div",47),o.TgZ(9,"h3",48),o.TgZ(10,"span"),o._uU(11,"No Linked"),o.qZA(),o.TgZ(12,"span",49),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(13),o.hij("Accounts ",t.translation.FOUND,"")}}function ar(t,e){if(1&t&&(o.TgZ(0,"span",94),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.s9C("tooltip",t.appName),o.xp6(1),o.Oqu(t.appName)}}function cr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"input",95),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().$implicit.appName=e})("keyup",function(e){o.CHM(t);const n=o.oxw().$implicit,i=o.oxw(3);return 13==e.keyCode?i.updateName(n):null}),o.qZA()}if(2&t){const t=o.oxw().$implicit;o.Q6J("ngModel",t.appName)}}function lr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",96),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).editAccountNckName(e,n._id,n.accountNickName,n.appId)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit;o.Q6J("id","accountNickNameId"+t.index),o.xp6(1),o.Oqu(e.accountNickName)}}function dr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",96),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).editAccountNckName(e,n._id,n.accountNickName,n.appId)}),o._uU(1,"Add Nickname"),o.qZA()}if(2&t){const t=o.oxw().index;o.Q6J("id","accountNickNameId"+t)}
1}function ur(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",97),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).editAccountNckName(e,n._id,n.accountNickName,n.appId)}),o.O4$(),o.TgZ(1,"svg",98),o._UZ(2,"path",99),o.qZA(),o.qZA()}}function pr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",97),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).editAccountNckName(e,n._id,n.accountNickName,n.appId)}),o.O4$(),o.TgZ(1,"svg",98),o._UZ(2,"path",99),o.qZA(),o.qZA()}}function hr(t,e){1&t&&(o.TgZ(0,"span",100),o.O4$(),o.TgZ(1,"svg",91),o._UZ(2,"path",101),o.qZA(),o._uU(3," Testing... "),o.qZA())}function gr(t,e){1&t&&(o.TgZ(0,"span",102),o.O4$(),o.TgZ(1,"svg",103),o._UZ(2,"path",104),o.qZA(),o._uU(3," Success "),o.qZA())}function fr(t,e){1&t&&(o.TgZ(0,"span",105),o.O4$(),o.TgZ(1,"svg",106),o._UZ(2,"path",107),o._UZ(3,"path",108),o.qZA(),o._uU(4," Failed! "),o.qZA())}function mr(t,e){1&t&&(o.TgZ(0,"span"),o.O4$(),o.TgZ(1,"svg",91),o._UZ(2,"path",109),o.qZA(),o._uU(3," Test "),o.qZA())}function vr(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"span",110),o._uU(1,"Authentication failed, "),o.TgZ(2,"a",111),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).reconnect(e.appId,e._id,e.auth)}),o._uU(3,"Reconnect"),o.qZA(),o._uU(4," your app"),o.qZA()}}function br(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",52),o.TgZ(1,"div",53),o.TgZ(2,"button",54),o.O4$(),o.TgZ(3,"svg",55),o._UZ(4,"path",56),o._UZ(5,"path",57),o._UZ(6,"path",58),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",59),o.TgZ(8,"ul"),o.TgZ(9,"li"),o.TgZ(10,"button",60),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index;return o.oxw(3).openConfirm(n._id,i)}),o.O4$(),o.TgZ(11,"svg",61),o._UZ(12,"path",62),o._UZ(13,"path",63),o._UZ(14,"path",64),o._UZ(15,"path",65),o._UZ(16,"path",66),o.qZA(),o._uU(17," Delete App"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"div",67),o.TgZ(19,"div",68),o._UZ(20,"img",69),o.qZA(),o.TgZ(21,"div",70),o.TgZ(22,"label",71),o.YNc(23,ar,2,2,"span",72),o.YNc(24,cr,1,1,"input",73),o.qZA(),o.TgZ(25,"p",74),o.TgZ(26,"a",75),o._uU(27),o.qZA(),o.qZA(),o.TgZ(28,"div",76),o.YNc(29,lr,2,2,"p",77),o.YNc(30,dr,2,1,"p",77),o.YNc(31,ur,3,0,"button",78),o.YNc(32,pr,3,0,"button",78),o.qZA(),o.qZA(),o.TgZ(33,"div",79),o.TgZ(34,"p"),o.TgZ(35,"b",80),o._uU(36),o.qZA(),o._UZ(37,"span",81),o.ALo(38,"date"),o.ALo(39,"date"),o.qZA(),o._UZ(40,"span",82),o.TgZ(41,"p"),o.TgZ(42,"b",80),o._uU(43,"Used in : "),o.qZA(),o.TgZ(44,"span",83),o._uU(45),o.qZA(),o.qZA(),o.qZA(),o.TgZ(46,"div",84),o.TgZ(47,"button",85),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).testAccountConnection(e.appId,e._id,e)}),o.ynx(48,86),o.YNc(49,hr,4,0,"ng-template",87),o.YNc(50,gr,4,0,"ng-template",88),o.YNc(51,fr,5,0,"ng-template",89),o.YNc(52,mr,4,0,"ng-template",90),o.BQk(),o.qZA(),o.TgZ(53,"button",85),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).reconnect(e.appId,e._id,e.auth)}),o.O4$(),o.TgZ(54,"svg",91),o._UZ(55,"path",92),o.qZA(),o._uU(56," Re-authenticate"),o.qZA(),o.qZA(),o.YNc(57,vr,5,0,"span",93),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(3);o.MGl("id","account_row",n,""),o.Q6J("hidden",0==i.connectedAccounts.length),o.xp6(20),o.s9C("src",i.appyConfig.cdnMediaPath+t.appImage,o.LSH),o.xp6(3),o.Q6J("ngIf",!t.Selected),o.xp6(1),o.Q6J("ngIf",t.Selected),o.xp6(2),o.Q6J("id","accountNameId"+n),o.xp6(1),o.Oqu(t.accountName),o.xp6(2),o.Q6J("ngIf",t.accountNickName),o.xp6(1),o.Q6J("ngIf",!t.accountNickName),o.xp6(1),o.Q6J("ngIf",t.accountNickName),o.xp6(1),o.Q6J("ngIf",!t.accountNickName),o.xp6(4),o.Oqu(i.translation.UPDATED+" on : "),o.xp6(1),o.s9C("title",o.Dn7(38,17,t._updated_at,"yyyy-MM-dd","localTimezone")),o.Q6J("innerHtml",o.Dn7(39,21,t._updated_at,"yyyy-MM-dd","localTimezone"),o.oJD),o.xp6(8),o.hij("",t.connect_count||0," Connect"),o.xp6(3),o.Q6J("ngSwitch",i.testingState[t._id]),o.xp6(9),o.Q6J("ngIf","failed"===i.testingState[t._id])}}function xr(t,e){if(1&t&&(o.TgZ(0,"div",11),o.TgZ(1,"ul",50),o.YNc(2,br,58,25,"li",51),o.ALo(3,"filterAccounts"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,t.connectedAccounts,t.searchTxt))}}
1const _r=function(){return{WidthContainer:!1}};function Cr(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"main",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"div",5),o.TgZ(4,"div",6),o.TgZ(5,"section",7),o.TgZ(6,"div",8),o.TgZ(7,"div",9),o.TgZ(8,"h1",10),o._uU(9,"Linked Accounts"),o.qZA(),o.qZA(),o.TgZ(10,"div",11),o.TgZ(11,"div",12),o.YNc(12,ir,8,7,"div",13),o.qZA(),o.TgZ(13,"div",14),o.TgZ(14,"form",15),o.TgZ(15,"div",16),o.TgZ(16,"input",17),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().searchTxt=e})("keyup",function(){return o.CHM(t),o.oxw().filter()})("keydown",function(){return o.CHM(t),o.oxw().filter()}),o.qZA(),o.TgZ(17,"div",18),o.YNc(18,or,4,0,"button",19),o.YNc(19,rr,3,0,"button",20),o.qZA(),o.qZA(),o.qZA(),o.TgZ(20,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().appAccountPop()}),o.O4$(),o.TgZ(21,"svg",22),o.TgZ(22,"g",23),o._UZ(23,"path",24),o._UZ(24,"path",25),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"span",26),o._uU(26," Add New Account "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(27,"div",27),o.YNc(28,sr,14,1,"div",28),o.qZA(),o.YNc(29,xr,4,4,"div",29),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.Q6J("ngClass",o.DdM(10,_r)),o.xp6(12),o.Q6J("ngIf",t.flash),o.xp6(4),o.s9C("placeholder",t.translation.FILTER_CONNECTED_ACCOUNTS),o.Q6J("ngModel",t.searchTxt),o.xp6(2),o.Q6J("ngIf",!t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.searchTxt),o.xp6(9),o.Q6J("ngIf",null==t.showNot||0===t.connectedAccounts.length),o.xp6(1),o.Q6J("ngIf",t.connectedAccounts)}}function wr(t,e){1&t&&o._UZ(0,"app-loader")}let yr=(()=>{class t{constructor(t,e,n,i,o,r){this.router=t,this.translatorService=e,this.customerConnectService=n,this.commonService=i,this.customerService=o,this.modalService=r,this.connectedAccounts=[],this.appyConfig=go.N,this.disconnectAuthId="",this.disconnectChildAuthId="",this.isMenuBarActive=!0,this.testingState={},this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t})}ngOnInit(){this.showNot=!1,this.searchTxt="",this.currentUser=this.customerService.GetCurrent(),this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.getConnectedAccounts()}filter(){this.showNot=document.getElementById("accountNameId0"),setTimeout(()=>{const t=document.getElementById("noConnects");null==t||t.classList.remove("d-none")},100)}getConnectedAccounts(){this.testloader=!0,this.customerConnectService.getUserConnectedAccounts().subscribe(t=>{0==(null==t?void 0:t.userConnectedAccount.length)&&setTimeout(()=>{const t=document.getElementById("noConnects");null==t||t.classList.remove("d-none")},100);const e=null==t?void 0:t.userConnectedAccount.sort((t,e)=>new Date(e._updated_at).getTime()-new Date(t._updated_at).getTime());if((null==e?void 0:e.length)>0){const t={};null==e||e.forEach(e=>{const n=e.appName+(e.accountName||"#");t[n]=(t[n]||0)+1,e._updated_at=new Date(e._updated_at).getTime()})}this.connectedAccounts=e,[...new Set(null==e?void 0:e.filter(t=>!t.appImage||!t.appUrlName).map(t=>t.appId))].forEach(t=>{this.commonService.getApp(t).subscribe(e=>{var n;(null==e?void 0:e.app_detail)&&(null===(n=this.connectedAccounts)||void 0===n||n.filter(e=>e.appId===t).forEach(t=>{var n;t.appImage||(t.appImage=e.app_detail.image),t.appUrlName||(t.appUrlName=null===(n=e.app_detail.credential)||void 0===n?void 0:n.urlName)}),this.connectedAccounts=[...this.connectedAccounts])})});const n=null==e?void 0:e.map(t=>t._id);this.customerConnectService.getUserConnectedAccountsCountList(n).subscribe(t=>{null==t||t.userConnectedAccount.forEach(t=>{var e;const n=null===(e=this.connectedAccounts)||void 0===e?void 0:e.find(e=>e._id===t._id);n&&(this.testingState[localStorage.getItem("connectedAccId")]="",n.connect_count=t.uniqueConnectIds.length)})}),this.testloader=!1})}openConfirm(t,e){var n,i=null===(n=this.connectedAccounts)||void 0===n?void 0:n.find(e=>t===e._id);this.customerConnectService.getConnectByAccId(i._id).subscribe(t=>{const n=this.translation.REMOVE_ACCOUNT;var o=this.translation.AUTH_REMOVE;t.activeCount>0?(o=this.translation.AUTH_REMOVE_FALSE,o=this.translation.AUTH_REMOVE_FALSE.replace(new RegExp("{Account_Name}","g"),i.accountName).replace(new RegExp("{Count}","g"),t.activeCount)):o=o.replace(new RegExp("{Account_Name}","g"),i.accountName),this.bsModalRef=this.modalService.show(bo,{initialState:{modelTitle:n,modelContent:o,modelConnectId:{id:i._id,index:e},translation:this.translation,modelConnectCount:t.activeCount}}),this.bsModalRef.content.onClose.subscribe(t=>{this.customerConnectService.disconnectApp(t.id).subscribe(t=>{t&&"OK"==t.message&&this.getConnectedAccounts()})})})}reconnect(t,e,n){"jnpl1uik645c878la4sp"==t?window.open("https://apps.shopify.com/"):this.commonService.getApp(t).subscribe(n=>{const i=n.app_detail.credential.urlName.replace(/^[0-9]/,"Three");if(""!==i&&void 0!==i){let n;if(localStorage.removeItem("connectedAccId"),localStorage.removeItem("connectAppId"),localStorage.removeItem("accountMetaData"),localStorage.setItem("connectAppId",t),localStorage.setItem("connectedAccId",e),setTimeout(()=>{n=window.open(this.appyConfig.apiEndPoint+"app/auth/"+i+"?id="+t,"_reconnWindowPop","width=1050,height=700"),localStorage.setItem("window_name","_reconnWindowPop"),localStorage.setItem("closereconnpop","false"),this.checkChild(n,"_reconnWindowPop")},100),n){const t=setInterval(()=>{n.closed&&(clearInterval(t),this.testingState[e]="")},500)}}})}checkChild(t,e){const n=setTimeout(()=>{t.closed?(clearInterval(n),this.getConnectedAccounts()):this.checkChild(t,e)},200)}update(t,e){var n;
1null===(n=this.connectedAccounts)||void 0===n||n.forEach((e,n)=>{e.Selected=t._id===e._id})}updateName(t){this.customerConnectService.updateUserConnectedTitle({customerId:this.currentUser.customerId,appDetails:t}).subscribe(t=>{var e;t&&(null===(e=this.connectedAccounts)||void 0===e||e.forEach((t,e)=>{t.Selected=!1}))})}testAccountConnection(t,e,n){this.testingState[e]="testing",this.customerService.TestAccount({endpoint:n.appUrlName,funName:`${n.appUrlName}Read`,appId:n.appId,authId:e||n._id,nodeId:n.connectId,customerId:n.customerId}).subscribe(t=>{this.testingState[e]="success"===t.message?"success":"failed"})}editAccountNckName(t,e,n,i){t.stopPropagation(),this.showEditNicknameModal(e,n,i)}getAccountNickNames(t){return this.connectedAccounts.filter(e=>e.appId===t).map(t=>t.accountNickName).filter(t=>void 0!==t)}showEditNicknameModal(t,e,n){const i=this.getAccountNickNames(n);this.bsModalRef=this.modalService.show(Co,{initialState:{accountId:t,accountNickName:e,accountNickNames:i,translation:this.translation,modelTitle:"Edit Account Nickname",modelContent:"You can add a personalized nickname for your existing account"}}),this.bsModalRef.content.onClose.subscribe(t=>this.updateAccountNickName(t))}updateAccountNickName(t){this.customerConnectService.updateConnectedAccountNickName(t).subscribe(t=>{"success"==t.message&&this.getConnectedAccounts()})}appAccountPop(){this.loading=!0,this.bsModalRef=this.modalService.show(No,{initialState:{},class:"app-account-popup modal-dialog modal-dialog-centered modal-dialog-scrollable"}),setTimeout(()=>{this.loading=!1},400),this.bsModalRef.content.onClose.subscribe(t=>{this.getConnectedAccounts()})}closeSearchCross(){this.showNot="",this.searchTxt="",this.getConnectedAccounts()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.F0),o.Y36(Eo),o.Y36(Fo),o.Y36(wo.v),o.Y36(yo),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-my-apps"]],decls:2,vars:2,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ng-class","toggleclass()","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],[4,"ngIf"],["id","main-container_","ng-class","toggleclass()","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","ConnectAccountpage",1,"dashboard-middle","clearfix","sectionpadding"],[1,"containerCustom","clearfix"],[1,"col-md-12","mar-15-b","d-block"],[1,"h3"],[1,"col-sm-12"],[1,"block","block-shadow","bg-white","app-grid","block-rounded"],["class","flash-message",4,"ngIf"],[1,"searchconnect","push-30-t","mar-30-b","d-flex","align-items-center","justify-content-between","gap-3","flex-wrap"],["method","post",1,"formseach","max-w-600","w-100"],[1,"inputgroup"],["type","text","id","base-material-text","name","base-material-text",1,"form-control","connectaccountmenubtn","ps-3",3,"placeholder","ngModel","ngModelChange","keyup","keydown"],[1,"inputgroupbtn","top-0","end-0"],["class","btn btnsearch","type","submit",4,"ngIf"],["class","btn btnsearch","type","submit",3,"click",4,"ngIf"],["type","button","type","link",1,"btn","add-new-account",3,"click"],["width","22","height","22","viewBox","0 0 25 25","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","plus 1"],["id","Vector","d","M5.5 12.5H19.5","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M12.5 5.5V19.5","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"icon-w","d-none","d-lg-inline-block"],[1,"col-sm-12","ng-scope"],["class","connectitemsapp d-none headconnectapp no-connects-wrap text-center","id","noConnects",4,"ngIf"],["class","col-sm-12",4,"ngIf"],[1,"flash-message"],["type","button","data-dismiss","alert","aria-hidden","true",1,"close"],["type","submit",1,"btn","btnsearch"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none"],["d","M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M21 21L19 19","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","submit",1,"btn","btnsearch",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"],["id","noConnects",1,"connectitemsapp","d-none","headconnectapp","no-connects-wrap","text-center"],[1,"block-content","block-content-full","text-center"],[1,"push-30-t","push-30","no-connects-header"],["xmlns","http://www.w3.org/2000/svg","width","162","height","161","viewBox","0 0 162 161","fill","none"],["d","M12.1055 2H60.1329C65.4379 2 69.7384 6.30052 69.7384 11.6055V59.6329C69.7384 64.9379 65.4379 69.2384 60.1329 69.2384H12.1055C6.80052 69.2384 2.5 64.9379 2.5 59.6329V11.6055C2.5 6.30052 6.80052 2 12.1055 2Z","fill","#DCEFFF"],["d","M101.867 2H149.895C155.199 2 159.5 6.30052 159.5 11.6055V59.6329C159.5 64.9379 155.199 69.2384 149.895 69.2384H101.867C96.5621 69.2384 92.2616 64.9379 92.2616 59.6329V11.6055C92.2616 6.30052 96.5621 2 101.867 2Z","fill","#DCEFFF"],["d","M12.1055 91.7616H60.1329C65.4379 91.7616 69.7384 96.0621 69.7384 101.367V149.395C69.7384 154.699 65.4379 159 60.1329 159H12.1055C6.80052 159 2.5 154.699 2.5 149.395V101.367C2.5 96.0621 6.80052 91.7616 12.1055 91.7616Z","fill","#DCEFFF"],["d","M111.111 125.5H140.889M126 110.611V140.389M12.1055 2H60.1329C65.4379 2 69.7384 6.30052 69.7384 11.6055V59.6329C69.7384 64.9379 65.4379 69.2384 60.1329 69.2384H12.1055C6.80052 69.2384 2.5 64.9379 2.5 59.6329V11.6055C2.5 6.30052 6.80052 2 12.1055 2ZM101.867 2H149.895C155.199 2 159.5 6.30052 159.5 11.6055V59.6329C159.5 64.9379 155.199 69.2384 149.895 69.2384H101.867C96.5621 69.2384 92.2616 64.9379 92.2616 59.6329V11.6055C92.2616 6.30052 96.5621 2 101.867 2ZM12.1055 91.7616H60.1329C65.4379 91.7616 69.7384 96.0621 69.7384 101.367V149.395C69.7384 154.699 65.4379 159 60.1329 159H12.1055C6.80052 159 2.5 154.699 2.5 149.395V101.367C2.5 96.0621 6.80052 91.7616 12.1055 91.7616ZM99.9444 92H152.056C156.167 92 159.5 95.333 159.5 99.4444V151.556C159.5 155.667 156.167 159 152.056 159H99.9444C95.833 159 92.5 155.667 92.5 151.556V99.4444C92.5 95.333 95.833 92 99.9444 92Z","stroke","#DCEFFF","stroke-width","4","stroke-linecap","round","stroke-linejoin","round"],[1,"push-30","no-connects-content"],[1,"font-w400","push-30-t","push-30","fs-5"],[1,"push-5-r","push-5-l"],[1,"connectedAccounts-listed","gap-3","gap-lg-4","flex-wrap"],["class","connectaccountItems clearfix",3,"id","hidden",4,"ngFor","ngForOf"],[1,"connectaccountItems","clearfix",3,"id","hidden"],[1,"dropdown","dropdowndelete"],["type","button","id","DeleteEditDropMenu","data-bs-toggle","dropdown","aria-expanded","fal
1se","data-tooltip","More Options",1,"btn","dropdown-toggle","custom-options-tooltip","tooltip-top"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 30 30","fill","none"],["d","M15 6C15.5523 6 16 5.55228 16 5C16 4.44772 15.5523 4 15 4C14.4477 4 14 4.44772 14 5C14 5.55228 14.4477 6 15 6Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M15 16C15.5523 16 16 15.5523 16 15C16 14.4477 15.5523 14 15 14C14.4477 14 14 14.4477 14 15C14 15.5523 14.4477 16 15 16Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M15 26C15.5523 26 16 25.5523 16 25C16 24.4477 15.5523 24 15 24C14.4477 24 14 24.4477 14 25C14 25.5523 14.4477 26 15 26Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["aria-labelledby","DeleteEditDropMenu",1,"user-connect-delete","dropdown-menu","dropdown-menu-end"],["type","button","data-toggle","modal","data-target","#disconnect","data-controls-modal","disconnect","data-backdrop","static","data-keyboard","false",1,"ng-binding",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M2 4H14","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M12.6663 4V13.3333C12.6663 14 11.9997 14.6667 11.333 14.6667H4.66634C3.99967 14.6667 3.33301 14 3.33301 13.3333V4","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M5.33301 3.99998V2.66665C5.33301 1.99998 5.99967 1.33331 6.66634 1.33331H9.33301C9.99967 1.33331 10.6663 1.99998 10.6663 2.66665V3.99998","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M6.66699 7.33334V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33301 7.33334V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],[1,"user-connect-content"],[1,"appimgconn","text-center"],["alt","",3,"src"],[1,"appsdeleteconn","text-center"],[1,"editappsname"],["class","account-appname ng-binding",3,"tooltip",4,"ngIf"],["type","text",3,"ngModel","ngModelChange","keyup",4,"ngIf"],[1,"mb-1"],["href","javascript:void(0);","title","",1,"ng-binding",3,"id"],[1,"d-flex","align-items-center","gap-1","justify-content-center"],["class","mb-0 nickname",3,"id","click",4,"ngIf"],["type","button","class","btn border-0 bg-transparent p-2 py-0 custom-options-tooltip tooltip-top bottom-30","data-tooltip","Edit User Name",3,"click",4,"ngIf"],[1,"user-connect-updated"],[1,"ng-binding"],[1,"ng-binding","d-block",3,"title","innerHtml"],[1,"vr"],[1,"ng-binding","d-block"],[1,"user-connect-footer","d-flex","align-items-center"],["type","button",1,"btn",3,"click"],[3,"ngSwitch"],["ngSwitchCase","testing"],["ngSwitchCase","success"],["ngSwitchCase","failed"],["ngSwitchDefault",""],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 20 20","fill","none"],["d","M2.5 10C2.5 8.01088 3.29018 6.10322 4.6967 4.6967C6.10322 3.29018 8.01088 2.5 10 2.5C12.0967 2.50789 14.1092 3.32602 15.6167 4.78333L17.5 6.66667M17.5 6.66667V2.5M17.5 6.66667H13.3333M17.5 10C17.5 11.9891 16.7098 13.8968 15.3033 15.3033C13.8968 16.7098 11.9891 17.5 10 17.5C7.90329 17.4921 5.89081 16.674 4.38333 15.2167L2.5 13.3333M2.5 13.3333H6.66667M2.5 13.3333V17.5","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","errortest-account w-100",4,"ngIf"],[1,"account-appname","ng-binding",3,"tooltip"],["type","text",3,"ngModel","ngModelChange","keyup"],[1,"mb-0","nickname",3,"id","click"],["type","button","data-tooltip","Edit User Name",1,"btn","border-0","bg-transparent","p-2","py-0","custom-options-tooltip","tooltip-top","bottom-30",3,"click"],["width","15","height","15","viewBox","0 0 17 17","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.50014 15.6667H16.0001M11.0001 3.16666L13.5001 5.66666M12.1468 2.01833C12.4786 1.68658 12.9285 1.50021 13.3976 1.50021C13.8668 1.50021 14.3167 1.68658 14.6485 2.01833C14.9802 2.35007 15.1666 2.80001 15.1666 3.26916C15.1666 3.73831 14.9802 4.18825 14.6485 4.51999L4.64014 14.5292C4.44189 14.7274 4.19683 14.8724 3.92764 14.9508L1.53431 15.6492C1.4626 15.6701 1.38659 15.6713 1.31423 15.6528C1.24188 15.6343 1.17583 15.5966 1.12302 15.5438C1.0702 15.491 1.03255 15.4249 1.01401 15.3526C0.995475 15.2802 0.996729 15.2042 1.01764 15.1325L1.71598 12.7392C1.79449 12.4703 1.93952 12.2255 2.13764 12.0275L12.1468 2.01833Z","stroke","#5371FF","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[2,"display","inline-flex","align-items","center","gap","8px","color","#5371FF","background","none","text-decoration","underline"],["d","M17.5 10C17.5 11.4834 17.0601 12.9334 16.236 14.1668C15.4119 15.4001 14.2406 16.3614 12.8701 16.9291C11.4997 17.4968 9.99168 17.6453 8.53683 17.3559C7.08197 17.0665 5.7456 16.3522 4.6967 15.3033C3.64781 14.2544 2.9335 12.918 2.64411 11.4632C2.35472 10.0083 2.50325 8.50032 3.07091 7.12987C3.63856 5.75943 4.59986 4.58809 5.83323 3.76398C7.0666 2.93987 8.51664 2.5 10 2.5C12.1 2.5 14.1083 3.33333 15.6167 4.78333L17.5 6.66667M17.5 6.66667V2.5M17.5 6.66667H13.3333","stroke","#5371FF","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[2,"display","inline-flex","align-items","center","gap","8px","color","#36955F","background","none","padding","0"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","18","width","18"],["d","M19.965 8.521C19.988 8.347 20 8.173 20 8c0-2.379-2.143-4.288-4.521-3.965C14.786 2.802 13.466 2 12 2s-2.786.802-3.479 2.035C6.138 3.712 4 5.621 4 8c0 .173.012.347.035.521C2.802 9.215 2 10.535 2 12s.802 2.785 2.035 3.479A3.976 3.976 0 0 0 4 16c0 2.379 2.138 4.283 4.521 3.965C9.214 21.198 10.534 22 12 22s2.786-.802 3.479-2.035C17.857 20.283 20 18.379 20 16c0-.173-.012-.347-.035-.521C21.198 14.785 22 13.465 22 12s-.802-2.785-2.035-3.479zm-9.01 7.895-3.667-3.714 1.424-1.404 2.257 2.286 4.327-4.294 1.408 1.42-5.749 5.706z"],[2,"display","inline-flex","align-items","center","gap","8px","color","#B34646","background","none","text-decoration","underline","padding","0"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 21 20","fill","none"],["d","M10.4998 18.3333C15.1022 18.3333 18.8332 14.6024 18.8332 9.99999C18.8332 5.39762 15.1022 1.66666 10.4998 1.66666C5.89746 1.66666 2.1665 5.39762 2.1665 9.99999C2.1665 14.6024 5.89746 18.3333 10.4998 18.3333Z","fill","#B34646"],["d","M13 7.5L8 12.5M8 7.5L13 12.5","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M17.5 10C17.5 11.4834 17.0601 12.9334 16.236 14.1668C15.4119 15.4001 14.2406 16.3614 12.8701 16.9291C11.4997 17.4968 9.99168 17.6453 8.53683 17.3559C7.08197 17.0665 5.7456 16.3522 4.6967 15.3033C3.64781 14.2544 2.9335 12.918 2.64411 11.4632C2.35472 10.0083 2.50325 8.50032 3.07091 7.12987C3.63856 5.75943 4.59986 4.58809 5.83323 3.76398C7.0666 2.93987 8.51664 2.5 10 2.5C12.1 2.5 14.1083 3.33333 15.6167 4.78333L17.5 6.66667M17.5 6.66667V2.5M17.5 6.66667H13.3333","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"errortest-account","w-100"],["href","javascript:void(0);",3,"click"]],template:function(t,e){1&t&&(o.YNc(0,Cr,30,11,"main",0),o.YNc(1,wr,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf",e.translation),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[to.O5,to.mk,Xi._Y,Xi.JL,Xi.F,Xi.Fj,Xi.JJ,Xi.On,to.sg,to.RF,to.n9,to.ED,tr,po],pipes:[nr,to.uU],styles:[".nickname[_ng
1content-%COMP%]{color:#747474;font-size:14px;width:-moz-fit-content;width:fit-content;display:-webkit-box;-webkit-line-clamp:1;height:auto;overflow:hidden;-webkit-box-orient:vertical;text-align:start;max-width:100%;white-space:normal;word-break:break-all;cursor:pointer}.nickname[_ngcontent-%COMP%]:hover{color:#5371ff;text-decoration:underline}.add-new-account[_ngcontent-%COMP%]{border-radius:8px;border:1.5px solid var(--Primary-Color);background:#FFF;color:var(--Primary-Color);font-size:14px;font-weight:400;line-height:24px}.add-new-account[_ngcontent-%COMP%]:hover{background:var(--Primary-Color);color:#fff}.max-w-600[_ngcontent-%COMP%]{max-width:600px}.no-connects-wrap[_ngcontent-%COMP%]{background:#fff;box-shadow:none;padding:40px 0!important;flex-direction:column;border-radius:20px!important;grid-gap:20px!important;gap:20px!important}.user-connect-updated[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > b[_ngcontent-%COMP%]{color:var(--text-secondary);text-align:center;font-size:13px;font-weight:400;display:block;line-height:24px}.user-connect-updated[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:#1d1d1d;text-align:center;font-size:15px;font-weight:400;line-height:24px}.user-connect-footer[_ngcontent-%COMP%]{border-top:1px solid #E7E7EB;width:100%;flex:1;padding-top:1rem;text-align:center}.tooltip-top[_ngcontent-%COMP%]:before{bottom:30px;border-top-color:#000;top:auto;border-bottom-color:transparent}.tooltip-top[_ngcontent-%COMP%]:after{bottom:40px;top:auto;min-width:-moz-max-content;min-width:max-content}.user-connect-footer[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px;font-size:14px;width:100%;text-align:center;white-space:nowrap;justify-content:center}.user-connect-footer[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]:hover{background-color:#f2f7ff;color:#5371ff}.bottom-30[_ngcontent-%COMP%]:after{bottom:30px}.bottom-30[_ngcontent-%COMP%]:before{bottom:20px}.dropdowndelete[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{border:1px solid #B5CDE6;border-radius:8px;overflow:hidden;background:#FAFDFF;padding:.25rem}.user-connect-delete[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{background:#FAFDFF;color:#d81919;grid-gap:.25rem;gap:.25rem}.connectedAccounts-listed[_ngcontent-%COMP%]{display:grid;grid-template-rows:repeat(1,minmax(335px,min-content));grid-template-columns:repeat(auto-fill,minmax(335px,1fr));grid-auto-rows:auto}@media (max-width:767px){.max-w-600[_ngcontent-%COMP%]{max-width:100%;flex:1}.add-new-account[_ngcontent-%COMP%]{padding:10px;width:45px;height:45px;display:flex;align-items:center;justify-content:center}.no-connects-wrap[_ngcontent-%COMP%]   .block-content[_ngcontent-%COMP%]{margin-right:auto!important}}"]}),t})();var Ar={SHOW_ONBOARDING:!1,PLANID_MAP:{FREE_PLAN:"jc0fgwefcky2",PLATINUM_PLAN:"jc0fgwef1xxj",GOLD_PLAN:"jc0fgwef7o1u",SILVER_PLAN:"jc0fgwefc25i",BASIC_PLAN:"jc0fgwef10in",TRIAL_PLAN:"jc0fgwefcky3",BUSINESS_PLAN:"jc0fgwef1dcg",BUSINESS2_PLAN:"4xm1qx0lhbw0vk",PREMIUM_PLAN:"jc0fgwef7q2k",ENTERPRISE_PLAN:"jc0fgwfee7q3a",ENTERPRISE_2_PLAN:"jc0fgwfee7q4a",ENTERPRISE_3_PLAN:"jc0fgwfee7q5a",PROFESSIONAL_PLAN:"4xm0pwqlinSqd2",STANDARD_PLAN:"4xm0pwqlhvw0uj"}};let Zr=(()=>{class t{constructor(t){this.apiService=t}getPlansList(t){return this.apiService.request("post","payment/plans",t)}tryCommonPayment(t){return this.apiService.request("post","common_payment/try-commonpay",t)}upgradeCommonPayment(t){return this.apiService.request("post","common_payment/upgrade-commonpay",t)}createStripeCheckoutSession(t){return this.apiService.request("post","stripe-billing/create-checkout-session",t)}createStripePortalSession(t){return this.apiService.request("post","stripe-billing/create-portal-session",t)}createWalletTopupSession(t){return this.apiService.request("post","stripe-billing/create-wallet-topup-session",t)}addWalletFund(t){return this.apiService.request("post","stripe-billing/add-wallet-fund",t)}checkStripeCoupon(t){return this.apiService.request("post","stripe-billing/check-coupon",t)}billingOverview(t){return this.apiService.request("post","common_payment/billing-commonpay",t)}getAllCards(t){return this.apiService.request("post","payment/getAllCards",t)}addPaypalSubscription(t){return this.apiService.request("post","payment/addPaypalSubscription",t)}createPaymentByTokenNew(t){return this.apiService.request("post","payment/createPaymentByTokenNew",t)}createPaymentByToken(t){return this.apiService.request("post","payment/createPaymentByToken",t)}addMultipleCards(t){return this.apiService.request("post","payment/addMultipleCards",t)}getProductAmountSum(t){return this.apiService.request("post","payment/getproductamountsum",t)}getPaymentLog(t){return this.apiService.request("post","payment/getpaymentlog",t)}getCustomerStripeInfo(t,e){return this.apiService.request("post","payment/customerstripeinfo",{email:t,customerStripeId:e})}saveFeedbackInfo(t){return this.apiService.request("post","payment/saveFeedbackInfo",t)}cancelSubscription(t){return this.apiService.request("post","payment/cancelSubscription",t)}deleteCard(t){return this.apiService.request("post","payment/deleteCard",t)}makeDefualtCard(t){return this.apiService.request("post","payment/makeDefualtCard",t)}verifyCoupon(t){return this.apiService.request("post","payment/verifyCoupon",t)}checkAgreementId(t){return this.apiService.request("post","payment/checkAgreementId",t)}createPaymentByAggrementId(t){return this.apiService.request("post","payment/createPaymentByAggrementId",t)}redirectToPaypal(t){return this.apiService.request("post","payment/redirectToPaypal",t)}getStripeSession(t){return this.apiService.request("post","payment/getStripeSession",t)}getPaypalTryPlanData(){return this.apiService.request("get","/libs/templates/paypal/paypal_trial.html",{})}getPaypalSubscribePlanData(){return this.apiService.request("get","/libs/templates/paypal/paypal_subscription.html",{})}createStripePayment(t){return this.apiService.request("post","payment/createstripepayment",t)}getPlanDetail(t){return this.apiService.request("post","payment/plan",t)}updateCardOnStripe(t){return this.apiService.request("post","payment/updateCardOnStripe",t)}createStripeCustomer(t){return this.apiService.request("post","payment/createStripeCustomer",t)}addPaymentLog(t){return this.apiService.request("post","payment/addpaymentlog",t)}createTrialProduct(t){return this.apiService.request("post","payment/api",t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var kr=n(8117),Tr=n(1134),Or=n(2516),Mr=n(3446),Ir=n(8237),Sr=n(6648);class Pr{call(t,e){return e.subscribe(new Nr(t))}}class Nr extends Ir.L{constructor(t){super(t),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(t){this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(let n=0;n<e&&!this.hasFirst;n++){let e=t[n],i=(0,Sr.D)(this,e,e,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}}notifyNext(t,e,n,i,o){if(!this.hasFirst){this.hasFirst=!0;for(let t=0;t<this.subscriptions.length;t++)if(t!==n){let e=this.subscriptions[t];e.unsubscribe(),this.remove(e)}this.subscriptions=null}this.destination.next(e)}}var qr=n(6491),Ur=(n(1486),n(2941));new Ro.y(Ur.Z);var Er=n(1003),Fr=n(2611);function Dr(...t){const e=t[t.length-1];return"function"==typeof e&&t.pop(),(0,Mr.n)(t,void 0).lift(new Lr(e))}class Lr{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Jr(t,this.resultSelector))}}
1class Jr extends Er.L{constructor(t,e,n=Object.create(null)){super(t),this.iterators=[],this.active=0,this.resultSelector="function"==typeof e?e:null,this.values=n}_next(t){const e=this.iterators;(0,Ho.k)(t)?e.push(new Rr(t)):e.push("function"==typeof t[Fr.hZ]?new jr(t[Fr.hZ]()):new $r(this.destination,this,t))}_complete(){const t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(let n=0;n<e;n++){let e=t[n];e.stillUnsubscribed?this.destination.add(e.subscribe(e,n)):this.active--}}else this.destination.complete()}notifyInactive(){this.active--,0===this.active&&this.destination.complete()}checkIterators(){const t=this.iterators,e=t.length,n=this.destination;for(let r=0;r<e;r++){let e=t[r];if("function"==typeof e.hasValue&&!e.hasValue())return}let i=!1;const o=[];for(let r=0;r<e;r++){let e=t[r],s=e.next();if(e.hasCompleted()&&(i=!0),s.done)return void n.complete();o.push(s.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()}_tryresultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}class jr{constructor(t){this.iterator=t,this.nextResult=t.next()}hasValue(){return!0}next(){const t=this.nextResult;return this.nextResult=this.iterator.next(),t}hasCompleted(){const t=this.nextResult;return t&&t.done}}class Rr{constructor(t){this.array=t,this.index=0,this.length=0,this.length=t.length}[Fr.hZ](){return this}next(t){const e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}}hasValue(){return this.array.length>this.index}hasCompleted(){return this.array.length===this.index}}class $r extends Ir.L{constructor(t,e,n){super(t),this.parent=e,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Fr.hZ](){return this}next(){const t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(t,e,n,i,o){this.buffer.push(e),this.parent.checkIterators()}subscribe(t,e){return(0,Sr.D)(this,this.observable,this,e)}}var Br=n(9919),Hr=n(3972);function Qr(t){return e=>e.lift(new Yr(t))}class Yr{constructor(t){this.notifier=t}call(t,e){const n=new zr(t),i=(0,Sr.D)(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}class zr extends Ir.L{constructor(t){super(t),this.seenValue=!1}notifyNext(t,e,n,i,o){this.seenValue=!0,this.complete()}notifyComplete(){}}var Vr=n(3466),Gr=n(1143);function Wr(t,e){return n=>n.lift(new Kr(t,e))}class Kr{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new Xr(t,this.compare,this.keySelector))}}class Xr extends Er.L{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}var ts=n(9902);function es(...t){return e=>{let n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new ns(t,n))}}class ns{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new is(t,this.observables,this.project))}}class is extends Ir.L{constructor(t,e,n){super(t),this.observables=e,this.project=n,this.toRespond=[];const i=e.length;this.values=new Array(i);for(let o=0;o<i;o++)this.toRespond.push(o);for(let o=0;o<i;o++){let t=e[o];this.add((0,Sr.D)(this,t,t,o))}}notifyNext(t,e,n,i,o){this.values[n]=e;const r=this.toRespond;if(r.length>0){const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function os(t,e){return new Ro.y(e?n=>e.schedule(rs,0,{error:t,subscriber:n}):e=>e.error(t))}function rs({error:t,subscriber:e}){e.error(t)}class ss{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return(0,Tr.of)(this.value);case"E":return os(this.error);case"C":return(0,kr.c)()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new ss("N",t):ss.undefinedValueNotification}static createError(t){return new ss("E",void 0,t)}static createComplete(){return ss.completeNotification}}ss.completeNotification=new ss("C"),ss.undefinedValueNotification=new ss("N",void 0),n(5816),n(1992);const as=["*"],cs=["defaultDayTemplate"],ls=["content"];function ds(t,e){if(1&t&&o._UZ(0,"div",7),2&t){const t=e.currentMonth,n=e.selected,i=e.disabled,r=e.focused;o.Q6J("date",e.date)("currentMonth",t)("selected",n)("disabled",i)("focused",r)}}
1function us(t,e){if(1&t&&(o.TgZ(0,"div",12),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.xp6(1),o.hij(" ",e.i18n.getMonthLabel(t.firstDate)," ")}}function ps(t,e){if(1&t&&(o.TgZ(0,"div",9),o.YNc(1,us,2,1,"div",10),o._UZ(2,"ngb-datepicker-month",11),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),o.xp6(1),o.Q6J("month",t.firstDate)}}function hs(t,e){if(1&t&&o.YNc(0,ps,3,2,"div",8),2&t){const t=o.oxw();o.Q6J("ngForOf",t.model.months)}}function gs(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ngb-datepicker-navigation",13),o.NdJ("navigate",function(e){return o.CHM(t),o.oxw().onNavigateEvent(e)})("select",function(e){return o.CHM(t),o.oxw().onNavigateDateSelect(e)}),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("date",t.model.firstDate)("months",t.model.months)("disabled",t.model.disabled)("showSelect","select"===t.model.navigation)("prevDisabled",t.model.prevDisabled)("nextDisabled",t.model.nextDisabled)("selectBoxes",t.model.selectBoxes)}}function fs(t,e){}function ms(t,e){}function vs(t,e){if(1&t&&(o.TgZ(0,"div",5),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.i18n.getWeekLabel())}}function bs(t,e){if(1&t&&(o.TgZ(0,"div",6),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.Oqu(t)}}function xs(t,e){if(1&t&&(o.TgZ(0,"div",2),o.YNc(1,vs,2,1,"div",3),o.YNc(2,bs,2,1,"div",4),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.datepicker.showWeekNumbers),o.xp6(1),o.Q6J("ngForOf",t.viewModel.weekdays)}}function _s(t,e){if(1&t&&(o.TgZ(0,"div",11),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.xp6(1),o.Oqu(e.i18n.getWeekNumerals(t.number))}}function Cs(t,e){}function ws(t,e){if(1&t&&o.YNc(0,Cs,0,0,"ng-template",14),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.Q6J("ngTemplateOutlet",e.datepicker.dayTemplate)("ngTemplateOutletContext",t.context)}}function ys(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",12),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(3).doSelect(n),e.preventDefault()}),o.YNc(1,ws,1,2,"ng-template",13),o.qZA()}if(2&t){const t=e.$implicit;o.ekj("disabled",t.context.disabled)("hidden",t.hidden)("ngb-dp-today",t.context.today),o.Q6J("tabindex",t.tabindex),o.uIk("aria-label",t.ariaLabel),o.xp6(1),o.Q6J("ngIf",!t.hidden)}}function As(t,e){if(1&t&&(o.TgZ(0,"div",8),o.YNc(1,_s,2,1,"div",9),o.YNc(2,ys,2,9,"div",10),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw();o.xp6(1),o.Q6J("ngIf",e.datepicker.showWeekNumbers),o.xp6(1),o.Q6J("ngForOf",t.days)}}function Zs(t,e){1&t&&o.YNc(0,As,3,2,"div",7),2&t&&o.Q6J("ngIf",!e.$implicit.collapsed)}function ks(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ngb-datepicker-navigation-select",7),o.NdJ("select",function(e){return o.CHM(t),o.oxw().select.emit(e)}),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("date",t.date)("disabled",t.disabled)("months",t.selectBoxes.months)("years",t.selectBoxes.years)}}function Ts(t,e){1&t&&o._UZ(0,"div",0)}function Os(t,e){1&t&&o._UZ(0,"div",0)}function Ms(t,e){if(1&t&&(o.YNc(0,Ts,1,0,"div",9),o.TgZ(1,"div",10),o._uU(2),o.qZA(),o.YNc(3,Os,1,0,"div",9)),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2);o.Q6J("ngIf",n>0),o.xp6(2),o.hij(" ",i.i18n.getMonthLabel(t.firstDate)," "),o.xp6(1),o.Q6J("ngIf",n!==i.months.length-1)}}function Is(t,e){if(1&t&&o.YNc(0,Ms,4,3,"ng-template",8),2&t){const t=o.oxw();o.Q6J("ngForOf",t.months)}}const Ss=["ngbDatepickerDayView",""],Ps=["month"],Ns=["year"];function qs(t,e){if(1&t&&(o.TgZ(0,"option",5),o._uU(1),o.qZA()),2&t){const t=e.$implicit,n=o.oxw();o.Q6J("value",t),o.uIk("aria-label",n.i18n.getMonthFullName(t,null==n.date?null:n.date.year)),o.xp6(1),o.Oqu(n.i18n.getMonthShortName(t,null==n.date?null:n.date.year))}}function Us(t,e){if(1&t&&(o.TgZ(0,"option",5),o._uU(1),o.qZA()),2&t){const t=e.$implicit,n=o.oxw();o.Q6J("value",t),o.xp6(1),o.Oqu(n.i18n.getYearNumerals(t))}}const Es=["dialog"];function Fs(t){return parseInt(`${t}`,10)}function Ds(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function Ls(t){return null!=t}function Js(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function js(t){return(t||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});const Rs={animation:!0,transitionTimerDelayMs:5};let $s=(()=>{class t{constructor(){this.animation=Rs.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Bs=()=>{},{transitionTimerDelayMs:Hs}=Rs,Qs=new Map,Ys=(t,e,n,i)=>{let o=i.context||{};const r=Qs.get(e);if(r)switch(i.runningTransition){case"continue":return kr.E;case"stop":t.run(()=>r.transition$.complete()),o=Object.assign(r.context,o),Qs.delete(e)}const s=n(e,i.animation,o)||Bs;if(!i.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run(()=>s()),(0,Tr.of)(void 0).pipe(function(t){return e=>new Ro.y(n=>e.subscribe(e=>t.run(()=>n.next(e)),e=>t.run(()=>n.error(e)),()=>t.run(()=>n.complete())))}(t));const a=new fo.xQ,c=new fo.xQ,l=a.pipe(function(...t){return e=>(0,Hr.z)(e,(0,Tr.of)(...t))}(!0));
1Qs.set(e,{transition$:a,complete:()=>{c.next(),c.complete()},context:o});const d=function(t){const{transitionDelay:e,transitionDuration:n}=window.getComputedStyle(t);return 1e3*(parseFloat(e)+parseFloat(n))}(e);return t.runOutsideAngular(()=>{const n=(0,Or.R)(e,"transitionend").pipe(Qr(l),(0,hi.h)(({target:t})=>t===e));(function(...t){if(1===t.length){if(!(0,Ho.k)(t[0]))return t[0];t=t[0]}return(0,Mr.n)(t,void 0).lift(new Pr)})(zo(d+Hs).pipe(Qr(l)),n,c).pipe(Qr(l)).subscribe(()=>{Qs.delete(e),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let zs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Vs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Gs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({}),t})(),Ws=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Ks=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({}),t})();class Xs{constructor(t,e,n){this.year=Ds(t)?t:null,this.month=Ds(e)?e:null,this.day=Ds(n)?n:null}static from(t){return t instanceof Xs?t:t?new Xs(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)}after(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)}}function ta(t){return new Xs(t.getFullYear(),t.getMonth()+1,t.getDate())}function ea(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function na(){return new oa}let ia=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:na,token:t,providedIn:"root"}),t})(),oa=(()=>{class t extends ia{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=ea(t),o=!0,r=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":r+=n,i.setMonth(r),r%=12,r<0&&(r+=12);break;case"d":i.setDate(i.getDate()+n),o=!1;break;default:return t}return o&&i.getMonth()!==r&&i.setDate(0),ta(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=ea(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=ea(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return ta(new Date)}isValid(t){if(!(t&&Ds(t.year)&&Ds(t.month)&&Ds(t.day)&&0!==t.year))return!1;const e=ea(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();function ra(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function sa(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function aa(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function ca(t,e){const{minDate:n,maxDate:i,disabled:o,markDisabled:r}=e;return!(null==t||o||r&&r(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}let la=(()=>{class t{getMonthLabel(t){return`${this.getMonthFullName(t.month,t.year)} ${this.getYearNumerals(t.year)}`}getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}getWeekLabel(){return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:function(){return function(t){return new da(t)}(o.LFG(o.soG))},token:t,providedIn:"root"}),t})(),da=(()=>{class t extends la{constructor(t){super(),this._locale=t,this._monthsShort=(0,to.UT)(t,to.x.Standalone,to.Tn.Abbreviated),this._monthsFull=(0,to.UT)(t,to.x.Standalone,to.Tn.Wide)}getWeekdayLabel(t,e){const n=(0,to.Mn)(this._locale,to.x.Standalone,void 0===e?to.Tn.Short:e);return n.map((t,e)=>n[(e+1)%7])[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){const e=new Date(t.year,t.month-1,t.day);return(0,to.p6)(e,"fullDate",this._locale)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.soG))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),ua=(()=>{class t{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(Ds(t=Fs(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(Ds(t=Fs(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(ra(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(ra(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}},weekdays:t=>{const e=!0===t||!1===t?to.Tn.Short:t,n=!0!==t&&!1!==t||t;if(this._state.weekdayWidth!==e||this._state.weekdaysVisible!==n)return{weekdayWidth:e,weekdaysVisible:n}}},this._model$=new fo.xQ,this._dateSelect$=new fo.xQ,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:to.Tn.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe((0,hi.h)(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe((0,hi.h)(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&ra(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){ca(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null!=e&&!this._state.disabled&&(!this._state.firstDate||sa(this._state.firstDate,e))&&this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null!=n&&!this._state.disabled&&(ra(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&ca(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=Xs.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:o,focusVisible:r,disabled:s,outsideDays:a}=t;t.months.forEach(t=>{t.weeks.forEach(c=>{c.days.forEach(c=>{o&&(c.context.focused=o.equals(c.date)&&r),c.tabindex=!s&&o&&c.date.equals(o)&&o.month===t.number?0:-1,!0===s&&(c.context.disabled=!0),void 0!==i&&(c.context.selected=null!==i&&i.equals(c.date)),t.number!==c.date.month&&(c.hidden="hidden"===a||"collapsed"===a||n>1&&c.date.after(e[0].firstDate)&&c.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=aa(e.focusDate,e.minDate,e.maxDate),e.firstDate=aa(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focu
1sVisible"in t||"focusDate"in t&&(e.focusDate=aa(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=aa(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i=function(t,e,n,i,o){const{displayMonths:r,months:s}=n,a=s.splice(0,s.length);return Array.from({length:r},(n,i)=>{const r=Object.assign(t.getNext(e,"m",i),{day:1});if(s[i]=null,!o){const t=a.findIndex(t=>t.firstDate.equals(r));-1!==t&&(s[i]=a.splice(t,1)[0])}return r}).forEach((e,o)=>{null===s[o]&&(s[o]=function(t,e,n,i,o={}){const{dayTemplateData:r,minDate:s,maxDate:a,firstDayOfWeek:c,markDisabled:l,outsideDays:d,weekdayWidth:u,weekdaysVisible:p}=n,h=t.getToday();o.firstDate=null,o.lastDate=null,o.number=e.month,o.year=e.year,o.weeks=o.weeks||[],o.weekdays=o.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),o=new Xs(e.year,e.month,1),r=t.getWeekday(o)%i;return t.getPrev(o,"d",(i+r-n)%i)}(t,e,c),p||(o.weekdays.length=0);for(let g=0;g<t.getWeeksPerMonth();g++){let n=o.weeks[g];n||(n=o.weeks[g]={number:0,days:[],collapsed:!0});const f=n.days;for(let c=0;c<t.getDaysPerWeek();c++){0===g&&p&&(o.weekdays[c]=i.getWeekdayLabel(t.getWeekday(e),u));const n=new Xs(e.year,e.month,e.day),d=t.getNext(n),m=i.getDayAriaLabel(n);let v=!!(s&&n.before(s)||a&&n.after(a));!v&&l&&(v=l(n,{month:o.number,year:o.year}));let b=n.equals(h),x=r?r(n,{month:o.number,year:o.year}):void 0;null===o.firstDate&&n.month===o.number&&(o.firstDate=n),n.month===o.number&&d.month!==o.number&&(o.lastDate=n);let _=f[c];_||(_=f[c]={}),_.date=n,_.context=Object.assign(_.context||{},{$implicit:n,date:n,data:x,currentMonth:o.number,currentYear:o.year,disabled:v,focused:!1,selected:!1,today:b}),_.tabindex=-1,_.ariaLabel=m,_.hidden=!1,e=d}n.number=t.getWeekNumber(f.map(t=>t.date),c),n.collapsed="collapsed"===d&&f[0].date.month!==o.number&&f[f.length-1].date.month!==o.number}return o}(t,e,n,i,a.shift()||{}))}),s}(this._calendar,n,e,this._i18n,"dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t);e.months=i,e.firstDate=i[0].firstDate,e.lastDate=i[i.length-1].lastDate,"selectedDate"in t&&!ca(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const o=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,r=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||o)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,o=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,r=Array(o);for(let s=0;s<o;s++)r[s]=i+s;return r}(e.firstDate,e.minDate,e.maxDate)),("minDate"in t||"maxDate"in t||0===e.selectBoxes.months.length||o)&&(e.selectBoxes.months=function(t,e,n,i){if(!e)return[];let o=t.getMonths(e.year);if(n&&e.year===n.year){const t=o.findIndex(t=>t===n.month);o=o.slice(t)}if(i&&e.year===i.year){const t=o.findIndex(t=>t===i.month);o=o.slice(0,t+1)}return o}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},("arrows"===e.navigation||"select"===e.navigation)&&(r||o||"minDate"in t||"maxDate"in t||"disabled"in t)&&(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,e.firstDate,e.minDate),e.nextDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,e.lastDate,e.maxDate))}return e}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(ia),o.LFG(la))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();var pa=(()=>{return(t=pa||(pa={}))[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT",pa;var t})();let ha=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=to.Tn.Short}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:function(){return new t},token:t,providedIn:"root"}),t})();function ga(){return new ma}let fa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:ga,token:t,providedIn:"root"}),t})(),ma=(()=>{class t extends fa{fromModel(t){return t&&Ds(t.year)&&Ds(t.month)&&Ds(t.day)?{year:t.year,month:t.month,day:t.day}
1:null}toModel(t){return t&&Ds(t.year)&&Ds(t.month)&&Ds(t.day)?{year:t.year,month:t.month,day:t.day}:null}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),va=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.Rgc))},t.\u0275dir=o.lG2({type:t,selectors:[["ng-template","ngbDatepickerContent",""]]}),t})(),ba=(()=>{class t{constructor(t,e,n,i,r,s,a,c){this._service=t,this._calendar=e,this.i18n=n,this._elementRef=s,this._ngbDateAdapter=a,this._ngZone=c,this._controlValue=null,this._destroyed$=new fo.xQ,this._publicState={},this.navigate=new o.vpe,this.dateSelect=new o.vpe,this.onChange=t=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe(Qr(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe(Qr(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const o=t.selectedDate,s=t.focusDate,a=this.model?this.model.focusDate:null;this.model=t,ra(o,this._controlValue)&&(this._controlValue=o,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(o))),ra(s,a)&&a&&t.focusVisible&&this.focus(),r.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(t){this._service.focus(Xs.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe((0,Vr.q)(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(Xs.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=(0,Or.R)(this._contentEl.nativeElement,"focusin"),e=(0,Or.R)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;(0,Br.T)(t,e).pipe((0,hi.h)(({target:t,relatedTarget:e})=>!(Js(t,"ngb-dp-day")&&Js(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),Qr(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;sa(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case pa.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case pa.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=Xs.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ua),o.Y36(ia),o.Y36(la),o.Y36(ha),o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(fa),o.Y36(o.R0b))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(t,e,n){if(1&t&&o.Suo(n,va,7),2&t){let t;o.iGM(t=o.CRH())&&(e.contentTemplate=t.first)}}
1,viewQuery:function(t,e){if(1&t&&(o.Gf(cs,7),o.Gf(ls,7)),2&t){let t;o.iGM(t=o.CRH())&&(e._defaultDayTemplate=t.first),o.iGM(t=o.CRH())&&(e._contentEl=t.first)}},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],features:[o._Bn([{provide:Xi.JU,useExisting:(0,o.Gpc)(()=>t),multi:!0},ua]),o.TTD],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(t,e){if(1&t&&(o.YNc(0,ds,1,5,"ng-template",null,0,o.W1O),o.YNc(2,hs,1,1,"ng-template",null,1,o.W1O),o.TgZ(4,"div",2),o.YNc(5,gs,1,7,"ngb-datepicker-navigation",3),o.qZA(),o.TgZ(6,"div",4,5),o.YNc(8,fs,0,0,"ng-template",6),o.qZA(),o.YNc(9,ms,0,0,"ng-template",6)),2&t){const t=o.MAs(3);o.xp6(5),o.Q6J("ngIf","none"!==e.navigation),o.xp6(1),o.ekj("ngb-dp-months",!e.contentTemplate),o.xp6(2),o.Q6J("ngTemplateOutlet",(null==e.contentTemplate?null:e.contentTemplate.templateRef)||t),o.xp6(1),o.Q6J("ngTemplateOutlet",e.footerTemplate)}},directives:function(){return[to.O5,to.tP,Za,to.sg,Ca,wa]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),t})();var xa=(()=>{return(t=xa||(xa={}))[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",xa;var t})();let _a=(()=>{class t{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case xa.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case xa.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case xa.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case xa.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case xa.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case xa.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case xa.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case xa.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case xa.Enter:case xa.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ca=(()=>{class t{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){!t.context.disabled&&!t.hidden&&this.datepicker.onDateSelect(t.date)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(la),o.Y36(ba),o.Y36(_a),o.Y36(ua))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(t,e){1&t&&o.NdJ("keydown",function(t){return e.onKeyDown(t)})},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek small",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(o.YNc(0,xs,3,2,"div",0),o.YNc(1,Zs,1,1,"ng-template",1)),2&t&&(o.Q6J("ngIf",e.viewModel.weekdays.length>0),o.xp6(1),o.Q6J("ngForOf",e.viewModel.weeks))},directives:[to.O5,to.sg,to.tP],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),t})(),wa=(()=>{class t{constructor(t){this.i18n=t,this.navigation=pa,this.months=[],this.navigate=new o.vpe,this.select=new o.vpe}
1onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(la))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:8,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,e=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,n=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,i=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",t,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",n,"title",i,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"button",1),o.NdJ("click",function(t){return e.onClickPrev(t)}),o._UZ(2,"span",2),o.qZA(),o.qZA(),o.YNc(3,ks,1,4,"ngb-datepicker-navigation-select",3),o.YNc(4,Is,1,1,void 0,4),o.TgZ(5,"div",5),o.TgZ(6,"button",6),o.NdJ("click",function(t){return e.onClickNext(t)}),o._UZ(7,"span",2),o.qZA(),o.qZA()),2&t&&(o.xp6(1),o.Q6J("disabled",e.prevDisabled),o.xp6(2),o.Q6J("ngIf",e.showSelect),o.xp6(1),o.Q6J("ngIf",!e.showSelect),o.xp6(2),o.Q6J("disabled",e.nextDisabled))},directives:function(){return[to.O5,ka,to.sg]},styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),t})();"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const ya=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Aa(t){const e=Array.from(t.querySelectorAll(ya)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))n=t.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const e=this.offsetParent(t);n=this.offset(t,!1),e!==document.documentElement&&(i=this.offset(e,!1)),i.top+=e.clientTop,i.left+=e.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,e&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(t,e=!0){const n=t.getBoundingClientRect(),i=window.pageYOffset-document.documentElement.clientTop,o=window.pageXOffset-document.documentElement.clientLeft;let r={height:n.height||t.offsetHeight,width:n.width||t.offsetWidth,top:n.top+i,bottom:n.bottom+i,left:n.left+o,right:n.right+o};return e&&(r.height=Math.round(r.height),r.width=Math.round(r.width),r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r}positionElements(t,e,n,i){const[o="top",r="center"]=n.split("-"),s=i?this.offset(t,!1):this.position(t,!1),a=this.getAllStyles(e),c=parseFloat(a.marginTop),l=parseFloat(a.marginBottom),d=parseFloat(a.marginLeft),u=parseFloat(a.marginRight);let p=0,h=0;switch(o){case"top":p=s.top-(e.offsetHeight+c+l);break;case"bottom":p=s.top+s.height;break;case"left":h=s.left-(e.offsetWidth+d+u);break;case"right":h=s.left+s.width}switch(r){case"top":p=s.top;break;case"bottom":p=s.top+s.height-e.offsetHeight;break;case"left":h=s.left;break;case"right":h=s.left+s.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?h=s.left+s.width/2-e.offsetWidth/2:p=s.top+s.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(h)}px, ${Math.round(p)}px)`;const g=e.getBoundingClientRect(),f=document.documentElement,m=window.innerHeight||f.clientHeight,v=window.innerWidth||f.clientWidth;return g.left>=0&&g.top>=0&&g.right<=v&&g.bottom<=m}};let Za=(()=>{class t{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(la))},t.\u0275cmp=o.Xpm({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(t,e){2&t&&o.ekj("bg-primary",e.selected)("text-white",e.selected)("text-muted",e.isMuted())("outside",e.isMuted())("active",e.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:Ss,decls:1,vars:1,template:function(t,e){1&t&&o._uU(0),2&t&&o.Oqu(e.i18n.getDayNumerals(e.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),t})(),ka=(()=>{class t{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new o.vpe,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new Xs(this.date.year,Fs(t),1))}changeYear(t){this.select.emit(new Xs(Fs(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(la),o.Y36(o.Qsj))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(t,e){if(1&t&&(
1o.Gf(Ps,7,o.SBq),o.Gf(Ns,7,o.SBq)),2&t){let t;o.iGM(t=o.CRH())&&(e.monthSelect=t.first),o.iGM(t=o.CRH())&&(e.yearSelect=t.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:6,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,e=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,n=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,i=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,[["aria-label",t,"title",e,1,"custom-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",n,"title",i,1,"custom-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(t,e){1&t&&(o.TgZ(0,"select",0,1),o.NdJ("change",function(t){return e.changeMonth(t.target.value)}),o.YNc(2,qs,2,3,"option",2),o.qZA(),o.TgZ(3,"select",3,4),o.NdJ("change",function(t){return e.changeYear(t.target.value)}),o.YNc(5,Us,2,2,"option",2),o.qZA()),2&t&&(o.Q6J("disabled",e.disabled),o.xp6(2),o.Q6J("ngForOf",e.months),o.xp6(1),o.Q6J("disabled",e.disabled),o.xp6(2),o.Q6J("ngForOf",e.years))},directives:[to.sg,Xi.YN,Xi.Kr],styles:["ngb-datepicker-navigation-select>.custom-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),t})();new Date(1882,10,12),new Date(2174,10,25);let Ta=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez,Xi.u5]]}),t})(),Oa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({}),t})(),Ma=(()=>{class t{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return t.\u0275fac=function(e){return new(e||t)(o.LFG($s))},t.\u0275prov=o.Yz7({factory:function(){return new t(o.LFG($s))},token:t,providedIn:"root"}),t})();class Ia{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}const Sa=()=>{};let Pa=(()=>{class t{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):Sa}_adjustBody(t){const e=this._document.body,n=e.style.paddingRight,i=parseFloat(window.getComputedStyle(e)["padding-right"]);return e.style["padding-right"]=`${i+t}px`,()=>e.style["padding-right"]=n}_isPresent(t){const e=this._document.body.getBoundingClientRect();return window.innerWidth-(e.left+e.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const e=this._document.body;e.appendChild(t);const n=t.getBoundingClientRect().width-t.clientWidth;return e.removeChild(t),n}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(to.K0))},t.\u0275prov=o.Yz7({factory:function(){return new t(o.LFG(to.K0))},token:t,providedIn:"root"}),t})(),Na=(()=>{class t{constructor(t,e){this._el=t,this._zone=e}ngOnInit(){this._zone.onStable.asObservable().pipe((0,Vr.q)(1)).subscribe(()=>{Ys(this._zone,this._el.nativeElement,(t,e)=>{e&&js(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Ys(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.R0b))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(t,e){2&t&&(o.Tol("modal-backdrop"+(e.backdropClass?" "+e.backdropClass:"")),o.ekj("show",!e.animation)("fade",e.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class qa{close(t){}dismiss(t){}}class Ua{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,this._closed=new fo.xQ,this._dismissed=new fo.xQ,this._hidden=new fo.xQ,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Qr(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Qr(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():(0,Tr.of)(void 0);t.subscribe(()=>{const{nativeElement:t}=this._windowCmptRef.location;t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:t}=this._backdropCmptRef.location;t.parentNode.removeChild(t),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Dr(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Ea=(()=>{return(t=Ea||(Ea={}))[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",Ea;var t})();let Fa=(()=>{class t{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new fo.xQ,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new o.vpe,this.shown=new fo.xQ,this.hidden=new fo.xQ}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe((0,Vr.q)(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,e={animation:this.animation,runningTransition:"stop"},n=Dr(Ys(this._zone,t,()=>t.classList.remove("show"),e),Ys(this._zone,this._dialogEl.nativeElement,()=>{},e));return n.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),n}_show(){const t={animation:this.animation,runningTransition:"continue"};Dr(Ys(this._zone,this._elRef.nativeElement,(t,e)=>{e&&js(t),t.classList.add("show")},t),Ys(this._zone,this._dialogEl.nativeElement,()=>{},t)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{(0,Or.R)(t,"keydown").pipe(Qr(this._closed$),(0,hi.h)(t=>t.which===xa.Escape)).subscribe(t=>{this.keyboard?requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(Ea.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let e=!1;(0,Or.R)(this._dialogEl.nativeElement,"mousedown").pipe(Qr(this._closed$),(0,gi.b)(()=>e=!1),(0,ts.w)(()=>(0,Or.R)(t,"mouseup").pipe(Qr(this._closed$),(0,Vr.q)(1))),(0,hi.h)(({target:e})=>t===e)).subscribe(()=>{e=!0}),(0,Or.R)(t,"click").pipe(Qr(this._closed$)).subscribe(({target:n})=>{t===n&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!e&&this._zone.run(()=>this.dismiss(Ea.BACKDROP_CLICK))),e=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=Aa(t)[0];(e||n||t).focus()}}_restoreFocus(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&Ys(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(to.K0),o.Y36(o.SBq),o.Y36(o.R0b))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(t,e){if(1&t&&o.Gf(Es,7),2&t){let t;o.iGM(t=o.CRH())&&(e._dialogEl=t.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(t,e){2&t&&(o.uIk("aria-modal",!0)("aria-labelledby",e.ariaLabelledBy)("aria-describedby",e.ariaDescribedBy),o.Tol("modal d-block"+(e.windowClass?" "+e.windowClass:"")),o.ekj("fade",e.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:as,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,e){1&t&&(o.F$t(),o.TgZ(0,"div",0,1),o.TgZ(2,"div",2),o.Hsn(3),o.qZA(),o.qZA()),2&t&&o.Tol("modal-dialog"+(e.size?" modal-"+e.size:"")+(e.centered?" modal-dialog-centered":"")+(e.scrollable?" modal-dialog-scrollable":"")+(e.modalDialogClass?" "+e.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),Da=(()=>{class t{constructor(t,e,n,i,r,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._rendererFactory=r,this._ngZone=s,this._activeWindowCmptHasChanged=new fo.xQ,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRef
1s=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new o.vpe,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];((t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=(0,Or.R)(e,"focusin").pipe(Qr(n),(0,Uo.U)(t=>t.target));(0,Or.R)(e,"keydown").pipe(Qr(n),(0,hi.h)(t=>t.which===xa.Tab),es(t)).subscribe(([t,n])=>{const[i,o]=Aa(e);(n===i||n===e)&&t.shiftKey&&(o.focus(),t.preventDefault()),n===o&&!t.shiftKey&&(i.focus(),t.preventDefault())}),i&&(0,Or.R)(e,"click").pipe(Qr(n),es(t),(0,Uo.U)(t=>t[1])).subscribe(t=>t.focus())})})(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}open(t,e,n,i){const o=i.container instanceof HTMLElement?i.container:Ls(i.container)?this._document.querySelector(i.container):this._document.body,r=this._rendererFactory.createRenderer(null,null),s=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(r.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!o)throw new Error(`The specified modal container "${i.container||"body"}" was not found in the DOM.`);const c=new qa,l=this._getContentRef(t,i.injector||e,n,c,i);let d=!1!==i.backdrop?this._attachBackdrop(t,o):void 0,u=this._attachWindowComponent(t,o,l),p=new Ua(u,l,d,i.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(u),p.result.then(s,s),p.result.then(a,a),c.close=t=>{p.close(t)},c.dismiss=t=>{p.dismiss(t)},this._applyWindowOptions(u.instance,i),1===this._modalRefs.length&&r.addClass(this._document.body,"modal-open"),d&&d.instance&&(this._applyBackdropOptions(d.instance,i),d.changeDetectorRef.detectChanges()),u.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,e){let n=t.resolveComponentFactory(Na).create(this._injector);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(t,e,n){let i=t.resolveComponentFactory(Fa).create(this._injector,n.nodes);return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_applyWindowOptions(t,e){this._windowAttributes.forEach(n=>{Ls(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{Ls(e[n])&&(t[n]=e[n])})}_getContentRef(t,e,n,i,r){return n?n instanceof o.Rgc?this._createFromTemplateRef(n,i):function(t){return"string"==typeof t}(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,r):new Ia([])}_createFromTemplateRef(t,e){const n=t.createEmbeddedView({$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}});return this._applicationRef.attachView(n),new Ia([n.rootNodes],n)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new Ia([[e]])}_createFromComponent(t,e,n,i,r){const s=t.resolveComponentFactory(n),a=o.zs3.create({providers:[{provide:qa,useValue:i}],parent:e}),c=s.create(a),l=c.location.nativeElement;return r.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new Ia([[l]],c.hostView,c)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.z2F),o.LFG(o.zs3),o.LFG(to.K0),o.LFG(Pa),o.LFG(o.FYo),o.LFG(o.R0b))},t.\u0275prov=o.Yz7({factory:function(){return new t(o.LFG(o.z2F),o.LFG(o.gxx),o.LFG(to.K0),o.LFG(Pa),o.LFG(o.FYo),o.LFG(o.R0b))},token:t,providedIn:"root"}),t})(),La=(()=>
1{class t{constructor(t,e,n,i){this._moduleCFR=t,this._injector=e,this._modalStack=n,this._config=i}open(t,e={}){const n=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),e);return this._modalStack.open(this._moduleCFR,this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o._Vd),o.LFG(o.zs3),o.LFG(Da),o.LFG(Ma))},t.\u0275prov=o.Yz7({factory:function(){return new t(o.LFG(o._Vd),o.LFG(o.gxx),o.LFG(Da),o.LFG(Ma))},token:t,providedIn:"root"}),t})(),Ja=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:[La]}),t})(),ja=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Ra=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),$a=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Ba=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Ha=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Qa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),Ya=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})(),za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({}),t})();new o.OlP("live announcer delay",{providedIn:"root",factory:function(){return 100}});let Va=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})();const Ga=[zs,Vs,Gs,Ws,Ks,Ta,Oa,Ja,ja,Ra,$a,Ba,Ha,Qa,Ya,za,Va];let Wa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[Ga,zs,Vs,Gs,Ws,Ks,Ta,Oa,Ja,ja,Ra,$a,Ba,Ha,Qa,Ya,za,Va]}),t})();class Ka{}const Xa="*";function tc(t,e){return{type:7,name:t,definitions:e,options:{}}}function ec(t,e=null){return{type:4,styles:e,timings:t}}function nc(t,e=null){return{type:2,steps:t,options:e}}function ic(t){return{type:6,styles:t,offset:null}}function oc(t,e,n){return{type:0,name:t,styles:e,options:n}}function rc(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function sc(t,e,n=null){return{type:11,selector:t,animation:e,options:n}}function ac(t,e){return{type:12,timings:t,animation:e}}function cc(t){Promise.resolve(null).then(t)}class lc{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){cc(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class dc{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const o=this.players.length;0==o?cc(()=>
1this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==o&&this._onFinish()}),t.onDestroy(()=>{++n==o&&this._onDestroy()}),t.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){const t=this.players.reduce((t,e)=>null===t||e.totalTime>t.totalTime?e:t,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}const uc=function(t){return{dropdown:t}},pc=["*"];let hc=(()=>{class t{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=(0,o.Yz7)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),gc=(()=>{class t{constructor(){this.direction="down",this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1,this.isOpenChange=new o.vpe,this.isDisabledChange=new o.vpe,this.toggleClick=new o.vpe,this.counts=0,this.dropdownMenu=new Promise(t=>{this.resolveDropdownMenu=t})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const fc=[ic({height:0,overflow:"hidden"}),ec("220ms cubic-bezier(0, 0, 0.2, 1)",ic({height:"*",overflow:"hidden"}))];let mc=(()=>{class t{constructor(t,e,n,i,o){this._state=t,this.cd=e,this._renderer=n,this._element=i,this.isOpen=!1,this._factoryDropDownAnimation=o.build(fc),this._subscription=t.isOpenChange.subscribe(t=>{this.isOpen=t;const e=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),e&&!(0,Do.XA)()&&(this._renderer.addClass(e,"show"),(e.classList.contains("dropdown-menu-right")||e.classList.contains("dropdown-menu-end"))&&(this._renderer.setStyle(e,"left","auto"),this._renderer.setStyle(e,"right","0")),"up"===this.direction&&(this._renderer.setStyle(e,"top","auto"),this._renderer.setStyle(e,"transform","translateY(-101%)"))),e&&this._state.isAnimated&&this._factoryDropDownAnimation.create(e).play(),this.cd.markForCheck(),this.cd.detectChanges()})}get direction(){return this._state.direction}_contains(t){return this._element.nativeElement.contains(t)}ngOnDestroy(){this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(gc),o.Y36(o.sBO),o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(Ka))},t.\u0275cmp=o.Xpm({type:t,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:pc,decls:2,vars:9,consts:[[3,"ngClass"]],template:function(t,e){1&t&&(o.F$t(),o.TgZ(0,"div",0),o.Hsn(1),o.qZA()),2&t&&(o.ekj("dropup","up"===e.direction)("show",e.isOpen)("open",e.isOpen),o.Q6J("ngClass",o.VKq(7,uc,"down"===e.direction)))},directives:[to.mk],encapsulation:2,changeDetection:0}),t})(),vc=(()=>{class t{constructor(t,e,n,i,o,r,s){this._elementRef=t,this._renderer=e,this._viewContainerRef
1=n,this._cis=i,this._state=o,this._config=r,this.dropup=!1,this._isInlineOpen=!1,this._isDisabled=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._state.stopOnClickPropagation=this._config.stopOnClickPropagation,this._factoryDropDownAnimation=s.build(fc),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:gc,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}set autoClose(t){this._state.autoClose=t}get autoClose(){return this._state.autoClose}set isAnimated(t){this._state.isAnimated=t}get isAnimated(){return this._state.isAnimated}set insideClick(t){this._state.insideClick=t}get insideClick(){return this._state.insideClick}set isDisabled(t){this._isDisabled=t,this._state.isDisabledChange.emit(t),t&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(t){t?this.show():this.hide()}get isBs4(){return!(0,Do.XA)()}get _showInline(){return!this.container}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(t=>this.toggle(t))),this._subscriptions.push(this._state.isDisabledChange.pipe((0,hi.h)(t=>t)).subscribe(()=>this.hide())))}show(){if(!this.isOpen&&!this.isDisabled){if(this._showInline)return this._inlinedMenu||this._state.dropdownMenu.then(t=>{this._dropdown.attachInline(t.viewContainer,t.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._inlinedMenu&&this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),void this.playAnimation();this._state.dropdownMenu.then(t=>{const e=this.dropup||void 0!==this.dropup&&this.dropup;this._state.direction=e?"up":"down";const n=this.placement||(e?"top start":"bottom start");this._dropdown.attach(mc).to(this.container).position({attachment:n}).show({content:t.templateRef,placement:n}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){!this.isOpen||(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(t){return this.isOpen||!t?this.hide():this.show()}_contains(t){return this._elementRef.nativeElement.contains(t.target)||this._dropdown.instance&&this._dropdown.instance._contains(t.target)}navigationClick(t){const e=this._elementRef.nativeElement.querySelector(".dropdown-menu");if(!e)return;const n=this._elementRef.nativeElement.ownerDocument.activeElement,i=e.querySelectorAll(".dropdown-item");switch(t.keyCode){case 38:this._state.counts>0&&i[--this._state.counts].focus();break;case 40:this._state.counts+1<i.length&&(n.classList!==i[this._state.counts].classList?i[this._state.counts].focus():i[++this._state.counts].focus())}t.preventDefault()}ngOnDestroy(){for(const t of this._subscriptions)t.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){(0,Do.XA)()||(this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles())}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._inlinedMenu&&this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){const t=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right")||this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-end");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",t?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",t?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(o.s_b),o.Y36(jo.oj),o.Y36(gc),o.Y36(hc),o.Y36(Ka))},t.\u0275dir=o.lG2({type:t,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(t,e){1&t&&o.NdJ("keydown.arrowDown",function(t){return e.navigationClick(t)})("keydown.arrowUp",function(t){return e.navigationClick(t)}),2&t&&o.ekj("dropup",e.dropup)("open",e.isOpen)("show",e.isOpen&&e.isBs4)},inputs:{dropup:"dropup",autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen",placement:"placement",triggers:"triggers",container:"container"},outputs:{onShown:"onShown",onHidden:"onHidden",isOpenChange:"isOpenChange"},exportAs:["bs-dropdown"],features:[o._Bn([gc])]}),t})(),bc=(()=>{class t{constructor(t,e,n){t.resolveDropdownMenu({templateRef:n,viewContainer:e})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(gc),o.Y36(o.s_b),o.Y36(o.Rgc))},t.\u0275dir=o.lG2({type:t,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]}),t})(),xc=(()=>{class t{constructor(t,e,n,i,o){this._changeDetectorRef=t,this._dropdown=e,this._element=n,this._renderer=i,this._state=o,this.isOpen=!1,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(t=>{this.isOpen=t,t?(this._documentClickListener=this._renderer.listen("document","click",t=>{this._state.autoClose&&2!==t.button&&!this._element.nativeElement.contains(t.target)&&(!this._state.insideClick||!this._dropdown._contains(t))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(t=>this.isDisabled=t||void 0))}onClick(t){this._state.stopOnClickPropagation&&t.stopPropagation(),!this.isDisabled&&this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(const t of this._subscriptions)t.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(vc),o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(gc))},t.\u0275dir=o.lG2({type:t,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.onClick(t)}),2&t&&o.uIk("aria-haspopup",!0)("aria-expanded",e.isOpen)("disabled",e.isDisabled)},exportAs:["bs-dropdown-toggle"]}),t})(),_c=(()=>{class t{static forRoot(){return{ngModule:t,providers:[jo.oj,Lo.sA,gc]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})();const Cc=["dp"],wc=["dropdown"];
1function yc(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"span",12),o._uU(1," Tasks Consumed: "),o.TgZ(2,"span",16),o._uU(3),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(3),o.Oqu(t.currentUser.used_task+" / "+(t.currentUser.plan_details[0].custom_plans&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks?t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks:t.currentUser.plan_details[0].tasks))}}function Ac(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"span",12),o._uU(1," Tasks Consumed: "),o.TgZ(2,"span",16),o._uU(3),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(3),o.Oqu(t.currentUser.used_task+" / 200")}}function Zc(t,e){1&t&&(o.O4$(),o.kcU(),o._UZ(0,"li",17))}function kc(t,e){1&t&&(o.TgZ(0,"span",39),o.TgZ(1,"i",40),o._uU(2,"API"),o.qZA(),o.qZA())}function Tc(t,e){if(1&t&&(o.TgZ(0,"span",16),o._uU(1),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.AsE("",t.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free-t.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_left,"/",t.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free,"")}}function Oc(t,e){if(1&t&&(o.TgZ(0,"span",41),o._uU(1," Mindbody API Hits: "),o.YNc(2,Tc,2,2,"span",42),o.qZA()),2&t){const t=o.oxw(4);o.xp6(2),o.Q6J("ngIf",t.currentUser&&t.currentUser.plan_details[0]&&null!=t.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free&&0!=t.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free&&t.currentUser.plan_details[0].planName)}}function Mc(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"li",36),o.YNc(1,kc,3,0,"span",37),o.YNc(2,Oc,3,1,"span",38),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",t.shouldShowApiHits),o.xp6(1),o.Q6J("ngIf",t.shouldShowApiHits)}}const Ic=function(t){return{selected:t}};function Sc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",79),o.TgZ(1,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectStatus","","connectStatusText",e.translation.EVERYTHING,"connectStatusDisplayStat",!1)}),o._uU(2),o.qZA(),o.TgZ(3,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectStatus",!0,"connectStatusText",e.translation.SUCCESS,"connectStatusDisplayStat",!1)}),o._uU(4),o.qZA(),o.TgZ(5,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectStatus",!1,"connectStatusText",e.translation.FAILED,"connectStatusDisplayStat",!1)}),o._uU(6),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ic,t.selectedFilter===t.translation.EVERYTHING)),o.xp6(1),o.hij(" ",t.translation.EVERYTHING,""),o.xp6(1),o.Q6J("ngClass",o.VKq(8,Ic,t.selectedFilter===t.translation.SUCCESS)),o.xp6(1),o.hij(" ",t.translation.SUCCESS,""),o.xp6(1),o.Q6J("ngClass",o.VKq(10,Ic,t.selectedFilter===t.translation.FAILED)),o.xp6(1),o.hij(" ",t.translation.FAILED,"")}}function Pc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.TgZ(1,"div",80),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).showDatePicker()}),o._uU(2),o.qZA(),o.TgZ(3,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectDateValue","last_90_days","connectDateText",e.translation.LAST_90_DAYS,"connectDateDisplayStat",!1)}),o._uU(4),o.qZA(),o.TgZ(5,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectDateValue","last_30_days","connectDateText",e.translation.LAST_30_DAYS,"connectDateDisplayStat",!1)}),o._uU(6),o.qZA(),o.TgZ(7,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectDateValue","last_month","connectDateText",e.translation.LAST_MONTH,"connectDateDisplayStat",!1)}),o._uU(8),o.qZA(),o.TgZ(9,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectDateValue","last_week","connectDateText",e.translation.LAST_WEEK,"connectDateDisplayStat",!1)}),o._uU(10),o.qZA(),o.TgZ(11,"div",80),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.filterTaskHistory("connectDateValue","today","connectDateText",e.translation.TODAY,"connectDateDisplayStat",!1)}),o._uU(12),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(12,Ic,t.selectedFilter===t.translation.SELECT_DATE)),o.xp6(1),o.Oqu(t.translation.SELECT_DATE),o.xp6(1),o.Q6J("ngClass",o.VKq(14,Ic,t.selectedFilter===t.translation.LAST_90_DAYS)),o.xp6(1),o.hij(" ",t.translation.LAST_90_DAYS,""),o.xp6(1),o.Q6J("ngClass",o.VKq(16,Ic,t.selectedFilter===t.translation.LAST_30_DAYS)),o.xp6(1),o.hij(" ",t.translation.LAST_30_DAYS,""),o.xp6(1),o.Q6J("ngClass",o.VKq(18,Ic,t.selectedFilter===t.translation.LAST_MONTH)),o.xp6(1),o.hij(" ",t.translation.LAST_MONTH,""),o.xp6(1),o.Q6J("ngClass",o.VKq(20,Ic,t.selectedFilter===t.translation.LAST_WEEK)),o.xp6(1),o.hij(" ",t.translation.LAST_WEEK,""),o.xp6(1),o.Q6J("ngClass",o.VKq(22,Ic,t.selectedFilter===t.translation.TODAY)),o.xp6(1),o.hij(" ",t.translation.TODAY,"")}}function Nc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",88),o.NdJ("mouseenter",function(){const e=o.CHM(t).$implicit;return o.oxw(5).hoveredDate=e})("mouseleave",function(){return o.CHM(t),o.oxw(5).hoveredDate=null}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=e.focused,i=o.oxw(5);o.ekj("focused",n)("range",i.isRange(t))("faded",i.isHovered(t)||i.isInside(t)),o.xp6(1),o.hij(" ",t.day," ")}}function qc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",89),o.TgZ(1,"button",90),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).clearCal()}),o._uU(2,"Clear"),o.qZA(),o.TgZ(3,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).c
1ancelCal()}),o._uU(4,"Cancel"),o.qZA(),o.TgZ(5,"button",90),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).submitCal()}),o._uU(6,"Ok"),o.qZA(),o.qZA()}}function Uc(t,e){if(1&t){const t=o.EpF();o.ynx(0,82),o.TgZ(1,"ngb-datepicker",83,84),o.NdJ("dateSelect",function(e){return o.CHM(t),o.oxw(4).onDateSelection(e)}),o.qZA(),o.YNc(3,Nc,2,7,"ng-template",85,86,o.W1O),o.YNc(5,qc,7,0,"ng-template",null,87,o.W1O),o.BQk()}if(2&t){const t=o.MAs(4),e=o.MAs(6);o.xp6(1),o.Q6J("displayMonths",1)("dayTemplate",t)("footerTemplate",e)}}function Ec(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",43),o.TgZ(1,"div",44,45),o.TgZ(3,"div",46),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).showHideTaskFormData("connectTitleDisplayStat")}),o.TgZ(4,"button",47),o.O4$(),o.TgZ(5,"svg",48),o._UZ(6,"path",49),o._UZ(7,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"input",51),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).connectTitleSearchTxt=e})("input",function(){o.CHM(t);const e=o.oxw(3);return e.searchByIdNamefilterTaskHistory("connectId",e.connectTitleSearchTxt,"connectTitle",e.connectTitleSearchTxt)}),o.qZA(),o.TgZ(9,"button",52),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearSearchText()}),o.O4$(),o.TgZ(10,"svg",48),o._UZ(11,"path",53),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",54),o.TgZ(13,"div",55,45),o.TgZ(15,"div",56),o.TgZ(16,"span",57),o._uU(17,"Status:"),o.qZA(),o.TgZ(18,"button",58),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).showHideTaskFormData("connectStatusDisplayStat")}),o._uU(19),o.qZA(),o.qZA(),o.YNc(20,Sc,7,12,"div",59),o.qZA(),o.TgZ(21,"div",60),o.TgZ(22,"div",61,45),o.TgZ(24,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).showHideTaskFormData("connectDateDisplayStat")}),o._uU(25,"Sort by "),o.TgZ(26,"span",63),o._uU(27),o.qZA(),o.qZA(),o.YNc(28,Pc,13,24,"div",64),o.qZA(),o.YNc(29,Uc,7,3,"ng-container",65),o.qZA(),o.TgZ(30,"div",66),o.TgZ(31,"button",67),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearFilterTaskHistory()}),o.TgZ(32,"span",68),o._uU(33," Reset Filter"),o.qZA(),o.O4$(),o.TgZ(34,"svg",69),o._UZ(35,"path",70),o._UZ(36,"path",71),o._UZ(37,"path",72),o.qZA(),o.qZA(),o.kcU(),o.TgZ(38,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).reloadHistory()}),o.O4$(),o.TgZ(39,"svg",74),o._UZ(40,"path",75),o._UZ(41,"path",76),o._UZ(42,"path",77),o._UZ(43,"path",78),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("autoClose",!0),o.xp6(2),o.Q6J("ngClass",t.selectedTaskFormData.connectTitleDisplayStat?"default_text accordion-toggle":"default_text accordion-toggle collapsed"),o.xp6(5),o.Q6J("ngModel",t.connectTitleSearchTxt),o.xp6(10),o.Q6J("ngClass",t.selectedTaskFormData.connectStatusDisplayStat?"default_text_ status-btn accordion-toggle":"status-btn default_text_ accordion-toggle collapsed"),o.xp6(1),o.Oqu(t.selectedTaskFormData.connectStatusText),o.xp6(8),o.hij(" ",t.selectedTaskFormData.connectDateText,""),o.xp6(2),o.Q6J("ngIf",t.isDatePickerVisible)}}function Fc(t,e){if(1&t&&(o.TgZ(0,"div",111),o.TgZ(1,"div",112),o.TgZ(2,"div",113),o._UZ(3,"img",114),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(3),o.Q6J("src",t.app_details_action.image[1]?e.appyConfig.cdnMediaPath+t.app_details_action.image[1]:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function Dc(t,e){if(1&t&&(o.TgZ(0,"span",130),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij(" +",t.app_details_action.image.length-2," ")}}function Lc(t,e){if(1&t&&o._UZ(0,"img",114),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.Q6J("src",t.app_details_action.image[2]?e.appyConfig.cdnMediaPath+t.app_details_action.image[2]:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function Jc(t,e){if(1&t&&(o.TgZ(0,"div",111),o.TgZ(1,"div",112),o.TgZ(2,"div",113),o.YNc(3,Dc,2,1,"span",128),o.YNc(4,Lc,1,1,"img",129),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(3),o.Q6J("ngIf",t.app_details_action.image.length>3),o.xp6(1),o.Q6J("ngIf",3==t.app_details_action.image.length)}}function jc(t,e){1&t&&(o.TgZ(0,"span",131),o.TgZ(1,"span"),o._uU(2,"Success "),o.TgZ(3,"small",117),o._uU(4,"(Auto Replay)"),o.qZA(),o.qZA(),o.TgZ(5,"span",132),o.O4$(),o.TgZ(6,"svg",133),o._UZ(7,"path",134),o.qZA(),o.qZA(),o.qZA())}function Rc(t,e){1&t&&(o.TgZ(0,"span",135),o._uU(1,"Success"),o.qZA())}function $c(t,e){1&t&&(o.TgZ(0,"span",136),o._uU(1,"Failed"),o.qZA())}function Bc(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"Partial"),o.qZA())}function Hc(t,e){1&t&&o._UZ(0,"small")}
1function Qc(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.YNc(2,Hc,1,0,"small",33),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.hij(" Task(s): ",t.numberOfTask<10?"0"+t.numberOfTask:t.numberOfTask," "),o.xp6(1),o.Q6J("ngIf",void 0!==t.numberOfTask&&!t.numberOfMindbodyAPICalls)}}function Yc(t,e){if(1&t&&(o.TgZ(0,"span",138),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.hij(" Task(s): ",t.numberOfTask<10?"0"+t.numberOfTask:t.numberOfTask," ")}}function zc(t,e){if(1&t&&(o.TgZ(0,"strong"),o._uU(1),o.TgZ(2,"span",140),o._uU(3,"*"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij(" + ",t.numberOfFailedMindbodyAPICalls<10?"0"+t.numberOfFailedMindbodyAPICalls:t.numberOfFailedMindbodyAPICalls,"")}}function Vc(t,e){if(1&t&&(o.TgZ(0,"span",139),o._uU(1," Mindbody API Call(s): "),o.TgZ(2,"strong"),o._uU(3),o.qZA(),o.YNc(4,zc,4,1,"strong",33),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(3),o.Oqu(t.numberOfMindbodyAPICalls<10?"0"+t.numberOfMindbodyAPICalls:t.numberOfMindbodyAPICalls),o.xp6(1),o.Q6J("ngIf",t.numberOfFailedMindbodyAPICalls&&t.numberOfFailedMindbodyAPICalls>0)}}function Gc(t,e){1&t&&o._UZ(0,"small")}function Wc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1," View Less "),o.qZA()}}function Kc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(4).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function Xc(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span"),o._uU(1," Reason: You have reached the limit of your gifted Mindbody tasks. Please"),o.TgZ(2,"button",144),o.NdJ("click",function(){return o.CHM(t),o.oxw(7).upgradePlanForMindbodyError()}),o._uU(3,"upgrade"),o.qZA(),o._uU(4," to continue using Mindbody services. "),o.YNc(5,Wc,2,0,"button",145),o.YNc(6,Kc,4,1,"a",146),o.qZA()}if(2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(2),o.Q6J("disabled",e.isUpgradeButtonDisabled()),o.xp6(3),o.Q6J("ngIf",e.getProcessedMessage(t).length>70),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function tl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1," View More "),o.qZA()}}function el(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(4).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function nl(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.YNc(2,tl,2,0,"button",145),o.YNc(3,el,4,1,"a",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.hij(" Reason: ",e.getProcessedMessage(t).slice(0,70)+"..."," "),o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).length>70),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}const il=function(t){return{"line-normal":t}};function ol(t,e){if(1&t&&(o.TgZ(0,"strong",143),o.YNc(1,Xc,7,3,"span",33),o.YNc(2,nl,4,3,"span",33),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(3,il,e.isMessageShown(t._id))),o.xp6(1),o.Q6J("ngIf",e.isMessageShown(t._id)),o.xp6(1),o.Q6J("ngIf",!e.isMessageShown(t._id))}}function rl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Oqu(e.isMessageShown(t._id)?"View Less":"View More")}}function sl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}
1function al(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.YNc(2,rl,2,1,"button",145),o.YNc(3,sl,4,1,"a",146),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(4,il,e.isMessageShown(t._id))),o.xp6(1),o.hij(" Reason: ",e.isMessageShown(t._id)?e.getProcessedMessage(t):e.getProcessedMessage(t).slice(0,70)+"...",""),o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).length>70),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function cl(t,e){if(1&t&&(o.TgZ(0,"span",141),o.YNc(1,ol,3,5,"strong",142),o.YNc(2,al,4,6,"strong",142),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).includes("Please upgrade to continue using Mindbody services.")),o.xp6(1),o.Q6J("ngIf",!e.getProcessedMessage(t).includes("Please upgrade to continue using Mindbody services."))}}function ll(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(2,il,e.showFullMessage)),o.xp6(1),o.hij("Reason: ",e.getProcessedMessage(t),"")}}function dl(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(2,il,e.showFullMessage)),o.xp6(1),o.hij("",(null==t?null:t.messageSort)||""," ")}}function ul(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function pl(t,e){if(1&t&&(o.TgZ(0,"span",141),o.YNc(1,ll,2,4,"strong",142),o.YNc(2,dl,2,4,"strong",142),o.YNc(3,ul,4,1,"a",146),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngIf",!(null!=t&&t.status)),o.xp6(1),o.Q6J("ngIf",null==t?null:t.status),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function hl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1," View Less "),o.qZA()}}function gl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function fl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span"),o._uU(1," Reason: You have reached the limit of your gifted Mindbody tasks. Please "),o.TgZ(2,"button",144),o.NdJ("click",function(){return o.CHM(t),o.oxw(8).upgradePlanForMindbodyError()}),o._uU(3,"upgrade"),o.qZA(),o._uU(4," to continue using Mindbody services. "),o.YNc(5,hl,2,0,"button",145),o.YNc(6,gl,4,1,"a",146),o.qZA()}if(2&t){const t=o.oxw(4).$implicit,e=o.oxw(4);o.xp6(2),o.Q6J("disabled",e.isUpgradeButtonDisabled()),o.xp6(3),o.Q6J("ngIf",e.getProcessedMessage(t).length>50),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function ml(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1," View More "),o.qZA()}}function vl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function bl(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.YNc(2,ml,2,0,"button",145),o.YNc(3,vl,4,1,"a",146),o.qZA()),2&t){const t=o.oxw(4).$implicit,e=o.oxw(4);o.xp6(1),o.hij(" Reason: ",e.getProcessedMessage(t).slice(0,50)+"..."," "),o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).length>50),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function xl(t,e){if(1&t&&(o.TgZ(0,"strong",143),o.YNc(1,fl,7,3,"span",33),o.YNc(2,bl,4,3,"span",33),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(3,il,e.isMessageShown(t._id))),o.xp6(1),o.Q6J("ngIf",e.isMessageShown(t._id)),o.xp6(1),o.Q6J("ngIf",!e.isMessageShown(t._id))}}function _l(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",147),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(4).toggleMessage(e._id)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(4).$implicit,e=o.oxw(4);o.xp6(1),o.Oqu(e.isMessageShown(t._id)?"View Less":"View More")}}function Cl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(4).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}
1function wl(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.YNc(2,_l,2,1,"button",145),o.YNc(3,Cl,4,1,"a",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(4,il,e.isMessageShown(t._id))),o.xp6(1),o.hij(" Reason: ",e.isMessageShown(t._id)?e.getProcessedMessage(t):e.getProcessedMessage(t).slice(0,50)+"..."," "),o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).length>50),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function yl(t,e){if(1&t&&(o.TgZ(0,"span"),o.YNc(1,xl,3,5,"strong",142),o.YNc(2,wl,4,6,"strong",142),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngIf",e.getProcessedMessage(t).includes("Please upgrade to continue using Mindbody services.")),o.xp6(1),o.Q6J("ngIf",!e.getProcessedMessage(t).includes("Please upgrade to continue using Mindbody services."))}}function Al(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(2,il,e.showFullMessage)),o.xp6(1),o.hij("Reason: ",e.getProcessedMessage(t)," ")}}function Zl(t,e){if(1&t&&(o.TgZ(0,"strong",143),o._uU(1),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.Q6J("ngClass",o.VKq(2,il,e.showFullMessage)),o.xp6(1),o.hij("",(null==t?null:t.messageSort)||""," ")}}function kl(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",148),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).toggleMessageFullViewError(n._id,e)}),o._uU(1," View Full Error Message "),o.O4$(),o.TgZ(2,"svg",149),o._UZ(3,"path",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).$implicit;o.MGl("href","/app-error-messages/",t._id,"",o.LSH)}}function Tl(t,e){if(1&t&&(o.TgZ(0,"span"),o.YNc(1,Al,2,4,"strong",142),o.YNc(2,Zl,2,4,"strong",142),o.YNc(3,kl,4,1,"a",146),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf",!(null!=t&&t.status)),o.xp6(1),o.Q6J("ngIf",null==t?null:t.status),o.xp6(1),o.Q6J("ngIf",1!=t.status)}}function Ol(t,e){if(1&t&&(o.TgZ(0,"div",151),o.TgZ(1,"div",152),o.TgZ(2,"h2",153),o.TgZ(3,"button",154),o._uU(4," Comment "),o.qZA(),o.qZA(),o.TgZ(5,"div",155),o.TgZ(6,"div",156),o.YNc(7,yl,3,2,"span",33),o.YNc(8,Tl,4,3,"span",33),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4);o.Q6J("id","accordionFailureReason"+e),o.xp6(3),o.uIk("data-bs-target","#flush-failure-reason"+e)("aria-controls","flush-failure-reason"+e),o.xp6(2),o.Q6J("id","flush-failure-reason"+e),o.uIk("data-bs-parent","#accordionFailureReason"+e),o.xp6(2),o.Q6J("ngIf",i.getProcessedMessage(n).length>50),o.xp6(1),o.Q6J("ngIf",i.getProcessedMessage(n).length<=50)}}const Ml=function(t){return{"mindbody-width":t}};function Il(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",101),o.TgZ(1,"div",93),o.TgZ(2,"span",102),o._uU(3),o.qZA(),o.TgZ(4,"div",103),o.TgZ(5,"span",104),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).copyToClipboard(n.connectId,e)}),o._uU(6),o.TgZ(7,"button",105),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).copyToClipboard(n.connectId,e)}),o.O4$(),o.TgZ(8,"svg",106),o._UZ(9,"rect",107),o._UZ(10,"path",108),o._UZ(11,"path",109),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",110),o.TgZ(13,"div",111),o.TgZ(14,"div",112),o.TgZ(15,"div",113),o._UZ(16,"img",114),o.qZA(),o.qZA(),o.qZA(),o.YNc(17,Fc,4,1,"div",115),o.YNc(18,Jc,5,2,"div",115),o.qZA(),o.TgZ(19,"div",95),o.TgZ(20,"span",116),o._uU(21,"Last Update: "),o.qZA(),o.TgZ(22,"span"),o._uU(23),o.ALo(24,"date"),o.qZA(),o.TgZ(25,"span",117),o._uU(26),o.ALo(27,"date"),o.qZA(),o.qZA(),o.TgZ(28,"div",96),o.YNc(29,jc,8,0,"span",118),o.YNc(30,Rc,2,0,"span",119),o.YNc(31,$c,2,0,"span",120),o.YNc(32,Bc,2,0,"span",121),o.qZA(),o.TgZ(33,"div",122),o.YNc(34,Qc,3,2,"span",33),o.YNc(35,Yc,2,1,"span",123),o.YNc(36,Vc,5,2,"span",124),o.YNc(37,Gc,1,0,"small",33),o.qZA(),o.TgZ(38,"div",125),o.YNc(39,cl,3,2,"span",126),o.YNc(40,pl,4,3,"span",126),o.YNc(41,Ol,9,7,"div",127),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(3),o.Oqu(t.connect_trigger.connectTitle),o.xp6(3),o.hij("",t.connectId," "),o.xp6(10),o.Q6J("src",t.app_details_action.image[0]?n.appyConfig.cdnMediaPath+t.app_details_action.image[0]:n.appyConfig.cdnMediaPath+"connect.png",o.LSH),o.xp6(1),o.Q6J("ngIf",t.app_details_action.image[1]),o.xp6(1),o.Q6J("ngIf",t.app_details_action.image.length>2),o.xp6(5),o.hij("",o.Dn7(24,19,t._created_at,"MM-dd-yyyy","localTimezone"),","),o.xp6(3),o.Oqu(o.Dn7(27,23,t._created_at,"hh:mm a","localTimezone")),o.xp6(3),o.Q6J("ngIf",1==t.status&&"Task Successfully Executed during Auto Replay."==t.message),o.xp6(1),o.Q6J("ngIf",1==t.status&&"Task Successfully Executed during Auto Replay."!=t.message),o.xp6(1),o.Q6J("ngIf",0==t.status&&0==t.numberOfTask),o.xp6(1),o.Q6J("ngIf",0==t.status&&t.numberOfTask>0),o.xp6(1),o.Q6J("ngClass",o.VKq(27,Ml,t.numberOfMindbodyAPICalls)),o.xp6(1),o.Q6J("ngIf",void 0!==t.numberOfTask&&!t.numberOfMindbodyAPICalls),o.xp6(1),o.Q6J("ngIf",t.numberOfMindbodyAPICalls&&t.numberOfMindbodyAPICalls>0),o.xp6(1),o.Q6J("ngIf",t.numberOfMindbodyAPICalls&&t.numberOfMindbodyAPICalls>0),o.xp6(1),o.Q6J("ngIf",t.numberOfMindbodyAPICalls&&t.numberOfMindbodyAPICalls>0),o.xp6(2),o.Q6J("ngIf",n.getProcessedMessage(t).length>70),o.xp6(1),o.Q6J("ngIf",n.getProcessedMessage(t).length<=70),o.xp6(1),o.Q6J("ngIf",null==t?null:t.messageSort)}}function Sl(t,e){1&t&&(o.TgZ(0,"div",157),o.TgZ(1,"div",158),o._UZ(2,"span"),o.qZA(),o.qZA())}
1function Pl(t,e){if(1&t&&(o.TgZ(0,"div"),o.TgZ(1,"div",92),o.TgZ(2,"div",93),o.TgZ(3,"span"),o._uU(4,"Connect Name & ID "),o.qZA(),o.qZA(),o.TgZ(5,"div",94),o.TgZ(6,"span"),o._uU(7,"Apps"),o.qZA(),o.qZA(),o.TgZ(8,"div",95),o.TgZ(9,"span"),o._uU(10,"Last Update"),o.qZA(),o.qZA(),o.TgZ(11,"div",96),o.TgZ(12,"span"),o._uU(13),o.qZA(),o.qZA(),o.TgZ(14,"div",97),o.TgZ(15,"span"),o._uU(16,"Task / API consumption"),o.qZA(),o.qZA(),o.TgZ(17,"div",98),o.TgZ(18,"span"),o._uU(19,"Comments"),o.qZA(),o.qZA(),o.qZA(),o.YNc(20,Il,42,29,"div",99),o.YNc(21,Sl,3,0,"div",100),o.qZA()),2&t){const t=o.oxw(3);o.xp6(13),o.Oqu(t.translation.STATUS),o.xp6(7),o.Q6J("ngForOf",t.userTaskHistory),o.xp6(1),o.Q6J("ngIf",t.isLoadingMore)}}function Nl(t,e){1&t&&(o.TgZ(0,"div",159),o.TgZ(1,"div",160),o._UZ(2,"div",161),o.TgZ(3,"div",162),o._UZ(4,"div",163),o._UZ(5,"div",163),o._UZ(6,"div",163),o.qZA(),o.qZA(),o.TgZ(7,"div",160),o._UZ(8,"div",161),o.TgZ(9,"div",162),o._UZ(10,"div",163),o._UZ(11,"div",163),o._UZ(12,"div",163),o.qZA(),o.qZA(),o.TgZ(13,"p",164),o._uU(14,"No Task History Found!"),o.qZA(),o.qZA())}function ql(t,e){1&t&&(o.TgZ(0,"div",165),o.TgZ(1,"div",158),o._UZ(2,"span"),o.qZA(),o.qZA())}function Ul(t,e){if(1&t&&(o.TgZ(0,"div",3),o.TgZ(1,"div",4),o.TgZ(2,"div",5),o.TgZ(3,"div",6),o.TgZ(4,"section",7),o.TgZ(5,"div",8),o.TgZ(6,"div",9),o.TgZ(7,"h1",10),o._uU(8),o.qZA(),o.TgZ(9,"ul",11),o.TgZ(10,"li"),o.TgZ(11,"span",12),o.O4$(),o.TgZ(12,"svg",13),o._UZ(13,"path",14),o._UZ(14,"path",15),o.qZA(),o.qZA(),o.kcU(),o.TgZ(15,"span",12),o._uU(16," Connects: "),o.TgZ(17,"span",16),o._uU(18),o.qZA(),o.qZA(),o.qZA(),o._UZ(19,"li",17),o.TgZ(20,"li"),o.TgZ(21,"span",12),o.O4$(),o.TgZ(22,"svg",13),o._UZ(23,"path",18),o._UZ(24,"path",19),o._UZ(25,"path",20),o._UZ(26,"path",21),o._UZ(27,"path",22),o._UZ(28,"path",23),o._UZ(29,"path",24),o._UZ(30,"path",25),o._UZ(31,"path",26),o.qZA(),o.qZA(),o.YNc(32,yc,4,1,"span",27),o.YNc(33,Ac,4,1,"span",27),o.qZA(),o.YNc(34,Zc,1,0,"li",28),o.YNc(35,Mc,3,2,"li",29),o.qZA(),o.qZA(),o.kcU(),o.TgZ(36,"div",30),o.YNc(37,Ec,44,7,"div",31),o.qZA(),o.TgZ(38,"div",32),o.YNc(39,Pl,22,3,"div",33),o.YNc(40,Nl,15,0,"div",34),o.YNc(41,ql,3,0,"div",35),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(8),o.Oqu(t.translation.TASK_HISTORY),o.xp6(10),o.Oqu(t.currentUser.connect_data+" / "+t.currentUser.plan_details[0].connects),o.xp6(14),o.Q6J("ngIf","trialWithoutCC"!==t.currentUser.payment_status&&"trial"!==t.currentUser.payment_status),o.xp6(1),o.Q6J("ngIf","trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status),o.xp6(1),o.Q6J("ngIf",t.userTaskHistory.length>=0&&t.shouldShowApiHits||t.isFilterApplied||t.historyLogFilter.connectId),o.xp6(1),o.Q6J("ngIf",t.userTaskHistory.length>=0||t.isFilterApplied||t.historyLogFilter.connectId),o.xp6(2),o.Q6J("ngIf",t.userTaskHistory.length>0||t.isFilterApplied||t.historyLogFilter.connectId),o.xp6(2),o.Q6J("ngIf",t.userTaskHistory.length>0||t.isFilterApplied||t.historyLogFilter.connectId),o.xp6(1),o.Q6J("ngIf",0===t.userTaskHistory.length),o.xp6(1),o.Q6J("ngIf",t.filterLoader)}}const El=function(){return{WidthContainer:!1}};function Fl(t,e){if(1&t&&(o.TgZ(0,"main",1),o.YNc(1,Ul,42,10,"div",2),o.qZA()),2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.Q6J("ngClass",o.DdM(4,El)),o.xp6(1),o.Q6J("ngIf",t.userTaskHistory)}}let Dl=(()=>{class t{constructor(t,e,n,i,o,r,s,a,c){this.translatorService=t,this.cusService=e,this.router=n,this.commonService=i,this.customerConnectService=o,this.planService=r,this.cookieService=s,this.actRoute=a,this.calendar=c,this.dateFilter=null,this.appyConfig=go.N,this.hoveredDate=null,this.toDate=this.calendar.getToday(),this.fromDate=this.calendar.getPrev(this.toDate,"d",3),this.isMenuBarActive=!0,this.isDatePickerVisible=!1,this.addId=!0,this.trackall=!1,this.showFullMessage=!1,this.selectedFilter="All",this.currentSkipValue=0,this.isLoadingMore=!1,this.hasMoreData=!0,this.isSortedByDate=!1,this.isFilterApplied=!1,this.searchFilter=!1,this.isAlertShow=!1,this.resetCheckbox=!1,this.historyLogFilter={connectId:"",connectTitle:""},this.scrollbarOptions={theme:"minimal-dark",axis:"y",scrollEasing:"easeOut"}
1,this.showFullMessageMapFullViewError=new Set,this.showFullMessageMap={},this.copyToClipboard=function(t,e){e.stopPropagation();var n=function(){var e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();var n=document.execCommand("copy");return document.body.removeChild(e),n},i=e.target,o=function(t){i.classList.add("custom-options-tooltip"),i.classList.add("tooltip_custom-taskhistory"),i.classList.add("tooltip_custom-taskhistory-arrow"),i.setAttribute("data-tooltip",t),setTimeout(function(){i.classList.remove("custom-options-tooltip")},1100)};navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(t).then(function(){o("ID Copied!")}).catch(function(){o(n()?"ID Copied!":"Copy failed")}):o(n()?"ID Copied!":"Copy failed")},this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.currentUrl=this.router.url}get buttonText(){return this.showFullMessage?"View Less":"View More"}ngOnInit(){this.currentUser=this.cusService.GetCurrent(),("trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status)&&200===this.currentUser.used_task&&(this.isAlertShow=!0),this.hasMoreData=!0,this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.actRoute.params.subscribe(t=>{t.connectId?(this.historyLogFilter.connectId=t.connectId,this.userHistoryRedirect()):this.historyAction()})}selectedTaskLog(t){this.isAllSelected=this.userTaskHistory.every(t=>!0===t.Selected),this.checkedLogs=this.userTaskHistory.filter(t=>!0===t.Selected).length,this.checkedLogs===this.draftFilLim&&(this.isAllSelected=!0)}getCurrentUrl(){return this.router.url}showHideTaskFormData(t){this.selectedTaskFormData[t]=!this.selectedTaskFormData[t],this.isDatePickerVisible=!1}filterTaskHistory(t,e,n,i,o,r,s=!1){this.selectedFilter=i,this.dropdown&&this.dropdown.hide(),this.filterLoader=!0,this.isFilterApplied=!0,this.selectedTaskFormData[t]=e,this.selectedTaskFormData[n]=i,this.selectedTaskFormData[o]=r,this.addId=!0,"connectTitle"===n&&(this.connectTitleSearchTxt=i);let a=this.currentUrl.split("/"),c=a[a.length-1];a.length<3&&(c=""),"All"!==i&&(this.trackall=!1),this.connectTitleSearchTxt&&(c=this.connectTitleSearchTxt);var l={customerId:this.currentUser.customerId,connectId:c,status:"",connectDateValue:"",skip:0,limit:20};if(this.searchFilter){const t={$regex:this.searchFilterValue.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").trim(),$options:"i"};l.$or=[{connectId:t},{connectTitle:t}],delete l.connectId}""!==this.selectedTaskFormData.connectId&&(l.connectId=this.selectedTaskFormData.connectId),void 0!==this.connectTitleSearchTxt&&!this.connectTitleSearchTxt&&(c="",l.connectId=""),""!==this.selectedTaskFormData.connectStatus&&(l.status=this.selectedTaskFormData.connectStatus),"last_30_days"===this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="last_30_days"),"last_90_days"===this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="last_90_days"),"last_week"===this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="last_week"),"last_month"===this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="last_month"),"today"===this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="today"),null!=this.dateFilter&&"custom"==this.selectedTaskFormData.connectDateValue&&(l.connectDateValue="custom",l.fromDate=this.fromDate,l.toDate=this.toDate),this.customerConnectService.getUserTaskHistory(l).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[],this.currentSkipValue=20,this.isLoadingMore=!1,this.hasMoreData=!0,this.filterLoader=!1,this.isSortedByDate=!1})}clearFilterTaskHistory(){let t=this.currentUrl.split("/"),e=t[t.length-1];t.length<3&&(e=""),this.resetCheckbox&&(e=""),this.addId=!1,this.isFilterApplied=!1,this.dateFilter=null,this.isSortedByDate=!1,this.connectTitleSearchTxt=e,this.selectedFilter="All",localStorage.setItem("addId",JSON.stringify(this.addId)),this.selectedTaskFormData={connectId:e,connectTitle:this.translation.ALL,connectTitleDisplayStat:!1,connectStatus:"",connectStatusText:this.translation.EVERYTHING,connectStatusDisplayStat:!1,
1connectDateValue:"",connectDateText:"",connectDateDisplayStat:!1},this.searchFilter=!1,this.searchFilterValue="",this.customerConnectService.getUserTaskHistory({customerId:this.currentUser.customerId,connectId:e,skip:0,limit:20}).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[]})}reloadHistory(){this.filterLoader=!0,this.addId=!0;let t=this.currentUrl.split("/"),e=t[t.length-1];t.length<3&&(e=""),this.resetCheckbox&&(e=""),this.testloader=!0;var n={customerId:this.currentUser.customerId,connectId:e,status:"",connectDateValue:"",skip:0,limit:20};if(this.searchFilter){const t={$regex:this.searchFilterValue.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").trim(),$options:"i"};n.$or=[{connectId:t},{connectTitle:t}]}""!==this.selectedTaskFormData.connectId&&(n.connectId=this.selectedTaskFormData.connectId),!e&&!this.connectTitleSearchTxt&&(n.connectId=""),""!==this.selectedTaskFormData.connectStatus&&(n.status=this.selectedTaskFormData.connectStatus),"last_30_days"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_30_days"),"last_90_days"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_90_days"),"last_week"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_week"),"last_month"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_month"),"today"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="today"),"custom"===this.selectedTaskFormData.connectDateValue&&this.customCondition&&(n=this.customCondition),null!=this.dateFilter&&(n.connectDateValue="custom",n.fromDate=this.fromDate,n.toDate=this.toDate),n.skip=0,n.limit=20,this.testloader=!0,this.customerConnectService.getUserTaskHistory(n).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[],this.filterLoader=!1,this.testloader=!1}),this.hasMoreData=!0}historyAction(){this.selectedTaskFormData=void 0===this.translation?{connectId:"",connectTitle:"All",connectTitleDisplayStat:!1,connectStatus:"",connectStatusText:"All",connectStatusDisplayStat:!1,connectDateValue:"",connectDateText:"",connectDateDisplayStat:!1}:{connectId:"",connectTitle:this.translation.ALL,connectTitleDisplayStat:!1,connectStatus:"",connectStatusText:this.translation.EVERYTHING,connectStatusDisplayStat:!1,connectDateValue:"",connectDateText:this.translation.SELECT_DATE,connectDateDisplayStat:!1};const t={customerId:this.currentUser.customerId,skip:0,limit:20};this.testloader=!0,this.customerConnectService.getUserTaskHistory(t).subscribe(t=>{this.testloader=!1,this.historyLogFilter&&this.historyLogFilter.connectId?this.userHistoryRedirect():this.userTaskHistory=Array.isArray(t)?t:[]})}userHistoryRedirect(){const t=this.historyLogFilter;let e;this.selectedTaskFormData=void 0===this.translation?{connectId:"",connectTitle:"",connectTitleDisplayStat:!1,connectStatus:"",connectStatusText:"All",connectStatusDisplayStat:!1,connectDateValue:"",connectDateText:"",connectDateDisplayStat:!1}:{connectId:"",connectTitle:t.connectTitle,connectTitleDisplayStat:!1,connectStatus:"",connectStatusText:this.translation.EVERYTHING,connectStatusDisplayStat:!1,connectDateValue:"",connectDateText:this.translation.SELECT_DATE,connectDateDisplayStat:!1},e={},e.customerId=this.currentUser.customerId,e.skip=0,e.connectId=t.connectId,e.limit=20,this.testloader=!0,this.customerConnectService.getUserTaskHistory(e).subscribe(t=>{this.testloader=!1,this.userTaskHistory=Array.isArray(t)?t:[]})}formatConnectData(t){const e={},n={};null==t||t.userConnects.forEach((t,i)=>{const o=t.connectId;e[o]||(e[o]={},n[o]=[]),n[o].push(o),e[o].connectId=o,e[o].connectTitle=t.connectTitle,e[o].status=t.status,e[o].connectStatus=t.connectStatus,e[o]._created_at=t._created_at,e[o]._updated_at=t._updated_at,e[o].customConnect=t.customConnect,0===t.index?(e[o].triggerImage=t.triggerImage,e[o].triggerAppName=t.appName):1===t.index?(e[o].actionImage=t.actionImage,e[o].actionAppName=t.appName):t.index>1&&(e[o].lastActionImage=t.actionImage,e[o].lastActionAppName=t.appName)});const i=[];return Object.keys(e).forEach(t=>{e[t].totalApp=n[t].length,i.push(e[t])}),i}loadMoreUserTaskHistory(){let t=this.currentUrl.split("/"),e=t[t.length-1];t.length<3&&(e=""),this.addId||(e=""),this.trackall&&(e="");var n={customerId:this.currentUser.customerId,connectId:e,status:this.selectedTaskFormData.connectStatus,connectDateValue:"",skip:this.currentSkipValue,limit:10};if(this.searchFilter){const t={$regex:this.searchFilterValue.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").trim(),$options:"i"};n.$or=[{connectId:t},{connectTitle:t}]}""!==this.selectedTaskFormData.connectId&&(n.connectId=this.selectedTaskFormData.connectId),!this.connectTitleSearchTxt&&void 0!==this.connectTitleSearchTxt&&(e="",n.connectId=""),""!==this.selectedTaskFormData.connectStatus&&(n.status=this.selectedTaskFormData.connectStatus),"last_30_days"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_30_days"),"last_90_days"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_90_days"),"last_week"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_week"),"last_month"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="last_month"),"today"===this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="today"),"custom"===this.selectedTaskFormData.connectDateValue&&this.customCondition&&((n=this.customCondition).c
1onnectId=e,n.customerId=this.currentUser.customerId,n.skip=this.currentSkipValue),null!=this.dateFilter&&"custom"==this.selectedTaskFormData.connectDateValue&&(n.connectDateValue="custom",n.fromDate=this.fromDate,n.toDate=this.toDate),n.status=this.selectedTaskFormData.connectStatus,this.testloader=!0,this.customerConnectService.getUserTaskHistory(n).subscribe(t=>{var e;this.testloader=!1;const n=null==t?void 0:t.filter(t=>{var e;return!(null===(e=this.userTaskHistory)||void 0===e?void 0:e.some(e=>e._id===t._id))});this.userTaskHistory=null===(e=this.userTaskHistory)||void 0===e?void 0:e.concat(n),0===t.length&&this.hasMoreData?(this.hasMoreData=!1,this.isLoadingMore=!1):(this.currentSkipValue+=10,this.isLoadingMore=!1,this.hasMoreData=!0)})}isString(t){return typeof t}showDatePicker(){this.isSortedByDate=!0,this.isDatePickerVisible=!this.isDatePickerVisible}onDateSelection(t){this.fromDate||this.toDate?this.fromDate&&!this.toDate&&t.after(this.fromDate)?this.toDate=t:(this.toDate=null,this.fromDate=t):this.fromDate=t}isHovered(t){return this.fromDate&&!this.toDate&&this.hoveredDate&&t.after(this.fromDate)&&t.before(this.hoveredDate)}isInside(t){return this.toDate&&t.after(this.fromDate)&&t.before(this.toDate)}isRange(t){return t.equals(this.fromDate)||this.toDate&&t.equals(this.toDate)||this.isInside(t)||this.isHovered(t)}clearCal(){this.toDate=this.toDate,this.fromDate=this.toDate,this.dateFilter=null}cancelCal(){this.isDatePickerVisible=!1}submitCal(){null==this.toDate&&null==this.toDate&&(this.toDate=this.fromDate),null==this.fromDate&&null==this.fromDate&&(this.fromDate=this.fromDate);let t=this.currentUrl.split("/"),e=t[t.length-1];t.length<3&&(e="");const n={customerId:this.currentUser.customerId,connectId:e,status:"",connectDateValue:"custom",skip:0,limit:20,fromDate:this.fromDate,toDate:this.toDate};""!==this.selectedTaskFormData.connectId&&(n.connectId=this.selectedTaskFormData.connectId),""!==this.selectedTaskFormData.connectStatus&&(n.status=this.selectedTaskFormData.connectStatus),this.isDatePickerVisible=!1,this.customCondition=n,this.selectedTaskFormData.connectDateValue="custom";const i=this.formatDate(this.fromDate),o=this.formatDate(this.toDate);this.selectedTaskFormData.connectDateText=`${i} - ${o}`,this.dateFilter=this.selectedTaskFormData.connectDateText,this.filterLoader=!0,this.customerConnectService.getUserTaskHistory(n).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[],this.currentSkipValue=20,this.filterLoader=!1,this.isLoadingMore=!1,this.hasMoreData=!0})}toggleMessageFullViewError(t,e){window.open(`/app-error-messages/${t}`,"_blank"),e.preventDefault(),this.showFullMessageMapFullViewError.has(t)?this.showFullMessageMapFullViewError.delete(t):this.showFullMessageMapFullViewError.add(t)}toggleMessage(t){this.showFullMessageMap[t]=!this.showFullMessageMap[t]}isMessageShown(t){return this.showFullMessageMap[t]||!1}isMessageShownFullViewError(t){return this.showFullMessageMapFullViewError.has(t)}onScroll(t){(document.documentElement.scrollTop||document.body.scrollTop)+document.documentElement.offsetHeight>=document.documentElement.scrollHeight-5&&!this.isLoadingMore&&this.hasMoreData&&(this.isLoadingMore=!0,this.loadMoreUserTaskHistory())}onTouchMove(t){(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop)+window.innerHeight>=(document.documentElement.scrollHeight||document.body.scrollHeight)-5&&!this.isLoadingMore&&this.hasMoreData&&(this.isLoadingMore=!0,this.loadMoreUserTaskHistory())}loadData(){setTimeout(()=>{(document.documentElement.scrollTop||document.body.scrollTop)+document.documentElement.offsetHeight>=document.documentElement.scrollHeight&&!this.isLoadingMore&&this.hasMoreData&&(this.isLoadingMore=!0,this.loadMoreUserTaskHistory())},200)}onResize(t){this.loadData()}get shouldShowApiHits(){return this.currentUser&&this.currentUser.api_quota&&void 0!==this.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free&&0!==this.currentUser.api_quota.k40w4oiz0jwo11f3cegggc7s_free&&!0===this.currentUser.isMindbodyAccountConnected}clearSearchText(){this.resetCheckbox=!0,this.connectTitleSearchTxt="",this.searchFilter=!1,this.customerConnectService.getUserTaskHistory({customerId:this.currentUser.customerId,skip:0,limit:20,status:this.selectedTaskFormData.connectStatus}).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[],this.currentSkipValue=20,this.isLoadingMore=!1,this.hasMoreData=!0})}formatDate(t){return this.isFilterApplied=!0,`${t.day<10?`0${t.day}`:t.day} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.month-1]} '${t.year.toString().slice(-2)}`}sortBy(t){this.isSortedByDate="date"===t}searchByIdNamefilterTaskHistory(t,e,n,i){this.isFilterApplied=!0,this.isLoadingMore=!0,this.searchFilter=!0,this.searchFilterValue=e,this.connectTitleSearchTxt=e;let o=this.currentUrl.split("/"),r=o[o.length-1];o.length<3&&(r=""),("translation.ALL"===i||"All"===i)&&(this.trackall=!0,r=""),"All"!==i&&(this.trackall=!1),this.connectTitleSearchTxt&&(r=this.connectTitleSearchTxt);const s={customerId:this.currentUser.customerId,connectId:r,status:this.selectedTaskFormData.connectStatus,connectDateValue:"",skip:0,limit:20};if(e){const t={$regex:e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").trim(),$options:"i"};
1s.$or=[{connectId:t},{connectTitle:t}],delete s.connectId}this.customerConnectService.getUserTaskHistory(s).subscribe(t=>{this.userTaskHistory=Array.isArray(t)?t:[],this.isLoadingMore=!1})}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}getProcessedMessage(t){return((null==t?void 0:t.messageSort)||"").replace("Connect Error:","").replace("Error Response:","").trim()||"Unknown Error!"}isUpgradeButtonDisabled(){var t;return![Ar.PLANID_MAP.FREE_PLAN,Ar.PLANID_MAP.STANDARD_PLAN,Ar.PLANID_MAP.PROFESSIONAL_PLAN].includes((null===(t=this.currentUser)||void 0===t?void 0:t.planId)||Ar.PLANID_MAP.FREE_PLAN)}upgradePlanForMindbodyError(){let t=Object.assign({},this.currentUser);t.planId=Ar.PLANID_MAP.BUSINESS2_PLAN,this.upgradePlan(t)}upgradePlan(t){this.currentUser=this.cusService.GetCurrent(),this.customerInfo=this.currentUser,this.customerInfo.upgrade_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.planPeriod=t.paymentType,localStorage.setItem("planId",t.planId);const e=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),n=btoa(encodeURIComponent(e));this.cookieService.set("custPlan",n,1,"/");var i=localStorage.getItem("mode");"jnpl1uik645c878la4sp"==i?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=i,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(yo),o.Y36(ui.F0),o.Y36(wo.v),o.Y36(Fo),o.Y36(Zr),o.Y36(lo.N),o.Y36(ui.gz),o.Y36(ia))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-task-history"]],viewQuery:function(t,e){if(1&t&&(o.Gf(Cc,5),o.Gf(wc,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.datePicker=t.first),o.iGM(t=o.CRH())&&(e.dropdown=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("scroll",function(t){return e.onScroll(t)},!1,o.Jf7)("touchmove",function(t){return e.onTouchMove(t)},!1,o.Jf7)("resize",function(t){return e.onResize(t)},!1,o.Jf7)},decls:1,vars:1,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ng-class","toggleclass()","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],["id","main-container_","ng-class","toggleclass()","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],["class","dashboardpage",4,"ngIf"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","TasksHistoryLog",1,"dashboard-middle","clearfix","sectionpadding"],[1,"containerCustom","clearfix"],[1,"col-sm-12","mar-15-b"],[1,"h3"],[1,"d-flex","align-items-center","gap-3","flex-wrap","my-3","mobile-tasklist"],[1,"fw-semibold","text-color"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 15 15","fill","none"],["d","M6.00003 7.83772C6.26971 8.17052 6.61377 8.44589 7.00887 8.64515C7.40397 8.84441 7.84088 8.96291 8.28996 8.9926C8.73903 9.02228 9.18977 8.96247 9.61161 8.81722C10.0334 8.67197 10.4165 8.44467 10.7348 8.15074L12.6187 6.41177C13.1906 5.86514 13.5071 5.13303 13.4999 4.37311C13.4928 3.61318 13.1626 2.88626 12.5804 2.34889C11.9983 1.81152 11.2108 1.50671 10.3875 1.50011C9.56431 1.49351 8.7712 1.78564 8.17903 2.31358L7.09895 3.3048","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M9.00003 7.16228C8.73035 6.82948 8.3863 6.55411 7.99119 6.35485C7.59609 6.15559 7.15918 6.03709 6.7101 6.0074C6.26103 5.97772 5.81029 6.03753 5.38845 6.18278C4.96662 6.32804 4.58356 6.55533 4.26526 6.84926L2.3814 8.58823C1.80947 9.13486 1.493 9.86697 1.50015 10.6269C1.5073 11.3868 1.83751 12.1137 2.41965 12.6511C3.00179 13.1885 3.78928 13.4933 4.61252 13.4999C5.43575 13.5065 6.22886 13.2144 6.82103 12.6864L7.89483 11.6952","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],[1,"text-secondary","fw-normal"],[1,"vr"],["d","M1.25 3.75012H3.75","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M1.25 6.25H3.75","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M1.25 8.75012H3.75","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M1.25 11.2501H3.75","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M11.2501 1.25012H3.75006C3.05971 1.25012 2.50006 1.80977 2.50006 2.50012V12.5001C2.50006 13.1905 3.05971 13.7501 3.75006 13.7501H11.2501C11.9404 13.7501 12.5001 13.1905 12.5001 12.5001V2.50012C12.5001 1.80977 11.9404 1.25012 11.2501 1.25012Z","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M9.37503 1.25012V13.7501","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M9.37503 4.375H12.5","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M9.37503 7.50012H12.5","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["d","M9.37503 10.6251H12.5","stroke","CurrentColor","stroke-width","1.13646","stroke-linecap","round","stroke-linejoin","round"],["class","fw-semibold text-color ",4,"ngIf"],["class","vr",4,"ngIf"],["class","d-inline-flex align-items-center flex-wrap gap-1",4,"ngIf"],[1,"col-sm-12"],["class","task_history my-4 d-flex align-items-center justify-content-between gap-3 flex-wrap",4,"ngIf"],[1,"col-sm-12","taskshistorytable"],[4,"ngIf"],["class","no-task-history",4,"ngIf"],["class","outhLoader ng-hide","id","loader",4,"ngIf"],[1,"d-inline-flex","align-items-center","flex-wrap","gap-1"],["class","fw-bold text-color d-inline-flex align-items-center",4,"ngIf"],["class","fw-bold text-color",4,"ngIf"],[1,"fw-bold","text-color","d-inline-flex","align-items-center"],[1,"apiText","fst-normal"],[1,"fw-bold","text-color"],["class","text-secondary fw-normal",4,"ngIf"],[1,"task_history","my-4","d-flex","align-items-center","justify-content-between","gap-3","flex-wrap"],["dropdown","",1,"searchtask","position-relative",3,"autoClose"],["dropdown","bs-dropdown"],["dropdownToggle","",1,"position-relative",3,"ngClass","click"],[1,"searchtask-btn"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M12.8333 22.1667C17.988 22.1667 22.1667 17.988 22.1667 12.8333C22.1667 7.67868 17.988 3.5 12.8333 3.5C7.67868 3.5 3.5 7.67868 3.5 12.8333C3.5 17.988 7.67868 22.1667 12.8333 22.1667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M24.5001 24.5001L22.1667 22.1667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","text","name","connectTitleSearchTxt","id","connectTitleSearchTxt","placeholder","Search Tasks History",1,"form-control",3,"ngModel","ngModelChange","input"],[1,"searchtask-btn","right-left",3,"click"],["d","M21 7L7 21M7 7L21 21","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"d-flex","align-items-center","gap-2","gap-md-3","flex-wrap","justify-content-lg-between","xs-w-100"],["id","custom_drop_id2","dropdown","",1,"custon_drop"],[1,"align-items-center","d-flex","fs-6","fw-semibold","gap-1"],[1,"text-secondary"],["dropdownToggle","",3,"ngClass","click"],["id","statusselector","class","dropdown-menu",4,"dropdownMenu"],[1,"custon_drop","position-relative","d-flex","align-items-center","flex-wrap","me-auto"],["dropdown","",1,"align-items-center","d-flex","fs-6","fw-semibold","gap-1"],["dropdownToggle","",1,"accordion-toggle","btn","text-secondary","collapsed","sortby-btn",3,"click"],[1,"text-primary"],["id","date-picker","class","dropdown-menu end-0 start-auto",4,"dropdownMenu"],["class","custom-overlay",4,"ngIf"],[1,"item-reset","d-flex","align-items-center","gap-2"],["type","button",1,"btn","reset-filter-btn",3,"click"],[1,"d-none","d-md-inline-block"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg",1,"d-inline-block","d-md-none"],["d","M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055"],["d","m22 3-5 5"],["d","m17 3 5 5"],["type","button",1,"btn","reset-filter-btn","reloadbtn",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["d","M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"],["d","M3 3v5h5"],["d","M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"],["d","M16 16h5v5"],["id","statusselector",1,"dropdown-menu"],[1,"dropitem",3,"ngClass","click"],["id","date-picker",1,"dropdown-menu","end-0","
1start-auto"],[1,"custom-overlay"],["outsideDays","hidden",3,"displayMonths","dayTemplate","footerTemplate","dateSelect"],["dp",""],["class","ngbdp-day-custom"],["t",""],["footerTemplate",""],[1,"custom-day",3,"mouseenter","mouseleave"],[1,"align-items-center","d-flex","justify-content-between","w-100","gap-2","p-3"],[1,"btn","text-black","btn-outline-primary","rounded-pill","fw-semibold",3,"click"],[1,"btn","text-black","ms-auto","btn-primary","rounded-pill","fw-semibold",3,"click"],[1,"headconnectapp","text-start"],[1,"connectnameid"],[1,"connect"],[1,"lastupdate","text-md-center"],[1,"enable-disable","text-md-center"],[1,"task-consumed"],[1,"actions","task-actions","text-center"],["class","headconnectapp connectitemsapp text-start",4,"ngFor","ngForOf"],["class","col-xs-12 push-20-t push-20 ",4,"ngIf"],[1,"headconnectapp","connectitemsapp","text-start"],[1,"d-block","text-truncate","w-100","fw-semibold","text-color"],[1,"d-flex","align-items-center","gap-2","position-relative"],[1,"d-block","fw-normal","text-secondary",3,"click"],["type","button","data-tooltip","Copy ID",1,"btn","copyButton","custom-options-tooltip","end-auto","p-0","position-absolute","px-1","top-0",3,"click"],["width","22","height","22","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,""],["width","24","height","24","rx","5","fill","none",1,""],["d","M17.8287 9.59998H10.9715C10.2141 9.59998 9.6001 10.214 9.6001 10.9714V17.8285C9.6001 18.586 10.2141 19.2 10.9715 19.2H17.8287C18.5861 19.2 19.2001 18.586 19.2001 17.8285V10.9714C19.2001 10.214 18.5861 9.59998 17.8287 9.59998Z","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round",1,""],["d","M6.17148 14.4C5.41719 14.4 4.80005 13.7828 4.80005 13.0286V6.17142C4.80005 5.41713 5.41719 4.79999 6.17148 4.79999H13.0286C13.7829 4.79999 14.4 5.41713 14.4 6.17142","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round",1,""],[1,"connect","your_connects"],[1,"slelected-app"],[1,"item","item-2x","item-circle"],[1,"img-avatar","img-avatar48"],["alt","",3,"src"],["class","slelected-app",4,"ngIf"],[1,"d-inline","d-md-none"],[1,"d-block"],["class","fw-semibold  text-success rounded-2 text-start gap-1 py-1 px-2 justify-content-between bg_success d-inline-flex align-items-center",4,"ngIf"],["class","fw-semibold  text-success rounded-2 text-center py-1 px-2  bg_success",4,"ngIf"],["class","fw-semibold  text-danger rounded-2 text-center py-1 px-2 bg_failed",4,"ngIf"],["class","fw-semibold rounded-2 text-center py-1 px-2 bg_partial",4,"ngIf"],[1,"task-consumed",3,"ngClass"],["class","text-start d-block",4,"ngIf"],["class","text-start mb-1 d-block",4,"ngIf"],[1,"actions","task-actions"],["class","d-none d-xl-inline-flex",4,"ngIf"],["class","accordion accordion-flush mobile_accordion d-block d-xl-none",3,"id",4,"ngIf"],["class","numbercountapps",4,"ngIf"],["alt","",3,"src",4,"ngIf"],[1,"numbercountapps"],[1,"fw-semibold","text-success","rounded-2","text-start","gap-1","py-1","px-2","justify-content-between","bg_success","d-inline-flex","align-items-center"],["data-tooltip","Task completed during automatic retry",1,"custom-options-tooltip","success-auto-replay"],["xmlns","http://www.w3.org/2000/svg","width","17","height","18","viewBox","0 0 20 21","fill","none"],["d","M9.99984 13.8333V10.5M9.99984 7.16667H10.0082M18.3332 10.5C18.3332 15.1024 14.6022 18.8333 9.99984 18.8333C5.39746 18.8333 1.6665 15.1024 1.6665 10.5C1.6665 5.89763 5.39746 2.16667 9.99984 2.16667C14.6022 2.16667 18.3332 5.89763 18.3332 10.5Z","stroke","#28924B","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"fw-semibold","text-success","rounded-2","text-center","py-1","px-2","bg_success"],[1,"fw-semibold","text-danger","rounded-2","text-center","py-1","px-2","bg_failed"],[1,"fw-semibold","rounded-2","text-center","py-1","px-2","bg_partial"],[1,"text-start","d-block"],[1,"text-start","mb-1","d-block"],[1,"text-danger"],[1,"d-none","d-xl-inline-flex"],["class","fw-semibold text-secondary line-2",3,"ngClass",4,"ngIf"],[1,"fw-semibold","text-secondary","line-2",3,"ngClass"],[1,"btn","viewmoreBtn","underline-btn",3,"disabled","click"],["class","btn viewmoreBtn",3,"click",4,"ngIf"],["target","_blank","class","btn viewmoreBtn d-inline-flex align-items-center gap-2 view-full-error",3,"href","click",4,"ngIf"],[1,"btn","viewmoreBtn",3,"click"],["target","_blank",1,"btn","viewmoreBtn","d-inline-flex","align-items-center","gap-2","view-full-error",3,"href","click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 20 20","fill","none"],["d","M12.5 2.5H17.5M17.5 2.5V7.5M17.5 2.5L8.33333 11.6667M15 10.8333V15.8333C15 16.2754 14.8244 16.6993 14.5118 17.0118C14.1993 17.3244 13.7754 17.5 13.3333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V6.66667C2.5 6.22464 2.67559 5.80072 2.98816 5.48816C3.30072 5.17559 3.72464 5 4.16667 5H9.16667","stroke","#5371FF","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"accordion","accordion-flush","mobile_accordion","d-block","d-xl-none",3,"id"],[1,"accordion-item"],[1,"accordion-header"],["type","button","data-bs-toggle","collapse","aria-expanded","fal
1se",1,"accordion-button","collapsed"],[1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body","px-0","py-2"],[1,"col-xs-12","push-20-t","push-20"],[1,"loader-5"],[1,"no-task-history"],[1,"box-and-lines"],[1,"box"],[1,"lines"],[1,"line"],[1,"text"],["id","loader",1,"outhLoader","ng-hide"]],template:function(t,e){1&t&&o.YNc(0,Fl,2,5,"main",0),2&t&&o.Q6J("ngIf",e.translation)},directives:[to.O5,to.mk,vc,xc,Xi.Fj,Xi.JJ,Xi.On,bc,ba,to.sg],pipes:[to.uU],styles:[".custom-day.focused[_ngcontent-%COMP%]{background-color:#5371ff;color:#fff;border-radius:50}.custom-day.range[_ngcontent-%COMP%], .custom-day[_ngcontent-%COMP%]:hover{background-color:#5371ff;color:#fff;border-radius:50px}.custom-day.faded[_ngcontent-%COMP%]{background:#EEF1FF;border-radius:50px;color:#000}.custom-overlay[_ngcontent-%COMP%]{position:relative;z-index:9999}ngb-datepicker[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{padding:6px 16px;font-weight:500;font-size:14px}ngb-datepicker[_ngcontent-%COMP%]   .btn.btn-outline-primary[_ngcontent-%COMP%]:hover, ngb-datepicker[_ngcontent-%COMP%]   .btn.btn-outline-primary[_ngcontent-%COMP%]:focus{color:#fff!important}ngb-datepicker[_ngcontent-%COMP%]   .btn.btn-outline-primary[_ngcontent-%COMP%]{color:#0d6efd!important}ngb-datepicker[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]{background-color:#5371ff;color:#fff!important}.no-task-history[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:2rem;width:80%;min-height:40vh;margin-left:auto;margin-right:auto}.box-and-lines[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:1rem}.box[_ngcontent-%COMP%]{width:65px;height:65px;background-color:#dcefff;border-radius:10px;margin-right:1rem}.lines[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:.9rem;gap:.9rem}.line[_ngcontent-%COMP%]{width:65px;height:3.5px;background-color:#dcefff;border-radius:5px}.text[_ngcontent-%COMP%]{font-size:1.2rem;color:#666;text-align:center;margin-top:1.5rem}.no-task-history[_ngcontent-%COMP%]{background-color:#fff;padding:60px;border-radius:20px;width:100%}.no-task-history[_ngcontent-%COMP%]   .box-and-lines[_ngcontent-%COMP%]{background-color:#fff;padding:10px;margin-bottom:10px;border-radius:5px}.no-task-history[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{background-color:#fff;border-radius:5px;text-align:center}@media (max-width:767px){.no-task-history[_ngcontent-%COMP%]{padding:30px}}.selected-date-range[_ngcontent-%COMP%]{color:var(--Primary-Color);font-size:16px;font-weight:500;border:none;background:none;width:auto;text-align:start;padding:0 20px 0 0;height:auto;font-family:inherit;min-height:unset;line-height:normal}.text-primary[_ngcontent-%COMP%]{color:var(--Primary-Color)!important}.start-auto[_ngcontent-%COMP%]{left:auto!important}.end-auto[_ngcontent-%COMP%]{right:auto}.reloadbtn[_ngcontent-%COMP%]{width:40px;height:40px;flex:0 0 auto;padding:6px;font-size:20px}.reloadbtn[_ngcontent-%COMP%]:hover{background-color:var(--Primary-Color);color:#fff}@media (max-width: 767px){.reloadbtn[_ngcontent-%COMP%]{width:34px;height:34px;flex:0 0 auto;padding:6px;font-size:17px}}.fw-bold[_ngcontent-%COMP%]{font-weight:500!important}.alert-task[_ngcontent-%COMP%]{border-radius:14px;background:#01499D}.alert-task[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#fff;font-size:clamp(14px,2vw,17px);font-weight:500;margin-bottom:.25rem;line-height:clamp(17px,2vw,23px)}.alert-task[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#deedff;font-size:clamp(12px,2vw,14px);line-height:clamp(14px,2vw,18px);font-weight:400}.activate-now[_ngcontent-%COMP%]{color:#01499d;font-size:clamp(12px,2vw,14px);font-style:normal;font-weight:500;line-height:clamp(14px,2vw,18px);background-color:#fff;width:150px}.activate-now[_ngcontent-%COMP%]:hover{background:#f3f8ff}.activate-now[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transition:all .3s ease}.activate-now[_ngcontent-%COMP%]:hover   svg[_ngcontent-%COMP%]{transform:translate(6px)}@media (min-width: 1201px){.activate-now[_ngcontent-%COMP%]{padding:.7rem .9rem}}.underline-btn[_ngcontent-%COMP%]{text-decoration:underline;background:none;border:none;cursor:pointer;padding:0}.viewmoreBtn[_ngcontent-%COMP%]:focus{box-shadow:none}"]}),t})();const Ll=(()=>{function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t})();class Jl{constructor(t,e,n,i){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler
1=i}call(t,e){return e.subscribe(new jl(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))}}class jl extends Ir.L{constructor(t,e,n,i,o){super(t),this.absoluteTimeout=e,this.waitFor=n,this.withObservable=i,this.scheduler=o,this.action=null,this.scheduleTimeout()}static dispatchTimeout(t){const{withObservable:e}=t;t._unsubscribeAndRecycle(),t.add((0,Sr.D)(t,e))}scheduleTimeout(){const{action:t}=this;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(jl.dispatchTimeout,this.waitFor,this))}_next(t){this.absoluteTimeout||this.scheduleTimeout(),super._next(t)}_unsubscribe(){this.action=null,this.scheduler=null,this.withObservable=null}}function Rl(t,e=Bo){return function(t,e,n=Bo){return i=>{let o=function(t){return t instanceof Date&&!isNaN(+t)}(t),r=o?+t-n.now():Math.abs(t);return i.lift(new Jl(r,o,e,n))}}(t,os(new Ll),e)}var $l=n(8293);const Bl=function(t,e){return{"theme-bgcl border-0":t,btn_delete:e}};let Hl=(()=>{class t{constructor(t){this.bsModalRef=t,this.IsDelete=!1}ngOnInit(){this.onClose=new fo.xQ,this.onExit=new fo.xQ}confirmDeleteConnect(){this.onClose.next(!0),this.bsModalRef.hide()}exit(){this.bsModalRef.hide(),this.onExit.next(!0)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["ExitPagePopUp"]],decls:14,vars:6,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn",3,"click"],[1,"si","si-close"],[1,"modal-body","py-0"],[1,"text-start"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","link",1,"btn","btn-default","rounded-pill","btn_confirm",3,"ngClass","click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(4,"i",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"p"),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"div",6),o.TgZ(10,"a",7),o.NdJ("click",function(){return e.confirmDeleteConnect()}),o._uU(11,"Discard Changes"),o.qZA(),o.TgZ(12,"a",8),o.NdJ("click",function(){return e.exit()}),o._uU(13,"Continue"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(6),o.Oqu(e.modelContent),o.xp6(4),o.Q6J("ngClass",o.WLB(3,Bl,!e.IsDelete,e.IsDelete)))},directives:[to.mk],styles:[""]}),t})(),Ql=(()=>{class t{constructor(t){this.bsModalRef=t,this.connectTitle=""}ngOnInit(){this.onClose=new fo.xQ}renameConnect(){this.connectTitle&&this.connectTitle.trim().length>0&&(this.onClose.next(this.connectTitle.trim()),this.bsModalRef.hide())}skip(){this.onClose.next(null),this.bsModalRef.hide()}closePopup(){this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["RenameConnectPopup"]],decls:15,vars:1,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","aria-label","Close",1,"red-close-btn",3,"click"],[1,"modal-body","py-3"],[1,"text-start"],["type","text","placeholder","Enter connect name","maxlength","100",1,"form-control","mt-2",3,"ngModel","ngModelChange","keyup.enter"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","link",1,"btn","btn-default","rounded-pill","btn_confirm","theme-bgcl","border-0",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2,"Rename Your Connect"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.skip()}),o._uU(4," \xd7 "),o.qZA(),o.qZA(),o.TgZ(5,"div",3),o.TgZ(6,"div",4),o.TgZ(7,"p"),o._uU(8,"Would you like to rename your Connect?"),o.qZA(),o.TgZ(9,"input",5),o.NdJ("ngModelChange",function(t){return e.connectTitle=t})("keyup.enter",function(){return e.renameConnect()}),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",6),o.TgZ(11,"a",7),o.NdJ("click",function(){return e.skip()}),o._uU(12,"Skip"),o.qZA(),o.TgZ(13,"a",8),o.NdJ("click",function(){return e.renameConnect()}),o._uU(14,"Rename"),o.qZA(),o.qZA()),2&t&&(o.xp6(9),o.Q6J("ngModel",e.connectTitle))},directives:[Xi.Fj,Xi.nD,Xi.JJ,Xi.On],styles:[".red-close-btn[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;background:none;border:none;color:red;font-size:24px;font-weight:normal;cursor:pointer;line-height:1;padding:0 5px}.red-close-btn[_ngcontent-%COMP%]:hover{color:#8b0000}"]}
1),t})(),Yl=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.router=e}ngOnInit(){}redirectToUpgrade(){this.bsModalRef.hide(),this.router.navigate(["purchase"])}closePopup(){this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["enterprise-pop-up"]],inputs:{appNames:"appNames"},decls:15,vars:4,consts:[[1,"modal-header","border-0","pb-0","p-4","align-items-baseline"],[1,"fs-5","fw-bold","modal-title","text-color-primary","align-items-baseline"],["aria-label","Close",1,"btn","bg-transparent","border-0","btn_close_enterprice","rounded-circle","d-flex","justify-content-center","align-items-center","fs-5","px-2","py-1",3,"click"],["stroke","currentColor","fill","none","stroke-width","0","viewBox","0 0 24 24","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["d","M16.3394 9.32245C16.7434 8.94589 16.7657 8.31312 16.3891 7.90911C16.0126 7.50509 15.3798 7.48283 14.9758 7.85938L12.0497 10.5866L9.32245 7.66048C8.94589 7.25647 8.31312 7.23421 7.90911 7.61076C7.50509 7.98731 7.48283 8.62008 7.85938 9.0241L10.5866 11.9502L7.66048 14.6775C7.25647 15.054 7.23421 15.6868 7.61076 16.0908C7.98731 16.4948 8.62008 16.5171 9.0241 16.1405L11.9502 13.4133L14.6775 16.3394C15.054 16.7434 15.6868 16.7657 16.0908 16.3891C16.4948 16.0126 16.5171 15.3798 16.1405 14.9758L13.4133 12.0497L16.3394 9.32245Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21Z","fill","currentColor"],[1,"modal-body","pb-0","p-4"],[1,"mb-0"],[1,"testfetch-footer","text-md-end","py-4","rounded-3"],["type","link","href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team",1,"btn","btn-default","contact-cntinue"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.closePopup()}),o.O4$(),o.TgZ(4,"svg",3),o._UZ(5,"path",4),o._UZ(6,"path",5),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",6),o.TgZ(8,"p"),o._uU(9),o.qZA(),o.TgZ(10,"p",7),o._uU(11,"Contact our sales team to upgrade and discuss your requirement."),o.qZA(),o.qZA(),o.TgZ(12,"div",8),o.TgZ(13,"a",9),o._uU(14,"Contact Support"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.hij("Upgrade required to access ",e.appNames,""),o.xp6(7),o.lnq("",e.appNames," ",e.appNames.includes(",")?"are":"is"," exclusively for enterprise plan users. Your current plan doesn't include ",e.appNames.includes(",")?"these apps":"this app",". Upgrade to access it."))},styles:[".contact-cntinue[_ngcontent-%COMP%]{color:#fff;background-color:var(--Primary-Color);padding:10px 20px;border:1px solid transparent!important}.text-color-primary[_ngcontent-%COMP%]{color:var(--Primary-Color)}.btn_close_enterprice[_ngcontent-%COMP%]{flex:0 0 auto;font-size:11px;padding:5px}.contact-cntinue[_ngcontent-%COMP%]:hover, .contact-cntinue[_ngcontent-%COMP%]:focus{color:var(--Primary-Color)!important;background-color:#fff;border-color:var(--Primary-Color)!important}@media (max-width: 767px){.cdk-focus-trap-anchor[_ngcontent-%COMP%] + div[_ngcontent-%COMP%] > .modal-content[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px!important}}"]}),t})(),zl=(()=>{class t{constructor(t,e,n,i){this.bsModalRef=t,this.router=e,this.planService=n,this.cookieService=i}ngOnInit(){}redirectToUpgrade(){"jnpl1uik645c878la4sp"==localStorage.getItem("mode")&&localStorage.setItem("Upgrade","jnpl1uik645c878la4sp"),this.bsModalRef.hide(),this.planService.getPaymentLog({customerId:this.customerId}).subscribe(t=>{Array.isArray(t)&&t.length>0?(this.cookieService.delete("fromPurchasePage","/"),this.router.navigate(["plans"])):this.router.navigate(["purchase"])})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(ui.F0),o.Y36(Zr),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["get-paid-to-use"]],decls:39,vars:0,consts:[[1,"testfetch-main","getpaid"],[1,"block-header","testfetch-header","justify-content-end"],[1,"block-options"],["type","button","id","closebtnshow",3,"click"],[1,"si","si-close"],[1,"block-content","text-center","showTryblock"],[1,"testfetch-title","mb-3","text-black"],[1,"runtest-listingtry"],["src","/assets/images/moreconnect.svg"],["src","/assets/images/premiumapp.svg"],["src","/assets/images/time.png"],["src","/assets/images/premiumfeatures.png"],[1,"block-content","text-center","waitleaveus"],[1,"testfetch-title"],["src","/assets/images/wait.png","alt","","width","70"],[1,"testfetch-footer","mb-4"],["type","button","routerLink","purchase",1,"btn","btn-default","btn-default-pad","buyitbtn","showTryblock",3,"click"],["type","button","routerLink","plans",1,"btn","btn-default","btn-default-pad","buyitbtn","hideleaveup",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"ul",2),o.TgZ(3,"li"),o.TgZ(4,"button",3),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(5,"i",4),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(6,"div",5),o.TgZ(7,"h3",6),o._uU(8,"Upgrade Your Plan!"),o.qZA(),o.TgZ(9,"p"),o._uU(10,"Pick Standard, Professional, Business, or Enterprise as per your requirement."),o.qZA(),o.TgZ(11,"ul",7),o.TgZ(12,"li"),o._UZ(13,"img",8),o.TgZ(14,"span"),o._uU(15," Unlimited Connects"),o.qZA(),o.qZA(),o.TgZ(16,"li"),o._UZ(17,"img",9),o.TgZ(18,"span"),o._uU(19," Unlimited Premium Apps"),o.qZA(),o.qZA(),o.TgZ(20,"li"),o._UZ(21,"img",10),o.TgZ(22,"span"),o._uU(23," 5 Minutes or less than 1 Minute syn interval time"),o.qZA(),o.qZA(),o.TgZ(24,"li"),o._UZ(25,"img",11),o.TgZ(26,"span"),o._uU(27,"Premium Features - Multi-Step Integrations, Custom Integrations, Formatters, Premium Support and a lot more.."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(28,"div",12),o.TgZ(29,"h3",13),o._uU(30,"Wait! Don't Leave US"),o.qZA(),o._UZ(31,"img",14),o.TgZ(32,"p"),o._uU(33,"We do have free plan for you, which comes with 5 Connects, 200 Tasks, and 15 minutes Run Time interval. You can accept and explore Appy Pie Automate for free."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(34,"div",15),o.TgZ(35,"a",16),o.NdJ("click",function(){return e.redirectToUpgrade()}),o._uU(36,"Upgrade"),o.qZA(),o.TgZ(37,"a",17),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(38,"Get Free Plan Access"),o.qZA(),o.qZA())},directives:[ui.yS],styles:[""]}),t})(),Vl=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.router=e}ngOnInit(){}redirectToUpgrade(){this.bsModalRef.hide(),this.router.navigate(["plans"])}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-try-appy-pie-connect-free"]],decls:37,vars:0,consts:[[1,"testfetch-main"],[1,"block-header","testfetch-header"],[1,"block-options"],["type","button","id","closebtnshow",3,"click"],[1,"si","si-close"],[1,"block-content","text-center","showTryblock"],[1,"testfetch-title"],[1,"runtest-listingtry"],["src","/assets/images/moreconnect.svg"],["src","/assets/images/premiumapp.svg"],["src","/assets/images/time.png"],["src","/assets/images/premiumfeatures.png"],[1,"block-content","text-center","waitleaveus"],["src","/assets/images/wait.png","alt","","width","70"],[1,"testfetch-footer"],["type","button","routerLink","plans",1,"btn","btn-default","btn-default-pad","buyitbtn","showTryblock",3,"click"],["type","button","routerLink","plans",1,"btn","btn-default","btn-default-pad","buyitbtn","hideleaveup",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"ul",2),o.TgZ(3,"li"),o.TgZ(4,"button",3),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(5,"i",4),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(6,"div",5),o.TgZ(7,"h3",6),o._uU(8,"Try Appy Pie Automate free for 7 days!"),o.qZA(),o.TgZ(9,"ul",7),o.TgZ(10,"li"),o._UZ(11,"img",8),o.TgZ(12,"span"),o._uU(13,"More Connects - 40 Connects or Unlimited Connects"),o.qZA(),o.qZA(),o.TgZ(14,"li"),o._UZ(15,"img",9),o.TgZ(16,"span"),o._uU(17,"Premium Apps - 5 Premium or Unlimited Premium apps"),o.qZA(),o.qZA(),o.TgZ(18,"li"),o._UZ(19,"img",10),o.TgZ(20,"span"),o._uU(21,"Syn Interval Time - 5 Minutes or less than 1 Minute"),o.qZA(),o.qZA(),o.TgZ(22,"li"),o._UZ(23,"img",11),o.TgZ(24,"span"),o._uU(25,"Premium Features - Multi-Step Connects, Custom Connects, Formatters, Premium Support and many more.."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"div",12),o.TgZ(27,"h3",6),o._uU(28,"Wait! Don't Leave US"),o.qZA(),o._UZ(29,"img",13),o.TgZ(30,"p"),o._uU(31,"We do have free plan for you, which comes with 5 Connects, 200 Tasks, and 15 minutes Run Time interval. You can accept and explore Appy Pie Automate for free."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(32,"div",14),o.TgZ(33,"a",15),o.NdJ("click",function(){return e.redirectToUpgrade()}),o._uU(34,"Get started"),o.qZA(),o.TgZ(35,"a",16),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(36,"Get Free Plan Access"),o.qZA(),o.qZA())},directives:[ui.yS],styles:[""]}),t})();class Gl{constructor(t,e,n,i,o){this.center=t,this.radiusX=e,this.radiusY=n,this.startAngle=i,this.endAngle=o}}class Wl{static castToPoint(t){return t||Wl.initialize()}static initialize(t=0,e=0){return{x:t,y:e}}static copy(t){return Wl.initialize(t.x,t.y)}static isEqual(t,e){return t.x===e.x&&t.y===e.y}static sum(t,e){return{x:t.x+e.x,y:t.y+e.y}}static sub(t,e){return{x:t.x-e.x,y:t.y-e.y}}static div(t,e){return{x:t.x/e,y:t.y/e}}static mult(t,e){return{x:t.x*e,y:t.y*e}}static interpolatePoints(t,e,n){const i=1-n;return Wl.initialize(t.x*i+e.x*n,t.y*i+e.y*n)}static roundTo(t,e){return{x:Math.trunc(t.x/e)*e,y:Math.trunc(t.y/e)*e}}static hypotenuse(t,e){const n=e.x-t.x,i=e.y-t.y;return Math.abs(Math.sqrt(n*n+i*i))}static distance(t,e){const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}static getMinimum(t,e){return Wl.initialize(Math.min(t.x,e.x),Math.min(t.y,e.y))}static getMaximum(t,e){return Wl.initialize(Math.max(t.x,e.x),Math.max(t.y,e.y))}static matrixTransform(t,e){let n=Wl.initialize(t.x,t.y),i=e.getScreenCTM();if(i){const o=e.createSVGPoint();o.x=t.x,o.y=t.y,n=o.matrixTransform(i.inverse())}return n}static elementTransform(t,e){let n=Wl.initialize(t.x,t.y),i=e.getBoundingClientRect();return n=Wl.sub(n,Wl.initialize(i.left,i.top)),n}}class Kl{constructor(t=0,e=0){this.x=t,this.y=e}static fromPoint(t){return new Kl(t.x,t.y)}add(t){const e=Wl.sum(this,t);return Kl.fromPoint(e)}sub(t){const e=Wl.sub(this,t);return Kl.fromPoint(e)}subNumber(t){const e=Wl.sub(this,new Kl(t,t));return Kl.fromPoint(e)}div(t){const e=Wl.div(this,t);return Kl.fromPoint(e)}mult(t){const e=Wl.mult(this,t);return Kl.fromPoint(e)}matrixTransform(t){const e=Wl.matrixTransform(this,t);return Kl.fromPoint(e)}elementTransform(t){const e=Wl.elementTransform(this,t);return Kl.fromPoint(e)}}class Xl{static initialize(t=Wl.initialize(),e=Wl.initialize()){return{point1:t,point2:e}}static copy(t){return{point1:t.point1,point2:t.point2}}static hypotenuse(t){return Math.sqrt(Math.pow(t.point1.x-t.point2.x,2)+Math.pow(t.point1.y-t.point2.y,2))}}class td{constructor(t,e){this.point1=t,this.point2=e}}class ed{static initialize(t=0,e=0,n=0,i=0){return n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),{x:t,y:e,width:n,height:i,gravityCenter:Wl.initialize(t+n/2,e+i/2)}}static copy(t){return ed.initialize(t.x,t.y,t.width,t.height)}static fromElement(t){const{x:e,y:n,width:i,height:o}=t.getBoundingClientRect();return ed.initialize(e,n,i,o)}static isIncludePoint(t,e){return e.x>=ed.left(t)&&e.x<=ed.right(t)&&e.y>=ed.top(t)&&e.y<=ed.bottom(t)}static intersectionWithRect(t,e){return!(t.x+t.width<e.x||e.x+e.width<t.x||t.y+t.height<e.y||e.y+e.height<t.y)}static left(t){return t.x}static top(t){return t.y}static right(t){return t.x+t.width}static bottom(t){return t.y+t.height}static addPoint(t,e){const n=ed.copy(t);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(t,e){const n=ed.copy(t);return n.x*=e,n.y*=e,n.width*=e,n.height*=e,this.initialize(n.x,n.y,n.width,n.height)}static div(t,e){const n=ed.copy(t);return n.x/=e,n.y/=e,n.width/=e,n.height/=e,this.initialize(n.x,n.y,n.width,n.height)}static addPointToSize(t,e){const n=ed.copy(t);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(t){return t&&0!==t.length?t.reduce((t,e)=>{const n=Math.min(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.x+t.width,e.x+e.width),r=Math.max(t.y+t.height,e.y+e.height);return ed.initialize(n,i,o-n,r-i)},t[0]):null}static elementTransform(t,e){const n=e.getBoundingClientRect(),i=Wl.sub(t,Wl.initialize(n.left,n.top));return ed.initialize(i.x,i.y,t.width,t.height)}static updateIsNotFinite(t){return Number.isFinite(t.width)&&Number.isFinite(t.height)&&Number.isFinite(t.x)&&Number.isFinite(t.y)?t:ed.initialize(0,0,0,0)}}class nd{constructor(t=0,e=0,n=0,i=0,o=0,r=0,s=0,a=0){this.x=t,this.y=e,this.width=n,this.height=i,this.radius1=o,this.radius2=r,this.radius3=s,this.radius4=a,this.gravityCenter=Wl.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(t){return new Kl(t.x+t.width/2,t.y+t.height/2)}static fromRect(t){return new nd(t.x,t.y,t.width,t.height)}static fromRoundedRect(t){return new nd(t.x,t.y,t.width,t.height,t.radius1,t.radiu
1s2,t.radius3,t.radius4)}static fromCenter(t,e,n){return new nd(t.gravityCenter.x-e/2,t.gravityCenter.y-n/2,e,n,t.radius1,t.radius2,t.radius3,t.radius4)}static fromPoint(t){return new nd(t.x,t.y)}addPoint(t){const e=nd.fromRoundedRect(this);return e.x+=t.x,e.y+=t.y,e.gravityCenter=this.calculateGravityCenter(e),e}}class id{static initialize(t=0,e=0){return{width:t,height:e}}static isEqual(t,e){return t.width===e.width&&t.height===e.height}static offsetFromElement(t){if(t instanceof SVGGraphicsElement){const e=t.getBBox();return id.initialize(e.width,e.height)}if(t instanceof HTMLElement)return id.initialize(t.offsetWidth,t.offsetHeight)}}class od{static toString(t){const e=Wl.sum(t.position,t.scaledPosition);return`matrix(${t.scale}, 0, 0, ${t.scale}, ${e.x}, ${e.y})`}static fromString(t){return function(t){let e;if(t){const n=(t=(t=t.replace("matrix(","")).replace(")","")).split(" ");e={position:{x:Number(n[4]),y:Number(n[5])},scaledPosition:Wl.initialize(),scale:Number(n[0]),rotate:0}}return e}(t)}static default(){return{position:Wl.initialize(),scaledPosition:Wl.initialize(),scale:1,rotate:0}}}class rd{static initialize(t=0,e=0){return Wl.initialize(t,e)}static fromPoints(t,e){return rd.initialize(e.x-t.x,e.y-t.y)}static vectorLength(t){return Math.sqrt(rd.magnitudeSquared(t))}static magnitudeSquared(t){return t.x*t.x+t.y*t.y}static dotProduct(t,e){return t.x*e.x+t.y*e.y}static crossProduct(t,e){return t.x*e.y-t.y*e.x}static subtract(t,e){return rd.initialize(t.x-e.x,t.y-e.y)}static add(t,e){return rd.initialize(t.x+e.x,t.y+e.y)}static scale(t,e){return rd.initialize(t.x*e,t.y*e)}static angle(t,e){const n=Math.acos(Math.max(-1,Math.min(rd.dotProduct(t,e)/(rd.vectorLength(t)*rd.vectorLength(e)),1)));return rd.crossProduct(t,e)<0?-n:n}}class sd{static getRoundedRectIntersections(t,e,n){const i=class{static parseRoundedRect(t){const e=.5*Math.PI,n=t.x,i=t.y,o=t.x+t.width,r=t.y+t.height,s=t.x+t.radius1,a=t.y+t.radius1,c=t.x+t.width-t.radius2,l=t.y+t.radius2,d=t.x+t.width-t.radius3,u=t.y+t.height-t.radius3,p=t.x+t.radius4,h=t.y+t.height-t.radius4;return[new Gl({x:s,y:a},t.radius1,t.radius1,2*e,3*e),new td({x:s,y:i},{x:c,y:i}),new Gl({x:c,y:l},t.radius2,t.radius2,3*e,4*e),new td({x:o,y:l},{x:o,y:u}),new Gl({x:d,y:u},t.radius3,t.radius3,0,e),new td({x:d,y:r},{x:p,y:r}),new Gl({x:p,y:h},t.radius4,t.radius4,e,2*e),new td({x:n,y:h},{x:n,y:a})]}}.parseRoundedRect(n);for(const o of i)if(o instanceof Gl){const n=this.intersectArcWithLine(o,t,e);if(n.length>0)return n}else if(o instanceof td){const n=this.intersectLineSegments(t,e,o.point1,o.point2);
1if(n)return[n]}return[]}static getRoundedRectIntersectionsWithSVGPath(t,e){const n=t.getTotalLength(),i=[];for(let o=0;o<=n;o+=1){const e=t.getPointAtLength(o);i.push({x:e.x,y:e.y})}for(let o=1;o<i.length;o++){const t=this.getRoundedRectIntersections(i[o-1],i[o],e);if(t.length>0)return t}return[]}static intersectArcWithLine(t,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(t.center,t.radiusX,t.radiusY,e,n),t)}static intersectLineSegments(t,e,n,i){const o=e.x-t.x,r=e.y-t.y,s=i.x-n.x,a=i.y-n.y,c=(-r*(t.x-n.x)+o*(t.y-n.y))/(-s*r+o*a),l=(s*(t.y-n.y)-a*(t.x-n.x))/(-s*r+o*a);return c>=0&&c<=1&&l>=0&&l<=1?{x:t.x+l*o,y:t.y+l*r}:null}static filterPointsWithinArc(t,e){let{center:n,startAngle:i,endAngle:o}=e;if(0===t.length)return t;o<i&&([i,o]=[o,i]),(i<0||o<0)&&(i+=2*Math.PI,o+=2*Math.PI);const r=[];for(const s of t){let t=this.normalizeAngle(rd.angle(rd.initialize(1,0),rd.initialize(s.x-n.x,s.y-n.y)));t<i&&(t+=2*Math.PI),i<=t&&t<=o&&r.push(s)}return r}static normalizeAngle(t){const e=t%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(t,e,n,i,o){const r=rd.initialize(i.x,i.y),s=rd.fromPoints(i,o),a=rd.initialize(t.x,t.y),c=rd.subtract(r,a),l=rd.initialize(s.x/(e*e),s.y/(n*n)),d=rd.initialize(c.x/(e*e),c.y/(n*n)),u=rd.dotProduct(s,l),p=rd.dotProduct(s,d),h=p*p-u*(rd.dotProduct(c,d)-1);return h<0?[]:this.calculateIntersectionPoints(h,u,p,i,o)}static calculateIntersectionPoints(t,e,n,i,o){const r=[];if(t>0){const s=Math.sqrt(t),a=(-n-s)/e,c=(-n+s)/e;a>=0&&a<=1&&r.push(Wl.interpolatePoints(i,o,a)),c>=0&&c<=1&&r.push(Wl.interpolatePoints(i,o,c))}else{const t=-n/e;t>=0&&t<=1&&r.push(Wl.interpolatePoints(i,o,t))}return r}}function ad(t,e=Bo){return n=>n.lift(new cd(t,e))}class cd{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new ld(t,this.dueTime,this.scheduler))}}
1class ld extends Er.L{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(dd,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function dd(t){t.debouncedNext()}class ud{handle(t,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(t)),n)return e.get(this.execution).handle(t)}execute(t,e){return e.get(this.execution).handle(t)}setValidator(t){this.validator=t}setExecution(t){this.execution=t}}class pd{constructor(t){this.injector=t}static registerPipeline(t,e,n){const i=this.pipelines.get(t.name)||new ud;n?i.setValidator(e):i.setExecution(e),this.pipelines.set(t.name,i)}send(t){const e=pd.pipelines.get(t.constructor.name);if(e)return e.handle(t,this.injector);throw new Error("Handler not registered for request type.")}execute(t){return pd.pipelines.get(t.constructor.name).execute(t,this.injector)}}function hd(t){return function(e){pd.registerPipeline(t,e,!1)}}function gd(t){return function(e){pd.registerPipeline(t,e,!0)}}function fd(t,e){return t.reduce((t,n)=>[...t,...e(n)],[])}function md(t,e,n,i){const o=e.querySelectorAll(t);if(o.length){const e=n.querySelectorAll(t);for(let t=0;t<o.length;t++)i(o[t],e[t])}}pd.pipelines=new Map,pd.\u0275fac=function(t){return new(t||pd)(o.LFG(o.zs3))},pd.\u0275prov=o.Yz7({token:pd,factory:pd.\u0275fac});let vd=0;function bd(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${vd++}`)}function xd(t,e){const n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch(i){}}function _d(t,e){const n=function(t,e){return t.closest(e)}(t,e);return!!n&&!n.classList.contains(e+"-disabled")}function Cd(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function wd(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function yd(t){return null!=t&&"false"!=`${t}`}function Ad(t,e,n){const i=n[t.toUpperCase()]||function(t,e){return Object.keys(t).find(n=>t[n]===e)}(n,t.toLowerCase());if(void 0===i)throw new Error(`Unknown ${e}: ${t}. Accepted values: ${Object.keys(n).join(", ")}`);return i}const Zd=class{setItem(t,e){localStorage.setItem(t,e)}getItem(t){return localStorage.getItem(t)}removeItem(t){localStorage.removeItem(t)}clear(){localStorage.clear()}};let kd=Zd;Oi(kd,"\u0275fac",function(t){return new(t||Zd)}),Oi(kd,"\u0275prov",o.Yz7({token:Zd,factory:Zd.\u0275fac,providedIn:"root"}));const Td=class{constructor(){Oi(this,"storage",{})}setItem(t,e){this.storage[t]=e}getItem(t){return this.storage[t]||null}removeItem(t){delete this.storage[t]}clear(){this.storage={}}};let Od=Td;Oi(Od,"\u0275fac",function(t){return new(t||Td)}),Oi(Od,"\u0275prov",o.Yz7({token:Td,factory:Td.\u0275fac,providedIn:"root"}));const Md=new o.OlP("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>(0,to.NF)((0,o.f3M)(o.Lbi))?(0,o.f3M)(kd):(0,o.f3M)(Od)}),Id=class{getComputedStyle(t){return window.getComputedStyle(t)}get innerWidth(){return window.innerWidth}get innerHeight(){return window.innerHeight}get pageXOffset(){return window.pageXOffset}get pageYOffset(){return window.pageYOffset}isMediaQuery(t){return window.matchMedia(t).matches}requestAnimationFrame(t){return window.requestAnimationFrame(t)}get location(){return window.location}open(t,e,n){window.open(t,e,n)}};let Sd=Id;Oi(Sd,"\u0275fac",function(t){return new(t||Id)}),Oi(Sd,"\u0275prov",o.Yz7({token:Id,factory:Id.\u0275fac,providedIn:"root"}));const Pd=class{getComputedStyle(t){return new Proxy({getPropertyValue:t=>"0"},{get:(t,e)=>"getPropertyValue"===e?t.getPropertyValue:"0"})}get innerWidth(){return 0}get innerHeight(){return 0}get pageXOffset(){return 0}get pageYOffset(){return 0}isMediaQuery(t){return!1}requestAnimationFrame(t){return setTimeout(t,0)}get location(){return{href:"",pathname:"",search:"",hash:"",origin:""}}open(t,e,n){}};let Nd=Pd;Oi(Nd,"\u0275fac",function(t){return new(t||Pd)}),Oi(Nd,"\u0275prov",o.Yz7({token:Pd,factory:Pd.\u0275fac,providedIn:"root"}));const qd=new o.OlP("F_WINDOW",{providedIn:"root",factory:()=>(0,to.NF)((0,o.f3M)(o.Lbi))?(0,o.f3M)(Sd):(0,o.f3M)(Nd)});var Ud=(()=>{return(t=Ud||(Ud={})).MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",Ud;var t})();let Ed;try{Ed="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(Dh){Ed=!1}
1const Fd=class{constructor(t){Oi(this,"_platformId"),Oi(this,"isBrowser",!1),Oi(this,"EDGE",this.isBrowser&&/(edge)/i.test(navigator.userAgent)),Oi(this,"TRIDENT",this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent)),Oi(this,"BLINK",this.isBrowser&&!(!window.chrome&&!Ed)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT),Oi(this,"WEBKIT",this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT),Oi(this,"IOS",this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window)),Oi(this,"FIREFOX",this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent)),Oi(this,"ANDROID",this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT),Oi(this,"SAFARI",this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT),this._platformId=t,this.isBrowser=this._platformId?(0,to.NF)(this._platformId):"object"==typeof document&&!!document}getOS(){let t,e=navigator.userAgent.toLowerCase();return/(macintosh|macintel|macppc|mac68k|macos)/i.test(e)?t=Ud.MAC_OS:this.IOS?t=Ud.IOS:/(win32|win64|windows|wince)/i.test(e)?t=Ud.WINDOWS:this.ANDROID?t=Ud.ANDROID:!t&&/linux/.test(e)&&(t=Ud.LINUX),t}};let Dd=Fd;Oi(Dd,"\u0275fac",function(t){return new(t||Fd)(o.LFG(o.Lbi))}),Oi(Dd,"\u0275prov",o.Yz7({token:Fd,factory:Fd.\u0275fac,providedIn:"root"}));const Ld=class{constructor(t,e,n,i){Oi(this,"injectedDocument"),Oi(this,"windowService"),Oi(this,"localStorageService"),Oi(this,"platformService"),this.injectedDocument=t,this.windowService=e,this.localStorageService=n,this.platformService=i}isBrowser(){return this.platformService.isBrowser}get window(){return this.windowService}get localStorage(){return this.localStorageService}get document(){return this.injectedDocument}toPixels(t,e,n,i){if(t.endsWith("px"))return parseFloat(t);if(t.endsWith("%")){const i=parseFloat(t)/100;return Math.max(e,n)*i}if(t.endsWith("em"))return parseFloat(t)*parseFloat(i);if(t.endsWith("rem"))return parseFloat(t)*parseFloat(getComputedStyle(this.document.documentElement).fontSize);if(t.endsWith("vh")){const e=this.window.innerHeight/100;return parseFloat(t)*e}if(t.endsWith("vw")){const e=this.window.innerWidth/100;return parseFloat(t)*e}return parseFloat(t)||0}};let Jd=Ld;Oi(Jd,"\u0275fac",function(t){return new(t||Ld)(o.LFG(to.K0),o.LFG(qd),o.LFG(Md),o.LFG(Dd))}),Oi(Jd,"\u0275prov",o.Yz7({token:Ld,factory:Ld.\u0275fac,providedIn:"root"}));class jd{constructor(t,e){this.event=t,this.target=e,this.event=t}get originalEvent(){return this.event}get targetElement(){return this.target||this.originalEvent.target}setTarget(t){this.target=t}preventDefault(){this.originalEvent.preventDefault()}get isEventInLockedContext(){return null!==this.targetElement.closest("[fLockedContext]")}}class Rd extends jd{constructor(t,e){super(t,e)}isMouseLeftButton(){return 0===this.originalEvent.button}isMouseRightButton(){return 2===this.originalEvent.buttons}getPosition(){return{x:this.originalEvent.clientX,y:this.originalEvent.clientY}}}class $d extends jd{constructor(t){super(t)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){return{x:this.originalEvent.touches[0].clientX,y:this.originalEvent.touches[0].clientY}}}class Bd extends jd{constructor(t,e){super(t,e)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){return{x:this.originalEvent.targetTouches[0].clientX,y:this.originalEvent.targetTouches[0].clientY}}}class Hd extends jd{constructor(t){super(t)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){return{x:this.originalEvent.changedTouches[0].clientX,y:this.originalEvent.changedTouches[0].clientY}}}class Qd{static isPassiveEventListenerSupported(){if(null==Qd.isSupported&&"undefined"!=typeof window)try{window.addEventListener("test",Qd.emptyListener,{passive:!0}),Qd.isSupported=!0}catch(t){Qd.isSupported=!1}return Qd.isSupported}static passiveEventListener(t){return Qd.isPassiveEventListenerSupported()?t:!!t.capture}static activeListener(){return Qd.passiveEventListener({passive:!1})}static passiveListener(){return Qd.passiveEventListener({passive:!0})}static emptyListener(){return()=>{}}}const Yd=["f-connection-text",""],zd=["f-connection-drag-handle",""],Vd=["fConnectionGradient",""],Gd=["f-connection-path",""],Wd=["fConnectionSelection",""],Kd=["defs"],Xd=["fConnectionCenter"],tu=["*",[["","fConnectionCenter",""]]],eu=["*","[fConnectionCenter]"];function nu(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",9,10),o.Hsn(2,1),o.qZA())}const iu=["*"],ou=["fGroupsContainer"],ru=["fNodesContainer"],su=["fConnectionsContainer"],au=[[["","fGroup",""]],[["f-snap-connection"]],[["f-connection"]],[["f-connection-for-create"]],[["","fN
1ode",""]]],cu=["[fGroup]","f-snap-connection","f-connection","f-connection-for-create","[fNode]"],lu=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],[["f-minimap"]]],du=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","f-minimap"],uu=new o.OlP("F_BACKGROUND_PATTERN");class pu{constructor(t){this.fConnection=t}}let hu=(()=>{class t{constructor(){this.componentsDataChanges=new fo.xQ,this.componentsCountChanges=new fo.xQ,this.fNodes=[],this.fConnections=[],this.fMarkers=[],this.fOutputs=[],this.fInputs=[],this.fOutlets=[]}get componentsData$(){return this.componentsDataChanges.asObservable()}get componentsCount$(){return this.componentsCountChanges.asObservable()}get flowHost(){var t;return null===(t=this.fFlow)||void 0===t?void 0:t.hostElement}get transform(){var t;return null===(t=this.fCanvas)||void 0===t?void 0:t.transform}findNode(t){return this.fNodes.find(e=>e.isContains(t))}addComponent(t,e){t.push(e),this.componentsCountChanges.next()}removeComponent(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),this.componentsCountChanges.next())}componentDataChanged(){this.componentsDataChanges.next()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),gu=(()=>{class t{constructor(){this.changes=new fo.xQ}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),fu=(()=>{let t=class{constructor(t,e){this.fBrowser=t,this.fComponentsStore=e}handle(t){const e=mu("defs",this.fBrowser),n=t.fConnection;this.getMarkers(n).forEach(t=>{const i=this.createMarkerElement(t,n.fId),o=t.hostElement.cloneNode(!0);o.setAttribute("height",`${t.height}`),o.setAttribute("width",`${t.width}`),o.removeAttribute("markerUnits"),o.style.display="unset",i.append(o),e.append(i)}),n.fDefs.nativeElement.innerHTML=e.innerHTML,this.makeSafariCompatible(n)}getMarkers(t){return this.fComponentsStore.fMarkers.filter(e=>t.hostElement.contains(e.hostElement))}makeSafariCompatible(t){t.fPath.hostElement.replaceWith(t.fPath.hostElement)}createMarkerElement(t,e){const n=mu("marker",this.fBrowser);return n.setAttribute("id",Cd(t.type+"-"+e)),n.setAttribute("markerHeight",`${t.height}`),n.setAttribute("markerWidth",`${t.width}`),n.setAttribute("orient",`${t.orient}`),n.setAttribute("refX",`${t.refX}`),n.setAttribute("refY",`${t.refY}`),n.setAttribute("markerUnits",`${t.markerUnits}`),n}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(Jd),o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(pu)],t),t})();function mu(t,e){return e.document.createElementNS("http://www.w3.org/2000/svg",t)}class vu{constructor(t){this.element=t}}let bu=(()=>{let t=class{constructor(t){this.fBrowser=t}handle(t){return this.setRadiusFromElement(nd.fromRect(ed.fromElement(t.element)),t.element)}setRadiusFromElement(t,e){const n=this.getComputedStyle(e);return t.radius1=this.toPixels(n.borderTopLeftRadius,e,n.fontSize),t.radius2=this.toPixels(n.borderTopRightRadius,e,n.fontSize),t.radius3=this.toPixels(n.borderBottomRightRadius,e,n.fontSize),t.radius4=this.toPixels(n.borderBottomLeftRadius,e,n.fontSize),t}getComputedStyle(t){return this.fBrowser.window.getComputedStyle(t)}toPixels(t,e,n){return this.fBrowser.toPixels(t,e.clientWidth,e.clientHeight,n)||0}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(vu)],t),t})();class xu{}let _u=(()=>{let t=class{constructor(t){this.fTransformStore=t}handle(t){this.fTransformStore.changes.next()}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(gu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(xu)],t),t})();class Cu{constructor(t){this.fPattern=t}}let wu=0,yu=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fBrowser=e}get fBackground(){return this.fComponentsStore.fBackground}handle(t){var e,n,i,o,r,s,a;const c=(null===(e=t.fPattern)||void 0===e?void 0:e.hostElement.getElementsByTagName("pattern"))||[],l=c.length?c[0]:void 0;if(l){const e=Dm("defs",this.fBrowser);
1l.id="f-background-pattern-"+wu++,null===(n=t.fPattern)||void 0===n||n.hostElement.remove(),e.appendChild(l),null===(o=null===(i=this.fBackground.hostElement)||void 0===i?void 0:i.firstChild)||void 0===o||o.appendChild(e);const c=Dm("rect",this.fBrowser);c.setAttribute("fill","url(#"+l.id+")"),c.setAttribute("width","100%"),c.setAttribute("height","100%"),null===(r=this.fBackground.hostElement.firstChild)||void 0===r||r.appendChild(c);const d=(null===(s=this.fComponentsStore.fCanvas)||void 0===s?void 0:s.transform)||od.default();null===(a=t.fPattern)||void 0===a||a.setTransform(d)}}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Cu)],t),t})();const Au=[yu];class Zu{constructor(t,e){this.id=t,this.animated=e}}let ku=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){const e=this.getNode(t.id);!e||(this.toCenter(this.getNodeRect(e),this.getFlowRect(),e.position),t.animated?this.fComponentsStore.fCanvas.redrawWithAnimation():this.fComponentsStore.fCanvas.redraw(),this.fComponentsStore.fCanvas.emitCanvasChangeEvent(),setTimeout(()=>this.fComponentsStore.componentDataChanged(),Fm))}toCenter(t,e,n){this.transform.scaledPosition=Wl.initialize(),this.transform.position=Wl.initialize((e.width-t.width)/2-n.x*this.transform.scale,(e.height-t.height)/2-n.y*this.transform.scale)}getNode(t){return this.fComponentsStore.fNodes.find(e=>e.fId===t)}getNodeRect(t){return ed.fromElement(t.hostElement)}getFlowRect(){return ed.fromElement(this.fComponentsStore.fFlow.hostElement)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Zu)],t),t})();class Tu{constructor(t,e){this.toCenter=t,this.animated=e}}let Ou=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){const e=this.fMediator.send(new _m)||ed.initialize();0===e.width||0===e.height||(this.fitToParent(e,ed.fromElement(this.fComponentsStore.fFlow.hostElement),this.fComponentsStore.fNodes.map(t=>t.position),t.toCenter),t.animated?this.fComponentsStore.fCanvas.redrawWithAnimation():this.fComponentsStore.fCanvas.redraw(),this.fComponentsStore.fCanvas.emitCanvasChangeEvent(),setTimeout(()=>this.fComponentsStore.componentDataChanged(),Fm))}fitToParent(t,e,n,i){this.transform.scaledPosition=Wl.initialize(),this.transform.position=this.getZeroPositionWithoutScale(n);const o=t.width/this.transform.scale+i.x,r=t.height/this.transform.scale+i.y;(o>e.width||r>e.height||o<e.width&&r<e.height)&&(this.transform.scale=Math.min(e.width/o,e.height/r)),this.transform.position=Wl.initialize((e.width-o*this.transform.scale)/2-this.transform.position.x*this.transform.scale+i.x/2*this.transform.scale,(e.height-r*this.transform.scale)/2-this.transform.position.y*this.transform.scale+i.y/2*this.transform.scale)}getZeroPositionWithoutScale(t){const e=t.length?Math.min(...t.map(t=>t.x)):0,n=t.length?Math.min(...t.map(t=>t.y)):0;return Wl.initialize(e,n)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Tu)],t),t})();class Mu{constructor(t,e){this.transform=t,this.position=e}}let Iu=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){var e;if(!t.position)return;const n=Wl.sum(t.transform.position,t.transform.scaledPosition);Wl.isEqual(n,t.position)||(t.transform.position=t.position,t.transform.scaledPosition=Wl.initialize(),null===(e=this.fComponentsStore.fCanvas)||void 0===e||e.redraw())}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Mu)],t),t})();class Su{constructor(t,e){this.transform=t,this.scale=e}}let Pu=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){var e;!t.scale||(t.transform.scale=t.scale,null===(e=this.fComponentsStore.fCanvas)||void 0===e||e.redraw())}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Su)],t),t})();class Nu{}let qu=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){this.transform.scale=1,this.transform.scaledPosition=Wl.initialize()}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Nu)],t),t})();class Uu{constructor(t){this.animated=t}}let Eu=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){const e=this.fMediator.send(new _m)||ed.initialize();0===e.width||0===e.height||(this.oneToOneCentering(e,ed.fromElement(this.fComponentsStore.fFlow.hostElement),this.fComponentsStore.fNodes.map(t=>t.position)),t.animated?this.fComponentsStore.fCanvas.redrawWithAnimation():this.fComponentsStore.fCanvas.redraw(),this.fComponentsStore.fCanvas.emitCanvasChangeEvent(),setTimeout(()=>this.fComponentsStore.componentDataChanged(),Fm))}oneToOneCentering(t,e,n){this.transform.scaledPosition=Wl.initialize(),this.transform.position=this.getZeroPositionWithoutScale(n);const i=(e.width-t.width/this.transform.scale)/2-this.transform.position.x,o=(e.he
1ight-t.height/this.transform.scale)/2-this.transform.position.y;this.transform.scale=1,this.transform.position=Wl.initialize(i,o)}getZeroPositionWithoutScale(t){const e=t.length?Math.min(...t.map(t=>t.x)):0,n=t.length?Math.min(...t.map(t=>t.y)):0;return Wl.initialize(e,n)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Uu)],t),t})();class Fu{constructor(t,e){this.scale=t,this.toPosition=e}}let Du=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){if(t.scale!==this.transform.scale){const e=Wl.sum(this.transform.scaledPosition,this.transform.position),n=t.toPosition.x-(t.toPosition.x-e.x)*t.scale/this.transform.scale,i=t.toPosition.y-(t.toPosition.y-e.y)*t.scale/this.transform.scale;this.transform.scale=t.scale,this.transform.scaledPosition=Wl.sub(Wl.initialize(n,i),this.transform.position)}}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Fu)],t),t})();const Lu=[ku,Ou,Iu,Pu,qu,Eu,Du];class Ju{constructor(t){this.fConnection=t}}let ju=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){this.fComponentsStore.fConnections.push(t.fConnection),this.fComponentsStore.componentDataChanged()}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Ju)],t),t})();class Ru{constructor(t,e,n){this.position=t,this.canBeConnectedInputs=e,this.snapThreshold=n}}let $u=(()=>{let t=class{handle(t){let e,n=1/0;for(const i of t.canBeConnectedInputs){const o=this.distanceToRectangle(t.position,i);o<n&&(n=o,e=i)}return n<t.snapThreshold?e:void 0}distanceToRectangle(t,e){const n=this.clamp(t.x,e.fRect.x,e.fRect.x+e.fRect.width),i=this.clamp(t.y,e.fRect.y,e.fRect.y+e.fRect.height),o=t.x-n,r=t.y-i;return Math.sqrt(o*o+r*r)}clamp(t,e,n){return Math.max(e,Math.min(n,t))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Ru)],t),t})();class Bu{constructor(t){this.fOutputId=t}}class Hu{constructor(t){this.connector=t}}class Qu{constructor(t){this.element=t}}let Yu=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get transform(){return this.fComponentsStore.transform}get flowHost(){return this.fComponentsStore.flowHost}handle(t){const e=this.fMediator.send(new vu(t.element)),n=this.transformElementPositionInFlow(e),i=this.transformElementSizeInFlow(e);return new nd(n.x,n.y,i.width,i.height,e.radius1,e.radius2,e.radius3,e.radius4)}transformElementPositionInFlow(t){return Kl.fromPoint(t).elementTransform(this.flowHost).sub(this.transform.scaledPosition).sub(this.transform.position).div(this.transform.scale)}transformElementSizeInFlow(t){return id.initialize(t.width/this.transform.scale,t.height/this.transform.scale)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Qu)],t),t})(),zu=(()=>{let t=class{constructor(t){this.fMediator=t}handle(t){return{fConnector:t.connector,fRect:this.fMediator.send(new Qu(t.connector.hostElement))}}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Hu)],t),t})(),Vu=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get fNodes(){return this.fComponentsStore.fNodes}get fInputs(){return this.fComponentsStore.fInputs}handle(t){return this.getCanBeConnectedInputs(this.getOutput(t.fOutputId)).map(t=>this.fMediator.send(new Hu(t)))}getOutput(t){return this.findOutputById(t)||this.findOutletById(t)}findOutputById(t){return this.fComponentsStore.fOutputs.find(e=>e.id===t)}findOutletById(t){return this.fComponentsStore.fOutlets.find(e=>e.id===t)}getCanBeConnectedInputs(t){return t.isSelfConnectable?this.fInputs.filter(t=>t.canBeConnected):this.filterSelfConnectable(this.fInputs.filter(t=>t.canBeConnected),t)}filterSelfConnectable(t,e){return t.filter(t=>{var n,i;return(null===(n=this.getNodeOfConnector(e))||void 0===n?void 0:n.hostElement)!==(null===(i=this.getNodeOfConnector(t))||void 0===i?void 0:i.hostElement)})}getNodeOfConnector(t){return this.fNodes.find(e=>e.isContains(t.hostElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd
1))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Bu)],t),t})();class Gu{constructor(t){this.fConnection=t}}let Wu=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){const e=this.fComponentsStore.fConnections.indexOf(t.fConnection);if(-1===e)throw new Error("Connection not found in store");this.fComponentsStore.fConnections.splice(e,1),this.fComponentsStore.componentDataChanged()}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Gu)],t),t})();const Ku=[ju,$u,Vu,zu,Wu];class Xu{}class tp{constructor(t){this.event=t}}let ep=(()=>{class t{constructor(){this.selectedItems=[],this.isSelectedChanged=!1,this.onPointerDownScale=1,this.onPointerDownPosition=new Kl(0,0),this.draggableItems=[]}reset(){this.draggableItems=[],this.onPointerDownScale=1,this.onPointerDownPosition=new Kl(0,0)}markSelectionAsChanged(){this.isSelectedChanged=!0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),np=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){this.fDraggableDataContext.draggableItems.forEach(t=>{var e;return null===(e=t.complete)||void 0===e?void 0:e.call(t)})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(tp)],t),t})();class ip{constructor(t){this.fComponentsStore=t,this.onPointerDownPosition=Wl.initialize()}initialize(){this.onPointerDownPosition=this.fComponentsStore.fCanvas.transform.position}move(t){this.fComponentsStore.fCanvas.setPosition(Kl.fromPoint(this.onPointerDownPosition).add(t)),this.fComponentsStore.fCanvas.redraw()}complete(){this.fComponentsStore.fCanvas.emitCanvasChangeEvent()}}let op=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof ip)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(tp)],t),t})();const rp=[np,op];class sp{constructor(t){this.event=t}}let ap=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){this.fDraggableDataContext.onPointerDownScale=1,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost),this.fDraggableDataContext.draggableItems=[new ip(this.fComponentsStore)]}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(sp)],t),t})(),cp=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){return!this.fDraggableDataContext.draggableItems.length&&(this.isBackgroundElement(t.event.targetElement)||this.isDragOnHost(t.event.targetElement))}isBackgroundElement(t){var e;return null===(e=this.fComponentsStore.fBackground)||void 0===e?void 0:e.isBackgroundElement(t)}isDragOnHost(t){return this.flowHost.contains(t)&&!this.getNode(t)}getNode(t){let e=this.fComponentsStore.findNode(t);return e&&e.fDraggingDisabled&&(e=void 0),e}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(sp)],t),t})();const lp=[...rp,ap,cp];var dp=(()=>{return(t=dp||(dp={})).LEFT="left",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.AUTO="auto",dp;var t})();class up{handle(t){let e;return e=t.fConnector._fConnectableSide===dp.AUTO?this.getSideByDelta(t.fConnector.hostElement,t.fNodeHost):t.fConnector._fConnectableSide,e}getSideByDelta(t,e){let n;const i=ed.fromElement(t),o=e.getBoundingClientRect(),r=i.gravityCenter.x-o.left,s=o.right-i.gravityCenter.x,a=i.gravityCenter.y-o.top,c=Math.min(r,s,a,o.bottom-i.gravityCenter.y);return n=c===r?dp.LEFT:c===s?dp.RIGHT:c===a?dp.TOP:dp.BOTTOM,n}}class pp{constructor(t,e){this.fConnector=t,this.fNodeHost=e}}class hp{constructor(){this.stateChanges=new fo.xQ,this.isSelfConnectable=!0,this.fConnectableSide=dp.AUTO,this._fConnectableSide=dp.AUTO}isContains(t){return this.hostElement.contains(t)}setConnected(t){this.isConnected=t}}const gp=new o.OlP("F_NODE_INPUT");let fp=(()=>{class t extends hp{constructor(){super(...arguments),this.isConnected=!1}get canBeConnected(){return!(this.disabled||!this.multiple&&this.isConnected)}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.\u0275dir=o.lG2({type:t,features:[o.qOj]}),t})();const mp=new o.OlP("F_DRAG_HANDLE");let vp=(()=>{class t{constructor(t){this.elementReference=t}get hostElement(){return this.elementReference.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq))},t.\u0275dir=o.lG2({type:t,selectors:[["","fDragHandle",""]],hostAttrs:[1,"f-drag-handle","f-component"],features:[o._Bn([{provide:mp,useExisting:t}])]}),t})();var bp=(()=>{return(t=bp||(bp={})).LEFT_TOP="left-top",t.RIGHT_TOP="right-top",t.LEFT_BOTTOM="left-bottom",t.RIGHT_BOTTOM="right-bottom",bp;var t})();new o.OlP("F_RESIZE_HANDLE");const xp="f-selected";function _p(t){return class extends t{constructor(...t){super(...t),this.fId="",this.fSelectionDisabled=!1}deselect(){var t;null===(t=this.deselectChild)||void 0===t||t.call(this),this.hostElement.classList.remove(xp)}select(){var t;null===(t=this.selectChild)||void 0===t||t.call(this),this.isSelected()||this.hostElement.classList.add(xp)}isSelected(){return this.hostElement.classList.contains(xp)}selectChild(){}deselectChild(){}}}const Cp=new o.OlP("F_NODE"),wp=_p(class{constructor(t){this.hostElement=t}});class yp extends wp{constructor(){super(...arguments),this.stateChanges=new fo.xQ,this._position=Wl.initialize(),this.fCanBeResizedByChild=!0}isContains(t){return this.hostElement.contains(t)}redraw(){this.size&&(this.setStyle("width",this.size.width+"px"),this.setStyle("height",this.size.height+"px")),this.setStyle("transform",`translate(${this.position.x}px,${this.position.y}px)`)}updatePosition(t){this._position=t}updateSize(t){this._size=t}}class Ap extends Ro.y{constructor(t){super(e=>{const n=new ResizeObserver(t=>{e.next(t)});return n.observe(t),function(){n.unobserve(t),n.disconnect()}})}}let Zp=0,kp=(()=>{class t extends yp{constructor(t,e,n,i,r){super(t.nativeElement),this.renderer=e,this.fComponentsStore=n,this.fMediator=i,this.fBrowser=r,this.subscriptions$=new pi.w,this.fId="f-group-"+Zp++,this.fParentId=null,this.positionChange=new o.vpe,this.sizeChange=new o.vpe,this.fDraggingDisabled=!1,this.fSelectionDisabled=!1,this.fIncludePadding=!0,this.fConnectOnNode=!0,this.connectors=[]}set position(t){this._position=Wl.castToPoint(t),this.refresh()}get position(){return this._position}set size(t){this._size=t,this.refresh()}get size(){return this._size}ngOnInit(){this.setStyle("position","absolute"),this.setStyle("transform-origin","center"),this.setStyle("user-select","none"),this.setStyle("pointer-events","all"),this.setStyle("left","0"),this.setStyle("top","0"),super.redraw(),this.fComponentsStore.addComponent(this.fComponentsStore.fNodes,this)}setStyle(t,e){this.renderer.setStyle(this.hostElement,t,e)}redraw(){super.redraw(),this.fMediator.send(new xu)}ngAfterViewInit(){!this.fBrowser.isBrowser()||this.subscriptions$.add(this.subscribeOnResizeChanges())}subscribeOnResizeChanges(){return(0,Br.T)(new Ap(this.hostElement),this.stateChanges).pipe(ad(10),(0,Gr.O)(null)).subscribe(()=>
1{this.connectors.forEach(t=>{t.fConnectableSide=(new up).handle(new pp(t,this.hostElement))}),this.fComponentsStore.componentDataChanged()})}addConnector(t){this.connectors.push(t),this.stateChanges.next()}removeConnector(t){const e=this.connectors.indexOf(t);-1!==e&&this.connectors.splice(e,1),this.stateChanges.next()}refresh(){this.stateChanges.next()}ngOnDestroy(){this.fComponentsStore.removeComponent(this.fComponentsStore.fNodes,this),this.stateChanges.complete(),this.subscriptions$.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(hu),o.Y36(pd),o.Y36(Jd))},t.\u0275dir=o.lG2({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:5,hostBindings:function(t,e){2&t&&(o.uIk("data-f-group-id",e.fId),o.ekj("f-group-dragging-disabled",e.fDraggingDisabled)("f-group-selection-disabled",e.fSelectionDisabled))},inputs:{fId:["fGroupId","fId"],fParentId:["fGroupParentId","fParentId"],position:["fGroupPosition","position"],size:["fGroupSize","size"],fDraggingDisabled:["fGroupDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:["fGroupSelectionDisabled","fSelectionDisabled"],fIncludePadding:"fIncludePadding",fConnectOnNode:"fConnectOnNode"},outputs:{positionChange:"fGroupPositionChange",sizeChange:"fGroupSizeChange"},exportAs:["fComponent"],features:[o._Bn([{provide:Cp,useExisting:t}]),o.qOj]}),t})(),Tp=0,Op=(()=>{class t extends yp{constructor(t,e,n,i,r){super(t.nativeElement),this.renderer=e,this.fComponentsStore=n,this.fMediator=i,this.fBrowser=r,this.subscriptions$=new pi.w,this.fId="f-node-"+Tp++,this.fParentId=null,this.positionChange=new o.vpe,this.sizeChange=new o.vpe,this.fDraggingDisabled=!1,this.fSelectionDisabled=!1,this.fIncludePadding=!0,this.fConnectOnNode=!0,this.connectors=[]}set position(t){this._position=Wl.castToPoint(t),this.refresh()}get position(){return this._position}set size(t){this._size=t,this.refresh()}get size(){return this._size}ngOnInit(){this.setStyle("position","absolute"),this.setStyle("transform-origin","center"),this.setStyle("user-select","none"),this.setStyle("pointer-events","all"),this.setStyle("left","0"),this.setStyle("top","0"),super.redraw(),this.fComponentsStore.addComponent(this.fComponentsStore.fNodes,this)}setStyle(t,e){this.renderer.setStyle(this.hostElement,t,e)}redraw(){super.redraw(),this.fMediator.send(new xu)}ngAfterViewInit(){!this.fBrowser.isBrowser()||this.subscriptions$.add(this.subscribeOnResizeChanges())}subscribeOnResizeChanges(){return(0,Br.T)(new Ap(this.hostElement),this.stateChanges).pipe(ad(10),(0,Gr.O)(null)).subscribe(()=>{this.connectors.forEach(t=>{t.fConnectableSide=(new up).handle(new pp(t,this.hostElement))}),this.fComponentsStore.componentDataChanged()})}addConnector(t){this.connectors.push(t),this.stateChanges.next()}removeConnector(t){const e=this.connectors.indexOf(t);-1!==e&&this.connectors.splice(e,1),this.stateChanges.next()}refresh(){this.stateChanges.next()}ngOnDestroy(){this.fComponentsStore.removeComponent(this.fComponentsStore.fNodes,this),this.stateChanges.complete(),this.subscriptions$.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(hu),o.Y36(pd),o.Y36(Jd))},t.\u0275dir=o.lG2({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:5,hostBindings:function(t,e){2&t&&(o.uIk("data-f-node-id",e.fId),o.ekj("f-node-dragging-disabled",e.fDraggingDisabled)("f-node-selection-disabled",e.fSelectionDisabled))},inputs:{fId:["fNodeId","fId"],fParentId:["fNodeParentId","fParentId"],position:["fNodePosition","position"],size:["fNodeSize","size"],fDraggingDisabled:["fNodeDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:["fNodeSelectionDisabled","fSelectionDisabled"],fIncludePadding:"fIncludePadding",fConnectOnNode:"fConnectOnNode"},outputs:{positionChange:"fNodePositionChange",sizeChange:"fNodeSizeChange"},exportAs:["fComponent"],features:[o._Bn([{provide:Cp,useExisting:t}]),o.qOj]}),t})(),Mp=0,Ip=(()=>{class t extends fp{constructor(t,e,n){super(),this.elementReference=t,this.fNode=e,this.fComponentsStore=n,this.id="f-node
1-input-"+Mp++,this.multiple=!0,this.isDisabled=!1,this._fConnectableSide=dp.AUTO,this.isConnected=!1}get disabled(){return this.isDisabled}set disabled(t){const e=yd(t);e!==this.isDisabled&&(this.isDisabled=e,this.stateChanges.next())}set _fSide(t){this._fConnectableSide=Ad(t,"fInputConnectableSide",dp),this.fNode.refresh()}get _fSide(){return this._fConnectableSide}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.fComponentsStore.addComponent(this.fComponentsStore.fInputs,this),this.fNode.addConnector(this)}setConnected(t){this.isConnected=t,this.hostElement.classList.toggle("f-node-input-connected",t),this.hostElement.classList.toggle("f-node-input-not-connectable",!this.canBeConnected)}ngOnDestroy(){this.fNode.removeConnector(this),this.fComponentsStore.removeComponent(this.fComponentsStore.fInputs,this)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Cp),o.Y36(hu))},t.\u0275dir=o.lG2({type:t,selectors:[["","fNodeInput",""]],hostAttrs:[1,"f-component","f-node-input"],hostVars:5,hostBindings:function(t,e){2&t&&(o.uIk("data-f-input-id",e.id),o.ekj("f-node-input-multiple",e.multiple)("f-node-input-disabled",e.disabled))},inputs:{id:["fInputId","id"],multiple:["fInputMultiple","multiple"],disabled:["fInputDisabled","disabled"],_fSide:["fInputConnectableSide","_fSide"]},exportAs:["fNodeInput"],features:[o._Bn([{provide:gp,useExisting:t}]),o.qOj]}),t})();function Sp(t){return!!t.closest("[fNodeOutlet]")}new o.OlP("F_NODE_OUTLET");const Pp=new o.OlP("F_NODE_OUTPUT");let Np=(()=>{class t extends hp{constructor(){super(...arguments),this.isConnected=!1}get canBeConnected(){return!(this.disabled||!this.multiple&&this.isConnected)}}return t.\u0275fac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.\u0275dir=o.lG2({type:t,features:[o.qOj]}),t})();function qp(t){return!!t.closest("[fNodeOutput]")}let Up=0,Ep=(()=>{class t extends Np{constructor(t,e,n){super(),this.elementReference=t,this.fNode=e,this.fComponentsStore=n,this.id="f-node-output-"+Up++,this.multiple=!1,this.isDisabled=!1,this._fConnectableSide=dp.AUTO,this.isConnected=!1,this.isSelfConnectable=!0}get disabled(){return this.isDisabled}set disabled(t){const e=yd(t);e!==this.isDisabled&&(this.isDisabled=e,this.stateChanges.next())}set _fSide(t){this._fConnectableSide=Ad(t,"fOutputConnectableSide",dp),this.fNode.refresh()}get _fSide(){return this._fConnectableSide}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){if(!this.fNode)throw new Error("fNodeOutput must be inside fNode Directive");this.fComponentsStore.addComponent(this.fComponentsStore.fOutputs,this),this.fNode.addConnector(this)}setConnected(t){this.isConnected=t,this.hostElement.classList.toggle("f-node-output-connected",t),this.hostElement.classList.toggle("f-node-output-not-connectable",!this.canBeConnected)}ngOnDestroy(){this.fNode.removeConnector(this),this.fComponentsStore.removeComponent(this.fComponentsStore.fOutputs,this)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Cp),o.Y36(hu))},t.\u0275dir=o.lG2({type:t,selectors:[["","fNodeOutput",""]],hostAttrs:[1,"f-component","f-node-output"],hostVars:7,hostBindings:function(t,e){2&t&&(o.uIk("data-f-output-id",e.id),o.ekj("f-node-output-multiple",e.multiple)("f-node-output-disabled",e.disabled)("f-node-output-self-connectable",e.isSelfConnectable))},inputs:{id:["fOutputId","id"],multiple:["fOutputMultiple","multiple"],disabled:["fOutputDisabled","disabled"],_fSide:["fOutputConnectableSide","_fSide"],isSelfConnectable:"isSelfConnectable"},exportAs:["fNodeOutput"],features:[o._Bn([{provide:Pp,useExisting:t}]),o.qOj]}),t})();class Fp{constructor(t){this.event=t}}function Dp(t){const e=t(t=>{Error.call(t)});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const Lp=Dp(t=>function(e){t(this),this.message=e||"The requested resource was not found.",this.code=404}),Jp=Dp(t=>function(e){t(this),this.message=e||"Conflict error occurred.",this.code=409});function jp(t){return new Lp(`Output with fOutputId ${t} not found. Make sure there is no f-connection to a non-existent fOutput.`)}function Rp(){return new Jp("The fNode must contain at least one fOutput if there is an fOutlet")}class $p{constructor(t){this.outlet=t}}let Bp=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get fNodes(){return this.fComponentsStore.fNodes}get fOutputs(){return this.fComponentsStore.fOutputs}handle(t){const e=this.getConnectableOutputs(this.getNode(t.outlet));if(!e.length)throw Rp();return e.length>0?e[0]:void 0}getConnectableOutputs(t){return this.fOutputs.filter(e=>t.isContains(e.hostElement)&&e.canBeConnected)}getNode(t){return this.fNodes.find(e=>e.isContains(t.hostElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd($p)],t),t})(),Hp=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get fNodes(){return this.fComponentsStore.fNodes}handle(t){return!!this.fNodes.find(e=>e.isContains(t.outlet.hostElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd($p)],t),t})();class Qp{constructor(t,e,n){this.fOutputId=t,this.fInputId=e,this.fDropPosition=n}}class Yp{constructor(t,e){this.event=t,this.dragHandler=e}}let zp=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fBrowser=n}get fNodes(){return this.fComponentsStore.fNodes}get fInputs(){return this.fComponentsStore.fInputs}handle(t){const e=this.getOutput(t.dragHandler)||this.getOutlet(t.dragHandler),n=this.getInputsUnderPointer(t.event.getPosition(),t.dragHandler),i=e.isSelfConnectable?n:this.filterSelfConnectable(n,e);return i.length>0?i[0]:void 0}getOutput(t){return this.fComponentsStore.fOutputs.find(e=>e.id===t.fConnection.fOutputId)}getOutlet(t){return this.fComponentsStore.fOutlets.find(e=>e.id===t.fConnection.fOutputId)}getInputsUnderPointer(t,e){const n=this.getInputsInPosition(t),i=e.getClosetInput(this.getDifference(t));i&&n.push(i.fConnector);const o=this.getFirstConnectableInputOfNodeInPosition(t);return o&&n.push(o),n}getDifference(t){return Kl.fromPoint(t).elementTransform(this.fComponentsStore.flowHost).div(this.fDraggableDataContext.onPointerDownScale).sub(this.fDraggableDataContext.onPointerDownPosition)}getInputsInPosition(t){return this.getElementsFromPoint(t).map(t=>this.fInputs.find(e=>e.isContains(t)&&e.canBeConnected)).filter(t=>!!t)}getElementsFromPoint(t){return this.fBrowser.document.elementsFromPoint(t.x,t.y)}getFirstConnectableInputOfNodeInPosition(t){return this.getNodesInPosition(t).map(t=>this.fInputs.find(e=>t.isContains(e.hostElement)&&e.canBeConnected)).find(t=>!!t)}getNodesInPosition(t){return this.getElementsFromPoint(t).map(t=>
1this.fNodes.find(e=>e.isContains(t)&&e.fConnectOnNode)).filter(t=>!!t)}filterSelfConnectable(t,e){return t.filter(t=>{const n=this.fNodes.find(e=>e.isContains(t.hostElement)),i=this.fNodes.find(t=>t.isContains(e.hostElement));return(null==i?void 0:i.hostElement)!==(null==n?void 0:n.hostElement)})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Yp)],t),t})(),Vp=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){if(!this.getOutput(t.dragHandler)&&!this.getOutlet(t.dragHandler))throw jp(t.dragHandler.fConnection.fOutputId);return!0}getOutput(t){return this.fComponentsStore.fOutputs.find(e=>e.id===t.fConnection.fOutputId)}getOutlet(t){return this.fComponentsStore.fOutlets.find(e=>e.id===t.fConnection.fOutputId)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Yp)],t),t})(),Gp=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get dragHandler(){return this.fDraggableDataContext.draggableItems[0]}handle(t){this.emitEvent(t.event),this.dragHandler.complete()}getTargetOutput(t){if(!t)throw jp(this.dragHandler.fConnection.fOutputId);return Sp(t.hostElement)?this.fMediator.send(new $p(t)):t}getOutput(){return this.fComponentsStore.fOutputs.find(t=>t.id===this.dragHandler.fConnection.fOutputId)}getOutlet(){return this.fComponentsStore.fOutlets.find(t=>t.id===this.dragHandler.fConnection.fOutputId)}emitEvent(t){var e,n;null===(e=this.fComponentsStore.fDraggable)||void 0===e||e.fCreateConnection.emit(new Qp(this.getTargetOutput(this.getOutput()||this.getOutlet()).id,null===(n=this.getInputUnderPointer(t))||void 0===n?void 0:n.id,t.getPosition()))}getInputUnderPointer(t){return this.fMediator.send(new Yp(t,this.dragHandler))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Fp)],t),t})();class Wp{constructor(t,e,n,i){this.fMediator=t,this.fComponentsStore=e,this.fOutput=n,this.onPointerDownPosition=i,this.toConnectorRect=new nd,this.canBeConnectedInputs=[]}get fConnection(){return this.fComponentsStore.fTempConnection}get fSnapConnection(){return this.fComponentsStore.fSnapConnection}initialize(){this.fSnapConnection&&(this.fSnapConnection.fOutputId=this.fOutput.id,this.fSnapConnection.initialize(),this.canBeConnectedInputs=this.fMediator.send(new Bu(this.fOutput.id))),this.fConnection.fOutputId=this.fOutput.id,this.fConnection.initialize(),this.fOutputWithRect=this.fMediator.send(new Hu(this.fOutput)),this.toConnectorRect=nd.fromRect(ed.initialize(this.onPointerDownPosition.x,this.onPointerDownPosition.y)),this.fConnection.show(),this.move(Wl.initialize())}move(t){this.drawTempConnection(this.toConnectorRect.addPoint(t)),this.fSnapConnection&&this.drawSnapConnection(this.getClosetInput(t))}drawTempConnection(t){const e=this.fMediator.send(new cm(this.fOutputWithRect.fRect,t,this.fConnection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,dp.TOP));this.fConnection.setLine(e.point1,this.fOutputWithRect.fConnector.fConnectableSide,e.point2,dp.TOP),this.fConnection.redraw()}drawSnapConnection(t){var e;if(t){const e=this.fMediator.send(new cm(this.fOutputWithRect.fRect,t.fRect,this.fSnapConnection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,t.fConnector.fConnectableSide));this.fSnapConnection.show(),this.fSnapConnection.setLine(e.point1,this.fOutputWithRect.fConnector.fConnectableSide,e.point2,t.fConnector.fConnectableSide),this.fSnapConnection.redraw()}else null===(e=this.fSnapConnection)||void 0===e||e.hide()}getClosetInput(t){if(this.fSnapConnection)return this.fMediator.send(new Ru(Kl.fromPoint(this.toConnectorRect).add(t),this.canBeConnectedInputs,this.fSnapConnection.fSnapThreshold))}complete(){var t;this.fConnection.redraw(),this.fConnection.hide(),null===(t=this.fSnapConnection)||void 0===t||t.hide()}}let Kp=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof Wp)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Fp)],t),t})();class Xp{constructor(t,e){this.onPointerDownPosition=t,this.connector=e}}let th=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get flowHost(){return this.fComponentsStore.flowHost}get transform(){return this.fComponentsStore.fCanvas.transform}handle(t){this.fDraggableDataContext.onPointerDownScale=this.transform.scale;const e=Kl.fromPoint(t.onPointerDownPosition).elementTransform(this.flowHost).div(this.transform.scale);this.fDraggableDataContext.onPointerDownPosition=e;const n=Kl.fromPoint(e).mult(this.transform.scale).sub(this.transform.position).sub(this.transform.scaledPosition).div(this.transform.scale);this.fDraggableDataContext.draggableItems=[new Wp(this.fMediator,this.fComponentsStore,t.connector,n)]}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd
1))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Xp)],t),t})();class eh{constructor(t){this.event=t}}let nh=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){const{event:e}=t,n=this.fComponentsStore.findNode(e.targetElement),i=this.fComponentsStore.fOutlets.find(t=>t.hostElement.contains(e.targetElement));if(!i)throw new Error("Outlet not found");const o=this.fComponentsStore.fOutputs.filter(t=>n.isContains(t.hostElement));if(i.setOutputs(o),i.canBeConnected)if(i.isConnectionFromOutlet)this.createDragHandler(e.getPosition(),i);else{const t=this.fMediator.send(new $p(i));if(!t)throw Rp();this.createDragHandler(e.getPosition(),t)}}createDragHandler(t,e){this.fMediator.send(new Xp(t,e))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(eh)],t),t})();class ih{constructor(t){this.event=t}}let oh=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){const{event:e}=t,n=this.fComponentsStore.fOutputs.find(t=>t.hostElement.contains(e.targetElement));if(!n)throw new Error("Output not found");n.canBeConnected&&this.createDragHandler(e.getPosition(),n)}createDragHandler(t,e){this.fMediator.send(new Xp(t,e))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(ih)],t),t})(),rh=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.isNodeOutput(t.event.targetElement,this.getNode(t.event))}getNode(t){return this.fComponentsStore.findNode(t.targetElement)}isNodeOutput(t,e){return qp(t)&&!this.getOutlets(e).length}getOutlets(t){return this.fComponentsStore.fOutlets.filter(e=>t.isContains(e.hostElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(ih)],t),t})();class sh{constructor(t){this.event=t}}let ah=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){Sp(t.event.targetElement)?this.fMediator.send(new eh(t.event)):this.isNodeOutput(t.event.targetElement,this.getNode(t.event))&&this.fMediator.send(new ih(t.event))}getNode(t){return this.fComponentsStore.findNode(t.targetElement)}isNodeOutput(t,e){return qp(t)&&!this.getOutlets(e).length}getOutlets(t){return this.fComponentsStore.fOutlets.filter(e=>t.isContains(e.hostElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(sh)],t),t})(),ch=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}handle(t){return!!this.getNode(t.event)&&this.isValidConditions()}getNode(t){return this.fComponentsStore.findNode(t.targetElement)}isValidConditions(){return!this.fDraggableDataContext.draggableItems.length&&!!this.fComponentsStore.fTempConnection}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(sh)],t),t})();class lh{constructor(t){this.event=t}}class dh{constructor(t,e,n,i,o){this.fConnectionId=t,this.fOutputId=e,this.oldFInputId=n,this.newFInputId=i,this.fDropPosition=o}}let uh=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get fDraggable(){return this.fComponentsStore.fDraggable}get dragHandler(){return this.fDraggableDataContext.draggableItems[0]}handle(t){this.emitEvent(t.event),this.dragHandler.complete()}emitEvent(t){const e=this.getInputUnderPointer(t);e&&!this.isReassignToDifferentInput(e)||this.fDraggable.fReassignConnection.emit(new dh(this.dragHandler.fConnection.fId,this.dragHandler.fConnection.fOutputId,this.dragHandler.fConnection.fInputId,null==e?void 0:e.id,t.getPosition()))}getInputUnderPointer(t){return this.fMediator.send(new Yp(t,this.dragHandler))}isReassignToDifferentInput(t){return this.dragHandler.fConnection.fInputId!==t.id}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(lh)],t),t})();class ph{constructor(t,e,n){this.fMediator=t,this.fComponentsStore=e,this.fConnection=n,this.toConnectorRect=new nd,this.canBeConnectedInputs=[]}get fSnapConnection(){return this.fComponentsStore.fSnapConnection}initialize(){this.fSnapConnection&&(this.fSnapConnection.fOutputId=this.fConnection.fOutputId,this.fSnapConnection.initialize(),this.canBeConnectedInputs=this.fMediator.send(new Bu(this.fConnection.fOutputId))),this.fOutputWithRect=this.fMediator.send(new Hu(this.getOutput())),this.fInputWithRect=this.fMediator.send(new Hu(this.getInput())),this.toConnectorRect=nd.fromRect(ed.initialize(this.fConnection.line.point2.x,this.fConnection.line.point2.y))}getOutput(){return this.fComponentsStore.fOutputs.find(t=>
1t.id===this.fConnection.fOutputId)}getInput(){return this.fComponentsStore.fInputs.find(t=>t.id===this.fConnection.fInputId)}move(t){this.drawConnection({fRect:this.toConnectorRect.addPoint(t),fConnector:this.fInputWithRect.fConnector}),this.fSnapConnection&&this.drawSnapConnection(this.getClosetInput(t))}drawConnection(t){const e=this.fMediator.send(new cm(this.fOutputWithRect.fRect,t.fRect,this.fConnection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,t.fConnector.fConnectableSide));this.fConnection.setLine(e.point1,this.fOutputWithRect.fConnector.fConnectableSide,e.point2,t.fConnector.fConnectableSide),this.fConnection.redraw()}drawSnapConnection(t){var e;if(t){const e=this.fMediator.send(new cm(this.fOutputWithRect.fRect,t.fRect,this.fSnapConnection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,t.fConnector.fConnectableSide));this.fSnapConnection.show(),this.fSnapConnection.setLine(e.point1,this.fOutputWithRect.fConnector.fConnectableSide,e.point2,t.fConnector.fConnectableSide),this.fSnapConnection.redraw()}else null===(e=this.fSnapConnection)||void 0===e||e.hide()}getClosetInput(t){if(this.fSnapConnection)return this.fMediator.send(new Ru(Kl.fromPoint(this.toConnectorRect).add(t),this.canBeConnectedInputs,this.fSnapConnection.fSnapThreshold))}complete(){var t;this.drawConnection(this.fInputWithRect),null===(t=this.fSnapConnection)||void 0===t||t.hide()}}let hh=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof ph)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(lh)],t),t})();class gh{constructor(t){this.event=t}}class fh{handle(t){const{source:e,target:n}=t,i=Math.abs(n.x-e.x)/2,o=n.x<e.x?n.x+i:n.x-i,r=Math.abs(n.y-e.y)/2;return Wl.initialize(o,n.y<e.y?n.y+r:n.y-r)}}class mh{constructor(t,e){this.source=t,this.target=e}}class vh{handle(t){const{points:e}=t;let n=0,i=[];for(let a=0;a<e.length-1;a++){const t=this.calculateDistance(e[a],e[a+1]);i.push(t),n+=t}let o=0,r=0;const s=n/2;for(let a=0;a<i.length;a++)if(o+=i[a],o>=s){r=a;break}return this.findPointAtDistance(e[r],e[r+1],s-(o-i[r]))}calculateDistance(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}findPointAtDistance(t,e,n){const i=n/this.calculateDistance(t,e);return{x:(1-i)*t.x+i*e.x,y:(1-i)*t.y+i*e.y}}}class bh{constructor(t){this.points=t}}class xh{static getConnectorOffset(t,e){return t>=e?t:e*Math.sqrt(e-t)}static getAnglePoint(t,e,n,i){let o={x:e.x,y:e.y};switch(t){case dp.LEFT:o.x-=xh.getConnectorOffset(e.x-n.x,i);break;case dp.RIGHT:o.x+=xh.getConnectorOffset(n.x-e.x,i);break;case dp.TOP:o.y-=xh.getConnectorOffset(e.y-n.y,i);break;case dp.BOTTOM:o.y+=xh.getConnectorOffset(n.y-e.y,i)}return o}handle(t){const{source:e,sourceSide:n,target:i,targetSide:o,offset:r}=t,s=xh.getAnglePoint(n,e,i,r),a=xh.getAnglePoint(o,i,e,r);return{path:`M ${e.x} ${e.y} C ${s.x} ${s.y}, ${a.x} ${a.y}, ${i.x+2e-4} ${i.y+2e-4}`,connectionCenter:(new vh).handle(new bh([e,s,a,i])),penultimatePoint:a}}}const _h={[dp.LEFT]:Wl.initialize(-1,0),[dp.RIGHT]:Wl.initialize(1,0),[dp.TOP]:Wl.initialize(0,-1),[dp.BOTTOM]:Wl.initialize(0,1),[dp.AUTO]:Wl.initialize(0,0)};class Ch{handle(t){const{source:e,sourceSide:n,target:i,targetSide:o}=t,{points:r,center:s}=this.getPathPoints(e,n,i,o,t.offset);return{path:this.buildPath(r,t.radius),connectionCenter:s,penultimatePoint:r.length>1?r[r.length-2]:e}}getPathPoints(t,e,n,i,o){const r=_h[e],s=_h[i],a={x:t.x+r.x*o,y:t.y+r.y*o},c={x:n.x+s.x*o,y:n.y+s.y*o},l=this.getDirection(a,e,c),d=0!==l.x?"x":"y",u=l[d];let p=[];const h=Wl.initialize(),g=Wl.initialize(),f=(new fh).handle(new mh(t,n));if(r[d]*s[d]==-1){const t=[{x:f.x,y:a.y},{x:f.x,y:c.y}],e=[{x:a.x,y:f.y},{x:c.x,y:f.y}];p=r[d]===u?"x"===d?t:e:"x"===d?e:t}else{const l=[{x:a.x,y:c.y}],f=[{x:c.x,y:a.y}];if(p="x"===d?r.x===u?f:l:r.y===u?l:f,e===i){const e=Math.abs(t[d]-n[d]);if(e<=o){const i=Math.min(o-1,o-e);r[d]===u?h[d]=(a[d]>t[d]?-1:1)*i:g[d]=(c[d]>n[d]?-1:1)*i}}if(e!==i){const t="x"===d?"y":"x",e=r[d]===s[t],n=a[t]>c[t],i=a[t]<c[t];(1===r[d]&&(!e&&n||e&&i)||1!==r[d]&&(!e&&i||e&&n))&&(p="x"===d?l:f)}}const m=[t,{x:a.x+h.x,y:a.y+h.y},...p,{x:c.x+g.x,y:c.y+g.y},n];return{points:m,center:(new vh).handle(new bh(m))}}getDirection(t,e,n){return e===dp.LEFT||e===dp.RIGHT?Wl.initialize(t.x<n.x?1:-1,0):Wl.initialize(0,t.y<n.y?1:-1)}distance(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}buildPath(t,e){let n="";for(let i=0;i<t.length;i++){const o=t[i];let r="";r=i>0&&i<t.length-1?this.getBend(t[i-1],o,t[i+1],e):i===t.length-1?this.buildLastLineSegment(i,o):this.buildMoveOrLineSegment(i,o),n+=r}return n}getBend(t,e,n,i){const o=Math.min(this.distance(t,e)/2,this.distance(e,n)/2,i),{x:r,y:s}=e;return t.x===r&&r===n.x||t.y===s&&s===n.y?`L${r} ${s}`:t.y===s?`L ${r+o*(t.x<n.x?-1:1)},${s}Q ${r},${s} ${r},${s+o*(t.y<n.y?1:-1)}`:`L ${r},${s+o*(t.y<n.y?-1:1)}Q ${r},${s} ${r+o*(t.x<n.x?1:-1)},${s}`}buildMoveOrLineSegment(t,e){return`${0===t?"M":"L"}${e.x} ${e.y}`}buildLastLineSegment(t,e){return`L${e.x+2e-4} ${e.y+2e-4}`}}class wh{handle(t){const{source:e,target:n}=t;return{path:`M ${e.x} ${e.y} L ${n.x+2e-4} ${n.y+2e-4}`,connectionCenter:(new vh).handle(new bh([e,n])),penultimatePoint:e}}}const yh={textId:t=>Cd("connection_text_"+t),connectionForSelectionId:t=>Cd("connection_for_selection_"+t),connectionId:t=>Cd("connection_"+t),gradientId:t=>Cd("connection_gradient_"+t),linkToGradient:t=>`url(#${yh.gradientId(t)})`,linkToConnection:t=>`#${yh.connectionId(t)}`},Ah=new o.OlP("F_CONNECTION");let Zh=(()=>{class t{constructor(t,e,n){this.elementReference=t,this.base=e,this.fBrowser=n,this.symbolWi
1dth=8,this.fontSize="12px"}get linkToConnection(){return yh.linkToConnection(this.base.fId+this.base.fOutputId+this.base.fInputId)}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.hostElement.setAttribute("startOffset","50%"),this.hostElement.setAttribute("text-anchor","middle"),this.symbolWidth=this.getSymbolWidth(this.base.fText||"")}getBBox(){return this.hostElement.getBBox()}getFontStyles(t){const e=this.fBrowser.window.getComputedStyle(t);return{fontSize:e.fontSize,fontFamily:e.fontFamily}}getSymbolWidth(t){const e=t||"connection",{fontFamily:n,fontSize:i}=this.getFontStyles(this.hostElement);this.fontSize=i||"12px";const o=this.fBrowser.document.createElement("canvas");let r;try{r=o.getContext("2d")}catch(s){r=null}return r?(r.font=`${i} ${n}`,r.measureText(e).width/e.length):0}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Ah),o.Y36(Jd))},t.\u0275dir=o.lG2({type:t,selectors:[["textPath","f-connection-text-path",""]],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("href",e.linkToConnection)}}),t})();const kh=new o.OlP("CONNECTION_TEXT");let Th=(()=>{class t{constructor(t,e){this.elementReference=t,this.base=e}get textId(){return yh.textId(this.base.fId+this.base.fOutputId+this.base.fInputId)}get hostElement(){return this.elementReference.nativeElement}get text(){return this.base.fText||""}redraw(e){const n=t.isTextReverse(e),i=this.calculateDy(this.textPathDirective.fontSize,n);this.hostElement.setAttribute("dy",i);const o=this.textPathDirective.getBBox();this.hostElement.setAttribute("transform",n?`rotate(180, ${[o.x+o.width/2,o.y+o.height/2]})`:""),this.hostElement.style.display=t.getTextStartOffset(e,this.base.fText||"",this.textPathDirective.symbolWidth)<0?"none":"unset"}calculateDy(t,e){const n=parseFloat(t);return(e?1.5*n:-.8*n).toString()}static isTextReverse(t){return t.point1.x>t.point2.x}static getTextStartOffset(t,e,n){return Wl.hypotenuse(t.point1,t.point2)/2-(e||"").length*n/2}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Ah))},t.\u0275cmp=o.Xpm({type:t,selectors:[["text","f-connection-text",""]],viewQuery:function(t,e){if(1&t&&o.Gf(Zh,7),2&t){let t;o.iGM(t=o.CRH())&&(e.textPathDirective=t.first)}},hostAttrs:[1,"f-component","f-connection-text"],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("id",e.textId)},features:[o._Bn([{provide:kh,useExisting:t}])],attrs:Yd,decls:3,vars:1,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["f-connection-text-path",""]],template:function(t,e){1&t&&(o.ynx(0,0),o.O4$(),o.TgZ(1,"textPath",1),o._uU(2),o.qZA(),o.BQk()),2&t&&(o.xp6(2),o.hij(" ",e.text," "))},directives:[Zh],encapsulation:2,changeDetection:0}),t})();const Oh="f-connection-drag-handle";let Mh=(()=>{class t{constructor(t){this.elementReference=t,this.class=Oh}get hostElement(){return this.elementReference.nativeElement}redraw(t,e){const n=this.calculateCircleCenter(t,e,8);this.hostElement.setAttribute("cx",n.x.toString()),this.hostElement.setAttribute("cy",n.y.toString())}calculateCircleCenter(t,e,n){const i=e.x-t.x,o=e.y-t.y,r=Math.sqrt(i*i+o*o)||1;return{x:e.x-i/r*n,y:e.y-o/r*n}}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq))},t.\u0275cmp=o.Xpm({type:t,selectors:[["circle","f-connection-drag-handle",""]],hostVars:2,hostBindings:function(t,e){2&t&&o.Tol(e.class)},attrs:zd,decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Ih=new o.OlP("CONNECTION_GRADIENT");let Sh=(()=>{class t{constructor(t,e){this.elementReference=t,this.base=e}get gradientId(){return yh.gradientId(this.base.fId+this.base.fOutputId+this.base.fInputId)}get hostElement(){return this.elementReference.nativeElement}get stop1Element(){return this.elementReference.nativeElement.children.item(0)}get stop2Element(){return this.elementReference.nativeElement.children.item(1)}initialize(){this.stop1Element.setAttribute("offset","0%"),this.stop2Element.setAttribute("offset","100%")}updateGradient(){this.setFromColor(this.base.fStartColor),this.setToColor(this.base.fEndColor)}setFromColor(t){this.stop1Element.setAttribute("stop-color",t||"transparent")}setToColor(t){this.stop2Element.setAttribute("stop-color",t||"transparent")}redraw(t){const e=t.point2.x-t.point1.x,n=t.point2.y-t.point1.y,i=Math.sqrt(e*e+n*n)||.01,o=new Kl(.5-.5*e/i,.5-.5*n/i);this.hostElement.setAttribute("x1",o.x.toString()),this.hostElement.setAttribute("y1",o.y.toString());const r=new Kl(.5+.5*e/i,.5+.5*n/i);this.hostElement.setAttribute("x2",r.x.toString()),this.hostElement.setAttribute("y2",r.y.toString()),this.updateGradient()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Ah))},t.\u0275cmp=o.Xpm({type:t,selectors:[["linearGradient","fConnectionGradient",""]],hostAttrs:[1,"f-component","f-connection-gradient"],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("id",e.gradientId)},features:[o._Bn([{provide:Ih,useExisting:t}])],attrs:Vd,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"]],template:function(t,e){1&t&&(o.ynx(0,0),o.O4$(),o._UZ(1,"stop"),o._UZ(2,"stop"),o.BQk())},encapsulation:2,changeDetection:0}),t})();const Ph=new o.OlP("CONNECTION_PATH");let Nh=(()=>{class t{constructor(t,e){this.elementReference=t,this.base=e}get fPathId(){return this.base.fId}get linkToGradient(){return yh.linkToGradient(this.base.fId+this.base.fOutputId+this.base.fInputId)}get attrConnectionId(){return yh.connectionId(this.base.fId+this.base.fOutputId+this.base.fInputId)}get hostElement(){return this.elementReference.nativeElement}initialize(){this.deselect()}setPath(t){this.hostElement.setAttribute("d",`${t}`)}select(){this.hostElement.setAttribute("marker-start",`url(#${function(t){return Cd(`f-connection-selected-marker-start-${t}`)}(this.base.fId)}
1)`),this.hostElement.setAttribute("marker-end",`url(#${function(t){return Cd(`f-connection-selected-marker-end-${t}`)}(this.base.fId)})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${function(t){return Cd(`f-connection-marker-start-${t}`)}(this.base.fId)})`),this.hostElement.setAttribute("marker-end",`url(#${function(t){return Cd(`f-connection-marker-end-${t}`)}(this.base.fId)})`)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Ah))},t.\u0275cmp=o.Xpm({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:3,hostBindings:function(t,e){2&t&&o.uIk("id",e.attrConnectionId)("data-f-path-id",e.fPathId)("stroke",e.linkToGradient)},features:[o._Bn([{provide:Ph,useExisting:t}])],attrs:Gd,decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),qh=(()=>{class t{constructor(t,e){this.elementReference=t,this.base=e}get connectionForSelectionId(){return yh.connectionForSelectionId(this.base.fId+this.base.fOutputId+this.base.fInputId)}get hostElement(){return this.elementReference.nativeElement}setPath(t){this.hostElement.setAttribute("d",`${t}`)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Ah))},t.\u0275cmp=o.Xpm({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("id",e.connectionForSelectionId)},attrs:Wd,decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Uh=new o.OlP("F_CONNECTION_BUILDERS");let Eh=(()=>{class t{constructor(t){this.builders={[jh.STRAIGHT]:new wh,[jh.BEZIER]:new xh,[jh.SEGMENT]:new Ch},t&&(this.builders=Object.assign(Object.assign({},this.builders),t))}handle(t){const e=this.builders[t.type];if(!e)throw new Error(`FConnectionBuilder not found for type ${t.type}`);return e.handle(t.payload)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(Uh,8))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const Fh=_p((Dh=class{constructor(t){this.hostElement=t}},class extends Dh{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...t){super(...t)}}));var Dh;let Lh=(()=>{class t extends Fh{constructor(t,e){super(t.nativeElement),this.cFactory=e,this.path="",this.line=Xl.initialize(),this.stateChanges=new fo.xQ,this.penultimatePoint=Wl.initialize()}initialize(){this.fPath.initialize(),this.fGradient.initialize(),this.redraw()}isContains(t){var e;return(null===(e=this.hostElement.firstChild)||void 0===e?void 0:e.lastChild).contains(t)}setLine(t,e,n,i){var o,r;this.line=Xl.initialize(t,n);const s=this.getPathResult(t,e,n,i);this.path=s.path,this.penultimatePoint=s.penultimatePoint||t,null===(r=null===(o=this.fConnectionCenter)||void 0===o?void 0:o.nativeElement)||void 0===r||r.setAttribute("style",this.getTransform(s.connectionCenter))}getPathResult(t,e,n,i){return this.cFactory.handle({type:this.fType,payload:{source:t,sourceSide:e,target:n,targetSide:i,radius:this.fRadius>0?this.fRadius:0,offset:this.fOffset>0?this.fOffset:1}})}getTransform(t){return`position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${t.x}px; top: ${t.y}px`}selectChild(){this.fPath.select()}deselectChild(){this.fPath.deselect()}redraw(){this.fPath.setPath(this.path),this.fSelection.setPath(this.path),this.fGradient.redraw(this.line),this.fDragHandle.redraw(this.penultimatePoint,this.line.point2),this.fTextComponent.redraw(this.line)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Eh))},t.\u0275dir=o.lG2({type:t,features:[o.qOj]}),t})();var Jh=(()=>(function(t){t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating"}(Jh||(Jh={})),Jh))(),jh=(()=>(function(t){t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier"}(jh||(jh={})),jh))();let Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.lG2({type:t,selectors:[["","fConnectionCenter",""]]}),t})(),$h=0,Bh=(()=>{class t extends Lh{constructor(t,e,n,i){super(t,e),this.fComponentsStore=n,this.fMediator=i,this.fId="f-connection-"+$h++,this._fText="",this._fStartColor="black",this._fEndColor="black",this._fRadius=8,this._fOffset=32,this._behavior=Jh.FIXED,this._type=jh.STRAIGHT,this.fDraggingDisabled=!1,this.fSelectionDisabled=!1}set fText(t){this._fText=t,this.fComponentsStore.componentDataChanged()}get fText(){return this._fText}set fStartColor(t){this._fStartColor=t,this.fComponentsStore.componentDataChanged()}get fStartColor(){return this._fStartColor}set fEndColor(t){this._fEndColor=t,this.fComponentsStore.componentDataChanged()}get fEndColor(){return this._fEndColor}set fOutputId(t){this._fOutputId=t,this.fComponentsStore.componentDataChanged()}get fOutputId(){return this._fOutputId}set fInputId(t){this._fInputId=t,this.fComponentsStore.componentDataChanged()}get fInputId(){return this._fInputId}set fRadius(t){this._fRadius=t,this.fComponentsStore.componentDataChanged()}get fRadius(){return this._fRadius}set fOffset(t){this._fOffset=t,this.fComponentsStore.componentDataChanged()}get fOffset(){return this._fOffset}set fBehavior(t){this._behavior=Ad(t,"fBehavior",Jh),this.fComponentsStore.componentDataChanged()}get fBehavior(){return this._behavior}set fType(t){this._type=t,this.fComponentsStore.componentDataChanged()}get fType(){return this._type}get boundingElement(){return this.fPath.hostElement}ngOnInit(){this.fMediator.send(new Ju(this))}ngOnDestroy(){this.fMediator.send(new Gu(this))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Eh),o.Y36(hu),o.Y36(pd))},t.\u0275cmp=o.Xpm({type:t,selectors:[["f-connection"]],contentQueries:function(t,e,n){if(1&t&&o.Suo(n,Rh,5),2&t){let t;o.iGM(t=o.CRH())&&(e.fConnectionCenters=t)}}
1,viewQuery:function(t,e){if(1&t&&(o.Gf(Kd,7),o.Gf(Ph,7),o.Gf(Ih,7),o.Gf(Mh,7),o.Gf(qh,7),o.Gf(kh,7),o.Gf(Xd,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.fDefs=t.first),o.iGM(t=o.CRH())&&(e.fPath=t.first),o.iGM(t=o.CRH())&&(e.fGradient=t.first),o.iGM(t=o.CRH())&&(e.fDragHandle=t.first),o.iGM(t=o.CRH())&&(e.fSelection=t.first),o.iGM(t=o.CRH())&&(e.fTextComponent=t.first),o.iGM(t=o.CRH())&&(e.fConnectionCenter=t.first)}},hostAttrs:[1,"f-component","f-connection"],hostVars:5,hostBindings:function(t,e){2&t&&(o.uIk("id",e.fId),o.ekj("f-connection-selection-disabled",e.fSelectionDisabled)("f-connection-reassign-disabled",e.fDraggingDisabled))},inputs:{fId:["fConnectionId","fId"],fText:"fText",fStartColor:"fStartColor",fEndColor:"fEndColor",fOutputId:"fOutputId",fInputId:"fInputId",fRadius:"fRadius",fOffset:"fOffset",fBehavior:"fBehavior",fType:"fType",fDraggingDisabled:["fReassignDisabled","fDraggingDisabled"],fSelectionDisabled:"fSelectionDisabled"},exportAs:["fComponent"],features:[o._Bn([{provide:Ah,useExisting:t}]),o.qOj],ngContentSelectors:eu,decls:12,vars:3,consts:[["xmlns","http://www.w3.org/2000/svg",2,"overflow","visible","display","block","vertical-align","middle"],["defs",""],[1,"f-connection-group"],["fConnectionGradient",""],["fConnectionSelection",""],["f-connection-path",""],["f-connection-drag-handle","","r","8"],["f-connection-text",""],["class","f-connection-center",4,"ngIf"],[1,"f-connection-center"],["fConnectionCenter",""]],template:function(t,e){1&t&&(o.F$t(tu),o.O4$(),o.TgZ(0,"svg",0),o._UZ(1,"defs",null,1),o.Hsn(3),o.TgZ(4,"g",2),o._UZ(5,"linearGradient",3),o._UZ(6,"path",4),o.TgZ(7,"g"),o._UZ(8,"path",5),o._UZ(9,"circle",6),o.qZA(),o._UZ(10,"text",7),o.qZA(),o.qZA(),o.YNc(11,nu,3,0,"div",8)),2&t&&(o.xp6(6),o.uIk("d",e.path),o.xp6(2),o.uIk("d",e.path),o.xp6(3),o.Q6J("ngIf",e.fConnectionCenters.length))},directives:[Sh,qh,Nh,Mh,Th,to.O5],styles:["[_nghost-%COMP%]{pointer-events:none;position:absolute}[_nghost-%COMP%]   svg[_ngcontent-%COMP%]{overflow:visible}[_nghost-%COMP%]   svg[_ngcontent-%COMP%]   .f-connection-group[_ngcontent-%COMP%]{pointer-events:all}[_nghost-%COMP%]   .f-connection-center[_ngcontent-%COMP%]{pointer-events:all}"],changeDetection:0}),t})();var Hh=(()=>(function(t){t.START="f-connection-marker-start",t.END="f-connection-marker-end",t.SELECTED_START="f-connection-selected-marker-start",t.SELECTED_END="f-connection-selected-marker-end"}(Hh||(Hh={})),Hh))();const Qh=new o.OlP("F_MARKER");let Yh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.lG2({type:t}),t})(),zh=(()=>{class t extends Yh{constructor(t,e){super(),this.fComponentsStore=t,this.elementReference=e,this.width=0,this.height=0,this.refX=0,this.refY=0,this.type=Hh.START,this.orient="auto",this.markerUnits="strokeWidth",this.hostElement.style.display="none"}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.fComponentsStore.addComponent(this.fComponentsStore.fMarkers,this)}ngOnDestroy(){this.fComponentsStore.removeComponent(this.fComponentsStore.fMarkers,this)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(hu),o.Y36(o.SBq))},t.\u0275dir=o.lG2({type:t,selectors:[["svg","fMarker",""]],hostAttrs:[1,"f-component","f-marker"],inputs:{hostElement:"hostElement",width:"width",height:"height",refX:"refX",refY:"refY",type:"type",orient:"orient",markerUnits:"markerUnits"},features:[o._Bn([{provide:Qh,useExisting:t}]),o.qOj]}),t})(),Vh=(()=>{let t=class{constructor(t,e,n,i){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n,this.fBrowser=i}get transform(){return this.fComponentsStore.fCanvas.transform}get flowHost(){return this.fComponentsStore.fFlow.hostElement}get fConnections(){return this.fComponentsStore.fConnections}handle(t){const e=this.getConnectionHandler(this.getDragHandleElement(t.event.getPosition()));e.fDraggingDisabled||(this.fMediator.send(new em(e,this.fComponentsStore.fCanvas.fConnectionsContainer.nativeElement)),this.fDraggableDataContext.onPointerDownScale=this.transform.scale,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost).div(this.transform.scale),this.fDraggableDataContext.draggableItems=[new ph(this.fMediator,this.fComponentsStore,e)])}getDragHandleElement(t){return this.getElementsFromPoint(t).filter(t=>!!this.getConnectionHandler(t)&&t.classList.contains(Oh)).find(t=>!!t)}getElementsFromPoint(t){return this.fBrowser.document.elementsFromPoint(t.x,t.y)}getConnectionHandler(t){return this.fConnections.find(e=>e.isContains(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd
1),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(gh)],t),t})(),Gh=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fBrowser=n}get fConnections(){return this.fComponentsStore.fConnections}handle(t){return!!this.getDragHandleElements(t.event.getPosition()).length&&!this.fDraggableDataContext.draggableItems.length}getDragHandleElements(t){return this.getElementsFromPoint(t).filter(t=>!!this.getConnectionHandler(t)&&t.classList.contains(Oh))}getElementsFromPoint(t){return this.fBrowser.document.elementsFromPoint(t.x,t.y)}getConnectionHandler(t){return this.fConnections.find(e=>e.isContains(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(gh)],t),t})();const Wh=[zp,Vp,Gp,Kp,th,nh,Bp,Hp,oh,rh,ah,ch,uh,hh,Vh,Gh];class Kh{constructor(t,e){this.fNode=t,this.rect=e}}let Xh=(()=>{let t=class{constructor(t){this.fBrowser=t}handle(t){return t.fNode.fIncludePadding?this.getPaddingData(t.fNode,t.rect):[0,0,0,0]}getPaddingData(t,e){const n=this.fBrowser.window.getComputedStyle(t.hostElement);return[this.fBrowser.toPixels(n.paddingLeft,e.width,e.height,n.fontSize),this.fBrowser.toPixels(n.paddingTop,e.width,e.height,n.fontSize),this.fBrowser.toPixels(n.paddingRight,e.width,e.height,n.fontSize),this.fBrowser.toPixels(n.paddingBottom,e.width,e.height,n.fontSize)]}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Kh)],t),t})();class tg{constructor(t){this.fNode=t}}let eg=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.normalizeRect(ed.fromElement(t.fNode.hostElement),t.fNode.position)}normalizeRect(t,e){const n=ed.div(t,this.fComponentsStore.fCanvas.transform.scale);return ed.initialize(e.x,e.y,n.width,n.height)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(tg)],t),t})();class ng{constructor(t){this.fNode=t}}let ig=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){let e=ed.initialize(-1/0,-1/0,1/0,1/0);const n=this.getNode(t.fNode.fParentId);return n&&(e=this.getParentRect(n)),e}getNode(t){return this.fComponentsStore.fNodes.find(e=>e.fId===t)}getParentRect(t){const e=this.getNormalizedNodeRect(t),n=this.getNodePadding(t,e);return ed.initialize(e.x+n[0],e.y+n[1],e.width-n[0]-n[2],e.height-n[1]-n[3])}getNormalizedNodeRect(t){return this.fMediator.send(new tg(t))}getNodePadding(t,e){return this.fMediator.send(new Kh(t,e))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(ng)],t),t})();class og{constructor(t){this.fNode=t}}let rg=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.getParentNodes(t.fNode,new Set,[])}getParentNodes(t,e,n){if(e.has(t.fId))throw new Error("Circular reference detected in the node hierarchy. Node id: "+t.fId);e.add(t.fId);const i=this.fComponentsStore.fNodes.find(e=>e.fId===t.fParentId);return i?(n.push(i),this.getParentNodes(i,e,n)):n}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(og)],t),t})();class sg{constructor(t,e){this.fNode=t,this.fNodes=e}}let ag=(()=>{let t=class{constructor(t){this.fMediator=t}handle(t){return this.isParentNodeInArray(this.getParentNodeIds(t.fNode),t.fNodes)}getParentNodeIds(t){return this.getParentNodes(t).map(t=>t.fId)}getParentNodes(t){return this.fMediator.send(new og(t))}isParentNodeInArray(t,e){return e.some(e=>t.includes(e.fId))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(sg)],t),t})();const cg=[Xh,eg,ig,rg,ag];class lg{constructor(t,e,n){this.nodeDragHandler=t,this.outputIds=e,this.result=n}}let dg=(()=>{class t{constructor(t,e,n){this.fMediator=t,this.fComponentsStore=e,this.connection=n}initialize(){this.fOutputWithRect=this.fMediator.send(new Hu(this.getOutput())),this.fInputWithRect=this.fMediator.send(new Hu(this.getInput()))}getOutput(){const t=this.fComponentsStore.fOutputs.find(t=>
1t.id===this.connection.fOutputId);if(!t)throw new Error(this.connectorNotFoundPrefix(`fOutput with id ${this.connection.fOutputId} not found`));return t}getInput(){const t=this.fComponentsStore.fInputs.find(t=>t.id===this.connection.fInputId);if(!t)throw new Error(this.connectorNotFoundPrefix(`fInput with id ${this.connection.fInputId} not found`));return t}connectorNotFoundPrefix(t){return`ConnectionDragHandler Error: Connection From (fOutput)${this.connection.fOutputId} To (fInput)${this.connection.fInputId}. ${t}. Please ensure that all f-connections are associated with existing connectors`}getDifference(t,e){return{x:Math.min(Math.max(t.x,e.min.x),e.max.x),y:Math.min(Math.max(t.y,e.min.y),e.max.y)}}redrawConnection(t){this.connection.setLine(t.point1,this.fOutputWithRect.fConnector.fConnectableSide,t.point2,this.fInputWithRect.fConnector.fConnectableSide),this.connection.redraw()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(pd),o.Y36(hu),o.Y36(Lh))},t.\u0275dir=o.lG2({type:t}),t})();class ug extends dg{constructor(t,e,n){super(t,e,n)}setOutputRestrictions(t,e){this.sourceRestrictions={min:t,max:e}}setInputRestrictions(t,e){this.targetRestrictions={min:t,max:e}}move(t){this.redrawConnection(this.getNewLineValue(t))}getNewLineValue(t){return this.fMediator.send(new cm(nd.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({},t),this.sourceRestrictions)),nd.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({},t),this.targetRestrictions)),this.connection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,this.fInputWithRect.fConnector.fConnectableSide))}}class pg extends dg{constructor(t,e,n,i,o){super(t,e,n),this.minDistance=i,this.maxDistance=o}move(t){this.redrawConnection(this.getNewLineValue(t))}getNewLineValue(t){return this.fMediator.send(new cm(nd.fromRoundedRect(this.fOutputWithRect.fRect),nd.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({},t),{min:this.minDistance,max:this.maxDistance})),this.connection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,this.fInputWithRect.fConnector.fConnectableSide))}}let hg=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get fConnections(){return this.fComponentsStore.fConnections}handle(t){this.getInputConnections(t.nodeDragHandler.fNode).forEach(e=>{const n=this.getExistingConnectionHandlerIndex(t.result,e);-1!==n?this.updateExistingConnectionHandler(t.result,n,t.nodeDragHandler):t.result.push(this.createNewConnectionHandler(t.nodeDragHandler,t.outputIds,e))})}getInputConnections(t){const e=new Set(this.getInputsForNode(t).map(t=>t.id));return this.fConnections.filter(t=>e.has(t.fInputId))}getInputsForNode(t){return this.fComponentsStore.fInputs.filter(e=>t.isContains(e.hostElement))}getExistingConnectionHandlerIndex(t,e){return t.findIndex(t=>t instanceof ug&&t.connection.fId===e.fId)}createNewConnectionHandler(t,e,n){let i;return i=e.includes(n.fOutputId)?this.getNewConnectionHandler(n,t):this.getNewSourceConnectionHandler(n,t),i}getNewConnectionHandler(t,e){const n=new ug(this.fMediator,this.fComponentsStore,t);return n.setInputRestrictions(e.minDistance,e.maxDistance),n}updateExistingConnectionHandler(t,e,n){t[e].setInputRestrictions(n.minDistance,n.maxDistance)}getNewSourceConnectionHandler(t,e){return new pg(this.fMediator,this.fComponentsStore,t,e.minDistance,e.maxDistance)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(lg)],t),t})();class gg{constructor(t,e,n){this.nodeDragHandler=t,this.inputIds=e,this.result=n}}class fg extends dg{constructor(t,e,n,i,o){super(t,e,n),this.minDistance=i,this.maxDistance=o}move(t){this.redrawConnection(this.getNewLineValue(t))}getNewLineValue(t){return this.fMediator.send(new cm(nd.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({},t),{min:this.minDistance,max:this.maxDistance})),nd.fromRoundedRect(this.fInputWithRect.fRect),this.connection.fBehavior,this.fOutputWithRect.fConnector.fConnectableSide,this.fInputWithRect.fConnector.fConnectableSide))}}let mg=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get fConnections(){return this.fComponentsStore.fConnections}handle(t){this.getOutputConnections(t.nodeDragHandler.fNode).forEach(e
1=>{const n=this.getExistingConnectionHandlerIndex(t.result,e);-1!==n?this.updateExistingConnectionHandler(t.result,n,t.nodeDragHandler):t.result.push(this.createNewConnectionHandler(t.nodeDragHandler,t.inputIds,e))})}getOutputConnections(t){const e=new Set(this.getOutputsForNode(t).map(t=>t.id));return this.fConnections.filter(t=>e.has(t.fOutputId))}getOutputsForNode(t){return this.fComponentsStore.fOutputs.filter(e=>t.isContains(e.hostElement))}getExistingConnectionHandlerIndex(t,e){return t.findIndex(t=>t instanceof ug&&t.connection.fId===e.fId)}createNewConnectionHandler(t,e,n){let i;return i=e.includes(n.fInputId)?this.getNewConnectionHandler(n,t):this.getNewSourceConnectionHandler(n,t),i}getNewConnectionHandler(t,e){const n=new ug(this.fMediator,this.fComponentsStore,t);return n.setOutputRestrictions(e.minDistance,e.maxDistance),n}updateExistingConnectionHandler(t,e,n){t[e].setOutputRestrictions(n.minDistance,n.maxDistance)}getNewSourceConnectionHandler(t,e){return new fg(this.fMediator,this.fComponentsStore,t,e.minDistance,e.maxDistance)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(gg)],t),t})();class vg{constructor(t,e){this.fNode=t,this.hasParentNodeInSelected=e}}let bg=(()=>{let t=class{constructor(t){this.fMediator=t}handle(t){if(t.fNode.fParentId&&!t.hasParentNodeInSelected){const e=this.getParentNodeRect(t.fNode),n=this.getCurrentNodeRect(t.fNode);return{min:Wl.initialize(e.x-n.x,e.y-n.y),max:Wl.initialize(e.x+e.width-(n.x+n.width),e.y+e.height-(n.y+n.height))}}return Object.assign({},xg)}getCurrentNodeRect(t){return this.fMediator.send(new tg(t))}getParentNodeRect(t){return this.fMediator.send(new ng(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(vg)],t),t})();const xg={min:Wl.initialize(-1/0,-1/0),max:Wl.initialize(1/0,1/0)};class _g{constructor(t){this.nodeWithDisabledSelection=t}}class Cg{constructor(t,e,n,i){this.fDraggableDataContext=t,this.fNode=e,this.minDistance=n,this.maxDistance=i,this.onPointerDownPosition=Wl.initialize(),this.onPointerDownPosition=Object.assign({},e.position)}move(t){var e;const n=this.getDifference(t,{min:this.minDistance,max:this.maxDistance});this.redrawNode(this.getNewPosition(n)),null===(e=this.fDraggableDataContext.fLineAlignment)||void 0===e||e.handle(n)}getNewPosition(t){return Kl.fromPoint(this.onPointerDownPosition).add(t)}getDifference(t,e){return{x:Math.min(Math.max(t.x,e.min.x),e.max.x),y:Math.min(Math.max(t.y,e.min.y),e.max.y)}}redrawNode(t){this.fNode.updatePosition(t),this.fNode.redraw()}complete(){this.fNode.positionChange.emit(this.fNode.position)}}class wg{constructor(t){this.fDraggableDataContext=t,this.onPointerDownPosition=Wl.initialize()}move(t){}complete(){}}let yg=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}handle(t){const e=this.getNodesWithRestrictions(this.getSelectedNodes(t.nodeWithDisabledSelection));return this.getDragHandlersWithConnections(this.getDragHandlersFromNodes(e),this.getAllOutputIds(e),this.getAllInputIds(e))}getSelectedNodes(t){const e=this.fDraggableDataContext.selectedItems.map(t=>this.fComponentsStore.findNode(t.hostElement)).filter(t=>!!t);return t&&e.push(t),e}getNodesWithRestrictions(t){const e=[];return t.forEach(n=>{const i=this.fMediator.send(new sg(n,t)),o=this.fMediator.send(new vg(n,i)),r=this.fMediator.send(new og(n));e.push(Object.assign({node:n,parentNodes:r},o),...this.getChildrenItemsToDrag(n,o))}),e}getChildrenItemsToDrag(t,e){return this.getChildrenNodes(t.fId).map(t=>Object.assign({node:t},e))}getChildrenNodes(t){return this.fMediator.send(new nm(t))}getAllOutputIds(t){return fd(t,t=>this.getOutputsForNode(t.node).map(t=>t.id))}getOutputsForNode(t){return this.fComponentsStore.fOutputs.filter(e=>t.isContains(e.hostElement))}getAllInputIds(t){return fd(t,t=>this.getInputsForNode(t.node).map(t=>t.id))}getInputsForNode(t){return this.fComponentsStore.fInputs.filter(e=>t.isContains(e.hostElement))}getDragHandlersFromNodes(t){let e=[];return t.forEach(t=>{e.push(new Cg(this.fDraggableDataContext,t.node,t.min,t.max),...(t.parentNodes||[]).map(t=>new wg(this.fDraggableDataContext)))}),e}getDragHandlersWithConnections(t,e,n){let i=t;return t.filter(t=>t instanceof Cg).forEach(t=>{this.fMediator.send(new gg(t,n,i)),this.fMediator.send(new lg(t,e,i))}),i}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd
1))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(_g)],t),t})();const Ag=[bg,hg,mg,yg];class Zg{constructor(t){this.event=t}}let kg=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get transform(){return this.fComponentsStore.fCanvas.transform}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){const e=this.getNode(t.event.targetElement);if(!e)throw new Error("Node not found");let n=[];e.fSelectionDisabled?n=this.createDragModelFromSelection(e):(this.selectAndUpdateNodeLayer(e),n=this.createDragModelFromSelection()),this.initializeLineAlignment(this.filterNodesFromDraggableItems(n)),this.fDraggableDataContext.onPointerDownScale=this.transform.scale,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost).div(this.transform.scale),this.fDraggableDataContext.draggableItems=n}selectAndUpdateNodeLayer(t){this.fMediator.send(new Kf(t))}getNode(t){return this.fComponentsStore.findNode(t)}createDragModelFromSelection(t){return this.fMediator.send(new _g(t))}initializeLineAlignment(t){var e;null===(e=this.fDraggableDataContext.fLineAlignment)||void 0===e||e.initialize(this.fComponentsStore.fNodes,t)}filterNodesFromDraggableItems(t){return t.filter(t=>t instanceof Cg).map(t=>t.fNode)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Zg)],t),t})(),Tg=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}handle(t){return this.isDragHandlesEmpty()&&this.isDragHandleElement(t.event.targetElement)&&this.isNodeCanBeDragged(this.getNode(t.event.targetElement))}isDragHandlesEmpty(){return!this.fDraggableDataContext.draggableItems.length}getNode(t){return this.fComponentsStore.findNode(t)}isNodeCanBeDragged(t){return!!t&&!t.fDraggingDisabled}isDragHandleElement(t){return _d(t,".f-drag-handle")}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Zg)],t),t})();const Og=[kg,Tg];class Mg{constructor(t){this.event=t}}class Ig{}let Sg=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){var e;const n=this.getDifferenceWithLineAlignment(this.getDifferenceBetweenPreparationAndFinalize(t.event.getPosition()));this.fDraggableDataContext.draggableItems.forEach(t=>{var e;t.move(Object.assign({},n)),null===(e=t.complete)||void 0===e||e.call(t)}),this.fMediator.send(new Ig),null===(e=this.fDraggableDataContext.fLineAlignment)||void 0===e||e.complete()}getDifferenceBetweenPreparationAndFinalize(t){return Kl.fromPoint(t).elementTransform(this.flowHost).div(this.fDraggableDataContext.onPointerDownScale).sub(this.fDraggableDataContext.onPointerDownPosition)}getDifferenceWithLineAlignment(t){var e;const n=null===(e=this.fDraggableDataContext.fLineAlignment)||void 0===e?void 0:e.findNearestCoordinate(t);return n&&(t.x=n.xResult.value?t.x-n.xResult.distance:t.x,t.y=n.yResult.value?t.y-n.yResult.distance:t.y),t}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Mg)],t),t})(),Pg=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof Cg)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Mg)],t),t})();const Ng=[...Ag,Sg,Pg,...Og];class qg{constructor(t,e){this.rect=t,this.restrictionsRect=e}}let Ug=(()=>{let t=class{handle(t){this.applyRestrictions(t.rect,t.restrictionsRect)}applyRestrictions(t,e){this.left(t,e),this.top(t,e),this.right(t,e),this.bottom(t,e)}left(t,e){t.x>e.x-0&&(t.width+=t.x-e.x-0,t.x=e.x-0)}top(t,e){t.y>e.y-0&&(t.height+=t.y-e.y-0,t.y=e.y-0)}right(t,e){t.x+t.width<=e.x+e.width+0&&(t.width=e.x+e.width-t.x+0)}bottom(t,e){t.y+t.height<=e.y+e.height+0&&(t.height=e.y+e.height-t.y+0)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(qg)],t),t})();class Eg{constructor(t,e){this.rect=t,this.restrictionsRect=e}}let Fg=(()=>{let t=class{handle(t){this.applyRestrictions(t.rect,t.restrictionsRect)}applyRestrictions(t,e){this.left(t,e),this.top(t,e),this.right(t,e),this.bottom(t,e)}left(t,e){t.x<=e.x+0&&(t.width-=e.x-t.x+0,t.x=e.x+0)}top(t,e){t.y<=e.y+0&&(t.height-=e.y-t.y+0,t.y=e.y+0)}right(t,e){t.x+t.width>e.x+e.width-0&&(t.width=e.x+e.width-t.x-0)}bottom(t,e){t.y+t.height>e.y+e.height-0&&(t.height=e.y+e.height-t.y-0)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Eg)],t),t})();class Dg{constructor(t,e,n,i){this.originalRect=t,this.changedRect=e,this.difference=n,this.fResizeHandleType=i}}const Lg={[bp.LEFT_TOP]:{x:-1,y:-1},[bp.RIGHT_TOP]:{x:1,y:-1},[bp.RIGHT_BOTTOM]:{x:1,y:1},[bp.LEFT_BOTTOM]:{x:-1,y:1}};let Jg=(()=>{let t=class{handle(t){return this.change(t.originalRect,t.difference,Lg[t.fResizeHandleType],t.changedRect)}change(t,e,n,i){return ed.initialize(t.x+(-1===n.x?e.x:0)+i.x,t.y+(-1===n.y?e.y:0)+i.y,i.width,i.height)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Dg)],t),t})();
1class jg{constructor(t,e,n){this.originalRect=t,this.difference=e,this.fResizeHandleType=n}}let Rg=(()=>{let t=class{handle(t){return this.change(t.originalRect,t.difference,Lg[t.fResizeHandleType])}change(t,e,n){const i=ed.initialize(0,0,t.width+n.x*e.x,t.height+n.y*e.y);return i.width<0&&(i.x=i.width,i.width=Math.abs(i.width)),i.height<0&&(i.y=i.height,i.height=Math.abs(i.height)),ed.copy(i)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(jg)],t),t})();class $g{constructor(t,e){this.fNode=t,this.paddings=e}}let Bg=(()=>{let t=class{constructor(t){this.fMediator=t}handle(t){const e=ed.union(this.getChildrenNodes(t.fNode.fId).map(t=>this.normalizeRect(t)));return e?this.concatRectWithParentPadding(e,t.paddings):null}getChildrenNodes(t){return this.fMediator.send(new nm(t))}normalizeRect(t){return this.fMediator.send(new tg(t))}concatRectWithParentPadding(t,e){return ed.initialize(t.x-e[0],t.y-e[1],t.width+e[0]+e[2],t.height+ +e[1]+e[3])}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd($g)],t),t})();class Hg{constructor(t,e){this.fNode=t,this.rect=e}}let Qg=(()=>{let t=class{constructor(t){this.fMediator=t}handle(t){const e=this.getNodePaddings(t.fNode,t.rect),n=this.fMediator.send(new $g(t.fNode,e));return{parentRect:this.fMediator.send(new ng(t.fNode)),childRect:n,minSize:id.initialize(e[0]+e[2],e[1]+e[3])}}getNodePaddings(t,e){return this.fMediator.send(new Kh(t,e))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Hg)],t),t})();class Yg{constructor(t){this.event=t}}let zg=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){this.fDraggableDataContext.draggableItems.forEach(t=>{var e;null===(e=t.complete)||void 0===e||e.call(t)})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Yg)],t),t})();class Vg{constructor(t,e,n){this.fMediator=t,this.fNode=e,this.fResizeHandleType=n,this.childRestrictions=()=>{}}initialize(){this.originalRect=this.fMediator.send(new tg(this.fNode)),this.restrictions=this.fMediator.send(new Hg(this.fNode,this.originalRect)),this.restrictions.childRect&&(this.childRestrictions=(t,e)=>{this.applyChildRestrictions(t,e)})}move(t){const e=this.changePosition(t,this.changeSize(t,this.restrictions.minSize));this.childRestrictions(e,this.restrictions.childRect),this.applyParentRestrictions(e,this.restrictions.parentRect),this.fNode.updatePosition(e),this.fNode.updateSize(e),this.fNode.redraw()}changeSize(t,e){return this.fMediator.send(new jg(this.originalRect,t,this.fResizeHandleType))}changePosition(t,e){return this.fMediator.send(new Dg(this.originalRect,e,t,this.fResizeHandleType))}applyChildRestrictions(t,e){this.fMediator.send(new qg(t,e))}applyParentRestrictions(t,e){this.fMediator.send(new Eg(t,e))}complete(){var t,e;this.fNode.sizeChange.emit(ed.initialize(this.fNode.position.x,this.fNode.position.y,null===(t=this.fNode.size)||void 0===t?void 0:t.width,null===(e=this.fNode.size)||void 0===e?void 0:e.height))}}let Gg=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof Vg)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Yg)],t),t})();const Wg=[zg,Gg];class Kg{constructor(t){this.event=t}}let Xg=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get transform(){return this.fComponentsStore.fCanvas.transform}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){this.selectAndUpdateNodeLayer(t.event.targetElement);const e=function(t,e,n){return function(t,e){return t.closest(".f-resize-handle")}(t).dataset.fResizeHandleType}(t.event.targetElement),n=[new Vg(this.fMediator,this.getNode(t.event.targetElement),bp[e])];this.fDraggableDataContext.onPointerDownScale=this.transform.scale,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost).div(this.transform.scale),this.fDraggableDataContext.draggableItems=n}selectAndUpdateNodeLayer(t){this.fMediator.send(new Kf(this.getNode(t)))}getNode(t){return this.fComponentsStore.findNode(t)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd
1))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Kg)],t),t})(),tf=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}handle(t){return this.isDragHandlesEmpty()&&this.isDragHandleElement(t.event.targetElement)&&this.isNodeCanBeDragged(this.getNode(t.event.targetElement))}isDragHandlesEmpty(){return!this.fDraggableDataContext.draggableItems.length}getNode(t){return this.fComponentsStore.findNode(t)}isNodeCanBeDragged(t){return!!t&&!t.fDraggingDisabled}isDragHandleElement(t){return _d(t,".f-resize-handle")}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Kg)],t),t})();const ef=[Ug,Fg,Jg,Rg,Bg,Qg,...Wg,Xg,tf];class nf{constructor(t){this.event=t}}let of=(()=>{let t=class{constructor(t,e,n,i){this.fPlatform=t,this.fComponentsStore=e,this.fDraggableDataContext=n,this.fMediator=i}handle(t){const{event:e}=t,n=this.getSelectableItem(e);n&&this.fMediator.send(new em(n,n.hostElement.parentElement)),this.isMultiselectEnabled(e)?this.multiSelect(n):this.singleSelect(n)}getSelectableItem(t){return this.fComponentsStore.findNode(t.targetElement)||this.getConnectionHandler(t.targetElement)}getConnectionHandler(t){return this.fComponentsStore.fConnections.find(e=>{var n,i;return e.isContains(t)||(null===(i=null===(n=e.fConnectionCenter)||void 0===n?void 0:n.nativeElement)||void 0===i?void 0:i.contains(t))})}isMultiselectEnabled(t){return this.isCommandButton(this.fPlatform.getOS(),t.originalEvent)||this.isShiftPressed(t.originalEvent)}isShiftPressed(t){return t.shiftKey}isCommandButton(t,e){return t===Ud.MAC_OS?e.metaKey:e.ctrlKey}singleSelect(t){t?t.isSelected()||t.fSelectionDisabled?t.fSelectionDisabled&&this.clearSelection():(this.clearSelection(),this.selectItem(t)):this.clearSelection()}multiSelect(t){t&&!t.fSelectionDisabled&&(t.isSelected()?this.deselectItem(t):this.selectItem(t))}deselectItem(t){const e=this.fDraggableDataContext.selectedItems.indexOf(t);e>-1&&this.fDraggableDataContext.selectedItems.splice(e,1),t.deselect(),this.fDraggableDataContext.markSelectionAsChanged()}selectItem(t){this.fDraggableDataContext.selectedItems.push(t),t.select(),this.fDraggableDataContext.markSelectionAsChanged()}clearSelection(){this.fDraggableDataContext.selectedItems.forEach(t=>{t.deselect(),this.fDraggableDataContext.markSelectionAsChanged()}),this.fDraggableDataContext.selectedItems=[]}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(Dd),o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(nf)],t),t})(),rf=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}handle(t){return this.fComponentsStore.fFlow.hostElement.contains(t.event.targetElement)&&!this.fDraggableDataContext.draggableItems.length}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(nf)],t),t})();const sf=[of,rf];let af=(()=>{class t extends class{constructor(t){this.ngZone=t,this.mouseListeners=Qd.emptyListener(),this.touchListeners=Qd.emptyListener(),this.startListeners=Qd.emptyListener(),this.lastTouchEventTime=0,this.isDragStarted=!1,this.dragStartThreshold=3,this.dragStartDelay=0,this.dragStartTime=0,this.dragStartPosition={x:0,y:0},this.moveHandler=this.checkDragSequenceToStart,this.pointerDownElement=null,this.onMouseDown=t=>{var e;const n=this.isSyntheticEvent(t),i=0===(r=t).buttons||0===r.offsetX&&0===r.offsetY,o=new Rd(t);var r;this.pointerDownElement=o.targetElement,n||i||this.disabled||this.onPointerDown(o)&&(this.dragStartTime=Date.now(),this.dragStartPosition=o.getPosition(),null===(e=this.ngZone)||void 0===e||e.runOutsideAngular(()=>{var t,e,n;null===(t=this.document)||void 0===t||t.addEventListener("selectstart",this.onSelectStart,Qd.activeListener()),null===(e=this.document)||void 0===e||e.addEventListener("mousemove",this.onMouseMove),null===(n=this.document)||void 0===n||n.addEventListener("mouseup",this.onMouseUp)}),this.mouseListeners=()=>{var t,e,n;null===(t=this.document)||void 0===t||t.removeEventListener("selectstart",this.onSelectStart,Qd.activeListener()),null===(e=this.document)||void 0===e||e.removeEventListener("mousemove",this.onMouseMove),null===(n=this.document)||void 0===n||n.removeEventListener("mouseup",this.onMouseUp)})},this.onTouchDown=t=>{var e;const n=function(t){const e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t),i=new $d(t);this.pointerDownElement=i.targetElement,n||this.disabled||this.onPointerDown(i)&&(this.dragStartTime=Date.now(),this.dragStartPosition=i.getPosition(),null===(e=this.ngZone)||void 0===e||e.runOutsideAngular(()=>{var t,e,n;null===(t=this.document)||void 0===t||t.addEventListener("selectstart",this.onSelectStart,Qd.activeListener()),null===(e=this.document)||void 0===e||e.addEventListener("touchmove",this.onTouchMove),null===(n=this.document)||void 0===n||n.addEventListener("touchend",this.onTouchUp
1)}),this.touchListeners=()=>{var t,e,n;null===(t=this.document)||void 0===t||t.removeEventListener("selectstart",this.onSelectStart,Qd.activeListener()),null===(e=this.document)||void 0===e||e.removeEventListener("touchmove",this.onTouchMove),null===(n=this.document)||void 0===n||n.removeEventListener("touchend",this.onTouchUp)})},this.onSelectStart=t=>{this.onSelect(t)},this.onMouseMove=t=>{this.moveHandler(new Rd(t))},this.onTouchMove=t=>{this.moveHandler(new Bd(t))},this.onMouseUp=t=>{this.isDragStarted&&this.onPointerUp(new Rd(t)),this.endDragSequence()},this.onTouchUp=t=>{this.isDragStarted&&this.onPointerUp(new Hd(t)),this.endDragSequence()}}isSyntheticEvent(t){return!!this.lastTouchEventTime&&this.lastTouchEventTime+800>Date.now()}checkDragSequenceToStart(t){const e=t.getPosition();if(!this.isDragStarted&&this.pointerDownElement&&(t.setTarget(this.pointerDownElement),Math.abs(e.x-this.dragStartPosition.x)+Math.abs(e.y-this.dragStartPosition.y)>=this.dragStartThreshold)){if(!(Date.now()>=this.dragStartTime+this.dragStartDelay))return void this.endDragSequence();t.preventDefault(),this.prepareDragSequence(t),this.isDragStarted=!0,this.moveHandler=this.onPointerMove,"t"===t.originalEvent.type[0]&&(this.lastTouchEventTime=Date.now())}}endDragSequence(){this.isDragStarted=!1,this.pointerDownElement=null,this.moveHandler=this.checkDragSequenceToStart,this.mouseListeners(),this.mouseListeners=Qd.emptyListener(),this.touchListeners(),this.touchListeners=Qd.emptyListener(),this.finalizeDragSequence()}subscribe(t){var e;this.document&&this.unsubscribe(),this.document=t,null===(e=this.ngZone)||void 0===e||e.runOutsideAngular(()=>{t.addEventListener("mousedown",this.onMouseDown,Qd.activeListener()),t.addEventListener("touchstart",this.onTouchDown,Qd.passiveListener())}),this.startListeners=()=>{t.removeEventListener("mousedown",this.onMouseDown,Qd.activeListener()),t.removeEventListener("touchstart",this.onTouchDown,Qd.passiveListener())}}unsubscribe(){this.startListeners(),this.startListeners=Qd.emptyListener(),this.touchListeners(),this.touchListeners=Qd.emptyListener(),this.mouseListeners(),this.mouseListeners=Qd.emptyListener()}}{constructor(t){super(t)}}return t.\u0275fac=function(t){o.$Z()},t.\u0275dir=o.lG2({type:t,features:[o.qOj]}),t})();class cf{constructor(t){this.event=t}}class lf{constructor(t,e){this.rect=t,this.data=e}}let df=(()=>{let t=class{constructor(t,e,n,i){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n,this.fBrowser=i}get flowHost(){return this.fComponentsStore.fFlow.hostElement}get fCreateNode(){return this.fComponentsStore.fDraggable.fCreateNode}get dragHandler(){return this.fDraggableDataContext.draggableItems[0]}handle(t){this.emitEvent(this.getExternalItemElementsFromPoint(t.event.getPosition())),this.dragHandler.complete()}getExternalItemElementsFromPoint(t){return this.fBrowser.document.elementsFromPoint(t.x,t.y).filter(t=>!t.closest(".f-external-item"))}emitEvent(t){this.isPointerInCanvasRect(t)&&this.fCreateNode.emit(new lf(this.getRectInCanvas(),this.dragHandler.externalItem.fData))}isPointerInCanvasRect(t){return!!t.length&&this.flowHost.contains(t[0])}getRectInCanvas(){return this.fMediator.send(new Qu(this.dragHandler.placeholder))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(cf)],t),t})();class uf{constructor(t,e){this.externalItem=t,this.fBrowser=e,this.onPointerDownRect=ed.initialize(),this.difference=Wl.initialize()}getStyle(t){return`position: absolute; left: 0; top: 0; transform: translate(${t.x}px, ${t.y}px)`}initialize(){this.onPointerDownRect=this.getExternalItemRect(),this.placeholder=function(t){const e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let o=0;o<n.length;o++)n[o].removeAttribute("id");return"canvas"===i?xd(t,e):("input"===i||"select"===i||"textarea"===i)&&bd(t,e),md("canvas",t,e,xd),md("input, textarea, select",t,e,bd),e}(this.externalItem.hostElement),this.placeholder.setAttribute("style",this.get
1Style(Kl.fromPoint(this.onPointerDownRect))),this.fBrowser.document.body.appendChild(this.placeholder)}getExternalItemRect(){const t=this.externalItem.hostElement.getBoundingClientRect();return ed.initialize(t.left+(this.fBrowser.window.pageXOffset||this.fBrowser.document.documentElement.scrollLeft),t.top+(this.fBrowser.window.pageYOffset||this.fBrowser.document.documentElement.scrollTop),t.width,t.height)}move(t){this.difference=t;const e=Kl.fromPoint(this.onPointerDownRect).add(this.difference);this.placeholder.setAttribute("style",this.getStyle(e))}complete(){this.fBrowser.document.body.removeChild(this.placeholder)}}let pf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof uf)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(cf)],t),t})();const hf=[df,pf];class gf{constructor(t){this.event=t}}let ff=(()=>{let t=class{constructor(t,e,n,i){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fExternalItemService=n,this.fBrowser=i}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){this.fDraggableDataContext.onPointerDownScale=1,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost),this.fDraggableDataContext.draggableItems=[new uf(this.getExternalItem(t.event.targetElement),this.fBrowser)]}getExternalItem(t){return this.fExternalItemService.getItem(xf(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(_f),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(gf)],t),t})(),mf=(()=>{let t=class{constructor(t){this.fExternalItemService=t}handle(t){const e=this.getExternalItem(t.event.targetElement);return bf(t.event.targetElement)&&!!e&&!e.fDisabled}getExternalItem(t){return this.fExternalItemService.getItem(xf(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(_f))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(gf)],t),t})();const vf=[...hf,ff,mf];function bf(t){return!!t.closest("[fExternalItem]")}function xf(t){return t.closest("[fExternalItem]")}new o.OlP("F_EXTERNAL_ITEM");let _f=(()=>{class t{constructor(){this.items=[]}registerItem(t){this.items.push(t)}getItem(t){return this.items.find(e=>e.hostElement===t)}removeItem(t){const e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Cf=new o.OlP("F_DRAG_AND_DROP_PLUGIN");let wf=(()=>{class t extends af{constructor(t,e,n,i,r,s){super(n),this.elementReference=t,this.fDraggableDataContext=e,this.fComponentsStore=i,this.fMediator=r,this.fBrowser=s,this.subscriptions$=new pi.w,this.disabled=!1,this.fSelectionChange=new o.vpe,this.fCreateNode=new o.vpe,this.fReassignConnection=new o.vpe,this.fCreateConnection=new o.vpe}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.fComponentsStore.fDraggable=this}ngAfterViewInit(){super.subscribe(this.fBrowser.document)}onPointerDown(t){this.fDraggableDataContext.reset();let e=t.isMouseLeftButton();return this.plugins.forEach(e=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t)}),this.fMediator.send(new nf(t)),this.fMediator.send(new gh(t)),this.fMediator.send(new sh(t)),e||this.finalizeDragSequence(),e}prepareDragSequence(t){this.plugins.forEach(e=>{var n;null===(n=e.prepareDragSequence)||void 0===n||n.call(e,t)}),this.fMediator.send(new Kg(t)),this.fMediator.send(new Zg(t)),this.fMediator.send(new sp(t)),this.fMediator.send(new gf(t)),this.fDraggableDataContext.draggableItems.forEach(t=>{var e;null===(e=t.initialize)||void 0===e||e.call(t)}),this.fDraggableDataContext.draggableItems.length>0&&(this.hostElement.classList.add("f-dragging"),this.emitSelectionChangeEvent())}onSelect(t){this.plugins.forEach(e=>{var n;null===(n=e.onSelect)||void 0===n||n.call(e,t)}),this.isTargetItemExternal(t)&&t.preventDefault()}isTargetItemExternal(t){let e=this.isExternalItem(t.target),n=this.isExternalItem(t.target.parentNode);return e||n}isExternalItem(t){let e=!1;try{e=bf(t)}catch(n){}return e}onPointerMove(t){const e=Kl.fromPoint(t.getPosition()).elementTransform(this.hostElement).div(this.fDraggableDataContext.onPointerDownScale).sub(this.fDraggableDataContext.onPointerDownPosition);
1this.fDraggableDataContext.draggableItems.forEach(t=>{t.move(Object.assign({},e))})}onPointerUp(t){this.plugins.forEach(e=>{var n;null===(n=e.onPointerUp)||void 0===n||n.call(e,t)}),this.fMediator.send(new lh(t)),this.fMediator.send(new Fp(t)),this.fMediator.send(new Yg(t)),this.fMediator.send(new Mg(t)),this.fMediator.send(new tp(t)),this.fMediator.send(new cf(t)),this.hostElement.classList.remove("f-dragging"),this.fDraggableDataContext.reset()}finalizeDragSequence(){this.emitSelectionChangeEvent()}emitSelectionChangeEvent(){!this.fDraggableDataContext.isSelectedChanged||(this.fSelectionChange.emit(this.fMediator.send(new Qf)),this.fDraggableDataContext.isSelectedChanged=!1,this.fMediator.send(new xu))}ngOnDestroy(){super.unsubscribe(),this.subscriptions$.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(ep),o.Y36(o.R0b,8),o.Y36(hu),o.Y36(pd),o.Y36(Jd))},t.\u0275dir=o.lG2({type:t,selectors:[["f-flow","fDraggable",""]],contentQueries:function(t,e,n){if(1&t&&o.Suo(n,Cf,5),2&t){let t;o.iGM(t=o.CRH())&&(e.plugins=t)}},inputs:{disabled:["fDraggableDisabled","disabled"]},outputs:{fSelectionChange:"fSelectionChange",fCreateNode:"fCreateNode",fReassignConnection:"fReassignConnection",fCreateConnection:"fCreateConnection"},exportAs:["fDraggable"],features:[o.qOj]}),t})();class yf{constructor(t,e){this.nodes=t,this.connections=e}}class Af{constructor(t,e,n,i){this.flowRect=t,this.canvasPosition=e,this.eventPoint=n,this.minimap=i}}let Zf=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get canvasScale(){return this.fComponentsStore.fCanvas.transform.scale}handle(t){return Wl.sub(t.canvasPosition,Wl.sub(this.getPositionInViewBox(t.eventPoint,t.minimap),this.getNormalizedFlowCenter(t.flowRect)))}getNormalizedFlowCenter(t){return Kl.fromPoint(t.gravityCenter).sub(t)}getPositionInViewBox(t,e){const n=this.normalizeEventPoint(t,e);return Wl.sum(n,ed.mult(e.viewBox,this.canvasScale))}normalizeEventPoint(t,e){return this.getEventPointInMinimap(t,e).mult(e.scale).mult(this.canvasScale)}getEventPointInMinimap(t,e){return Kl.fromPoint(t).elementTransform(e.element)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Af)],t),t})();class kf{constructor(t){this.event=t}}let Tf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){this.fDraggableDataContext.draggableItems.forEach(t=>{var e;null===(e=t.complete)||void 0===e||e.call(t)})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(kf)],t),t})();class Of{constructor(t,e,n,i,o,r){this.fComponentsStore=t,this.fMediator=e,this.flowRect=n,this.canvasPosition=i,this.eventPoint=o,this.minimap=r,this.lastDifference=null}initialize(){var t;null===(t=this.fComponentsStore.fCanvas)||void 0===t||t.hostElement.classList.add("f-scaled-animate")}move(t){this.lastDifference&&this.isSamePoint(t,this.lastDifference)||(this.lastDifference=t,this.fComponentsStore.fCanvas.setPosition(this.getNewPosition(Kl.fromPoint(this.eventPoint).add(t))),this.fComponentsStore.fCanvas.redraw())}isSamePoint(t,e){return t.x===e.x&&t.y===e.y}getNewPosition(t){return this.fMediator.send(new Af(this.flowRect,this.canvasPosition,t,this.minimap))}complete(){var t;null===(t=this.fComponentsStore.fCanvas)||void 0===t||t.hostElement.classList.remove("f-scaled-animate"),this.fComponentsStore.fCanvas.emitCanvasChangeEvent()}}let Mf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof Of)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(kf)],t),t})();const If=[Tf,Mf];class Sf{constructor(t,e){this.event=t,this.minimap=e}}let Pf=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fMediator=e,this.fDraggableDataContext=n}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){const e=t.event.getPosition(),n=Kl.fromPoint(this.fComponentsStore.fCanvas.transform.position);this.fComponentsStore.fCanvas.setPosition(this.getNewPosition(e,t.minimap)),this.fComponentsStore.fCanvas.redraw(),this.fComponentsStore.fCanvas.emitCanvasChangeEvent(),this.fDraggableDataContext.onPointerDownScale=1,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(e).elementTransform(this.flowHost),this.fDraggableDataContext.draggableItems=[new Of(this.fComponentsStore,this.fMediator,this.getFlowRect(),n,e,t.minimap)]}getNewPosition(t,e){return this.fMediator.send(new Af(this.getFlowRect(),Kl.fromPoint(this.fComponentsStore.fCanvas.transform.position),t,e))}getFlowRect(){return ed.fromElement(this.flowHost)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd
1),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Sf)],t),t})(),Nf=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fDraggableDataContext=e}handle(t){return!this.fDraggableDataContext.draggableItems.length&&!!t.event.targetElement.closest(".f-minimap")&&this.fComponentsStore.flowHost.contains(t.event.targetElement)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Sf)],t),t})();const qf=[Zf,...If,...[Pf,Nf]];class Uf{constructor(t){this.event=t}}let Ef=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){this.fDraggableDataContext.draggableItems.forEach(t=>{var e;null===(e=t.complete)||void 0===e||e.call(t)})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Uf)],t),t})();class Ff{}class Df{constructor(t,e,n,i){this.fComponentsStore=t,this.fSelectionArea=e,this.fDraggableDataContext=n,this.fMediator=i,this.canBeSelected=[],this.selectedByMove=[]}get canvasPosition(){return Kl.fromPoint(this.fComponentsStore.fCanvas.transform.position).add(this.fComponentsStore.fCanvas.transform.scaledPosition)}initialize(){this.canBeSelected=this.fMediator.send(new Ff),this.fSelectionArea.show(),this.fSelectionArea.draw(ed.initialize(this.fDraggableDataContext.onPointerDownPosition.x,this.fDraggableDataContext.onPointerDownPosition.y))}move(t){const e=Kl.fromPoint(t).add(this.fDraggableDataContext.onPointerDownPosition),n=Math.min(this.fDraggableDataContext.onPointerDownPosition.x,e.x),i=Math.min(this.fDraggableDataContext.onPointerDownPosition.y,e.y),o=Math.abs(t.x),r=Math.abs(t.y);this.fSelectionArea.draw(ed.initialize(n,i,o,r)),this.selectedByMove=[],this.canBeSelected.forEach(t=>{t.element.deselect();const e=ed.addPoint(t.rect,this.canvasPosition);ed.intersectionWithRect(e,ed.initialize(n,i,o,r))&&(t.element.select(),this.selectedByMove.push(t.element))}),this.fMediator.send(new xu)}complete(){this.fSelectionArea.hide(),this.fDraggableDataContext.selectedItems.push(...this.selectedByMove),this.selectedByMove.length>0&&(this.fDraggableDataContext.isSelectedChanged=!0)}}let Lf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.fDraggableDataContext.draggableItems.some(t=>t instanceof Df)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(Uf)],t),t})();const Jf=[Ef,Lf];class jf{constructor(t,e){this.event=t,this.fSelectionArea=e}}let Rf=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(t){this.fDraggableDataContext.draggableItems=[new Df(this.fComponentsStore,t.fSelectionArea,this.fDraggableDataContext,this.fMediator)],this.fDraggableDataContext.onPointerDownScale=1,this.fDraggableDataContext.onPointerDownPosition=Kl.fromPoint(t.event.getPosition()).elementTransform(this.flowHost)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(jf)],t),t})(),$f=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){return this.isDragHandlesEmpty()&&this.isShiftPressed(t.event.originalEvent)}isDragHandlesEmpty(){return!this.fDraggableDataContext.draggableItems.length}isShiftPressed(t){return t.shiftKey}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([gd(jf)],t),t})();const Bf=[...lp,...Wh,...cg,...sf,...vf,...Ng,...ef,...[...Jf,Rf,$f],...qf];let Hf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(t){this.fDraggableDataContext.selectedItems.forEach(t=>t.deselect()),this.fDraggableDataContext.selectedItems=[],this.fDraggableDataContext.isSelectedChanged=!0}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Xu)],t),t})();class Qf{}let Yf=(()=>{let t=class{constructor(t){this.fDraggableDataContext=t}handle(){let t=[],e=[];
1return this.fDraggableDataContext.selectedItems.forEach(n=>{n.hostElement.classList.contains("f-node")?t.push(n.hostElement.dataset.fNodeId):e.push(n.hostElement.id)}),new yf(t,e)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Qf)],t),t})();class zf{constructor(t,e){this.nodes=t,this.connections=e}}let Vf=(()=>{let t=class{constructor(t,e){this.fDataContext=t,this.fDraggableDataContext=e}handle(t){this.fDraggableDataContext.selectedItems.forEach(t=>{t.deselect()}),this.fDraggableDataContext.selectedItems=[],t.nodes.forEach(t=>{const e=this.fDataContext.fNodes.find(e=>e.fId===t);e&&(e.select(),this.fDraggableDataContext.selectedItems.push(e))}),t.connections.forEach(t=>{const e=this.fDataContext.fConnections.find(e=>e.fId===t);e&&(e.select(),this.fDraggableDataContext.selectedItems.push(e))}),this.fDraggableDataContext.isSelectedChanged=!0}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(zf)],t),t})();class Gf{}let Wf=(()=>{let t=class{constructor(t,e){this.fDataContext=t,this.fDraggableDataContext=e}handle(t){this.fDraggableDataContext.selectedItems.forEach(t=>{t.deselect()}),this.fDraggableDataContext.selectedItems=[],this.fDataContext.fNodes.forEach(t=>{t.select(),this.fDraggableDataContext.selectedItems.push(t)}),this.fDataContext.fConnections.forEach(t=>{t.select(),this.fDraggableDataContext.selectedItems.push(t)}),this.fDraggableDataContext.isSelectedChanged=!0}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Gf)],t),t})();class Kf{constructor(t){this.fNode=t}}class Xf{constructor(t,e,n,i){this.fItemsContainer=t,this.allElements=e,this.elementsThatShouldBeInFront=n,this.targetIndex=i}}let tm=(()=>{let t=class{handle(t){const e=[];for(let n=t.targetIndex+1;n<t.allElements.length;n++){const i=t.allElements[n];t.elementsThatShouldBeInFront.includes(i)||e.push(i)}e.forEach(e=>{t.fItemsContainer.removeChild(e),t.fItemsContainer.insertBefore(e,t.allElements[t.targetIndex])})}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Xf)],t),t})();class em{constructor(t,e){this.item=t,this.itemContainer=e}}class nm{constructor(t){this.fId=t}}let im=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.getChildrenNodes(t.fId)}getChildrenNodes(t,e=new Set){if(e.has(t))throw new Error("Circular reference detected in the node hierarchy. Node id: "+t);e.add(t);const n=this.fComponentsStore.fNodes.filter(e=>e.fParentId===t);return n.forEach(t=>{n.push(...this.getChildrenNodes(t.fId,e))}),n}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(nm)],t),t})(),om=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}get fGroupsContainer(){return this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement}get fNodesContainer(){return this.fComponentsStore.fCanvas.fNodesContainer.nativeElement}get fConnectionsContainer(){return this.fComponentsStore.fCanvas.fConnectionsContainer.nativeElement}handle(t){switch(t.itemContainer){case this.fGroupsContainer:this.handleGroup(t);break;case this.fNodesContainer:this.handleNode(t);break;case this.fConnectionsContainer:this.handleConnection(t);break;default:throw new Error("Unknown container")}}handleGroup(t){const e=this.getChildrenNodesAndGroups(t.item.fId),n=this.getChildrenGroups(e);this.updateLayers(this.fGroupsContainer,t.item.hostElement,n);const i=this.getChildrenNodes(e);i.length&&this.updateLayers(this.fNodesContainer,i[0],i)}handleNode(t){const e=this.getChildrenNodesAndGroups(t.item.fId),n=this.getChildrenNodes(e);this.updateLayers(t.itemContainer,t.item.hostElement,n)}handleConnection(t){this.updateLayers(t.itemContainer,t.item.hostElement,[])}updateLayers(t,e,n){const i=Array.from(t.children),o=i.findIndex(t=>t===e);this.isAnythingNeedToBeMoved(i,o,n)&&this.fMediator.send(new Xf(t,i,n,o))}isAnythingNeedToBeMoved(t,e,n){for(let i=e+1;i<t.length;i++)if(!n.includes(t[i]))return!0;return!1}getChildrenGroups(t){const e=Array.from(this.fGroupsContainer.children);return t.filter(t=>this.fGroupsContainer.contains(t)).sort((t,n)=>e.indexOf(t)-e.indexOf(n))}
1getChildrenNodes(t){const e=Array.from(this.fNodesContainer.children);return t.filter(t=>this.fNodesContainer.contains(t)).sort((t,n)=>e.indexOf(t)-e.indexOf(n))}getChildrenNodesAndGroups(t){return this.fMediator.send(new nm(t)).map(t=>t.hostElement)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(em)],t),t})(),rm=(()=>{let t=class{constructor(t,e){this.fDraggableDataContext=t,this.fMediator=e}handle(t){this.selectNodeIfNotSelected(t.fNode),this.fMediator.send(new em(t.fNode,t.fNode.hostElement.parentElement))}selectNodeIfNotSelected(t){!this.fDraggableDataContext.selectedItems.includes(t)&&!t.fSelectionDisabled&&(this.fDraggableDataContext.selectedItems.push(t),t.select(),this.fDraggableDataContext.isSelectedChanged=!0)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Kf)],t),t})();const sm=[Hf,Yf,Vf,Wf,rm];let am=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get fNodes(){return this.fComponentsStore.fNodes}get fConnections(){return this.fComponentsStore.fConnections}get transform(){return this.fComponentsStore.fCanvas.transform}handle(){return[...this.getNodesWithRects(),...this.getConnectionsWithRects()].filter(t=>!this.fDraggableDataContext.selectedItems.includes(t.element))}getNodesWithRects(){return this.fNodes.filter(t=>!t.fSelectionDisabled).map(t=>({element:t,rect:ed.mult(this.fMediator.send(new Qu(t.hostElement)),this.transform.scale)}))}getConnectionsWithRects(){return this.fConnections.filter(t=>!t.fSelectionDisabled).map(t=>({element:t,rect:ed.mult(this.fMediator.send(new Qu(t.boundingElement)),this.transform.scale)}))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Ff)],t),t})();class cm{constructor(t,e,n,i,o){this.outputRect=t,this.inputRect=e,this.behavior=n,this.outputSide=i,this.inputSide=o}}let lm=(()=>{let t=class{constructor(){this.behaviorHandlers={[Jh.FLOATING.toString()]:this.floatingBehavior,[Jh.FIXED_CENTER.toString()]:this.fixedCenterBehavior,[Jh.FIXED.toString()]:this.fixedOutboundBehaviour}}handle(t){return this.behaviorHandlers[t.behavior](t)}floatingBehavior(t){const e=sd.getRoundedRectIntersections(t.outputRect.gravityCenter,t.inputRect.gravityCenter,t.outputRect)[0],n=sd.getRoundedRectIntersections(t.inputRect.gravityCenter,t.outputRect.gravityCenter,t.inputRect)[0];return new td(e||t.outputRect.gravityCenter,n||t.inputRect.gravityCenter)}fixedCenterBehavior(t){return new td(t.outputRect.gravityCenter,t.inputRect.gravityCenter)}fixedOutboundBehaviour(t){return new td(dm[t.outputSide===dp.AUTO?dp.BOTTOM:t.outputSide](t.outputRect),dm[t.inputSide===dp.AUTO?dp.TOP:t.inputSide](t.inputRect))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(cm)],t),t})();const dm={[dp.TOP]:t=>{const e=new Kl;return e.y=t.y,e.x=t.x+t.width/2,e},[dp.BOTTOM]:t=>{const e=new Kl;return e.y=t.y+t.height,e.x=t.x+t.width/2,e},[dp.LEFT]:t=>{const e=new Kl;return e.x=t.x,e.y=t.y+t.height/2,e},[dp.RIGHT]:t=>{const e=new Kl;return e.x=t.x+t.width,e.y=t.y+t.height/2,e}};class um{}let pm=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.fComponentsStore.fConnections.map(t=>({id:t.fId,fOutputId:t.fOutputId,fInputId:t.fInputId,fType:t.fType,fBehavior:t.fBehavior,isSelected:t.isSelected()}))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(um)],t),t})();class hm{constructor(t){this.type=t}}let gm=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return this.fComponentsStore.fNodes.filter(e=>e instanceof t.type).map(t=>({id:t.fId,parent:t.fParentId,position:t.position,size:t.size,fOutputs:this.getOutputs(t.hostElement),fInputs:this.getInputs(t.hostElement),isSelected:t.isSelected()}))}getOutputs(t){return this.fComponentsStore.fOutputs.filter(e=>t.contains(e.hostElement)).map(t=>({id:t.id,fConnectableSide:t.fConnectableSide}))}getInputs(t){return this.fComponentsStore.fInputs.filter(e=>t.contains(e.hostElement)).map(t=>({id:t.id,fConnectableSide:t.fConnectableSide}))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(hm)],t),t})();class fm{}let mm=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){return{position:this.getCanvasPosition(this.fComponentsStore.fCanvas.transform),scale:this.fComponentsStore.fCanvas.transform.scale,nodes:this.fMediator.send(new hm(Op)),groups:this.fMediator.send(new hm(kp)),connections:this.fMediator.send(new um)}}getCanvasPosition(t){return Wl.sum(t.position,t.scaledPosition)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd
1))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(fm)],t),t})();const vm=[mm,gm,pm];class bm{}let xm=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return ed.union(this.getNodesRects())}getNodesRects(){return this.getNodes().map(t=>{const e=ed.fromElement(t.hostElement);return ed.initialize(t.position.x,t.position.y,e.width,e.height)})}getNodes(){return this.fComponentsStore.fNodes}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(bm)],t),t})();class _m{}let Cm=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){return ed.union(this.getNodesRects())}getNodesRects(){return this.getNodes().map(t=>ed.fromElement(t.hostElement))}getNodes(){return this.fComponentsStore.fNodes}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(_m)],t),t})();class wm{constructor(t){this.position=t}}let ym=(()=>{let t=class{constructor(t){this.fComponentsStore=t}get transform(){return this.fComponentsStore.transform}get flowHost(){return this.fComponentsStore.flowHost}handle(t){return Kl.fromPoint(t.position).elementTransform(this.flowHost).sub(this.transform.scaledPosition).sub(this.transform.position).div(this.transform.scale)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(wm)],t),t})(),Am=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fDraggableDataContext=e,this.fMediator=n}get transform(){return this.fComponentsStore.fCanvas.transform}get flowHost(){return this.fComponentsStore.fFlow.hostElement}handle(){if(!this.isValidRequest())return;const t=this.fDraggableDataContext.draggableItems[0].fNode,e=this.getOutputsForNode(t),n=this.getInputsForNode(t);e.some(t=>!t.canBeConnected);this.fComponentsStore.fConnections.some(t=>n.find(e=>e.id===t.fInputId))}isValidRequest(){return 1===this.fDraggableDataContext.draggableItems.length&&this.fDraggableDataContext.draggableItems[0]instanceof Cg}getOutputsForNode(t){return this.fComponentsStore.fOutputs.filter(e=>t.isContains(e.hostElement))}getInputsForNode(t){return this.fComponentsStore.fInputs.filter(e=>t.isContains(e.hostElement))}findConnectionsUnderNode(t){return this.fMediator.send(new Qu(t.hostElement)),this.fComponentsStore.fConnections.filter(t=>[].length>0)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(ep),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Ig)],t),t})();class Zm{}let km=(()=>{let t=class{constructor(t,e){this.fComponentsStore=t,this.fMediator=e}handle(t){this.resetConnectors(),this.fComponentsStore.fTempConnection&&this.setMarkers(this.fComponentsStore.fTempConnection),this.fComponentsStore.fSnapConnection&&this.setMarkers(this.fComponentsStore.fSnapConnection),this.fComponentsStore.fConnections.forEach(t=>{const e=this.fComponentsStore.fOutputs.find(e=>e.id===t.fOutputId),n=this.fComponentsStore.fInputs.find(e=>e.id===t.fInputId);e&&n&&this.setupConnection(e,n,t)})}resetConnectors(){this.fComponentsStore.fOutputs.forEach(t=>t.setConnected(!1)),this.fComponentsStore.fInputs.forEach(t=>t.setConnected(!1))}setupConnection(t,e,n){t.setConnected(!0),e.setConnected(!0);const i=this.getLine(t,e,n);this.setMarkers(n),n.setLine(i.point1,t.fConnectableSide,i.point2,e.fConnectableSide),n.initialize(),n.isSelected()&&n.select()}getLine(t,e,n){const i=this.fMediator.send(new Qu(t.hostElement)),o=this.fMediator.send(new Qu(e.hostElement));return this.fMediator.send(new cm(i,o,n.fBehavior,t.fConnectableSide,e.fConnectableSide))}setMarkers(t){this.fMediator.send(new pu(t))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Zm)],t),t})();class Tm{}let Om=(()=>{let t=class{constructor(t){this.fComponentsStore=t}handle(t){this.fComponentsStore.fConnections.forEach(t=>{t.hostElement.style.display="unset"})}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Tm)],t),t})();class Mm{}let Im=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fMediator=e,this.fBrowser=n}get fGroupsContainer(){return this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement}get fNodesContainer(){return this.fComponentsStore.fCanvas.fNodesContainer.nativeElement}
1get fNodesContainerElements(){return Array.from(this.fNodesContainer.children)}handle(t){this.getGroups().forEach(t=>{this.moveChildrenNodes(this.getSortedChildrenNodes(t))})}getGroups(){return this.fComponentsStore.fNodes.filter(t=>this.fGroupsContainer.contains(t.hostElement))}getSortedChildrenNodes(t){const e=this.fNodesContainerElements;return this.getChildrenNodes(t.fId).sort((t,n)=>e.indexOf(t)-e.indexOf(n))}getChildrenNodes(t){return this.fMediator.send(new nm(t)).filter(t=>this.fNodesContainer.contains(t.hostElement)).map(t=>t.hostElement)}moveChildrenNodes(t){const e=this.fBrowser.document.createDocumentFragment();t.forEach(t=>{e.appendChild(t)}),this.fNodesContainer.appendChild(e)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Mm)],t),t})();class Sm{constructor(t){this.fItemsContainer=t}}let Pm=(()=>{let t=class{constructor(t,e,n){this.fComponentsStore=t,this.fMediator=e,this.fBrowser=n}get fItemsFromContainer(){return Array.from(this.fItemsContainer.children)}handle(t){this.fItemsContainer=t.fItemsContainer,this.getItems().forEac
1h(t=>{this.moveChildrenItems(this.getSortedChildrenItems(t),t)})}getItems(){return this.fComponentsStore.fNodes.filter(t=>this.fItemsContainer.contains(t.hostElement))}getSortedChildrenItems(t){const e=this.fItemsFromContainer,n=e.indexOf(t.hostElement);return this.getChildrenGroups(t.fId).filter(t=>e.indexOf(t)<n).sort((t,n)=>e.indexOf(t)-e.indexOf(n))}getChildrenGroups(t){return this.fMediator.send(new nm(t)).filter(t=>this.fItemsContainer.contains(t.hostElement)).map(t=>t.hostElement)}moveChildrenItems(t,e){let n=e.hostElement.nextElementSibling;const i=this.fBrowser.document.createDocumentFragment();t.forEach(t=>{i.appendChild(t)}),this.fItemsContainer.insertBefore(i,n)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(hu),o.LFG(pd),o.LFG(Jd))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Sm)],t),t})();class Nm{}let qm=(()=>{let t=class{constructor(t,e){this.fMediator=t,this.fComponentsStore=e}handle(t){this.fMediator.send(new Sm(this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement)),this.fMediator.send(new Mm),this.fMediator.send(new Sm(this.fComponentsStore.fCanvas.fNodesContainer.nativeElement))}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(pd),o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Nm)],t),t})();class Um{}let Em=(()=>{let t=class{constructor(t,e){this.fTransformStore=t,this.fComponentsStore=e}handle(t){return(0,Br.T)(this.fTransformStore.changes,this.fComponentsStore.componentsData$,this.fComponentsStore.componentsCount$)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(gu),o.LFG(hu))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t=(0,Jo.gn)([hd(Um)],t),t})();const Fm=150;function Dm(t,e){return e.document.createElementNS("http://www.w3.org/2000/svg",t)}const Lm=[...Lu,...Ku,...Au,fu,bu,_u,...sm,am,im,lm,Yu,...vm,xm,Cm,ym,Am,km,Om,qm,Pm,Im,Em,om,tm];let Jm=0,jm=(()=>{class t{constructor(t,e){this.elementReference=t,this.fBrowser=e,this._subscription$=new pi.w,this._stateChanges=new fo.xQ,this.id="f-pattern-"+Jm++,this._color="rgba(0,0,0,0.1)",this._radius=20,this._scaledRadius=20,this._transform=od.default(),this._position=Wl.initialize(),this.createPattern()}get hostElement(){return this.elementReference.nativeElement}set color(t){this._color=t,this._stateChanges.next()}set radius(t){this._radius=t,this._stateChanges.next()}createPattern(){this._pattern=Dm("pattern",this.fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._circle=Dm("circle",this.fBrowser),this._pattern.appendChild(this._circle)}ngOnInit(){this._subscription$.add(this.subscribeToStateChanges())}subscribeToStateChanges(){return this._stateChanges.pipe((0,Gr.O)(null)).subscribe(()=>{this.redraw()})}calculatePattern(){this._position.x=this._transform.position.x+this._transform.scaledPosition.x,this._position.y=this._transform.position.y+this._transform.scaledPosition.y,this._scaledRadius=this._radius*this._transform.scale}redraw(){this.calculatePattern(),this.redrawPattern(),this.redrawElement()}redrawPattern(){this._pattern.setAttribute("x",`${this._position.x}`),this._pattern.setAttribute("y",`${this._position.y}`),this._pattern.setAttribute("width",`${this._scaledRadius}`),this._pattern.setAttribute("height",`${this._scaledRadius}`)}redrawElement(){this._circle.setAttribute("fill",this._color),this._circle.setAttribute("cx",""+this._scaledRadius/2),this._circle.setAttribute("cy",""+this._scaledRadius/2),this._circle.setAttribute("r",""+this._scaledRadius/this._radius)}setTransform(t){this._transform=t,this._stateChanges.next()}ngOnDestroy(){this._subscription$.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(Jd))},t.\u0275cmp=o.Xpm({type:t,selectors:[["f-circle-pattern"]],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("id",e.id)},inputs:{id:"id",color:"color",radius:"radius"},features:[o._Bn([{provide:uu,useExisting:t}])],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Rm=new o.OlP("F_BACKGROUND");let $m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.lG2({type:t}),t})(),Bm=(()=>{class t extends $m{constructor(t,e,n){super(),this.elementReference=t,this.fComponentsStore=e,this.fMediator=n}get hostElement(){return this.elementReference.nativeElement}
1ngOnInit(){this.fComponentsStore.fBackground=this}ngAfterContentInit(){this.fMediator.send(new Cu(this.fBackgroundPattern))}isBackgroundElement(t){return this.hostElement.contains(t)}setTransform(t){var e;null===(e=this.fBackgroundPattern)||void 0===e||e.setTransform(t)}ngOnDestroy(){this.fComponentsStore.fBackground=void 0}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(hu),o.Y36(pd))},t.\u0275cmp=o.Xpm({type:t,selectors:[["f-background"]],contentQueries:function(t,e,n){if(1&t&&o.Suo(n,uu,5),2&t){let t;o.iGM(t=o.CRH())&&(e.fBackgroundPattern=t.first)}},hostAttrs:[1,"f-component","f-background"],features:[o._Bn([{provide:Rm,useExisting:t}]),o.qOj],ngContentSelectors:iu,decls:2,vars:0,template:function(t,e){1&t&&(o.F$t(),o.O4$(),o.TgZ(0,"svg"),o.Hsn(1),o.qZA())},styles:["[_nghost-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}[_nghost-%COMP%]   svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),t})();class Hm{constructor(t,e){this.position=t,this.scale=e}}const Qm=new o.OlP("F_CANVAS");let Ym=(()=>{class t{constructor(){this.transform=od.default()}getPosition(){return this.transform.position}setPosition(t){this.transform.position=t}emitCanvasChangeEvent(){this.fCanvasChange.emit(new Hm(Wl.sum(this.transform.position,this.transform.scaledPosition),this.transform.scale))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.lG2({type:t}),t})(),zm=(()=>{class t extends Ym{constructor(t,e,n){super(),this.elementReference=t,this.fMediator=e,this.fComponentsStore=n,this.fCanvasChange=new o.vpe}set position(t){this.fMediator.send(new Mu(this.transform,t))}set scale(t){this.fMediator.send(new Su(this.transform,t))}get fNodes(){return this.fComponentsStore.fNodes}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.fComponentsStore.fCanvas=this}redraw(){var t;null===(t=this.fComponentsStore.fBackground)||void 0===t||t.setTransform(this.transform),this.hostElement.setAttribute("style",`transform: ${od.toString(this.transform)}`),this.fMediator.send(new xu)}redrawWithAnimation(){var t;let e=Fm;this.isMobile()&&(e=80),null===(t=this.fComponentsStore.fBackground)||void 0===t||t.setTransform(this.transform),this.hostElement.setAttribute("style",`transition: transform ${e}ms ease-in-out; transform: ${od.toString(this.transform)}`),setTimeout(()=>this.redraw(),Fm)}isMobile(){const t=navigator.userAgent||navigator.vendor||window.opera;return/android|iPad|iPhone|iPod/i.test(t)}centerGroupOrNode(t,e=!0){this.fMediator.send(new Zu(t,e))}fitToScreen(t=Wl.initialize(),e=!0){this.fMediator.send(new Tu(t,e))}resetScaleAndCenter(t=!0){this.fMediator.send(new Uu(t))}setZoom(t,e=Wl.initialize()){this.fMediator.send(new Fu(t,e))}resetZoom(){this.fMediator.send(new Nu)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(pd),o.Y36(hu))},t.\u0275cmp=o.Xpm({type:t,selectors:[["f-canvas"]],viewQuery:function(t,e){if(1&t&&(o.Gf(ou,7),o.Gf(ru,7),o.Gf(su,7)),2&t){let t;o.iGM(t=o.CRH())&&(e.fGroupsContainer=t.first),o.iGM(t=o.CRH())&&(e.fNodesContainer=t.first),o.iGM(t=o.CRH())&&(e.fConnectionsContainer=t.first)}},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:"position",scale:"scale"},outputs:{fCanvasChange:"fCanvasChange"},exportAs:["fComponent"],features:[o._Bn([{provide:Qm,useExisting:t}]),o.qOj],ngContentSelectors:cu,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""]],template:function(t,e){1&t&&(o.F$t(au),o.ynx(0),o.TgZ(1,"div",null,0),o.Hsn(3),o.qZA(),o.TgZ(4,"div",null,1),o.Hsn(6,1),o.Hsn(7,2),o.Hsn(8,3),o.qZA(),o.TgZ(9,"div",null,2),o.Hsn(11,4),o.qZA(),o.BQk())},styles:["[_nghost-%COMP%]{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}.f-scaled-animate[_nghost-%COMP%]{transition:transform .09s}"],changeDetection:0}),t})();new o.OlP("F_LINE_ALIGNMENT");const Vm=new o.OlP("F_FLOW");let Gm=0,Wm=(()=>{class t extends class{}{constructor(t,e,n,i){super(),this.elementReference=t,this.fComponentsStore=e,this.fMediator=n,this.fBrowser=i,this.subscription$=new pi.w,this.fFlowId="f-flow-"+Gm++,this.fLoaded=new o.vpe,this.isLoaded=!1}get hostElement(){return this.elementReference.nativeElement}ngOnInit(){this.fComponentsStore.fFlow=this}ngAfterContentInit(){!this.fBrowser.isBrowser()||(this.subscription$.add(this.subscribeOnElementsChanges()),this.subscription$.add(this.subscribeOnComponentsCountChanges()))}subscribeOnComponentsCountChanges(){return this.fComponentsStore.componentsCount$.pipe((0,Gr.O)(null),ad(1)).subscribe(()=>{this.fMediator.send(new Nm)})}subscribeOnElementsChanges(){return this.fComponentsStore.components
1Data$.pipe((0,Gr.O)(null),ad(1)).subscribe(()=>{this.fMediator.send(new Zm),this.isLoaded||(this.isLoaded=!0,this.fLoaded.emit())})}redraw(){this.fComponentsStore.componentDataChanged()}reset(){this.isLoaded=!1}getAllNodesRect(){return this.fMediator.send(new bm)}getSelection(){return this.fMediator.send(new Qf)}getPositionInFlow(t){return this.fMediator.send(new wm(t))}getState(){return this.fMediator.send(new fm)}selectAll(){this.fMediator.send(new Gf)}select(t,e){this.fMediator.send(new zf(t,e))}clearSelection(){this.fMediator.send(new Xu)}ngOnDestroy(){this.subscription$.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(hu),o.Y36(pd),o.Y36(Jd))},t.\u0275cmp=o.Xpm({type:t,selectors:[["f-flow"]],hostAttrs:[1,"f-component","f-flow"],hostVars:1,hostBindings:function(t,e){2&t&&o.uIk("id",e.fFlowId)},inputs:{fFlowId:"fFlowId"},outputs:{fLoaded:"fLoaded"},features:[o._Bn([pd,hu,gu,ep,Eh,...Lm,...Bf,{provide:Vm,useExisting:t}]),o.qOj],ngContentSelectors:du,decls:7,vars:0,template:function(t,e){1&t&&(o.F$t(lu),o.ynx(0),o.Hsn(1),o.Hsn(2,1),o.Hsn(3,2),o.Hsn(4,3),o.Hsn(5,4),o.Hsn(6,5),o.BQk())},styles:["[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none}"],changeDetection:0}),t})();const Km=new o.OlP("F_ZOOM");let Xm=(()=>{class t extends class{constructor(t){this.fComponentsStore=t,this.isEnabled=!1,this.listeners=Qd.emptyListener(),this.onWheel=t=>{var e;t.preventDefault();const n=t.target;if((null===(e=this.fComponentsStore.fDraggable)||void 0===e?void 0:e.isDragStarted)||(null==n?void 0:n.closest("[fLockedContext]")))return;let i=this.getScale();i+=this.step*(t.deltaY>0?-1:1),i=Math.max(this.minimum,Math.min(i,this.maximum));const o=new Kl(t.clientX,t.clientY).elementTransform(this.flowHost);this.fCanvas.setZoom(i,o),this.fCanvas.redraw(),this.fCanvas.emitCanvasChangeEvent()},this.onDoubleClick=t=>{var e;t.preventDefault();const n=t.target;if((null===(e=this.fComponentsStore.fDraggable)||void 0===e?void 0:e.isDragStarted)||function(t){return!!t.closest("[fNode]")}(n)||(null==n?void 0:n.closest("[fLockedContext]")))return;let i=this.getScale();i+=1*this.dblClickStep,i=Math.max(this.minimum,Math.min(i,this.maximum));const o=new Kl(t.clientX,t.clientY).elementTransform(this.flowHost);this.fCanvas.setZoom(i,o),this.fCanvas.redrawWithAnimation(),this.fCanvas.emitCanvasChangeEvent()}}get flowHost(){return this.fComponentsStore.flowHost}get fCanvas(){return this.fComponentsStore.fCanvas}toggleZoom(){this.isEnabled?this.subscribe():this.unsubscribe()}subscribe(){this.listeners(),this.flowHost&&(this.flowHost.addEventListener("wheel",this.onWheel),this.flowHost.addEventListener("dblclick",this.onDoubleClick),this.listeners=()=>{this.flowHost.removeEventListener("wheel",this.onWheel),this.flowHost.removeEventListener("dblclick",this.onDoubleClick)})}getScale(){return this.fCanvas.transform.scale||1}onZoomToCenter(t,e){const n=ed.fromElement(this.flowHost);this.onWheel({deltaY:t,preventDefault:()=>{},clientX:(null==e?void 0:e.x)||n.gravityCenter.x,clientY:(null==e?void 0:e.y)||n.gravityCenter.y})}zoomIn(t){this.onZoomToCenter(-1,t)}zoomOut(t){this.onZoomToCenter(1,t)}reset(){this.fCanvas.resetZoom(),this.fCanvas.redraw(),this.fCanvas.emitCanvasChangeEvent()}unsubscribe(){this.listeners(),this.listeners=Qd.emptyListener()}}{constructor(t){super(t),this.minimum=.1,this.maximum=4,this.step=.1,this.dblClickStep=.5}get fFlowZoom(){return this.isEnabled}set fFlowZoom(t){const e=yd(t);e!==this.isEnabled&&(this.isEnabled=e,this.toggleZoom())}ngAfterViewInit(){super.toggleZoom()}ngOnDestroy(){super.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(hu))},t.\u0275dir=o.lG2({type:t,selectors:[["f-canvas","fZoom",""]],hostAttrs:[1,"f-zoom","f-component"],inputs:{fFlowZoom:["fZoom","fFlowZoom"],minimum:["fZoomMinimum","minimum"],maximum:["fZoomMaximum","maximum"],step:["fZoomStep","step"],dblClickStep:["fZoomDblClickStep","dblClickStep"]},exportAs:["fComponent"],features:[o._Bn([{provide:Km,useExisting:t}]),o.qOj]}),t})(),tv=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})();var ev=n(3454);let nv=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.customerService=e,this.IsDelete=!1}ngOnInit(){this.onClose=new fo.xQ}
1closePopUp(){window.location.href.includes("customeditor")?this.bsModalRef.hide():(this.currentUser=this.customerService.GetCurrent(),"trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status?window.location.href="/app/successtrial":(window.location.href="/app/success",this.bsModalRef.hide()))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-appointment-bookin-popup"]],decls:9,vars:0,consts:[[1,"modal-header","text-black"],[1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn","text-black","fs-3","lh-1",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["d","M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"],[1,"modal-body","ai-body"],[1,"text-center","px-md-5"],["src","https://calendly.com/d/cx2g-mxy-md6/appy-pie-workflow-automation-expert-team","frameborder","0","border","0","width","100%","height","500"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2," Book An Appointment "),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.closePopUp()}),o.O4$(),o.TgZ(4,"svg",3),o._UZ(5,"path",4),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",5),o.TgZ(7,"div",6),o._UZ(8,"iframe",7),o.qZA(),o.qZA())},styles:[""]}),t})(),iv=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.modalService=e}ngOnInit(){this.onClose=new fo.xQ}closePopUp(){this.bsModalRef.hide()}openBookExpertPop(){this.bsModalRef.hide(),setTimeout(()=>{this.bsModalRef=this.modalService.show(nv,{initialState:{}})},600)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-book-expert-assistance"]],decls:17,vars:0,consts:[[1,"modal-header","border-0","justify-content-end"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn","text-black","fs-3","lh-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","30","height","30","viewBox","0 0 48 48","fill","none"],["d","M24 4C12.978 4 4 12.978 4 24C4 35.022 12.978 44 24 44C35.022 44 44 35.022 44 24C44 12.978 35.022 4 24 4ZM24 8C32.8602 8 40 15.1398 40 24C40 32.8602 32.8602 40 24 40C15.1398 40 8 32.8602 8 24C8 15.1398 15.1398 8 24 8ZM17.4141 14.5859L14.5859 17.4141L21.1719 24L14.5859 30.5859L17.4141 33.4141L24 26.8281L30.5859 33.4141L33.4141 30.5859L26.8281 24L33.4141 17.4141L30.5859 14.5859L24 21.1719L17.4141 14.5859Z","fill","#2457C5"],[1,"modal-body","bookexpert-body","px-4"],[1,"text-center","text-black","fw-normal"],[1,"d-flex","align-items-lg-center","gap-3","justify-content-center","my-4","my-lg-5","flex-column","flex-lg-row","align-items-start"],[1,"text-center"],["type","button",1,"btn","btn-book-pop","mb-4","mb-lg-5",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"button",1),o.NdJ("click",function(){return e.closePopUp()}),o.O4$(),o.TgZ(2,"svg",2),o._UZ(3,"path",3),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"div",4),o.TgZ(5,"h2",5),o._uU(6," Need help? Our support team can help you create your automation. "),o.qZA(),o.TgZ(7,"ul",6),o.TgZ(8,"li"),o._uU(9,"Book a session with our expert"),o.qZA(),o.TgZ(10,"li"),o._uU(11,"Share Your Requirements"),o.qZA(),o.TgZ(12,"li"),o._uU(13,"We'll set up your automation"),o.qZA(),o.qZA(),o.TgZ(14,"div",7),o.TgZ(15,"button",8),o.NdJ("click",function(){return e.openBookExpertPop()}),o._uU(16,"Book Expert Assistance"),o.qZA(),o.qZA(),o.qZA())},styles:[".bookexpert-body[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:clamp(1rem,2vw,2rem)}.bookexpert-body[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{color:#6d6d6d;font-size:14px;font-weight:400;line-height:28px;position:relative;padding-left:30px;counter-increment:counter}.bookexpert-body[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{counter-reset:counter}.bookexpert-body[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:before{background-color:#dde3ff;position:absolute;
1left:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;overflow:hidden;border-radius:100px;content:counter(counter);color:#5371ff;font-size:12px;text-align:center;font-weight:400}.btn-book-pop[_ngcontent-%COMP%]{padding:15px 20px;border-radius:10px;background:#165ED4;color:#fff;font-size:1rem;font-weight:700;border-width:1.5px}.btn-book-pop[_ngcontent-%COMP%]:hover{color:#165ed4;border-color:#165ed4;background:#fff}@media (max-width:767px){.btn-book-pop[_ngcontent-%COMP%]{width:100%}}"]}),t})(),ov=(()=>{class t{constructor(t){this.bsModalRef=t,this.onClose=new fo.xQ}ngOnInit(){const t=this.bsModalRef.content;t&&t.nodeData&&(this.nodeData=t.nodeData)}confirmDelete(){this.onClose.next(this.nodeData),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-flownode-delete-popup"]],decls:12,vars:0,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title"],[1,"modal-body","py-0"],[1,"text-start"],[1,"mb-0"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","button",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","button",1,"btn","btn-default","rounded-pill","btn_confirm","theme-bgcl","border-0",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2,"Are you sure you would like to delete this?"),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.TgZ(4,"div",3),o.TgZ(5,"p",4),o._uU(6,"Deleting a flow step or flow branch will also remove all following steps."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"div",5),o.TgZ(8,"button",6),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(9,"Cancel"),o.qZA(),o.TgZ(10,"button",7),o.NdJ("click",function(){return e.confirmDelete()}),o._uU(11,"Delete Step"),o.qZA(),o.qZA())},styles:[""]}),t})(),rv=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.customerService=e,this.IsDelete=!1}ngOnInit(){this.onClose=new fo.xQ}confirmDeleteConnect(t){let e;e=!0,this.customerService.updateCustomerAiMappingCheck({aiMappingCheck:!0}).subscribe(t=>{}),this.customerService.confirmedDelete=!1,this.onClose.next(!0),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-ai-mapping-onboarding-popup"]],decls:14,vars:0,consts:[[1,"modal-header","border-0","pb-0","text-center","flex-column","justify-content-center"],[1,"ai-modal-title"],[1,"ai-assistant"],[1,"modal-body","ai-body"],[1,"text-center","px-md-5"],[1,"px-md-5"],["src","../../../../assets/images/aimapping.gif","alt","ai mapping","width","890","height","510"],[1,"modal-footer","text-center","justify-content-center","border-0"],["type","link",1,"btn","btn-default","rounded-pill","btn_confirm",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2," Introducing "),o.TgZ(3,"span",2),o._uU(4,"AI Assistant "),o.qZA(),o._uU(5," To Sync Your Data Seamlessly "),o.qZA(),o.qZA(),o.TgZ(6,"div",3),o.TgZ(7,"div",4),o.TgZ(8,"p",5),o._uU(9,"Now you can fill out the setup form with just one click. If needed, you can customize the AI suggestions later."),o.qZA(),o._UZ(10,"img",6),o.qZA(),o.qZA(),o.TgZ(11,"div",7),o.TgZ(12,"a",8),o.NdJ("click",function(){return e.confirmDeleteConnect(e.modelConnectId)}),o._uU(13,"Got it!"),o.qZA(),o.qZA())},styles:[""]}),t})();var sv=n(202);let av=(()=>{class t{constructor(t,e){this.apiService=t,this.cookieService=e}optionsSelectData(t,e,n,i,o,r,s){const a=this.cookieService.get("customerId");if(i||(i={}),i.appId=n,i.connectid=r,i.nodeId=o,i.customerId=a,e.indexOf("GetSalesforceOptionsList")>-1){const t=e.split("GetSalesforceOptionsList");i.fieldName="name",i.tableName=t[1],e="GetSalesforceObjectOptionsList"}const c=Object.assign({authData:i,connectid:r,customerId:a,nodeId:o,authId:i.authId,appId:n,_token:i,formField:s},s);return this.apiService.request("post",`${t}/${e}`,c)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s),o.LFG(lo.N))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),cv=(()=>{class t{transform(t,e){return e?t.filter(t=>{if(t){const n="string"==typeof t.value;if("string"==typeof t.disp_val&&t.disp_val.match(new RegExp(e,"i"))||n&&t.value.match(new RegExp(e,"i")))return t}}):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"fiterSelectDropmenu",type:t,pure:!0}),t})(),lv=(()=>{class t{transform(t,e){return e?t.map(t=>(!t||!t.sample_data||!t.sample_data[0]||!t.sample_data[0].data||(t.sample_data[0].filtered=t.sample_data[0].data.filter(t=>{if(t){const n="string"==typeof t.text;if("string"==typeof t.key&&t.key.match(new RegExp(e,"i"))||n&&t.text.match(new RegExp(e,"i")))return t}})),t)):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"fiterSampleDataDropmenu",type:t,pure:!0}),t})(),dv=(()=>{class t{transform(t){return t&&t.value?(t.text+"  ("+JSON.stringify(t.value)+")").substring(0,145):t&&t.text?t.text:"No Value Found - Run Test from Trigger Step"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"samapleDataPipe",type:t,pure:!0}),t})();const uv=["advancedMappingBtn"],pv=["chatMessagesContainer"];function hv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",34),o.TgZ(1,"div"),o.TgZ(2,"h2",35),o._uU(3,"Set Up Option"),o.qZA(),o.qZA(),o.TgZ(4,"button",36),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeSetup()}),o.O4$(),o.TgZ(5,"svg",37),o._UZ(6,"path",38),o.qZA(),o.qZA(),o.qZA()}}
1function gv(t,e){1&t&&(o.TgZ(0,"h4"),o._uU(1,"Set Up:"),o.qZA())}function fv(t,e){if(1&t&&(o.TgZ(0,"h4"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.AsE("No Set up options required for ",t.currentApp.displayName," ",t.currentApp.actionNameTitle,":")}}function mv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",39),o.TgZ(1,"button",40),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).switchTab("setup")}),o._uU(2," Set Up: "),o.qZA(),o.TgZ(3,"button",40),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).switchTab("testing")}),o._uU(4," Test "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Udp("border-bottom","setup"===t.activeTab?"2px solid #007bff":"2px solid transparent")("color","setup"===t.activeTab?"#007bff":"#666")("font-weight","setup"===t.activeTab?"600":"400"),o.xp6(2),o.Udp("border-bottom","testing"===t.activeTab?"2px solid #007bff":"2px solid transparent")("color","testing"===t.activeTab?"#007bff":"#666")("font-weight","testing"===t.activeTab?"600":"400")}}function vv(t,e){1&t&&(o.TgZ(0,"span",41),o._UZ(1,"i",42),o.qZA())}function bv(t,e){if(1&t&&o._uU(0),2&t){const t=o.oxw(2);o.Oqu(t.isShowAdvancedMapping?"Advanced mapping On":"Advanced mapping off")}}function xv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",48),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).getPreviousMapping()}),o.O4$(),o.TgZ(1,"svg",49),o._UZ(2,"path",50),o._UZ(3,"path",51),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("disabled",t.disablePrevious)}}function _v(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",52),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).getNewMapping()}),o.O4$(),o.TgZ(1,"svg",49),o._UZ(2,"path",53),o._UZ(3,"path",54),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("disabled",!t.disablePrevious)}}function Cv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",55),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).getAIMapping()}),o.O4$(),o.TgZ(1,"svg",56),o._UZ(2,"path",57),o._UZ(3,"path",58),o._UZ(4,"path",59),o._UZ(5,"path",60),o._UZ(6,"path",61),o.qZA(),o._uU(7),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(7),o.hij("",t.aIMappingText," ")}}function wv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",9),o.YNc(1,xv,4,1,"button",43),o.YNc(2,_v,4,1,"button",44),o.YNc(3,Cv,8,1,"button",45),o.TgZ(4,"button",46),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleDisplay()}),o._UZ(5,"i",47),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",0!==t.currentApp.index&&!t.firstTimeAIMapping),o.xp6(1),o.Q6J("ngIf",0!==t.currentApp.index&&!t.firstTimeAIMapping),o.xp6(1),o.Q6J("ngIf",0!==t.currentApp.index&&("k2P4o69wb5f4733aiagent"!==t.currentApp.appId||"setup"===t.activeTab))}}function yv(t,e){1&t&&(o.TgZ(0,"div",62),o.TgZ(1,"p",63),o._uU(2,"AI mapping can make mistakes and might not map all fields; please verify and manually fill any missing fields. "),o.qZA(),o.qZA())}function Av(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",64),o.TgZ(1,"div",65),o.TgZ(2,"p"),o._uU(3,"Set this URL in "),o.TgZ(4,"strong"),o._uU(5,"your application to start getting data"),o.qZA(),o.qZA(),o.TgZ(6,"div",66),o.TgZ(7,"div",67),o._UZ(8,"input",68),o.qZA(),o.TgZ(9,"div",69),o.TgZ(10,"a",70),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.CopyToClipboard("https://loop.flozic.ai/customerconnect/getwebhookdata?accessToken=XopDfmlm9tc4Z6mWV5h4rT5ZpGFQMWtci&limit=100&page=0&connectId="+e.currentApp.triggerId)}),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(8),o.s9C("value","https://loop.flozic.ai/customerconnect/getwebhookdata?accessToken=XopDfmlm9tc4Z6mWV5h4rT5ZpGFQMWtci&limit=100&page=0&connectId="+t.currentApp.triggerId),o.xp6(2),o.Q6J("innerHTML",t.translation.COPY_TO_CLICKBOARD,o.oJD)}}function Zv(t,e){1&t&&(o.TgZ(0,"h3"),o._uU(1,"Select an action"),o.qZA())}function kv(t,e){1&t&&(o.TgZ(0,"div",87),o.TgZ(1,"ul"),o.TgZ(2,"li"),o._uU(3,"An action is an event your Connect performs when your trigger event occurs."),o.qZA(),o.TgZ(4,"li"),o._uU(5,"This is performed when the Connect runs. Select an Action Event from the dropdown menu."),o.qZA(),o.TgZ(6,"li"),o._uU(7,"Connect your preferred account and follow the instructions to start your action event. "),o.qZA(),o.qZA(),o.qZA())}function Tv(t,e){1&t&&(o.TgZ(0,"div",79),o.TgZ(1,"div",80),o.TgZ(2,"span"),o._UZ(3,"i",81),o.qZA(),o.TgZ(4,"h4"),o._uU(5,"Example"),o.qZA(),o.qZA(),o.TgZ(6,"div",82),o.TgZ(7,"p"),o._uU(8,"Actions can fetch the data based on triggers created. In other words, Action can help in implementing the data receptors and perform operations as per the user\u2019s need. "),o.qZA(),o.qZA(),o.qZA())}function Ov(t,e){1&t&&(o.TgZ(0,"div",84),o._UZ(1,"img",88),o.qZA())}function Mv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"aside",71),o.TgZ(1,"div",72),o.TgZ(2,"span",73),o._uU(3,"GUIDE"),o.qZA(),o.TgZ(4,"button",74),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleDisplay()}),o._UZ(5,"i",75),o.qZA(),o.qZA(),o.TgZ(6,"div",76),o.TgZ(7,"div",77),o.TgZ(8,"h3"),o._uU(9,"Choose your preferred details"),o.qZA(),o.TgZ(10,"p"),o._uU(11,"Here you\u2019ll notice some optional as well as required details to fetch your appropriate account/app. "),o.qZA(),o.YNc(12,Zv,2,0,"h3",1),o.YNc(13,kv,8,0,"div",78),o._UZ(14,"hr"),o.TgZ(15,"div",79),o.TgZ(16,"div",80),o.TgZ(17,"span"),o._UZ(18,"i",81),o.qZA(),o.TgZ(19,"h4"),o._uU(20,"Example"),o.qZA(),o.qZA(),o.TgZ(21,"div",82),o.TgZ(22,"p"),o._uU(23,"You need to select your preferences to allow Appy Pie for smooth and better functioning."),o.qZA(),o.qZA(),o.qZA(),o.YNc(24,Tv,9,0,"div",83),o.qZA(),o.TgZ(25,"div",84),o._UZ(26,"img",85),o.qZA(),o.YNc(27,Ov,2,0,"div",86),o.qZA(),o.qZA()}2&t&&(o.xp6(12),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(11),o.Q6J("ngIf",!1),o.xp6(3),o.Q6J("ngIf",!1))}
1function Iv(t,e){if(1&t&&(o.TgZ(0,"div",64),o.TgZ(1,"div",89),o.TgZ(2,"div",90),o.TgZ(3,"div",91),o.TgZ(4,"div",92),o._UZ(5,"i",93),o.qZA(),o.TgZ(6,"div",94),o.TgZ(7,"h5",95),o._uU(8),o.qZA(),o.TgZ(9,"p",96),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",97),o.TgZ(12,"a",98),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"div",91),o.TgZ(15,"div",92),o._UZ(16,"i",99),o.qZA(),o.TgZ(17,"div",94),o.TgZ(18,"h5",95),o._uU(19),o.qZA(),o.TgZ(20,"p",96),o._uU(21),o.qZA(),o.qZA(),o.TgZ(22,"div",97),o.TgZ(23,"a",98),o._uU(24),o.qZA(),o.qZA(),o.qZA(),o.TgZ(25,"div",91),o.TgZ(26,"div",92),o._UZ(27,"i",100),o.qZA(),o.TgZ(28,"div",94),o.TgZ(29,"h5",95),o._uU(30),o.qZA(),o.TgZ(31,"p",96),o._uU(32),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"div",91),o.TgZ(34,"div",92),o._UZ(35,"i",101),o.qZA(),o.TgZ(36,"div",94),o.TgZ(37,"h5",95),o._uU(38),o.qZA(),o._UZ(39,"p",96),o._uU(40),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(8),o.Oqu(t.translation.AWS_CERT),o.xp6(2),o.hij(" ",t.translation.AWS_CERT_TEXT,""),o.xp6(2),o.s9C("href",t.translation.AWS_CERT_DOWNLOAD,o.LSH),o.xp6(1),o.Oqu(t.translation.CUSTOM_DOWNLOAD),o.xp6(6),o.hij(" ",t.translation.AWS_PRI_KEY," "),o.xp6(2),o.hij(" ",t.translation.AWS_PRI_KEY_TEXT,""),o.xp6(2),o.s9C("href",t.translation.AWS_PRI_KEY_DOWNLOAD,o.LSH),o.xp6(1),o.Oqu(t.translation.CUSTOM_DOWNLOAD),o.xp6(6),o.hij("",t.translation.AWS_RESET," "),o.xp6(2),o.Oqu(t.translation.AWS_RESET_DESC),o.xp6(6),o.hij("",t.translation.AWS_CONFIGURE," "),o.xp6(2),o.hij("",t.translation.AWS_CONFIGURE_DESC," ")}}function Sv(t,e){1&t&&(o.TgZ(0,"span",136),o._uU(1,"(Optional)"),o.qZA())}function Pv(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"*"),o.qZA())}function Nv(t,e){1&t&&o._UZ(0,"div",145)}function qv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).index;return o.oxw(3).toggleText(e+"A6"+n)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(4).index,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+"A6"+e]?"Read Less":"Read More"," ")}}function Uv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",149),o._uU(3),o.YNc(4,qv,2,1,"button",150),o.qZA(),o.TgZ(5,"button",151),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(4).index;return o.oxw(3).removeselectedTextOption(n,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4),r=i.index,s=i.$implicit,a=o.oxw(3);o.Q6J("id",n+"A6"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+a.currentApp.image+")"),o.xp6(2),o.hij("",a.isTextExpanded?t[s.name+"__disp"]||t.display_value:a.truncateText(t[s.name+"__disp"]||t.display_value,100,t)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(t))}}function Ev(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,Uv,7,5,"span",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function Fv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",155),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(4).index;return o.oxw(3).selectValue(r,n,i)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4),r=i.index,s=i.$implicit,a=o.oxw(3);o.Udp("color",t.showErrorFormat?"#ff1b1b !important":"#676767"),o.ekj("active",a.selectedOptionIndex[r]===n||a.isOptionActive(t,s.name,r,n)),o.Q6J("value",t.value),o.xp6(1),o.hij("",t.disp_val," ")}}function Dv(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,Fv,2,6,"li",154),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(3),e=t.$implicit,n=t.index,i=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,e.dropdownOption,i.seachTerm["menu-drop"+n]))}}function Lv(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1," No result found "),o.qZA())}function Jv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",138),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValues(i,r,!1,e)}),o._UZ(1,"input",139),o.YNc(2,Nv,1,0,"div",140),o.YNc(3,Ev,2,1,"div",140),o.TgZ(4,"div",141),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValues(i,r,!1,e)}),o._UZ(5,"div",142),o.qZA(),o.TgZ(6,"div",143),o.TgZ(7,"div",114),o.TgZ(8,"div",115),o.TgZ(9,"span",116),o.O4$(),o.TgZ(10,"svg",49),o._UZ(11,"path",117),o._UZ(12,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"input",119),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(2).index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA(),o.TgZ(14,"div",120),o.TgZ(15,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValues(i,r,!0,e)}),o._UZ(16,"img",122),o.qZA(),o.TgZ(17,"button",144),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(3).clearSelection(e)}),o._UZ(18,"img",124),o.qZA(),o.TgZ(19,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).enableCustomValue(n,i)}),o._UZ(20,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(21,Dv,3,4,"ul",1),o.YNc(22,Lv,2,0,"p",1),o.ALo(23,"fiterSelectDropmenu"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(3);let r;o.Q6J("id","menu-drop"+e),o.xp6(1),o.Q6J("name",n.name)("id",n.name)("placeholder",n.placeholder),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[n.name]),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[n.name]),o.xp6(10),o.Q6J("value",i.seachTerm["menu-drop"+e]?i.seachTerm["menu-drop"+e]:""),o.xp6(8),o.Q6J("ngIf",n.dropdownOption&&n.dropdownOption[0]),o.xp6(1),o.Q6J("ngIf",n.dropdownOption&&0===(null==(r=o.xi3(23,9,n.dropdownOption,i.seachTerm["menu-drop"+e]))?null:r.length))}}function jv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",157),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(3).index;return o.oxw(3).selectValue(r,n,i)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(3),r=i.index,s=i.$implicit,a=o.oxw(3);
1o.Udp("color",t.showErrorFormat?"#ff1b1b !important":"#676767"),o.ekj("active",a.selectedOptionIndex[r]===n||a.isOptionActive(t,s.name,r,n)),o.Q6J("value",t.value),o.xp6(1),o.hij("",t.disp_val," ")}}function Rv(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,jv,2,6,"li",156),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,e.dropdownOption,i.seachTerm["menu-drop"+n]))}}function $v(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1," No result found "),o.qZA())}function Bv(t,e){1&t&&o._UZ(0,"div",145)}function Hv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).index;return o.oxw(3).toggleText(e+"A7"+n)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(4).index,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+"A7"+e]?"Read Less":"Read More"," ")}}function Qv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",149),o._uU(3),o.YNc(4,Hv,2,1,"button",150),o.qZA(),o.TgZ(5,"button",151),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(4).index;return o.oxw(3).removeselectedTextOption(n,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4),r=i.index,s=i.$implicit,a=o.oxw(3);o.Q6J("id",n+"A7"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+a.currentApp.image+")"),o.xp6(2),o.hij("",a.isTextExpanded?t[s.name+"__disp"]||t.display_value:a.truncateText(t[s.name+"__disp"]||t.display_value,100,t)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(t))}}function Yv(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,Qv,7,5,"span",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function zv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",165),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e,"")}),o._uU(1," Go to top level "),o.qZA()}}function Vv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",165),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e,"<GoToPrevious>")}),o._uU(1,"Go to previous level "),o.qZA()}}function Gv(t,e){if(1&t&&(o.TgZ(0,"li"),o.YNc(1,zv,2,0,"button",164),o.YNc(2,Vv,2,0,"button",164),o.qZA()),2&t){const t=o.oxw(4).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngIf",e.nestedStepsArray[t.name].length>1),o.xp6(1),o.Q6J("ngIf",e.nestedStepsArray[t.name].length>2)}}function Wv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",166),o.TgZ(1,"div",167),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(4).index;return o.oxw(3).selectValue(r,n,i)}),o._uU(2),o.qZA(),o.TgZ(3,"div",168),o.TgZ(4,"button",169),o.NdJ("click",function(e){const n=o.CHM(t).$implicit,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).getOptionValuesNestedSelect(r,s,!1,e,n.value)}),o._uU(5,">"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(7);o.Udp("color",t.showErrorFormat?"#ff1b1b !important":"#676767"),o.ekj("active",i.selectedOptionIndex===n),o.Q6J("value",t.value),o.xp6(2),o.Oqu(t.disp_val)}}function Kv(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,Gv,3,2,"li",1),o.YNc(2,Wv,6,6,"li",163),o.ALo(3,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(3),e=t.$implicit,n=t.index,i=o.oxw(3);o.xp6(1),o.Q6J("ngIf",i.nestedStepsArray&&i.nestedStepsArray[e.name]),o.xp6(1),o.Q6J("ngForOf",o.xi3(3,2,e.dropdownOption,i.seachTerm["menu-drop"+n]))}}function Xv(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",138),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e)}),o.TgZ(1,"div"),o._UZ(2,"input",139),o.YNc(3,Bv,1,0,"div",140),o.YNc(4,Yv,2,1,"div",140),o.TgZ(5,"div",158),o._UZ(6,"div",142),o.qZA(),o.qZA(),o.TgZ(7,"div"),o.TgZ(8,"div",159),o.TgZ(9,"div",114),o.TgZ(10,"div",160),o.TgZ(11,"span",116),o.O4$(),o.TgZ(12,"svg",49),o._UZ(13,"path",117),o._UZ(14,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(15,"input",161),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).onSearchButtonClick(e)})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA(),o.TgZ(16,"div",120),o.TgZ(17,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!0,e,"")}),o._UZ(18,"img",122),o.qZA(),o.TgZ(19,"button",162),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(3).clearSelection(e)}),o._UZ(20,"img",124),o.qZA(),o.TgZ(21,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).enableCustomValue(n,i)}),o._UZ(22,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,Kv,4,5,"ul",1),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(3);o.Q6J("id","menu-drop"+e),o.xp6(2),o.Q6J("name",n.name)("id",n.name)("placeholder",n.placeholder),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[n.name]),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[n.name]),o.xp6(11),o.Q6J("value",i.seachTerm["menu-drop"+e]?i.seachTerm["menu-drop"+e]:""),o.xp6(8),o.Q6J("ngIf",n.dropdownOption&&n.dropdownOption[0])}}function tb(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function eb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).closeOverlay(n),e.stopPropagation()}),o._UZ(1,"i",152),o.qZA()}}function nb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",161),o.NdJ("click",function(e){return o.CHM(t),o.oxw(6).onSearchButtonClick(e)})("keyup",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(3);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop"+t]?e.seachTerm["menu-drop"+t]:"")}}function ib(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",165),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e,"")}),o._uU(1,"Go to top level"),o.qZA()}}function ob(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",165),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(5),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e,"<GoToPrevious>")}),o._uU(1,"Go to previous level"),o.qZA()}}
1function rb(t,e){if(1&t&&(o.TgZ(0,"li"),o.YNc(1,ib,2,0,"button",164),o.YNc(2,ob,2,0,"button",164),o.qZA()),2&t){const t=o.oxw(4).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngIf",e.nestedStepsArray[t.name].length>1),o.xp6(1),o.Q6J("ngIf",e.nestedStepsArray[t.name].length>2)}}function sb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",166),o.TgZ(1,"div",167),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(4).index;return o.oxw(3).selectValue(r,n,i)}),o._uU(2),o.qZA(),o.TgZ(3,"div",168),o.TgZ(4,"button",169),o.NdJ("click",function(e){const n=o.CHM(t).$implicit,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).getOptionValuesNestedSelect(r,s,!1,e,n.value)}),o._uU(5,">"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(7);o.Udp("color",t.showErrorFormat?"#ff1b1b !important":"#676767"),o.ekj("active",i.selectedOptionIndex===n),o.Q6J("value",t.value),o.xp6(2),o.Oqu(t.disp_val)}}function ab(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,rb,3,2,"li",1),o.YNc(2,sb,6,6,"li",163),o.ALo(3,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(3),e=t.$implicit,n=t.index,i=o.oxw(3);o.xp6(1),o.Q6J("ngIf",i.nestedStepsArray&&i.nestedStepsArray[e.name]),o.xp6(1),o.Q6J("ngForOf",o.xi3(3,2,e.dropdownOption,i.seachTerm["menu-drop"+n]))}}const cb=function(t){return{position:t}};function lb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",170),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!1,e)}),o.TgZ(1,"div",112),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(3).closeOverlay(e)}),o.TgZ(2,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).stopPropagation(e)}),o.TgZ(3,"div",114),o.TgZ(4,"div",171),o.YNc(5,tb,2,0,"h3",172),o.YNc(6,eb,2,0,"button",173),o.qZA(),o.TgZ(7,"div",174),o.YNc(8,nb,6,1,"div",175),o.TgZ(9,"button",176),o.O4$(),o.TgZ(10,"svg",177),o._UZ(11,"path",178),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",120),o.TgZ(13,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValuesNestedSelect(i,r,!0,e,"")}),o._UZ(14,"img",122),o.qZA(),o.TgZ(15,"button",179),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(3).clearSelection(e)}),o._UZ(16,"img",124),o.qZA(),o.TgZ(17,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).enableCustomValue(n,i)}),o._UZ(18,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(19,ab,4,5,"ul",1),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(3);o.xp6(1),o.Q6J("id","customEditor"+e),o.xp6(4),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(n.name,!1)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(6,cb,"trigger"==i.currentApp.nodeType)),o.xp6(10),o.Q6J("ngIf",n.dropdownOption&&n.dropdownOption[0])}}function db(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"*"),o.qZA())}function ub(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4),i=n.$implicit,r=n.index;return o.oxw(3).addTextFieldAtTheLastCustomTextOption(e,i.name,r)}),o._uU(1,"+"),o.qZA()}}function pb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).toggleAddToSelectCustomValue(r.name,n,!1,e,s,s)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function hb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(3);return r.blurHandler(r.editOptions[i.name][0].value[n].value,e,["custom",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(3).setTextFieldValueCustomTextOption(i.name,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).openCustomDropDownOnClick(r.name,n,!1,e,s,s)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(3);return r.mouseleaveHandler(e,r.editOptions[i.name][0].value[n].value)}),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit;o.Q6J("id","editOptions["+e.name+"][0].value"+t)}}function gb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(3);return r.blurHandler(r.editOptions[i.name][0].value[n].value,e,["custom",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(3).setTextFieldValueCustomTextOption(i.name,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).updateCustomSelectedValues(n,r.name,e,s,s)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(3);return r.mouseleaveHandler(e,r.editOptions[i.name][0].value[n].value)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(3);o.Q6J("id","editOptions["+e.name+"][0].value"+t),o.xp6(1),o.hij(" ",n.editOptions[e.name][0].value[t].value,"")}}function fb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(3).readmoreButton("editOptions["+i.name+"][0].value"+n,e)}),o._uU(1,"Read More"),o.qZA()}}function mb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(3).valueSumbitClick(n.name,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function vb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",219),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(3).removeselectedCustomTextOption(n.name,e)}),o._UZ(1,"i",152),o.qZA()}}const bb=function(t,e){return{nothighlightbox:t,"customvalue-active":e}};
1function xb(t,e){if(1&t&&(o.TgZ(0,"span",204),o.YNc(1,pb,4,0,"div",205),o.YNc(2,hb,1,1,"div",206),o.YNc(3,gb,2,2,"div",206),o.YNc(4,fb,2,0,"button",207),o.YNc(5,mb,4,0,"button",208),o.YNc(6,vb,2,0,"button",209),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(4).$implicit,n=o.oxw(3);o.Q6J("ngClass",o.WLB(7,bb,!n.editOptions[e.name][0].value[t].value&&0===t,!(null!=n.editOptions[e.name][0]&&n.editOptions[e.name][0].value[t].value)&&null!=(null==n.editOptions[e.name][0]?null:n.editOptions[e.name][0].value[t].value))),o.xp6(1),o.Q6J("ngIf",null==(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[0]?null:n.editOptions[e.name][0].value[0].value)),o.xp6(1),o.Q6J("ngIf",""==(null==n.editOptions[e.name][0]?null:n.editOptions[e.name][0].value[t].value)),o.xp6(1),o.Q6J("ngIf",null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value),o.xp6(1),o.Q6J("ngIf",n.IsViewMore(null==n.editOptions[e.name][0]?null:n.editOptions[e.name][0].value[t].value,"editOptions["+e.name+"][0].value"+t)),o.xp6(1),o.Q6J("ngIf",n.isSubmitVisible[e.name+"_"+t]),o.xp6(1),o.Q6J("ngIf",(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value)||null!=(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value))}}function _b(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(3).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function Cb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",147),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(3).updateCustomSelectedValues(n,r.name,e,s,s)}),o._uU(4),o.YNc(5,_b,2,1,"button",150),o.qZA(),o.TgZ(6,"button",222),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).$implicit;return o.oxw(3).removeselectedCustomTextOption(n.name,e)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4),r=i.index,s=i.$implicit,a=o.oxw(3);o.xp6(1),o.Q6J("id",e+"A8"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+(null==a.connectList[null==n?null:n.nodeIndex]?null:a.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",a.isTextExpanded[e+s.name]?"label"===n.type?a.displayVal(n.value):a.isString(n.key)?n.key:"":a.truncateText("label"===n.type?a.isString(n.value)?n.value:a.displayVal(n.value):(a.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(n))}}function wb(t,e){1&t&&(o.TgZ(0,"span",223),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function yb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4),i=n.$implicit,r=n.index;return o.oxw(3).addTextFieldAtTheLastCustomTextOption(e+1,i.name,r)}),o._uU(1,"+"),o.qZA()}}const Ab=function(t){return{maxWidthIfsingletextField:t}};function Zb(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",197),o.YNc(2,ub,2,0,"span",198),o.YNc(3,xb,7,10,"span",199),o.YNc(4,Cb,8,5,"span",200),o.YNc(5,wb,6,0,"span",201),o.qZA(),o.YNc(6,yb,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ab,1==r.editOptions[i.name][0].value.length)),o.xp6(1),o.Q6J("ngIf",0===n&&(null==r.editOptions[i.name][0].value?null:r.editOptions[i.name][0].value.length)>0&&(r.editOptions[i.name][0].value[0].value||r.editOptions[i.name][0].value[0].key)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].value)&&(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value?null:r.editOptions[i.name][0].value.length)>=1&&"text"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].type)||"label"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].type))}}
1function kb(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,Zb,7,8,"ng-container",196),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name][0].value)}}function Tb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",229),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).addCrossOverClassCustomValue(e,n,n)})("blur",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(3).setFirstTextValueCustomTextOption(n.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(3).$implicit;return o.oxw(3).checkIfNotBlurAfteraWhile(e.name,"CustomTextOption")}),o.qZA()}}function Ob(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function Mb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index;return o.oxw(3).closeDropdownByCrossButton(e,"custom")}),o._UZ(1,"i",152),o.qZA()}}function Ib(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).filterApps(e,"menu-drop-custom"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(3);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop-custom"+t]?e.seachTerm["menu-drop-custom"+t]:"")}}function Sb(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Pb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).index;return o.oxw(3).showDataofCustomSampleData(i,n,e)}),o.YNc(1,Sb,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(3).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i,n)]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function Nb(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(3).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function qb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",240),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(2),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.$implicit,c=s.index;return o.oxw(3).slelectDataFromCustomSampleData(e,a,c,i,r.index)}),o.YNc(1,Nb,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.index,c=s.$implicit,l=o.oxw(3);o.ekj("active",l.isValueSelected(t,i,a)||l.isOptionSelected(t,c.name)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.Oqu(o.lcZ(4,4,t))}}function Ub(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,qb,5,6,"li",239),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(3).index,n=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",n.seachTerm["menu-drop-custom"+e]&&(null==n.seachTerm["menu-drop-custom"+e]?null:n.seachTerm["menu-drop-custom"+e].length)>0?null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function Eb(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,Pb,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,Ub,2,1,"div",1),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(3).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop-custom"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngIf",null==t||null==t.sample_data?null:t.sample_data.length)}}function Fb(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function Db(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(4).index;return o.oxw(3).closeOverlayCustomValue(n),e.stopPropagation()}),o._UZ(1,"i",152),o.qZA()}}
1function Lb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(4).index;return o.oxw(3).filterApps(e,"menu-drop-custom"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4).index,e=o.oxw(3);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop-custom"+t]?e.seachTerm["menu-drop-custom"+t]:"")}}function Jb(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(7);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function jb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).index;return o.oxw(3).showDataofCustomSampleData(i,n,e)}),o.YNc(1,Jb,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(4).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i,n)]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function Rb(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(7);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function $b(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",246),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index;return o.oxw(3).slelectDataFromCustomSampleData(e,a,c,i,r.index)}),o.YNc(1,Rb,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.index,c=s.$implicit,l=o.oxw(3);o.ekj("active",l.isValueSelected(t,i,a)||l.isOptionSelected(t,c.name)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.Oqu(o.lcZ(4,4,t))}}function Bb(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,jb,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,$b,5,6,"li",245),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop-custom"+i+"custom_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop-custom"+i]&&(null==r.seachTerm["menu-drop-custom"+i]?null:r.seachTerm["menu-drop-custom"+i].length)>0?null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function Hb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",112),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index;return o.oxw(3).closeOverlayCustomValue(e)}),o.TgZ(1,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(6).stopPropagation(e)}),o.TgZ(2,"div",243),o.TgZ(3,"div",244),o.TgZ(4,"div",171),o.YNc(5,Fb,2,0,"h3",172),o.YNc(6,Db,2,0,"button",173),o.qZA(),o.TgZ(7,"div",174),o.YNc(8,Lb,6,1,"div",175),o.TgZ(9,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(3).slelectDataFromCustomSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(10,"svg",177),o._UZ(11,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",193),o.TgZ(13,"ul"),o.YNc(14,Bb,4,3,"li",194),o.ALo(15,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3),e=t.index,n=t.$implicit,i=o.oxw(3);o.Q6J("id","Custom_value_Advanced"+e),o.xp6(1),o.Q6J("@slideDownAnimation",i.isOverlayOpenCustomAdvanced[e]),o.xp6(4),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(n.name,!0)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(10,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(15,7,i.newConnectList,i.seachTerm["menu-drop-custom"+e]))}}function Qb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",183),o.TgZ(1,"div",107),o.TgZ(2,"label"),o._uU(3),o.YNc(4,db,2,0,"span",110),o.qZA(),o._UZ(5,"p",135),o.qZA(),o.TgZ(6,"div",184),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",187),o.TgZ(10,"div",188),o.YNc(11,kb,2,1,"span",140),o.YNc(12,Tb,1,0,"div",189),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",190),o.TgZ(14,"div",191),o.TgZ(15,"div",171),o.YNc(16,Ob,2,0,"h3",172),o.YNc(17,Mb,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,Ib,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).slelectDataFromCustomSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(23,"div",193),o.TgZ(24,"ul"),o.YNc(25,Eb,4,3,"li",194),o.ALo(26,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(27,Hb,16,12,"div",195),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(3);o.xp6(3),o.hij("Custom Value for ",e.label," "),o.xp6(1),o.Q6J("ngIf","true"==e.required),o.xp6(1),o.Q6J("innerHTML",e.label_help,o.oJD),o.xp6(1),o.Q6J("id","menu-drop-custom"+n),o.xp6(2),o.Q6J("value",null==e.selectedOption?null:e.selectedOption.disp_val)("name",e.name)("id",e.name)("placeholder",e.placeholder),o.xp6(3),o.Q6J("ngIf",(null==i.editOptions[e.name][0]||null==i.editOptions[e.name][0].value?null:i.editOptions[e.name][0].value.length)>0),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[e.name]||0==i.editOptions[e.name][0].value),o.xp6(1),o.Q6J("id","scrollheightCustom"+n),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!0)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(20,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(26,17,i.newConnectList,i.seachTerm["menu-drop-custom"+n])),o.xp6(2),o.Q6J("ngIf",0!==i.currentApp.index)}}function Yb(t,e){1&t&&(o.TgZ(0,"span",261),o._UZ(1,"i",262),o._uU(2," Valid JSON"),o.qZA())}function zb(t,e){1&t&&(o.TgZ(0,"span",263),o._UZ(1,"i",264),o._uU(2," Invalid JSON"),o.qZA())}function Vb(t,e){1&t&&(o.TgZ(0,"span",265),o._uU(1,"Paste your JSON, then map values"),o.qZA())}function Gb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",266),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(3).formatJsonEditor(e.name)}
1),o._UZ(1,"i",267),o._uU(2," Format"),o.qZA()}}function Wb(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",268),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(3).clearJsonEditor(e.name)}),o._UZ(1,"i",269),o._uU(2," Clear"),o.qZA()}}function Kb(t,e){if(1&t&&(o.TgZ(0,"div",253),o.TgZ(1,"span",254),o._UZ(2,"i",255),o._uU(3," JSON"),o.qZA(),o.YNc(4,Yb,3,0,"span",256),o.YNc(5,zb,3,0,"span",257),o.YNc(6,Vb,2,0,"span",258),o.YNc(7,Gb,3,0,"button",259),o.YNc(8,Wb,3,0,"button",260),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(3);o.xp6(4),o.Q6J("ngIf",!0===e.isJsonEditorValid(t.name)),o.xp6(1),o.Q6J("ngIf",!1===e.isJsonEditorValid(t.name)),o.xp6(1),o.Q6J("ngIf",null===e.isJsonEditorValid(t.name)),o.xp6(1),o.Q6J("ngIf",!0===e.isJsonEditorValid(t.name)),o.xp6(1),o.Q6J("ngIf",e.editOptions&&e.editOptions[t.name]&&e.editOptions[t.name].length)}}function Xb(t,e){1&t&&o._UZ(0,"textarea",270)}function tx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).addTextFieldAtTheLastNew(n,r.name,e,s,s)}),o._uU(1," + "),o.qZA()}}function ex(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).toggleAddToSelect(r.name,n,!1,e,s,s)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function nx(t,e){1&t&&o._UZ(0,"span",282)}function ix(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",280),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.blurHandler(r.editOptions[i.name][n].value,e,["text",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.setTextFieldValue(i.name,n,e),r.captureJsonEditorCaret(i,n)})("mouseup",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(5).$implicit;return o.oxw(3).captureJsonEditorCaret(n,e)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.mouseleaveHandler(e,r.editOptions[i.name][n].value)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).openDropDownOnClick(r.name,n,!1,e,s,s)}),o.YNc(1,nx,1,0,"span",281),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5),n=e.index,i=e.$implicit,r=o.oxw(3);o.Q6J("id",t+"A2"+n)("innerHTML",r.editOptions[i.name][t].value,o.oJD),o.xp6(1),o.Q6J("ngIf",!r.editOptions[i.name][t].value)}}function ox(t,e){1&t&&o._UZ(0,"span",282)}function rx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",283),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.blurHandler(r.editOptions[i.name][n].value,e,["text",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.setTextFieldValue(i.name,n,e),r.captureJsonEditorCaret(i,n)})("mouseup",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(5).$implicit;return o.oxw(3).captureJsonEditorCaret(n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).updateSelectedValues(n,r.name,e,s,s)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit,r=o.oxw(3);return r.mouseleaveHandler(e,r.editOptions[i.name][n].value)}),o.YNc(1,ox,1,0,"span",281),o._uU(2),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5),n=e.index,i=e.$implicit,r=o.oxw(3);o.Q6J("id",t+"A2"+n)("innerHTML",r.editOptions[i.name][t].value,o.oJD),o.xp6(1),o.Q6J("ngIf",!r.editOptions[i.name][t].value),o.xp6(1),o.hij(" ",r.editOptions[i.name][t].value,"")}}function sx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).index;return o.oxw(3).readmoreButton(n+"A2"+i,e)}),o._uU(1,"Read More"),o.qZA()}}function ax(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(5).$implicit;return o.oxw(3).valueSumbitClick(n.name,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function cx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(5).index;return o.oxw(3).removeselectedTextOption(n,e)}),o._UZ(1,"i",152),o.qZA()}}
1function lx(t,e){if(1&t&&(o.TgZ(0,"span",276),o.YNc(1,ex,4,0,"div",205),o.YNc(2,ix,2,3,"div",277),o.YNc(3,rx,3,4,"div",278),o.YNc(4,sx,2,0,"button",207),o.YNc(5,ax,4,0,"button",208),o.YNc(6,cx,2,0,"button",279),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(5),n=e.$implicit,i=e.index,r=o.oxw(3);o.Q6J("ngClass",o.WLB(7,bb,!r.editOptions[n.name][t].value&&0===t,!(null!=r.editOptions[n.name]&&null!=r.editOptions[n.name][t]&&r.editOptions[n.name][t].value)&&null!=(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value))),o.xp6(1),o.Q6J("ngIf",null==r.editOptions[n.name][t].value||!r.editOptions[n.name][0]),o.xp6(1),o.Q6J("ngIf",!(null!=r.editOptions[n.name]&&null!=r.editOptions[n.name][t]&&r.editOptions[n.name][t].value)&&null!=(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value)),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value)&&!(null!=r.editOptions[n.name]&&null!=r.editOptions[n.name][t]&&r.editOptions[n.name][t].custom)),o.xp6(1),o.Q6J("ngIf",r.IsViewMore(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value,t+"A2"+i)),o.xp6(1),o.Q6J("ngIf",r.isSubmitVisible[n.name+"_"+t]),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value)||null!=(null==r.editOptions[n.name]||null==r.editOptions[n.name][t]?null:r.editOptions[n.name][t].value))}}function dx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit;return o.oxw(3).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5).$implicit,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function ux(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",147),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).updateSelectedValues(n,r.name,e,s,s)}),o._uU(4),o.YNc(5,dx,2,1,"button",150),o.qZA(),o.TgZ(6,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(5).index;return o.oxw(3).removeselectedTextOption(n,e)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(5),r=i.index,s=i.$implicit,a=o.oxw(3);o.xp6(1),o.Q6J("id",e+"A9"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+(null==a.connectList[null==n?null:n.nodeIndex]?null:a.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",a.isTextExpanded[e+s.name]?"label"===n.type?n.value:a.isString(n.key)?n.key:"":a.truncateText("label"===n.type?a.isString(n.value)?n.value:a.displayVal(n.value):(a.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(n))}}function px(t,e){if(1&t&&(o.TgZ(0,"div",286),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.hij(" ",t," ")}}function hx(t,e){if(1&t&&(o.TgZ(0,"span",284),o._UZ(1,"span",224),o.YNc(2,px,2,1,"div",285),o.TgZ(3,"button",225),o.O4$(),o.TgZ(4,"svg",216),o._UZ(5,"path",226),o._UZ(6,"path",227),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(),e=t.$implicit;o.Q6J("id","SpaceWrap_"+t.index),o.xp6(2),o.Q6J("ngForOf",e.spaces)}}function gx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(5),r=i.$implicit,s=i.index;return o.oxw(3).addTextFieldAtTheLastNew(n+1,r.name,e,s,s)}),o._uU(1,"+"),o.qZA()}}function fx(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",273),o.NdJ("click",function(t){return t.stopPropagation()}),o.YNc(2,tx,2,0,"span",198),o.YNc(3,lx,7,10,"span",274),o.YNc(4,ux,8,5,"span",200),o.YNc(5,hx,7,2,"span",275),o.qZA(),o.YNc(6,gx,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(5).$implicit,r=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(7,Ab,1==r.editOptions[i.name].length))("id","editOptions["+i.name+"]"+n),o.xp6(1),o.Q6J("ngIf",0===n&&(null==r.editOptions[i.name]?null:r.editOptions[i.name].length)>0&&(r.editOptions[i.name][0].value||r.editOptions[i.name][0].key)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].value)&&(null==r.editOptions[i.name]?null:r.editOptions[i.name].length)>=1&&"text"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].type)||"label"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].type))}}
1function mx(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,fx,7,9,"ng-container",196),o.qZA()),2&t){const t=o.oxw(4).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function vx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",287),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(4).$implicit;return o.oxw(3).setFirstTextValue(n.name,e)})("click",function(e){o.CHM(t);const n=o.oxw(4).index;return o.oxw(3).addCrossOverClass(e,n,n)})("keyup",function(e){o.CHM(t);const n=o.oxw(4).$implicit;return o.oxw(3).checkIfNotBlurAfteraWhile(n.name,e)}),o.qZA()}}function bx(t,e){if(1&t&&(o.TgZ(0,"div",185),o._UZ(1,"input",271),o.TgZ(2,"div",187),o.TgZ(3,"div",188),o.YNc(4,mx,2,1,"span",140),o.YNc(5,vx,1,0,"div",272),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("type",t.type)("value",null==t.selectedOption?null:t.selectedOption.disp_val)("name",t.name)("id",t.name)("placeholder",t.placeholder),o.xp6(3),o.Q6J("ngIf",e.editOptions&&e.editOptions[t.name]),o.xp6(1),o.Q6J("ngIf",!e.editOptions||!e.editOptions[t.name]||!e.editOptions[t.name][0])}}function xx(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function _x(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index;return o.oxw(3).closeDropdownByCrossButton(e,"standard")}),o._UZ(1,"i",152),o.qZA()}}function Cx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(3);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop"+t]?e.seachTerm["menu-drop"+t]:"")}}function wx(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function yx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",291),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).index;return o.oxw(3).showDataofSampleData(i,n,e)}),o.YNc(1,wx,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(3).index,r=o.oxw(3);o.Q6J("id","choiceBtnShowHidedrop"+i+"choices_dropmenu"+e),o.xp6(1),o.Q6J("ngIf",n&&n.image),o.xp6(2),o.hij(" ",e+1,". "),o.xp6(1),o.ekj("red-text",""==(null==n?null:n.actionNameTitle)||"Event not selected"===(null==n?null:n.actionNameTitle)),o.xp6(1),o.hij(" ",null!=n&&n.actionNameTitle?n.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i,e)]?"fa fa-angle-up fa-lg":"fa fa-angle-down fa-lg")}}function Ax(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Zx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",292),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.$implicit,c=s.index;return o.oxw(3).slelectDataFromSampleData(e,a,c,i,r.index)}),o.YNc(1,Ax,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.index,c=s.$implicit,l=o.oxw(3);o.ekj("active",l.isValueSelected(t,i,a)||l.isOptionSelected(t,c.name)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t)," ")}}const kx=function(){return["Splits in different flows","Always Run","Fallback"]},Tx=function(){return["Flow By Automate"]},Ox=function(){return[]};function Mx(t,e){if(1&t&&(o.TgZ(0,"li",288),o.YNc(1,yx,8,7,"a",289),o.TgZ(2,"ul",233),o.YNc(3,Zx,5,6,"li",290),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(3).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",!o.DdM(3,kx).includes(t.actionNameTitle)&&!o.DdM(4,Tx).includes(t.name)),o.xp6(1),o.Q6J("id","menu-drop"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop"+i]&&r.seachTerm["menu-drop"+i].length>0?(null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered)||o.DdM(5,Ox):(null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)||o.DdM(6,Ox))}}const Ix=function(t){return{"json-editor-box":t}};function Sx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",247),o.YNc(1,Kb,9,5,"div",248),o.YNc(2,Xb,1,0,"textarea",249),o.YNc(3,bx,6,7,"div",250),o.TgZ(4,"div",190),o.TgZ(5,"div",251),o.TgZ(6,"div",171),o.YNc(7,xx,2,0,"h3",172),o.YNc(8,_x,2,0,"button",173),o.qZA(),o.TgZ(9,"div",174),o.YNc(10,Cx,6,1,"div",175),o.TgZ(11,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).slelectDataFromSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(12,"svg",177),o._UZ(13,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(14,"div",193),o.TgZ(15,"ul"),o.YNc(16,Mx,4,7,"li",252),o.ALo(17,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(3);o.Q6J("ngClass",o.VKq(14,Ix,"json-editor"==e.type))("id","menu-drop"+n),o.xp6(1),o.Q6J("ngIf","json-editor"==e.type),o.xp6(1),o.Q6J("ngIf","System Prompt"===e.label),o.xp6(1),o.Q6J("ngIf","System Prompt"!==e.label),o.xp6(1),o.Q6J("id","scrollheight"+n),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!1)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(16,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(17,11,i.newConnectList,i.seachTerm["menu-drop"+n]))}}function Px(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function Nx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).closeOverlay(n),e.stopPropagation()}),o._UZ(1,"i",152),o.qZA()}}function qx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(3);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop"+t]?e.seachTerm["menu-drop"+t]:"")}}function Ux(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Ex(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",291),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).index;return o.oxw(3).showDataofSampleData(i,n,e)}),o.YNc(1,Ux,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(3).index,r=o.oxw(3);o.Q6J("id","choiceBtnShowHidedrop"+i+"choices_dropmenuMob"+e),o.xp6(1),o.Q6J("ngIf",n&&n.image),o.xp6(2),o.hij(" ",e+1,". "),o.xp6(1),o.ekj("red-text",""==(null==n?null:n.actionNameTitle)||"Event not selected"===(null==n?null:n.actionNameTitle)),o.xp6(1),o.hij(" ",null!=n&&n.actionNameTitle?n.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i,e)]?"fa fa-angle-up fa-lg":"fa fa-angle-down fa-lg")}}function Fx(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(6);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Dx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",296),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.$implicit,c=s.index;return o.oxw(3).slelectDataFromSampleData(e,a,c,i,r.index)}),o.YNc(1,Fx,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(3),a=s.$implicit,c=s.index,l=o.oxw(3);o.ekj("active",l.isOptionSelected(t,a.name)||l.isValueSelected(t,i,c)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t)," ")}}
1function Lx(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,Ex,8,7,"a",289),o.TgZ(2,"ul",233),o.YNc(3,Dx,5,6,"li",295),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(3).index,r=o.oxw(3);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop"+i+"choices_dropmenuMob"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop"+i]&&r.seachTerm["menu-drop"+i].length>0?(null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered)||o.DdM(3,Ox):(null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)||o.DdM(4,Ox))}}function Jx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",293),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(3).closeOverlay(e)}),o.TgZ(1,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).stopPropagation(e)}),o.TgZ(2,"div",294),o.TgZ(3,"div",251),o.TgZ(4,"div",171),o.YNc(5,Px,2,0,"h3",172),o.YNc(6,Nx,2,0,"button",173),o.qZA(),o.TgZ(7,"div",174),o.YNc(8,qx,6,1,"div",175),o.TgZ(9,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(3).slelectDataFromSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(10,"svg",177),o._UZ(11,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",193),o.TgZ(13,"ul"),o.YNc(14,Lx,4,5,"li",194),o.ALo(15,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(3);o.Q6J("id","multipleMenu"+e),o.xp6(1),o.Q6J("@slideDownAnimation",i.isOverlayOpen[e]),o.xp6(4),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(n.name,!1)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(10,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(15,7,i.newConnectList,i.seachTerm["menu-drop"+e]))}}function jx(t,e){1&t&&(o.TgZ(0,"div",307),o._uU(1,"OR continue if\u2026 "),o.TgZ(2,"span",308),o._uU(3,"*"),o.qZA(),o.qZA())}function Rx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).addTextFieldAtTheLastfiltercontinueif(e,i,n,i+"filter-continue-if"+n)}),o._uU(1,"+"),o.qZA()}}function $x(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index;return o.oxw(6).getConnectListOptionValuesfiltercontinueif(r,r+"filter-continue-if"+i,!1,e,i,n)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function Bx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit,a=o.oxw(3);return a.blurHandler(null==a.ANDORFilter[r][i].keyData[n]?null:a.ANDORFilter[r][i].keyData[n].value,e,["ANDORFilter",s.name,r,i,n]),a.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit;return o.oxw(3).setTextFieldValuefiltercontinueif(s.name,r,i,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit;return o.oxw(3).openDropDownOnClickFilterByAutomate(s.name,n,!1,e,r+"filter-continue-if"+i,i,r)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(6);return s.mouseleaveHandler(e,s.ANDORFilter[r][i].keyData[n].value)}),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(6),n=e.index;o.Q6J("id","editOptions["+e.$implicit.name+"]"+t)("id",t+"A3"+n)}}function Hx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit,a=o.oxw(3);return a.blurHandler(a.ANDORFilter[r][i].keyData[n].value,e,["ANDORFilter",s.name,r,i,n]),a.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit;return o.oxw(3).setTextFieldValuefiltercontinueif(s.name,r,i,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit;return o.oxw(3).updateSelectedValuesFilterByAutomate(n,s.name,e,r+"filter-continue-if"+i,i)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(6);return s.mouseleaveHandler(e,s.ANDORFilter[r][i].keyData[n].value)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index,n=o.oxw().index,i=o.oxw(3),r=i.$implicit,s=i.index,a=o.oxw(3);o.Q6J("id","editOptions["+r.name+"]"+t)("id",t+"A3"+s),o.xp6(1),o.hij(" ",a.AN
1DORFilter[n][e].keyData[t].value," ")}}function Qx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(6).index;return o.oxw(3).readmoreButton(n+"A3"+i,e)}),o._uU(1,"Read More"),o.qZA()}}function Yx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw().index,r=o.oxw(3).$implicit;return o.oxw(3).valueSumbitClickForFilterByAutomate(r.name,i,n,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function zx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).removeselectedTextOptionfiltercontinueif(i,n,e)}),o._UZ(1,"i",152),o.qZA()}}function Vx(t,e){if(1&t&&(o.TgZ(0,"span",322),o.YNc(1,$x,4,0,"div",205),o.YNc(2,Bx,1,2,"div",206),o.YNc(3,Hx,2,3,"div",206),o.YNc(4,Qx,2,0,"button",207),o.YNc(5,Yx,4,0,"button",208),o.YNc(6,zx,2,0,"button",279),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(2).index,n=o.oxw().index,i=o.oxw(3),r=i.index,s=i.$implicit,a=o.oxw(3);o.Q6J("ngClass",o.WLB(7,bb,!(null!=a.ANDORFilter[n][e].keyData[t]&&a.ANDORFilter[n][e].keyData[t].value)&&0===t,!(null!=a.ANDORFilter[n][e].keyData[t]&&a.ANDORFilter[n][e].keyData[t].value)&&null!=(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value))),o.xp6(1),o.Q6J("ngIf",null==(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value)||0===(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].length)),o.xp6(1),o.Q6J("ngIf",""==(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value)),o.xp6(1),o.Q6J("ngIf",null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value),o.xp6(1),o.Q6J("ngIf",a.IsViewMore(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value,t+"A3"+r)),o.xp6(1),o.Q6J("ngIf",a.isSubmitVisible[s.name+"_"+n+"_"+e+"_"+t]),o.xp6(1),o.Q6J("ngIf",""==(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value)||(null==a.ANDORFilter[n][e].keyData[t]?null:a.ANDORFilter[n][e].keyData[t].value))}}function Gx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).toggleText(e+"A10"+i+"_"+n)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index,n=o.oxw().index,i=o.oxw(6);o.xp6(1),o.hij(" ",i.isTextExpanded[t+"A10"+n+"_"+e]?"Read Less":"Read More"," ")}}function Wx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",323),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(3).$implicit;return o.oxw(3).updateSelectedValuesFilterByAutomate(n,s.name,e,r+"filter-continue-if"+i,i)}),o._uU(4),o.YNc(5,Gx,2,1,"button",150),o.qZA(),o.TgZ(6,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).removeselectedTextOptionfiltercontinueif(i,n,e)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(6);o.xp6(2),o.Udp("background-image","url("+s.appyConfig.cdnMediaPath+(null==s.connectList[null==e?null:e.nodeIndex]?null:s.connectList[null==e?null:e.nodeIndex].image)+")"),o.xp6(2),o.hij("",s.isTextExpanded[n+"A10"+r+"_"+i]?"label"===e.type?s.displayVal(e.value):s.isString(e.key)?e.key:"":s.truncateText("label"===e.type?s.isString(e.value)?e.value:s.displayVal(e.value):(s.isString(e.key),e.key),100,e)," "),o.xp6(1),o.Q6J("ngIf",s.shouldShowReadMoreButton(e))}}function Kx(t,e){1&t&&(o.TgZ(0,"span",324),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function Xx(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).addTextFieldAtTheLastfiltercontinueif(e+1,i,n,i+"filter-continue-if"+n)}),o._uU(1,"+"),o.qZA()}}
1function t_(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Rx,2,0,"span",198),o.TgZ(2,"span",197),o.YNc(3,Vx,7,10,"span",320),o.YNc(4,Wx,8,4,"span",200),o.YNc(5,Kx,6,0,"span",321),o.qZA(),o.YNc(6,Xx,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw().index,s=o.oxw(6);o.xp6(1),o.Q6J("ngIf",0==n&&(s.ANDORFilter[r][i].keyData[n].key||s.ANDORFilter[r][i].keyData[n].value||s.ANDORFilter[r][i].keyData[n].length>0)),o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ab,1==s.ANDORFilter[r][i].keyData.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",(null==s.ANDORFilter[r][i].keyData[n]?null:s.ANDORFilter[r][i].keyData[n].key)||(null==s.ANDORFilter[r][i].keyData[n]?null:s.ANDORFilter[r][i].keyData[n].value))}}function e_(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,t_,7,8,"ng-container",196),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.keyData)}}function n_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",287),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index;return o.oxw(6).setFirstTextValuefiltercontinueif(i,n,e)})("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index,r=o.oxw(3).$implicit;return o.oxw(3).addCrossOverClassFilterByAutomate(e,r.name,i,i+"filter-continue-if"+n)})("keyup",function(){o.CHM(t);const e=o.oxw(5).$implicit;return o.oxw(3).checkIfNotBlurAfteraWhile(e.name,"")}),o.qZA()}}function i_(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function o_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(6).closeDropdownByCrossButton(e,"filter")}),o._UZ(1,"i",152),o.qZA()}}function r_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index;return o.oxw(6).filterApps(e,"menu-drop"+i+"filter-continue-if"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw().index,n=o.oxw(6);o.xp6(5),o.Q6J("value",n.seachTerm["menu-drop"+e+"filter-continue-if"+t]?n.seachTerm["menu-drop"+e+"filter-continue-if"+t]:"")}}function s_(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function a_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index,r=o.oxw().index;return o.oxw(6).showDataofSampleDatafiltercontinueif(r+"filter-continue-if"+i,n,e)}),o.YNc(1,s_,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",326),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(8);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(1),o.Q6J("id","vikas"+i.isIconDown[n]),o.xp6(1),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function c_(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function l_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",327),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw().index;return o.oxw(6).slelectDataFromSampleDatafiltercontinueif(e,a,s,i,r.index)}),o.YNc(1,c_,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw().index,c=o.oxw(6);o.ekj("active",c.isValueSelectedFilterContinueIf(t,a,s,i)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}
1function d_(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,a_,8,7,"a",232),o.TgZ(2,"ul",233),o.YNc(3,l_,5,6,"li",325),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw().index,r=o.oxw().index,s=o.oxw(6);o.xp6(1),o.Q6J("ngIf",0!==s.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop"+r+"filter-continue-if"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",(null!=s.seachTerm&&s.seachTerm["menu-drop"+r+"filter-continue-if"+i]&&(null==s.seachTerm?null:s.seachTerm["menu-drop"+r+"filter-continue-if"+i].length)>0?null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)||o.DdM(3,Ox))}}function u_(t,e){1&t&&(o.TgZ(0,"div",328),o._uU(1,"Choose Condition..."),o.qZA())}function p_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(6).index;return o.oxw(3).toggleText(e+"A11"+n)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(6).index,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+"A11"+e]?"Read Less":"Read More"," ")}}function h_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",149),o._uU(3),o.YNc(4,p_,2,1,"button",150),o.qZA(),o.TgZ(5,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).removeselectedTextOptionfiltercontinueiffilterType(i,n,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(6),r=i.index,s=i.$implicit,a=o.oxw(3);o.Q6J("id",e+"A11"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+a.currentApp.image+")"),o.xp6(2),o.hij("",a.isTextExpanded[e+"A11"+r]?n[s.name+"__disp"]||n.display_value:a.truncateText(n[s.name+"__disp"]||n.display_value,100,n)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(n))}}function g_(t,e){if(1&t&&(o.TgZ(0,"span"),o.YNc(1,h_,7,5,"span",329),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(9);o.xp6(1),o.Q6J("ngIf",n.shouldNotDisplayImage(t))}}function f_(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,g_,2,1,"span",196),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.filterType)}}function m_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",157),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).selectValuefiltercontinueiffilterType(i,n,e)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2).index,i=o.oxw().index,r=o.oxw(6);o.ekj("active",r.isFilterTypeSelected(i,n,t.value)),o.Q6J("value",t.value),o.xp6(1),o.hij("",t.disp_val," ")}}function v_(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,m_,2,4,"li",330),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw().index,n=o.oxw(6);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,n.showFilterOptions,n.seachTerm["menu-drop"+e+"filter-continue-if-filterType"+t]))}}function b_(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1," No result found "),o.qZA())}function x_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",331),o.TgZ(1,"input",332),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index;return o.oxw(6).ANDORFilter[i][n].searchData[0].value=e})("blur",function(){return o.CHM(t),o.oxw(8).isReadyForContinue()}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw().index,r=o.oxw(6);o.xp6(1),o.Q6J("ngModel",r.ANDORFilter[i][e].searchData[0].value)("value",null==n||null==n.searchData||null==n.searchData[0]?null:n.searchData[0].value),o.uIk("placeholder","Enter text or insert data...")}}function __(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",333),o.TgZ(1,"button",334),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw().index;return o.oxw(6).removeAND_Filter(n,e)}),o._UZ(2,"i",335),o.qZA(),o.qZA()}}function C_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",309),o.TgZ(1,"div",310),o.TgZ(2,"div",185),o._UZ(3,"input",271),o.TgZ(4,"div",311),o.TgZ(5,"div",188),o.YNc(6,e_,2,1,"span",140),o.YNc(7,n_,1,0,"div",272),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"div",190),o.TgZ(9,"div",312),o.TgZ(10,"div",171),o.YNc(11,i_,2,0,"h3",172),o.YNc(12,o_,2,0,"button",173),o.qZA(),o.TgZ(13,"div",174),o.YNc(14,r_,6,1,"div",175),o.TgZ(15,"button",192),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).slelectDataFromSampleDatafiltercontinueif({text:"[:space:]",value:"[:space:]",key:""},n,e,0,0,!0)}),o.O4$(),o.TgZ(16,"svg",177),o._UZ(17,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"div",193),o.TgZ(19,"ul"),o.YNc(20,d_,4,4,"li",194),o.ALo(21,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(22,"div",313),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).getOptionValuesfiltercontinueiffilterType(n+"filter-continue-if-filterType"+e)}),o._UZ(23,"input",139),o.YNc(24,u_,2,0,"div",314),o.YNc(25,f_,2,1,"div",140),o.TgZ(26,"div",158),o._UZ(27,"div",142),o.qZA(),o.TgZ(28,"div",315),o.TgZ(29,"div",114),o.TgZ(30,"div",316),o.TgZ(31,"span",116),o.O4$(),o.TgZ(32,"svg",49),o._UZ(33,"path",117),o._UZ(34,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(35,"input",161),o.NdJ("click",function(t){return t.stopPropagation()})("keyup",function(e){const n=o.CHM(t).index,i=o.oxw().index;return o.oxw(6).filterApps(e,"menu-drop"+i+"filter-continue-if-filterType"+n)}),o.qZA(),o.qZA(),o.TgZ(36,"div",120),o.TgZ(37,"button",121),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).getOptionValuesfiltercontinueiffilterType(n+"filter-continue-if-filterType"+e)})("click",function(t){return t.stopPropagation()}),o._UZ(38,"img",122),o.qZA(),o.TgZ(39,"button",317),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).index;return o.oxw(3).clearSelection(e)})("click",function(t){return t.stopPropagation()}
1),o._UZ(40,"img",124),o.qZA(),o.qZA(),o.qZA(),o.YNc(41,v_,3,4,"ul",1),o.YNc(42,b_,2,0,"p",1),o.ALo(43,"fiterSelectDropmenu"),o.qZA(),o.qZA(),o.YNc(44,x_,2,3,"div",318),o.YNc(45,__,3,0,"div",319),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw().index,r=o.oxw(3),s=r.$implicit,a=r.index,c=o.oxw(3);let l;o.xp6(1),o.Q6J("id","menu-drop"+i+"filter-continue-if"+n),o.xp6(2),o.Q6J("type",s.type)("value",null==s.selectedOption?null:s.selectedOption.disp_val)("name",s.name)("id",s.name)("placeholder",s.placeholder),o.xp6(3),o.Q6J("ngIf",t.keyData&&t.keyData[0]),o.xp6(1),o.Q6J("ngIf",c.ANDORFilter[i]&&c.ANDORFilter[i][n]&&c.ANDORFilter[i][n].keyData&&0==c.ANDORFilter[i][n].keyData.length),o.xp6(1),o.Q6J("id","scrollheight"+a),o.xp6(3),o.Q6J("ngIf","trigger"!=c.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",c.shouldShowDropdownCloseButtonForFilter(i,n)),o.xp6(2),o.Q6J("ngIf","trigger"!=c.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(31,cb,"trigger"==c.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(21,25,c.newConnectList,c.seachTerm["menu-drop"+i+"filter-continue-if"+n])),o.xp6(2),o.Q6J("id","menu-drop"+i+"filter-continue-if-filterType"+n),o.xp6(1),o.Q6J("name",s.name)("id",s.name)("placeholder",s.placeholder),o.xp6(1),o.Q6J("ngIf",!t.filterType||!t.filterType[0]),o.xp6(1),o.Q6J("ngIf",t.filterType&&t.filterType[0]),o.xp6(10),o.Q6J("value",c.seachTerm["menu-drop"+i+"filter-continue-if-filterType"+n]?c.seachTerm["menu-drop"+i+"filter-continue-if-filterType"+n]:""),o.xp6(6),o.Q6J("ngIf",c.showFilterOptions),o.xp6(1),o.Q6J("ngIf",0===(null==(l=o.xi3(43,28,c.showFilterOptions,c.seachTerm["menu-drop"+i+"filter-continue-if-filterType"+n]))?null:l.length)),o.xp6(2),o.Q6J("ngIf",(null==t.filterType||null==t.filterType[0]?null:t.filterType[0].value)&&c.showFilterValue(t.filterType[0].value)&&(null==t||null==t.searchData?null:t.searchData[0])),o.xp6(1),o.Q6J("ngIf",!(0===i&&0===n))}}function w_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",336),o.NdJ("click",function(){return o.CHM(t),o.oxw(7).addOR_Filter()}),o.TgZ(1,"button",304),o._uU(2,"+ OR"),o.qZA(),o.qZA()}}function y_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",299),o.YNc(1,jx,4,0,"div",300),o.YNc(2,C_,46,33,"div",301),o.TgZ(3,"div",302),o.TgZ(4,"div",303),o.NdJ("click",function(){const e=o.CHM(t).index;return o.oxw(6).addAND_Filter(e)}),o.TgZ(5,"button",304),o._uU(6,"+ AND"),o.qZA(),o.qZA(),o.YNc(7,w_,3,0,"div",305),o.qZA(),o._UZ(8,"div",306),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(6);o.MGl("id","and_or_filter_",n,""),o.xp6(1),o.Q6J("ngIf",n>0),o.xp6(1),o.Q6J("ngForOf",t),o.xp6(5),o.Q6J("ngIf",n==i.ANDORFilter.length-1)}}function A_(t,e){if(1&t&&(o.TgZ(0,"div",297),o.YNc(1,y_,9,4,"div",298),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",t.ANDORFilter)}}function Z_(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function k_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index;return o.oxw(6).closeDropdownByCrossButton(e,"filter")}),o._UZ(1,"i",152),o.qZA()}}function T_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index;return o.oxw(6).filterApps(e,"menu-drop-mobile"+i+"filter-continue-if"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw().index,n=o.oxw(6);o.xp6(5),o.Q6J("value",n.seachTerm["menu-drop-mobile"+e+"filter-continue-if"+t]?n.seachTerm["menu-drop-mobile"+e+"filter-continue-if"+t]:"")}}function O_(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function M_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index,r=o.oxw().index;return o.oxw(6).showDataofSampleDatafiltercontinueif(r+"filter-continue-if"+i,n,e)}),o.YNc(1,O_,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",326),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(8);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(1),o.Q6J("id","vikas"+i.isIconDown[n]),o.xp6(1),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function I_(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function S_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",327),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw().index;return o.oxw(6).slelectDataFromSampleDatafiltercontinueif(e,a,s,i,r.index)}),o.YNc(1,I_,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw().index,c=o.oxw(6);o.ekj("active",c.isValueSelectedFilterContinueIf(t,a,s,i)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}
1function P_(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,M_,8,7,"a",232),o.TgZ(2,"ul",233),o.YNc(3,S_,5,6,"li",325),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw().index,r=o.oxw().index,s=o.oxw(6);o.xp6(1),o.Q6J("ngIf",0!==s.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop-mobile"+r+"filter-continue-if"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",(s.seachTerm["menu-drop-mobile"+r+"filter-continue-if"+i]&&s.seachTerm["menu-drop-mobile"+r+"filter-continue-if"+i].length>0?null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)||o.DdM(3,Ox))}}function N_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",157),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(2).index,i=o.oxw().index;return o.oxw(6).selectValuefiltercontinueiffilterType(i,n,e)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2).index,i=o.oxw().index,r=o.oxw(6);o.ekj("active",r.isFilterTypeSelected(i,n,t.value)),o.Q6J("value",t.value),o.xp6(1),o.hij("",t.disp_val," ")}}function q_(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,N_,2,4,"li",330),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw().index,n=o.oxw(6);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,n.showFilterOptions,n.seachTerm["menu-drop"+e+"filter-continue-if-filterType"+t]))}}function U_(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1," No result found "),o.qZA())}function E_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"div",340),o.TgZ(2,"div",341),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).closeOverlayIf(n+"filter-continue-if"+e)}),o.TgZ(3,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(7).stopPropagationIf(e)}),o.TgZ(4,"div",342),o.TgZ(5,"div",312),o.TgZ(6,"div",171),o.YNc(7,Z_,2,0,"h3",172),o.YNc(8,k_,2,0,"button",173),o.qZA(),o.TgZ(9,"div",174),o.YNc(10,T_,6,1,"div",175),o.TgZ(11,"button",192),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).slelectDataFromSampleDatafiltercontinueif({text:"[:space:]",value:"[:space:]",key:""},n,e,0,0,!0)}),o.O4$(),o.TgZ(12,"svg",177),o._UZ(13,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(14,"div",193),o.TgZ(15,"ul"),o.YNc(16,P_,4,4,"li",194),o.ALo(17,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(18,"div",343),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).closeOverlayIf(n+"filter-continue-if-filterType"+e)}),o.TgZ(19,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(7).stopPropagationIf(e)}),o.TgZ(20,"div",344),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw().index;return o.oxw(6).getOptionValuesfiltercontinueiffilterType(n+"filter-continue-if-filterType"+e)}),o.TgZ(21,"div",345),o.TgZ(22,"div",114),o.TgZ(23,"div",316),o.TgZ(24,"span",116),o.O4$(),o.TgZ(25,"svg",49),o._UZ(26,"path",117),o._UZ(27,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(28,"input",161),o.NdJ("click",function(t){return t.stopPropagation()})("keyup",function(e){const n=o.CHM(t).index,i=o.oxw().index;return o.oxw(6).filterApps(e,"menu-drop"+i+"filter-continue-if-filterType"+n)}),o.qZA(),o.qZA(),o.TgZ(29,"div",120),o.TgZ(30,"button",346),o._UZ(31,"img",122),o.qZA(),o.TgZ(32,"button",347),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4).index;return o.oxw(3).clearSelection(e)}),o._UZ(33,"img",124),o.qZA(),o.qZA(),o.qZA(),o.YNc(34,q_,3,4,"ul",1),o.YNc(35,U_,2,0,"p",1),o.ALo(36,"fiterSelectDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.index,n=o.oxw().index,i=o.oxw(6);let r;o.xp6(1),o.Q6J("id","menu-drop-mobile"+n+"filter-continue-if"+t),o.xp6(1),o.Q6J("id","onlyContinueif"+n+"filter-continue-if"+t),o.xp6(5),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButtonForFilter(n,t)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(18,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(17,12,i.newConnectList,i.seachTerm["menu-drop-mobile"+n+"filter-continue-if"+t])),o.xp6(2),o.Q6J("id","SingleonlyContinueif"+n+"filter-continue-if-filterType"+t),o.xp6(2),o.Q6J("id","menu-drop"+n+"filter-continue-if-filterType"+t),o.xp6(8),o.Q6J("value",i.seachTerm["menu-drop"+n+"filter-continue-if-filterType"+t]?i.seachTerm["menu-drop"+n+"filter-continue-if-filterType"+t]:""),o.xp6(6),o.Q6J("ngIf",i.showFilterOptions),o.xp6(1),o.Q6J("ngIf",0===(null==(r=o.xi3(36,15,i.showFilterOptions,i.seachTerm["menu-drop"+n+"filter-continue-if-filterType"+t]))?null:r.length))}}
1function F_(t,e){if(1&t&&(o.TgZ(0,"div",339),o.YNc(1,E_,37,20,"div",196),o.qZA()),2&t){const t=e.$implicit;o.MGl("id","and_or_filter_",e.index,""),o.xp6(1),o.Q6J("ngForOf",t)}}function D_(t,e){if(1&t&&(o.TgZ(0,"div",337),o.YNc(1,F_,2,2,"div",338),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",t.ANDORFilter)}}function L_(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Enter Custom ID as Key"),o.qZA())}function J_(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Select a Value or Input a Custom Value"),o.qZA())}function j_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(3).addTextFieldinBetweendynamicAppTextOption(n,e,i.name)}),o._uU(1,"+"),o.qZA()}}function R_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).getConnectListdynamicAppOptionValuesNew(r.name,i,!1,e,r.name,n)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function $_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(3);return s.blurHandler(s.dynamicAppField[r.name][i].value[n].value,e,["dynamicAppField",r.name,i,n])})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).setTextFieldValuedynamicAppTextOption(i,r.name,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).openDropDownOnClickWebhooksByAutomate(r.name,n,!1,e,i,i)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(3);return s.mouseleaveHandler(e,s.dynamicAppField[r.name][i].value[n].value)}),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index;o.Q6J("id",e+"A4"+t)}}function B_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",213),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(3);return s.blurHandler(s.dynamicAppField[r.name][i].value[n].value,e,["dynamicAppField",r.name,i,n])})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).setTextFieldValuedynamicAppTextOption(i,r.name,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).updateSelectedValuesWebhhokByAutomate(n,r.name,e,i,i)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(3);return s.mouseleaveHandler(e,s.dynamicAppField[r.name][i].value[n].value)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index,n=o.oxw(3).$implicit,i=o.oxw(3);o.Q6J("id",e+"A4"+t),o.xp6(1),o.hij(" ",i.dynamicAppField[n.name][e].value[t].value," ")}}function H_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index;return o.oxw(6).readmoreButton(i+"A4"+n,e)}),o._uU(1," Read More "),o.qZA()}}function Q_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(3).valueSumbitClickForWebhooksByAutomate(i.name,n,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function Y_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(3).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(1,"i",152),o.qZA()}}function z_(t,e){if(1&t&&(o.TgZ(0,"span",361),o.YNc(1,R_,4,0,"div",205),o.YNc(2,$_,1,1,"div",206),o.YNc(3,B_,2,2,"div",206),o.YNc(4,H_,2,0,"button",207),o.YNc(5,Q_,4,0,"button",208),o.YNc(6,Y_,2,0,"button",279),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(2).index,n=o.oxw(3).$implicit,i=o.oxw(3);o.Q6J("ngClass",o.WLB(7,bb,!i.dynamicAppField[n.name][e].value[t].value&&0===t,!i.dynamicAppField[n.name][e].value[t].value&&null!=i.dynamicAppField[n.name][e].value[t].value)),o.xp6(1),o.Q6J("ngIf",null==i.dynamicAppField[n.name][e].value[t].value||0===i.dynamicAppField[n.name][e].value[t].length),o.xp6(1),o.Q6J("ngIf",""==i.dynamicAppField[n.name][e].value[t].value),o.xp6(1),o.Q6J("ngIf",i.dynamicAppField[n.name][e].value[t].value),o.xp6(1),o.Q6J("ngIf",i.IsViewMore(i.dynamicAppField[n.name][e].value[t].value,e+"A4"+t)),o.xp6(1),o.Q6J("ngIf",i.isSubmitVisible[n.name+"_"+e+"_"+t]),o.xp6(1),o.Q6J("ngIf",i.dynamicAppField[n.name][e].value[t].value||null!=i.dynamicAppField[n.name][e].value[t].value)}}function V_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit;return o.oxw(3).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5).$implicit,n=o.oxw(3);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function G_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",147),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(3).updateSelectedValuesWebhhokByAutomate(n,r.name,e,i,i)}),o._uU(4),o.YNc(5,V_,2,1,"button",150),o.qZA(),o.TgZ(6,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(3).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(5),r=i.index,s=i.$implicit,a=o.oxw(3);o.xp6(1),o.Q6J("id",e+"A12"+r),o.xp6(1),o.Udp("background-image","url("+a.appyConfig.cdnMediaPath+(null==a.connectList[null==n?null:n.nodeIndex]?null:a.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",a.isTextExpanded[e+s.name]?"label"===n.type?n.value:a.isString(n.key)?n.key:"":a.truncateText("label"===n.type?(a.isString(n.value),n.value):(a.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",a.shouldShowReadMoreButton(n))}}function W_(t,e){1&t&&(o.TgZ(0,"span",362),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function K_(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(3).addTextFieldinBetweendynamicAppTextOption(n,e+1,i.name)}),o._uU(1,"+"),o.qZA()}}
1function X_(t,e){if(1&t&&(o.ynx(0),o.YNc(1,j_,2,0,"span",198),o.TgZ(2,"span",197),o.YNc(3,z_,7,10,"span",359),o.YNc(4,G_,8,5,"span",200),o.YNc(5,W_,6,0,"span",360),o.qZA(),o.YNc(6,K_,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(3);o.xp6(1),o.Q6J("ngIf",0==n&&(s.dynamicAppField[r.name][i].value[n].value||s.dynamicAppField[r.name][i].value[n].key||s.dynamicAppField[r.name][i].value[n].length>0)),o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ab,1==s.dynamicAppField[r.name][i].value.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",s.dynamicAppField[r.name][i].value[n].key||s.dynamicAppField[r.name][i].value[n].value)}}function tC(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,X_,7,8,"ng-container",196),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",n.dynamicAppField[e.name][t].value)}}function eC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",363),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(3).setFirstTextValuedynamicAppTextOption(n,i.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(3).checkIfNotBlurAfteraWhile(e.name,"dynamicAppTextOption")})("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(3).addCrossOverClassWebhooksByAutomate(e,i.name,n,n)}),o.qZA()}}function nC(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function iC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(3).closeDynamicAppDropdownByCrossButton(n.name,e)}),o._UZ(1,"i",152),o.qZA()}}function oC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(3).filterApps(e,i.name+"menu-drop-custom-dynamicApp"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(3);o.xp6(5),o.Q6J("value",n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]?n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]:"")}}function rC(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(7);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function sC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw().index,r=o.oxw(3),s=r.index,a=r.$implicit;return o.oxw(3).showDataofdynamicAppSampleData(s,i,n,e,a.name)}),o.YNc(1,rC,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(7);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function aC(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(7);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function cC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",365),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw(3).$implicit;return o.oxw(3).slelectDataFromdynamicAppSampleData(e,a,s,i,a.name,r.index)}),o.YNc(1,aC,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw().index,a=o.oxw(3).$implicit,c=o.oxw(3);o.ekj("active",c.isOptionOrValueSelected(t,a.name,s,i)||c.isValueSelected(t,i,s)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}
1function lC(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,sC,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,cC,5,6,"li",364),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw().index,r=o.oxw(3).$implicit,s=o.oxw(3);o.xp6(1),o.Q6J("ngIf",0!==s.currentApp.index),o.xp6(1),o.Q6J("id",r.name+"menu-drop-custom-dynamicApp"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i]&&s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i].length>0?null==t.sample_data?null:t.sample_data[0].filtered:null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function dC(t,e){1&t&&o._UZ(0,"label")}function uC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",366),o.TgZ(1,"button",367),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(3).removeDynamicFieldOfCustomerly(e,n.name)}),o._UZ(2,"i",368),o.qZA(),o.qZA()}}function pC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"fieldset",350),o.TgZ(1,"div",351),o.YNc(2,L_,2,0,"label",1),o.TgZ(3,"input",352),o.NdJ("keyup",function(e){const n=o.CHM(t).index,i=o.oxw(3).$implicit;return o.oxw(3).setDynamicAppFieldKey(i.name,n,e)}),o.qZA(),o.qZA(),o.TgZ(4,"div"),o.YNc(5,J_,2,0,"label",1),o.TgZ(6,"div",353),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",354),o.TgZ(10,"div",355),o.YNc(11,tC,2,1,"div",140),o.YNc(12,eC,1,0,"div",356),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",190),o.TgZ(14,"div",357),o.TgZ(15,"div",171),o.YNc(16,nC,2,0,"h3",172),o.YNc(17,iC,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,oC,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(3).$implicit;return o.oxw(3).slelectDataFromdynamicAppSampleData({text:"[:space:]",value:"[:space:]",key:""},n,e,0,n.name,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(23,"div",193),o.TgZ(24,"ul"),o.YNc(25,lC,4,3,"li",194),o.ALo(26,"fiterSampleDataDropmenu"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(27,"div"),o.YNc(28,dC,1,0,"label",1),o.YNc(29,uC,3,0,"div",358),o.qZA(),o.qZA()}if(2&t){const t=e.index,n=o.oxw(3).$implicit,i=o.oxw(3);o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("value",null==i.dynamicAppField||null==i.dynamicAppField[n.name]||null==i.dynamicAppField[n.name][t]||null==i.dynamicAppField[n.name][t].key||null==i.dynamicAppField[n.name][t].key[0]?null:i.dynamicAppField[n.name][t].key[0].value),o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("id",n.name+"menu-drop-custom-dynamicApp"+t),o.xp6(2),o.Q6J("value",null==n.selectedOption?null:n.selectedOption.disp_val)("name",n.name)("id",n.name)("placeholder",n.placeholder),o.xp6(3),o.Q6J("ngIf",i.dynamicAppField[n.name][t]&&i.dynamicAppField[n.name][t].value&&i.dynamicAppField[n.name][t].value[0]),o.xp6(1),o.Q6J("ngIf",0==i.dynamicAppField[n.name][t].value.length),o.xp6(1),o.Q6J("id",n.name+"scrollheight"+t),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButtonForDynamicApp(n.name,t)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(21,cb,"trigger"==i.currentApp.nodeType)),o.xp6(5),o.Q6J("ngForOf",o.xi3(26,18,i.newConnectList,i.seachTerm[n.name+"menu-drop-custom-dynamicApp"+t])),o.xp6(3),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("ngIf",0!==t)}}function hC(t,e){if(1&t&&(o.TgZ(0,"div",348),o.YNc(1,pC,30,23,"fieldset",349),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.dynamicAppField[t.name])}}function gC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",369),o.TgZ(1,"button",370),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(3).addDynamicFieldOfCustomerly(e.name)}),o._UZ(2,"i",371),o.qZA(),o.qZA()}}function fC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",106),o.TgZ(1,"div",107),o.TgZ(2,"label",108),o._uU(3),o.YNc(4,Sv,2,0,"span",109),o.YNc(5,Pv,2,0,"span",110),o.qZA(),o.qZA(),o.YNc(6,Jv,24,12,"div",111),o.TgZ(7,"div",112),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(3).closeOverlay(e)}),o.TgZ(8,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).stopPropagation(e)}),o.TgZ(9,"div",114),o.TgZ(10,"div",115),o.TgZ(11,"span",116),o.O4$(),o.TgZ(12,"svg",49),o._UZ(13,"path",117),o._UZ(14,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(15,"input",119),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index;return o.oxw(3).filterApps(e,"menu-drop"+n)}),o.qZA(),o.qZA(),o.TgZ(16,"div",120),o.TgZ(17,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(),i=n.$implicit,r=n.index;return o.oxw(3).getOptionValues(i,r,!0,e)}),o._UZ(18,"img",122),o.qZA(),o.TgZ(19,"button",123),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(3).clearSelection(e)}),o._UZ(20,"img",124),o.qZA(),o.TgZ(21,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(),n=e.$implicit,i=e.index;return o.oxw(3).enableCustomValue(n,i)}),o._UZ(22,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,Rv,3,4,"ul",1),o.YNc(24,$v,2,0,"p",1),o.ALo(25,"fiterSelectDropmenu"),o.qZA(),o.qZA(),o.YNc(26,Xv,24,8,"div",111),o.YNc(27,lb,20,8,"div",127),o.YNc(28,Qb,28,22,"div",128),o.YNc(29,Sx,18,18,"div",129),o.YNc(30,Jx,16,12,"div",130),o.YNc(31,A_,2,1,"div",131),o.YNc(32,D_,2,1,"div",132),o.YNc(33,hC,2,1,"div",133),o.YNc(34,gC,3,0,"div",134),o._UZ(35,"p",135),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(3);let r;o.xp6(2),o.Q6J("id",e.name),o.xp6(1),o.hij("",e.label," "),o.xp6(1),o.Q6J("ngIf",!e.required||"false"===e.required),o.xp6(1),o.Q6J("ngIf",e.required&&"false"!==e.required),o.xp6(1),o.Q6J("ngIf","select"===e.type),o.xp6(1),o.Q6J("id","customEditor"+n),o.xp6(8),o.Q6J("value",i.seachTerm["menu-drop"+n]?i.seachTerm["menu-drop"+n]:""),o.xp6(8),o.Q6J("ngIf",e.dropdownOption&&e.dropdownOption[0]),o.xp6(1),o.Q6J("ngIf",e.dropdownOption&&0===(null==(r=o.xi3(25,19,e.dropdownOption,i.seachTerm["menu-drop"+n]))?null:r.length)),o.xp6(2),o.Q6J("ngIf","nestedSelect"===e.type),o.xp6(1),o.Q6J("ngIf","nestedSelect"===e.type),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[e.name]&&i.editOptions[e.name][0]&&"Use a Custom value (Advanced)"===i.editOptions[e.name][0].display_value),o.xp6(1),o.Q6J("ngIf","text"==e.type||"textarea"==e.type||"json-editor"==e.type&&i.editOptions&&i.editOptions.dataFormat&&i.editOptions.dataFormat[0]&&"JSON"==i.editOptions.dataFormat[0].value),o.xp6(1),o.Q6J("ngIf",("text"==e.type||"textarea"==e.type||"json-editor"==e.type)&&i.isOverlayOpen[n]),o.xp6(1),o.Q6J("ngIf","filter-continue-if"==e.type),o.xp6(1),o.Q6J("ngIf","filter-continue-if"==e.type),o.xp6(1),o.Q6J("ngIf","filter-continue-if"!==e.type&&"text"!==e.type&&"textarea"!==e.type&&"nestedSelect"!==e.type&&"select"!==e.type&&i.dynamicAppField&&i.dynamicAppField[e.name]),o.xp6(1),o.Q6J("ngIf","filter-continue-if"!==e.type&&"text"!==e.type&&"textarea"!==e.type&&"select"!==e.type&&"nestedSelect"!==e.type),o.xp6(1),o.Q6J("innerHTML",e.label_help,o.oJD)}}
1function mC(t,e){if(1&t&&(o.TgZ(0,"div",104),o.YNc(1,fC,36,22,"div",105),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngIf",(t.required&&"false"!==t.required||n.showAllFields)&&n.shouldShowSetupField(t))}}function vC(t,e){1&t&&(o.TgZ(0,"span",136),o._uU(1,"(Optional)"),o.qZA())}function bC(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"*"),o.qZA())}function xC(t,e){1&t&&o._UZ(0,"div",145)}function _C(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(8).toggleText(e+"A13")}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(8);o.xp6(1),o.hij(" ",e.isTextExpanded[t+"A13"]?"Read Less":"Read More"," ")}}function CC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",149),o._uU(3),o.YNc(4,_C,2,1,"button",150),o.qZA(),o.TgZ(5,"button",387),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(4).index,i=o.oxw(4);return i.removeselectedTextOption(n+i.currentApp.triggerEditOptions.length,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(4);o.Q6J("id",n+"A13"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+r.currentApp.image+")"),o.xp6(2),o.hij("",r.isTextExpanded[n+"A13"]?t[i.name+"__disp"]||t.display_value:r.truncateText(t[i.name+"__disp"]||t.display_value,100,t)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(t))}}function wC(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,CC,7,5,"span",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function yC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",389),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(4).index,s=o.oxw(4);return s.selectValue(r+s.currentApp.triggerEditOptions.length,n,i)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4),r=i.index,s=i.$implicit,a=o.oxw(4);o.ekj("active",a.selectedOptionIndex[r+a.currentApp.triggerEditOptions.length]===n||a.isOptionActive(t,s.name,r+a.currentApp.triggerEditOptions.length,n)),o.Q6J("value",t.value),o.xp6(1),o.hij(" ",t.disp_val,"")}}function AC(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,yC,2,4,"li",388),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(3),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,e.dropdownOption,i.seachTerm["menu-drop"+(n+i.currentApp.triggerEditOptions.length)]))}}function ZC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",383),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getOptionValues(i,r+s.currentApp.triggerEditOptions.length,!1,e)}),o._UZ(1,"input",384),o.YNc(2,xC,1,0,"div",140),o.YNc(3,wC,2,1,"div",140),o.TgZ(4,"div",158),o._UZ(5,"div",142),o.qZA(),o.TgZ(6,"div",385),o.TgZ(7,"div",114),o.TgZ(8,"div",386),o.TgZ(9,"span",116),o.O4$(),o.TgZ(10,"svg",49),o._UZ(11,"path",117),o._UZ(12,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4);return i.filterApps(e,"menu-drop"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA(),o.TgZ(14,"div",120),o.TgZ(15,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getOptionValues(i,r+s.currentApp.triggerEditOptions.length,!0,e)}),o._UZ(16,"img",122),o.qZA(),o.TgZ(17,"button",347),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4);return n.clearSelection(e+n.currentApp.triggerEditOptions.length)}),o._UZ(18,"img",124),o.qZA(),o.TgZ(19,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index,r=o.oxw(4);return r.enableCustomValue(n,i+r.currentApp.triggerEditOptions.length)}),o._UZ(20,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(21,AC,3,4,"ul",1),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(4);o.Q6J("id","menu-drop"+(e+i.currentApp.triggerEditOptions.length)),o.xp6(1),o.Q6J("name",n.name)("id",n.name)("placeholder",n.placeholder),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[n.name]),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[n.name]),o.xp6(10),o.Q6J("value",i.seachTerm["menu-drop"+(e+i.currentApp.triggerEditOptions.length)]?i.seachTerm["menu-drop"+(e+i.currentApp.triggerEditOptions.length)]:""),o.xp6(8),o.Q6J("ngIf",n.dropdownOption&&n.dropdownOption[0])}}function kC(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"*"),o.qZA())}function TC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4),i=n.$implicit,r=n.index,s=o.oxw(4);return s.addTextFieldAtTheLastCustomTextOptionNew(e,i.name,r+s.currentApp.triggerEditOptions.length)}),o._uU(1,"+"),o.qZA()}}function OC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index;return o.oxw(4).toggleAddToSelectCustomValue(r.name,n,!1,e,s,s)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function MC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",399),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.blurHandler(r.editOptions[i.name][0].value[n].value,e,["custom",i.name,n]),r.isReadyForContinue()})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.openCustomDropDownOnClickNew(r.name,n,!1,e,s+a.currentApp.triggerEditOptions.length,s+a.currentApp.triggerEditOptions.length)})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).setTextFieldValueCustomTextOption(i.name,n,e)}),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit;o.Q6J("id","editOptions["+e.name+"][0].value"+t)}}function IC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",399),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.blurHandler(r.editOptions[i.name][0].value[n].value,e,["custom",i.name,n]),r.isReadyForContinue()})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.updateCustomSelectedValues(n,r.name,e,s+a.currentApp.triggerEditOptions.length,s+a.currentApp.triggerEditOptions.length)})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).setTextFieldValueCustomTextOption(i.name,n,e)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(4);o.Q6J("id","editOptions["+e.name+"][0].value"+t),o.xp6(1),o.hij(" ",n.editOptions[e.name][0].value[t].value,"")}}function SC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).readmoreButton("editOptions["+i.name+"][0].value"+n,e)}),o._uU(1,"Read More"),o.qZA()}}function PC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).valueSumbitClick(n.name,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function NC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",400),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).removeselectedCustomTextOption(n.name,e)}),o._UZ(1,"i",152),o.qZA()}}
1function qC(t,e){if(1&t&&(o.TgZ(0,"span",396),o.YNc(1,OC,4,0,"div",205),o.YNc(2,MC,1,1,"div",397),o.YNc(3,IC,2,2,"div",397),o.YNc(4,SC,2,0,"button",207),o.YNc(5,PC,4,0,"button",208),o.YNc(6,NC,2,0,"button",398),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(4).$implicit,n=o.oxw(4);o.Q6J("ngClass",o.WLB(7,bb,!n.editOptions[e.name][0].value[t].value&&0===t,!(null!=n.editOptions[e.name][0]&&n.editOptions[e.name][0].value[t].value)&&null!=(null==n.editOptions[e.name][0]?null:n.editOptions[e.name][0].value[t].value))),o.xp6(1),o.Q6J("ngIf",null==(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[0]?null:n.editOptions[e.name][0].value[0].value)),o.xp6(1),o.Q6J("ngIf",""==(null==n.editOptions[e.name][0]?null:n.editOptions[e.name][0].value[t].value)),o.xp6(1),o.Q6J("ngIf",null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value),o.xp6(1),o.Q6J("ngIf",n.IsViewMore(n.editOptions[e.name][0].value[t].value,"editOptions["+e.name+"][0].value"+t)),o.xp6(1),o.Q6J("ngIf",n.isSubmitVisible[e.name+"_"+t]),o.xp6(1),o.Q6J("ngIf",(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value)||null!=(null==n.editOptions[e.name][0]||null==n.editOptions[e.name][0].value[t]?null:n.editOptions[e.name][0].value[t].value))}}function UC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(4);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function EC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",147),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.updateCustomSelectedValues(n,r.name,e,s+a.currentApp.triggerEditOptions.length,s+a.currentApp.triggerEditOptions.length)}),o._uU(4),o.YNc(5,UC,2,1,"button",150),o.qZA(),o.TgZ(6,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).$implicit;return o.oxw(4).removeselectedCustomTextOption(n.name,e)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("id",e+"A14"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+(null==r.connectList[null==n?null:n.nodeIndex]?null:r.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",r.isTextExpanded[e+i.name]?"label"===n.type?n.value:r.isString(n.key)?n.key:"":r.truncateText("label"===n.type?(r.isString(n.value),n.value):(r.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(n))}}function FC(t,e){1&t&&(o.TgZ(0,"span",401),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function DC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4),i=n.$implicit,r=n.index,s=o.oxw(4);return s.addTextFieldAtTheLastCustomTextOptionNew(e+1,i.name,r+s.currentApp.triggerEditOptions.length)}),o._uU(1,"+"),o.qZA()}}function LC(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",197),o.YNc(2,TC,2,0,"span",198),o.YNc(3,qC,7,10,"span",394),o.YNc(4,EC,8,5,"span",200),o.YNc(5,FC,6,0,"span",395),o.qZA(),o.YNc(6,DC,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ab,1==r.editOptions[i.name][0].value.length)),o.xp6(1),o.Q6J("ngIf",0==n&&(null==r.editOptions[i.name][0].value?null:r.editOptions[i.name][0].value.length)>0&&(r.editOptions[i.name][0].value[0].value||r.editOptions[i.name][0].value[0].key)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].value)&&(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value?null:r.editOptions[i.name][0].value.length)>=1&&"text"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].type)||"label"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][0]||null==r.editOptions[i.name][0].value[n]?null:r.editOptions[i.name][0].value[n].type))}}
1function JC(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,LC,7,8,"ng-container",196),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name][0].value)}}function jC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",229),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.addCrossOverClassCustomValue(e,n+i.currentApp.triggerEditOptions.length,n+i.currentApp.triggerEditOptions.length)})("blur",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).setFirstTextValueCustomTextOption(n.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(3).$implicit;return o.oxw(4).checkIfNotBlurAfteraWhile(e.name,"CustomTextOption")}),o.qZA()}}function RC(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function $C(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index,n=o.oxw(4);return n.closeDropdownByCrossButton(e+n.currentApp.triggerEditOptions.length,"custom")}),o._UZ(1,"i",152),o.qZA()}}function BC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.filterApps(e,"menu-drop-custom"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]?e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]:"")}}function HC(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function QC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).index,r=o.oxw(4);return r.showDataofCustomSampleData(i+r.currentApp.triggerEditOptions.length,n,e)}),o.YNc(1,HC,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(8);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function YC(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function zC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",403),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);return l.slelectDataFromCustomSampleData(e,a,c+l.currentApp.triggerEditOptions.length,i,r.index)}),o.YNc(1,YC,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);o.ekj("active",l.isOptionSelected(t,a.name)||l.isValueSelected(t,i,c+l.currentApp.triggerEditOptions.length)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}function VC(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,QC,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,zC,5,6,"li",402),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)]&&(null==r.seachTerm["menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)]?null:r.seachTerm["menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)].length)>0?null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}
1function GC(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,VC,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,e.newConnectList,e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]))}}function WC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",390),o.TgZ(1,"div",107),o.TgZ(2,"label"),o._uU(3),o.YNc(4,kC,2,0,"span",110),o.qZA(),o._UZ(5,"p",135),o.qZA(),o.TgZ(6,"div",391),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",187),o.TgZ(10,"div",188),o.YNc(11,JC,2,1,"span",140),o.YNc(12,jC,1,0,"div",189),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",190),o.TgZ(14,"div",392),o.TgZ(15,"div",171),o.YNc(16,RC,2,0,"h3",172),o.YNc(17,$C,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,BC,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(4).slelectDataFromCustomSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,GC,4,4,"div",393),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(3),o.hij("Custom Value for ",e.label," "),o.xp6(1),o.Q6J("ngIf","true"==e.required),o.xp6(1),o.Q6J("innerHTML",e.label_help,o.oJD),o.xp6(1),o.Q6J("id","menu-drop-custom"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(2),o.Q6J("value",null==e.selectedOption?null:e.selectedOption.disp_val)("name",e.name)("id",e.name)("placeholder",e.placeholder),o.xp6(3),o.Q6J("ngIf",i.editOptions[e.name][0].value.length>0),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[e.name]||0==i.editOptions[e.name][0].value),o.xp6(1),o.Q6J("id","scrollheightCustom"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!0)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(16,cb,"trigger"==i.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",i.showContentArray[n])}}function KC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.addTextFieldAtTheLastNew(n,r.name,e,s+a.currentApp.triggerEditOptions.length,s)}),o._uU(1," + "),o.qZA()}}function XC(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.toggleAddToSelect(r.name,n,!1,e,s+a.currentApp.triggerEditOptions.length,s)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function tw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",412),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.blurHandler(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].value,e,["text",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.setTextFieldValue(i.name,n,e),r.captureJsonEditorCaret(i,n)})("mouseup",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).captureJsonEditorCaret(n,e)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.mouseleaveHandler(e,r.editOptions[i.name][n].value)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.openDropDownOnClick(r.name,n,!1,e,s+a.currentApp.triggerEditOptions.length,s)}),o.qZA()}if(2&t){const t=o.oxw(2).index;o.Q6J("id",t+"A17")}}function ew(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",412),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.blurHandler(r.editOptions[i.name][n].value,e,["text",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.setTextFieldValue(i.name,n,e),r.captureJsonEditorCaret(i,n)})("mouseup",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).captureJsonEditorCaret(n,e)})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.mouseleaveHandler(e,r.editOptions[i.name][n].value)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.updateSelectedValues(n,r.name,e,s+a.currentApp.triggerEditOptions.length,s)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(4);o.Q6J("id",t+"A17"),o.xp6(1),o.hij(" ",n.editOptions[e.name][t].value," ")}}function nw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index;return o.oxw(8).readmoreButton(n+"A17",e)}),o._uU(1,"Read More"),o.qZA()}}function iw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).valueSumbitClick(n.name,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function ow(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",413),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).index,i=o.oxw(4);return i.removeselectedTextOption(n+i.currentApp.triggerEditOptions.length,e)}),o._UZ(1,"i",152),o.qZA()}}
1function rw(t,e){if(1&t&&(o.TgZ(0,"span",204),o.YNc(1,XC,4,0,"div",205),o.YNc(2,tw,1,1,"div",410),o.YNc(3,ew,2,2,"div",410),o.YNc(4,nw,2,0,"button",207),o.YNc(5,iw,4,0,"button",208),o.YNc(6,ow,2,0,"button",411),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(4).$implicit,n=o.oxw(4);o.Q6J("ngClass",o.WLB(7,bb,!(null!=n.editOptions[e.name][t]&&n.editOptions[e.name][t].value)&&0===t,!(null!=n.editOptions[e.name][t]&&n.editOptions[e.name][t].value)&&null!=(null==n.editOptions[e.name][t]?null:n.editOptions[e.name][t].value))),o.xp6(1),o.Q6J("ngIf",null==n.editOptions[e.name][t].value||!n.editOptions[e.name][0]),o.xp6(1),o.Q6J("ngIf",!n.editOptions[e.name][t].value&&null!=n.editOptions[e.name][t].value),o.xp6(1),o.Q6J("ngIf",(null==n.editOptions[e.name]||null==n.editOptions[e.name][t]?null:n.editOptions[e.name][t].value)&&!(null!=n.editOptions[e.name]&&null!=n.editOptions[e.name][t]&&n.editOptions[e.name][t].custom)),o.xp6(1),o.Q6J("ngIf",n.IsViewMore(null==n.editOptions[e.name]||null==n.editOptions[e.name][t]?null:n.editOptions[e.name][t].value,t+"A17")),o.xp6(1),o.Q6J("ngIf",n.isSubmitVisible[e.name+"_"+t]),o.xp6(1),o.Q6J("ngIf",(null==n.editOptions[e.name]||null==n.editOptions[e.name][t]?null:n.editOptions[e.name][t].value)||null!=(null==n.editOptions[e.name]||null==n.editOptions[e.name][t]?null:n.editOptions[e.name][t].value))}}function sw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(4);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function aw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.updateSelectedValues(n,r.name,e,s+a.currentApp.triggerEditOptions.length,s)}),o._uU(3),o.YNc(4,sw,2,1,"button",150),o.qZA(),o.TgZ(5,"button",414),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).index,i=o.oxw(4);return i.removeselectedTextOption(n+i.currentApp.triggerEditOptions.length,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4).$implicit,r=o.oxw(4);o.Q6J("id",e+"A15"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+(null==r.connectList[null==n?null:n.nodeIndex]?null:r.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",r.isTextExpanded[e+i.name]?"label"===n.type?n.value:r.isString(n.key)?n.key:"":r.truncateText("label"===n.type?r.isString(n.value)?n.value:r.displayVal(n.value):(r.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(n))}}function cw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",415),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);return a.addTextFieldAtTheLastNew(n+1,r.name,e,s+a.currentApp.triggerEditOptions.length,s)}),o._uU(1," + "),o.qZA()}}function lw(t,e){1&t&&(o.TgZ(0,"span",416),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function dw(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",273),o.NdJ("click",function(t){return t.stopPropagation()}),o.YNc(2,KC,2,0,"span",198),o.YNc(3,rw,7,10,"span",199),o.TgZ(4,"span",220),o.YNc(5,aw,7,5,"span",329),o.qZA(),o.YNc(6,cw,2,0,"span",408),o.YNc(7,lw,6,0,"span",409),o.qZA(),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(7,Ab,1==r.editOptions[i.name].length))("id","editOptions["+i.name+"]"+n),o.xp6(1),o.Q6J("ngIf",0===n&&(null==r.editOptions[i.name]?null:r.editOptions[i.name].length)>0&&((null==r.editOptions[i.name][0]?null:r.editOptions[i.name][0].value)||(null==r.editOptions[i.name][0]?null:r.editOptions[i.name][0].key))),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(2),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].value)&&(null==r.editOptions[i.name]?null:r.editOptions[i.name].length)>=1&&"text"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].type)||"label"===(null==r.editOptions[i.name]||null==r.editOptions[i.name][n]?null:r.editOptions[i.name][n].type)),o.xp6(1),o.Q6J("ngIf",!1)}}
1function uw(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,dw,8,9,"ng-container",196),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function pw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",417),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).setFirstTextValue(n.name,e)})("keyup",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).checkIfNotBlurAfteraWhile(n.name,e)})("click",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.addCrossOverClass(e,n,n+i.currentApp.triggerEditOptions.length)}),o.qZA()}}function hw(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function gw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index,n=o.oxw(4);return n.closeDropdownByCrossButton(e+n.currentApp.triggerEditOptions.length,"standard")}),o._UZ(1,"i",152),o.qZA()}}function fw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.filterApps(e,"menu-drop"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]?e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]:"")}}function mw(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function vw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).index,r=o.oxw(4);return r.showDataofSampleData(i+r.currentApp.triggerEditOptions.length,n,e)}),o.YNc(1,mw,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i+r.currentApp.triggerEditOptions.length,n)]?"fa fa-angle-up fa-lg":"fa fa-angle-down fa-lg")}}function bw(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function xw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",419),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);return l.slelectDataFromSampleData(e,a,c+l.currentApp.triggerEditOptions.length,i,r.index)}),o.YNc(1,bw,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.index,c=s.$implicit,l=o.oxw(4);o.ekj("active",l.isValueSelected(t,i,a+l.currentApp.triggerEditOptions.length))("active",l.isOptionSelected(t,c.name)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,6,t),"")}}function _w(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,vw,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,xw,5,8,"li",418),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop"+(i+r.currentApp.triggerEditOptions.length)+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop"+(i+(null==r.currentApp||null==r.currentApp.triggerEditOptions?null:r.currentApp.triggerEditOptions.length))]&&(null==r.seachTerm["menu-drop"+(i+(null==r.currentApp||null==r.currentApp.triggerEditOptions?null:r.currentApp.triggerEditOptions.length))]?null:r.seachTerm["menu-drop"+(i+(null==r.currentApp||null==r.currentApp.triggerEditOptions?null:r.currentApp.triggerEditOptions.length))].length)>0?null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}
1function Cw(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,_w,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,e.newConnectList,e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]))}}function ww(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",404),o.TgZ(1,"div",185),o._UZ(2,"input",271),o.TgZ(3,"div",405),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getConnectListOptionValuesClosed(i,r+s.currentApp.triggerEditOptions.length,!1,e)}),o.TgZ(4,"div",188),o.YNc(5,uw,2,1,"span",140),o.YNc(6,pw,1,0,"div",406),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"div",190),o.TgZ(8,"div",407),o.TgZ(9,"div",171),o.YNc(10,hw,2,0,"h3",172),o.YNc(11,gw,2,0,"button",173),o.qZA(),o.TgZ(12,"div",174),o.YNc(13,fw,6,1,"div",175),o.TgZ(14,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index,r=o.oxw(4);return r.slelectDataFromSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i+r.currentApp.triggerEditOptions.length,0,0,!0)}),o.O4$(),o.TgZ(15,"svg",177),o._UZ(16,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(17,Cw,4,4,"div",393),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(4);o.Q6J("ngClass",o.VKq(15,Ix,"json-editor"==e.type))("id","menu-drop"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(2),o.Q6J("type",e.type)("value",null==e.selectedOption?null:e.selectedOption.disp_val)("name",e.name)("id",e.name)("placeholder",e.placeholder),o.xp6(3),o.Q6J("ngIf",i.editOptions&&i.editOptions[e.name]),o.xp6(1),o.Q6J("ngIf",!i.editOptions||!i.editOptions[e.name]||!i.editOptions[e.name][0]),o.xp6(1),o.Q6J("id","scrollheight"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!1)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(17,cb,"trigger"==i.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",i.showContentArray[n])}}function yw(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Enter Lookup Values"),o.qZA())}function Aw(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Choose or Input Corresponding Value"),o.qZA())}function Zw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).addTextFieldinBetweendynamicAppTextOption(n,e,i.name)}),o._uU(1," + "),o.qZA()}}function kw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",210),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).getConnectListdynamicAppOptionValuesNew(r.name,i,!1,e,r.name,n)}),o.O4$(),o.TgZ(1,"svg",211),o._UZ(2,"path",212),o.qZA(),o._uU(3," Add or Select "),o.qZA()}}function Tw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",428),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);return s.blurHandler(s.dynamicAppField[r.name][i].value[n].value,e,["dynamicAppField",r.name,i,n])})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);return s.mouseleaveHandler(e,s.dynamicAppField[r.name][i].value[n].value)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).openDropDownOnClickWebhooksByAutomate(r.name,n,!1,e,i,i)})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).setTextFieldValuedynamicAppTextOption(i,r.name,n,e)}),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index;o.Q6J("id",e+"A5"+t)}}function Ow(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",429),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);return s.blurHandler(s.dynamicAppField[r.name][i].value[n].value,e,["dynamicAppField",r.name,i,n])})("mouseleave",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);return s.mouseleaveHandler(e,s.dynamicAppField[r.name][i].value[n].value)})("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).setTextFieldValuedynamicAppTextOption(i,r.name,n,e)})("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).updateSelectedValuesWebhhokByAutomate(n,r.name,e,i,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(2).index,n=o.oxw(3).$implicit,i=o.oxw(4);o.Q6J("id",e+"A5"+t),o.xp6(1),o.hij(" ",i.dynamicAppField[n.name][e].value[t].value,"")}}function Mw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index;return o.oxw(7).readmoreButton(i+"A5"+n,e)}),o._uU(1,"Read More"),o.qZA()}}function Iw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",215),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw(3).$implicit;
1return o.oxw(4).valueSumbitClickForWebhooksByAutomate(i.name,n,e)}),o.O4$(),o.TgZ(1,"svg",216),o._UZ(2,"path",217),o._UZ(3,"path",218),o.qZA(),o.qZA()}}function Sw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(1,"i",152),o.qZA()}}function Pw(t,e){if(1&t&&(o.TgZ(0,"span",396),o.YNc(1,kw,4,0,"div",205),o.YNc(2,Tw,1,1,"div",426),o.YNc(3,Ow,2,2,"div",427),o.YNc(4,Mw,2,0,"button",207),o.YNc(5,Iw,4,0,"button",208),o.YNc(6,Sw,2,0,"button",279),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(2).index,n=o.oxw(3).$implicit,i=o.oxw(4);o.Q6J("ngClass",o.WLB(7,bb,!i.dynamicAppField[n.name][e].value[t].value&&0===t,!i.dynamicAppField[n.name][e].value[t].value&&null!=i.dynamicAppField[n.name][e].value[t].value)),o.xp6(1),o.Q6J("ngIf",null==i.dynamicAppField[n.name][e].value[t].value||0===i.dynamicAppField[n.name][e].value[t].length),o.xp6(1),o.Q6J("ngIf",""==i.dynamicAppField[n.name][e].value[t].value),o.xp6(1),o.Q6J("ngIf",i.dynamicAppField[n.name][e].value[t].value),o.xp6(1),o.Q6J("ngIf",i.IsViewMore(i.dynamicAppField[n.name][e].value[t].value,e+"A5"+t)),o.xp6(1),o.Q6J("ngIf",i.isSubmitVisible[n.name+"_"+e+"_"+t]),o.xp6(1),o.Q6J("ngIf",i.dynamicAppField[n.name][e].value[t].value||null!=i.dynamicAppField[n.name][e].value[t].value)}}function Nw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(5).$implicit;return o.oxw(4).toggleText(e+n.name)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5).$implicit,n=o.oxw(4);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function qw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.TgZ(1,"span",147),o._UZ(2,"span",148),o.TgZ(3,"label",221),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).updateSelectedValuesWebhhokByAutomate(n,r.name,e,i,i)}),o._uU(4),o.YNc(5,Nw,2,1,"button",150),o.qZA(),o.TgZ(6,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(7,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(5).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("id",e+"A16"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+(null==r.connectList[null==n?null:n.nodeIndex]?null:r.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",r.isTextExpanded[e+i.name]?"label"===n.type?r.displayVal(n.value):r.isString(n.key)?n.key:"":r.truncateText("label"===n.type?(r.isString(n.value),n.value):(r.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(n))}}function Uw(t,e){1&t&&(o.TgZ(0,"span",430),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function Ew(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).addTextFieldinBetweendynamicAppTextOption(n,e+1,i.name)}),o._uU(1,"+"),o.qZA()}}function Fw(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Zw,2,0,"span",198),o.TgZ(2,"span",197),o.YNc(3,Pw,7,10,"span",394),o.YNc(4,qw,8,5,"span",200),o.YNc(5,Uw,6,0,"span",425),o.qZA(),o.YNc(6,Ew,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0==n&&(s.dynamicAppField[r.name][i].value[n].value||s.dynamicAppField[r.name][i].value[n].key||s.dynamicAppField[r.name][i].value[n].length>0)),o.xp6(1),o.Q6J("ngClass",o.VKq(6,Ab,1==s.dynamicAppField[r.name][i].value.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",s.dynamicAppField[r.name][i].value[n].key||s.dynamicAppField[r.name][i].value[n].value)}}
1function Dw(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,Fw,7,8,"ng-container",196),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",n.dynamicAppField[e.name][t].value)}}function Lw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",363),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(4).setFirstTextValuedynamicAppTextOption(n,i.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(4).checkIfNotBlurAfteraWhile(e.name,"dynamicAppTextOption")})("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(4).addCrossOverClassWebhooksByAutomate(e,i.name,n,n)}),o.qZA()}}function Jw(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function jw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(4).closeDynamicAppDropdownByCrossButton(n.name,e)}),o._UZ(1,"i",152),o.qZA()}}function Rw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(4).filterApps(e,i.name+"menu-drop-custom-dynamicApp"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(5),o.Q6J("value",n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]?n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]:"")}}function $w(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(9);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Bw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3),s=r.index,a=r.$implicit,c=o.oxw(4);return c.showDataofdynamicAppSampleData(s+c.currentApp.triggerEditOptions.length,i,n,e,a.name)}),o.YNc(1,$w,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(9);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function Hw(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(9);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Qw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",432),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(2).index,a=o.oxw(3).$implicit;return o.oxw(4).slelectDataFromdynamicAppSampleData(e,a,s,i,a.name,r.index)}),o.YNc(1,Hw,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(2).index,a=o.oxw(3).$implicit,c=o.oxw(4);o.ekj("active",c.isOptionOrValueSelected(t,a.name,s,i)||c.isValueSelected(t,i,s)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}function Yw(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,Bw,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,Qw,5,6,"li",431),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==s.currentApp.index),o.xp6(1),o.Q6J("id",r.name+"menu-drop-custom-dynamicApp"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i]&&s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i].length>0?null==t.sample_data?null:t.sample_data[0].filtered:null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function zw(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,Yw,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,n.newConnectList,n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]))}}function Vw(t,e){1&t&&o._UZ(0,"label")}function Gw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",366),o.TgZ(1,"button",367),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(4).removeDynamicFieldOfCustomerly(e,n.name)}),o._UZ(2,"i",368),o.qZA(),o.qZA()}}function Ww(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"fieldset",350),o.TgZ(1,"div",351),o.YNc(2,yw,2,0,"label",1),o.TgZ(3,"input",352),o.NdJ("keyup",function(e){const n=o.CHM(t).index,i=o.oxw(3).$implicit;return o.oxw(4).setDynamicAppFieldKey(i.name,n,e)}),o.qZA(),o.qZA(),o.TgZ(4,"div"),o.YNc(5,Aw,2,0,"label",1),o.TgZ(6,"div",421),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",422),o.TgZ(10,"div",423),o.YNc(11,Dw,2,1,"div",140),o.YNc(12,Lw,1,0,"div",356),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",190),o.TgZ(14,"div",424),o.TgZ(15,"div",171),o.YNc(16,Jw,2,0,"h3",172),o.YNc(17,jw,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,Rw,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(3).$implicit;return o.oxw(4).slelectDataFromdynamicAppSampleData({text:"[:space:]",value:"[:space:]",key:""},n,e,0,n.name,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,zw,4,4,"div",393),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(24,"div"),o.YNc(25,Vw,1,0,"label",1),o.YNc(26,Gw,3,0,"div",358),o.qZA(),o.qZA()}if(2&t){const t=e.index,n=o.oxw(3),i=n.$implicit,r=n.index,s=o.oxw(4);o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("value",null==s.dynamicAppField||null==s.dynamicAppField[i.name]||null==s.dynamicAppField[i.name][t]||null==s.dynamicAppField[i.name][t].key||null==s.dynamicAppField[i.name][t].key[0]?null:s.dynamicAppField[i.name][t].key[0].value),o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("id",i.name+"menu-drop-custom-dynamicApp"+t),o.xp6(2),o.Q6J("value",null==i.selectedOption?null:i.selectedOption.disp_val)("name",i.name)("id",i.name)("placeholder",i.placeholder),o.xp6(3),o.Q6J("ngIf",s.dynamicAppField[i.name][t]&&s.dynamicAppField[i.name][t].value&&s.dynamicAppField[i.name][t].value[0]),o.xp6(1),o.Q6J("ngIf",0==s.dynamicAppField[i.name][t].value.length),o.xp6(1),o.Q6J("id",i.name+"scrollheight"+t),o.xp6(3),o.Q6J("ngIf","trigger"!=s.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",s.shouldShowDropdownCloseButtonF
1orDynamicApp(i.name,t)),o.xp6(2),o.Q6J("ngIf","trigger"!=s.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(18,cb,"trigger"==s.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",s.showContentArray[r]),o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("ngIf",0!==t)}}function Kw(t,e){if(1&t&&(o.TgZ(0,"div",420),o.YNc(1,Ww,27,20,"fieldset",349),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.dynamicAppField[t.name])}}function Xw(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",369),o.TgZ(1,"button",370),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(4).addDynamicFieldOfCustomerly(e.name)}),o._UZ(2,"i",371),o.qZA(),o.qZA()}}function ty(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(8).toggleText(e+"A13")}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(8);o.xp6(1),o.hij(" ",e.isTextExpanded[t+"A13"]?"Read Less":"Read More"," ")}}function ey(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",147),o._UZ(1,"span",148),o.TgZ(2,"label",149),o._uU(3),o.YNc(4,ty,2,1,"button",150),o.qZA(),o.TgZ(5,"button",151),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(4).index,i=o.oxw(4);return i.removeselectedTextOption(n+i.currentApp.triggerEditOptions.length,e)}),o._UZ(6,"i",152),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(4);o.Q6J("id",n+"A13"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+r.currentApp.image+")"),o.xp6(2),o.hij("",r.isTextExpanded[n+"A13"]?t[i.name+"__disp"]||t.display_value:r.truncateText(t[i.name+"__disp"]||t.display_value,100,t)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(t))}}function ny(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,ey,7,5,"span",146),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name])}}function iy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",436),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index,r=o.oxw(4).index,s=o.oxw(4);return s.selectValue(r+s.currentApp.triggerEditOptions.length,n,i)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4),r=i.$implicit,s=i.index,a=o.oxw(4);o.ekj("active",a.isOptionActive(t,r.name,s+a.currentApp.triggerEditOptions.length,n)||a.selectedOptionIndex===n),o.Q6J("value",t.value),o.xp6(1),o.hij(" ",t.disp_val,"")}}function oy(t,e){if(1&t&&(o.TgZ(0,"ul"),o.YNc(1,iy,2,4,"li",435),o.ALo(2,"fiterSelectDropmenu"),o.qZA()),2&t){const t=o.oxw(3),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",o.xi3(2,1,e.dropdownOption,i.seachTerm["menu-drop"+(n+i.currentApp.triggerEditOptions.length)]))}}function ry(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",433),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getOptionValues(i,r+s.currentApp.triggerEditOptions.length,!1,e)}),o._UZ(1,"input",384),o.YNc(2,ny,2,1,"div",140),o.TgZ(3,"div",158),o._UZ(4,"div",142),o.qZA(),o.TgZ(5,"div",434),o.TgZ(6,"div",114),o.TgZ(7,"div",386),o.TgZ(8,"span",116),o.O4$(),o.TgZ(9,"svg",49),o._UZ(10,"path",117),o._UZ(11,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4);return i.filterApps(e,"menu-drop"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA(),o.TgZ(13,"div",120),o.TgZ(14,"button",121),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getOptionValues(i,r+s.currentApp.triggerEditOptions.length,!0,e)}),o._UZ(15,"img",122),o.qZA(),o.TgZ(16,"button",347),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4);return n.clearSelection(e+n.currentApp.triggerEditOptions.length)}),o._UZ(17,"img",124),o.qZA(),o.TgZ(18,"button",125),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index,r=o.oxw(4);return r.enableCustomValue(n,i+r.currentApp.triggerEditOptions.length)}),o._UZ(19,"img",126),o.qZA(),o.qZA(),o.qZA(),o.YNc(20,oy,3,4,"ul",1),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.index,n=t.$implicit,i=o.oxw(4);o.Q6J("id","menu-drop"+(e+i.currentApp.triggerEditOptions.length)),o.xp6(1),o.Q6J("name",n.name)("id",n.name)("placeholder",n.placeholder),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[n.name]),o.xp6(10),o.Q6J("value",i.seachTerm["menu-drop"+(e+i.currentApp.triggerEditOptions.length)]?i.seachTerm["menu-drop"+(e+i.currentApp.triggerEditOptions.length)]:""),o.xp6(8),o.Q6J("ngIf",n.dropdownOption&&n.dropdownOption[0])}}function sy(t,e){1&t&&(o.TgZ(0,"span",137),o._uU(1,"*"),o.qZA())}function ay(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).readmoreButton("editOptions["+i.name+"][0].value"+n,e)}),o._uU(1,"Read More"),o.qZA()}}const cy=function(t){return{nothighlightbox:t}};function ly(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",396),o.TgZ(1,"div",441),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).$implicit,r=o.oxw(4);return r.blurHandler(r.editOptions[i.name][0].value[n].value,e,["custom",i.name,n]),r.isReadyForContinue()})("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).$implicit;return o.oxw(4).setTextFieldValueCustomTextOption(i.name,n,e)}),o._uU(2),o.qZA(),o.YNc(3,ay,2,0,"button",207),o.TgZ(4,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).$implicit;return o.oxw(4).removeselectedCustomTextOption(n.name,e)}),o._UZ(5,"i",152),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(4).$implicit,n=o.oxw(4);o.Q6J("ngClass",o.VKq(4,cy,!n.editOptions[e.name][0].value[t].value&&0===t)),o.xp6(1),o.Q6J("id","editOptions["+e.name+"][0].value"+t),o.xp6(1),o.hij(" ",n.editOptions[e.name][0].value[t].value,""),o.xp6(1),o.Q6J("ngIf",n.IsViewMore(n.editOptions[e.name][0].value[t].value,"editOptions["+e.name+"][0].value"+t))}}function dy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(4).$implicit;return o.oxw(4).addTextFieldinBetweenCustomTextOption(e,n.name)}),o._uU(1,"+"),o.qZA()}}function uy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(4).$implicit;return o.oxw(4).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(4).$implicit,n=o.oxw(4);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function py(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.YNc(1,dy,2,0,"span",198),o.TgZ(2,"span",147),o._UZ(3,"span",148),o.TgZ(4,"label",149),o._uU(5),o.YNc(6,uy,2,1,"button",150),o.qZA(),o.TgZ(7,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4).$implicit;return o.oxw(4).removeselectedCustomTextOption(n.name,e)}),o._UZ(8,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0==e||"label"===r.editOptions[i.name][0].value[e-1].type),o.xp6(1),o.Q6J("id",e+"A14"),o.xp6(1),o.Udp("background-image","url("+r.appyConfig.cdnMediaPath+(null==r.connectList[null==n?null:n.nodeIndex]?null:r.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",r.isTextExpanded[e+i.name]?"label"===n.type?r.displayVal(n.value):r.isString(n.key)?n.key:"":r.truncateText("label"===n.type?r.isString(n.value)?n.value:r.displayVal(n.value):(r.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",r.shouldShowReadMoreButton(n))}}function hy(t,e){1&t&&(o.TgZ(0,"span",442),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function gy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4),i=n.$implicit,r=n.index;return o.oxw(4).addTextFieldAtTheLastCustomTextOption(e,i.name,r)}),o._uU(1,"+"),o.qZA()}}
1function fy(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",197),o.YNc(2,ly,6,6,"span",394),o.YNc(3,py,9,6,"span",200),o.YNc(4,hy,6,0,"span",440),o.qZA(),o.YNc(5,gy,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).$implicit,r=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(5,Ab,1==r.editOptions[i.name][0].value.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",n==r.editOptions[i.name][0].value.length-1)}}function my(t,e){if(1&t&&(o.TgZ(0,"span",145),o.YNc(1,fy,6,7,"ng-container",196),o.qZA()),2&t){const t=o.oxw(3).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.editOptions[t.name][0].value)}}function vy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",443),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw(4).setFirstTextValueCustomTextOption(n.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(3).$implicit;return o.oxw(4).checkIfNotBlurAfteraWhile(e.name,"CustomTextOption")}),o.qZA()}}function by(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function xy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index,n=o.oxw(4);return n.closeDropdownByCrossButton(e+n.currentApp.triggerEditOptions.length,"custom")}),o._UZ(1,"i",152),o.qZA()}}function _y(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.filterApps(e,"menu-drop-custom"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]?e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]:"")}}function Cy(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function wy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).index,r=o.oxw(4);return r.showDataofCustomSampleData(i+r.currentApp.triggerEditOptions.length,n,e)}),o.YNc(1,Cy,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(8);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function yy(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Ay(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",445),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);return l.slelectDataFromCustomSampleData(e,a,c+l.currentApp.triggerEditOptions.length,i,r.index)}),o.YNc(1,yy,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);o.ekj("active",l.isOptionSelected(t,a.name)||l.isValueSelected(t,i,c+l.currentApp.triggerEditOptions.length)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}function Zy(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,wy,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,Ay,5,6,"li",444),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)]&&r.seachTerm["menu-drop-custom"+(i+r.currentApp.triggerEditOptions.length)].length>0?null==t.sample_data?null:t.sample_data[0].filtered:null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}
1function ky(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,Zy,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,e.newConnectList,e.seachTerm["menu-drop-custom"+(t+e.currentApp.triggerEditOptions.length)]))}}function Ty(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",390),o.TgZ(1,"div",107),o.TgZ(2,"label"),o._uU(3),o.YNc(4,sy,2,0,"span",110),o.qZA(),o._UZ(5,"p",135),o.qZA(),o.TgZ(6,"div",437),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",405),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index,s=o.oxw(4);return s.getConnectListCustomOptionValues(i,r+s.currentApp.triggerEditOptions.length,!1,e)}),o.TgZ(10,"div",188),o.YNc(11,my,2,1,"span",140),o.YNc(12,vy,1,0,"div",438),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",439),o.TgZ(14,"div",392),o.TgZ(15,"div",171),o.YNc(16,by,2,0,"h3",172),o.YNc(17,xy,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,_y,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(4).slelectDataFromCustomSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i,0,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,ky,4,4,"div",393),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(3),o.hij("Custom Value for ",e.label," "),o.xp6(1),o.Q6J("ngIf","true"==e.required),o.xp6(1),o.Q6J("innerHTML",e.label_help,o.oJD),o.xp6(1),o.Q6J("id","menu-drop-custom"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(2),o.Q6J("value",null==e.selectedOption?null:e.selectedOption.disp_val)("name",e.name)("id",e.name)("placeholder",e.placeholder),o.xp6(3),o.Q6J("ngIf",i.editOptions[e.name][0].value.length>0),o.xp6(1),o.Q6J("ngIf",0==i.editOptions[e.name][0].value.length),o.xp6(1),o.Q6J("id","scrollheightCustom"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!0)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(16,cb,"trigger"==i.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",i.showContentArray[n])}}function Oy(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function My(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index,n=o.oxw(4);return n.closeDropdownByCrossButton(e+n.currentApp.triggerEditOptions.length,"standard")}),o._UZ(1,"i",152),o.qZA()}}function Iy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw(3).index,i=o.oxw(4);return i.filterApps(e,"menu-drop"+(n+i.currentApp.triggerEditOptions.length))}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(5),o.Q6J("value",e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]?e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]:"")}}function Sy(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function Py(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",449),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(4).index,r=o.oxw(4);return r.showDataofSampleData(i+r.currentApp.triggerEditOptions.length,n,e)}),o.YNc(1,Sy,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",r.isIconDown[r.calculateUniqueIndex(i+r.currentApp.triggerEditOptions.length,n)]?"fa fa-angle-up fa-lg":"fa fa-angle-down fa-lg")}}function Ny(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(8);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function qy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",450),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.$implicit,c=s.index,l=o.oxw(4);return l.slelectDataFromSampleData(e,a,c+l.currentApp.triggerEditOptions.length,i,r.index)}),o.YNc(1,Ny,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(4),a=s.index,c=s.$implicit,l=o.oxw(4);o.ekj("active",l.isValueSelected(t,i,a+l.currentApp.triggerEditOptions.length))("active",l.isOptionSelected(t,c.name)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,6,t),"")}}
1function Uy(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,Py,8,6,"a",447),o.TgZ(2,"ul",233),o.YNc(3,qy,5,8,"li",448),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4).index,r=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==r.currentApp.index),o.xp6(1),o.Q6J("id","menu-drop"+(i+r.currentApp.triggerEditOptions.length)+"choices_dropmenu_MoClass"+n),o.xp6(1),o.Q6J("ngForOf",r.seachTerm["menu-drop"+(i+(null==r.currentApp||null==r.currentApp.triggerEditOptions?null:r.currentApp.triggerEditOptions.length))]&&r.seachTerm["menu-drop"+(i+(null==r.currentApp||null==r.currentApp.triggerEditOptions?null:r.currentApp.triggerEditOptions.length))].length>0?null==t||null==t.sample_data?null:t.sample_data[0].filtered:null==t||null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function Ey(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,Uy,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3).index,e=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,e.newConnectList,e.seachTerm["menu-drop"+(t+e.currentApp.triggerEditOptions.length)]))}}function Fy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",446),o.TgZ(1,"div",439),o.TgZ(2,"div",407),o.TgZ(3,"div",171),o.YNc(4,Oy,2,0,"h3",172),o.YNc(5,My,2,0,"button",173),o.qZA(),o.TgZ(6,"div",174),o.YNc(7,Iy,6,1,"div",175),o.TgZ(8,"button",192),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index,r=o.oxw(4);return r.slelectDataFromSampleData({text:"[:space:]",value:"[:space:]",key:""},n,i+r.currentApp.triggerEditOptions.length,0,0,!0)}),o.O4$(),o.TgZ(9,"svg",177),o._UZ(10,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(11,Ey,4,4,"div",393),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(4);o.Q6J("ngClass",o.VKq(8,Ix,"json-editor"==e.type))("id","menu-drop"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(1),o.Q6J("id","scrollheight"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(3),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",i.shouldShowDropdownCloseButton(e.name,!1)),o.xp6(2),o.Q6J("ngIf","trigger"!=i.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(10,cb,"trigger"==i.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",i.showContentArray[n])}}function Dy(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Enter Lookup Values"),o.qZA())}function Ly(t,e){1&t&&(o.TgZ(0,"label"),o._uU(1,"Choose or Input Corresponding Value"),o.qZA())}function Jy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",214),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index;return o.oxw(7).readmoreButton(i+"A5"+n,e)}),o._uU(1,"Read More"),o.qZA()}}function jy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",396),o.TgZ(1,"div",457),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);return s.blurHandler(s.dynamicAppField[r.name][i].value[n].value,e,["dynamicAppField",r.name,i,n])})("mouseleave",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(5).$implicit,r=o.oxw(4);return r.mouseleaveHandler(e,r.editOptions[i.name][n].value)})("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3).$implicit;return o.oxw(4).setTextFieldValuedynamicAppTextOption(i,r.name,n,e)}),o._uU(2),o.qZA(),o.YNc(3,Jy,2,0,"button",207),o.TgZ(4,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(5,"i",152),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(2).index,n=o.oxw(3).$implicit,i=o.oxw(4);o.Q6J("ngClass",o.VKq(4,cy,!i.dynamicAppField[n.name][e].value[t].value&&0===t)),o.xp6(1),o.Q6J("id",e+"A5"+t),o.xp6(1),o.hij(" ",i.dynamicAppField[n.name][e].value[t].value,""),o.xp6(1),o.Q6J("ngIf",i.IsViewMore(i.dynamicAppField[n.name][e].value[t].value,e+"A5"+t))}}function Ry(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",203),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).addTextFieldinBetweendynamicAppTextOption(n,e,i.name)}),o._uU(1,"+"),o.qZA()}}function $y(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",153),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(5).$implicit;return o.oxw(4).toggleText(n+i.name),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).index,e=o.oxw(5).$implicit,n=o.oxw(4);o.xp6(1),o.hij(" ",n.isTextExpanded[t+e.name]?"Read Less":"Read More"," ")}}function By(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",220),o.YNc(1,Ry,2,0,"span",198),o.TgZ(2,"span",147),o._UZ(3,"span",148),o.TgZ(4,"label",149),o._uU(5),o.YNc(6,$
1y,2,1,"button",150),o.qZA(),o.TgZ(7,"button",151),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(2).index,i=o.oxw(3).$implicit;return o.oxw(4).removeselecteddynamicAppTextOption(n,e,i.name)}),o._UZ(8,"i",152),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0==e||"label"===s.dynamicAppField[r.name][i].value[e-1].type),o.xp6(1),o.Q6J("id",e+"A16"),o.xp6(1),o.Udp("background-image","url("+s.appyConfig.cdnMediaPath+(null==s.connectList[null==n?null:n.nodeIndex]?null:s.connectList[null==n?null:n.nodeIndex].image)+")"),o.xp6(2),o.hij("",s.isTextExpanded[e+r.name]?"label"===n.type?s.displayVal(n.value):s.isString(n.key)?n.key:"":s.truncateText("label"===n.type?s.isString(n.value)?n.value:s.displayVal(n.value):(s.isString(n.key),n.key),100,n)," "),o.xp6(1),o.Q6J("ngIf",s.shouldShowReadMoreButton(n))}}function Hy(t,e){1&t&&(o.TgZ(0,"span",458),o._UZ(1,"span",224),o.TgZ(2,"button",225),o.O4$(),o.TgZ(3,"svg",216),o._UZ(4,"path",226),o._UZ(5,"path",227),o.qZA(),o.qZA(),o.qZA())}function Qy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",228),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).index,n=o.oxw(3).$implicit;return o.oxw(4).addTextFieldAtTheLastdynamicAppTextOption(e,n.name)}),o._uU(1,"+"),o.qZA()}}function Yy(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"span",197),o.YNc(2,jy,6,6,"span",394),o.YNc(3,By,9,6,"span",200),o.YNc(4,Hy,6,0,"span",456),o.qZA(),o.YNc(5,Qy,2,0,"span",202),o.BQk()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(5,Ab,1==s.dynamicAppField[r.name][i].value.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",n==s.dynamicAppField[r.name][i].value.length-1)}}function zy(t,e){if(1&t&&(o.TgZ(0,"div",145),o.YNc(1,Yy,6,7,"ng-container",196),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",n.dynamicAppField[e.name][t].value)}}function Vy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",443),o.NdJ("blur",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(4).setFirstTextValuedynamicAppTextOption(n,i.name,e)})("keyup",function(){o.CHM(t);const e=o.oxw(4).$implicit;return o.oxw(4).checkIfNotBlurAfteraWhile(e.name,"dynamicAppTextOption")}),o.qZA()}}function Gy(t,e){1&t&&(o.TgZ(0,"h3",180),o._uU(1,"Search or select a dynamic value from previous step(s):"),o.qZA())}function Wy(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",181),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(4).closeDynamicAppDropdownByCrossButton(n.name,e)}),o._UZ(1,"i",152),o.qZA()}}function Ky(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",182),o.TgZ(1,"span",116),o.O4$(),o.TgZ(2,"svg",49),o._UZ(3,"path",117),o._UZ(4,"path",118),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"input",230),o.NdJ("keyup",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(3).$implicit;return o.oxw(4).filterApps(e,i.name+"menu-drop-custom-dynamicApp"+n)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(5),o.Q6J("value",n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]?n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]:"")}}function Xy(t,e){if(1&t&&o._UZ(0,"span",238),2&t){const t=o.oxw(2).$implicit,e=o.oxw(9);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function tA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",234),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index,r=o.oxw(3),s=r.index,a=r.$implicit,c=o.oxw(4);return c.showDataofdynamicAppSampleData(s+c.currentApp.triggerEditOptions.length,i,n,e,a.name)}),o.YNc(1,Xy,1,2,"span",235),o.TgZ(2,"span"),o._uU(3),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",236),o._UZ(7,"i",237),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(9);o.xp6(1),o.Q6J("ngIf",e&&e.image),o.xp6(2),o.hij(" ",n+1,". "),o.xp6(1),o.ekj("red-text",""==(null==e?null:e.actionNameTitle)||"Event not selected"===(null==e?null:e.actionNameTitle)),o.xp6(1),o.hij(" ",null!=e&&e.actionNameTitle?e.actionNameTitle:"Event not selected"," "),o.xp6(2),o.Q6J("ngClass",i.isIconDown[n]?"fa fa-angle-down fa-lg":"fa fa-angle-up fa-lg")}}function eA(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw(9);o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.image+") !important")}}function nA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",432),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(2).index,a=o.oxw(3).$implicit;return o.oxw(4).slelectDataFromdynamicAppSampleData(e,a,s,i,a.name,r.index)}),o.YNc(1,eA,1,2,"span",241),o.TgZ(2,"label",149),o._uU(3),o.ALo(4,"samapleDataPipe"),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(),i=n.index,r=n.$implicit,s=o.oxw(2).index,a=o.oxw(3).$implicit,c=o.oxw(4);o.ekj("active",c.isOptionOrValueSelected(t,a.name,s,i)||c.isValueSelected(t,i,s)),o.xp6(1),o.Q6J("ngIf",r&&r.image),o.xp6(2),o.hij(" ",o.lcZ(4,4,t),"")}}
1function iA(t,e){if(1&t&&(o.TgZ(0,"li",231),o.YNc(1,tA,8,6,"a",232),o.TgZ(2,"ul",233),o.YNc(3,nA,5,6,"li",431),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).index,r=o.oxw(3).$implicit,s=o.oxw(4);o.xp6(1),o.Q6J("ngIf",0!==s.currentApp.index),o.xp6(1),o.Q6J("id",r.name+"menu-drop-custom-dynamicApp"+i+"choices_dropmenu"+n),o.xp6(1),o.Q6J("ngForOf",s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i]&&s.seachTerm[r.name+"menu-drop-custom-dynamicApp"+i].length>0?null==t.sample_data?null:t.sample_data[0].filtered:null==t.sample_data||null==t.sample_data[0]?null:t.sample_data[0].data)}}function oA(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",193),o.TgZ(1,"ul"),o.YNc(2,iA,4,3,"li",194),o.ALo(3,"fiterSampleDataDropmenu"),o.qZA(),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(3).$implicit,n=o.oxw(4);o.xp6(2),o.Q6J("ngForOf",o.xi3(3,1,n.newConnectList,n.seachTerm[e.name+"menu-drop-custom-dynamicApp"+t]))}}function rA(t,e){1&t&&o._UZ(0,"label")}function sA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",366),o.TgZ(1,"button",334),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(3).$implicit;return o.oxw(4).removeDynamicFieldOfCustomerly(e,n.name)}),o._UZ(2,"i",368),o.qZA(),o.qZA()}}function aA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"fieldset",350),o.TgZ(1,"div",351),o.YNc(2,Dy,2,0,"label",1),o.TgZ(3,"input",352),o.NdJ("keyup",function(e){const n=o.CHM(t).index,i=o.oxw(3).$implicit;return o.oxw(4).setDynamicAppFieldKey(i.name,n,e)}),o.qZA(),o.qZA(),o.TgZ(4,"div",452),o.YNc(5,Ly,2,0,"label",1),o.TgZ(6,"div",453),o.TgZ(7,"div",185),o._UZ(8,"input",186),o.TgZ(9,"div",454),o.NdJ("click",function(e){const n=o.CHM(t).index,i=o.oxw(3).$implicit;return o.oxw(4).getConnectListdynamicAppOptionValues(i,n,!1,e,i.name)}),o.TgZ(10,"div",455),o.YNc(11,zy,2,1,"div",140),o.YNc(12,Vy,1,0,"div",438),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",439),o.TgZ(14,"div",424),o.TgZ(15,"div",171),o.YNc(16,Gy,2,0,"h3",172),o.YNc(17,Wy,2,0,"button",173),o.qZA(),o.TgZ(18,"div",174),o.YNc(19,Ky,6,1,"div",175),o.TgZ(20,"button",192),o.NdJ("click",function(){const e=o.CHM(t).index,n=o.oxw(3).$implicit;return o.oxw(4).slelectDataFromdynamicAppSampleData({text:"[:space:]",value:"[:space:]",key:""},n,e,0,n.name,0,!0)}),o.O4$(),o.TgZ(21,"svg",177),o._UZ(22,"path",178),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,oA,4,4,"div",393),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(24,"div"),o.YNc(25,rA,1,0,"label",1),o.YNc(26,sA,3,0,"div",358),o.qZA(),o.qZA()}if(2&t){const t=e.index,n=o.oxw(3),i=n.$implicit,r=n.index,s=o.oxw(4);o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("value",null==s.dynamicAppField||null==s.dynamicAppField[i.name]||null==s.dynamicAppField[i.name][t]||null==s.dynamicAppField[i.name][t].key||null==s.dynamicAppField[i.name][t].key[0]?null:s.dynamicAppField[i.name][t].key[0].value),o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("id",i.name+"menu-drop-custom-dynamicAppMo"+t),o.xp6(2),o.Q6J("value",null==i.selectedOption?null:i.selectedOption.disp_val)("name",i.name)("id",i.name)("placeholder",i.placeholder),o.xp6(3),o.Q6J("ngIf",s.dynamicAppField[i.name][t]&&s.dynamicAppField[i.name][t].value&&s.dynamicAppField[i.name][t].value[0]),o.xp6(1),o.Q6J("ngIf",!s.dynamicAppField[i.name][t]||!s.dynamicAppField[i.name][t].value||!s.dynamicAppField[i.name][t].value[0]),o.xp6(1),o.Q6J("id",i.name+"scrollheight"+t),o.xp6(3),o.Q6J("ngIf","trigger"!=s.currentApp.nodeType),o.xp6(1),o.Q6J("ngIf",s.shouldShowDropdownCloseButtonForDynamicApp(i.name,t)),o.xp6(2),o.Q6J("ngIf","trigger"!=s.currentApp.nodeType),o.xp6(1),o.Q6J("ngClass",o.VKq(18,cb,"trigger"==s.currentApp.nodeType)),o.xp6(3),o.Q6J("ngIf",s.showContentArray[r]),o.xp6(2),o.Q6J("ngIf",0==t),o.xp6(1),o.Q6J("ngIf",0!==t)}}function cA(t,e){if(1&t&&(o.TgZ(0,"div",451),o.YNc(1,aA,27,20,"fieldset",349),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",e.dynamicAppField[t.name])}}function lA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",369),o.TgZ(1,"button",370),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(4).addDynamicFieldOfCustomerly(e.name)}),o._UZ(2,"i",371),o.qZA(),o.qZA()}}function dA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",106),o.TgZ(1,"div",107),o.TgZ(2,"label",108),o._uU(3),o.YNc(4,vC,2,0,"span",109),o.YNc(5,bC,2,0,"span",110),o.qZA(),o.qZA(),o.YNc(6,ZC,22,8,"div",375),o.YNc(7,WC,24,18,"div",376),o.YNc(8,ww,18,19,"div",377),o.YNc(9,Kw,2,1,"div",378),o.YNc(10,
1Xw,3,0,"div",134),o.TgZ(11,"div",379),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index,n=o.oxw(4);return n.closeOverlay(e+n.currentApp.triggerEditOptions.length)}),o.TgZ(12,"div",113),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).stopPropagation(e)}),o.YNc(13,ry,21,7,"div",380),o.YNc(14,Ty,24,18,"div",376),o.YNc(15,Fy,12,12,"div",381),o.YNc(16,cA,2,1,"div",382),o.YNc(17,lA,3,0,"div",134),o.qZA(),o.qZA(),o._UZ(18,"p",135),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(2),o.Q6J("id",e.name),o.xp6(1),o.hij("",e.label," "),o.xp6(1),o.Q6J("ngIf",!e.required||"false"===e.required),o.xp6(1),o.Q6J("ngIf",e.required&&"false"!==e.required),o.xp6(1),o.Q6J("ngIf","select"===e.type),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[e.name]&&i.editOptions[e.name][0]&&"Use a Custom value (Advanced)"===i.editOptions[e.name][0].display_value),o.xp6(1),o.Q6J("ngIf","text"==e.type||"textarea"==e.type||"json-editor"==e.type&&i.editOptions&&i.editOptions.dataFormat&&i.editOptions.dataFormat[0]&&"JSON"==i.editOptions.dataFormat[0].value),o.xp6(1),o.Q6J("ngIf","text"!==e.type&&"textarea"!==e.type&&"select"!==e.type&&i.dynamicAppField&&i.dynamicAppField[e.name]),o.xp6(1),o.Q6J("ngIf","text"!==e.type&&"textarea"!==e.type&&"select"!==e.type),o.xp6(1),o.Q6J("id","MultipleCustomEditor"+(n+i.currentApp.triggerEditOptions.length)),o.xp6(2),o.Q6J("ngIf","select"===e.type),o.xp6(1),o.Q6J("ngIf",i.editOptions&&i.editOptions[e.name]&&i.editOptions[e.name][0]&&"Use a Custom value (Advanced)"===i.editOptions[e.name][0].display_value),o.xp6(1),o.Q6J("ngIf","text"==e.type||"textarea"==e.type||"json-editor"==e.type&&i.editOptions&&i.editOptions.dataFormat&&i.editOptions.dataFormat[0]&&"JSON"==i.editOptions.dataFormat[0].value),o.xp6(1),o.Q6J("ngIf","text"!==e.type&&"textarea"!==e.type&&"select"!==e.type&&i.dynamicAppField&&i.dynamicAppField[e.name]),o.xp6(1),o.Q6J("ngIf","text"!==e.type&&"textarea"!==e.type&&"select"!==e.type),o.xp6(1),o.Q6J("innerHTML",e.label_help,o.oJD)}}function uA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",374),o.NdJ("click",function(){const e=o.CHM(t).index;return o.oxw(4).toggleContent(e)}),o.YNc(1,dA,19,16,"div",105),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngIf",(t.required&&"false"!==t.required||n.showAllFields)&&n.shouldShowSetupField(t))}}function pA(t,e){if(1&t&&(o.TgZ(0,"div",372),o.YNc(1,uA,2,1,"div",373),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",t.currentApp.additionalTriggerEditOptions)}}function hA(t,e){1&t&&(o.TgZ(0,"p"),o.TgZ(1,"strong"),o._uU(2,"Important:"),o.qZA(),o._uU(3," Please send data to the provided webhook once. This will enable us to configure the fields for the next step."),o.qZA())}function gA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",66),o.TgZ(1,"div",67),o._UZ(2,"input",460),o.qZA(),o.TgZ(3,"div",69),o.TgZ(4,"a",70),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.CopyToClipboard("https://pubhooks.appypie.com/connect/standard/"+e.currentApp.triggerId+"/"+e.currentApp.appId+"/"+e.customer.customerId)}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.s9C("value","https://pubhooks.appypie.com/connect/standard/"+t.currentApp.triggerId+"/"+t.currentApp.appId+"/"+t.customer.customerId),o.xp6(2),o.Q6J("innerHTML",t.translation.COPY_TO_CLICKBOARD,o.oJD)}}function fA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",66),o.TgZ(1,"div",67),o._UZ(2,"input",460),o.qZA(),o.TgZ(3,"div",69),o.TgZ(4,"a",70),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.CopyToClipboard("https://hooks.appypie.com/connect/standard/"+e.currentApp.triggerId+"/"+e.currentApp.appId+"/"+e.customer.customerId)}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.s9C("value","https://hooks.appypie.com/connect/standard/"+t.currentApp.triggerId+"/"+t.currentApp.appId+"/"+t.customer.customerId),o.xp6(2),o.Q6J("innerHTML",t.translation.COPY_TO_CLICKBOARD,o.oJD)}}function mA(t,e){if(1&t&&(o.TgZ(0,"div",64),o.TgZ(1,"div",65),o.TgZ(2,"p"),o._uU(3,"Set this webhook URL in "),o.TgZ(4,"strong"),o._uU(5),o.qZA(),o.qZA(),o.YNc(6,hA,4,0,"p",1),o.YNc(7,gA,5,2,"div",459),o.YNc(8,fA,5,2,"div",459),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(5),o.Oqu("k2P4p45df5f222345E0a"==t.currentApp.appId?"your application":t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf","k2P4p45df5f222345E0a"===t.currentApp.appId||"kxqxvkfn0o4u718999147sal"===t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4p45df5f222345E0a"===t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4p45df5f222345E0a"!==t.currentApp.appId)}}
1function vA(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,mC,2,1,"div",102),o.YNc(2,pA,2,1,"div",103),o.YNc(3,mA,9,4,"div",16),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.currentApp.triggerEditOptions),o.xp6(1),o.Q6J("ngIf",t.currentApp.additionalTriggerEditOptions&&t.currentApp.additionalTriggerEditOptions[0]),o.xp6(1),o.Q6J("ngIf","webhookUrl"===t.currentApp.triggerType)}}const bA=function(t,e){return{"message-user":t,"message-ai":e}};function xA(t,e){if(1&t&&(o.TgZ(0,"div",472),o.TgZ(1,"div",473),o._uU(2),o.qZA(),o.TgZ(3,"div",474),o._uU(4),o.ALo(5,"date"),o.qZA(),o.qZA()),2&t){const t=e.$implicit;o.Udp("background","user"===t.sender?"#007bff":"#ffffff")("color","user"===t.sender?"#ffffff":"#333333")("margin-left","user"===t.sender?"auto":"0")("border","ai"===t.sender?"1px solid #e0e0e0":"none"),o.Q6J("ngClass",o.WLB(14,bA,"user"===t.sender,"ai"===t.sender)),o.xp6(2),o.Oqu(t.message),o.xp6(2),o.hij(" ",o.xi3(5,11,t.timestamp,"short")," ")}}function _A(t,e){1&t&&(o.TgZ(0,"div",475),o.TgZ(1,"div",476),o._uU(2,"Thinking..."),o.qZA(),o.qZA())}function CA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",477),o.TgZ(1,"button",478),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).executeToolNow()}),o._UZ(2,"i",479),o._uU(3," Run Now "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.Udp("opacity",t.isChatLoading?"0.5":"1")("cursor",t.isChatLoading?"not-allowed":"pointer"),o.Q6J("disabled",t.isChatLoading)}}function wA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",480),o.TgZ(1,"input",481),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).userInputValue=e})("keyup.enter",function(){return o.CHM(t),o.oxw(3).sendChatMessage()}),o.qZA(),o.TgZ(2,"button",482),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).sendChatMessage()}),o._uU(3," Send "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngModel",t.userInputValue)("disabled",t.isChatLoading),o.xp6(1),o.Udp("opacity",!t.userIn
1putValue.trim()||t.isChatLoading?"0.5":"1")("cursor",!t.userInputValue.trim()||t.isChatLoading?"not-allowed":"pointer"),o.Q6J("disabled",!t.userInputValue.trim()||t.isChatLoading)}}function yA(t,e){if(1&t&&(o.TgZ(0,"div",461),o.TgZ(1,"div",462),o.TgZ(2,"h5",463),o._uU(3,"AI Agent Assistant"),o.qZA(),o.TgZ(4,"p",464),o._uU(5,"I'll help you configure the tool settings"),o.qZA(),o.qZA(),o.TgZ(6,"div",465,466),o.YNc(8,xA,6,17,"div",467),o.YNc(9,_A,3,0,"div",468),o.qZA(),o.TgZ(10,"div",469),o.YNc(11,CA,4,5,"div",470),o.YNc(12,wA,4,7,"div",471),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(8),o.Q6J("ngForOf",t.chatHistory),o.xp6(1),o.Q6J("ngIf",t.isChatLoading),o.xp6(2),o.Q6J("ngIf",t.readyToRun),o.xp6(1),o.Q6J("ngIf",!t.readyToRun)}}function AA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",485),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.showAllFields=!e.showAllFields}),o._uU(1,"Advance mode"),o.qZA()}}function ZA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",483),o.TgZ(1,"p"),o.YNc(2,AA,2,0,"a",484),o.TgZ(3,"a",485),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).clearData()}),o._uU(4,"Reload data"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("ngIf",!t.showAllFields)}}function kA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",490),o.TgZ(1,"li"),o.TgZ(2,"button",494),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).continue(!1,!0)}),o._uU(3,"Skip Run Test"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("tooltip",t.readyForSkip?"":"Please fill all the required fields")("containerClass","tooltip-middle"),o.xp6(2),o.Q6J("disabled",!t.readyForSkip)}}function TA(t,e){1&t&&(o.TgZ(0,"button",495),o._UZ(1,"i",496),o.qZA())}function OA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",488),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).isReadyForContinue()}),o.TgZ(1,"div",489),o.TgZ(2,"div",490),o.TgZ(3,"button",491),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).continue(!1)}),o._uU(4,"Continue & Run Test"),o.qZA(),o.qZA(),o.YNc(5,kA,4,3,"ul",492),o.qZA(),o.YNc(6,TA,2,0,"button",493),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("tooltip",t.readyForSkip?"":"Please fill all the required fields")("containerClass","tooltip-middle"),o.xp6(1),o.Q6J("disabled",!t.readyForContinue),o.xp6(2),o.Q6J("ngIf","webhookUrl"!==t.currentApp.triggerType),o.xp6(1),o.Q6J("ngIf",!1)}}function MA(t,e){if(1&t&&(o.TgZ(0,"div",486),o.YNc(1,OA,7,5,"div",487),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf","trigger"===t.nodeType)}}function IA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",490),o.TgZ(1,"li"),o.TgZ(2,"button",494),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).continue(!1,!0)}),o._uU(3,"Skip Run Test"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("tooltip",t.readyForSkip?"":"Please fill all the required fields")("containerClass","tooltip-middle"),o.xp6(2),o.Q6J("disabled",!t.readyForSkip)}}function SA(t,e){1&t&&(o.TgZ(0,"button",495),o._UZ(1,"i",496),o.qZA())}function PA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",488),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).isReadyForContinue()}),o.TgZ(1,"div",489),o.TgZ(2,"div",490),o.TgZ(3,"button",491),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.continue(e.currentApp.index==e.connectList.length-1)}),o._uU(4,"Continue & Run Test"),o.qZA(),o.qZA(),o.YNc(5,IA,4,3,"ul",492),o.qZA(),o.YNc(6,SA,2,0,"button",493),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("tooltip",t.readyForSkip?"":"Please fill all the required fields")("containerClass","tooltip-middle"),o.xp6(1),o.Q6J("disabled",!t.readyForContinue),o.xp6(2),o.Q6J("ngIf",!0),o.xp6(1),o.Q6J("ngIf",!1)}}function NA(t,e){if(1&t&&(o.TgZ(0,"div",486),o.YNc(1,PA,7,5,"div",487),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf","trigger"!==t.nodeType)}}const qA=function(t){return{active:t}};function UA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.YNc(1,hv,7,0,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"div",5),o.TgZ(4,"div",6),o.YNc(5,gv,2,0,"h4",1),o.YNc(6,fv,2,2,"h4",1),o.YNc(7,mv,5,12,"div",7),o.qZA(),o.YNc(8,vv,2,0,"span",8),o.TgZ(9,"div",9),o.YNc(10,bv,1,1,"ng-template",null,10,o.W1O),o.TgZ(12,"button",11,12),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleAdvancedMapping()}),o.TgZ(14,"span",13),o._uU(15,"Advanced mapping"),o.qZA(),o.qZA(),o.YNc(16,wv,6,3,"div",14),o.qZA(),o.qZA(),o.YNc(17,yv,3,0,"div",15),o.YNc(18,Av,11,2,"div",16),o.TgZ(19,"div",17),o.TgZ(20,"label",18),o.TgZ(21,"span",19),o._uU(22,"Available Data Fields"),o.qZA(),o.TgZ(23,"span",20),o._uU(24,"Find setup options quickly"),o.qZA(),o.qZA(),o.TgZ(25,"div",21),o.TgZ(26,"span",22),o.O4$(),o.TgZ(27,"svg",23),o._UZ(28,"path",24),o._UZ(29,"path",25),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"input",26),o.NdJ("input",function(e){return o.CHM(t),o.oxw().onSetupFieldSearch(e.target.value)}),o.qZA(),o.qZA(),o.qZA(),o.YNc(31,Mv,28,4,"aside",27),o.YNc(32,Iv,41,12,"div",16),o.YNc(33,vA,4,3,"div",1),o.YNc(34,yA,13,4,"div",28),o.TgZ(35,"div",29),o._uU(36," sample error "),o.TgZ(37,"button",30),o._UZ(38,"i",31),o.qZA(),o.qZA(),o.YNc(39,ZA,5,1,"div",32),o.qZA(),o.YNc(40,MA,2,1,"div",33),o.YNc(41,NA,2,1,"div",33),o.qZA()}if(2&t){const t=o.MAs(11),e=o.oxw();
1o.xp6(1),o.Q6J("ngIf",!1),o.xp6(4),o.Q6J("ngIf",!("k2P4o45df5f473111E0f"===e.currentApp.appId&&("Always Run"===e.currentApp.actionNameTitle||"Fallback"===e.currentApp.actionNameTitle))&&"k2P4o69wb5f4733aiagent"!==e.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4o45df5f473111E0f"===e.currentApp.appId&&("Always Run"===e.currentApp.actionNameTitle||"Fallback"===e.currentApp.actionNameTitle)),o.xp6(1),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"===e.currentApp.appId),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(4),o.Q6J("tooltip",t)("ngClass",o.VKq(18,qA,e.isShowAdvancedMapping)),o.xp6(4),o.Q6J("ngIf",!("k2P4o45df5f473111E0f"===e.currentApp.appId&&("Always Run"===e.currentApp.actionNameTitle||"Fallback"===e.currentApp.actionNameTitle))),o.xp6(1),o.Q6J("ngIf",e.aiMappingCheck),o.xp6(1),o.Q6J("ngIf","trigger"!==e.nodeType&&"k2P4o69wb5f4733syncdata"===e.currentApp.appId),o.xp6(12),o.Q6J("value",e.setupFieldSearchTerm),o.xp6(1),o.Q6J("ngIf",!e.isShow),o.xp6(1),o.Q6J("ngIf","janrjh1l08ex59386f67g7nh"===e.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"===e.currentApp.appId&&"setup"===e.activeTab||"k2P4o69wb5f4733aiagent"!==e.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"===e.currentApp.appId&&"testing"===e.activeTab),o.xp6(5),o.Q6J("ngIf",!("trigger"===e.nodeType||"k2P4o45df5f473111E0f"===e.currentApp.appId&&("Always Run"===e.currentApp.actionNameTitle||"Fallback"===e.currentApp.actionNameTitle)||"k2P4o69wb5f4733aiagent"===e.currentApp.appId&&"setup"!==e.activeTab)),o.xp6(1),o.Q6J("ngIf","trigger"===e.nodeType),o.xp6(1),o.Q6J("ngIf","trigger"!==e.nodeType)}}function EA(t,e){1&t&&o._UZ(0,"app-loader")}let FA=(()=>{class t{constructor(t,e,n,i,r,s,a,c,l,d){this.changeDetectorRef=t,this.customerService=e,this.commonService=n,this.customerConnectService=i,this.editOptionsService=r,this.renderer=s,this.el=a,this.modalService=c,this.router=l,this.http=d,this.selectedApp=new o.vpe,this.beforeOptionsChange=new o.vpe,this.testloader=!1,this.isTextExpanded={},this.item={name:"some_name"},this.arrowClassName="down",this.appyConfig=go.N,this.readyForContinue=!1,this.readyForSkip=!1,this.isShow=!0,this.showContentArray=[],this.seachTerm={},this.firstTimeAIMapping=!0,this.aIMappingText="AI Mapping",this.prevEditOptions={},this.newEditOptions={},this.prevTriggerDropDownData={},this.newTriggerDropDownData={},this.disablePrevious=!1,this.currentlyExpandedItem="",this.selectedValues=[],this.selectedOptionIndex={},this.selectedValuesPerDropdown={},this.isIconDown=[],this.isOverlayOpen=[],this.isOverlayOpenIf=[],this.userConnectMobileData={},this.aiMappingCheck=!1,this.isInHouseApp=!1,this.isOverlayOpenCustomAdvanced=[!1],this.addSelectIf=!1,this.isDeletedValues=!1,this.newConnectList=[],this.originalConnectList=[],this.isShowAdvancedMapping=!1,this.isSelectedMappingText=!1,this.addToSelectText={},this.isAddedToSelect={},this.isContentEnable={},this.isSubmitVisible={},this.stateChanged=!1,this.addContenteditableClass=!1,this.NamebuttonText="Read More",this.isFocused=!1,this.lastReadElementId="temp",this.lastReadEventTarget=null,this.scrollbarOptions={theme:"minimal-dark",axis:"y",scrollEasing:"easeOut"},this.triggerDropDownData={},this.showAllFields=!1,this.setupFieldSearchTerm="",this.ANDORFilter=[[{keyData:[{type:"text",key:"",value:void 0}],filterType:[],searchData:[{type:"text",key:"",value:""}]}]],this.showFilterOptions=[{value:"contains",disp_val:"(Text) Contains"},{value:"doesnotcontains",disp_val:"(Text) Does not contain"},{value:"exacltymatch",disp_val:"(Text) Exactly matches"},{value:"doesnotexactlymatch",disp_val:"(Text) Should not exactly match"},{value:"startwith",disp_val:"(Text) Starts with"},{value:"doesnotstartwith",disp_val:"(Text) Does not start with"},{value:"endwith",disp_val:"(Text) Ends with"},{value:"doesnotendwith",disp_val:"(Text) Does not end with"},{value:"greaterthan",disp_val:"(Number) Greater than"},{value:"lessthan",disp_val:"(Number) Less than"},{value:"equalsto",disp_val:"(Number) Equals to"},{value:"notequalsto",disp_val:"(Number) Not equals to"},{value:"after",disp_val:"(Date/time) After"},{value:"before",disp_val:"(Date/time) Before"},{value:"equals",disp_val:"(Date/time) Equals"},{value:"beforeCurrentDate",disp_val:"(Date/time) Before Current DateTime"},{value:"afterCurrentDate",disp_val:"(Date/time) After Current DateTime"},{value:"istrue",disp_val:"(Boolean) Is true"}
1,{value:"isfalse",disp_val:"(Boolean) Is false"},{value:"exists",disp_val:"Exists"},{value:"doesnotexists",disp_val:"Does not exist"},{value:"isempty",disp_val:"Is empty"},{value:"isnotempty",disp_val:"Is not empty"}],this.detectChangeloader=!1,this.nestedStepsArray={},this.updateTestMode=new o.vpe,this.closeSetupOption=new o.vpe,this.showChatUI=!1,this.activeTab="setup",this.chatHistory=[],this.userInputValue="",this.conversationStep="initial",this.requiredFields=[],this.collectedFields={},this.isChatLoading=!1,this.readyToRun=!1,this.shouldScrollToBottom=!1,this.jsonEditorSel=null,this.activeJsonEditorField=null,this.selectedOptionIndex={}}toggleAddToSelect(t,e,n,i,o,r){this.showContentArray[r]=!0;let s=document.getElementById("MultipleCustomEditor"+o);s&&s.classList.add("open");let a=document.getElementById("menu-drop"+o);a&&(null==a||a.classList.add("active_menu")),this.loadJquery(),setTimeout(()=>{var n;this.betweenSelected=e;const i=`${t}_${e}`;this.editOptions&&this.editOptions[t]&&this.editOptions[t][e]&&(this.editOptions[t][e].value=1==this.editOptions[t][e].custom?[{type:"text",key:"",value:""}]:""),this.dynamicAppField&&this.dynamicAppField[t]&&(this.dynamicAppField[t][r].value[e].value=""),this.addToSelectText[i]=!1,this.isAddedToSelect[i]=!0;const s=this.el.nativeElement.querySelectorAll(".contenteditable6");if(s){const t=s[(null==s?void 0:s.length)-1];t&&(null===(n=this.renderer)||void 0===n||n.addClass(t,"cross-over"))}const a=document.getElementById("menu-drop"+o).querySelector(".choices-container");setTimeout(()=>{if(a){const t=a.getBoundingClientRect(),e=window.innerHeight;this.renderer.removeClass(a,"open-up"),this.renderer.removeClass(a,"open-down"),this.renderer.addClass(a,t.bottom>e?"open-up":"open-down")}},0)},20)}toggleAddToSelectCustomValue(t,e,n,i,o,r){var s;this.showContentArray[r]=!0;let a=document.getElementById("menu-drop-custom"+o);a&&(null==a||a.classList.add("active_menu"));const c=null===(s=document.getElementById("menu-drop-custom"+o))||void 0===s?void 0:s.querySelector(".choices-container");setTimeout(()=>{if(c){const t=c.getBoundingClientRect(),e=window.innerHeight;this.renderer.removeClass(c,"open-up"),this.renderer.removeClass(c,"open-down"),this.renderer.addClass(c,t.bottom>e?"open-up":"open-down")}},10),this.loadJquery(),setTimeout(()=>{var n;this.betweenSelected=e;const i=`${t}_${e}`;this.editOptions&&this.editOptions[t]&&this.editOptions[t][e]&&(this.editOptions[t][e].value=1==this.editOptions[t][e].custom?[{type:"text",key:"",value:""}]:""),this.addToSelectText[i]=!1,this.isAddedToSelect[i]=!0;const o=this.el.nativeElement.querySelectorAll(".contenteditable6");if(o){const t=o[(null==o?void 0:o.length)-1];t&&(null===(n=this.renderer)||void 0===n||n.addClass(t,"cross-over"))}},20)}openDropDownOnClick(t,e,n,i,o,r){this.showContentArray[r]=!0;let s=document.getElementById("MultipleCustomEditor"+o);s&&s.classList.add("open");let a=document.getElementById("menu-drop"+o);if(a){a.classList.contains("active_menu")?this.renderer.removeClass(a,"active_menu"):this.renderer.addClass(a,"active_menu");const t=document.getElementById("menu-drop"+o);setTimeout(()=>{if(t){const e=t.querySelector(".choices-container");if(e){const t=e.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(e,"open-up"),this.renderer.removeClass(e,"open-down"),this.renderer.addClass(e,t.bottom>n?"open-up":"open-down")}}},0)}this.loadJquery(),setTimeout(()=>{this.betweenSelected=e;const t=this.el.nativeElement.querySelectorAll(".contenteditable6");if(t){const e=t[t.length-1];e&&this.renderer.addClass(e,"cross-over")}},20)}openCustomDropDownOnClick(t,e,n,i,o,r){this.showContentArray[r]=!0,this.editOptions[t][0].value[e].value&&(this.addSelectIf=!0);let s=document.getElementById("menu-drop-custom"+o);s.classList.contains("active_menu")?this.renderer.removeClass(s,"active_menu"):(this.renderer.addClass(s,"active_menu"),this.showDataofSampleData(o,0,event)),this.showDataofSampleData(o,0,i),this.loadJquery(),1===this.currentApp.index&&this.showDataofSampleData(e,0,i),setTimeout(()=>{var t;this.betweenSelected=e;const n=this.el.nativeElement.querySelectorAll(".contenteditable6");if(n){const e=n[(null==n?void 0:n.length)-1];e&&(null===(t=this.renderer)||void 0===t||t.addClass(e,"cross-over"))}const i=s.querySelector(".choices-container");if(i){const t=i.getBoundingClientRect(),e=window.innerHeight;this.renderer.removeClass(i,"open-up"),this.renderer.removeClass(i,"open-down"),this.renderer.addClass(i,t.bottom>e?"open-up":"open-down")}},20)}openCustomDropDownOnClickNew(t,e,n,i,o,r){this.showContentArray[r]=!0,this.editOptions[t][0].value[e].value&&(this.addSelectIf=!0);let s=document.getElementById("menu-drop-custom"+o);if(s.classList.contains("active_menu")){this.renderer.removeClass(s,"active_menu");const t=s.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}else this.renderer.addClass(s,"active_menu"),this.showDataofSampleData(o,0,event),setTimeout(()=>{const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10);this.showDataofSampleData(o,0,i),this.loadJquery(),1===this.currentApp.index&&this.showDataofSampleData(e,0,i),setTimeout(()=>{var t;this.betweenSelected=e;const n=this.el.nativeElement.querySelectorAll(".contenteditable6");if(n){const e=n[(null==n?void 0:n.length)-1];e&&(null===(t=this.renderer)||void 0===t||t.addClass(e,"cross-over"))}},20)}openDropDownOnClickWebhooksByAutomate(t,e,n,i,o,r){this.showContentArray[r]=!0,this.dynamicAppField[t][r].value[e].value&&(this.addSelectIf=!0,this.betweenSelected=e);const s=document.getElementById(t+"menu-drop-custom-dynamicApp"+r);if(s&&!s.classList.contains("active_menu"))s.setAttribute("class","formgroup editoption-dropmenu active_menu"),setTimeout(()=>{const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10);else if(s){s.setAttribute("class","formgroup editoption-dropmenu");const t=s.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}}openDropDownOnClickFilterByAutomate(t,e,n,i,o,r,s){var a,c;this.showContentArray[o]=!0,(null===(c=null===(a=this.ANDORFilter[s])||void 0===a?void 0:a[r])||void 0===c?void 0:c.keyData[e].value)&&(this.addSelectIf=!0,this.betweenSelected=e);const l=document.getElementById("menu-drop"+o);l&&!l.classList.contains("active_menu")?(l.setAttribute("class","input-group formgroup editoption-dropmenu active_menu"),setTimeout(()=>{const t=l.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10)):l&&l.setAttribute("class","input-group formgroup editoption-dropmenu")}setCustomValue(t,e){const n=`${t}_${e}`;this.isAddedToSelect[n]=!1,this.isContentEnable[n]=!0,this.isSubmitVisible[n]=!0}openOverlay(t){this.isOverlayOpen[t]=!0,document.body.classList.add("xl-overflow-hidden")}closeOverlay(t){this.isOverlayOpen[t]=!1,document.body.classList.remove("xl-overflow-hidden");const e=document.getElementById("MultipleCustomEditor"+t);e&&e.classList.remove("open")}closeOverlayCustomValue(t){this.isOverlayOpenCustomAdvanced[t]=!1,document.body.classList.remove("xl-overflow-hidden");const e=document.getElementById("Custom_value_Advanced"+t);e&&e.classList.remove("open")}stopPropagation(t){t.stopPropagation()}closeOverlayIf(t){var e,n,i;this.isOverlayOpenIf[t]=!1,document.body.classList.remove("xl-overflow-hidden");
1const o=document.getElementById("onlyContinueif"+t),r=document.getElementById("SingleonlyContinueif"+t),s=document.getElementById("filterContinueif"+t);(o||r||s)&&(null===(e=null==o?void 0:o.classList)||void 0===e||e.remove("open"),null===(n=null==r?void 0:r.classList)||void 0===n||n.remove("open"),null===(i=null==s?void 0:s.classList)||void 0===i||i.remove("open"))}stopPropagationIf(t){t.stopPropagation()}toggleDisplay(){0===this.currentApp.index?this.isShow=!this.isShow:this.modalService.show(rv,{initialState:{},class:"ai-mapping-modal"})}readmoreButton(t,e){var n=document.getElementById(t);if(t!=this.lastReadElementId){var i=document.getElementById(this.lastReadElementId);i&&i.classList.remove("linecontenteditable6"),this.lastReadEventTarget&&(this.lastReadEventTarget.innerText="Read More")}if(this.lastReadElementId=t,n?n.classList.toggle("linecontenteditable6"):console.error(`Element with id ${t} not found.`),e){var o=e.target;this.lastReadEventTarget=o,o?o.innerText="Read More"===o.innerText?"Read Less":"Read More":console.error("Event target not found.")}else console.error("Event not provided.");this.isTextExpanded={},this.currentlyExpandedItem=""}ngOnInit(){if(setTimeout(()=>{const t=document.querySelector(".conntacont-btn"),e=document.querySelector('button[data-track="continue"]');t&&e&&(t.addEventListener("mouseenter",()=>{e.classList.add("highlight-bg")}),t.addEventListener("mouseleave",()=>{e.classList.remove("highlight-bg")}))},400),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0),this.isIconDown=Array(this.connectList.length).fill(!0),this.currentApp&&this.setIsInHouseAppFlag(),this.currentApp&&!this.currentApp.canContinueRuntest&&(this.currentApp.canContinueRuntest=!0),this.isContentEnable={},this.isAddedToSelect={},this.addToSelectText={},this.editOptions)for(let t=0;t<this.editOptions.length;t++)this.isContentEnable[`option_${t}`]=!1,this.isAddedToSelect[`option_${t}`]=!1,this.addToSelectText[`option_${t}`]=!0;setTimeout(()=>{const t=window;t.$(document).on("mouseup",function(e){t.$(".editoption-dropmenu-only-continue-if").each(function(){const n=t.$(this);n.hasClass("active_menu")&&0===n.has(e.target).length&&n.removeClass("active_menu")})}),t.$(document).on("mouseup",function(e){t.$(".menu-only-continue-if").each(function(){const n=t.$(this);n.hasClass("menu_active")&&0===n.has(e.target).length&&n.removeClass("menu_active")})}),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)},20),document.querySelectorAll(".menu_active"),document.querySelectorAll(".custom-landing-page")}onPaste(t){var e;t.preventDefault();var n=(null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text/plain"))||"";try{const e=t.target,i=e&&e.closest&&e.closest(".json-editor-box");let o=this.activeJsonEditorField;if(!o&&i){const t=i.querySelector("input.form-control.hide")||i.querySelector("input[hidden]");t&&t.id&&(o=t.id)}if(o&&i&&/^\s*[\{\[]/.test(n))return this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),this.editOptions[o]=[{type:"text",key:"",value:n}],void this.formatJsonEditor(o)}catch(i){}document.execCommand("insertText",!1,n)}ngAfterViewInit(){this.currentApp&&(this.setFilterFields(),this.setDynamicFields())}setFilterFields(){this.currentApp.filterEditOptions&&this.currentApp.filterEditOptions[0]&&this.currentApp.filterEditOptions[0][0]&&(this.ANDORFilter=this.currentApp.filterEditOptions,this.ANDORFilter.forEach((t,e)=>{t.forEach((t,n)=>{this.ANDORFilter[e][n]=this.parseFilterFields(t)})}))}parseFilterFields(t){const e=t=>"string"==typeof t?JSON.parse(t):t;return Object.assign(Object.assign({},t),{keyData:e(t.keyData),filterType:e(t.filterType),searchData:e(t.searchData)})}setDynamicFields(){setTimeout(()=>{var t,e;(null===(t=this.currentApp)||void 0===t?void 0:t.triggerEditOptions)&&this.loadDynamicFieldsIfExist(),(null===(e=this.currentApp)||void 0===e?void 0:e.custom_form)&&this.loadCustomFormFieldsOfUser(this.currentApp.custom_form)},50)}isSampleDataEmpty(t){return"webhookUrl"===this.currentApp.triggerType&&(!t.sample_data||0===t.sample_data.length||t.sample_data.some(t=>Array.isArray(t.data)&&0===t.data.length))}ngAfterContentInit(){this.originalConnectList=this.connectList,this.customer=this.customerService.GetCurrent(),setTimeout(()=>{var t,e;"trigger"===this.nodeType&&(this.showAllFields=!0),this.currentApp.additionalTriggerEditOptions?this.showAllFields=!0:this.currentApp.additionalTriggerEditOptions=[];const n=this.getAllChildIndices(0);if(1==this.connectList.length)this.connectList=this.originalConnectList;else{if(0!=this.currentApp.index){let t=[];
1this.connectList.forEach(e=>{if(e.index===this.currentApp.index)if(e){let n=this.getGraphPath(e.graphData,this.currentApp.index);t=0==this.currentApp.index?n:n.filter(t=>t.id!=this.currentApp.index)}else console.error("findPath function is not defined.")});const e=this.connectList.filter(e=>t.some(t=>!(t.id!=e.index||!e.image)));this.connectList=e}const t=this.reorderList(n,this.connectList);this.connectList=t,this.newConnectList=t}if(this.connectList.forEach(t=>{if(!(t.sample_data&&t.sample_data[0]||this.currentApp.index!==t.index)){if(this.currentApp=t,this.isTemplate)this.currentApp.currentAction="account";else if("options"===this.currentApp.currentAction)this.currentApp.currentAction="options";else if("action"===this.currentApp.currentAction)this.currentApp.currentAction="action";else if("app"===this.currentApp.currentAction)this.currentApp.currentAction="action";else{const t=["k2P4o69wb5f473388E6g","jlp5059wb5f473388e6f","k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733syncdata","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","k2P4p45df5f222345E0a","janrjh1l08ex59386f67g7nh","janrjh1l08ex59386f8cx5lp","lna8nwtk00qb7189999ylsri"];this.currentApp.currentAction=this.currentApp.appId?"applicationChanged"!==this.currentApp.actionNameTitle&&this.currentApp.actionNameTitle?t.includes(this.currentApp.appId)?"options":"account":"action":"app"}this.selectedApp.emit({currentApp:this.currentApp})}}),this.editOptions={},this.currentApp.editOptions)if("trigger"===this.currentApp.nodeType)Object.keys(this.currentApp.editOptions).forEach(t=>{!t.includes("__disp")&&!this.currentApp.triggerEditOptions.some(e=>e.name===t)&&(this.currentApp.editOptions[t+"__disp"]?(this.editOptions[t]=[{}],this.editOptions[t][0][t]=this.currentApp.editOptions[t],this.editOptions[t][0][t+"__disp"]=this.currentApp.editOptions[t+"__disp"]):this.currentApp.editOptions[t+"__nestedStepsArray"]?this.nestedStepsArray[t]=this.currentApp.editOptions[t+"__nestedStepsArray"]:this.editOptions[t]=[{type:"text",key:"",value:this.currentApp.editOptions[t]}])}),this.triggerDropDownData=this.currentApp.editOptions,null===(e=null===(t=this.currentApp)||void 0===t?void 0:t.triggerEditOptions)||void 0===e||e.forEach(t=>{(this.currentApp.editOptions[t.name]||this.currentApp.editOptions[t.name+"__disp"])&&("text"===t.type||"textarea"===t.type?this.editOptions[t.name]=[{type:"text",key:"",value:this.currentApp.editOptions[t.name]}]:"select"===t.type?this.currentApp.editOptions[t.name+"__disp"]?(this.editOptions[t.name]=[{}],this.editOptions[t.name][0][t.name]=this.currentApp.editOptions[t.name],this.editOptions[t.name][0][t.name+"__disp"]=this.currentApp.editOptions[t.name+"__disp"]):this.editOptions[t.name]=[{type:"text",value:[{type:"text",key:"",value:this.currentApp.editOptions[t.name]}],display_value:"Use a Custom value (Advanced)",key:"",custom:!0}]:"nestedSelect"===t.type&&(this.currentApp.editOptions[t.name+"__nestedStepsArray"]&&(this.nestedStepsArray[t.name]=this.currentApp.editOptions[t.name+"__nestedStepsArray"]),this.currentApp.editOptions[t.name+"__disp"]?(this.editOptions[t.name]=[{}],this.editOptions[t.name][0][t.name]=this.currentApp.editOptions[t.name],this.editOptions[t.name][0][t.name+"__disp"]=this.currentApp.editOptions[t.name+"__disp"]):this.editOptions[t.name]=[{type:"text",value:[{type:"text",key:"",value:this.currentApp.editOptions[t.name]}],display_value:"Use a Custom value (Advanced)",key:"",custom:!0}]))});else{let t={};t={};let e=!0;Object.keys(this.currentApp.editOptions).forEach(n=>{var i,o,r,s,a,c,l,d,u,p,h,g,f;if(t[n]="string"==typeof this.currentApp.editOptions[n]?JSON.parse(this.currentApp.editOptions[n]):this.currentApp.editOptions[n],t[n][0]&&t[n][0].nestedStepsArray&&(this.nestedStepsArray||(this.nestedStepsArray={}),this.nestedStepsArray[n]=t[n][0].nestedStepsArray),t[n][0]&&t[n][0].custom?t[n][0].value&&"string"==typeof t[n][0].value&&(t[n][0].value=JSON.parse(t[n][0].value),t[n][0].value=t[n][0].value.filter(t=>{var e,n;return(null===(n=null===(e=this.connectList[0])||void 0===e?void 0:e.sample_data[0])||void 0===n?void 0:n.data.some(e=>e.key===t.key))||t.key||t.value}),t[n][0].value.length>0?this.triggerDropDownData[n]=t[n][0].value[0].value:(t[n][0].value=[],this.triggerDropDownData[n]=null)):t[n][0]&&t[n][0].value&&(this.triggerDropDownData[n]=t[n][0].value),null===(i=t[n])||void 0===i?void 0:i[0])for(let m=t[n].length-1;m>=0;m--){const i=t[n][m],v=null!==(o=i.realIndex)&&void 0!==o?o:i.nodeIndex;if("label"===i.type)this.connectList.find(t=>t.index==v)&&(null===(s=null===(r=this.connectList.find(t=>t.index==v))||void 0===r?void 0:r.sample_data)||void 0===s?void 0:s[0])&&((null===(l=null===(c=null===(a=this.connectList.find(t=>t.index==v))||void 0===a?void 0:a.sample_data)||void 0===c?void 0:c[0])||void 0===l?void 0:l.data.find(e=>{if(e.key===i.key)return t[n][m].value=e.value,!0}))||(e=!1,t[n].splice(m,1)));else if(!0===i.custom&&i.value.some(t=>t.nodeIndex>=0))for(let e=i.value.length-1;e>=0;e--){const o=i.value[e],r=null!==(d=o.realIndex)&&void 0!==d?d:o.nodeIndex;this.connectList.find(t=>t.index==r)&&(null===(p=null===(u=this.connectList.find(t=>t.index==r))||void 0===u?void 0:u.sample_data)||void 0===p?void 0:p[0])&&((null===(f=null===(g=null===(h=this.connectList.find(t=>t.index==r))||void 0===h?void 0:h.sample_data)||void 0===g?void 0:g[0])||void 0===f?void 0:f.data.find(i=>{if(i.key===o.key)return t[n][m].value[e].value=i.value,!0}))||t[n][m].value.splice(e,1))}}}),this.editOptions=t,e||this.selectedApp.emit({allTriggerFound:"false"})}this.isReadyForContinue()},20)}
1atobLoacl(t){return btoa(t)}loadCustomFormFieldsOfUser(t){this.testloader=!0,this.currentApp.triggerEditOptions=this.currentApp.triggerEditOptions.filter(e=>{if(e.custom_form_function!==t+"CustomForm")return e}),this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),t+"CustomForm",this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,this.triggerDropDownData).subscribe(e=>{this.testloader=!1,e=Array.isArray(e)?null==e?void 0:e.map(e=>(e.options&&e.options[0]&&(e.dropdownOption=e.options),e.custom_form_function=t+"CustomForm",e)):[],this.currentApp.triggerEditOptions=this.currentApp.triggerEditOptions.concat(e)})}loadJquery(){setTimeout(()=>{$(window).on("load",function(){$("#scrollhorz, #scrollhorz2").mCustomScrollbar({theme:"dark-thin",axis:"x",scrollEasing:"easeOut"})});const t=$(".editoption-dropmenu.active_menu");$(document).mouseup(e=>{!t.is(e.target)&&0===t.has(e.target).length&&t.removeClass("active_menu")}),$(".menu").on("click",function(t){t.stopPropagation()}),$(document).click(function(t){t.stopPropagation(),$(".menu").removeClass("menu_active")}),$("#step_guide_Btn").on("click",function(){$("#aside_step_guide").toggleClass("d-none")}),$(".closebtn-guide").click(function(){$("#aside_step_guide").addClass("d-none")});var e=$(".editoption-dropmenu-only-continue-if");$(document).mouseup(t=>{!e.is(t.target)&&0===e.has(t.target).length&&e.removeClass("active_menu")});var n=$(".menu-only-continue-if");$(document).mouseup(t=>{!n.is(t.target)&&0===n.has(t.target).length&&n.removeClass("menu_active")}),$(".menu-only-continue-if .choices-search > input.formcontrol").on("click",function(t){t.stopPropagation()})},20)}onSearchButtonClick(t){t.stopPropagation()}loadDynamicFieldsIfExist(t=!1){this.normalizeEditOptionsShape(),this.currentApp.triggerEditOptions.forEach((e,n)=>{"text"!==e.type&&"textarea"!==e.type&&"select"!==e.type&&"filter-continue-if"!==e.type?this.loadDynamicAppField(e.name,t):"text"===e.type||"textarea"===e.type?this.editOptions[e.name]||(this.editOptions[e.name]=[{type:"text",key:"",value:void 0}]):(e.options&&e.options[0]&&(this.currentApp.triggerEditOptions[n].dropdownOption=e.options),this.editOptions[e.name]&&e.changefunction&&this.callChangeFunction(e,1,t))}),this.editOptions&&Object.keys(this.editOptions).forEach(t=>{var e,n,i,o;const r=[...this.editOptions[t]];!0===(null===(e=r[0])||void 0===e?void 0:e.custom)&&(1===r[0].value.length&&(null===(n=r[0].value[0])||void 0===n?void 0:n.hasOwnProperty("value"))&&""===(null===(i=String(r[0].value[0].value))||void 0===i?void 0:i.trim())?this.editOptions[t][0].value[0].value=void 0:r[0].value.length>1&&(r[0].value=r[0].value.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))),1===r.length&&(null===(o=r[0])||void 0===o?void 0:o.hasOwnProperty("value"))&&""===r[0].value?this.editOptions[t][0].value=void 0:r.length>1&&(this.editOptions[t]=[...r.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))})])}),this.ANDORFilter&&this.ANDORFilter.forEach(t=>{t.forEach(t=>{var e,n,i,o;if(1===(null===(e=t.keyData)||void 0===e?void 0:e.length)){const e=t.keyData[0];(!e.key||""===(null===(n=e.key)||void 0===n?void 0:n.trim()))&&(!e.value||""===(null===(i=e.value)||void 0===i?void 0:i.trim()))&&(e.value=void 0)}else(null===(o=t.keyData)||void 0===o?void 0:o.length)>1&&(t.keyData=t.keyData.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))})})}filterApps(t,e){this.seachTerm[e]=t.target.value,this.connectList.slice(0,this.currentApp.index).forEach((n,i)=>{var o,r,s,a,c,l;document.getElementById(e+"choices_dropmenu"+i)&&document.getElementById(e+"choices_dropmenu"+i).setAttribute("style","display:block;"),document.getElementById(e+"choices_dropmenu"+i)&&(document.getElementById(e+"choices_dropmenu"+i).setAttribute("style","display:block;"),null===(o=document.getElementById(e+"choices_dropmenuMob"+i))||void 0===o||o.setAttribute("style","display:block;"),null===(r=document.getElementById(e))||void 0===r||r.setAttribute("style","display:block;"),null===(s=document.getElementById(e+"custom_dropmenu"+i))||void 0===s||s.setAttribute("style","display:block;")),""===t.target.value&&(null===(a=document.getElementById(e+"choices_dropmenuMob"+i))||void 0===a||a.setAttribute("style","display:none;"),null===(c=document.getElementById(e+"choices_dropmenu"+i))||void 0===c||c.setAttribute("style","display:none;"),null===(l=document.getElementById(e+"custom_dropmenu"+i))||void 0===l||l.setAttribute("style","display:none;"))})}onSetupFieldSearch(t){this.setupFieldSearchTerm=(t||"").toLowerCase().trim()}shouldShowSetupField(t){return!this.setupFieldSearchTerm||[null==t?void 0:t.label,null==t?void 0:t.name,null==t?void 0:t.placeholder,null==t?void 0:t.type].filter(
1Boolean).join(" ").toLowerCase().includes(this.setupFieldSearchTerm)}positionDropdown(t){setTimeout(()=>{const e=document.getElementById("menu-drop"+t);if(e){const t=e.querySelector(".menu_dropdown");if(t){this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down");const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}}},10)}getOptionValues(t,e,n,i){var o,r,s,a;if((i.target.classList.contains("menu_icon-box")||i.target.classList.contains("menu_icon")||(null===(o=i.target.parentElement)||void 0===o?void 0:o.classList.contains("menu_icon-box")))&&i.stopPropagation(),document.body.classList.add("xl-overflow-hidden"),n||"selected_value"===i.target.id||i.target.id==="menu-drop"+e||i.target.classList.contains("menu_icon-box")||i.target.classList.contains("menu_icon")||(null===(r=i.target.parentElement)||void 0===r?void 0:r.classList.contains("menu_icon-box")))if("select"===t.type)if(n||"menu menu_active"!==document.getElementById("menu-drop"+e).getAttribute("class"))if(this.currentApp.triggerEditOptions[e]&&this.currentApp.triggerEditOptions[e].options&&this.currentApp.triggerEditOptions[e].options[0]){this.currentApp.triggerEditOptions[e].dropdownOption=this.currentApp.triggerEditOptions[e].options;const t=$(".menu.menu_active");t.length>0&&t.removeClass("menu_active"),document.getElementById("menu-drop"+e).setAttribute("class","menu menu_active"),this.positionDropdown(e),this.testloader=!1}else if((null===(s=this.currentApp)||void 0===s?void 0:s.additionalTriggerEditOptions)&&e-this.currentApp.triggerEditOptions.length>=0&&(null===(a=this.currentApp)||void 0===a?void 0:a.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length])&&this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].options&&this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].options[0]){this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].dropdownOption=this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].options;const t=$(".menu.menu_active");t.length>0&&t.removeClass("menu_active"),document.getElementById("menu-drop"+e).setAttribute("class","menu menu_active"),this.positionDropdown(e),this.testloader=!1}else this.testloader=!0,this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),t.function,this.currentApp.appId,Object.assign(Object.assign({},this.currentApp.auth),{customFieldKey:this.currentApp.triggerEditOptions[e]?this.currentApp.triggerEditOptions[e].customFieldKey:this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].customFieldKey}),this.currentApp.nodeId,this.currentApp.triggerId,this.triggerDropDownData).subscribe(t=>{this.testloader=!1,t.err&&(t=[{value:"",disp_val:t.err,showErrorFormat:!0}]),this.currentApp.triggerEditOptions[e]?this.currentApp.triggerEditOptions[e].dropdownOption=t:this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length]&&(this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].dropdownOption=t),setTimeout(()=>{const t=$(".menu.menu_active");t.length>0&&t.removeClass("menu_active"),document.getElementById("menu-drop"+e).setAttribute("class","menu menu_active"),this.positionDropdown(e)},20)});else document.getElementById("menu-drop"+e).setAttribute("class","menu");else document.getElementById("menu-drop"+e).setAttribute("class","formgroup editoption-dropmenu active_menu");$(window).on("load",function(){$("#scrollhorz, #scrollhorz2").mCustomScrollbar({theme:"dark-thin",axis:"x",scrollEasing:"easeOut"})});const c=$(".editoption-dropmenu");$(document).mouseup(t=>{!c.is(t.target)&&0===c.has(t.target).length&&c.removeClass("active_menu")}),$(".menu").on("click",function(t){t.stopPropagation()}),$(document).click(function(t){t.stopPropagation(),$(".menu").removeClass("menu_active")})}getOptionValuesNestedSelect(t,e,n,i,o="<noChange>"){let r=document.getElementById("MultipleCustomEditor"+e);r&&r.classList.add("open");const s=this.currentApp.triggerEditOptions[e]?this.currentApp.triggerEditOptions[e].name:this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].name;if(this.nestedStepsArray[s]||(this.nestedStepsArray[s]=[]),this.nestedStepsArray[s][this.nestedStepsArray[s].length-1]!==o&&"<noChange>"!==o&&(n=!0),"<noChange>"===o?(o=this.nestedStepsArray[s][this.nestedStepsArray[s].length-1])||(o=""):"<GoToPrevious>"===o&&(this.nestedStepsArray[s].pop(),(o=this.nestedStepsArray[s].pop())||(o="")),"nestedSelect"===t.type)if(n||"menu menu_active"!==document.getElementById("menu-drop"+e).getAttribute("class"))if((!this.currentApp.triggerEditOptions[e]||this.currentApp.triggerEditOptions[e].dropdownOption&&this.currentApp.triggerEditOptions[e].dropdownOption[0])&&(!this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length]||this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].dropdownOption&&this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].dropdownOption[0])&&!n){const t=$(".menu.menu_active");t.length>0&&t.removeClass("menu_active"),document.getElementById("menu-drop"+e).setAttribute("class","menu menu_active")}else this.testloader=!0,""===o?this.nestedStepsArray[s]=[""]:this.nestedStepsArray[s][this.nestedStepsArray[s].length-1]!==o&&this.nestedStepsArray[s].push(o),this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),t.function+"Nested",this.currentApp.appId,Object.assign(Object.assign({},this.currentApp.auth),{customFieldKey:this.currentApp.triggerEditOptions[e]?this.currentApp.triggerEditOptions[e].customFieldKey:this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].customFieldKey}),this.currentApp.nodeId,this.currentApp.triggerId,Object.assign(Object.assign({},this.triggerDropDownData),{parentVal:o})).subscribe(t=>{this.testloader=!1,t.err&&(t=[{value:"",disp_val:t.err,showErrorFormat:!0}]),this.currentApp.triggerEditOptions[e]?this.currentApp.triggerEditOptions[e].dropdownOption=t:this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length]&&(this.currentApp.additionalTriggerEditOptions[e-this.currentApp.triggerEditOptions.length].dropdownOption=t),setTimeout(()=>{const t=$(".menu.menu_active");t.length>0&&t.removeClass("menu_active"),document.getElementById("menu-drop"+e).setAttribute("class","menu menu_active")},20)});else document.getElementById("menu-drop"+e).setAttribute("class","menu");else document.getElementById("menu-drop"+e).setAttribute("class","formgroup editoption-dropmenu active_menu");$(window).on("load",function(){$("#scrollhorz, #scrollhorz2").mCustomScrollbar({theme:"dark-thin",axis:"x",scrollEasing:"easeOut"})});const a=$(".editoption-dropmenu");$(document).mouseup(t=>{!a.is(t.target)&&0===a.has(t.target).length&&a.removeClass("active_menu")}),$(".menu").on("click",function(t){t.stopPropagation()}),$(document).click(function(t){t.stopPropagation(),$(".menu").removeClass("menu_active")})}getOptionValuesfiltercontinueiffilterType(t){this.isOverlayOpenIf[t]=!1;const e=document.getElementById("SingleonlyContinueif"+t);e&&(e.classList.contains("open")?(e.classList.remove("open"),document.body.classList.remove("xl-overflow-hidden")):(e.classList.add("open"),document.body.classList.add("xl-overflow-hidden")));const n=document.getElementById("menu-drop"+t);n.addEventListener("click",function(t){t.stopPropagation()}),n.classList.toggle("menu_active")}getConnectListOptionValues(t,e,n,i){this.betweenSelected=null;let o=document.getElementById("MultipleCustomEditor"+e);if(o&&o.classList.add("open"),this.isOverlayOpen[e]=!0,document.body.classList.add("xl-overflow-hidden"),0!==this.currentApp.index&&(n||"insertButton1"===i.target.id||i.target.offsetParent&&i.target.offsetParent.id==="menu-drop"+e||i.target.id==="menu-drop"+e))if("formgroup editoption-dropmenu active_menu"!==document.getElementById("menu-drop"+e).getAttribute("class")){const t=$(".editoption-dropmenu.active_menu");t.length>0&&t.removeClass("active_menu"),document.getElementById("menu-drop"+e).setAttribute("class","formgroup editoption-dropmenu active_menu"),this.loadJquery(),1===this.currentApp.index&&this.showDataofSampleData(e,0,i)}else document.getElementById("menu-drop"+e).setAttribute("class","formgroup editoption-dropmenu");setTimeout(()=>{var t;const e=this.el.nativeElement.querySelectorAll(".contenteditable6");if(e){const n=e[(null==e?void 0:e.length)-1];n&&(null===(t=this.renderer)||void 0===t||t.addClass(n,"cross-over"))}},20)}getConnectListOptionValuesClosed(t,e,n,i){document.getElementById("menu-drop"+e)}getConnectListOptionValuesfiltercontinueif(t,e,n,i,o,r){this.betweenSelected=r;const s=document.getElementById("onlyContinueif"+e),a=document.getElementById("menu-drop"+e);if(a&&!a.classList.contains("active_menu")?a.setAttribute("class","input-group formgroup editoption-dropmenu active_menu"):a&&a.setAttribute("class","input-group formgroup editoption-dropmenu"),this.ANDORFilter[t]&&this.ANDORFilter[t][o]&&this.ANDORFilter[t][o].keyData&&this.ANDORFilter[t][o].keyData[r]&&void 0===this.ANDORFilter[t][o].keyData[r].value&&(this.ANDORFilter[t][o].keyData[r].value=""),!i.target.classList.contains("contenteditable6")&&!i.target.classList.contains("choice-label")&&!i.target.classList.contains("fa-close")&&(s?(i.stopPropagation(),s.classList.add("open"),document.body.classList.add("xl-overflow-hidden")):console.error("Element with ID onlyContinueif"+e+" not found")),0!==this.currentApp.index&&(n||"insertButton1"===i.target.id||i.target.offsetParent&&i.target.offsetParent.id==="menu-drop"+e||i.target.id==="menu-drop"+e))if("pull-left input-group col-xs-12 col-md-4 formgroup editoption-dropmenu-only-continue-if active_menu"!==document.getElementById("menu-drop"+e).getAttribute("class")){const t=$(".editoption-dropmenu-only-continue-if.active_menu");t.length>0&&t.removeClass("active_menu"),document.getElementById("menu-drop"+e).setAttribute("class","pull-left input-group col-xs-12 col-md-4 formgroup editoption-dropmenu-only-continue-if active_menu")}else document.getElementById("menu-drop"+e).setAttribute("class","pull-left input-group col-xs-12 col-md-4 formgroup editoption-dropmenu-only-continue-if")}selectValue(t,e,n){this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),"k2P4o69wb5f4733aiagent"==this.currentApp.appId&&(this.currentApp.graphData.forEach(n=>{var i;n.id==this.currentApp.index&&(3==t?n.chatModel=e.value||"":1==t&&(n.tool=(null===(i=e.disp_val.split(" - ")[1])||void 0===i?void 0:i.replace(/\s+Integration/i,""))||"",n.toolImage=e.image||""))}),this.currentApp.graphData=[...this.currentApp.graphData],this.selectedApp.emit({currentApp:this.currentApp,updateGraphData:!0,graphData:this.currentApp.graphData})),this.isOverlayOpen[t]=!1,document.body.classList.remove("xl-overflow-hidden"),this.selectedOptionIndex[t]=n,this.editOptions||(this.editOptions={});const i=this.currentApp.triggerEditOptions[t]?this.currentApp.triggerEditOptions[t].name:this.currentApp.additionalTriggerEditOptions[t
1-this.currentApp.triggerEditOptions.length].name;if(this.editOptions[i]||(this.editOptions[i]=[]),null!=e.value&&""!==e.value){if("actions"!==this.currentApp.nodeType&&"action"!==this.currentApp.nodeType&&"search"!==this.currentApp.nodeType){let t;t={},t[i]=e.value,t[i+"__disp"]=e.disp_val,this.nestedStepsArray[i]&&(t[i+"__nestedStepsArray"]=this.nestedStepsArray[i]),this.triggerDropDownData[i]=e.value,this.editOptions[i]=[t],this.currentApp.editOptions=Object.assign(Object.assign({},this.currentApp.editOptions),t)}else{const t={type:"text",key:"",value:e.value,display_value:e.disp_val};this.nestedStepsArray[i]&&(t.nestedStepsArray=this.nestedStepsArray[i]),this.editOptions[i]=[t],this.triggerDropDownData[i]=e.value}this.currentApp.triggerEditOptions[t]&&this.currentApp.triggerEditOptions[t].changefunction&&this.callChangeFunction(this.currentApp.triggerEditOptions[t],1)}"menu menu_active"===document.getElementById("menu-drop"+t).getAttribute("class")&&document.getElementById("menu-drop"+t).setAttribute("class","menu"),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}callChangeFunction(t,e,n=!1){this.testloader=!0,this.currentApp.additionalTriggerEditOptions&&this.currentApp.additionalTriggerEditOptions[0]&&(this.currentApp.additionalTriggerEditOptions=this.currentApp.additionalTriggerEditOptions.filter(e=>{if((null==e?void 0:e.changeFuncName)!==(null==t?void 0:t.changeFuncName)+"ChangeFunction")return e})),(!this.currentApp.additionalTriggerEditOptions||!this.currentApp.additionalTriggerEditOptions[0])&&(this.currentApp.additionalTriggerEditOptions=[]);let i=this.triggerDropDownData;i=0==e?{}:this.triggerDropDownData;const o=Array.isArray(t)?t[0]:t;this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),o.changefunction+"ChangeFunction",this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,i).subscribe(t=>{this.testloader=!1,t=Array.isArray(t)?null==t?void 0:t.map(t=>(t.options&&t.options[0]&&(t.dropdownOption=t.options),t)):[],this.currentApp.additionalTriggerEditOptions=t,this.currentApp.additionalTriggerEditOptions.forEach((t,e)=>{"text"!==t.type&&"textarea"!==t.type&&"select"!==t.type&&"filter-continue-if"!==t.type?this.loadDynamicAppField(t.name,n):"text"===t.type||"textarea"===t.type?this.editOptions[t.name]||(this.editOptions[t.name]=[{type:"text",key:"",value:void 0}]):(t.options&&t.options[0]&&(this.currentApp.additionalTriggerEditOptions[e].dropdownOption=t.options),this.editOptions[t.name]&&t.changefunction&&this.callChangeFunction(t,1,n))}),this.showAllFields=!0,this.isReadyForContinue()})}closeOtherDropdown(t){this.currentApp.triggerEditOptions.forEach((e,n)=>{n!==t&&("select"===e.type&&document.getElementById("menu-drop"+n)?document.getElementById("menu-drop"+n).setAttribute("class","menu"):document.getElementById("menu-drop"+n).setAttribute("class","formgroup editoption-dropmenu"))})}clearSelection(t){var e;const n=document.querySelector(`#dropdown-container-${t}`);if(n){const t=n.getElementsByClassName("active");Array.from(t).forEach(t=>{t.classList.remove("active")})}this.selectedOptionIndex[t]=null,this.ANDORFilter[t]&&(this.ANDORFilter[t][0].filterType[0]=[]);let i=this.currentApp.triggerEditOptions[t]?this.currentApp.triggerEditOptions[t].name:null===(e=this.currentApp.additionalTriggerEditOptions[t-this.currentApp.triggerEditOptions.length])||void 0===e?void 0:e.name;this.editOptions[i]=[],this.triggerDropDownData[i]=this.concatenateValues(this.editOptions[i]),this.isReadyForContinue()}isReadyForContinue(){var t,e,n,i,o,r,s;if(this.currentApp.additionalTriggerEditOptions||(this.currentApp.additionalTriggerEditOptions=[]),this.currentApp.filterEditOptions||(this.currentApp.filterEditOptions=[[{filterType:[],keyData:[],searchData:null}]]),this.currentApp&&(this.currentApp.additionalTriggerEditOptions||this.currentApp.editOptions)&&this.showContentArray){if(((null===(e=null===(t=this.currentApp)||void 0===t?void 0:t.additionalTriggerEditOptions)||void 0===e?void 0:e.length)||(null===(n=this.currentApp)||void 0===n?void 0:n.editOptions))!==this.showContentArray.length)for(;this.showContentArray.length<((null===(o=null===(i=this.currentApp)||void 0===i?void 0:i.additionalTriggerEditOptions)||void 0===o?void 0:o.length)||(null===(r=this.currentApp)||void 0===r?void 0:r.editOptions));)this.showContentArray.push(!1);this.testloader=!0,this.readyForContinue=!0,this.readyForSkip=!0," "==(null===(s=this.currentApp.editOptions)||void 0===s?void 0:s.TRI__site_id)&&(this.readyForContinue=!1,this.readyForSkip=!1);const a=this.editOptions&&Object.keys(this.editOptions).some(t=>{const e=this.editOptions[t];return!!Array.isArray(e)&&e.some(e=>{var n,i;return!(!0!==e.custom||!this.currentApp.triggerEditOptions.find(e=>"true"===e.required&&e.name===t)||(null===(n=e.value[0])||void 0===n?void 0:n.key)||(null===(i=e.value[0])||void 0===i?void 0:i.value))})}),c=this.editOptions&&Object.keys(this.editOptions).some(t=>{const e=this.editOptions[t];return!!Array.isArray(e)&&e.some(e=>{var n,i;return!(!0!==e.custom||!this.currentApp.additionalTriggerEditOptions.find(e=>"true"===e.required&&e.name===t)||(null===(n=e.value[0])||void 0===n?void 0:n.key)||(null===(i=e.value[0])||void 0===i?void 0:i.value))})});a||c?(this.readyForContinue=!1,this.readyForSkip=!1):(this.readyForContinue=!0,this.readyForSkip=!0),"k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId?(this.ANDORFilter.forEach(t=>{t.forEach(t=>{var e,n,i,o,r,s,a,c,l,d,u,p,h,g,f;if(t.keyData.length>0)return""==t.keyData.key&&!t.keyData.value&&(this.readyForContinue=!1,this.readyForSkip=!1),"number"==typeof t.keyData[0].value&&(t.keyData[0].value=t.keyData[0].value.toString()),t.keyData&&t.keyData[0]&&t.keyData[0].value&&0!==(null===(i=null===(n=null===(e=t.keyData[0])||void 0===e?void 0:e.value)||void 0===n?void 0:n.toString())||void 0===i?void 0:i.trim().length)&&t.filterType&&t.filterType[0]&&(!t.searchData||!t.filterType[0]||t.filterType[0].value&&0!==(null===(s=null===(r=null===(o=t.filterType[0])||void 0===o?void 0:o.value)||void 0===r?void 0:r.toString())||void 0===s?void 0:s.trim().length))&&t.searchData&&null!==t.searchData&&(null===(a=null==t?void 0:t.searchData)||void 0===a?void 0:a[0].value)?void 0:("Always Run"!==(null===(c=this.currentApp)||void 0===c?void 0:c.actionNameTitle)&&"Fallback"!==(null===(l=this.currentApp)||void 0===l?void 0:l.actionNameTitle)&&(this.readyForContinue=!1,this.readyForSkip=!1),void(t.filterType.length>0&&(null===(d=null==t?void 0:t.searchData)||void 0===d?void 0:d.length)>0&&(null===(u=null==t?void 0:t.searchData)||void 0===u?void 0:u[0].value)&&((null===(p=null==t?void 0:t.keyData)||void 0===p?void 0:p[0].value)||(null===(h=null==t?void 0:t.keyData)||void 0===h?void 0:h[0].key))?(this.readyForSkip=!0,this.readyForContinue=!0):(null==t?void 0:t.searchData)||t.filterType.length>0&&t.keyData.length>0&&(t.keyData[0].value||t.keyData[0].key)&&(this.readyForSkip=!0,this.readyForContinue=!0)));"Always Run"!==(null===(g=this.currentApp)||void 0===g?void 0:g.actionNameTitle)&&"Fallback"!==(null===(f=this.currentApp)||void 0===f?void 0:f.actionNameTitle)&&(this.readyForContinue=!1,this.readyForSkip=!1)})}),this.testloader=!1):(this.currentApp&&this.currentApp.triggerEditOptions&&this.currentApp.triggerEditOptions.length>0&&(this.currentApp.triggerEditOptions.forEach(t=>{var e,n,i;if(t.required&&"true"==t.required)if("nestedSelect"===t.type||"select"===t.type||"text"===t.type||"textarea"===t.type){if(!this.editOptions||!this.editOptions[t.name]||!this.editOptions[t.name][0]||"select"!==t.type&&"text"===this.editOptions[t.name][0].type&&!this.editOptions[t.name][0].value||"select"!==t.type&&"text"===this.editOptions[t.name][0].type&&""===(null===(i=null===(n=null===(e=this.editOptions[t.name][0])||void 0===e?void 0:e.value)||void 0===n?void 0:n.toString())||void 0===i?void 0:i.trim()))return this.readyForContinue=!1,void(this.readyForSkip=!1);this.editOptions[t.name].forEach(t=>{var e,n,i;if("Use a Custom value (Advanced)"===t.display_value){if(!t.value||!t.value[0])return this.readyForContinue=!1,void(this.readyForSkip=!1);if(t.value&&0==t.value.length)return this.readyForContinue=!1,void(this.readyForSkip=!1);if(t.value&&""==(null===(i=null===(n=null===(e=t.value[0])||void 0===e?void 0:e.value)||void 0===n?void 0:n.toString())||void 0===i?void 0:i.trim()))return}})}else this.dynamicAppField&&this.dynamicAppField[t.name]&&this.dynamicAppField[t.name][0]&&this.dynamicAppField[t.name][0].key[0].value&&""!==this.dynamicAppField[t.name][0].key[0].value&&this.dynamicAppField[t.name][0].value&&this.dynamicAppField[t.name][0].value[0]&&null!=this.dynamicAppField[t.name][0].value[0].value||(this.readyForContinue=!1,this.readyForSkip=!1)}),this.currentApp.additionalTriggerEditOptions&&this.currentApp.additionalTriggerEditOptions.forEach(t=>{var e,n,i;if(t.required&&"true"==t.required)if("select"===t.type||"text"===t.type||"textarea"===t.type){if(!this.editOptions||!this.editOptions[t.name]||!this.editOptions[t.name][0]||"select"!==t.type&&"text"===this.editOptions[t.name][0].type&&!this.editOptions[t.name][0].value||"select"!==t.type&&"text"===this.editOptions[t.name][0].type&&""===(null===(i=null===(n=null===(e=this.editOptions[t.name][0])||void 0===e?void 0:e.value)||void 0===n?void 0:n.toString())||void 0===i?void 0:i.trim()))return this.readyForContinue=!1,void(this.readyForSkip=!1);this.editOptions[t.name].forEach(t=>{var e,n,i,o;if("Use a Custom value (Advanced)"===t.display_value){if(!t.value||!t.value[0])return this.readyForContinue=!1,void(this.readyForSkip=!1);if(t.value&&!(null===(e=t.value[0])||void 0===e?void 0:e.key)&&""==(null===(o=null===(i=null===(n=t.value[0])||void 0===n?void 0:n.value)||void 0===i?void 0:i.toString())||void 0===o?void 0:o.trim()))return this.readyForContinue=!1,void(this.readyForSkip=!1)}})}else this.dynamicAppField&&this.dynamicAppField[t.name]&&this.dynamicAppField[t.name][0]&&this.dynamicAppField[t.name][0].key[0].value&&""!==this.dynamicAppField[t.name][0].key[0].value&&this.dynamicAppField[t.name][0].value&&this.dynamicAppField[t.name][0].value[0]||(this.readyForContinue=!1,this.readyForSkip=!1)}),this.testloader=!1),this.testloader=!1)}}showHideOtherOptions(){this.showHideOtherOption=!this.showHideOtherOption}setDynamicAppFieldKey(t,e,n){this.dynamicAppField||(this.dynamicAppField={}),this.dynamicAppField[t]||(this.dynamicAppField[t]={}),this.dynamicAppField[t][e]||(this.dynamicAppField[t][e]={}),(!this.dynamicAppField[t][e].key||!Array.isArray(this.dynamicAppField[t][e].key)||0===this.dynamicAppField[t][e].key.length)&&(this.dynamicAppField[t][e].key=[{value:""}]),n&&n.target&&void 0!==n.target.value&&(this.dynamicAppField[t][e].key[0].value=n.target.value),this.isReadyForContinue()}persistEditOptionsFromChat(){var t;try{if(!(null===(t=this.currentApp)||void 0===t?void 0:t.nodeId))return;let e=this.dynamicAppField?this.processDynamicAppField():{};("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId)&&
1(e=this.processANDORFilter());const n=this.prepareEditOptionsData(),i=this.prepareRequest(n,e);this.customerConnectService.updateUserConnect(this.currentApp.nodeId,i).subscribe({next:()=>{this.updateCurrentApp(n,e)},error:t=>console.warn("[Copilot persistEditOptionsFromChat] updateUserConnect failed",t)})}catch(e){console.warn("[Copilot persistEditOptionsFromChat] error",e)}}syncEditOptionsToCurrentApp(){if(!this.editOptions)return;this.currentApp.editOptions||(this.currentApp.editOptions={});const t=["actions","action","search"].includes(this.currentApp.nodeType);Object.keys(this.editOptions).forEach(e=>{var n,i,o;if(t)if(null===(i=null===(n=this.editOptions[e])||void 0===n?void 0:n[0])||void 0===i?void 0:i.custom){const t=JSON.parse(JSON.stringify(this.editOptions[e]));t[0].value=JSON.stringify(t[0].value),this.currentApp.editOptions[e]=JSON.stringify(t)}else this.currentApp.editOptions[e]=JSON.stringify(this.editOptions[e]);else{const t=null===(o=this.editOptions[e])||void 0===o?void 0:o[0];t&&void 0!==t[e]?(this.currentApp.editOptions[e]=t[e],void 0!==t[e+"__disp"]&&(this.currentApp.editOptions[e+"__disp"]=t[e+"__disp"])):t&&void 0!==t.value&&"string"==typeof t.value&&(this.currentApp.editOptions[e]=t.value)}})}continue(t,e=!1){if(e&&this.resetActionState(),this.readyForContinue||this.readyForSkip){this.beforeOptionsChange.emit();let n=this.dynamicAppField?this.processDynamicAppField():{};("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId)&&(n=this.processANDORFilter()),"janrjh1l08ex59386f67g7nh"===this.currentApp.appId&&this.processClickType();const i=this.prepareEditOptionsData(),o=this.prepareRequest(i,n);this.customerConnectService.updateUserConnect(this.currentApp.nodeId,o).subscribe(o=>{this.updateCurrentApp(i,n),e?this.completeAction():this.handleRunTest(t),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)})}}calculateUniqueIndex(t,e){return 1e3*t+e}resetActionState(){this.isActionFailed=!1,this.actionFailedIndex=null,this.actionFailedData=null,this.actionData=null,this.updateTestMode.emit({isActionFailed:this.isActionFailed,actionFailedIndex:this.actionFailedIndex,actionFailedData:this.actionFailedData,actionData:this.actionData})}processDynamicAppField(){this.dynamicAppField&&Object.keys(this.dynamicAppField||{}).forEach(t=>{const e=this.dynamicAppField[t];Array.isArray(e)&&e.forEach(t=>{var e;1===(null===(e=t.value)||void 0===e?void 0:e.length)&&t.value.forEach(e=>{var n,i;(!e.key||""===(null===(n=e.key)||void 0===n?void 0:n.trim()))&&(!e.value||""===(null===(i=e.value)||void 0===i?void 0:i.trim())||void 0===e.value)&&t.value.splice(0,1)})})});const t={},e=(e,n,i)=>{e.forEach((e,o)=>{this.editOptions[`${o}_${n}_key`]=e.key,this.editOptions[`${o}_${n}_value`]=e.value,t[i].push({key:JSON.stringify(e.key),value:JSON.stringify(e.value)})})};return Object.keys(this.dynamicAppField).forEach(n=>{t[n]||(t[n]=[]);const i=this.dynamicAppField[n];switch(this.currentApp.appId){case"janrt1th08q1AA8DED8OH9De":e(i,"data",n),e(i,"headers",n);break;case"k2P4p45df5f222345E0a":("dataFields"===n||"headersFields"===n)&&(i&&i.length>0?e(i,"dataFields"===n?"data":"headers",n):t[n]=[]);break;default:e(i,"data",n)}}),t}processANDORFilter(){this.ANDORFilter&&this.ANDORFilter.forEach(t=>{t.forEach(t=>{var e,n,i;if(1===(null===(e=t.keyData)||void 0===e?void 0:e.length)){const e=t.keyData[0];(!e.key||""===(null===(n=e.key)||void 0===n?void 0:n.trim()))&&(!e.value||""===(null===(i=e.value)||void 0===i?void 0:i.trim())||void 0===e.value)&&t.keyData.splice(0,1)}})});const t=[];return this.currentApp.filterEditOptions=this.ANDORFilter,this.currentApp.filterEditOptions.forEach((e,n)=>{e.forEach((e,i)=>{this.editOptions[`${n}_${i}_keyData`]=e.keyData,this.editOptions[`${n}_${i}_filterType`]=e.filterType,e.searchData&&(this.editOptions[`${n}_${i}_searchData`]=e.searchData),t[n]||(t[n]=[]),t[n].push({keyData:JSON.stringify(e.keyData),filterType:JSON.stringify(e.filterType),searchData:e.searchData&&e.searchData[0]&&e.searchData[0].value?JSON.stringify(e.searchData):null})})}),t}processClickType(){const t={"Single Click":"SingleClick","Double Click":"DoubleClick","Long Press":"LongPress"}[this.currentApp.actionNameTitle];t&&(this.editOptions.clickType=[{type:"text",key:"",value:t}])}normalizeEditOptionsShape(){!this.editOptions||Object.keys(this.editOptions).forEac
1h(t=>{const e=this.editOptions[t];if(!Array.isArray(e)){if(null==e||""===e)return void delete this.editOptions[t];console.warn("[normalizeEditOptionsShape] coercing non-array editOptions key",t,e),this.editOptions[t]=[{type:"text",key:"",value:String(e)}]}})}prepareEditOptionsData(){const t={};return this.normalizeEditOptionsShape(),this.editOptions&&Object.keys(this.editOptions).forEach(t=>{var e,n,i,o,r,s;const a=[...this.editOptions[t]];!0===(null===(e=a[0])||void 0===e?void 0:e.custom)&&1===a[0].value.length&&(null===(n=a[0].value[0])||void 0===n?void 0:n.hasOwnProperty("value"))&&""===(null===(i=String(a[0].value[0].value))||void 0===i?void 0:i.trim())&&this.editOptions[t].splice(0,1),1===a.length&&"string"==typeof a[0].key&&""===(null===(o=a[0].key)||void 0===o?void 0:o.trim())&&(void 0===a[0].value||!(null===(r=a[0])||void 0===r?void 0:r.hasOwnProperty("value")))&&this.editOptions[t].splice(0,1),1===a.length&&(null===(s=a[0])||void 0===s?void 0:s.hasOwnProperty("value"))&&""===a[0].value&&(""===a[0].key||void 0===a[0].key)&&this.editOptions[t].splice(0,1)}),Object.keys(this.editOptions).forEach(e=>{var n,i,o,r;if(this.editOptions[e][0]&&"object"==typeof this.editOptions[e][0].value&&0===(null===(n=this.editOptions[e][0].value)||void 0===n?void 0:n.length)&&this.editOptions[e][0].value.push({type:"text",key:"",value:""}),!this.editOptions[e][0]||this.editOptions[e][0]&&!this.editOptions[e][0].hasOwnProperty("display_value")&&1===this.editOptions[e].length&&"text"===this.editOptions[e][0].type&&this.editOptions[e][0].hasOwnProperty("value")&&"string"==typeof this.editOptions[e][0].value&&""===(null===(r=null===(o=null===(i=this.editOptions[e][0])||void 0===i?void 0:i.value)||void 0===o?void 0:o.toString())||void 0===r?void 0:r.trim()))delete this.editOptions[e];else if(["actions","action","search"].includes(this.currentApp.nodeType))this.editOptions[e][0]&&this.editOptions[e][0].custom?(t[e]=JSON.parse(JSON.stringify(this.editOptions[e])),t[e][0].value=JSON.stringify(t[e][0].value),t[e]=JSON.stringify(t[e])):t[e]=JSON.stringify(this.editOptions[e]);else{let n=[];this.editOptions[e].forEach(t=>{"string"==typeof t.value?n.push(t.value):Array.isArray(t.value)&&n.push(t.value.map(t=>t.value).join(""))}),0!==n.length?t[e]=n.join(""):Object.assign(t,this.editOptions[e][0])}}),t}prepareRequest(t,e){var n,i,o;let r={editOptions:t,filterEditOptions:e};if("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId?r.filterEditOptions=e:t&&t["0_data_key"]&&(Object.keys(t).forEach(n=>{!n.includes("_data_key")&&!n.includes("_data_value")&&(e[n]=t[n])}),r.filterEditOptions=e),(!this.currentApp.connectTitle||this.currentApp.connectTitle===this.connectId||this.currentApp.connectTitle.endsWith(" Integration"))&&this.currentApp.displayName){const t=null===(n=this.originalConnectList||this.connectList)||void 0===n?void 0:n.filter(t=>t&&Object.keys(t).length>0);this.currentApp.connectTitle=t&&t.length>1&&(null===(i=t[0])||void 0===i?void 0:i.displayName)&&(null===(o=t[t.length-1])||void 0===o?void 0:o.displayName)?t[0].displayName+" to "+t[t.length-1].displayName+" Integration":`${this.currentApp.displayName} Integration`,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:this.currentApp.connectTitle}).subscribe(t=>{this.connectList.forEach(t=>{t.connectTitle=this.currentApp.connectTitle})})}return r}updateCurrentApp(t,e){if("trigger"===this.currentApp.nodeType){this.currentApp.editOptions=t,this.currentApp.filterEditOptions=e;const n=this.originalConnectList.find(t=>t.index==this.currentApp.index);if(n){n.editOptions=t;const e=this.connectList.findIndex(t=>t.index==this.currentApp.index);-1!==e?this.connectList[e].editOptions=t:this.connectList.push(Object.assign({},n))}}else{this.currentApp.editOptions=t,this.currentApp.filterEditOptions=e;const n=this.originalConnectList.find(t=>(null==t?void 0:t.index)==this.currentApp.index);if(n){n.editOptions=this.editOptions;const t=this.connectList.findIndex(t=>(null==t?void 0:t.index)==this.currentApp.index);-1!==t?this.connectList[t].editOptions=this.editOptions:this.connectList.push(Object.assign({},n))}}if("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId){this.currentApp.filterEditOptions=this.ANDORFilter;const t=this.originalConnectList.find(t=>(null==t?void 0:t.index)==this.currentApp.index);if(t){t.filterEditOptions=this.ANDORFilter;const e=this.connectList.findIndex(t=>(null==t?void 0:t.index)==this.currentApp.index);-1!==e?this.connectList[e].filterEditOptions=this.ANDORFilter:this.connectList.push(Object.assign({},t))}}else{this.currentApp.filterEditOptions=this.dynamicAppField;const t=this.originalConnectList.find(t=>(null==t?void 0:t.index)==this.currentApp.index);if(t){t.filterEditOptions=this.dynamicAppField;const e=this.connectList.findIndex(t=>(null==t?void 0:t.index)==this.currentApp.index);-1!==e?this.connectList[e].filterEditOptions=this.dynamicAppField:this.connectList.push(Object.assign({},t))}}}completeAction(){this.currentApp.currentAction="options",this.currentApp.nodeStatus="complete",this.selectedApp.emit({callTestFunction:this.currentApp,skipTestFunction:this.currentApp.actionNameTitle,currentApp:this.currentApp,skipRunTest:!0})}handleRunTest(t){this.currentApp.currentAction="overview",this.selectedApp.emit({callTestFunction:this.currentApp,currentApp:this.currentApp,skipRunTest:!1,isRunTest:t})}startAIAgentConversation(){this.showChatUI=!0,this.activeTab="testing",this.isChatLoading=!1,this.conversationStep="chatting",0===this.chatHistory.length&&(this.chatHistory=[{sender:"ai",message:'Hello! I\'m here to help you configure your tool. Feel free to chat with me, and when you\'re ready, just say "send it" or "run it" to execute!',timestamp:new Date}]),this.changeDetectorRef.detectChanges()}switchTab(t){this.activeTab=t,"testing"===t&&(0===this.chatHistory.length&&(this.chatHistory=[{sender:"ai",message:'Hello! I\'m here to help you configure your tool. Feel free to chat with me, and when you\'re ready, just say "send it" or "run it" to execute!',timestamp:new Date}]),this.conversationStep="chatting",this.isChatLoading=!1),this.changeDetectorRef.detectChanges()}scrollToBottom(){this.chatMessagesContainer&&this.chatMessagesContainer.nativeElement&&setTimeout(()=>{const t=this.chatMessagesContainer.nativeElement;t.scrollTop=t.scrollHeight},100)}ngAfterViewChecked(){this.shouldScrollToBottom&&(this.scrollToBottom(),this.shouldScrollToBottom=!1)}handleConversationalResponse(t){this.conversationStep=t.conversationStep||"collecting_fields",this.requiredFields=t.requiredFields||[],this.collectedFields=t.collectedFields||{},t.message&&(this.chatHistory.push({sender:"ai",message:t.message,timestamp:new Date}),this.shouldScrollToBottom=!0),this.changeDetectorRef.detectChanges()}isExecuteCommand(t){const e=t.toLowerCase().trim();return["send it","run it","execute","go ahead","do it","run now","send now","execute now","proceed","let's go"].some(t=>e.includes(t))}looksLikeApiKey(t){const e=t.trim();return e.startsWith("xai-")||e.startsWith("sk-")||e.startsWith("gsk_")||e.length>20&&/^[a-zA-Z0-9_-]+$/.test(e)}sendChatMessage(){if(!this.userInputValue.trim()||this.isChatLoading)return;const t=this.userInputValue.trim();this.chatHistory.push({sender:"user",message:t,timestamp:new Date}),this.userInputValue="",this.isChatLoading=!0,this.shouldScrollToBottom=!0,!this.looksLikeApiKey(t)||this.getChatModelApiKey()?"collecting_fields"!==this.conversationStep?this.isExecuteCommand(t)?this.proceedToExecution():this.handleNormalConversation(t):this.handleFieldCollection(t):this.handleApiKeyInput(t)}handleApiKeyInput(t){this.editOptions||(this.editOptions={}),this.editOptions.ACT__api_key||(this.editOptions.ACT__api_key=[]),Array.isArray(this.editOptions.ACT__api_key)||(this.editOptions.ACT__api_key=[]),0===this.editOptions.ACT__api_key.length&&this.editOptions.ACT__api_key.push({type:"text",key:"",value:""}),this.editOptions.ACT__api_key[0].value=t.trim(),this.currentApp&&!this.currentApp.editOptions&&(this.currentApp.editOptions={}),this.currentApp&&(this.currentApp.editOptions.ACT__api_key=JSON.stringify([{type:"text",key:"",value:t.trim()}])),this.isChatLoading=!1,this.chatHistory.push({sender:"ai",message:"Great! I've saved your API key. Now we can chat! How can I help you?",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges()}getToolConnectId(){let t="",e=null;const n=t=>{if(!t)return null;if(t.ACT__tool){if(Array.isArray(t.ACT__tool)&&t.ACT__tool[0])return t.ACT__tool[0];if("string"==typeof t.ACT__tool)try{let e;return e="string"==typeof t.ACT__tool?JSON.parse(t.ACT__tool):t.ACT__tool,Array.isArray(e)?e[0]:e}catch(e){}}if(t.tool){if(Array.isArray(t.tool)&&t.tool[0])return t.tool[0];if("string"==typeof t.tool)try{let e;return e="string"==typeof t.tool?JSON.parse(t.tool):t.tool,Array.isArray(e)?e[0]:e}catch(e){}}return null};if(e=n(this.editOptions),!e&&this.currentApp&&this.currentApp.editOptions&&(e=n(this.currentApp.editOptions)),e)if(e.dis
1play_value){const n=e.display_value.match(/^([^\s-]+)/);n?t=n[1]:e.value&&(t=e.value)}else e.value&&(t=e.value);return t}getToolDisplayName(){let t="the selected tool",e=null;const n=t=>{if(!t)return null;if(t.ACT__tool){if(Array.isArray(t.ACT__tool)&&t.ACT__tool[0])return t.ACT__tool[0];if("string"==typeof t.ACT__tool)try{const e=JSON.parse(t.ACT__tool);return Array.isArray(e)?e[0]:e}catch(e){}}if(t.tool){if(Array.isArray(t.tool)&&t.tool[0])return t.tool[0];if("string"==typeof t.tool)try{const e=JSON.parse(t.tool);return Array.isArray(e)?e[0]:e}catch(e){}}return null};if(e=n(this.editOptions),!e&&this.currentApp&&this.currentApp.editOptions&&(e=n(this.currentApp.editOptions)),e)if(e.value&&""!==e.value)t=e.value;else if(e.display_value){const n=e.display_value.split(" - ");n.length>=2&&(t=n.slice(1).join(" - ").trim())}return t}getSelectedChatModel(){let t="grok";if(this.editOptions&&this.editOptions.chatModel){const n=this.editOptions.chatModel;if(Array.isArray(n)&&n[0])t=n[0].value||n[0];else if("string"==typeof n)try{const e=JSON.parse(n);t=Array.isArray(e)&&e[0]?e[0].value||e[0]:e}catch(e){t=n}}if("grok"===t&&this.currentApp&&this.currentApp.editOptions&&this.currentApp.editOptions.ACT__chat_model){const n=this.currentApp.editOptions.ACT__chat_model;if("string"==typeof n)try{const e=JSON.parse(n);t=Array.isArray(e)&&e[0]?e[0].value||e[0]:e}catch(e){t=n}else Array.isArray(n)&&n[0]&&(t=n[0].value||n[0])}return"Appy Pie Flawless Text"===t||"appy pie flawless text"===(null==t?void 0:t.toLowerCase())?"Appy Pie Flawless Text":(t=(t||"grok").toLowerCase(),"chatgpt"===t||"openai"===t?"chatgpt":"gemini"===t||"google"===t?"gemini":"grok"===t||"xai"===t?"grok":"cursor"===t?"cursor":"grok")}getChatModelApiKey(){let t="";if(this.editOptions&&this.editOptions.ACT__api_key){const n=this.editOptions.ACT__api_key;if(Array.isArray(n)&&n[0]&&n[0].value)t=n[0].value;else if("string"==typeof n)try{const e=JSON.parse(n);Array.isArray(e)&&e[0]&&e[0].value&&(t=e[0].value)}catch(e){t=n}}if(!t&&this.currentApp&&this.currentApp.editOptions&&this.currentApp.editOptions.ACT__api_key){const n=this.currentApp.editOptions.ACT__api_key;if("string"==typeof n)try{const e=JSON.parse(n);Array.isArray(e)&&e[0]&&e[0].value&&(t=e[0].value)}catch(e){t=n}else Array.isArray(n)&&n[0]&&n[0].value&&(t=n[0].value)}return t?t.trim():""}getGrokApiKey(){return this.getChatModelApiKey()}getAIProviderName(t){return{chatgpt:"ChatGPT (OpenAI)",gemini:"Gemini (Google)",grok:"Grok (xAI)",cursor:"Cursor AI"}[t.toLowerCase()]||"AI"}callAIChatCompletion(t,e,n){const i=n.toLowerCase();let o,r,s;return"chatgpt"===i||"openai"===i?(o="https://api.openai.com/v1/chat/completions",r=new di.WM({Authorization:`Bearer ${e}`,"Content-Type":"application/json"}),s={model:"gpt-4",messages:t,max_tokens:500,temperature:.7}):"gemini"===i||"google"===i?(o=`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${e}`,r=new di.WM({"Content-Type":"application/json"}),s={contents:[{parts:[{text:t.map(t=>"system"===t.role?t.content+"\n\n":`${"user"===t.role?"User":"Assistant"}: ${t.content}\n`).join("")}]}]}):"cursor"===i?(o="https://api.cursor.sh/v1/chat/completions",r=new di.WM({Authorization:`Bearer ${e}`,"Content-Type":"application/json"}),s={model:"gpt-4",messages:t,max_tokens:500,temperature:.7}):"Appy Pie Flawless Text"===i||"appy pie flawless text"===i?(o="https://openrouter.ai/api/v1/chat/completions",r=new di.WM({Authorization:"Bearer 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","Content-Type":"application/json"}),s={model:"qwen/qwen3-next-80b-a3b-instruct",messages:t}):(o="https://api.x.ai/v1/chat/completions",r=new di.WM({Authorization:`Bearer ${e}`,"Content-Type":"application/json"}),s={model:"grok-3",messages:t,max_tokens:500,temperature:.7}),this.http.post(o,s,{headers:r}).toPromise()}handleNormalConversation(t){const e=this.getSelectedChatModel(),n=this.getChatModelApiKey();if(!n&&"Appy Pie Flawless Text"!==e){this.isChatLoading=!1;const t=this.getAIProviderName(e);return this.chatHistory.push({sender:"ai",message:`I need your ${t} API key to chat. Please enter it in the "Chat Model API Key" field above, or paste it here and I'll help you configure it.`,t
1imestamp:new Date}),this.shouldScrollToBottom=!0,void this.changeDetectorRef.detectChanges()}const i=this.editOptions.ACT__prompt&&this.editOptions.ACT__prompt[0]?this.editOptions.ACT__prompt[0].value:"",o=[{role:"system",content:`You are a helpful AI assistant helping the user configure ${this.getToolDisplayName()}. The user's goal is: "${i}". Have a friendly, natural conversation. When the user is ready to execute, they will say "send it" or "run it". Don't ask for specific fields unless the user explicitly asks about them. Just chat naturally and be helpful.`},...this.chatHistory.filter(t=>"user"===t.sender||"ai"===t.sender).slice(-10).map(t=>({role:"user"===t.sender?"user":"assistant",content:t.message})),{role:"user",content:t}];this.callAIChatCompletion(o,n,e).then(t=>{let n;this.isChatLoading=!1,n="gemini"===e||"google"===e?t.candidates[0].content.parts[0].text:t.choices[0].message.content,this.chatHistory.push({sender:"ai",message:n,timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges()},t=>{this.isChatLoading=!1;const n=this.getAIProviderName(e);let i=`Sorry, I encountered an error with ${n}. `;i+=401===t.status?"Your API key appears to be invalid. Please check it and try again.":429===t.status?"Rate limit exceeded. Please try again in a moment.":t.error&&t.error.message?t.error.message:"Please check your API key and try again.",this.chatHistory.push({sender:"ai",message:i,timestamp:new Date}),this.shouldScrollToBottom=!0,console.error(`${n} API error:`,t),this.changeDetectorRef.detectChanges()})}proceedToExecution(){const t=this.editOptions.ACT__prompt&&this.editOptions.ACT__prompt[0]?this.editOptions.ACT__prompt[0].value:"",e=this.getToolConnectId(),n=this.getChatModelApiKey();this.conversationStep="collecting_fields",this.chatHistory.push({sender:"ai",message:"Great! Let me check what information I need to execute this tool...",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges(),this.commonService.connectTestMultiAction({connectId:this.connectId,current_Id:this.currentApp.nodeId,nodeId:this.currentApp.nodeId,conversationStep:"collecting_fields",userInput:"",collectedFields:{},prompt:t,selectedTool:e,grokApiKey:n||"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",execute:!1}).subscribe(t=>{this.isChatLoading=!1,2===t.status?(this.handleConversationalResponse(t),this.readyToRun=!1):1===t.status?(t.message&&t.message.includes("already configured")?(this.readyToRun=!0,this.chatHistory.push({sender:"ai",message:t.message+' Click "Run Now" to execute.',timestamp:new Date}),this.shouldScrollToBottom=!0):(this.readyToRun=!0,this.chatHistory.push({sender:"ai",message:t.message||'All required fields are ready! Click "Run Now" to execute.',timestamp:new Date}),this.shouldScrollToBottom=!0),this.changeDetectorRef.detectChanges()):(this.chatHistory.push({sender:"ai",message:t.message||'Ready to execute! Click "Run Now" when you\'re ready.',timestamp:new Date}),this.shouldScrollToBottom=!0,this.readyToRun=!0,this.changeDetectorRef.detectChanges())},t=>{this.isChatLoading=!1,console.error("Field collection error:",t),this.chatHistory.push({sender:"ai",message:"I'm ready to execute! Click \"Run Now\" when you're ready.",timestamp:new Date}),this.shouldScrollToBottom=!0,this.readyToRun=!0,this.changeDetectorRef.detectChanges()})}handleFieldCollection(t){const e=this.editOptions.ACT__prompt&&this.editOptions.ACT__prompt[0]?this.editOptions.ACT__prompt[0].value:"",n=this.getToolConnectId(),i=this.getChatModelApiKey();this.isChatLoading=!0,this.commonService.connectTestMultiAction({connectId:this.connectId,current_Id:this.currentApp.nodeId,nodeId:this.currentApp.nodeId,conversationStep:"collecting_fields",userInput:t,collectedFields:this.collectedFields,requiredFields:this.requiredFields,prompt:e,selectedTool:n,grokApiKey:i||"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",execute:!1}).subscribe(t=>{this.isChatLoading=!1,2===t.status?(this.handleConversationalResponse(t),this.readyToRun=!1):1===t.status?(this.readyToRun=!0,this.collectedFields=t.collectedFields||this.collectedFields,this.chatHistory.push({sender:"ai",message:t.message||'Perfect! All fields collected. Click "Run Now" to execute.',timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges()):(this.chatHistory.push({sender:"ai",message:t.message||"An error occurred. Please try again.",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges())},t=>{this.isChatLoading=!1,this.chatHistory.push({sender:"ai",message:"An error occurred. Please try again.",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges()})}executeToolNow(){if(!this.readyToRun)return;this.isChatLoading=!0,this.readyToRun=!1,this.chatHistory.push({sender:"ai",message:"Executing tool...",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges();const t=this.editOptions.ACT__prompt&&this.editOptions.ACT__prompt[0]?this.editOptions.ACT__prompt[0].value:"";let e="",n=null;if(this.editOptions.ACT__tool)if(Array.isArray(this.editOptions.ACT__tool)&&this.editOptions.ACT__tool[0])n=this.editOptions.ACT__tool[0];else if("string"==typeof this.editOptions.ACT__tool)try{let t;t="string"==typeof this.editOptions.ACT__tool?JSON.parse(this.editOptions.ACT__tool):this.editOptions.ACT__tool,n=Array.isArray(t)?t[0]:t}catch(o){}if(!n&&this.editOptions.tool)if(Array.isArray(this.editOptions.tool)&&this.editOptions.tool[0])n=this.editOptions.tool[0];else if("string"==typeof this.editOptions.tool)try{let t;t="string"==typeof this.editOptions.tool?JSON.parse(this.editOptions.tool):this.editOptions.tool,n=Array.isArray(t)?t[0]:t}catch(o){}if(n)if(n.display_value){const t=n.display_value.match(/^([^\s-]+)/);t?e=t[1]:n.value&&(e=n.value)}else n.value&&(e=n.value);const i=this.getChatModelApiKey();this.commonService.connectTestMultiAction({connectId:this.connectId,current_Id:this.currentApp.nodeId,nodeId:this.currentApp.nodeId,conversationStep:"execute",userInput:"",collectedFields:this.collectedFields,requiredFields:this.requiredFields,prompt:t,selectedTool:e,grokApiKey:i||"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",execute:!0}).subscribe(t=>{this.isChatLoading=!1,1===t.status?(this.chatHistory.push({sender:"ai",message:t.message||"Tool executed successfully!",timestamp:new Date}),this.shouldScrollToBottom=!0,setTimeout(()=>{this.showChatUI=!1,this.chatHistory=[],this.currentApp.currentAction="overview",this.selectedApp.emit({callTestFunction:this.currentApp,currentApp:this.currentApp,skipRunTest:!1,isRunTest:!0})},2e3)):(this.chatHistory.push({sender:"ai",message:t.message||t.error||"Error executing tool. Please try again.",timestamp:new Date}),this.shouldScrollToBottom=!0),this.changeDetectorRef.detectChanges()},t=>{this.isChatLoading=!1,this.chatHistory.push({sender:"ai",message:"Network error during execution. Please try again.",timestamp:new Date}),this.shouldScrollToBottom=!0,this.changeDetectorRef.detectChanges()})}setIsInHouseAppFlag(){var t;this.isInHouseApp=["jh920i1x59386f2qos0m","khvu2jtw0k2nff756b96jtv3","ki0aigsg03sg8960e34jb7xf","k2P4o69wb5f473388E6g","jh920i1x59386f1qqej9","k92uracj0e6g1e4d59ecg5to","k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4p45df5f222345E0a","k2P4o69wb5f4733delay","jlp5059wb5f473388e6f","lna8nwtk00qb7189999ylsri","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733syncdata","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator"].includes(null===(t=this.currentApp)||void 0===t?void 0:t.appId)}setupAIAgentOptions(){"k2P4o69wb5f4733aiagent"===this.currentApp.appId&&(this.activeTab="setup"),this.currentApp.triggerEditOptions=[{label:"Input Data",required:"true",label_help:"Select the input data from previous steps to be processed by the AI Agent.",type:"text",name:"ACT__input_data",placeholder:"Select input data...",function:"",isClickEnable:!1,changeFuncName:""},{label:"Chat Model",required:"true",label_help:"Select the AI chat model to use for processing.",type:"select",name:"ACT__chat_model",placeholder:"Select chat model...",function:"",isClickEnable:!0,options:[{value:"chatgpt",disp_val:"ChatGPT"},{value:"grok",disp_val:"Grok"},{value:"gemini",disp_val:"Gemini"}],optionsStatic:!0,changeFuncName:""},{label:"API Key",required:"true",label_help:"Enter the API key for the selected chat model.",type:"text",name:"ACT__api_key",placeholder:"Enter API key...",function:"",isClickEnable:!1,changeFuncName:""},{label:"Prompt",required:"true",label_help:"Enter the prompt for the AI Agent. This will be sent to the selected chat model.",type:"textarea",
1name:"ACT__prompt",placeholder:"Enter your prompt here...",function:"",isClickEnable:!1,changeFuncName:""}],this.currentApp.triggerEditOptions[2]&&(this.currentApp.triggerEditOptions[2].dropdownOption=this.currentApp.triggerEditOptions[2].options),this.editOptions||(this.editOptions={}),this.currentApp.triggerEditOptions.forEach(t=>{this.editOptions[t.name]||("text"===t.type||"textarea"===t.type?this.editOptions[t.name]=[{type:"text",key:"",value:""}]:"select"===t.type&&(this.editOptions[t.name]=[]))})}showDataofSampleData(t,e,n){var i,o,r,s,a;this.choicesDropmenu||(this.choicesDropmenu=[]),this.choicesDropmenu[t]||(this.choicesDropmenu[t]={});let c=this.calculateUniqueIndex(t,e);if(this.choicesDropmenu[t]&&this.choicesDropmenu[t][e])this.isIconDown[c]=!1,this.choicesDropmenu[t][e]=!1,null===(r=document.getElementById("menu-drop"+t+"choices_dropmenu"+e))||void 0===r||r.setAttribute("style","display:none;"),null===(s=document.getElementById("menu-drop"+t+"choices_dropmenuMob"+e))||void 0===s||s.setAttribute("style","display:none;"),null===(a=document.getElementById("menu-drop"+t+"choices_dropmenu_MoClass"+e))||void 0===a||a.setAttribute("style","display:none;");else{this.isIconDown[c]=!0,this.choicesDropmenu[t]||(this.isIconDown[c]=!0,this.choicesDropmenu[t]=[]),this.choicesDropmenu[t][e]=!0;const n=document.getElementById("menu-drop"+t+"choices_dropmenu"+e);n?(n.setAttribute("style","display:block;"),this.isIconDown[c]=!0):this.isIconDown[c]=!1,null===(i=document.getElementById("menu-drop"+t+"choices_dropmenuMob"+e))||void 0===i||i.setAttribute("style","display:block;"),null===(o=document.getElementById("menu-drop"+t+"choices_dropmenu_MoClass"+e))||void 0===o||o.setAttribute("style","display:block;")}}isValueSelected(t,e,n){var i,o,r,s,a,c,l,d,u,p;const h=(null===(o=null===(i=this.currentApp)||void 0===i?void 0:i.triggerEditOptions)||void 0===o?void 0:o.length)||0,g=null!==(c=null===(a=null===(s=null===(r=this.currentApp)||void 0===r?void 0:r.triggerEditOptions)||void 0===s?void 0:s[n])||void 0===a?void 0:a.name)&&void 0!==c?c:null===(u=null===(d=null===(l=this.currentApp)||void 0===l?void 0:l.additionalTriggerEditOptions)||void 0===d?void 0:d[n-h])||void 0===u?void 0:u.name;return!(!g||!(null===(p=this.editOptions)||void 0===p?void 0:p[g]))&&this.editOptions[g].some(n=>"label"===n.type&&n.key===t.key&&n.nodeIndex===e||!(!n.custom||!Array.isArray(n.value))&&n.value.some(n=>"label"===n.type&&n.key===t.key&&n.nodeIndex===e))}isActive(t,e,n,i){const o=this.selectedValuesPerDropdown[i]&&this.selectedValuesPerDropdown[i].some(e=>e.key===t.key&&e.nodeIndex===n),r=this.editOptions&&this.editOptions[e]&&this.editOptions[e].some(e=>e.key===t.key&&e.nodeIndex===n);return o||r}captureJsonEditorCaret(t,e){try{if(!t||"json-editor"!==t.type)return;this.activeJsonEditorField=t.name;const n=window.getSelection();if(!n||0===n.rangeCount)return;const i=n.getRangeAt(0);this.jsonEditorSel={fieldName:t.name,segIndex:e,startOffset:Math.min(i.startOffset,i.endOffset),endOffset:Math.max(i.startOffset,i.endOffset)}}catch(n){}}_insertChipIntoJsonEditor(t,e,n,i){const o=this.jsonEditorSel;if(!o||o.fieldName!==t)return!1;const r=this.editOptions[t]||[],s=r[o.segIndex];if(!s||"text"!==s.type||"string"!=typeof s.value)return!1;const a={type:"label",key:e.key,value:e.value||e.key,nodeIndex:n,realIndex:i},c=s.value,l=c.substring(0,o.startOffset),d=c.substring(o.endOffset);return r.splice(o.segIndex,1,{type:"text",key:"",value:l},a,{type:"text",key:"",value:d}),this.editOptions[t]=r,this.jsonEditorSel=null,!0}isJsonEditorValid(t){const e=this.editOptions&&this.editOptions[t];if(!e||!e.length)return null;const n=e.map(t=>t&&"label"===t.type?"x":t&&"string"==typeof t.value?t.value:"").join("").trim();if(!n)return null;try{return JSON.parse(n),!0}catch(i){return!1}}formatJsonEditor(t){this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit();const e=this.editOptions&&this.editOptions[t]||[];if(!e.length)return;const n=[];let i,o="";e.forEach(t=>{t&&"label"===t.type?(o+="%%CHIP"+n.length+"%%",n.push(t)):o+=t&&"string"==typeof t.value?t.value:""});try{i=JSON.stringify(JSON.parse(o),null,2)}catch(d){return}const r=[],s=/%%CHIP(\d+)%%/g;let a,c=0;for(;null!==(a=s.exec(i));){const t=i.substring(c,a.index);t&&r.push({type:"text",key:"",value:t}),r.push(n[parseInt(a[1],10)]),c=a.index+a[0].length}const l=i.substring(c);l&&r.push({type:"text",key:"",value:l}),this.editOptions[t]=r.length?r:e}clearJsonEditor(t){this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),this.editOptions[t]=[],this.jsonEditorSel=null}slelectDataFromSampleData(t,e,n,i,o,r=!1){var s,a,c,l,d,u,p,h,g;if(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),!r&&e&&"json-editor"===e.type&&this._insertChipIntoJsonEditor(e.name,t,i,o))return void(this.isReadyForContinue&&this.isReadyForContinue());this.selectedOptionIndex[n]=void 0!==t.value?t.value:"",void 0===t.value&&(t.value="",this.selectedOptionIndex[n]=t.value),!1===t.value&&(this.selectedOptionIndex[n]=t.value),this.editOptions||(this.editOptions={}),(!this.editOptions[e.name]||1===this.editOptions[e.name].length&&"text"===this.editOptions[e.name][0].type&&"string"==typeof this.editOptions[e.name][0].value&&""===(null===(c=null===(a=null===(s=this.editOptions[e.name][0])||void 0===s?void 0:s.value)||void 0===a?void 0:a.toString())||void 0===c?void 0:c.trim()))&&(this.editOptions[e.name]=[]);let f={type:"label",key:t.key,value:t.value||t.key};r?f={type:"text",key:"",value:"[:space:]"}:(f.nodeIndex=i,f.realIndex=o),this.selectedValuesPerDropdown[n]||(this.selectedValuesPerDropdown[n]=[]),-1===this.selectedValuesPerDropdown[n].findIndex(e=>e.key===t.key&&e.nodeIndex===i)&&this.selectedValuesPerDropdown[n].push(f),this.betweenSelected||0==this.betweenSelected||this.addSelectIf?this.addSelectIf?(this.editOptions[e.name][this.betweenSelected]=f,this.addSelectIf=!1,this.betweenSelected++,document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")})):void 0===this.betweenSelected||(null===(l=this.editOptions[e.name][this.betweenSelected])||void 0===l?void 0:l.key)&&""!==(null===(u=null===(d=this.editOptions[e.name][this.betweenSelected])||void 0===d?void 0:d.value)||void 0===u?void 0:u.trim())?void 0===this.betweenSelected?(this.betweenSelected=0,(null===(p=this.editOptions[e.name][this.betweenSelected])||void 0===p?void 0:p.key)&&""!==(null===(g=null===(h=this.editOptions[e.name][this.betweenSelected])||void 0===h?void 0:h.value)||void 0===g?void 0:g.trim())?this.editOptions[e.name].splice(this.betweenSelected,0,f):this.editOptions[e.name][this.betweenSelected]=f,this.betweenSelected++):(this.editOptions[e.name].splice(this.betweenSelected,0,f),this.betweenSelected++):(this.editOptions[e.name][this.betweenSelected]=f,this.betweenSelected++):this.editOptions[e.name].push(f),this.triggerDropDownData[e.name]=this.concatenateValues(this.editOptions[e.name]),this.closeDropdownAfterSelectionIfNotAdvanced(n,"standard"),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}slelectDataFromCustomSampleData(t,e,n,i,o,r=!1){var s,a,c,l;this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),this.selectedOptionIndex[n]=void 0!==t.value?t.value:"",void 0===t.value&&(t.value="",this.selectedOptionIndex[n]=t.value),!1===t.value&&(this.selectedOptionIndex[n]=t.value);let d={type:"label",key:t.key,value:t.value||t.key};r?d={type:"text",key:"",value:"[:space:]"}:(d.nodeIndex=i,d.realIndex=o);const u=this.editOptions[e.name].findIndex(t=>"Use a Custom value (Advanced)"===t.display_value);if(-1!==u){let t=[];t=null==this.betweenSelected?[]:null===(s=this.editOptions[e.name][u])||void 0===s?void 0:s.value,1===(null==t?void 0:t.length)&&"text"===t[0].type&&"string"==typeof t[0].value&&""===(null===(a=t[0].value)||void 0===a?void 0:a.trim())&&(this.editOptions[e.name][u].value=[d]),void 0===this.betweenSelected||this.addSelectIf?this.addSelectIf?(t[this.betweenSelected]=d,this.betweenSelected++,this.addSelectIf=!1,document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")})):0===this.betweenSelected?t[this.betweenSelected]&&"text"===t[this.betweenSelected].type&&!(null===(l=t[this.betweenSelected].value)||void 0===l?void 0:l.trim())?t[this.betweenSelected]=d:t.splice(this.betweenSelected,0,d):null==this.betweenSelected?(this.betweenSelected=0,this.editOptions[e.name][u].value=[],this.editOptions[e.name][u].value=[d],this.betweenSelected++):t.push(d):t[this.betweenSelected]&&"text"===t[this.betweenSelected].type&&!(null===(c=t[this.betweenSelected].value)||void 0===c?void 0:c.trim())?(t[this.betweenSelected]=d,this.betweenSelected++):(t.splice(this.betweenSelected,0,d),this.betweenSelected++),this.triggerDropDownData[e.name]=this.concatenateValues(t),this.closeDropdownAfterSelectionIfNotAdvanced(n,"custom"),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}}slelectDataFromdynamicAppSampleData(t,e,n,i,o,r,s=!1){var a,c;this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),this.selectedOptionIndex[n]=void 0!==t.value?t.value:"",this.dynamicAppField[o]||(this.dynamicAppField[o]=[]),this.dynamicAppField[o][n]||(this.dynamicAppField[o][n]={key:[{type:"text",key:"",value:""}],value:[]});let l={type:"label",key:t.key,value:t.value||t.key};s?l={type:"text",key:"",value:"[:space:]"}:(l.nodeIndex=i,l.realIndex=r),this.betweenSelected&&!this.addSelectIf?this.dynamicAppField[o][n].value[this.betweenSelected]&&"text"===this.dynamicAppField[o][n].value[this.betweenSelected].type&&!(null===(a=this.dynamicAppField[o][n].value[this.betweenSelected].value)||void 0===a?void 0:a.trim())?(this.dynamicAppField[o][n].value[this.betweenSelected]=l,this.betweenSelected++):(this.dynamicAppField[o][n].value.splice(this.betweenSelected,0,l),this.betweenSelected++):0!=this.betweenSelected||this.addSelectIf?this.addSelectIf?(this.dynamicAppField[o][n].value[this.betweenSelected]=l,this.betweenSelected++,this.addSelectIf=!1,document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")})):null==this.betweenSelected?null==this.betweenSelected?(this.dynamicAppField[o][n].value[this.betweenSelected]=l,this.betweenSelected=0):this.dynamicAppField[o][n].value.splice(this.betweenSelected,0,l):this.dynamicAppField[o][n].value.push(l):this.dynamicAppField[o][n].value[this.betweenSelected]&&"text"===this.dynamicAppField[o][n].value[this.betweenSelected].type&&!(null===(c=this.dynamicAppField[o][n].value[this.betweenSelected].value)||void 0===c?void 0:c.trim())?(this.dynamicAppField[o][n].value[this.betweenSelected]=l,this.betweenSelected++):(this.dynamicAppField[o][n].value.splice(this.betweenSelected,0,l),this.betweenSelected++),this.closeDynamicAppDropdownAfterSelectionIfNotAdvanced(o,n),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}removeselectedTextOption(t,e){if(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),"formgroup editoption-dropmenu active_menu"!==document.getElementById("menu-drop"+t).getAttribute("class")){const e=$(".editoption-dropmenu.active_menu");e.length>0&&e.removeClass("active_menu");const n=document.getElementById("menu-drop"+t),i=null==n?void 0:n.querySelector(".choices-container");i&&(this.renderer.removeClass(i,"open-up"),this.renderer.removeClass(i,"open-down"));const o=null==n?void 0:n.id;if(o){const t=o.replace("menu-drop","");document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenuMob"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu_MoClass"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),this.choicesDropmenu&&this.choicesDropmenu[t]&&Object.keys(this.choicesDropmenu[t]).forEac
1h(e=>{this.choicesDropmenu[t][e]=!1;const n=this.calculateUniqueIndex(parseInt(t),parseInt(e));this.isIconDown[n]=!1})}}this.selectedOptionIndex[t]=null,event.stopPropagation(),document.body.classList.remove("xl-overflow-hidden"),this.currentApp.triggerEditOptions[t]&&this.currentApp.triggerEditOptions[t].changefunction&&this.callChangeFunction(this.currentApp.triggerEditOptions[t],0);const n=this.currentApp.triggerEditOptions[t]?this.currentApp.triggerEditOptions[t].name:this.currentApp.additionalTriggerEditOptions[t-this.currentApp.triggerEditOptions.length].name;this.editOptions[n].splice(e,1);for(let i=e;i<this.editOptions[n].length;i++){const t=`${n}_${i+1}`,e=`${n}_${i}`;this.isAddedToSelect[e]=this.isAddedToSelect[t]||!1,this.isContentEnable[e]=this.isContentEnable[t]||!1,this.isSubmitVisible[e]=this.isSubmitVisible[t]||!1,delete this.isAddedToSelect[t],delete this.isContentEnable[t],delete this.isSubmitVisible[t]}this.triggerDropDownData[n]=this.concatenateValues(this.editOptions[n]),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}concatenateValues(t){return t.map(t=>"[:space:]"===t.value?" ":t.value).join("")}removeselectedCustomTextOption(t,e){this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),event.stopPropagation();const n=this.editOptions[t].map(t=>t.display_value).indexOf("Use a Custom value (Advanced)");this.editOptions[t][n].value.splice(e,1),this.triggerDropDownData[t]=this.concatenateValues(this.editOptions[t][n].value),this.isReadyForContinue();const i=$(".editoption-dropmenu.active_menu");i.length>0&&(i.removeClass("active_menu"),i.each((t,e)=>{const n=e.querySelector(".choices-container");n&&(this.renderer.removeClass(n,"open-up"),this.renderer.removeClass(n,"open-down"))}));const o=i.attr("id");if(o){const t=o.replace("menu-drop","");document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenuMob"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu_MoClass"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),this.choicesDropmenu&&this.choicesDropmenu[t]&&Object.keys(this.choicesDropmenu[t]).forEach(e=>{this.choicesDropmenu[t][e]=!1;const n=this.calculateUniqueIndex(parseInt(t),parseInt(e));this.isIconDown[n]=!1})}this.syncEditOptionsToCurrentApp()}removeselecteddynamicAppTextOption(t,e,n){event.stopPropagation(),1==this.dynamicAppField[n][t].value.length?(this.dynamicAppField[n][t].value[e].type="text",this.dynamicAppField[n][t].value[e].key="",this.dynamicAppField[n][t].value[e].value=void 0):this.dynamicAppField[n][t].value.splice(e,1),this.isReadyForContinue();const i=$(".editoption-dropmenu.active_menu");i.length>0&&(i.removeClass("active_menu"),i.removeClass("open-down"),i.removeClass("open-up"))}enableCustomValue(t,e){this.editOptions||(this.editOptions={}),this.editOptions[t.name]||(this.editOptions[t.name]=[]),this.selectedOptionIndex[e]=null,this.editOptions[t.name]=[{type:"text",value:[{type:"text",key:"",value:void 0}],display_value:"Use a Custom value (Advanced)",key:"",custom:!0}],document.getElementById("menu-drop"+e).setAttribute("class","menu"),this.isReadyForContinue()}showDataofCustomSampleData(t,e,n){var i,o,r,s;n&&n.stopPropagation(),this.isOverlayOpenCustomAdvanced[t]=!0;const a=document.getElementById("Custom_value_Advanced"+t);a&&a.classList.add("open");let c=document.getElementById("MultipleCustomEditor"+t);c&&c.classList.add("open"),this.choicesDropmenu||(this.choicesDropmenu=[]),this.choicesDropmenu[t]&&this.choicesDropmenu[t][e]?(this.choicesDropmenu[t][e]=!1,null===(r=document.getElementById("menu-drop-custom"+t+"choices_dropmenu"+e))||void 0===r||r.setAttribute("style","display:none;"),null===(s=document.getElementById("menu-drop-custom"+t+"custom_dropmenu"+e))||void 0===s||s.setAttribute("style","display:none;")):(this.choicesDropmenu[t]||(this.choicesDropmenu[t]=[]),this.choicesDropmenu[t][e]=!0,null===(i=document.getElementById("menu-drop-custom"+t+"choices_dropmenu"+e))||void 0===i||i.setAttribute("style","display:block;"),null===(o=document.getElementById("menu-drop-custom"+t+"custom_dropmenu"+e))||void 0===o||o.setAttribute("style","display:block;"))}showDataofdynamicAppSampleData(t,e,n,i,o){var r,s;let a=document.getElementById("MultipleCustomEditor"+t);a&&a.classList.add("open"),this.choicesDropmenu||(this.choicesDropmenu=[]),this.choicesDropmenu[t]&&this.choicesDropmenu[t][e]&&this.choicesDropmenu[t][e][n]?(this.isIconDown[n]=!0,this.choicesDropmenu[t][e][n]=!1,document.getElementById(o+"menu-drop-custom-dynamicApp"+e+"choices_dropmenu"+n).setAttribute("style","display:none"),null===(s=document.getElementById(o+"menu-drop-custom-dynamicApp-mobile"+e+"choices_dropmenu"+n))||void 0===s||s.setAttribute("style","display:none")):(this.isIconDown[n]=!1,this.choicesDropmenu[t]||(this.choicesDropmenu[t]=[]),this.choicesDropmenu[t][e]||(this.isIconDown[n]=!1,this.choicesDropmenu[t][e]=[]),this.choicesDropmenu[t][e][n]=!0,document.getElementById(o+"menu-drop-custom-dynamicApp"+e+"choices_dropmenu"+n).setAttribute("style","display:block"),null===(r=document.getElementById(o+"menu-drop-custom-dynamicApp-mobile"+e+"choices_dropmenu"+n))||void 0===r||r.setAttribute("style","display:block"))}getConnectListCustomOptionValues(t,e,n,i){if(this.isOverlayOpenCustomAdvanced[e]=!0,!i.target.classList.contains("contenteditable6")&&!i.target.classList.contains("choice-label")&&!i.target.classList.contains("fa.fa-close")){const t=document.getElementById("Custom_value_Advanced"+e);t&&t.classList.add("open")}let o=document.getElementById("MultipleCustomEditor"+e);if(o&&o.classList.add("open"),0!==this.currentApp.index&&(n||"insertButton1"===i.target.id||i.target.offsetParent&&i.target.offsetParent.id==="menu-drop-custom"+e||i.target.id==="menu-drop-custom"+e))if("formgroup editoption-dropmenu active_menu"!==document.getElementById("menu-drop-custom"+e).getAttribute("class")){const t=$(".editoption-dropmenu.active_menu");t.length>0&&t.removeClass("active_menu"),document.getElementById("menu-drop-custom"+e).setAttribute("class","formgroup editoption-dropmenu active_menu"),1===this.currentApp.index&&this.showDataofCustomSampleData(e,0,i),this.loadJquery()}else document.getElementById("menu-drop-custom"+e).setAttribute("class","formgroup editoption-dropmenu")}getConnectListdynamicAppOptionValuesNew(t,e,n,i,o,r){this.betweenSelected=r,this.dynamicAppField[o][e].value||(this.dynamicAppField[o][e].value=[]),this.dynamicAppField[o][e].value[r]||(this.dynamicAppField[o][e].value[r]={}),setTimeout(()=>{this.dynamicAppField[o]&&(this.dynamicAppField[o][e].value[r].value="")},0);const s=document.getElementById(t+"menu-drop-custom-dynamicApp"+e);if(s&&!s.classList.contains("active_menu"))s.setAttribute("class","input formgroup editoption-dropmenu MobileClass-4 active_menu"),setTimeout(()=>{const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10);else if(s){s.setAttribute("class","input formgroup editoption-dropmenu MobileClass-4");const t=s.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}}getConnectListdynamicAppOptionValues(t,e,n,i,o){let r=document.getElementById("MultipleCustomEditor"+e);r&&r.classList.add("open");let s=document.getElementById("filterContinueif"+e);if(s&&s.classList.add("open"),0!==this.currentApp.index&&(n||"insertButton1"===i.target.id||i.target.offsetParent&&i.target.offsetParent.id==="menu-drop-custom-dynamicApp"+e||i.target.offsetParent&&i.target.offsetParent.id===o+"menu-drop-custom-dynamicApp"+e||i.target.id==="menu-drop-custom-dynamicApp"+e||i.target.id.includes(`dynamicAppField[${o}]`)))if("formgroup editoption-dropmenu active_menu"!==document.getElementById(o+"menu-drop-custom-dynamicApp"+e).getAttribute("class")){const t=$(".editoption-dropmenu.active_menu");t.length>0&&t.removeClass("active_menu"),document.getElementById(o+"menu-drop-custom-dynamicApp"+e).setAttribute("class","formgroup editoption-dropmenu active_menu"),this.loadJquery()}else document.getElementById(o+"menu-drop-custom-dynamicApp"+e).setAttribute("class","formgroup editoption-dropmenu")}addDynamicFieldOfCustomerly(t){this.dynamicAppField||(this.dynamicAppField={}),this.dynamicAppField[t]||(this.dynamicAppField[t]=[]),this.dynamicAppField[t].push({key:[{type:"text",key:"",value:""}],value:[{type:"text",key:"",value:void 0}]}),this.isReadyForContinue()}removeDynamicFieldOfCustomerly(t,e){this.dynamicAppField[e].length>1&&this.dynamicAppField[e].splice(t,1)}loadDynamicAppField(t,e){let n;this.dynamicAppField||(this.dynamicAppField={}),n=[],this.currentApp.filterEditOptions&&this.currentApp.filterEditOptions[t]&&!e&&this.currentApp.filterEditOptions[t].forEach((t,e)=>{let i;i={key:"",value:""},i.key="string"==typeof t.key?JSON.parse(t.key):t.key,i.value="string"==typeof t.value?JSON.parse(t.value):t.value,n.push(i)}),this.dynamicAppField[t]=n.length>0?n:[{key:[{type:"text",key:"",value:""}],value:[{type:"text",key:"",value:void 0}]}];let i=!0;this.dynamicAppField[t].forEach((e,n)=>{e.value.forEach((e,o)=>
1{"label"===e.type&&this.connectList[e.nodeIndex]&&this.connectList[e.nodeIndex].sample_data[0]&&(this.connectList[e.nodeIndex].sample_data[0].data.find(i=>{if(i.key===e.key)return this.dynamicAppField[t][n].value[o].value=i.value,!0})||(i=!1,this.dynamicAppField[t][n].value.splice(o,1)))})}),i||this.selectedApp.emit({allTriggerFound:"false"}),this.dynamicAppField&&Object.keys(this.dynamicAppField||{}).forEach(t=>{const e=this.dynamicAppField[t];Array.isArray(e)&&e.forEach(t=>{var e,n;1===(null===(e=t.value)||void 0===e?void 0:e.length)?t.value.forEach(t=>{var e,n;(!t.key||""===(null===(e=t.key)||void 0===e?void 0:e.trim()))&&(!t.value||""===(null===(n=t.value)||void 0===n?void 0:n.trim()))&&(t.value=void 0)}):(null===(n=t.value)||void 0===n?void 0:n.length)>1&&(t.value=t.value.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))})}),this.isReadyForContinue()}addTextFieldAtTheLast(t){this.editOptions[t]||(this.editOptions[t]=[]),this.editOptions[t].push({type:"text",key:"",value:""})}addTextFieldAtTheLastNew(t,e,n,i,o){this.addSelectIf=!1,this.betweenSelected=t,this.showContentArray[o]=!0;let r=document.getElementById("MultipleCustomEditor"+i);r&&r.classList.add("open");let s=document.getElementById("menu-drop"+i);s.classList.contains("active_menu")?this.renderer.removeClass(s,"active_menu"):this.renderer.addClass(s,"active_menu"),setTimeout(()=>{const t=document.getElementById("menu-drop"+i);if(t){const e=t.querySelector(".choices-container");if(e){const t=e.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(e,"open-up"),this.renderer.removeClass(e,"open-down"),this.renderer.addClass(e,t.bottom>n?"open-up":"open-down")}}},0),this.loadJquery(),setTimeout(()=>{this.editOptions[e]||(this.editOptions[e]=[]),this.editOptions[e].splice(t,0,{type:"text",key:"",value:""})},10)}updateSelectedValues(t,e,n,i,o){this.isOverlayOpen[i]=!0,document.body.classList.add("xl-overflow-hidden"),this.betweenSelected=t,this.addSelectIf=!0,this.showContentArray[o]=!0;let r=document.getElementById("MultipleCustomEditor"+i);r&&r.classList.add("open");let s=document.getElementById("menu-drop"+i);s.classList.contains("active_menu")?this.renderer.removeClass(s,"active_menu"):this.renderer.addClass(s,"active_menu"),setTimeout(()=>{if(s){const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}}},0),this.loadJquery(),setTimeout(()=>{this.editOptions[e]||(this.editOptions[e]=[])},10)}updateCustomSelectedValues(t,e,n,i,o){this.betweenSelected=t,this.addSelectIf=!0,this.showContentArray[o]=!0;let r=document.getElementById("menu-drop-custom"+i);if(r)if(r.classList.contains("active_menu")){this.renderer.removeClass(r,"active_menu");const t=r.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}else this.renderer.addClass(r,"active_menu"),setTimeout(()=>{const t=r.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10);this.loadJquery(),1===this.currentApp.index&&this.showDataofSampleData(i,0,n),setTimeout(()=>{this.editOptions[e]||(this.editOptions[e]=[])},10)}updateSelectedValuesWebhhokByAutomate(t,e,n,i,o){this.isOverlayOpen[o]=!0;let r=document.getElementById("MultipleCustomEditor"+o);r&&r.classList.add("open"),this.betweenSelected=t,this.addSelectIf=!0,this.showContentArray[o]=!0,this.loadJquery(),1===this.currentApp.index&&this.showDataofSampleData(i,0,n);const s=document.getElementById(e+"menu-drop-custom-dynamicApp"+o);s&&!s.classList.contains("active_menu")?(s.setAttribute("class","formgroup editoption-dropmenu active_menu"),setTimeout(()=>{const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10)):s&&(s.setAttribute("class","formgroup editoption-dropmenu"),setTimeout(()=>{const t=s.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10))}updateSelectedValuesFilterByAutomate(t,e,n,i,o){this.isOverlayOpenIf[i]=!0,document.body.classList.add("xl-overflow-hidden");const r=document.getElementById("onlyContinueif"+i);r&&r.classList.add("open");const s=document.getElementById("menu-drop"+i);s&&!s.classList.contains("active_menu")?s.setAttribute("class","input-group formgroup editoption-dropmenu active_menu"):s&&s.setAttribute("class","input-group formgroup editoption-dropmenu"),this.betweenSelected=t,this.addSelectIf=!0,this.showContentArray[o]=!0}addTextFieldinBetween(t,e){this.editOptions[e].splice(t,0,{type:"text",key:"",value:""})}handleClickOutside(t){const e=t.target,n=e.classList.contains("whitespace-to-addinputbox"),i=e.closest(".editoption-dropmenu");e.closest(".formgroup.editoption-dropmenu"),document.querySelectorAll(".editoption-dropmenu").forEach(t=>{if(t!==i){t.classList.remove("active_menu");const e=t.querySelector(".choices-container");e&&(this.renderer.removeClass(e,"open-up"),this.renderer.removeClass(e,"open-down"));const n=t.id;if(n){const t=n.replace("menu-drop","");document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenuMob"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${t}choices_dropmenu_MoClass"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),this.choicesDropmenu&&this.choicesDropmenu[t]&&Object.keys(this.choicesDropmenu[t]).forEac
1h(e=>{this.choicesDropmenu[t][e]=!1;const n=this.calculateUniqueIndex(parseInt(t),parseInt(e));this.isIconDown[n]=!1})}}}),document.querySelectorAll(".and_or_filter_0");let o=!1;e.classList.contains("custom-landing-page")&&(o=!0),!i&&!n&&(this.addSelectIf=!1,this.editOptions&&Object.keys(this.editOptions).forEach(t=>{var e,n,i,o;const r=[...this.editOptions[t]];!0===(null===(e=r[0])||void 0===e?void 0:e.custom)&&(1===r[0].value.length&&r[0].value[0].hasOwnProperty("value")&&""===(null===(n=String(r[0].value[0].value))||void 0===n?void 0:n.trim())&&""===(null===(i=String(r[0].value[0].key))||void 0===i?void 0:i.trim())?this.editOptions[t][0].value[0].value=void 0:r[0].value.length>1&&(r[0].value=r[0].value.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))),1===r.length&&(null===(o=r[0])||void 0===o?void 0:o.hasOwnProperty("value"))&&""===r[0].value&&""===r[0].key?this.editOptions[t][0].value=void 0:r.length>1&&(this.editOptions[t]=[...r.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))})])}));for(const r in this.isSubmitVisible){this.isSubmitVisible[r]=!1;const[t,e]=r.split("_")}this.ANDORFilter&&!i&&o&&this.ANDORFilter.forEach(t=>{t.forEach(t=>{var e,n,i,o;if(1===(null===(e=t.keyData)||void 0===e?void 0:e.length)){const e=t.keyData[0];(!e.key||""===(null===(n=e.key)||void 0===n?void 0:n.trim()))&&(!e.value||""===(null===(i=e.value)||void 0===i?void 0:i.trim()))&&(e.value=void 0)}else(null===(o=t.keyData)||void 0===o?void 0:o.length)>1&&(t.keyData=t.keyData.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))})}),this.dynamicAppField&&!i&&o&&Object.keys(this.dynamicAppField||{}).forEach(t=>{const e=this.dynamicAppField[t];Array.isArray(e)&&e.forEach(t=>{var e,n;1===(null===(e=t.value)||void 0===e?void 0:e.length)?t.value.forEach(t=>{var e,n;(!t.key||""===(null===(e=t.key)||void 0===e?void 0:e.trim()))&&(!t.value||""===(null===(n=t.value)||void 0===n?void 0:n.trim()))&&(t.value=void 0)}):(null===(n=t.value)||void 0===n?void 0:n.length)>1&&(t.value=t.value.filter(t=>{var e,n;return!(""===(null===(e=t.key)||void 0===e?void 0:e.trim())&&""===(null===(n=t.value)||void 0===n?void 0:n.trim()))}))})})}setTextFieldValue(t,e,n){var i;const o=null===(i=n.target.innerText)||void 0===i?void 0:i.trim(),r=`${t}_${e}`;o?this.isSubmitVisible[r]=!0:(this.editOptions[t][e].value=o,this.isSubmitVisible[r]=!1),this.triggerDropDownData[t]=this.concatenateValues([...this.editOptions[t],{value:n.target.innerText}]),""===n.target.innerText&&("Backspace"===n.key||8===n.keyCode)&&(this.editOptions[t].splice(e,1),this.triggerDropDownData[t]=this.concatenateValues(this.editOptions[t])),this.isReadyForContinue()}setFirstTextValue(t,e){if((!this.editOptions[t]||!this.editOptions[t][0])&&(this.editOptions[t]=[{type:"text",key:"",value:""}]),1===this.editOptions[t].length&&"text"===this.editOptions[t][0].type){const n=this.editOptions[t][0].value;e.target.innerText?(e.target.innerText!==n&&(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit()),this.editOptions[t][0].value=e.target.innerText):(""!==n&&(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit()),this.editOptions[t]=[{type:"text",key:"",value:""}]),this.triggerDropDownData[t]=this.concatenateValues(this.editOptions[t]),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp()}}addTextFieldAtTheLastCustomTextOption(t,e,n){var i;let o=document.getElementById("menu-drop-custom"+n);(null===(i=null==o?void 0:o.classList)||void 0===i?void 0:i.contains("active_menu"))?this.renderer.removeClass(o,"active_menu"):(this.renderer.addClass(o,"active_menu"),setTimeout(()=>{const t=o.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10)),this.betweenSelected=t,this.editOptions[e][0].value.splice(t,0,{type:"text",key:"",value:""}),setTimeout(()=>{var t;const e=this.el.nativeElement.querySelectorAll(".readmorebutton1");if(e){const n=e[(null==e?void 0:e.length)-1];null===(t=this.renderer)||void 0===t||t.addClass(n,"cross-over")}},10)}addTextFieldAtTheLastCustomTextOptionNew(t,e,n){var i;let o=document.getElementById("menu-drop-custom"+n);(null===(i=null==o?void 0:o.classList)||void 0===i?void 0:i.contains("active_menu"))?this.renderer.removeClass(o,"active_menu"):(this.renderer.addClass(o,"active_menu"),setTimeout(()=>{const t=o.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10)),this.betweenSelected=t,this.editOptions[e][0].value.splice(t,0,{type:"text",key:"",value:""})}addTextFieldinBetweenCustomTextOption(t,e){this.editOptions[e][0].value.splice(t,0,{type:"text",key:"",value:""})}setTextFieldValueCustomTextOption(t,e,n){setTimeout(()=>{var i,o;this.isSubmitVisible[`${t}_${e}`]=!0,this.triggerDropDownData[t]=this.concatenateValues([...this.editOptions[t][0].value,{value:n.target.innerText}]),""===n.target.innerText&&("Backspace"===n.key||8===n.keyCode)&&(this.editOptions[t][0].value.splice(e,1),this.triggerDropDownData[t]=this.concatenateValues(this.editOptions[t][0].value),this.isReadyForContinue());const r=this.el.nativeElement.querySelectorAll(".readmorebutton1");r.length>0&&r.forEach(t=>{this.renderer.addClass(t,"cross-over")}),1===(null===(i=this.editOptions[t][e])||void 0===i?void 0:i.value.length)&&n.target&&!(null===(o=n.target.innerText)||void 0===o?void 0:o.trim())&&(this.editOptions[t][e].value[0].value="");const s=this.currentApp.triggerEditOptions.find(e=>e.name===t);s&&this.callChangeFunction(s,1),this.testloader=!1},10),this.isReadyForContinue()}setFirstTextValueCustomTextOption(t,e){setTimeout(()=>{(!this.editOptions[t][0].value||!this.editOptions[t][0].value[0])&&(this.editOptions[t][0].value=[{type:"text",key:"",value:""}]),1===this.editOptions[t][0].value.length&&"text"===this.editOptions[t][0].value[0].type&&(e.target.innerText!==this.editOptions[t][0].value[0].value&&(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit()),this.editOptions[t][0].value[0].value=e.target.innerText,this.triggerDropDownData[t]=this.concatenateValues(this.editOptions[t][0].value),this.isReadyForContinue(),this.syncEditOptionsToCurrentApp())},10)}addTextFieldAtTheLastdynamicAppTextOption(t,e){this.dynamicAppField[e][t].value.push({type:"text",key:"",value:""})}addTextFieldinBetweendynamicAppTextOption(t,e,n){this.betweenSelected=e,this.dynamicAppField[n][t].value.splice(e,0,{type:"text",key:"",value:""});const i=document.getElementById(n+"menu-drop-custom-dynamicApp"+t);i&&!i.classList.contains("active_menu")?i.setAttribute("class","formgroup editoption-dropmenu active_menu"):i&&i.setAttribute("class","formgroup editoption-dropmenu"),setTimeout(()=>{const t=i.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},0)}setTextFieldValuedynamicAppTextOption(t,e,n,i){var o,r;""===i.target.innerText&&("Backspace"===i.key||8===i.keyCode)&&this.dynamicAppField[e][t].value.splice(n,1);const s=null===(r=null===(o=i.target)||void 0===o?void 0:o.innerText)||void 0===r?void 0:r.trim(),a=`${e}_${t}_${n}`;s?this.isSubmitVisible[a]=!0:(this.editOptions&&(this.editOptions[e][n].value=s),this.isSubmitVisible[a]=!1),this.isReadyForContinue()}setFirstTextValuedynamicAppTextOption(t,e,n){(!this.dynamicAppField[e][t].value.value||!this.dynamicAppField[e][t].value[0])&&(this.dynamicAppField[e][t].value=[{type:"text",key:"",value:""}]),1===this.dynamicAppField[e][t].value.length&&"text"===this.dynamicAppField[e][t].value[0].type&&(n.target.innerText!==this.dynamicAppField[e][t].value[0].value&&(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit()),this.dynamicAppField[e][t].value[0].value=n.target.innerText,this.isReadyForContinue(),this.syncEditOptionsToCurrentApp())}setCaret(t){setTimeout(()=>{document.getElementById(t).focus()},20)}addAND_Filter(t){this.ANDORFilter[t]||(this.ANDORFilter[t]=[]),this.ANDORFilter[t].push({keyData:[{type:"text",key:"",value:void 0}],filterType:[],searchData:[{type:"text",key:"",value:""}]}),this.isReadyForContinue()}addOR_Filter(){this.ANDORFilter.push([{keyData:[{type:"text",key:"",value:void 0}],filterType:[],searchData:[{type:"text",key:"",value:""}]}]),this.isReadyForContinue()}removeAND_Filter(t,e){if(1===this.ANDORFilter[t].length){if(1===this.ANDORFilter.length)return!1;this.ANDORFilter.splice(t,1);const e=document.getElementById(`and_or_filter_${t}`);e&&e.remove(),this.isReadyForContinue()}else this.ANDORFilter[t].splice(e,1),this.isReadyForContinue();this.isReadyForContinue()}AND_OR_FilterLength(){return this.ANDORFilter?Object.keys(this.ANDORFilter).length:0}addTextFieldAtTheLastfiltercontinueif(t,e,n,i){this.isDeletedValues=!0,this.betweenSelected=t,this.ANDORFilter[e]&&this.ANDORFilter[e][n]&&Array.isArray(this.ANDORFilter[e][n].keyData)&&this.ANDORFilter[e][n].keyData.splice(t,0,{type:"text",key:"",value:""});const o=document.getElementById("menu-drop"+i);o&&!o.classList.contains("active_menu")?o.setAttribute("class","input-group formgroup editoption-dropmenu active_menu"):o&&o.setAttribute("class","input-group formgroup editoption-dropmenu")}addTextFieldinBetweenfiltercontinueif(t,e,n){this.ANDORFilter[e][n].keyData.splice(t,0,{type:"text",key:"",value:""});const i=document.getElementById("onlyContinueif"+n);i?(i.classList.remove("open"),document.body.classList.remove("xl-overflow-hidden")):console.error("Element with ID onlyContinueif"+n+" not found")}setTextFieldValuefiltercontinueif(t,e,n,i,o){var r,s;0===n&&(this.triggerDropDownData[t]=o.target.innerText),""===o.target.innerText&&("Backspace"===o.key||8===o.keyCode)&&this.ANDORFilter[t][n].keyData.splice(i,1);const a=null===(s=null===(r=o.target)||void 0===r?void 0:r.innerText)||void 0===s?void 0:s.trim(),c=`${t}_${e}_${n}_${i}`;a?this.isSubmitVisible[c]=!0:(this.editOptions&&this.editOptions[t]&&this.editOptions[t][i]&&(this.editOptions[t][i].value=a),this.isSubmitVisible[c]=!1,this.ANDORFilter[0][0].keyData[0].value=a),this.isReadyForContinue()}setFirstTextValuefiltercontinueif(t,e,n){(!this.ANDORFilter[t][e].keyData||!this.ANDORFilter[t][e].keyData[0])&&(this.ANDORFilter[t][e].keyData=[{type:"text",key:"",value:""}]),1===this.ANDORFilter[t][e].keyData.length&&"text"===this.ANDORFilter[t][e].keyData[0].type&&(this.ANDORFilter[t][e].keyData[0].value=n.target.innerText,this.isReadyForContinue())}removeselectedTextOptionfiltercontinueif(t,e,n){document.body.classList.remove("xl-overflow-hidden"),1==this.ANDORFilter[t][e].keyData.length?this.ANDORFilter[t][e].keyData=[{type:"text",key:"",value:void 0}]:this.ANDORFilter[t][e].keyData.splice(n,1),this.isReadyForContinue()}removeselectedTextOptionfiltercontinueiffilterType(t,e,n){document.body.classList.remove("xl-overflow-hidden"),this.ANDORFilter[t][e].filterType.splice(n,1),this.isReadyForContinue()}selectValuefiltercontinueiffilterType(t,e,n){let i;i={type:"text",key:""},i.value=n.value,i.display_value=n.disp_val,this.ANDORFilter[t][e].filterType=[i],this.show
1FilterValue(i.value)?this.ANDORFilter[t][e].searchData||(this.ANDORFilter[t][e].searchData=[{type:"text",key:"",value:""}]):delete this.ANDORFilter[t][e].searchData,this.isReadyForContinue()}showDataofSampleDatafiltercontinueif(t,e,n){this.choicesDropmenu||(this.choicesDropmenu=[]),this.choicesDropmenu[t]&&this.choicesDropmenu[t][e]?(this.isIconDown[e]=!0,this.choicesDropmenu[t][e]=!1,document.getElementById("menu-drop"+t+"choices_dropmenu"+e).setAttribute("style","display:none;"),document.getElementById("menu-drop-mobile"+t+"choices_dropmenu"+e).setAttribute("style","display:none;")):(this.isIconDown[e]=!1,this.choicesDropmenu[t]||(this.isIconDown[e]=!1,this.choicesDropmenu[t]=[]),this.choicesDropmenu[t][e]=!0,document.getElementById("menu-drop"+t+"choices_dropmenu"+e).setAttribute("style","display:block;"),document.getElementById("menu-drop-mobile"+t+"choices_dropmenu"+e).setAttribute("style","display:block;"))}slelectDataFromSampleDatafiltercontinueif(t,e,n,i,o,r=!1){var s,a,c,l,d;let u={type:"label",key:t.key,value:t.value||t.key};r?u={type:"text",key:"",value:"[:space:]"}:(u.nodeIndex=i,u.realIndex=o),this.betweenSelected&&!this.addSelectIf?this.ANDORFilter[e][n].keyData[this.betweenSelected]&&"text"===this.ANDORFilter[e][n].keyData[this.betweenSelected].type&&!(null===(s=this.ANDORFilter[e][n].keyData[this.betweenSelected].value)||void 0===s?void 0:s.trim())?(this.ANDORFilter[e][n].keyData[this.betweenSelected]=u,this.betweenSelected++):(this.ANDORFilter[e][n].keyData.splice(this.betweenSelected,0,u),this.betweenSelected++):0!==this.betweenSelected||this.addSelectIf?this.addSelectIf?(this.ANDORFilter[e][n].keyData[this.betweenSelected]=u,this.betweenSelected++,this.addSelectIf=!1,document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")})):void 0===this.betweenSelected&&1===this.ANDORFilter[e][n].keyData.length&&"text"===this.ANDORFilter[e][n].keyData[0].type&&"string"==typeof this.ANDORFilter[e][n].keyData[0].value&&""===(null===(d=null===(l=null===(c=this.ANDORFilter[e][n].keyData[0])||void 0===c?void 0:c.value)||void 0===l?void 0:l.toString())||void 0===d?void 0:d.trim())?(this.ANDORFilter[e][n].keyData[0]=u,this.betweenSelected=0):this.ANDORFilter[e][n].keyData.push(u):this.ANDORFilter[e][n].keyData[this.betweenSelected]&&"text"===this.ANDORFilter[e][n].keyData[this.betweenSelected].type&&!(null===(a=this.ANDORFilter[e][n].keyData[this.betweenSelected].value)||void 0===a?void 0:a.trim())?(this.ANDORFilter[e][n].keyData[this.betweenSelected]=u,this.betweenSelected++):(this.ANDORFilter[e][n].keyData.splice(this.betweenSelected,0,u),this.betweenSelected++),this.closeFilterDropdownAfterSelectionIfNotAdvanced(e,n),this.isReadyForContinue()}showFilterValue(t){return-1===["istrue","isfalse","exists","doesnotexists","beforeCurrentDate","afterCurrentDate","isempty","isnotempty"].indexOf(t)}checkIfNotBlurAfteraWhile(t,e){setTimeout(()=>{var n,i;const o=null===(n=e.target)||void 0===n?void 0:n.innerText.trim(),r=`${t}_0`;o?this.isSubmitVisible[r]=!0:((null===(i=this.editOptions[t])||void 0===i?void 0:i[0])&&(1==this.editOptions[t][0].custom||(this.editOptions[t][0].value=o)),this.isSubmitVisible[r]=!1)},10)}addCrossOverClass(t,e,n){this.betweenSelected=0;const i=t.target;i&&i.classList.add("cross-over"),this.showContentArray[e]=!0;let o=document.getElementById("MultipleCustomEditor"+n);o&&o.classList.add("open");let r=document.getElementById("menu-drop"+n);r.classList.contains("active_menu")?this.renderer.removeClass(r,"active_menu"):this.renderer.addClass(r,"active_menu"),this.loadJquery(),setTimeout(()=>{if(r){const t=r.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}}},0)}addCrossOverClassCustomValue(t,e,n){const i=t.target;i&&i.classList.add("cross-over"),this.showContentArray[e]=!0;let o=document.getElementById("menu-drop-custom"+n);if(o)if(o.classList.contains("active_menu")){o.classList.remove("active_menu");const t=o.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}else o.classList.add("active_menu"),setTimeout(()=>{const t=o.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10);this.loadJquery()}addCrossOverClassWebhooksByAutomate(t,e,n,i){const o=t.target;this.betweenSelected=n,o&&o.classList.add("cross-over"),this.showContentArray[n]=!0;const r=document.getElementById(e+"menu-drop-custom-dynamicApp"+n);r&&!r.classList.contains("active_menu")?r.setAttribute("class","input formgroup editoption-dropmenu active_menu"):r&&r.setAttribute("class","input formgroup editoption-dropmenu"),this.loadJquery(),setTimeout(()=>{const t=r.querySelector(".choices-container");if(t){const e=t.getBoundingClientRect(),n=window.innerHeight;this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"),this.renderer.addClass(t,e.bottom>n?"open-up":"open-down")}},10)}addCrossOverClassFilterByAutomate(t,e,n,i){this.betweenSelected=n;const o=t.target;o&&o.classList.add("cross-over");const r=document.getElementById("menu-drop"+i);r&&!r.classList.contains("active_menu")?r.setAttribute("class","input-group formgroup editoption-dropmenu active_menu"):r&&r.setAttribute("class","input-group formgroup editoption-dropmenu")}stateChangedFunc(){this.stateChanged=!0}CopyToClipboard(t){let e;e=document.createElement("textarea"),e.style.position="fixed",e.style.left="0",e.style.top="0",e.
1style.opacity="0",e.value=t,document.body.appendChild(e),e.focus(),e.select(),document.execCommand("copy"),document.body.removeChild(e),this.readyForContinue=!0}clearData(){var t,e,n,i,o,r,s,a,c,l,d,u,p;if(this.editOptions={},this.ANDORFilter=[[{keyData:[{type:"text",key:"",value:""}],filterType:[{type:"text",key:"",value:""}],searchData:[{type:"text",key:"",value:""}]}]],this.dynamicAppField={},(null===(t=this.currentApp)||void 0===t?void 0:t.filterEditOptions)&&"k2P4o45df5f473111E0g"!==(null===(e=this.currentApp)||void 0===e?void 0:e.appId)&&"k2P4o45df5f473111E0f"!==(null===(n=this.currentApp)||void 0===n?void 0:n.appId)&&"k2P4p45df5f222345E0a"!==(null===(i=this.currentApp)||void 0===i?void 0:i.appId)&&"k2P4o69wb5f473388E6g"!==(null===(o=this.currentApp)||void 0===o?void 0:o.appId)&&"llm85ld40h347189996dwf86"!==(null===(r=this.currentApp)||void 0===r?void 0:r.appId)&&"k2P4o69wb5f4733twowaysync"!==(null===(s=this.currentApp)||void 0===s?void 0:s.appId)&&"k2P4o69wb5f4733syncdata"!==(null===(a=this.currentApp)||void 0===a?void 0:a.appId)&&"k2P4o69wb5f4733aiagent"!==(null===(c=this.currentApp)||void 0===c?void 0:c.appId)&&"k2P4o69wb5f4733pdfgenerator"!==(null===(l=this.currentApp)||void 0===l?void 0:l.appId)&&"k2zq0oct02js11f3ce11tsug"!==(null===(d=this.currentApp)||void 0===d?void 0:d.appId)&&"lyr85eyh0dow7189994ua2nc"!==(null===(u=this.currentApp)||void 0===u?void 0:u.appId)&&Object.keys(null===(p=this.currentApp)||void 0===p?void 0:p.filterEditOptions).forEach(t=>{t&&(this.currentApp.filterEditOptions[t]=[])}),this.currentApp.editOptions){const t=Object.keys(this.currentApp.editOptions),e=this.currentApp.additionalTriggerEditOptions;for(let i=0;i<((null==t?void 0:t.length)||(null==e?void 0:e.length));i++)this.clearSelection(i);const n=this.currentApp.triggerEditOptions;n&&n.forEach((t,e)=>{this.clearSelection(e)})}else this.isReadyForContinue();this.loadDynamicFieldsIfExist(!0)}blurHandler(t,e,n){e.target.innerText=e.target.textContent.trim(),e.target.innerText&&e.target.innerText!==t&&(this.syncEditOptionsToCurrentApp(),this.beforeOptionsChange.emit(),"text"===n[0]?(this.editOptions[n[1]][n[2]].value=e.target.innerText,this.triggerDropDownData[n[1]]=this.concatenateValues(this.editOptions[n[1]])):"custom"===n[0]?(this.editOptions[n[1]][0].value[n[2]].value=e.target.innerText,this.triggerDropDownData[n[1]]=this.concatenateValues(this.editOptions[n[1]][0].value)):"ANDORFilter"===n[0]?this.ANDORFilter[n[2]][n[3]].keyData[n[4]].value=e.target.innerText:"dynamicAppField"===n[0]&&(this.dynamicAppField[n[1]][n[2]].value[n[3]].value=e.target.innerText),this.syncEditOptionsToCurrentApp(),this.changeDetectorRef.detectChanges())}isString(t){return"string"==typeof t}displayVal(t){return null==t?"":"string"==typeof t?t:JSON.stringify(t)}shouldShowDropdownCloseButton(t,e=!1){var n,i,o,r;if(!this.isShowAdvancedMapping)return!1;if(e){const e=null===(o=null===(i=null===(n=this.editOptions)||void 0===n?void 0:n[t])||void 0===i?void 0:i[0])||void 0===o?void 0:o.value;return Array.isArray(e)&&e.length>1}const s=null===(r=this.editOptions)||void 0===r?void 0:r[t];return Array.isArray(s)&&s.length>1}shouldShowDropdownCloseButtonForFilter(t,e){var n,i,o;if(!this.isShowAdvancedMapping)return!1;const r=null===(o=null===(i=null===(n=this.ANDORFilter)||void 0===n?void 0:n[t])||void 0===i?void 0:i[e])||void 0===o?void 0:o.keyData;return Array.isArray(r)&&r.length>1}shouldShowDropdownCloseButtonForDynamicApp(t,e){var n,i,o;if(!this.isShowAdvancedMapping)return!1;const r=null===(o=null===(i=null===(n=this.dynamicAppField)||void 0===n?void 0:n[t])||void 0===i?void 0:i[e])||void 0===o?void 0:o.value;return Array.isArray(r)&&r.length>1}hasSelectedMapping(t){var e;const n=null===(e=this.editOptions)||void 0===e?void 0:e[t];return!(!Array.isArray(n)||0===n.length)&&n.some(t=>this.hasMeaningfulMappingValue(t))}hasMeaningfulMappingValue(t){return!!t&&!!("label"===t.type&&(this.isNonEmptyValue(t.value)||this.isNonEmptyValue(t.key))||"text"===t.type&&this.isNonEmptyValue(t.value)||this.isNonEmptyValue(t.key)||this.isNonEmptyValue(t.value)||Array.isArray(t.value)&&t.value.some(t=>this.hasMeaningfulMappingValue(t))||Array.isArray(t.value)&&t.value.some(t=>null!=(null==t?void 0:t.nodeIndex)&&(null==t?void 0:t.nodeIndex)>=0)||this.isNonEmptyValue(t.display_value))}isNonEmptyValue(t){return null!=t&&("string"==typeof t?""!==t.trim():!Array.isArray(t)||t.length>0)}toggleText(t){if(this.lastReadElementId){var e=document.getElementById(this.lastReadElementId);e&&e.classList.remove("linecontenteditable6"),this.lastReadEventTarget&&(this.lastReadEventTarget.innerText="Read More"),this.lastReadElementId=""}this.isTextExpanded[t]=!this.isTextExpanded[t],this.isTextExpanded[t]?(this.currentlyExpandedItem&&this.currentlyExpandedItem!==t&&(this.isTextExpanded[this.currentlyExpandedItem]=!1),this.currentlyExpandedItem=t):this.currentlyExpandedItem===t&&(this.currentlyExpandedItem="")}getDisplayedText(t){return t[this.item.name+"__disp"]?"string"==typeof t[this.item.name+"__disp"]?t[this.item.name+"__disp"]:JSON.stringify(t[this.item.name+"__disp"]):"string"==typeof t.value?t.value:null==t.value?"":JSON.stringify(t.value)}shouldShowReadMoreButton(t){return this.getDisplayedText(t).length>300}truncateText(t,e,n){if((null==t||""===t)&&(t=n&&n.key?n.key.replace(/\./g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""),"string"!=typeof t)return t.toString();if(t.length<=e)return t;const i=t.slice(0,e),o=i.lastIndexOf(" ");return i.slice(0,o)+"..."}IsViewMore(t,e){if(t&&e){if(this.lastReadElementId!=e){var n=document.getElementById(e);n&&n.classList.add("typing_txt")}return t.length>100}return!1}mouseleaveHandler(t,e){e&&(t.target.classList.add("typing_txt"),this.isFocused=!1)}
1addClassFocus(){this.isFocused=!0}toggleContent(t){this.showContentArray[t]=!0}shouldNotDisplayImage(t){return t&&t.value&&t.value.length>0}getNestedValue(t,e){try{return"object"!=typeof t||null===t||"string"!=typeof e||""===e.trim()?void 0:e.split(".").reduce((t,e)=>{if(null==t||"object"!=typeof t)return;if(void 0!==t[e])return t[e];const n=Object.keys(t).find(t=>t.toLowerCase()===String(e).toLowerCase());return void 0!==n?t[n]:void 0},t)}catch(n){return}}extractKeysAndValues(t){const e=[],n=[],i={};try{return t.split("+").map(t=>t.trim()).forEach(t=>{if(t.startsWith('"')&&t.endsWith('"')){const n=t.match(/\"(.*?)\"/);n&&n[1]&&e.push(n[1].trim().replace(":","").replace("\\n",""))}else t&&n.push(t)}),e.forEach((t,e)=>{i[t]=n[e]||""}),i}catch(o){return i}}convertArrayToJsonObject(t){const e={};try{return t?(t.forEach(t=>{const n=null==t?void 0:t.key.split(".");let i=e;n.slice(0,-1).forEach(t=>{("object"!=typeof i[t]||null===i[t])&&(i[t]={}),i=i[t]}),i[n[n.length-1]]=null==t?void 0:t.value}),e):{}}catch(n){return e}}generateEditOptions(t,e,n){try{const o=[...this.currentApp.triggerEditOptions||[],...this.currentApp.additionalTriggerEditOptions||[]];for(const[r,s]of Object.entries(t)){let t=this.editOptions[s];if("string"==typeof t)try{t=JSON.parse(t)}catch(i){t=[]}this.editOptions[s]=Array.isArray(t)?t:[];let a=!1;e.forEach((t,e)=>{var i;const c=null===(i=t[r])||void 0===i?void 0:i.toString();if(void 0!==c){a||(this.editOptions[s]=[],a=!0);const t=c.split(/\s*,\s*/).filter(t=>t.length>0);let i=[];if(t.forEach(t=>{if("string"==typeof t&&t.toLowerCase().startsWith("literal:")){const e=t.slice(8).trim();return void(e&&i.push({type:"text",key:"",value:e}))}const r=this.getNestedValue(n[e],t);if(!(void 0!==r&&/^dummy( value| session name)?$/i.test(String(r))||null!==r&&"object"==typeof r))if(void 0!==r)i.push({type:"label",key:t,value:r,nodeIndex:e});else if(0===this.editOptions[s].length)for(const e of o)e.name===s&&(!0===e.required||"true"===e.required)&&i.push({type:"text",key:"",value:t})}),c.includes("+")&&0===i.length){const t=this.extractKeysAndValues(c);for(const[r,a]of Object.entries(t)){0===this.editOptions[s].length&&i.push({type:"text",key:"",value:r});const t=this.getNestedValue(n[e],String(a));if(void 0===t||null!==t&&"object"==typeof t){if(void 0===t&&0===this.editOptions[s].length)for(const t of o)t.name===s&&(!0===t.required||"true"===t.required)&&i.push({type:"text",key:"",value:r})}else i.push({type:"label",key:String(a),value:t,nodeIndex:e})}}this.editOptions[s]=this.editOptions[s].some(t=>"text"===t.type)?i:this.editOptions[s].concat(i)}})}return this.newEditOptions=(0,sv.cloneDeep)(this.editOptions),this.newTriggerDropDownData=(0,sv.cloneDeep)(this.triggerDropDownData),null}catch(o){return null}}getPreviousMapping(){this.editOptions=(0,sv.cloneDeep)(this.prevEditOptions),this.triggerDropDownData=(0,sv.cloneDeep)(this.prevTriggerDropDownData),this.disablePrevious=!0}getNewMapping(){this.editOptions=(0,sv.cloneDeep)(this.newEditOptions),this.triggerDropDownData=(0,sv.cloneDeep)(this.newTriggerDropDownData),this.disablePrevious=!1}getAIMapping(t,e=!1){var n,i,o;return(0,Jo.mG)(this,void 0,void 0,function*(){try{if(this.editOptions||(this.editOptions={}),this.aiMappingCheck=!0,this.firstTimeAIMapping=!1,this.aIMappingText="Map Again",this.disablePrevious=!1,this.testloader=!0,e||(this.prevEditOptions=(0,sv.cloneDeep)(this.editOptions),this.prevTriggerDropDownData=(0,sv.cloneDeep)(this.triggerDropDownData)),!e)for(const t of Object.keys(this.editOptions||{})){let e=this.editOptions[t];if("string"==typeof e)try{e=JSON.parse(e)}catch(r){continue}Array.isArray(e)&&e.some(t=>t&&"label"===t.type&&"dummy value"===t.value)&&(delete this.editOptions[t],delete this.triggerDropDownData[t])}const a=[...this.currentApp.triggerEditOptions||[],...this.currentApp.additionalTriggerEditOptions||[]];let c={},l=[],d=this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),u={};const p=[],h=[],g=t=>{let e=this.editOptions[t];if("string"==typeof e)try{e=JSON.parse(e)}catch(r){return null}return Array.isArray(e)?e:null},f=t=>{var e;const n=g(t);return!n||0===n.length||!0===(null===(e=n[0])||void 0===e?void 0:e.fallback)},m=a.map(t=>(0,Jo.mG)(this,void 0,void 0,function*(){var e,n,i,o,r,s,a,g,m,v,b,x;if("text"===t.type){if(!f(t.name))return void(u[t.label]="already set");c[t.label]=t.name,l.push(t.label),p.push({label:t.label,name:t.name,type:t.type,required:"true"===String(t.required),hint:t.label_help||t.placeholder||""})}else if("select"===t.type&&!t.changefunction&&(null===(e=t.options)||void 0===e?void 0:e.length)>0&&f(t.name)){if("true"===String(t.required)){let e=(null===(n=null==t?void 0:t.options[0])||void 0===n?void 0:n.value.toString())||"",a=(null===(i=null==t?void 0:t.options[0])||void 0===i?void 0:i.disp_val.toString())||"";a.includes("---Select---")&&(null===(o=t.options)||void 0===o?void 0:o.length)>1&&(e=(null===(r=null==t?void 0:t.options[1])||void 0===r?void 0:r.value.toString())||"",a=(null===(s=null==t?void 0:t.options[1])||void 0===s?void 0:s.disp_val.toString())||""),this.editOptions[t.name]=[{type:"text",key:"",value:e,display_value:a,fallback:!0}],this.triggerDropDownData[t.name]=e}else this.editOptions[t.name]&&delete this.editOptions[t.name];h.push({label:t.label,name:t.name,required:"true"===String(t.required),hint:t.label_help||"",options:(t.options||[]).slice(0,60).map(t=>{var e,n,i;return{value:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:""),label:String(null!==(i=null!==(n=null==t?void 0:t.disp_val)&&void 0!==n?n:null==t?void 0:t.value)&&void 0!==i?i:"")}})})}else if("select"===t.type&&t.changefunction&&f(t.name)){let e=Array.isArray(t.options)?t.options:[];if(0===e.length&&t.function)try{const n=yield this.editOptionsService.optionsSelectData(d,t.function,this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,this.triggerDropDownData).toPromise();Array.isArray(n)&&(e=n)}catch(_){console.warn("[AI mapping] could not load options for gating select",t.name,_)}e.length>0&&h.push({label:t.label,name:t.name,required:"true"===String(t.required),hint:t.label_help||"",gating:!0,options:e.slice(0,60).map(t=>{var e,n,i;return{value:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:""),label:String(null!==(i=null!==(n=null==t?void 0:t.disp_val)&&void 0!==n?n:null==t?void 0:t.value)&&void 0!==i?i:"")}})})}else if("select"===t.type&&t.function&&!t.changefunction&&f(t.name)){let e=yield this.editOptionsService.optionsSelectData(d,t.function,this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,this.triggerDropDownData).toPromise();if(Array.isArray(e)&&e.length>0){let n=(null===(a=e[0])||void 0===a?void 0:a.value.toString())||"",i=(null===(g=e[0])||void 0===g?void 0:g.disp_val.toString())||"";i.includes("---Select---")&&e.length>1&&(n=(null===(m=e[1])||void 0===m?void 0:m.value.toString())||"",i=(null===(v=e[1])||void 0===v?void 0:v.disp_val.toString())||""),"true"===String(t.required)?(this.editOptions[t.name]=[{type:"text",key:"",value:n,display_value:i,fallback:!0}],this.triggerDropDownData[t.name]=n):this.editOptions[t.name]&&delete this.editOptions[t.name],h.push({label:t.label,name:t.name,required:"true"===String(t.required),hint:t.label_help||"",options:e.slice(0,60).map(t=>{var e,n,i;return{value:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:""),label:String(null!==(i=null!==(n=null==t?void 0:t.disp_val)&&void 0!==n?n:null==t?void 0:t.value)&&void 0!==i?i:"")}})})}}else"select"===t.type&&(null===(b=this.editOptions[t.name])||void 0===b?void 0:b.length)>0&&(u[t.label]=null===(x=this.editOptions[t.name][0])||void 0===x?void 0:x.display_value)}));yield Promise.all(m);const v={outputFieldsArray:l,fieldMeta:p,selectChoices:h,workflowIntent:t||"",connectId:this.connectId,index:(null===(n=this.currentApp)||void 0===n?void 0:n.index)||(null===(i=this.connectList)||void 0===i?void 0:i.length)-1||1,feedbackFromCurrentStep:u};let b=this.connectList.map(t=>{var e,n;return this.convertArrayToJsonObject(null===(n=null===(e=null==t?void 0:t.sample_data)||void 0===e?void 0:e[0])||void 0===n?void 0:n.data)}
1),x=yield this.commonService.getAIMapping(v).toPromise().catch(t=>(console.warn("[AI mapping] request failed",t),null));if(Array.isArray(x)){const t=t=>{const e=String(t).toLowerCase(),n=Object.keys(c).find(t=>t.toLowerCase()===e);if(n)return n;const i=h.find(t=>String(t.label).toLowerCase()===e||String(t.name).toLowerCase()===e);if(i)return i.label;const o=p.find(t=>String(t.label).toLowerCase()===e||String(t.name).toLowerCase()===e);return o?o.label:t};x=x.map(e=>{const n={};return Object.entries(e||{}).forEach(([e,i])=>{n[t(e)]=i}),n})}let _=!1;if(Array.isArray(x)){this.generateEditOptions(c,x,b);try{const t=x.reduce((t,e)=>Object.assign(t,e||{}),{});h.forEach(e=>{if(!f(e.name))return;const n=t[e.label];if(null==n||""===n)return;let i=(e.options||[]).find(t=>String(t.value)===String(n)||String(t.label)===String(n));if(!i){const t=String(n);i=(e.options||[]).find(e=>String(e.value).startsWith(t)||t.startsWith(String(e.value)))}if(i&&(this.editOptions[e.name]=[{type:"text",key:"",value:i.value,display_value:i.label}],this.triggerDropDownData[e.name]=i.value,e.gating)){const t=[...this.currentApp.triggerEditOptions||[],...this.currentApp.additionalTriggerEditOptions||[]].find(t=>t&&t.name===e.name);if(t)try{this.callChangeFunction(t,1),_=!0}catch(o){console.warn("[AI mapping] changefunction failed for",e.name,o)}}})}catch(s){console.warn("[AI mapping] could not apply dropdown choices",s)}}else console.warn("Mapping is null due to an error.");if(_&&!e){for(let t=0;t<25;t++){const t=null===(o=this.currentApp)||void 0===o?void 0:o.additionalTriggerEditOptions;if(Array.isArray(t)&&t.length>0)break;yield new Promise(t=>setTimeout(t,400))}return yield new Promise(t=>setTimeout(t,1500)),void(yield this.getAIMapping(t,!0))}this.isReadyForContinue(),this.testloader=!1,setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)}catch(a){console.error("[AI mapping] getAIMapping failed",a),this.isReadyForContinue(),this.testloader=!1}})}isOptionSelected(t,e){return!(!this.editOptions||!this.editOptions[e]||!this.editOptions[e].find(e=>e.custom&&""===e.key?Array.isArray(e.value)&&e.value.some(e=>
1e.key===t.key&&e.value===t.value):void 0!==e.key&&void 0!==t.key&&e.key===t.key&&(e.value===t.value||null==e.value&&null==t.value||e.value===t.key&&(""===t.value||null==t.value))))}isOptionActive(t,e,n,i){var o,r,s,a,c,l,d,u;if(this.currentApp.editOptions&&this.currentApp.editOptions[e]){const h="string"==typeof(null===(o=this.currentApp)||void 0===o?void 0:o.editOptions[e])?this.currentApp.editOptions[e].trim():"";if(h.startsWith("{")&&h.endsWith("}")||h.startsWith("[")&&h.endsWith("]")){let o=[];try{o=JSON.parse(this.currentApp.editOptions[e])}catch(p){return!1}const r=this.selectedOptionIndex[n]===i,s=o.some(e=>e.display_value===t.disp_val);return r||s&&void 0===this.selectedOptionIndex[n]}if((null===(a=null===(s=null===(r=this.editOptions)||void 0===r?void 0:r[e])||void 0===s?void 0:s[0])||void 0===a?void 0:a.display_value)===(null==t?void 0:t.disp_val)&&(null===(c=this.editOptions[e])||void 0===c?void 0:c[0].value)===(null==t?void 0:t.value))return!0;if((null===(u=null===(d=null===(l=this.editOptions)||void 0===l?void 0:l[e])||void 0===d?void 0:d[0])||void 0===u?void 0:u[`${e}__disp`])===(null==t?void 0:t.disp_val))return!0}return this.isOptionSelected(t,e)}isValueSelectedFilterContinueIf(t,e,n,i){return this.ANDORFilter[e][n].keyData.some(e=>e.key===t.key&&e.nodeIndex===i&&(e.value===t.value||("object"==typeof e.value&&null!==e.value?JSON.stringify(e.value):e.value)===("object"==typeof t.value&&null!==t.value?JSON.stringify(t.value):t.value)))}isFilterTypeSelected(t,e,n){return this.ANDORFilter[t][e].filterType.some(t=>t.value===n)}isOptionOrValueSelected(t,e,n,i){return!(!this.dynamicAppField[e]||!this.dynamicAppField[e][n])&&this.dynamicAppField[e][n].value.some(e=>e.key===t.key&&e.value===t.value&&e.nodeIndex===i)}valueSumbitClick(t,e){document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")});const n=`${t}_${e}`;this.isContentEnable[n]=!0,this.isSubmitVisible[n]=!1,this.isAddedToSelect[n]=!0}valueSumbitClickForWebhooksByAutomate(t,e,n){document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")});const i=`${t}_${e}_${n}`;this.isContentEnable[i]=!0,this.isSubmitVisible[i]=!1,this.isAddedToSelect[i]=!0}valueSumbitClickForFilterByAutomate(t,e,n,i){document.querySelectorAll(".editoption-dropmenu").forEach(t=>{t&&t.classList.remove("active_menu")});const o=`${t}_${e}_${n}_${i}`;this.isContentEnable[o]=!0,this.isSubmitVisible[o]=!1,this.isAddedToSelect[o]=!0}closeSetup(){this.closeSetupOption.emit()}getGraphPath(t,e){let n=[],i=null==t?void 0:t.find(t=>t.id==e);for(;i&&((!i.headerName||!/^Flow(?:\s[1-9]|10)?$/.test(i.headerName))&&n.unshift(i),null!==i.parentId);)i=t.find(t=>t.id==i.parentId);return n}getAllChildIndices(t){const e=[t],n=[t];for(;n.length>0;){let t=n.shift(),i=this.connectList.find(e=>(null==e?void 0:e.index)==t);if(i&&i.childIndex&&i.childIndex.length>0)for(let o of i.childIndex)null!=o&&(e.push(o),n.push(o))}return e}reorderList(t,e){return t.filter(t=>void 0!==e.find(e=>(null==e?void 0:e.index)==t)).map(t=>e.find(e=>(null==e?void 0:e.index)==t))}toggleAdvancedMapping(){var t;this.isShowAdvancedMapping=!this.isShowAdvancedMapping,(null===(t=this.advancedMappingTooltipDir)||void 0===t?void 0:t.isOpen)&&(this.advancedMappingTooltipDir.hide(),setTimeout(()=>{var t;return null===(t=this.advancedMappingTooltipDir)||void 0===t?void 0:t.show()},0))}closeDynamicAppDropdownByCrossButton(t,e){const n=document.getElementById(t+"menu-drop-custom-dynamicApp"+e);if(n){n.setAttribute("class","formgroup editoption-dropmenu");const t=n.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}}closeDropdownByCrossButton(t,e="standard"){var n,i;if("filter"===e){const e=document.getElementById("menu-drop"+t);if(e){e.setAttribute("class","input-group formgroup editoption-dropmenu");const t=e.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const n=document.getElementById("onlyContinueif"+t);return n&&(n.classList.remove("open"),document.body.classList.remove("xl-overflow-hidden")),void(this.isOverlayOpenIf[t]=!1)}if("standard"===e){const e=document.getElementById("menu-drop"+t);if(e){e.classList.remove("active_menu");const t=e.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const n=document.getElementById("MultipleCustomEditor"+t);n&&n.classList.remove("open"),this.isOverlayOpen[t]=!1,document.body.classList.remove("xl-overflow-hidden");const i=String(t);document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenu"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenuMob"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenu_MoClass"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),this.choicesDropmenu&&this.choicesDropmenu[i]&&Object.keys(this.choicesDropmenu[i]).forEac
1h(e=>{this.choicesDropmenu[i][e]=!1;const n=this.calculateUniqueIndex(t,parseInt(e,10));this.isIconDown[n]=!1})}else{const e=document.getElementById("menu-drop-custom"+t);if(e){e.classList.remove("active_menu");const t=e.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const o=document.getElementById("Custom_value_Advanced"+t);o&&o.classList.remove("open");const r=document.getElementById("MultipleCustomEditor"+t);r&&r.classList.remove("open"),this.isOverlayOpenCustomAdvanced[t]=!1,document.body.classList.remove("xl-overflow-hidden");const s=String(t);null===(n=document.getElementById("menu-drop-custom"+t+"choices_dropmenu0"))||void 0===n||n.setAttribute("style","display:none;"),null===(i=document.getElementById("menu-drop-custom"+t+"custom_dropmenu0"))||void 0===i||i.setAttribute("style","display:none;"),this.choicesDropmenu&&this.choicesDropmenu[s]&&"object"==typeof this.choicesDropmenu[s]&&Object.keys(this.choicesDropmenu[s]).forEach(t=>{this.choicesDropmenu[s][t]=!1})}}closeDropdownAfterSelectionIfNotAdvanced(t,e="standard"){var n,i;if(!this.isShowAdvancedMapping)if("standard"===e){const e=document.getElementById("menu-drop"+t);if(e){e.classList.remove("active_menu");const t=e.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const n=document.getElementById("MultipleCustomEditor"+t);n&&n.classList.remove("open"),this.isOverlayOpen[t]=!1,document.body.classList.remove("xl-overflow-hidden");const i=String(t);document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenu"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenuMob"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),document.querySelectorAll(`[id*="menu-drop${i}choices_dropmenu_MoClass"]`).forEach(t=>{t instanceof HTMLElement&&(t.style.display="none")}),this.choicesDropmenu&&this.choicesDropmenu[i]&&Object.keys(this.choicesDropmenu[i]).forEach(e=>{this.choicesDropmenu[i][e]=!1;const n=this.calculateUniqueIndex(t,parseInt(e,10));this.isIconDown[n]=!1})}else{const e=document.getElementById("menu-drop-custom"+t);if(e){e.classList.remove("active_menu");const t=e.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const o=document.getElementById("Custom_value_Advanced"+t);o&&o.classList.remove("open");const r=document.getElementById("MultipleCustomEditor"+t);r&&r.classList.remove("open"),this.isOverlayOpenCustomAdvanced[t]=!1,document.body.classList.remove("xl-overflow-hidden");const s=String(t);null===(n=document.getElementById("menu-drop-custom"+t+"choices_dropmenu0"))||void 0===n||n.setAttribute("style","display:none;"),null===(i=document.getElementById("menu-drop-custom"+t+"custom_dropmenu0"))||void 0===i||i.setAttribute("style","display:none;"),this.choicesDropmenu&&this.choicesDropmenu[s]&&"object"==typeof this.choicesDropmenu[s]&&Object.keys(this.choicesDropmenu[s]).forEach(t=>{this.choicesDropmenu[s][t]=!1})}}closeDynamicAppDropdownAfterSelectionIfNotAdvanced(t,e){if(this.isShowAdvancedMapping)return;const n=document.getElementById(t+"menu-drop-custom-dynamicApp"+e);if(n){n.setAttribute("class","formgroup editoption-dropmenu");const t=n.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}}closeFilterDropdownAfterSelectionIfNotAdvanced(t,e){if(this.isShowAdvancedMapping)return;const n=document.getElementById("menu-drop"+t);if(n){n.setAttribute("class","input-group formgroup editoption-dropmenu");const t=n.querySelector(".choices-container");t&&(this.renderer.removeClass(t,"open-up"),this.renderer.removeClass(t,"open-down"))}const i=document.getElementById("onlyContinueif"+t);i&&(i.classList.remove("open"),document.body.classList.remove("xl-overflow-hidden")),this.isOverlayOpenIf[t]=!1}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(yo),o.Y36(wo.v),o.Y36(Fo),o.Y36(av),o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(mo.tT),o.Y36(ui.F0),o.Y36(di.eN))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-app-edit-options"]],viewQuery:function(t,e){if(1&t&&(
1o.Gf(uv,5,tr),o.Gf(pv,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.advancedMappingTooltipDir=t.first),o.iGM(t=o.CRH())&&(e.chatMessagesContainer=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("paste",function(t){return e.onPaste(t)})("click",function(t){return e.handleClickOutside(t)},!1,o.evT)},inputs:{currentApp:"currentApp",translation:"translation",nodeType:"nodeType",isTemplate:"isTemplate",singleClickTemplate:"singleClickTemplate",connectId:"connectId",warningInfo:"warningInfo",connectList:"connectList",isActionFailed:"isActionFailed",actionFailedIndex:"actionFailedIndex",actionFailedData:"actionFailedData",actionData:"actionData",isSetUpOption:"isSetUpOption"},outputs:{selectedApp:"selectedApp",beforeOptionsChange:"beforeOptionsChange",updateTestMode:"updateTestMode",closeSetupOption:"closeSetupOption"},decls:2,vars:2,consts:[["class","app-app-edit-options bg-white chooseapps p-0 d-flex flex-column",4,"ngIf"],[4,"ngIf"],[1,"app-app-edit-options","bg-white","chooseapps","p-0","d-flex","flex-column"],["class","align-items-center d-flex gap-3 info-wrap justify-content-between flex-shrink-0  w-100",4,"ngIf"],[1,"choose-trigger-event","scrollheight"],[1,"guide-flex","flex-wrap","gap-2"],[1,"d-flex","align-items-center","gap-2","flex-wrap"],["class","d-flex align-items-center gap-0","style","border-bottom: 2px solid #e0e0e0;",4,"ngIf"],["aria-hidden","true","aria-label","incomplate","class","icon-alertcirclefill",4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],["advancedMappingTooltip",""],["type","button","placement","top",1,"btn","advanced-mapping-btn",3,"tooltip","ngClass","click"],["advancedMappingBtn",""],[1,"advanced-mapping-btn__label"],["class","d-flex align-items-center gap-2",4,"ngIf"],["class","alert-ai mb-4",4,"ngIf"],["class","col-xs-12 push-5-t",4,"ngIf"],[1,"search-container","mb-3"],["for","setup-fields-search",1,"search-container__label"],[1,"search-container__label-text"],[1,"search-container__hint"],[1,"search-container__input-wrap"],["aria-hidden","true",1,"search-container__icon"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 20 20","fill","none","focusable","false"],["d","M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["d","M17.5 17.5L13.9166 13.9166","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["id","setup-fields-search","type","search","placeholder","Search variables (e.g Email, name, key)","autocomplete","off",1,"form-control","search-container__input",3,"value","input"],["id","aside_step_guide","class","aside-step-guide",4,"ngIf"],["class","ai-chat-container mb-4","style","border: 1px solid #e0e0e0; border-radius: 8px; padding: 16px; background: #ffffff; max-height: 500px; display: flex; flex-direction: column;",4,"ngIf"],["id","alert-danger-dismissible-fade-show-position-relative-pr-3-error_continue","role","alert","hidden","",1,"alert","alert-danger","alert-dismissible","fade","show","position-relative","pr-3","error_continue"],["type","button","data-bs-dismiss","alert","aria-label","Close",1,"btn_close"],["aria-hidden","true",1,"fa","fa-times"],["class","emailus-now mar-10-b mar-10-t",4,"ngIf"],["class","flex-shrink-0 continue w-before",4,"ngIf"],[1,"align-items-center","d-flex","gap-3","info-wrap","justify-content-between","flex-shrink-0","w-100"],[1,"theme-color","fw-semibold","mb-0"],[1,"btn","bg-transparent","border-0","p-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","25","viewBox","0 0 24 25","fill","none"],["d","M18 6.5L6 18.5M6 6.5L18 18.5","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"d-flex","align-items-center","gap-0",2,"border-bottom","2px solid #e0e0e0"],["type","button",2,"padding","8px 20px","border","none","background","transparent","cursor","pointer","font-size","14px","transition","all 0.2s","margin-bottom","-2px",3,"click"],["aria-hidden","true","aria-label","incomplate",1,"icon-alertcirclefill"],["aria-hidden","true",1,"fa","fa-exclamation-circle","fa-fw","fa-lg"],["tooltip","Undo AI Mapping","class","btn undo-btn px-1",3,"disabled","click",4,"ngIf"],["tooltip","Redo AI Mapping","class","btn undo-btn px-1",3,"disabled","click",4,"ngIf"],["type","button","tooltip","Map fields using AI","class","btn ai_mapping","id","ai_mapping",3,"click",4,"ngIf"],["type","button","id","step_guide_Btn","tooltip","Guide","placement","top",1,"btn","step_guide",3,"click"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],["tooltip","Undo AI Mapping",1,"btn","undo-btn","px-1",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M7.50065 11.6668L3.33398 7.50016L7.50065 3.3335","stroke","#B8B8B8","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["d","M3.33398 7.5H12.084C12.6859 7.5 13.2819 7.61855 13.8379 7.84889C14.394 8.07922 14.8993 8.41682 15.3249 8.84243C15.7505 9.26803 16.
10881 9.77329 16.3184 10.3294C16.5488 10.8854 16.6673 11.4814 16.6673 12.0833C16.6673 12.6852 16.5488 13.2812 16.3184 13.8373C16.0881 14.3934 15.7505 14.8986 15.3249 15.3242C14.8993 15.7498 14.394 16.0874 13.8379 16.3178C13.2819 16.5481 12.6859 16.6667 12.084 16.6667H9.16732","stroke","#B8B8B8","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["tooltip","Redo AI Mapping",1,"btn","undo-btn","px-1",3,"disabled","click"],["d","M12.5 11.6668L16.6667 7.50016L12.5 3.3335","stroke","#B8B8B8","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["d","M16.6673 7.5H7.91732C6.70174 7.5 5.53595 7.98289 4.67641 8.84243C3.81687 9.70197 3.33398 10.8678 3.33398 12.0833C3.33398 12.6852 3.45254 13.2812 3.68287 13.8373C3.9132 14.3934 4.25081 14.8986 4.67641 15.3242C5.53595 16.1838 6.70174 16.6667 7.91732 16.6667H10.834","stroke","#B8B8B8","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["type","button","tooltip","Map fields using AI","id","ai_mapping",1,"btn","ai_mapping",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 18 18","fill","none"],["d","M9 2.25L7.566 6.60975C7.49261 6.83288 7.36785 7.03566 7.20175 7.20175C7.03566 7.36785 6.83288 7.49261 6.60975 7.566L2.25 9L6.60975 10.434C6.83288 10.5074 7.03566 10.6322 7.20175 10.7982C7.36785 10.9643 7.49261 11.1671 7.566 11.3903L9 15.75L10.434 11.3903C10.5074 11.1671 10.6322 10.9643 10.7982 10.7982C10.9643 10.6322 11.1671 10.5074 11.3903 10.434L15.75 9L11.3903 7.566C11.1671 7.49261 10.9643 7.36785 10.7982 7.20175C10.6322 7.03566 10.5074 6.83288 10.434 6.60975L9 2.25Z","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M3.75 2.25V5.25","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M14.25 12.75V15.75","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M2.25 3.75H5.25","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M12.75 14.25H15.75","stroke","white","stroke-linecap","round","stroke-linejoin","round"],[1,"alert-ai","mb-4"],[1,"mb-0",2,"font-size","12px"],[1,"col-xs-12","push-5-t"],[1,"connect-directions"],[1,"table-wrapper","fill"],[1,"table-cell","pad-10-r","pad-10-b"],["type","text","readonly","","name","ipnURL","id","ipnURLSyncData",1,"form-control","pad-10","heightAuto",3,"value"],[1,"table-cell","pad-10-r","pad-10-b","vcenter"],[1,"btn","btn-default",3,"innerHTML","click"],["id","aside_step_guide",1,"aside-step-guide"],[1,"guide-menu"],[1,"mar-0-l"],["type","button","title","Close Guide",1,"btn","closebtn-guide",3,"click"],["aria-hidden","true",1,"fa","fa-times-circle-o","fa-fw","fa-lg"],[1,"scroll-guide"],[1,"guide-data"],["class","step-listing mar-15-t",4,"ngIf"],[1,"example"],[1,"icon_exmpl"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"exmpl-desc"],["class","example",4,"ngIf"],[1,"screenshot_img"],["src","/assets/images/img_guide_05.png","alt","img_guide_05"],["class","screenshot_img",4,"ngIf"],[1,"step-listing","mar-15-t"],["src","/assets/images/img_guide_03.png","alt","img_guide_03"],[1,"action-selector"],[1,"radio","radio-active","iot"],[1,"text_download"],[1,"iot-icon"],[1,"si","si-badge"],[1,"text_download_content"],[1,"action-name","ng-binding"],[1,"help-text","ng-binding"],[1,"text_download_btn"],["type","button","download","",1,"btn","btn-sm",3,"href"],[1,"si","si-key"],[1,"si","si-reload"],[1,"si","si-settings"],["class","multiple-menu",4,"ngFor","ngForOf"],["class","Mobile-dropdownMenu",4,"ngIf"],[1,"multiple-menu"],["class","form-check mar-10-b",4,"ngIf"],[1,"form-check","mar-10-b"],[1,"editoption"],[3,"id"],["class","optional",4,"ngIf"],["class","required",4,"ngIf"],["class","menu",3,"id","click",4,"ngIf"],[1,"overlay-custom-mobile",3,"id","click"],[1,"custom-editor-mobile-menu",3,"click"],[1,"d-flex","gap-2","gap-md-3","align-items-center","choices-search"],[1,"NewOption_1","flex-fill"],[1,"svg-icon","svg-icon--search","choices-search__search-icon"],["d","M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M17.5 17.5L13.9166 13.9166","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["placeholder","Search...","type","text",1,"formcontrol","bg-white",3,"value","keyup"],[1,"d-flex","align-items-center","gap-2","optionMenu-info","p-2"],["type","button","data-tooltip","Refresh Data",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["src","/assets/images/refresh-icon.svg","alt","refresh","width","18","height","18"],["type","button","data-tooltip","Clear Selection","id","'2",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["src","/assets/images/delete-icon.svg","alt","delete","width","20","height","20"],["type","button","data-tooltip","Use a Custom Value (Advance)",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center","tooltip-placement-start",3,"click"],["src","/assets/images/custom-icon.svg","alt","custom","width","18","height","18"],[3,"click",4,"ngIf"],["id","Custom_value_Advanced","style","width: 100%;",4,"ngIf"],["class","formgroup editoption-dropmenu c MobileClass-2",3,"ngClass","id",4,"ngIf"],["class","overlay-custom-mobile multipleMenu",3,"id","click",4,"ngIf"],["id","firebaseDynamic",4,"ngIf"],["id","firebaseDynamicIf",4,"ngIf"],["id","duplicateColume_mob_menu","class","w-100 c",4,"ngIf"],["class","input-button text-right w-100",4,"ngIf"],[1,"user-text",3,"innerHTML"],[1,"optional"],[1,"required"],[1,"menu",3,"id","click"],["type","text","autocomplete","off","value","","hidden","",1,"form-control","hide",3,"name","id","placeholder"],["class","selected_value","id","selected_value",4,"ngIf"],[1,"menu_icon-box",3,"click"],[1,"menu_icon"],["malihuscrollbar","","id","12345",1,"menu_dropdown","scrollheight","_mCustomScrollbar","hide_mCS_3","_mCS_no_scrollbar"],["type","button","data-tooltip","Clear Selection","id","1",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["id","selected_value",1,"selected_value"],["class","selectedname selected-itemdropdwn",3,"id",4,"ngFor","ngForOf"],[1,"selectedname","selected-itemdropdwn",3,"id"],[1,"imgapps-icon","slack32x32"],[1,"choice-label"],["type","button","class","read-more-button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-close","btn-sm",3,"click"],[1,"fa","fa-close"],["type","button",1,"read-more-button",3,"click"],["class","menu_dropdown-option ps-25","id","new12","id","single-dropdown",3,"color","active","value","click",4,"ngFor","ngForOf"],["id","new12","id","single-dropdown",1,"menu_dropdown-option","ps-25",3,"value","click"],["class","menu_dropdown-option ps-25",3,"color","active","value","click",4,"ngFor","ngForOf"],[1,"menu_dropdown-option","ps-25",3,"value","click"],[1,"menu_icon-box"],["malihuscrollbar","",1,"menu_dropdown","scrollheight","mCustomScrollbar","_mCS_3","mCS_no_scrollbar","checkClass-1"],[1,"NewOption_2","flex-fill"],["placeholder","Search...","type","text",1,"formcontrol",3,"value","click","keyup"],["type","button","data-tooltip","Clear Selection","id","'3",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["class","menu_dropdown-option col-md-12","style","display: inline-flex;",3,"color","value","active",4,"ngFor","ngForOf"],["type","button","class","btn",3,"click",4,"ngIf"],["type","button",1,"btn",3,"click"],[1,"menu_dropdown-option","col-md-12",2,"display","inline-flex",3,"value"],[1,"col-md-10",3,"click"],[1,"col-md-2"],["type","button",1,"btn","p-0","fs-5",2,"float","right",3,"click"],[3,"click"],[1,"CloseMenu_dropdown","flex-fill","d-flex","align-items-start","justify-content-between"],["class","drop-subheading",4,"ngIf"],["type","button","class","btn btn-closeMenu",3,"click",4,"ngIf"],[1,"position-relative","d-flex","align-items-center","gap-2"],["class","position-relative topSearch",4,"ngIf"],["data-tooltip","Add Space in-between values","type","button",1,"btn","space_Button","custom-options-tooltip","add-space-tooltip",3,"ngClass"],["xmlns","http://www.w3.org/2000/svg","width","16","height","4","viewBox","0 0 16 4","fill","none"],["d","M2 0.75V2.25H14V0.75C14 0.335786 14.3358 0 14.75 0C15.1642 0 15.5 0.335786 15.5 0.75V2.25C15.5 3.07843 14.8284 3.75 14 3.75H2C1.17157 3.75 0.500001 3.07843 0.500001 2.25V0.75C0.500001 0.335786 0.835788 0 1.25 0C1.66422 0 2 0.335786 2 0.75Z","fill","CurrentColor"],["type","button","data-tooltip","Clear Selection","id","3",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],[1,"drop-subheading"],["type","button",1,"btn","btn-closeMenu",3,"click"],[1,"position-relative","topSearch"],["id","Custom_value_Advanced",2,"width","100%"],[1,"formgroup","editoption-dropmenu","d","MobileClass-1",3,"id"],[1,"pretty-text-box"],["type","text","hidden","",1,"form-control","hide",3,"value","name","id","placeholder"],["id","dataToSave","spellcheck","fal
1se","contenteditable","false",1,"form-control"],["id","scrollhorz",1,"widthpre"],["contenteditable","true","class","form-control checkIfNotBlurAfteraWhile","spellcheck","false","aria-placeholder","+ Add or Select",3,"click","blur","keyup",4,"ngIf"],["malihuscrollbar","",1,"choices-container","scrollheight",3,"id"],["id","ww",1,"choices-search","NewOption_3"],["data-tooltip","Add Space in-between values","type","button",1,"btn","space_Button","custom-options-tooltip","add-space-tooltip",3,"ngClass","click"],[1,"choice-head"],["class","samlpe-title",4,"ngFor","ngForOf"],["class","overlay-custom-mobile",3,"id","click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"selected_item_repaet",3,"ngClass"],["class","whitespace-to-addinputbox top-4",3,"click",4,"ngIf"],["class","position-relative text-type readmorebutton1",3,"ngClass",4,"ngIf"],["class","inline-label",4,"ngIf"],["class","space-wrap","id","SpaceWrap_1",4,"ngIf"],["class","whitespace-to-addinputbox",3,"click",4,"ngIf"],[1,"whitespace-to-addinputbox","top-4",3,"click"],[1,"position-relative","text-type","readmorebutton1",3,"ngClass"],["class","",3,"click",4,"ngIf"],["contenteditable","true","class","contenteditable6","placeholder","Click to enter custom value",3,"id","blur","keyup","click","mouseleave",4,"ngIf"],["class","readmore_text",3,"click",4,"ngIf"],["class","btn custom-val-add","type","button",3,"click",4,"ngIf"],["type","button","id","12345","class","btn btn-close btn-sm",3,"click",4,"ngIf"],[1,"",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","8","height","8","viewBox","0 0 8 8","fill","none"],["d","M0.5 4H7.5M4 0.5V7.5","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable6",3,"id","blur","keyup","click","mouseleave"],[1,"readmore_text",3,"click"],["type","button",1,"btn","custom-val-add",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","11","height","12","viewBox","0 0 11 12","fill","none"],["d","M10 3L4 9","stroke","#2CBC40","stroke-linecap","round","stroke-linejoin","round"],["d","M2 7L4 9","stroke","#2CBC40","stroke-linecap","round","stroke-linejoin","round"],["type","button","id","12345",1,"btn","btn-close","btn-sm",3,"click"],[1,"inline-label"],[1,"choice-label",3,"click"],["type","button","id","close2",1,"btn","btn-close","btn-sm",3,"click"],["id","SpaceWrap_1",1,"space-wrap"],["contenteditable","true","placeholder","Space",1,"space-text"],["type","button",1,"btn"],["d","M8 3L2 9","stroke","#D74949","stroke-linecap","round","stroke-linejoin","round"],["d","M2 3L8 9","stroke","#D74949","stroke-linecap","round","stroke-linejoin","round"],[1,"whitespace-to-addinputbox",3,"click"],["contenteditable","true","spellcheck","false","aria-placeholder","+ Add or Select",1,"form-control","checkIfNotBlurAfteraWhile",3,"click","blur","keyup"],["placeholder","Search...","type","text",1,"formcontrol",3,"value","keyup"],[1,"samlpe-title"],["href","javascript:void(0);","class","choice cls dis-b","id","choiceBtnShowHidedrop",3,"click",4,"ngIf"],["multiple","multiple",1,"choices",3,"id"],["href","javascript:void(0);","id","choiceBtnShowHidedrop",1,"choice","cls","dis-b",3,"click"],["class","imgapps-icon mar-10-r gmail32x32",3,"background-image",4,"ngIf"],[1,"mar-5-r","m-auto-l","icon-bold"],[3,"ngClass"],[1,"imgapps-icon","mar-10-r","gmail32x32"],["class","menu_dropdown-option choice","id","111","id","Id1a",3,"active","click",4,"ngFor","ngForOf"],["id","111","id","Id1a",1,"menu_dropdown-option","choice",3,"click"],["class","imgapps-icon gmail32x32",3,"background-image",4,"ngIf"],[1,"imgapps-icon","gmail32x32"],[1,"CustomAdvanced-wrap"],["id","rr",1,"choices-search","NewOption_3"],["class","menu_dropdown-option choice","id","Id1a",3,"active","click",4,"ngFor","ngForOf"],["id","Id1a",1,"menu_dropdown-option","choice",3,"click"],[1,"formgroup","editoption-dropmenu","c","MobileClass-2",3,"ngClass","id"],["class","json-editor-header",4,"ngIf"],["class","system-prompt-container","placeholder","Please enter System Prompt",4,"ngIf"],["class","pretty-text-box",4,"ngIf"],[1,"choices-search","NewOption_4"],["class","samlpe-title","id","drop1",4,"ngFor","ngForOf"],[1,"json-editor-header"],[1,"jeh-left"],[1,"fa","fa-code"],["class","jeh-status jeh-valid",4,"ngIf"],["class","jeh-status jeh-invalid",4,"ngIf"],["class","jeh-status jeh-empty",4,"ngIf"],["type","button","class","jeh-format",3,"click",4,"ngIf"],["type","button","class","jeh-clear","title","Clear JSON body",3,"click",4,"ngIf"],[1,"jeh-status","jeh-valid"],[1,"fa","fa-check-circle"],[1,"jeh-status","jeh-invalid"],[1,"fa","fa-exclamation-circle"],[1,"jeh-status","jeh-empty"],["type","button",1,"jeh-format",3,"click"],[1,"fa","fa-magic"],["type","button","title","Clear JSON body",1,"jeh-clear",3,"click"],[1,"fa","fa-tras
1h-o"],["placeholder","Please enter System Prompt",1,"system-prompt-container"],["hidden","",1,"form-control","hide",3,"type","value","name","id","placeholder"],["contenteditable","true","class","form-control checkIfNotBlurAfteraWhile","spellcheck","false","aria-placeholder","+ Add or Select",3,"blur","click","keyup",4,"ngIf"],[1,"selected_item_repaet",3,"ngClass","id","click"],["class","position-relative text-type readmorebutton2",3,"ngClass",4,"ngIf"],["class","space-wrap",3,"id",4,"ngIf"],[1,"position-relative","text-type","readmorebutton2",3,"ngClass"],["contenteditable","true","class","contenteditable6","placeholder","Click to enter custom value",3,"id","innerHTML","blur","keyup","mouseup","mouseleave","click",4,"ngIf"],["contenteditable","true","class","contenteditable6","placeholder","Click to enter custom value",3,"id","innerHTML","blur","keyup","mouseup","click","mouseleave",4,"ngIf"],["type","button","class","btn btn-close btn-sm",3,"click",4,"ngIf"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable6",3,"id","innerHTML","blur","keyup","mouseup","mouseleave","click"],["class","placeholder-text",4,"ngIf"],[1,"placeholder-text"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable6",3,"id","innerHTML","blur","keyup","mouseup","click","mouseleave"],[1,"space-wrap",3,"id"],["class","space-item",4,"ngFor","ngForOf"],[1,"space-item"],["contenteditable","true","spellcheck","false","aria-placeholder","+ Add or Select",1,"form-control","checkIfNotBlurAfteraWhile",3,"blur","click","keyup"],["id","drop1",1,"samlpe-title"],["href","javascript:void(0);","class","choice cls dis-b",3,"id","click",4,"ngIf"],["class","menu_dropdown-option choice","id","Id11b",3,"active","click",4,"ngFor","ngForOf"],["href","javascript:void(0);",1,"choice","cls","dis-b",3,"id","click"],["id","Id11b",1,"menu_dropdown-option","choice",3,"click"],[1,"overlay-custom-mobile","multipleMenu",3,"id","click"],[1,"choic"],["class","menu_dropdown-option choice","id","Id11a",3,"active","click",4,"ngFor","ngForOf"],["id","Id11a",1,"menu_dropdown-option","choice",3,"click"],["id","firebaseDynamic"],["class","add-or-itemsgorp mar-15-b clearfix",3,"id",4,"ngFor","ngForOf"],[1,"add-or-itemsgorp","mar-15-b","clearfix",3,"id"],["class","optional orcontinue",4,"ngIf"],["class","filterlisting",4,"ngFor","ngForOf"],["role","toolbar","aria-label","Toolbar with button groups",1,"btn-toolbar","mar-15-t"],["role","group","aria-label","First group",1,"btn-group","mr-2",3,"click"],["type","button",1,"btn","btn-default","btn-secondary"],["class","btn-group ms-2","role","group","aria-label","Third group",3,"click",4,"ngIf"],[1,"col-xs-12","col-sm-12"],[1,"optional","orcontinue"],[1,"text-danger","font-w300","ng-binding"],[1,"filterlisting"],[1,"input-group","formgroup","editoption-dropmenu-only-continue-if","MobileClass-3",3,"id"],["id","dataToSave","spellcheck","false",1,"form-control"],[1,"choices-search","NewOption_5"],[1,"input-group","menu-only-continue-if",3,"id","click"],["class","selected_value choose-condition","id","selected_value",4,"ngIf"],["malihuscrollbar","",1,"menu_dropdown","scrollheight","mCustomScrollbar","_mCS_3","mCS_no_scrollbar","checkClass-2"],[1,"NewOption_6","flex-fill"],["type","button","data-tooltip","Clear Selection","id","5",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["class","input-group",4,"ngIf"],["class","remove_btnclose",4,"ngIf"],["class","position-relative text-type readmorebutton3",3,"ngClass",4,"ngIf"],["class","space-wrap","id","SpaceWrap_3",4,"ngIf"],[1,"position-relative","text-type","readmorebutton3",3,"ngClass"],[1,"selectedname","selected-itemdropdwn"],["id","SpaceWrap_3",1,"space-wrap"],["class","menu_dropdown-option choice","id","Id18",3,"active","click",4,"ngFor","ngForOf"],[1,"mar-5-r","m-auto-l","icon-bold",3,"id"],["id","Id18",1,"menu_dropdown-option","choice",3,"click"],["id","selected_value",1,"selected_value","choose-condition"],["class","selectedname selected-itemdropdwn",3,"id",4,"ngIf"],["class","menu_dropdown-option ps-25",3,"active","value","click",4,"ngFor","ngForOf"],[1,"input-group"],["type","text",1,"menu-only-continue-if",3,"ngModel","value","ngModelChange","blur"],[1,"remove_bt
1nclose"],["type","button",1,"btn","btn-default","btn-danger","remove",3,"click"],[1,"fa","fa-times"],["role","group","aria-label","Third group",1,"btn-group","ms-2",3,"click"],["id","firebaseDynamicIf"],["class","mo-continueif-repeatitem",3,"id",4,"ngFor","ngForOf"],[1,"mo-continueif-repeatitem",3,"id"],[1,"",3,"id"],[1,"overlay-custom-mobile","only-continue-if",3,"id","click"],[1,"connect-fieled"],[1,"overlay-custom-mobile","single-only-continue-if",3,"id","click"],[1,"menu-only-continue-if-item",3,"id","click"],[1,"menu_dropdown-mo"],["type","button","data-tooltip","Refresh Data",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center"],["type","button","data-tooltip","Clear Selection",1,"border","btn","p-1","rounded-circle","text-center","custom-options-tooltip","d-flex","align-items-center","justify-content-center",3,"click"],["id","duplicateColume_mob_menu",1,"w-100","c"],["class","datafirebase",4,"ngFor","ngForOf"],[1,"datafirebase"],[1,"input"],["type","text",1,"form-control",3,"value","keyup"],[1,"input","formgroup","editoption-dropmenu","MobileClass-4",3,"id"],["id","dataToSave",1,"form-control"],["id","scrollhorz_3",1,"widthpre"],["contenteditable","true","class","form-control checkIfNotBlurAfteraWhile","spellcheck","false","aria-placeholder","+ Add or Select",3,"blur","keyup","click",4,"ngIf"],[1,"choices-search","NewOption_7"],["class","input-button text-center",4,"ngIf"],["class","position-relative text-type readmorebutton4",3,"ngClass",4,"ngIf"],["class","space-wrap","id","SpaceWrap_4",4,"ngIf"],[1,"position-relative","text-type","readmorebutton4",3,"ngClass"],["id","SpaceWrap_4",1,"space-wrap"],["contenteditable","true","spellcheck","false","aria-placeholder","+ Add or Select",1,"form-control","checkIfNotBlurAfteraWhile",3,"blur","keyup","click"],["class","menu_dropdown-option choice","id","Id1d",3,"active","click",4,"ngFor","ngForOf"],["id","Id1d",1,"menu_dropdown-option","choice",3,"click"],[1,"input-button","text-center"],["type","button",1,"btn","btn-default","btn-danger","remove","white-close",3,"click"],[1,"fa","fa-close","fa-fw"],[1,"input-button","text-right","w-100"],["type","button","id","buttonplus",1,"btn","btn-default","button-plus","clone",3,"click"],[1,"fa","fa-plus","fa-fw"],[1,"Mobile-dropdownMenu"],["class","dropdownMenu-repeat",3,"click",4,"ngFor","ngForOf"],[1,"dropdownMenu-repeat",3,"click"],["class","menu chremdjm",3,"id","click",4,"ngIf"],["style","width: 100%;",4,"ngIf"],["class","formgroup editoption-dropmenu a MobileClass-6",3,"ngClass","id",4,"ngIf"],["id","duplicateColume","class","w-100",4,"ngIf"],[1,"overlay-custom-mobile","repaetbox",3,"id","click"],["class","menu--",3,"id","click",4,"ngIf"],["class","ItemClass_1",3,"ngClass","id",4,"ngIf"],["id","duplicateColume","class","ItemClass_2 w-100",4,"ngIf"],[1,"menu","chremdjm",3,"id","click"],["type","text","autocomplete","off","value","",1,"form-control","hide",3,"name","id","placeholder"],["malihuscrollbar","",1,"menu_dropdown","scrollheight","mCustomScrollbar","_mCS_3","mCS_no_scrollbar","checkClass-3"],[1,"NewOption_8","flex-fill"],["type","button","id","0987654",1,"btn","btn-close","btn-sm",3,"click"],["class","menu_dropdown-option ps-25","id","'23",3,"active","value","click",4,"ngFor","ngForOf"],["id","'23",1,"menu_dropdown-option","ps-25",3,"value","click"],[2,"width","100%"],[1,"formgroup","editoption-dropmenu","b","MobileClass-5",3,"id"],[1,"choices-search","NewOption_9"],["class","choice-head",4,"ngIf"],["class","position-relative text-type",3,"ngClass",4,"ngIf"],["class","space-wrap","id","SpaceWrap_5",4,"ngIf"],[1,"position-relative","text-type",3,"ngClass"],["contenteditable","true","class","text-truncate maxwidth","placeholder","Click to enter custom value",3,"id","blur","click","keyup",4,"ngIf"],["type","button","id","remove","class","btn btn-close btn-sm",3,"click",4,"ngIf"],["contenteditable","true","placeholder","Click to enter custom value",1,"text-truncate","maxwidth",3,"id","blur","click","keyup"],["type","button","id","remove",1,"btn","btn-close","btn-sm",3,"click"],["id","SpaceWrap_5",1,"space-wrap"],["class","menu_dropdown-option choice","id","Id1c",3,"active","click",4,"ngFor","ngForOf"],["id","Id1c",1,"menu_dropdown-option","choice",3,"click"],[1,"formgroup","editoption-dropmenu","a","MobileClass-6",3,"ngClass","id"],["id","dataToSave","spellcheck","fal
1se","contenteditable","false",1,"form-control",3,"click"],["contenteditable","true","class","form-control checkIfNotBlurAfteraWhile contenteditable6","spellcheck","false","aria-placeholder","+ Add or Select ",3,"ngClass","blur","keyup","click",4,"ngIf"],[1,"choices-search","NewOption_10"],["class","whitespace-to-addinputbox","id","prblm",3,"click",4,"ngIf"],["class","space-wrap","id","SpaceWrap_6",4,"ngIf"],["contenteditable","true","class","contenteditable6","placeholder","Click to enter custom value",3,"id","blur","keyup","mouseup","mouseleave","click",4,"ngIf"],["type","button","id","close3","class","btn btn-close btn-sm",3,"click",4,"ngIf"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable6",3,"id","blur","keyup","mouseup","mouseleave","click"],["type","button","id","close3",1,"btn","btn-close","btn-sm",3,"click"],["type","button","id","close1",1,"btn","btn-close","btn-sm",3,"click"],["id","prblm",1,"whitespace-to-addinputbox",3,"click"],["id","SpaceWrap_6",1,"space-wrap"],["contenteditable","true","spellcheck","false","aria-placeholder","+ Add or Select ",1,"form-control","checkIfNotBlurAfteraWhile","contenteditable6",3,"ngClass","blur","keyup","click"],["class","menu_dropdown-option choice","id","Id12-M",3,"active","click",4,"ngFor","ngForOf"],["id","Id12-M",1,"menu_dropdown-option","choice",3,"click"],["id","duplicateColume",1,"w-100"],[1,"input","formgroup","editoption-dropmenu","MobileClass-7",3,"id"],["id","dataToSave","contenteditable","false",1,"form-control"],["id","scrollhorz_2",1,"widthpre"],[1,"choices-search","NewOption_11"],["class","space-wrap","id","SpaceWrap_7",4,"ngIf"],["contenteditable","true","class","contenteditable","placeholder","Click to enter custom value",3,"id","blur","mouseleave","click","keyup",4,"ngIf"],["contenteditable","true","class","contenteditable","placeholder","Click to enter custom value",3,"id","blur","mouseleave","keyup","click",4,"ngIf"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable",3,"id","blur","mouseleave","click","keyup"],["contenteditable","true","placeholder","Click to enter custom value",1,"contenteditable",3,"id","blur","mouseleave","keyup","click"],["id","SpaceWrap_7",1,"space-wrap"],["class","menu_dropdown-option choice","id","Id15",3,"active","click",4,"ngFor","ngForOf"],["id","Id15",1,"menu_dropdown-option","choice",3,"click"],[1,"menu--",3,"id","click"],[1,"menu_dropdown-kk"],["class","menu_dropdown-option ps-25","id","number1",3,"active","value","click",4,"ngFor","ngForOf"],["id","number1",1,"menu_dropdown-option","ps-25",3,"value","click"],[1,"formgroup","editoption-dropmenu","MobileClass-5","vk",3,"id"],["contenteditable","true","class","form-control checkIfNotBlurAfteraWhile","spellcheck","false","aria-placeholder","+ Add or Select",3,"blur","keyup",4,"ngIf"],[1,"choices-container-",3,"id"],["class","space-wrap","id","SpaceWrap_8",4,"ngIf"],["contenteditable","true",1,"text-truncate","maxwidth",3,"id","blur","keyup"],["id","SpaceWrap_8",1,"space-wrap"],["contenteditable","true","spellcheck","false","aria-placeholder","+ Add or Select",1,"form-control","checkIfNotBlurAfteraWhile",3,"blur","keyup"],["class","menu_dropdown-option choice","id","Id1b",3,"active","click",4,"ngFor","ngForOf"],["id","Id1b",1,"menu_dropdown-option","choice",3,"click"],[1,"ItemClass_1",3,"ngClass","id"],["href","javascript:void(0);","class","choice cls dis-b","id","choiceBtnShowHidedrop_id",3,"click",4,"ngIf"],["class","menu_dropdown-option choice","id","Id12",3,"active","click",4,"ngFor","ngForOf"],["href","javascript:void(0);","id","choiceBtnShowHidedrop_id",1,"choice","cls","dis-b",3,"click"],["id","Id12",1,"menu_dropdown-option","choice",3,"click"],["id","duplicateColume",1,"ItemClass_2","w-100"],[1,"dynamicAppMo-box"],[1,"ItemClass_dynamic",3,"id"],["id","dataToSave","contenteditable","false",1,"form-control",3,"click"],["id","scrollhorz+1",1,"widthpre"],["class","space-wrap","id","SpaceWrap_9",4,"ngIf"],["contenteditable","true",1,"contenteditable",3,"id","blur","mouseleave","keyup"],["id","SpaceWrap_9",1,"space-wrap"],["class","table-wrapper fill",4,"ngIf"],["type","text","readonly","","name","ipnURL","id","ipnURL",1,"form-control","pad-10","heightAuto",3,"value"],[1,"ai-chat-container","mb-4",2,"border","1p
1x solid #e0e0e0","border-radius","8px","padding","16px","background","#ffffff","max-height","500px","display","flex","flex-direction","column"],[1,"chat-header","mb-3",2,"border-bottom","1px solid #e0e0e0","padding-bottom","12px"],[1,"mb-0",2,"font-size","16px","font-weight","600"],[1,"mb-0","text-muted",2,"font-size","12px"],[1,"chat-messages",2,"flex","1","overflow-y","auto","max-height","300px","margin-bottom","16px","padding","8px"],["chatMessagesContainer",""],["style","margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; max-width: 80%; word-wrap: break-word;",3,"ngClass","background","color","margin-left","border",4,"ngFor","ngForOf"],["class","message-ai","style","padding: 10px 12px; border-radius: 8px; background: #ffffff; border: 1px solid #e0e0e0; max-width: 80%;",4,"ngIf"],[1,"chat-input",2,"display","flex","gap","8px","flex-direction","column"],["style","margin-bottom: 12px; text-align: center;",4,"ngIf"],["style","display: flex; gap: 8px;",4,"ngIf"],[2,"margin-bottom","12px","padding","10px 12px","border-radius","8px","max-width","80%","word-wrap","break-word",3,"ngClass"],[2,"font-size","14px","line-height","1.5"],[2,"font-size","11px","opacity","0.7","margin-top","4px"],[1,"message-ai",2,"padding","10px 12px","border-radius","8px","background","#ffffff","border","1px solid #e0e0e0","max-width","80%"],[2,"font-size","14px","color","#666"],[2,"margin-bottom","12px","text-align","center"],["type","button",2,"padding","12px 24px","background","#28a745","color","white","border","none","border-radius","6px","cursor","pointer","font-weight","600","font-size","14px","width","100%",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-play",2,"margin-right","8px"],[2,"display","flex","gap","8px"],["type","text","placeholder","Type your response here...",1,"form-control",2,"flex","1","padding","10px 12px","border","1px solid #ddd","border-radius","6px","font-size","14px",3,"ngModel","disabled","ngModelChange","keyup.enter"],["type","button",2,"padding","10px 20px","background","#007bff","color","white","border","none","border-radius","6px","cursor","pointer","font-weight","500",3,"disabled","click"],[1,"emailus-now","mar-10-b","mar-10-t"],["class","mar-10-l",3,"click",4,"ngIf"],[1,"mar-10-l",3,"click"],[1,"flex-shrink-0","continue","w-before"],["class","w-100",3,"click",4,"ngIf"],[1,"w-100",3,"click"],[1,"btngroup","w-100","cutomdropdown"],["placement","top",1,"dropdownmenu","w-25","mx-3",3,"tooltip","containerClass"],["type","button","data-track","continue",1,"btn","btn-lg","w-100","mr-0","border-start-0","mx-0",3,"disabled","click"],["class","dropdownmenu w-25 mx-3","placement","top",3,"tooltip","containerClass",4,"ngIf"],["type","button","class","btn plusextra-btn",4,"ngIf"],["href","javascript:void(0);",1,"btn","btn-lg","conntacont-btn","w-100","mx-0",3,"disabled","click"],["type","button",1,"btn","plusextra-btn"],["id","createActionSearch","aria-hidden","true",1,"fa","fa-plus"]],template:function(t,e){1&t&&(o.YNc(0,UA,42,20,"div",0),o.YNc(1,EA,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf",!e.detectChangeloader&&e.connectList&&e.connectList[0]&&e.isSetUpOption),o.xp6(1),o.Q6J("ngIf",e.testloader||e.detectChangeloader))},directives:[to.O5,tr,to.mk,to.sg,Xi.Fj,Xi.JJ,Xi.On,po],pipes:[cv,lv,dv,to.uU],styles:['.maxWidthIfsingletextField[_ngcontent-%COMP%]{width:auto!important}.tooltip-middle[_ngcontent-%COMP%]   .tooltip-inner[_ngcontent-%COMP%]{text-align:center}.read-more-button[_ngcontent-%COMP%]{width:75px;padding:0;outline:none;border:0;background:0 0;height:auto;font-weight:600;color:var(--Primary-Color);display:inline-block}.selected-itemdropdwn[_ngcontent-%COMP%]{display:inline-flex;padding-right:5px}.selected-itemdropdwn[_ngcontent-%COMP%]   label.choice-label[_ngcontent-%COMP%]{-webkit-line-clamp:inherit;max-height:200px;overflow:auto;scroll-behavior:smooth;scrollbar-width:thin;white-space:pre-wrap}.ai_mapping[_ngcontent-%COMP%]{text-align:center;display:flex;padding:6px 8px;justify-content:center;align-items:center;grid-gap:4px;gap:4px;font-size:12.5px;font-weight:500;line-height:20px;border-radius:8px;background:linear-gradient(93deg,#FBE4F7 1.29%,#EACDFA 98.77%);color:#701f65;white-space:nowrap}.ai_mapping[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#701f65}.ai_mapping[_ngcontent-%COMP%]:hover{color:#1d1d1d;opacity:.9}.undo-btn[_ngcontent-%COMP%]:hover   svg[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#1d1d1d}.overlay-custom-mobile[_ngcontent-%COMP%]{display:none}@media (min-width: 1200px){.open-up[_ngcontent-%COMP%]{top:auto;bottom:100%}}@media (max-width: 1199px){.overlay-custom-mobile[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%!important;height:100%;background-color:#0000007f;z-index:1031;display:none;justify-content:flex-end;align-items:flex-end;transition:all .5s ease-in;opacity:0;visibility:hidden}.custom-editor-mobile-menu[_ngcontent-%COMP%]{width:100%;max-width:100%;padding:0 10px 10px;overflow-y:auto;max-height:450px;scroll-behavior:smooth;scrollbar-width:none;position:absolute;bottom:0;left:0;border-radius:16px 16px 0 0;border:1px solid #B5CDE6;background:#F5FAFF;animation:slideDownAnimation .5s ease}.animation-hide[_ngcontent-%COMP%]{animation:none}.custom-editor-mobile-menu[_ngcontent-%COMP%]   .choices-search[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;background:#f5fafe;margin-top:0;padding:15px 0 10px}.menu_icon-box[_ngcontent-%COMP%]{width:.75rem;height:.75rem;top:50%;transform:translateY(-50%)}.menu_icon[_ngcontent-%COMP%]{width:.5rem;height:.5rem}.menu_active[_ngcontent-%COMP%] + .overlay-custom-mobile[_ngcontent-%COMP%]{display:flex;opacity:1;visibility:visible}.active_menu[_ngcontent-%COMP%]   .choices-container[_ngcontent-%COMP%]{opacity:0;display:none!important;visibility:hidden}.multipleMenu[_ngcontent-%COMP%]{display:flex;opacity:1;visibility:visible}.overlay-custom-mobile.open[_ngcontent-%COMP%]{display:flex;opacity:1;visibility:visible}#duplicateColume_mob_menu[_ngcontent-%COMP%]   .active_menu[_ngcontent-%COMP%]   .choices-container[_ngcontent-%COMP%]{opacity:1;display:block!important;visibility:visible}#duplicateColume_mob_menu[_ngcontent-%COMP%]   .choice-head[_ngcontent-%COMP%]{padding:0}.editoption-dropmenu-only-continue-if[_ngcontent-%COMP%]{grid-template-columns:1fr}}@keyframes slideInOut{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.slideDown[_ngcontent-%COMP%]{animation:slideInOut .5s ease}@keyframes slideDownAnimation{0%{transform:translateY(100%);opacity:0}
1to{transform:translateY(0);opacity:1}}.alert-ai[_ngcontent-%COMP%]{border-radius:10px;border:1px solid var(--Primary-Color);background:linear-gradient(90deg,#EFF1FF 0%,#E4EDFF 100%);padding:10px;color:var(--Primary-Color);font-size:clamp(.8rem,2.5vw,1rem);font-weight:500}.placeholder-text[_ngcontent-%COMP%]{color:gray;font-style:italic}[contenteditable=true][_ngcontent-%COMP%]:empty:before{content:attr(placeholder);pointer-events:none;cursor:text;display:block;color:#9e9e9e}.form-control.checkIfNotBlurAfteraWhile[_ngcontent-%COMP%], .lookup-plus[_ngcontent-%COMP%]{position:relative;top:0;left:0;height:100%;font-weight:500;font-size:12px;color:#1d1d1d;padding:6px;background:#F3F3F3;width:-moz-fit-content;width:fit-content;border-radius:3px;margin:4px;min-width:120px}#scrollhorz_3[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[_ngcontent-%COMP%], #scrollhorz[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[_ngcontent-%COMP%], #scrollhorz_2[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[_ngcontent-%COMP%]{color:#1d1d1d;border-radius:6px;border:1px solid #9FC5E4;background:#F2F9FF}#scrollhorz_3[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[aria-placeholder][_ngcontent-%COMP%]:empty:before, #scrollhorz[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[aria-placeholder][_ngcontent-%COMP%]:empty:before, #scrollhorz_2[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[aria-placeholder][_ngcontent-%COMP%]:empty:before{display:block;content:attr(aria-placeholder);color:#000;position:relative;width:100%;pointer-events:none;z-index:1;font-size:13px;font-weight:400}#scrollhorz_3[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:before, #scrollhorz_3[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:empty:before, #scrollhorz[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:before, #scrollhorz[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:empty:before, #scrollhorz_2[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:before, #scrollhorz_2[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile[_ngcontent-%COMP%]:focus:empty:before{display:block;color:#1d1d1d;content:"Click to enter custom value"!important}#scrollhorz_3[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[aria-placeholder][_ngcontent-%COMP%]:not(:empty):before, #scrollhorz[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[aria-placeholder][_ngcontent-%COMP%]:not(:empty):before, #scrollhorz_2[_ngcontent-%COMP%] > .checkIfNotBlurAfteraWhile.cross-over[aria-placeholder][_ngcontent-%COMP%]:not(:empty):before{display:none}.custom-options-tooltip.add-space-tooltip[_ngcontent-%COMP%]:after{transform:translate(-90%);top:50px;min-width:-moz-max-content;min-width:max-content}.custom-options-tooltip.add-space-tooltip[_ngcontent-%COMP%]:before{bottom:41px}@media (max-width: 1199px){.custom-options-tooltip.add-space-tooltip[_ngcontent-%COMP%]:after, .custom-options-tooltip.add-space-tooltip[_ngcontent-%COMP%]:before{display:none}}.custom-options-tooltip.position[_ngcontent-%COMP%]:before{bottom:16px;transform:translate(-26%);left:auto;right:-26px;border-top-color:transparent;border-right-color:#000;display:none}.custom-options-tooltip.position[_ngcontent-%COMP%]:after{transform:translate(25%);bottom:6px;top:auto}.choose-condition[_ngcontent-%COMP%]{color:#74748a;font-size:14px;font-weight:400;padding:.5rem .8rem}.red-text[_ngcontent-%COMP%]{color:#f41f1b!important}html.dark[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]{.form-control.checkIfNotBlurAfteraWhile,.lookup-plus {background: var(--input-bg) !important; color: var(--primary-text) !important; border-color: var(--input-border) !important;};.form-control:focus {background: var(--input-bg) !important; border-color: var(--input-focus-border) !important; color: var(--primary-text) !important;};#scrollhorz_3 > .checkIfNotBlurAfteraWhile.cross-over,#scrollhorz > .checkIfNotBlurAfteraWhile.cross-over,#scrollhorz_2 > .checkIfNotBlurAfteraWhile.cross-over {color: var(--primary-text) !important; background: var(--tertiary-bg) !important; border-color: var(--accent-color) !important;};#scrollhorz_3 > .checkIfNotBlurAfteraWhile[aria-placeholder]:empty::before,#scrollhorz > .checkIfNotBlurAfteraWhile[aria-placeholder]:empty::before,#scrollhorz_2 > .checkIfNotBlurAfteraWhile[aria-placeholder]:empty::before {color: var(--muted-text) !important;};#scrollhorz_3 > .checkIfNotBlurAfteraWhile:focus::before,#scrollhorz_3 > .checkIfNotBlurAfteraWhile:focus:empty:before,#scrollhorz > .checkIfNotBlurAfteraWhile:focus::before,#scrollhorz > .checkIfNotBlurAfteraWhile:focus:empty:before,#scrollhorz_2 > .checkIfNotBlurAfteraWhile:focus::before,#scrollhorz_2 > .checkIfNotBlurAfteraWhile:focus:empty:before {color: var(--secondary-text) !important;};.custom-options-tooltip.add-space-tooltip::after {background: var(--secondary-bg) !important; color: var(--primary-text) !important;};.custom-options-tooltip.position::before {border-right-color: var(--secondary-bg) !important;};.custom-options-tooltip.position::after {background: var(--secondary-bg) !important; color: var(--primary-text) !important;};.ai_mapping {background: linear-gradient(93deg,var(--tertiary-bg) 1.29%,var(--secondary-bg) 98.77%) !important; color: var(--accent-color) !important;};.ai_mapping:hover {color: var(--primary-text) !important;};.alert-ai {background: linear-gradient(90deg,var(--tertiary-bg) 0%,var(--secondary-bg) 100%) !important; border-color: var(--accent-color) !important; color: var(--accent-color) !important;};.choose-condition {color: var(--secondary-text) !important;};.red-text {color: var(--danger-color) !important;};.selected-itemdropdwn label.choice-label {color: var(--primary-text) !important; background: var(--secondary-bg) !important;};.overlay-custom-mobile {background-color: rgba(0,0,0,.7) !important;};.custom-editor-mobile-menu {background: var(--card-bg) !important; border-color: var(--border-color) !important;};.custom-editor-mobile-menu .choices-search {background: var(--card-bg) !important;};.placeholder-text {color: var(--muted-text) !important;};[contenteditable=true]:empty:before {color: var(--muted-text) !important;};input[type="text"],input[type="email"],input[type="password"],textarea,select {background: var(--input-bg) !important; color: var(--primary-text) !important; border-color: var(--input-border) !important;};input[type="text"]:focus,input[type="email"]:focus,input[type="password"]:focus,textarea:focus,select:focus {background: var(--input-bg) !important; border-color: var(--input-focus-border) !important; color: var(--primary-text) !important;};input::-moz-placeholder,textarea::-moz-placeholder {color: var(--muted-text) !important;};input::placeholder,textarea::placeholder {color: var(--muted-text) !important;};.dropdown-menu {background: var(--card-bg) !important; border-color: var(--border-color) !important;};.dropdown-item {color: var(--primary-text) !important;};.dropdown-item:hover {background: var(--tertiary-bg) !important; color: var(--primary-text) !important;};.pretty-text-box {background: var(--input-bg) !important; border-color: var(--input-border) !important;};*::-webkit-scrollbar {background-color: var(--secondary-bg) !important;};*::-webkit-scrollbar-track {background: var(--secondary-bg) !important;};*::-webkit-scrollbar-thumb {background-color: var(--secondary-text) !important; border-radius: 6px !important;};*::-webkit-scrollbar-thumb:hover {background-color: var(--primary-text) !important;};label {color: var(--primary-text) !important;};.editoption label {color: var(--primary-text) !important;};.user-text {color: var(--secondary-text) !important;};.required {color: var(--danger-color) !important;};.formgroup {background: var(--card-bg) !important;};.editoption-dropmenu {background: var(--input-bg) !important; border-color: var(--input-border) !important;};.widthpre {background: var(--input-bg) !important; color: var(--primary-text) !important;};.selected_value {color: var(--primary-text) !important;};.selected_item_repaet {background: var(--secondary-bg) !important; color: var(--primary-text) !important; border-color: var(--border-color) !important;};.customvalue-active {background: var(--tertiary-bg) !important; color: var(--accent-color) !important;}}.system-prompt-container[_ngcontent-%COMP%]{width:100%;height:100%;border:0;border-radius:8px;padding:12px;font-size:12px;font-weight:400;color:#000;background:#fff;resize:none;outline:none;box-shadow:none;overflow:auto!important;scroll-behavior:smooth;scrollbar-width:thin}
1.advanced-mapping-btn[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;background:#fff;color:#5371ff;border:1px solid #5371ff;padding:6px 10px;border-radius:8px;cursor:pointer;font-size:12px;max-width:100%;white-space:nowrap;text-align:center;transition:all .2s}.advanced-mapping-btn__label[_ngcontent-%COMP%]{font-weight:500}@keyframes advanced-mapping-dot-blink{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.9)}}.advanced-mapping-btn__dot[_ngcontent-%COMP%]{position:absolute;top:-4px;right:-4px;width:12px;height:12px;border-radius:50%;border:1px solid #fff;background:#01ad68!important;box-shadow:0 0 0 1px #00000014;animation:advanced-mapping-dot-blink 1.5s ease-in-out infinite}.advanced-mapping-btn.active[_ngcontent-%COMP%]{background:linear-gradient(181deg,#3e70f3 1.29%,rgb(83 113 255 / 93%) 98.77%);color:#fff!important;outline:1px solid #5371ff}.advanced-mapping-btn.active[_ngcontent-%COMP%]:hover{opacity:1}.advanced-mapping-btn.active[_ngcontent-%COMP%]   .advanced-mapping-btn__dot[_ngcontent-%COMP%], .advanced-mapping-btn[_ngcontent-%COMP%]:hover   .advanced-mapping-btn__dot[_ngcontent-%COMP%]{border-color:#fff}@media (max-width: 767px){.advanced-mapping-btn[_ngcontent-%COMP%]{width:100%}}.search-container[_ngcontent-%COMP%]{--search-bg: #f5f6ff;--search-border: #e0e0e0;--search-focus: #5371FF;--search-text: #1f2d4d;--search-muted: #6b7a9e;border-radius:8px;background:var(--search-bg);padding:8px 12px;box-shadow:0 1px 2px #6d6dff0f;transition:box-shadow .2s ease,background .2s ease;border:1px solid rgb(224,224,255)}.search-container[_ngcontent-%COMP%]:focus-within{background:var(--search-bg);box-shadow:0 1px 2px #6d6dff14,0 0 0 1px #6d6dff26;border-color:#6d6dff80}.search-container__label[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;grid-gap:8px;gap:8px;margin:0 0 6px;cursor:default}.search-container__label-text[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#5371ff;letter-spacing:.02em}.search-container__hint[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:var(--search-muted)}.search-container__input-wrap[_ngcontent-%COMP%]{position:relative}.search-container__icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:var(--search-muted);pointer-events:none;display:inline-flex;transition:color .2s ease}.search-container[_ngcontent-%COMP%]:focus-within   .search-container__icon[_ngcontent-%COMP%]{color:var(--search-focus)}.search-container__input[_ngcontent-%COMP%]{height:39px;border:1px solid var(--search-border);border-radius:10px;background:#ffffff;padding:0 10px 0 40px;font-size:13px;font-weight:500;color:var(--search-text);transition:border-color .2s ease,box-shadow .2s ease}.search-container__input[_ngcontent-%COMP%]::-moz-placeholder{color:#98a5c2;font-weight:400}.search-container__input[_ngcontent-%COMP%]::placeholder{color:#98a5c2;font-weight:400}.search-container__input[_ngcontent-%COMP%]:focus{outline:none;border-color:#e0e0e0;box-shadow:0 0 0 2px #6d6dff1f}@media (max-width: 767px){.search-container[_ngcontent-%COMP%]{padding:12px 14px;border-radius:12px}.search-container__label[_ngcontent-%COMP%]{margin-bottom:4px}.search-container__input[_ngcontent-%COMP%]{height:42px;padding-left:42px}.search-container__icon[_ngcontent-%COMP%]{left:12px}}
1.btn-closeMenu[_ngcontent-%COMP%]{padding:0;width:22px;height:22px;border:1.5px solid #fff;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.CloseMenu_dropdown[_ngcontent-%COMP%]{margin-bottom:12px}.btn-closeMenu[_ngcontent-%COMP%]   .fa-close[_ngcontent-%COMP%]:before{background-position:top 2px left 1px;filter:grayscale(0%);background-size:16px 16px}.json-editor-box[_ngcontent-%COMP%]   #dataToSave[_ngcontent-%COMP%], .json-editor-box[_ngcontent-%COMP%]   .form-control#dataToSave[_ngcontent-%COMP%]{min-height:160px;max-height:360px;overflow-y:auto;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:1.6;white-space:pre-wrap;background:#fbfcfe;border:1px solid #d7dbe6;border-radius:8px;padding:10px 12px}.json-editor-box[_ngcontent-%COMP%]   .selected_value[_ngcontent-%COMP%]{white-space:pre-wrap;display:inline}.json-editor-box[_ngcontent-%COMP%]   .selected_item_repaet[_ngcontent-%COMP%]{display:inline}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]{display:inline-flex;vertical-align:middle;margin:0 1px}.json-editor-box[_ngcontent-%COMP%]   .contenteditable6[_ngcontent-%COMP%]{display:inline;min-width:4px;white-space:pre-wrap}.json-editor-box[_ngcontent-%COMP%]   .whitespace-to-addinputbox[_ngcontent-%COMP%]{display:none!important}.json-editor-box[_ngcontent-%COMP%]   .selected_value[_ngcontent-%COMP%], .json-editor-box[_ngcontent-%COMP%]   .selected_item_repaet[_ngcontent-%COMP%], .json-editor-box[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%], .json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]{display:inline!important;border:none!important;background:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important}.json-editor-box[_ngcontent-%COMP%]   .contenteditable6[_ngcontent-%COMP%]{display:inline!important;border:none!important;background:transparent!important;padding:0!important;margin:0!important;outline:none!important;min-width:2px;white-space:pre-wrap}.json-editor-box[_ngcontent-%COMP%]   .contenteditable6[_ngcontent-%COMP%]:focus{outline:none!important}.json-editor-box[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{display:none!important}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;vertical-align:middle;grid-gap:3px;gap:3px;margin:0 1px!important;padding:0 6px!important;height:18px;line-height:18px;background:#eef2ff!important;border:1px solid #c7d2fe!important;border-radius:4px!important;font-size:11px;color:#4338ca;white-space:nowrap}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]   .imgapps-icon[_ngcontent-%COMP%]{width:12px;height:12px}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .choice-label[_ngcontent-%COMP%]{margin:0!important;padding:0!important;cursor:default}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:14px!important;height:14px!important;min-width:14px!important;margin:0 0 0 5px!important;padding:0!important;border:none!important;background:transparent!important;border-radius:50%!important;box-shadow:none!important;cursor:pointer;opacity:.55;vertical-align:middle;transition:opacity .12s,background .12s}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]:hover{opacity:1;background:#dfe4f5!important}.json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%], .json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]   .fa-close[_ngcontent-%COMP%]{font-size:9px!important;line-height:1!important;color:#6b4a9e!important;margin:0!important}.json-editor-box[_ngcontent-%COMP%]{position:relative}.json-editor-header[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;padding:7px 12px;background:#f4f6fb;border:1px solid #d7dbe6;border-bottom:none;border-radius:8px 8px 0 0;font-size:12px}.json-editor-header[_ngcontent-%COMP%]   .jeh-left[_ngcontent-%COMP%]{color:#5f6b85;font-weight:500;letter-spacing:.02em}.json-editor-header[_ngcontent-%COMP%]   .jeh-left[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%]{margin-right:5px}.json-editor-header[_ngcontent-%COMP%]   .jeh-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px;margin-left:auto}.json-editor-header[_ngcontent-%COMP%]   .jeh-valid[_ngcontent-%COMP%]{color:#1d9e75}.json-editor-header[_ngcontent-%COMP%]   .jeh-invalid[_ngcontent-%COMP%]{color:#d84a4a}.json-editor-header[_ngcontent-%COMP%]   .jeh-empty[_ngcontent-%COMP%]{color:#9aa0b0}.json-editor-box[_ngcontent-%COMP%]   #dataToSave[_ngcontent-%COMP%]{border-radius:0 0 8px 8px!important;border-top:none!important}.json-editor-header[_ngcontent-%COMP%]   .jeh-format[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px;margin-left:10px;padding:3px 10px;font-size:12px;color:#4338ca;background:#eef2ff;border:1px solid #c7d2fe;border-radius:6px;border-radius:var(--radius, 6px);cursor:pointer;transition:background .12s}.json-editor-header[_ngcontent-%COMP%]   .jeh-format[_ngcontent-%COMP%]:hover{background:#e0e7ff}.json-editor-header[_ngcontent-%COMP%]   .jeh-format[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%]{font-size:11px}.json-editor-header[_ngcontent-%COMP%]   .jeh-status[_ngcontent-%COMP%]{margin-left:auto}.json-editor-header[_ngcontent-%COMP%]   .jeh-clear[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px;margin-left:8px;padding:3px 10px;font-size:12px;color:#b4413b;background:#fdecec;border:1px solid #f3c4c1;border-radius:6px;border-radius:var(--radius, 6px);cursor:pointer;transition:background .12s}.json-editor-header[_ngcontent-%COMP%]   .jeh-clear[_ngcontent-%COMP%]:hover{background:#fbdddd}.json-editor-header[_ngcontent-%COMP%]   .jeh-clear[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%]{font-size:12px}.theme-dark[_nghost-%COMP%]   .json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ng
1content-%COMP%], .theme-dark   [_nghost-%COMP%]   .json-editor-box[_ngcontent-%COMP%]   .inline-label[_ngcontent-%COMP%]   .selectedname[_ngcontent-%COMP%]{background:#2e2a6b!important;border:1px solid #4f46e5!important}.theme-dark[_nghost-%COMP%]   .json-editor-box[_ngcontent-%COMP%]   #dataToSave[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .json-editor-box[_ngcontent-%COMP%]   #dataToSave[_ngcontent-%COMP%]{background:#14161f!important;border-color:#2b3350!important}.theme-dark[_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%]{background:#1b1f2e!important;border-color:#2b3350!important}.theme-dark[_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%]   .jeh-format[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%]   .jeh-format[_ngcontent-%COMP%]{background:#2e2a6b!important;border-color:#4f46e5!important}.theme-dark[_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%]   .jeh-clear[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .json-editor-header[_ngcontent-%COMP%]   .jeh-clear[_ngcontent-%COMP%]{background:#3a1f2a!important;border-color:#6d2f40!important}'],data:{animation:[tc("slideDownAnimation",[rc(":enter",[ic({transform:"translateY(100%)"}),ec("0.5s ease",ic({transform:"translateY(0)"}))]),rc(":leave",[ec("0.5s ease",ic({transform:"translateY(100%)"}))])])]}}),t})(),DA=(()=>{class t{constructor(t,e,n){this.router=t,this.http=e,this.cookieService=n,this.getAppsList=new fo.xQ,this.copilotToggle=new fo.xQ,this.copilotToggle$=this.copilotToggle.asObservable(),this.pendingCopilotOpen=!1,this.pendingCopilotMessages=[],this.pendingBlueprint=null,this.pendingFieldMappings=[],this.copilotRailCache=null,this.copilotRailTab="all",this.copilotRailLoading=!1,this.editorSkeletonActive=!1,this.pendingRailSwitch=!1,this.pendingConversationId=null,this.autoRunPendingAt=0}markPendingConversation(t){this.pendingConversationId=t}consumePendingConversation(){const t=this.pendingConversationId;return this.pendingConversationId=null,t}markRailSwitch(){this.pendingRailSwitch=!0}consumeRailSwitch(){const t=this.pendingRailSwitch;return this.pendingRailSwitch=!1,t}setFieldMappings(t){this.pendingFieldMappings=t||[]}consumeFieldMappings(){const t=this.pendingFieldMappings;return this.pendingFieldMappings=[],t}openCopilot(){this.pendingCopilotOpen=!0,this.copilotToggle.next(!0)}openCopilotWithHistory(t,e){this.pendingCopilotOpen=!0,this.pendingCopilotMessages=t,this.pendingBlueprint=e||null,this.copilotToggle.next(!0)}consumeCopilotOpen(){return!!this.pendingCopilotOpen&&(this.pendingCopilotOpen=!1,!0)}consumeCopilotMessages(){const t=this.pendingCopilotMessages;return this.pendingCopilotMessages=[],t}consumeBlueprint(){const t=this.pendingBlueprint;return this.pendingBlueprint=null,t}setAutoRunPending(){this.autoRunPendingAt=Date.now()}peekAutoRunPending(){return this.autoRunPendingAt>0&&Date.now()-this.autoRunPendingAt<12e4}clearAutoRunPending(){this.autoRunPendingAt=0}setAutoPrompt(t){sessionStorage.setItem("copilotAutoPrompt",t)}hasAutoPrompt(){return!!sessionStorage.getItem("copilotAutoPrompt")}consumeAutoPrompt(){const t=sessionStorage.getItem("copilotAutoPrompt")||"";return sessionStorage.removeItem("copilotAutoPrompt"),t}setAppsList(t){this.appList=t,this.getAppsList.next(this.appList)}generateRandomString(t){let e="";const n="abcdefghijklmnopqrstuvwxyz0123456789",i=n.length;for(let o=0;o<t;o++)e+=n.charAt(Math.floor(Math.random()*i));return e}createConnectId(){return this.generateRandomString(24)}getCookie(t){const e=document.cookie.split(";"),n=`${t}=`;for(let i=0;i<e.length;i++){let t=e[i].trim();if(0===t.indexOf(n))return t.substring(n.length,t.length)}return""}getCountryCode(){let t=this.cookieService.get("visitorIPData");return t?new Ro.y(e=>{e.next(JSON.parse(t)),e.complete()}):this.http.get("https://checkout.appypie.com/api/get-visitor-ip").pipe((0,Uo.U)(t=>(this.cookieService.set("visitorIPData",JSON.stringify(t),1,"/"),t)),(0,$l.K)(t=>{console.error("API call to checkout failed:",t);const e={status:1,ipAddress:"0.0.0.0",countryCode:"US"};return new Ro.y(t=>{t.next(e),t.complete()})}))}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(ui.F0),o.LFG(di.eN),o.LFG(lo.N))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),LA=(()=>{class t{constructor(){this.guideSteps=[{step:1,title:"Step 1: Choose a Trigger",description:"Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect.",selector:'.trigger-event, h2.theme-color.fw-semibold, [data-tab="Trigger Details"], .info-wrap',position:"left",highlight:!0,action:"select_trigger_app"},{step:2,title:"Step 2: Add Action",description:"Actions define what happens after your trigger runs.\n\nClick the \u201c+\u201d button to add one or more actions and build powerful workflows.",selector:'.node-plusbtn, .center-btn, button[data-tooltip="Add New Step"], #add-new-step-button, .btn-primary.rounded-circle.no
1de-plusbtn',position:"bottom",highlight:!0,action:"add_action"},{step:3,title:"Step 3: Activate Connect",description:"Once your trigger and actions are configured, click \u201cActivate Connect\u201d to make your automation live.\n\nYour workflow will now run automatically based on your trigger settings.",selector:".active_agent_Button, button.active_agent_Button, #dropdownMenuButton.btn.dropdown-toggle.bg-transparent",position:"left",highlight:!0,action:"activate_connect"},{step:4,title:"Step 4: Task History",description:"Track all automation runs from the Task History section in the sidebar.\n\nView execution status, timestamps, and error details for better monitoring.",selector:'a[routerLink="/history"], .btnbysection[data-tab="History Section"], a[data-tab="History Section"]',position:"right",highlight:!0,action:"navigate_history"}],this.currentStepSubject=new qr.X(0),this.isActiveSubject=new qr.X(!1),this.isCompletedSubject=new qr.X(!1),this.currentStep$=this.currentStepSubject.asObservable(),this.isActive$=this.isActiveSubject.asObservable(),this.isCompleted$=this.isCompletedSubject.asObservable();const t=localStorage.getItem("userGuideCompleted"),e=localStorage.getItem("userGuideDisabled");("true"===t||"true"===e)&&this.isCompletedSubject.next(!0)}getSteps(){return this.guideSteps}getCurrentStep(){return this.currentStepSubject.value}getCurrentStepData(){const t=this.currentStepSubject.value;return this.guideSteps.find(e=>e.step===t)||null}startGuide(){"true"!==localStorage.getItem("userGuideDisabled")&&(this.isCompletedSubject.value&&this.resetGuide(),this.isActiveSubject.next(!0),this.currentStepSubject.next(1))}nextStep(){const t=this.currentStepSubject.value;t<this.guideSteps.length?this.currentStepSubject.next(t+1):this.completeGuide()}previousStep(){const t=this.currentStepSubject.value;t>1&&this.currentStepSubject.next(t-1)}goToStep(t){t>=1&&t<=this.guideSteps.length&&this.currentStepSubject.next(t)}skipGuide(){this.completeGuide()}completeGuide(){this.isActiveSubject.next(!1),this.isCompletedSubject.next(!0),localStorage.setItem("userGuideCompleted","true"),this.currentStepSubject.next(0)}resetGuide(){localStorage.removeItem("userGuideCompleted"),localStorage.removeItem("userGuideDisabled"),sessionStorage.removeItem("userGuideStarted"),this.isCompletedSubject.next(!1),this.currentStepSubject.next(0),this.isActiveSubject.next(!1)}isActive(){return this.isActiveSubject.value}isCompleted(){return this.isCompletedSubject.value}getTotalSteps(){return this.guideSteps.length}getProgress(){return this.currentStepSubject.value/this.guideSteps.length*100}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),JA=(()=>{class t{constructor(){this.action$=new fo.xQ,this.editorLeave=null,this.editorCopilotToggle=null,this.account$=new qr.X(null)}run(t){this.action$.next(t)}publishAccount(t){this.account$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const jA=["draggableSection"],RA=["dropdown"],$A=["resizablePanel"],BA=["fFlow"],HA=["fCanvas"];function QA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",91),o.TgZ(1,"div",92),o.TgZ(2,"span"),o._uU(3,"Need help? Our support team can help you create your automation."),o.qZA(),o.TgZ(4,"button",93),o.NdJ("click",function(){return o.CHM(t),o.oxw().openAppointmentPop()}),o._uU(5,"Book Expert Assistance"),o.qZA(),o.qZA(),o.TgZ(6,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeBookExpert()}),o.O4$(),o.TgZ(7,"svg",95),o._UZ(8,"path",96),o.qZA(),o.qZA(),o.qZA()}}function YA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"label",124),o.TgZ(1,"input",125),o.NdJ("keyup",function(e){return o.CHM(t),o.oxw(2).updateConnectName(e)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("value",t.connectList[0].connectTitle||t.connectId)}}function zA(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",126),o.TgZ(1,"button",127),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openBookExpertAssistancePop()}),o._UZ(2,"img",128),o.qZA(),o.qZA()}}function VA(t,e){1&t&&(o.TgZ(0,"span",132),o._uU(1,"Fix or Complete your agent to Activate."),o.qZA())}function GA(t,e){1&t&&(o.TgZ(0,"span",132),o._uU(1,"Click to Activate the Connect."),o.qZA())}function WA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",129),o.TgZ(1,"button",130),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.updateUserConnectStatus(e.connectList[0].connectTitle,1,"Completed","Active")}
1),o._uU(2," Activate Connect "),o.qZA(),o.YNc(3,VA,2,0,"span",131),o.YNc(4,GA,2,0,"span",131),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("disabled",!t.activateAgent),o.xp6(2),o.Q6J("ngIf",!t.activateAgent),o.xp6(1),o.Q6J("ngIf",t.activateAgent)}}function KA(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",133),o.TgZ(1,"button",134),o._UZ(2,"span",135),o._uU(3),o.qZA(),o.TgZ(4,"ul",136),o.TgZ(5,"li"),o.TgZ(6,"button",137),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.updateUserConnectStatus(e.connectList[0].connectTitle,1,"Completed","Active")}),o._UZ(7,"span",138),o._uU(8," Active "),o.qZA(),o.qZA(),o.TgZ(9,"li"),o.TgZ(10,"button",137),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.updateUserConnectStatus(e.connectList[0].connectTitle,1,"Completed","Inactive")}),o._UZ(11,"span",139),o._uU(12," InActive "),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("ngClass","Active"===t.selectedStatus?"dotactive":"dotinactive"),o.xp6(1),o.hij(" ",t.selectedStatus," ")}}function XA(t,e){1&t&&o._UZ(0,"app-flow-branch-addor")}function tZ(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",145),o.TgZ(1,"h3"),o._uU(2,"Run Test is Successful"),o.qZA(),o.TgZ(3,"p"),o._uU(4,"Mapping has been saved after run test. The node is now active."),o.qZA(),o.qZA())}function eZ(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",145),o.TgZ(1,"h3"),o._uU(2,"Mapping Saved Successfully"),o.qZA(),o.TgZ(3,"p"),o._uU(4,"Mapping has been saved without run test. The node is now active."),o.qZA(),o.qZA())}function nZ(t,e){if(1&t&&(o.TgZ(0,"div",140),o.TgZ(1,"div",141),o.O4$(),o.TgZ(2,"svg",142),o._UZ(3,"path",143),o.qZA(),o.qZA(),o.YNc(4,tZ,5,0,"div",144),o.YNc(5,eZ,5,0,"div",144),o.qZA()),2&t){const t=o.oxw(2);o.xp6(4),o.Q6J("ngIf",!t.isSkipRunTest),o.xp6(1),o.Q6J("ngIf",t.isSkipRunTest)}}function iZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",149),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.closeError(e.currentApp.index)}),o.O4$(),o.TgZ(1,"svg",150),o._UZ(2,"path",151),o.qZA(),o.qZA()}}function oZ(t,e){if(1&t&&(o.TgZ(0,"div",146),o.YNc(1,iZ,3,0,"button",147),o.TgZ(2,"div",141),o.O4$(),o.TgZ(3,"svg",142),o._UZ(4,"path",148),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"div",145),o.TgZ(6,"h3"),o._uU(7,"Flow needs Attention"),o.qZA(),o.TgZ(8,"p"),o._uU(9),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf","preview"!==t.globalAction),o.xp6(8),o.Oqu(t.actionFailedData||"Action App is missing! Please add action or remove the flow to activate the agent.")}}function rZ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",155),o._UZ(1,"polyline",156),o._UZ(2,"path",157),o.qZA())}function sZ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",158),o._UZ(1,"polyline",159),o._UZ(2,"path",160),o.qZA())}function aZ(t,e){if(1&t&&(o.TgZ(0,"div",152),o.YNc(1,rZ,3,0,"svg",153),o.YNc(2,sZ,3,0,"svg",154),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf","undo"===t.undoRedoToastType),o.xp6(1),o.Q6J("ngIf","redo"===t.undoRedoToastType),o.xp6(2),o.Oqu(t.undoRedoToastMessage)}}const cZ=function(t){return{"top-60":t}};function lZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",97),o.TgZ(1,"header",98),o.TgZ(2,"div",99),o.TgZ(3,"a",100),o.NdJ("click",function(){return o.CHM(t),o.oxw().navigateToConnects()}),o._UZ(4,"img",101),o.qZA(),o.TgZ(5,"div",102),o.YNc(6,YA,2,1,"label",103),o.TgZ(7,"button",104),o._UZ(8,"i",105),o.qZA(),o.TgZ(9,"span",106),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",107),o.TgZ(12,"button",108),o.NdJ("click",function(){return o.CHM(t),o.oxw().undo()}),o.O4$(),o.TgZ(13,"svg",109),o._UZ(14,"path",110),o._UZ(15,"path",111),o.qZA(),o.qZA(),o.kcU(),o.TgZ(16,"button",112),o.NdJ("click",function(){return o.CHM(t),o.oxw().redo()}),o.O4$(),o.TgZ(17,"svg",113),o._UZ(18,"path",114),o._UZ(19,"path",115),o.qZA(),o.qZA(),o.qZA(),o.YNc(20,zA,3,0,"div",116),o.kcU(),o.TgZ(21,"div",117),o._UZ(22,"app-theme-toggle",118),o.qZA(),o.YNc(23,WA,5,3,"div",119),o.YNc(24,KA,13,2,"div",120),o.qZA(),o.qZA(),o.YNc(25,XA,1,0,"app-flow-branch-addor",47),o.YNc(26,nZ,6,2,"div",121),o.YNc(27,oZ,10,2,"div",122),o.YNc(28,aZ,5,3,"div",123),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("ngClass",o.VKq(16,cZ,!t.bookExpert&&!t.bookExpertIcon)),o.xp6(6),o.Q6J("ngIf",t.connectList&&t.connectList[0]),o.xp6(3),o.Q6J("ngClass","Completed"===t.currentApp.connectStatus?"published-save":"draft-save"),o.xp6(1),o.Oqu("Completed"===t.currentApp.connectStatus?"Published":"Draft"),o.xp6(2),o.Q6J("disabled",!t.canUndo),o.xp6(4),o.Q6J("disabled",!t.canRedo),o.xp6(4),o.Q6J("ngIf",t.bookExpertIcon&&"jc0fgwefcky2"!==t.currentUser.planId),o.xp6(2),o.Q6J("variant","icon")("size","md")("showLabel",!1),o.xp6(1),o.Q6J("ngIf",!t.activeAgent),o.xp6(1),o.Q6J("ngIf",t.activeAgent),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",t.showSuccessAlert),o.xp6(1),o.Q6J("ngIf",t.showErrorAlert),o.xp6(1),o.Q6J("ngIf",t.undoRedoToastMessage)}}function dZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"a",161),o.NdJ("click",function(){return o.CHM(t),o.oxw().navigateToConnects("/team-moderator")}),o.TgZ(2,"span",34),o.O4$(),o.TgZ(3,"svg",162),o._UZ(4,"path",163),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"span",164),o._uU(6,"User Management"),o.qZA(),o.qZA(),o.qZA()}}function uZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",165),o.NdJ("click",function(){return o.CHM(t),o.oxw().callAgentToggle()}),o.TgZ(1,"button",166),o.O4$(),o.TgZ(2,"svg",167),o._UZ(3,"path",168),o._UZ(4,"path",169),o._UZ(5,"path",170),o._UZ(6,"path",171),o.qZA(),o.kcU(),o.TgZ(7,"span",12),o._uU(8,"Request a Callback"),o.qZA(),o.qZA(),o.qZA()}}
1function pZ(t,e){if(1&t&&(o.TgZ(0,"div",172),o.TgZ(1,"div",173),o.TgZ(2,"div",174),o._UZ(3,"span",175),o.TgZ(4,"span",176),o._UZ(5,"span",177),o._UZ(6,"span",178),o.qZA(),o.qZA(),o._UZ(7,"div",179),o.TgZ(8,"div",174),o._UZ(9,"span",175),o.TgZ(10,"span",176),o._UZ(11,"span",180),o._UZ(12,"span",181),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",182),o._UZ(14,"span",183),o._UZ(15,"span",180),o._UZ(16,"div",184),o._UZ(17,"span",185),o._UZ(18,"div",186),o._UZ(19,"div",184),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.ekj("cls-copilot-open",t.showCopilot)}}function hZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",196),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(),n=e.$implicit,i=e.index;return o.oxw().showMenu(n.from,n.to,i)})("click",function(t){return t.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",197),o._UZ(2,"path",198),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.ekj("blue-plus-btn",e.isPreviousNodeComplete(t.to)),o.Q6J("ngStyle",e.getButtonPosition(t.from))("disabled","preview"==e.globalAction)}}function gZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",199,200),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",201),o.TgZ(3,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).createNodeFlow()}),o.O4$(),o.TgZ(4,"svg",21),o._UZ(5,"path",203),o._UZ(6,"path",204),o._UZ(7,"path",205),o._UZ(8,"path",206),o.qZA(),o._uU(9," Add Action App "),o.TgZ(10,"svg",207),o._UZ(11,"path",198),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).createAIAgentNode()}),o.O4$(),o.TgZ(13,"svg",208),o._UZ(14,"path",209),o.qZA(),o._uU(15," Add AI Agent "),o.TgZ(16,"svg",207),o._UZ(17,"path",198),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).createBranchFlow()}),o.O4$(),o.TgZ(19,"svg",21),o._UZ(20,"path",210),o.qZA(),o._uU(21," Add Flow "),o.TgZ(22,"svg",207),o._UZ(23,"path",198),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}function fZ(t,e){if(1&t&&(o.TgZ(0,"f-connection",187),o.TgZ(1,"f-connection",188),o.O4$(),o.TgZ(2,"svg",189),o._UZ(3,"circle",190),o.qZA(),o.TgZ(4,"svg",189),o._UZ(5,"circle",190),o.qZA(),o.TgZ(6,"svg",191),o._UZ(7,"path",192),o.qZA(),o.TgZ(8,"svg",191),o._UZ(9,"path",192),o.qZA(),o.qZA(),o.kcU(),o.TgZ(10,"div",193),o.YNc(11,hZ,3,4,"button",194),o.YNc(12,gZ,24,0,"div",195),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw();o.Q6J("fReassignDisabled",!0)("fOutputId",t.from)("fInputId",t.to)("fOffset",8),o.xp6(1),o.Q6J("fReassignDisabled",!0)("fOutputId",t.from)("fInputId",t.to),o.xp6(1),o.Q6J("type",i.eMarkerType.START)("height",5)("width",5)("refX",2.5)("refY",2.5),o.xp6(2),o.Q6J("type",i.eMarkerType.SELECTED_START)("height",5)("width",5)("refX",2.5)("refY",2.5),o.xp6(2),o.Q6J("type",i.eMarkerType.END)("height",7)("width",6)("refX",5.5)("refY",3.5),o.xp6(2),o.Q6J("type",i.eMarkerType.SELECTED_END)("height",7)("width",6)("refX",5.5)("refY",3.5),o.xp6(3),o.Q6J("ngIf",i.isFirstOccurrence(t.from,n)),o.xp6(1),o.Q6J("ngIf",i.showToolbarMenu&&i.activeConnection===n)}}function mZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",227),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(),n=e.$implicit,i=e.index;return o.oxw().showMenu(n.connectorId,n.to,i)})("click",function(t){return t.stopPropagation()}),o.TgZ(1,"button",228),o.O4$(),o.TgZ(2,"svg",197),o._UZ(3,"path",198),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("fOutputId",t.connectorId)("fOutputConnectableSide",e.configuration.outputSide)("ngClass",e.configuration.outputSide),o.xp6(1),o.ekj("blue-plus-btn",e.isPreviousNodeComplete(t.connectorId)),o.Q6J("disabled","preview"==e.globalAction)}}function vZ(t,e){if(1&t&&o._UZ(0,"img",229),2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("src",e.getImagePath(t),o.LSH)("alt",e.displayName)}}function bZ(t,e){1&t&&o._UZ(0,"span",230)}function xZ(t,e){1&t&&(o.TgZ(0,"span",231),o.O4$(),o.TgZ(1,"svg",232),o._UZ(2,"path",233),o._UZ(3,"path",234),o.qZA(),o.qZA())}function _Z(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",142),o._UZ(1,"path",235),o._UZ(2,"path",236),o._UZ(3,"path",237),o._UZ(4,"path",238),o.qZA())}function CZ(t,e){1&t&&(o.TgZ(0,"h2"),o._uU(1,"Trigger Application"),o.qZA())}const wZ=function(){return["Flow","Flow 1","Flow 2","Flow 3","Flow 4","Flow 5","Flow 6","Flow 7","Flow 8","Flow 9","Flow 10"]};
1function yZ(t,e){if(1&t&&(o.TgZ(0,"h2"),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.hij(" ",t.isAIAgent||"AI Agent"==t.displayName?"":o.DdM(1,wZ).includes(t.headerName)?t.headerName:"Action Application"," ")}}function AZ(t,e){1&t&&o._UZ(0,"img",258)}function ZZ(t,e){1&t&&o._UZ(0,"img",259)}function kZ(t,e){1&t&&o._UZ(0,"img",260)}function TZ(t,e){1&t&&o._UZ(0,"img",261)}function OZ(t,e){1&t&&o._UZ(0,"img",262)}function MZ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",21),o._UZ(1,"path",263),o._UZ(2,"path",264),o._UZ(3,"path",265),o._UZ(4,"path",266),o.qZA())}function IZ(t,e){if(1&t&&(o.TgZ(0,"h3",267),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Oqu(t.eventFinal||(0===t.connectorId?"Select Trigger Event":"Select Action Event"))}}function SZ(t,e){if(1&t&&o._UZ(0,"span",242),2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+t.toolImage+")")}}function PZ(t,e){1&t&&o._UZ(0,"img",271)}function NZ(t,e){1&t&&o._UZ(0,"img",272)}function qZ(t,e){1&t&&o._UZ(0,"img",273)}function UZ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",21),o._UZ(1,"path",263),o._UZ(2,"path",264),o._UZ(3,"path",265),o._UZ(4,"path",266),o.qZA())}function EZ(t,e){if(1&t&&(o.TgZ(0,"span",242),o.YNc(1,PZ,1,0,"img",268),o.YNc(2,NZ,1,0,"img",269),o.YNc(3,qZ,1,0,"img",270),o.YNc(4,UZ,5,0,"svg",248),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","weather"==t.tool),o.xp6(1),o.Q6J("ngIf","serp"==t.tool),o.xp6(1),o.Q6J("ngIf","mcp"==t.tool),o.xp6(1),o.Q6J("ngIf","weather"!=t.tool&&"serp"!=t.tool&&"mcp"!=t.tool)}}const FZ=function(t){return{active:t}},DZ=function(t){return{"text-muted":t}},LZ=function(){return{color:"#5371FF","font-weight":"500"}},JZ=function(){return{}};function jZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",239),o.TgZ(1,"div",240),o.TgZ(2,"div",241),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().openAISubNodeConfig(n.connectorId,"chatModel"),e.stopPropagation()}),o.TgZ(3,"span",242),o.YNc(4,AZ,1,0,"img",243),o.YNc(5,ZZ,1,0,"img",244),o.YNc(6,kZ,1,0,"img",245),o.YNc(7,TZ,1,0,"img",246),o.YNc(8,OZ,1,0,"img",247),o.YNc(9,MZ,5,0,"svg",248),o.qZA(),o.TgZ(10,"span",249),o.TgZ(11,"span",250),o._uU(12,"Model"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",251),o._uU(14),o.qZA(),o.qZA(),o.TgZ(15,"div",252),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().onClickNode(e,n),e.stopPropagation()}),o.TgZ(16,"h2",253),o._uU(17),o.qZA(),o.YNc(18,IZ,2,1,"h3",254),o.qZA(),o.TgZ(19,"div",255),o.TgZ(20,"div",241),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().onClickToolNode(e,n),e.stopPropagation()}),o.TgZ(21,"span",249),o.TgZ(22,"span",250),o._uU(23,"Tools"),o.qZA(),o.qZA(),o.YNc(24,SZ,1,2,"span",256),o.YNc(25,EZ,5,4,"span",257),o.qZA(),o.TgZ(26,"div",251),o._uU(27),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.xp6(1),o.Q6J("ngClass",o.VKq(20,FZ,e.chatModelContainer)),o.xp6(3),o.Q6J("ngIf","Appy Pie Flawless Text"==t.chatModel),o.xp6(1),o.Q6J("ngIf","chatgpt"==t.chatModel),o.xp6(1),o.Q6J("ngIf","grok"==t.chatModel),o.xp6(1),o.Q6J("ngIf","gemini"==t.chatModel),o.xp6(1),o.Q6J("ngIf","claude"==t.chatModel),o.xp6(1),o.Q6J("ngIf","Appy Pie Flawless Text"!=t.chatModel&&"chatgpt"!=t.chatModel&&"grok"!=t.chatModel&&"gemini"!=t.chatModel&&"claude"!=t.chatModel),o.xp6(4),o.ekj("configured",e.isSubComponentConfigured(t.connectorId,"chatModel")),o.xp6(1),o.hij(" ",e.getSubComponentStatus(t.connectorId,"chatModel")," "),o.xp6(2),o.Q6J("ngClass",o.VKq(22,DZ,!t.displayName))("ngStyle",t.displayName?o.DdM(24,LZ):o.DdM(25,JZ)),o.xp6(1),o.Oqu(t.displayName||(0==t.connectorId?"Select Trigger App":"Select Action App")),o.xp6(1),o.Q6J("ngIf",t.displayName&&("AI Agent"!==t.displayName||t.eventFinal)),o.xp6(1),o.Q6J("ngClass",o.VKq(26,FZ,e.chatToolContainer)),o.xp6(5),o.Q6J("ngIf",t.toolImage),o.xp6(1),o.Q6J("ngIf",!t.toolImage),o.xp6(1),o.ekj("configured",e.isSubComponentConfigured(t.connectorId,"tool")),o.xp6(1),o.hij(" ",e.getSubComponentStatus(t.connectorId,"tool")," ")}}function RZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",275),o.TgZ(1,"h2",276),o._uU(2),o.qZA(),o.TgZ(3,"button",277),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw().openAISubNodeConfig(n.aiMainNodeId,n.aiSubType),e.stopPropagation()}),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.xp6(2),o.Oqu(t.displayName),o.xp6(1),o.ekj("configured",e.isSubComponentConfigured(t.aiMainNodeId,t.aiSubType)),o.xp6(1),o.hij(" ",e.getSubComponentStatus(t.aiMainNodeId,t.aiSubType)," ")}}function $Z(t,e){if(1&t&&o.YNc(0,RZ,5,4,"div",274),2&t){const t=o.oxw().$implicit,e=o.MAs(16);o.Q6J("ngIf",t.isAISubComponent)("ngIfElse",e)}}
1function BZ(t,e){if(1&t&&(o.TgZ(0,"h3",267),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij(" ",t.eventFinal||(0==t.connectorId?"Select Trigger Event":"Select Action Event")," ")}}const HZ=function(){return{color:"#0334ED","font-weight":"500"}};function QZ(t,e){if(1&t&&(o.TgZ(0,"h2",253),o._uU(1),o.qZA(),o.YNc(2,BZ,2,1,"h3",254)),2&t){const t=o.oxw().$implicit;o.Q6J("ngClass",o.VKq(4,DZ,!t.displayName))("ngStyle",t.displayName?o.DdM(6,HZ):o.DdM(7,JZ)),o.xp6(1),o.Oqu(t.displayName||(0==t.connectorId?"Select Trigger App":"Select Action App")),o.xp6(1),o.Q6J("ngIf",t.displayName&&"Flow"!==t.headerName)}}function YZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"input",284),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).$implicit.comments=e})("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw().onNoteClick(e,n)})("focus",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw().noteInputFocused[e.id]=!0})("blur",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw().onNoteBlur(e)}),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.ekj("hidden",!e.noteInputFocused[t.id]&&t.comments),o.s9C("title",t.comments),o.Q6J("placeholder","AI Agent"===t.displayName?"AI Agent Name...":"Add Notes here...")("ngModel",t.comments)}}function zZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",285),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw().enableNoteEdit(e,n)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.ekj("expanded",e.isNoteExpanded[t.id]),o.xp6(1),o.hij(" ",t.comments," ")}}function VZ(t,e){if(1&t&&(o.TgZ(0,"span",286),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij(" ",(null==t.comments?null:t.comments.length)||0,"/180 ")}}function GZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",287),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw().toggleNoteExpand(e,n)}),o.O4$(),o.TgZ(1,"svg",288),o._UZ(2,"path",289),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.xp6(2),o.uIk("transform",e.isNoteExpanded[t.id]?"rotate(180 8 8)":null)}}function WZ(t,e){if(1&t&&(o.TgZ(0,"div",278),o.TgZ(1,"div",279),o.YNc(2,YZ,1,5,"input",280),o.YNc(3,zZ,2,3,"p",281),o.YNc(4,VZ,2,1,"span",282),o.qZA(),o.YNc(5,GZ,3,1,"div",283),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw();o.xp6(2),o.Q6J("ngIf",e.noteInputFocused[t.id]||!t.comments),o.xp6(1),o.Q6J("ngIf",!e.noteInputFocused[t.id]&&t.comments),o.xp6(1),o.Q6J("ngIf",e.noteInputFocused[t.id]),o.xp6(1),o.Q6J("ngIf",!e.noteInputFocused[t.id]&&(null==t||null==t.comments?null:t.comments.length)>35)}}function KZ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",295),o.TgZ(1,"span"),o._UZ(2,"img",229),o.TgZ(3,"span"),o._uU(4,"Attachment Headers Content Disposition"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.xp6(2),o.Q6J("src",e.getImagePath(t),o.LSH)("alt",e.displayName)}}function XZ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",290),o.TgZ(1,"button",291),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2),e.stopPropagation()}),o._uU(2," Only continue if "),o.O4$(),o.TgZ(3,"svg",292),o._UZ(4,"path",293),o.qZA(),o.qZA(),o.YNc(5,KZ,5,2,"div",294),o.qZA()}2&t&&(o.xp6(5),o.Q6J("ngIf",!1))}function tk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",306),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw().goToConnectApp(n.connectorId,!0),e.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",288),o.TgZ(2,"g",307),o._UZ(3,"path",308),o._UZ(4,"path",309),o._UZ(5,"path",310),o._UZ(6,"path",311),o._UZ(7,"path",312),o._UZ(8,"path",313),o._UZ(9,"path",314),o.qZA(),o.qZA(),o._uU(10," Change app "),o.qZA()}}function ek(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",306),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3).$implicit;return o.oxw().handleDuplicateNode(e)}),o.O4$(),o.TgZ(1,"svg",288),o.TgZ(2,"g",315),o._UZ(3,"path",316),o.qZA(),o.qZA(),o._uU(4," Duplicate"),o.qZA()}}function nk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",317),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).$implicit;return o.oxw().setConfirmDelete(n.connectorId,!0),e.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",288),o._UZ(2,"path",318),o.qZA(),o._uU(3," Delete "),o.qZA()}}function ik(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",317),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3).$implicit,i=o.oxw();return i.deleteNodePopup(n),i.clearConfirmDelete(n.connectorId),e.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",288),o._UZ(2,"path",318),o.qZA(),o._uU(3," Sure to delete? "),o.qZA()}}
1function ok(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",303),o.YNc(1,tk,11,0,"button",304),o.YNc(2,ek,5,0,"button",304),o.YNc(3,nk,4,0,"button",305),o.YNc(4,ik,4,0,"button",305),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw();o.xp6(1),o.Q6J("ngIf",!o.DdM(4,wZ).includes(t.headerName)&&t.displayName),o.xp6(1),o.Q6J("ngIf",0!=t.connectorId&&t.displayName),o.xp6(1),o.Q6J("ngIf",0!=t.connectorId&&!e.getConfirmDelete(t.connectorId)&&e.graph_data.length>1),o.xp6(1),o.Q6J("ngIf",0!=t.connectorId&&e.getConfirmDelete(t.connectorId))}}function rk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",296,200),o.TgZ(2,"button",297),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().toggleNodeMenu(n),e.stopPropagation()}),o.O4$(),o.TgZ(3,"svg",298),o._UZ(4,"path",299),o._UZ(5,"path",300),o._UZ(6,"path",301),o.qZA(),o.qZA(),o.YNc(7,ok,5,5,"div",302),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("ngClass",o.VKq(3,FZ,e.activeNodeMenu===t.connectorId)),o.xp6(2),o.Q6J("disabled","preview"==e.globalAction),o.xp6(5),o.Q6J("ngIf",e.activeNodeMenu===t.connectorId)}}function sk(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",322,200),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",201),o.TgZ(3,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).createNodeFlow()}),o.O4$(),o.TgZ(4,"svg",21),o._UZ(5,"path",203),o._UZ(6,"path",204),o._UZ(7,"path",205),o._UZ(8,"path",206),o.qZA(),o._uU(9," Add Action App "),o.TgZ(10,"svg",207),o._UZ(11,"path",198),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).createAIAgentNode()}),o.O4$(),o.TgZ(13,"svg",208),o._UZ(14,"path",209),o.qZA(),o._uU(15," Add AI Agent "),o.TgZ(16,"svg",207),o._UZ(17,"path",198),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"button",202),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).createBranchFlow()}),o.O4$(),o.TgZ(19,"svg",21),o._UZ(20,"path",210),o.qZA(),o._uU(21," Add Flow "),o.TgZ(22,"svg",207),o._UZ(23,"path",198),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}const ak=function(t){return{"button-blinking":t}};function ck(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",319),o.TgZ(1,"button",320),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(),i=n.$implicit,r=n.index,s=o.oxw();return e.stopPropagation(),s.onSecondAction(i,r)}),o.O4$(),o.TgZ(2,"svg",197),o._UZ(3,"path",198),o.qZA(),o.qZA(),o.YNc(4,sk,24,0,"div",321),o.qZA()}if(2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw();o.ekj("blue-plus-secondary",i.isNodeComplete(e.connectorId)),o.Q6J("ngClass",o.VKq(7,ak,"trigger"===i.nodeType&&0===i.currentApp.index)),o.xp6(1),o.ekj("blue-plus-btn",i.isNodeComplete(e.connectorId)),o.Q6J("disabled","preview"==i.globalAction),o.xp6(3),o.Q6J("ngIf",i.showToolbarMenu&&i.isLastNode(e)&&i.lastActiveConnection===n)}}const lk=function(t){return{"f-node-error":t}};function dk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",211),o.NdJ("mousedown",function(e){return o.CHM(t),o.oxw().onMouseDown(e)})("mousemove",function(e){return o.CHM(t),o.oxw().onMouseMove(e)})("click",function(e){const n=o.CHM(t).$implicit;return o.oxw().onClickNode(e,n)}),o.YNc(1,mZ,4,6,"div",212),o.TgZ(2,"div",213),o.TgZ(3,"div",214),o.YNc(4,vZ,1,2,"img",215),o.YNc(5,bZ,1,0,"span",216),o.YNc(6,xZ,4,0,"span",217),o.YNc(7,_Z,5,0,"ng-template",null,218,o.W1O),o.TgZ(9,"div",219),o.YNc(10,CZ,2,0,"h2",47),o.YNc(11,yZ,2,2,"h2",47),o.YNc(12,jZ,28,28,"div",220),o.YNc(13,$Z,1,2,"ng-template",null,221,o.W1O),o.YNc(15,QZ,3,8,"ng-template",null,222,o.W1O),o.qZA(),o.qZA(),o.YNc(17,WZ,6,4,"div",223),o.YNc(18,XZ,6,1,"div",224),o.qZA(),o.YNc(19,rk,8,5,"div",225),o.YNc(20,ck,5,9,"div",226),o.qZA()}if(2&t){const t=e.$implicit,n=o.MAs(8),i=o.MAs(14),r=o.oxw();o.ekj("f-active-node",(null==r.currentApp?null:r.currentApp.index)==t.connectorId)("blue-node",r.isNodeComplete(t.connectorId))("f-not-selected","Flow"==t.headerName),o.Q6J("fNodePosition",t.position)("fOutputId",t.connectorId)("fOutputConnectableSide",r.configuration.outputSide)("fInputId",t.connectorId)("fInputConnectableSide",r.configuration.inputSide)("ngClass",o.VKq(25,lk,r.hasError(t.connectorId))),o.xp6(1),o.Q6J("ngIf","Flow"==t.headerName&&r.hasExactlyTwoChildren(t)),o.xp6(3),o.Q6J("ngIf",t.imageFinal)("ngIfElse",n),o.xp6(1),o.Q6J("ngIf","Flow"===t.headerName&&r.areImmediateChildNodesComplete(t)||"Flow"!==t.headerName&&"complete"==r.getNodeStatus(t.connectorId)),o.xp6(1),o.Q6J("ngIf","Flow"===t.headerName&&!r.areImmediateChildNodesComplete(t)&&t.displayName||"Flow"!==t.headerName&&"complete"!=r.getNodeStatus(t.connectorId)&&t.displayName),o.xp6(4),o.Q6J("ngIf",0==t.connectorId),o.xp6(1),o.Q6J("ngIf",0!=t.connectorId),o.xp6(1),o.Q6J("ngIf","AI Agent"==t.displayName)("ngIfElse",i),o.xp6(5),o.Q6J("ngIf",t),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",r.graph_data.length>1||t.displayName),o.xp6(1),o.Q6J("ngIf",r.isLastNode(t))}}function uk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",337),o._UZ(1,"span",338),o.TgZ(2,"label",339),o._uU(3),o.qZA(),o.TgZ(4,"button",340),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).removeSelectedValue(),e.stopPropagation()}),o._UZ(5,"i",341),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(3),o.hij("",t.getChatModelDisplayValue()," ")}}function pk(t,e){1&t&&(o.TgZ(0,"span",342),o._uU(1,"Select LLM Model"),o.qZA())}function hk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",345),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;
1return o.oxw(3).updateChatModel(n.value,n.displayName),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.Q6J("ngClass",o.VKq(2,FZ,n.getSelectedChatModel()===t.value)),o.xp6(1),o.hij(" ",t.displayName," ")}}function gk(t,e){if(1&t&&(o.TgZ(0,"div",343),o.TgZ(1,"ul",295),o.YNc(2,hk,2,4,"li",344),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("ngForOf",t.chatModels)}}function fk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",328),o.TgZ(1,"label"),o._uU(2,"LLM API Key "),o.TgZ(3,"sup"),o._uU(4,"*"),o.qZA(),o.qZA(),o.TgZ(5,"input",346),o.NdJ("input",function(e){return o.CHM(t),o.oxw(2).updateChatModelApiKey(e)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(5),o.Q6J("value",t.getChatModelApiKeyValue())}}function mk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",348),o._UZ(1,"span",338),o.TgZ(2,"label",339),o._uU(3),o.qZA(),o.TgZ(4,"button",340),o.NdJ("click",function(e){return o.CHM(t),o.oxw(3).clearSelectedSubModel(),e.stopPropagation()}),o._UZ(5,"i",341),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(3),o.hij("",t.getSelectedSubModelDisplayValue()," ")}}function vk(t,e){1&t&&(o.TgZ(0,"span",342),o._uU(1,"Select Model"),o.qZA())}function bk(t,e){1&t&&(o.TgZ(0,"li",350),o._uU(1," Loading models... "),o.qZA())}function xk(t,e){1&t&&(o.TgZ(0,"li",350),o._uU(1," No models available "),o.qZA())}function _k(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",345),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).updateSubModel(n.value,n.displayName),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.Q6J("ngClass",o.VKq(2,FZ,n.getSelectedSubModel()===t.value)),o.xp6(1),o.hij(" ",t.displayName," ")}}function Ck(t,e){if(1&t&&(o.TgZ(0,"div",343),o.TgZ(1,"ul",295),o.YNc(2,bk,2,0,"li",349),o.YNc(3,xk,2,0,"li",349),o.YNc(4,_k,2,4,"li",344),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("ngIf",t.isLoadingSubModels),o.xp6(1),o.Q6J("ngIf",!t.isLoadingSubModels&&0===t.getAvailableSubModels().length),o.xp6(1),o.Q6J("ngForOf",t.getAvailableSubModels())}}function wk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",328),o.TgZ(1,"label"),o._uU(2,"Model "),o.TgZ(3,"sup"),o._uU(4,"*"),o.qZA(),o.qZA(),o.TgZ(5,"div",329),o.TgZ(6,"div",330),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).toggleSubModelMenu(),e.stopPropagation()}),o.YNc(7,mk,6,1,"div",347),o.YNc(8,vk,2,0,"span",332),o.YNc(9,Ck,5,3,"div",333),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("ngClass",o.VKq(4,FZ,t.menuOpenSubModel)),o.xp6(1),o.Q6J("ngIf",t.getSelectedSubModel()),o.xp6(1),o.Q6J("ngIf",!t.getSelectedSubModel()),o.xp6(1),o.Q6J("ngIf",t.menuOpenSubModel)}}function yk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",323),o.TgZ(1,"div",324),o.TgZ(2,"h2",325),o._uU(3,"AI Agent LLM Model"),o.qZA(),o.qZA(),o.TgZ(4,"div",326),o.TgZ(5,"div",327),o.TgZ(6,"div",328),o.TgZ(7,"label"),o._uU(8," LLM Model "),o.TgZ(9,"sup"),o._uU(10,"*"),o.qZA(),o.qZA(),o.TgZ(11,"div",329),o.TgZ(12,"div",330),o.NdJ("click",function(e){return o.CHM(t),o.oxw().toggleMenu(),e.stopPropagation()}),o.YNc(13,uk,6,1,"div",331),o.YNc(14,pk,2,0,"span",332),o.YNc(15,gk,3,1,"div",333),o.qZA(),o.qZA(),o.qZA(),o.YNc(16,fk,6,1,"div",334),o.YNc(17,wk,10,6,"div",334),o.qZA(),o.qZA(),o.TgZ(18,"div",335),o.TgZ(19,"button",336),o.NdJ("click",function(){return o.CHM(t),o.oxw().saveAIAgentConfiguration()}),o._uU(20,"Continue & Run Test"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(12),o.Q6J("ngClass",o.VKq(7,FZ,t.menuOpenModel)),o.xp6(1),o.Q6J("ngIf",t.getSelectedChatModel()),o.xp6(1),o.Q6J("ngIf",!t.getSelectedChatModel()),o.xp6(1),o.Q6J("ngIf",t.menuOpenModel),o.xp6(1),o.Q6J("ngIf",""!==t.getSelectedChatModel()&&"Appy Pie Flawless Text"!==t.getSelectedChatModel()),o.xp6(1),o.Q6J("ngIf",t.hasSubModels()&&t.getChatModelApiKeyValue()&&t.getChatModelApiKeyValue().trim()),o.xp6(2),o.Q6J("disabled",!t.isChatModelReady())}}function Ak(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",362),o._UZ(1,"span",338),o.TgZ(2,"label",339),o._uU(3),o.qZA(),o.TgZ(4,"button",363),o.NdJ("click",function(e){const n=o.CHM(t).index;return o.oxw(3).removeSelectedTool(n),e.stopPropagation()}),o._UZ(5,"i",341),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index;
1o.MGl("id","chat0",n,""),o.xp6(3),o.Oqu(t.display_value||t.value),o.xp6(1),o.MGl("id","close",n,"")}}function Zk(t,e){1&t&&(o.TgZ(0,"span",342),o._uU(1,"Select Tool"),o.qZA())}function kk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",345),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).updateTool(e.connectId,e.connectId+" - "+e.displayName)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.Q6J("ngClass",o.VKq(3,FZ,n.isToolSelected(t.connectId))),o.xp6(1),o.AsE(" ",t.connectId," - ",t.displayName," ")}}function Tk(t,e){1&t&&(o.TgZ(0,"li",350),o._uU(1," No tool selected. click add tool. "),o.qZA())}function Ok(t,e){if(1&t&&(o.TgZ(0,"div",343),o.TgZ(1,"ul",295),o.YNc(2,kk,2,5,"li",344),o.YNc(3,Tk,2,0,"li",349),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("ngForOf",t.publishedActiveConnects),o.xp6(1),o.Q6J("ngIf",0===t.publishedActiveConnects.length)}}function Mk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",328),o.TgZ(1,"label"),o._uU(2," Tool "),o.TgZ(3,"sup"),o._uU(4,"*"),o.qZA(),o.qZA(),o.TgZ(5,"div",329),o.TgZ(6,"div",360),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).toggleMenukey(),e.stopPropagation()}),o.YNc(7,Ak,6,3,"div",361),o.YNc(8,Zk,2,0,"span",332),o.YNc(9,Ok,4,2,"div",333),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("ngClass",o.VKq(4,FZ,t.menuOpenModelKey)),o.xp6(1),o.Q6J("ngForOf",t.selectedTools),o.xp6(1),o.Q6J("ngIf",0===t.getSelectedTools().length),o.xp6(1),o.Q6J("ngIf",t.menuOpenModelKey)}}function Ik(t,e){1&t&&(o.TgZ(0,"div",364),o._uU(1,"No tools selected yet."),o.qZA())}function Sk(t,e){if(1&t&&(o.TgZ(0,"div",364),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.description)}}function Pk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",365),o.TgZ(1,"div",366),o.TgZ(2,"div",367),o._uU(3),o.qZA(),o.YNc(4,Sk,2,1,"div",354),o.qZA(),o.TgZ(5,"button",368),o.NdJ("click",function(e){const n=o.CHM(t).index;return o.oxw(2).removeSelectedTool(n),e.stopPropagation()}),o._UZ(6,"i",341),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(3),o.Oqu(t.display_value||t.value),o.xp6(1),o.Q6J("ngIf",t.description)}}function Nk(t,e){if(1&t&&(o.TgZ(0,"option",375),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.Q6J("value",t.connectId),o.xp6(1),o.AsE(" ",t.connectId," - ",t.displayName," ")}}function qk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",352),o.TgZ(1,"label",369),o._uU(2,"Tool Name"),o.qZA(),o.TgZ(3,"input",376),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).pendingToolName=e}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(3),o.Q6J("ngModel",t.pendingToolName)("disabled",t.isAddingTool)}}function Uk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",352),o.TgZ(1,"label",369),o._uU(2,"Tool Description"),o.qZA(),o.TgZ(3,"textarea",377),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).pendingToolDescription=e}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(3),o.Q6J("ngModel",t.pendingToolDescription)("disabled",t.isAddingTool)}}function Ek(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Add Tool"),o.qZA())}function Fk(t,e){1&t&&(o.TgZ(0,"span"),o._UZ(1,"span",378),o._uU(2," Analyzing tool\u2026 "),o.qZA())}function Dk(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"div",352),o.TgZ(2,"label",369),o._uU(3,"Add Tool"),o.qZA(),o.TgZ(4,"select",370),o.NdJ("change",function(e){return o.CHM(t),o.oxw(2).onPendingToolSelect(e)}),o.TgZ(5,"option",371),o._uU(6,"Select a tool"),o.qZA(),o.YNc(7,Nk,2,3,"option",372),o.qZA(),o.qZA(),o.YNc(8,qk,4,2,"div",373),o.YNc(9,Uk,4,2,"div",373),o.TgZ(10,"button",374),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).addSelectedToolWithDescription()}),o.YNc(11,Ek,2,0,"span",47),o.YNc(12,Fk,3,0,"span",47),o.qZA(),o.BQk()}if(2&t){const t=o.oxw(2);o.xp6(4),o.Q6J("disabled",t.isAddingTool),o.xp6(3),o.Q6J("ngForOf",t.getAvailableToolsForDropdown()),o.xp6(1),o.Q6J("ngIf",t.pendingToolId),o.xp6(1),o.Q6J("ngIf",t.pendingToolId),o.xp6(1),o.Q6J("disabled",t.isAddingTool||!t.canAddPendingTool()),o.xp6(1),o.Q6J("ngIf",!t.isAddingTool),o.xp6(1),o.Q6J("ngIf",t.isAddingTool)}}function Lk(t,e){1&t&&(o.TgZ(0,"div",364),o._uU(1," No tools available to select. Click \u201cAdd a new tool\u201d to create one. "),o.qZA())}function Jk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",379),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).addNewTool()}),o._UZ(1,"i",380),o._uU(2," Add a new tool "),o.qZA()}}function jk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",381),o.TgZ(1,"p",382),o._uU(2,"Select Node Type:"),o.qZA(),o.TgZ(3,"div",383),o.TgZ(4,"button",384),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).selectNodeTypeForTool("trigger")}),o._uU(5," Trigger "),o.qZA(),o.TgZ(6,"button",385),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).selectNodeTypeForTool("action")}),o._uU(7," Action "),o.qZA(),o.TgZ(8,"button",386),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).cancelNodeTypeSelection()}),o._uU(9," Cancel "),o.qZA(),o.qZA(),o.qZA()}}function Rk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",323),o.TgZ(1,"div",324),o.TgZ(2,"h2",325),o._uU(3,"AI Agent Tool"),o.qZA(),o.qZA(),o.TgZ(4,"div",326),o.TgZ(5,"div",327),o.YNc(6,Mk,10,6,"div",334),o.TgZ(7,"div",328),o.TgZ(8,"label"),o._uU(9,"Tool Selection (New)"),o.qZA(),o.TgZ(10,"div",351),o.TgZ(11,"div",352),o.TgZ(12,"div",353),o._uU(13,"Selected Tools"),o.qZA(),o.YNc(14,Ik,2,0,"div",354),o.YNc(15,Pk,7,2,"div",355),o.qZA(),o.YNc(16,Dk,13,7,"ng-container",356),o.YNc(17,Lk,2,0,"ng-template",null,357,o.W1O),o.qZA(),o.qZA(),o.TgZ(19,"div",328),o.YNc(20,Jk,3,0,"button",358),o.YNc(21,jk,10,0,"div",359),o.qZA(),o.qZA(),o.qZA(),o.TgZ(22,"div",335),o.TgZ(23,"button",336),o.NdJ("click",function(){return o.CHM(t),o.oxw().saveAIAgentConfiguration()}),o._uU(24,"Continue & Run Test"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.MAs(18),e=o.oxw();let n;o.xp6(6),o.Q6J("ngIf",e.showOldToolUI),o.xp6(8),o.Q6J("ngIf",0===e.selectedTools.length),o.xp6(1),o.Q6J("ngForOf",e.selectedTools),o.xp6(1),o.Q6J("ngIf",(null==(n=e.getAvailableToolsForDropdown())?null:n.length)>0)("ngIfElse",t),o.xp6(4),o.Q6J("ngIf",!e.showNodeTypeSelection),o.xp6(1),o.Q6J("ngIf",e.showNodeTypeSelection),o.xp6(2),o.Q6J("disabled",!e.isToolReady())}}function $k(t,e){1&t&&(o.TgZ(0,"div",366),o._UZ(1,"span",398),o.qZA())}const Bk=function(t){return{"line-remove":t}};
1function Hk(t,e){if(1&t&&(o.TgZ(0,"div",399),o.TgZ(1,"h2",400),o._uU(2,"Trigger Details"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(1,Bk,"preview"==t.currentApp.currentAction))}}function Qk(t,e){if(1&t&&(o.TgZ(0,"div",399),o.TgZ(1,"h2",400),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(2,Bk,"preview"==t.currentApp.currentAction)),o.xp6(2),o.hij(" ",t.getHeaderTitle()," ")}}const Yk=function(t){return{"rotate-180":t}};function zk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",401),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).expandFullScreen()}),o.O4$(),o.TgZ(1,"svg",402),o._UZ(2,"polyline",403),o._UZ(3,"polyline",404),o._UZ(4,"line",405),o._UZ(5,"line",406),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(1,Yk,t.isFullScreen))}}function Vk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",407),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).expandFullScreen()}),o.O4$(),o.TgZ(1,"svg",402),o._UZ(2,"polyline",408),o._UZ(3,"polyline",409),o._UZ(4,"line",410),o._UZ(5,"line",411),o.qZA(),o.qZA()}}function Gk(t,e){1&t&&(o.TgZ(0,"div",412),o.TgZ(1,"div",413),o._UZ(2,"span",414),o.TgZ(3,"div",415),o._UZ(4,"span",416),o._UZ(5,"span",417),o.qZA(),o.qZA(),o._UZ(6,"span",418),o._UZ(7,"span",419),o._UZ(8,"span",418),o._UZ(9,"span",419),o._UZ(10,"span",418),o._UZ(11,"span",420),o.qZA())}function Wk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",436),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).selectLanguageModel(e)}),o.TgZ(1,"div",437),o._uU(2),o.qZA(),o.TgZ(3,"div",438),o.TgZ(4,"h3"),o._uU(5),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.TgZ(8,"div",439),o.TgZ(9,"span",440),o._uU(10),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(2),o.Oqu(t.icon),o.xp6(3),o.Oqu(t.name),o.xp6(2),o.Oqu(t.description),o.xp6(3),o.Oqu(t.provider)}}function Kk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",425),o.TgZ(1,"div",426),o.TgZ(2,"div",427),o.TgZ(3,"div"),o.TgZ(4,"h2",428),o._uU(5,"Language Models"),o.qZA(),o.TgZ(6,"p",429),o._uU(7,"Choose a chat model for your AI Agent"),o.qZA(),o.qZA(),o.TgZ(8,"button",430),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).closeChatModelPanel()}),o.O4$(),o.TgZ(9,"svg",431),o._UZ(10,"line",432),o._UZ(11,"line",433),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"div",434),o.YNc(13,Wk,11,4,"div",435),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(13),o.Q6J("ngForOf",t.languageModels)}}function Xk(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",441),o.TgZ(1,"div",426),o.TgZ(2,"div",427),o.TgZ(3,"div",442),o.O4$(),o.TgZ(4,"svg",443),o._UZ(5,"path",444),o.qZA(),o.kcU(),o.TgZ(6,"h4",445),o._uU(7,"AI Agent Configuration"),o.qZA(),o.qZA(),o.TgZ(8,"button",446),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.isAIAgentMode=!1,e.isPanelVisible=!1}),o.O4$(),o.TgZ(9,"svg",447),o._UZ(10,"path",448),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(11,"div",449),o.TgZ(12,"div",328),o.TgZ(13,"label"),o._uU(14,"Prompt (User Message)"),o.qZA(),o.TgZ(15,"textarea",450),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).aiAgentPrompt=e}),o.qZA(),o.qZA(),o.TgZ(16,"div",328),o.TgZ(17,"label"),o._uU(18,"System Message (Optional)"),o.qZA(),o.TgZ(19,"textarea",451),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).aiAgentSystemMessage=e}),o.qZA(),o.qZA(),o.TgZ(20,"div",383),o.TgZ(21,"button",452),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).saveAIAgentConfiguration()}),o._uU(22,"Save Configuration"),o.qZA(),o.TgZ(23,"button",453),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).runAIAgent()}),o._uU(24,"Run Prompt"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(15),o.Q6J("ngModel",t.aiAgentPrompt),o.xp6(4),o.Q6J("ngModel",t.aiAgentSystemMessage)}}function tT(t,e){1&t&&o._UZ(0,"img",480)}function eT(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+t.currentApp.image,o.LSH)}}function nT(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+t.connectList[0].image,o.LSH)}}function iT(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Oqu(t.connectList[0].displayName)}}function oT(t,e){1&t&&o._UZ(0,"span",230)}function rT(t,e){1&t&&(o.TgZ(0,"span",231),o.O4$(),o.TgZ(1,"svg",482),o._UZ(2,"path",483),o._UZ(3,"path",484),o.qZA(),o.qZA())}const sT=function(t){return{open:t}};function aT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",485),o.TgZ(1,"button",486),o._UZ(2,"i",487),o.qZA(),o.TgZ(3,"ul",488),o.TgZ(4,"li"),o.TgZ(5,"a",489),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).goToConnectApp(0)}),o._UZ(6,"img",490),o._uU(7," Edit"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5);o.Q6J("ngClass",o.VKq(2,sT,0==t.openedEditDeleteDropbtn)),o.xp6(1),o.Q6J("disabled","preview"==t.globalAction)}}function cT(t,e){1&t&&o._UZ(0,"img",480)}function lT(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+t.currentApp.image,o.LSH)}}function dT(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+t.connectList[1].image,o.LSH)}}
1function uT(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Oqu(t.connectList[1].displayName)}}function pT(t,e){1&t&&o._UZ(0,"span",230)}function hT(t,e){1&t&&(o.TgZ(0,"span",231),o.O4$(),o.TgZ(1,"svg",482),o._UZ(2,"path",483),o._UZ(3,"path",484),o.qZA(),o.qZA())}function gT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"a",493),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.deleteNode(e.connectList[1])}),o._UZ(2,"img",494),o._uU(3," Delete"),o.qZA(),o.qZA()}}function fT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"a",489),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).goToConnectApp(1)}),o._UZ(2,"img",490),o._uU(3," Edit"),o.qZA(),o.qZA()}}function mT(t,e){if(1&t&&(o.TgZ(0,"div",485),o.TgZ(1,"button",491),o._UZ(2,"i",487),o.qZA(),o.TgZ(3,"ul",492),o.YNc(4,gT,4,0,"li",47),o.YNc(5,fT,4,0,"li",47),o.qZA(),o.qZA()),2&t){const t=o.oxw(5);o.Q6J("ngClass",o.VKq(4,sT,1==t.openedEditDeleteDropbtn)),o.xp6(1),o.Q6J("disabled","preview"==t.globalAction),o.xp6(3),o.Q6J("ngIf",!t.isTemplate),o.xp6(1),o.Q6J("ngIf",1!==t.currentApp.index||"overview"===t.currentApp.currentAction)}}function vT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",474),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).createNode("addAction",1,"actions",0)}),o._UZ(1,"i",475),o.qZA()}if(2&t){const t=o.oxw(6);o.Q6J("disabled","preview"==t.globalAction)}}function bT(t,e){if(1&t&&(o.TgZ(0,"div",473),o.YNc(1,vT,2,1,"button",495),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngIf",!t.isTemplate)}}function xT(t,e){1&t&&o._UZ(0,"img",480)}function _T(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw(6);o.Q6J("src",t.appyConfig.cdnMediaPath+t.currentApp.image,o.LSH)}}function CT(t,e){if(1&t&&o._UZ(0,"img",481),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.Q6J("src",e.appyConfig.cdnMediaPath+t.image,o.LSH)}}function wT(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.displayName)}}function yT(t,e){1&t&&o._UZ(0,"span",230)}function AT(t,e){1&t&&(o.TgZ(0,"span",231),o.O4$(),o.TgZ(1,"svg",482),o._UZ(2,"path",483),o._UZ(3,"path",484),o.qZA(),o.qZA())}function ZT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"a",493),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit,n=o.oxw(5);return n.deleteNode(n.connectList[e.index])}),o._UZ(2,"img",494),o._uU(3," Delete"),o.qZA(),o.qZA()}}function kT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",489),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(5).goToConnectApp(e.index)}),o._UZ(1,"img",490),o._uU(2," Edit"),o.qZA()}}function TT(t,e){if(1&t&&(o.TgZ(0,"li"),o.YNc(1,kT,3,0,"a",499),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",(null==e.currentApp?null:e.currentApp.index)!==(null==t?null:t.index)||e.currentApp&&"overview"===e.currentApp.currentAction)}}function OT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",474),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(5).createNode("addAction",e.index,"actions",0)}),o._UZ(1,"i",475),o.qZA()}if(2&t){const t=o.oxw(7);o.Q6J("disabled","preview"==t.globalAction)}}function MT(t,e){if(1&t&&(o.TgZ(0,"div",473),o.YNc(1,OT,2,1,"button",495),o.qZA()),2&t){const t=o.oxw(6);o.xp6(1),o.Q6J("ngIf",!t.isTemplate)}}const IT=function(t,e){return{"focus-activecont1":t,"focus-activecont":e}};function ST(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",476),o.TgZ(1,"div",465),o.TgZ(2,"span",466),o.YNc(3,xT,1,0,"img",467),o.YNc(4,_T,1,1,"img",468),o.YNc(5,CT,1,1,"img",468),o.qZA(),o.TgZ(6,"div",469),o.TgZ(7,"a",470),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).goToConnectApp(e.index)}),o.TgZ(8,"h5"),o._uU(9,"Action"),o.qZA(),o.YNc(10,wT,2,1,"span",47),o.qZA(),o.qZA(),o.YNc(11,yT,1,0,"span",216),o.YNc(12,AT,4,0,"span",217),o.qZA(),o.TgZ(13,"div",496),o.TgZ(14,"button",497),o._UZ(15,"i",487),o.qZA(),o.TgZ(16,"ul",498),o.YNc(17,ZT,4,0,"li",47),o.YNc(18,TT,2,1,"li",47),o.qZA(),o.qZA(),o.TgZ(19,"div",472),o.YNc(20,MT,2,1,"div",477),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(5);o.Q6J("ngClass",o.WLB(13,IT,t&&"action"===t.nodeType,t&&i.connectList&&t.nodeId&&i.currentApp.nodeId===t.nodeId&&i.currentApp&&"overview"!==i.currentApp.currentAction)),o.xp6(3),o.Q6J("ngIf",!t||i.currentApp.index==t.index&&!i.currentApp.image||i.currentApp.index!==t.index&&!t.image),o.xp6(1),o.Q6J("ngIf",t&&i.currentApp.image&&i.currentApp.index==t.index),o.xp6(1),o.Q6J("ngIf",t&&i.currentApp.index!==t.index&&t.image),o.xp6(5),o.Q6J("ngIf",t&&t.name),o.xp6(1),o.Q6J("ngIf",i.checkSampleDataByIndex(i.
1connectList,n+2)&&i.unMappedFields(n+2)&&i.allTriggerNotFoundIndex!=n+2),o.xp6(1),o.Q6J("ngIf",(!i.checkSampleDataByIndex(i.connectList,n+2)||!i.unMappedFields(n+2)||i.allTriggerNotFoundIndex==n+2)&&(null==i.connectList[n+2]?null:i.connectList[n+2].isLoadedFromDB)),o.xp6(1),o.Q6J("hidden",i.isTemplate&&i.currentApp.index==t.index&&"overview"!==i.currentApp.currentAction)("ngClass",o.VKq(16,sT,t&&i.openedEditDeleteDropbtn==t.index)),o.xp6(1),o.Q6J("disabled","preview"==i.globalAction),o.xp6(3),o.Q6J("ngIf",!i.isTemplate),o.xp6(1),o.Q6J("ngIf",(null==i.currentApp?null:i.currentApp.index)!==(null==t?null:t.index)||i.currentApp&&"overview"===i.currentApp.currentAction),o.xp6(2),o.Q6J("ngIf",!i.isTemplate||i.isTemplate&&i.connectList.length>t.index+1)}}function PT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",463),o.TgZ(1,"div",464),o.TgZ(2,"div",465),o.TgZ(3,"span",466),o.YNc(4,tT,1,0,"img",467),o.YNc(5,eT,1,1,"img",468),o.YNc(6,nT,1,1,"img",468),o.qZA(),o.TgZ(7,"div",469),o.TgZ(8,"a",470),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).goToConnectApp(0)}),o.TgZ(9,"h5"),o._uU(10,"Trigger"),o.qZA(),o.YNc(11,iT,2,1,"span",47),o.qZA(),o.qZA(),o.YNc(12,oT,1,0,"span",216),o.YNc(13,rT,4,0,"span",217),o.qZA(),o.YNc(14,aT,8,4,"div",471),o.TgZ(15,"div",472),o.TgZ(16,"div",473),o.TgZ(17,"button",474),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).createNode("addAction",0,"actions",0)}),o._UZ(18,"i",475),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(19,"div",476),o.TgZ(20,"div",465),o.TgZ(21,"span",466),o.YNc(22,cT,1,0,"img",467),o.YNc(23,lT,1,1,"img",468),o.YNc(24,dT,1,1,"img",468),o.qZA(),o.TgZ(25,"div",469),o.TgZ(26,"a",470),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).goToConnectApp(1)}),o.TgZ(27,"h5"),o._uU(28,"Action"),o.qZA(),o.YNc(29,uT,2,1,"span",47),o.qZA(),o.qZA(),o.YNc(30,pT,1,0,"span",216),o.YNc(31,hT,4,0,"span",217),o.qZA(),o.YNc(32,mT,6,6,"div",471),o.TgZ(33,"div",472),o.YNc(34,bT,2,1,"div",477),o.qZA(),o.TgZ(35,"div",478),o._uU(36,"Attn!"),o.qZA(),o.qZA(),o.YNc(37,ST,21,18,"div",479),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.WLB(19,IT,t.connectList&&t.connectList[0]&&"trigger"===t.connectList[0].nodeType,t.connectList&&t.connectList[0]&&t.connectList[0].nodeId&&t.currentApp&&t.currentApp.nodeId===t.connectList[0].nodeId&&t.currentApp&&"overview"!==t.currentApp.currentAction)),o.xp6(3),o.Q6J("ngIf",!t.connectList[0]||t.currentApp.index==t.connectList[0].index&&!t.currentApp.image||t.currentApp.index!==t.connectList[0].index&&!t.connectList[0].image),o.xp6(1),o.Q6J("ngIf",t.connectList[0]&&t.currentApp.image&&t.currentApp.index==t.connectList[0].index),o.xp6(1),o.Q6J("ngIf",t.connectList[0]&&t.currentApp.index!==t.connectList[0].index&&t.connectList[0].image),o.xp6(5),o.Q6J("ngIf",t.connectList[0]&&t.connectList[0].name),o.xp6(1),o.Q6J("ngIf",t.checkSampleDataByIndex(t.connectList,0)),o.xp6(1),o.Q6J("ngIf",!t.checkSampleDataByIndex(t.connectList,0)&&(null==t.connectList[0]?null:t.connectList[0].isLoadedFromDB)),o.xp6(1),o.Q6J("ngIf",0!==t.currentApp.index),o.xp6(3),o.Q6J("disabled","preview"==t.globalAction),o.xp6(2),o.Q6J("ngClass",o.WLB(22,IT,t.connectList&&t.connectList[1]&&"action"===t.connectList[1].nodeType,t.connectList&&t.connectList[1]&&t.connectList[1].nodeId&&t.currentApp.nodeId===t.connectList[1].nodeId&&t.currentApp&&"overview"!==t.currentApp.currentAction)),o.xp6(3),o.Q6J("ngIf",!t.connectList[1]||t.currentApp.index==t.connectList[1].index&&!t.currentApp.image||t.currentApp.index!==t.connectList[1].index&&!t.connectList[1].image),o.xp6(1),o.Q6J("ngIf",t.connectList[1]&&t.currentApp.image&&t.currentApp.index==t.connectList[1].index),o.xp6(1),o.Q6J("ngIf",t.connectList[1]&&t.currentApp.index!==t.connectList[1].index&&t.connectList[1].image),o.xp6(5),o.Q6J("ngIf",t.connectList[1]&&t.connectList[1].name),o.xp6(1),o.Q6J("ngIf",t.checkSampleDataByIndex(t.connectList,1)&&t.unMappedFields(1)&&1!=t.allTriggerNotFoundIndex),o.xp6(1),o.Q6J("ngIf",(!t.checkSampleDataByIndex(t.connectList,1)||!t.unMappedFields(1)||1==t.allTriggerNotFoundIndex)&&(null==t.connectList[1]?null:t.connectList[1].isLoadedFromDB)),o.xp6(1),o.Q6J("ngIf",t.connectList[1]&&(t.connectList[2]||t.connectList[1].name)&&(!t.isTemplate||t.isTemplate&&(1!==t.currentApp.index||"overview"===t.currentApp.currentAction))),o.xp6(2),o.Q6J("ngIf",!t.isTemplate||t.isTemplate&&t.connectList.length>2),o.xp6(3),o.Q6J("ngForOf",t.connectList.slice(2,t.connectList.length))}}function NT(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"You have got your pre-selected trigger app if you want different app click on change."),o.qZA())}function qT(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"Search your trigger app to start setup yuor trigger event."),o.qZA())}function UT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",507),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).tuteStep=3}),o._uU(1,"Next"),o.qZA()}}function ET(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",507),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep+1}),o._uU(1,"Next"),o.qZA()}}const FT=function(t,e,n){return{"class-appselected-step1":t,"class-2appselected-step1":e,"class-appNotSelected-step1":n}};function DT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",500),o._UZ(1,"div",501),o.TgZ(2,"div",502),o.TgZ(3,"div",503),o.TgZ(4,"h3"),o._uU(5,"Trigger App"),o.qZA(),o.YNc(6,NT,2,0,"p",47),o.YNc(7,qT,2,0,"p",47),o.qZA(),o.TgZ(8,"div",504),o.TgZ(9,"button",505),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).isTutorial=!1}),o._uU(10,"Quit"),o.qZA(),o.YNc(11,UT,2,0,"a",506),o.YNc(12,ET,2,0,"a",506),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.Q6J("ngClass",o.kEZ(5,FT,t.connectList[0].appId&&1===t.connectList.length,t.connectList[0].appId&&2===t.connectList.length,!t.connectList[0].appId&&1===t.connectList.length)),o.xp6(4),o.Q6J("ngIf",t.connectList[0].appId),o.xp6(1),o.Q6J("ngIf",!t.connectList[0].appId&&1===t.connectList.length),o.xp6(4),o.Q6J("ngIf",!t.connectList[0].appId&&1===t.connectList.length),o.xp6(1),o.Q6J("ngIf",t.connectList[0].appId)}}function LT(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"Follow the same process you followed to set up the trigger to initiate your connect."),o.qZA())}function JT(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"Select action application and then follow the same process you followed to setup the trigger to initiate your connect."),o.qZA())}function jT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",511),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep-1}),o._uU(1,"Previous"),o.qZA()}}function RT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",507),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep+1}),o._uU(1,"Next"),o.qZA()}}function $T(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",508),o._UZ(1,"div",501),o.TgZ(2,"div",509),o.TgZ(3,"div",503),o.TgZ(4,"h3"),o._uU(5,"Action"),o.qZA(),o.YNc(6,LT,2,0,"p",47),o.YNc(7,JT,2,0,"p",47),o.qZA(),o.TgZ(8,"div",504),o.TgZ(9,"button",505),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).isTutorial=!1}),o._uU(10,"Quit"),o.qZA(),o.YNc(11,jT,2,0,"a",510),o.YNc(12,RT,2,0,"a",506),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(6),o.Q6J("ngIf",1===t.connectList.length),o.xp6(1),o.Q6J("ngIf",2===t.connectList.length),o.xp6(4),o.Q6J("ngIf",t.connectList[0].appId),o.xp6(1),o.Q6J("ngIf",t.connectList[0].appId)}}function BT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-select-apps",512),o.NdJ("beforeAppChange",function(){return o.CHM(t),o.oxw(4).pushUndoState()})("selectedApp",function(e){return o.CHM(t),o.oxw(4).selectedApp(e)})("setUnSavedChanges",function(e){return o.CHM(t),o.oxw(4).setUnSavedChanges(e)}),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.w
1arningInfo)}}function HT(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Trigger Application:"),o.qZA())}function QT(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Action Application:"),o.qZA())}function YT(t,e){1&t&&(o.TgZ(0,"button",527),o._uU(1,"Change"),o.qZA())}function zT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",528),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).changeStep("app")}),o._uU(1,"Change"),o.qZA()}}function VT(t,e){if(1&t&&(o.TgZ(0,"div",524),o.YNc(1,YT,2,0,"button",525),o.YNc(2,zT,2,0,"a",526),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!t.currentApp.credentialUrlName||!t.currentApp.credentialUrlName.toLowerCase().includes("flow"))}}function GT(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Trigger Event:"),o.qZA())}function WT(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Action Event:"),o.qZA())}function KT(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",524),o.TgZ(1,"a",528),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).changeStep("action")}),o._uU(2,"Change"),o.qZA(),o.qZA()}}const XT=function(t){return{"preview-width":t}};function tO(t,e){if(1&t&&(o.TgZ(0,"div",514),o.TgZ(1,"div",515),o._UZ(2,"i",516),o.qZA(),o.TgZ(3,"div",517),o.YNc(4,GT,2,0,"span",47),o.YNc(5,WT,2,0,"span",47),o.TgZ(6,"h5"),o._uU(7),o.qZA(),o.qZA(),o.YNc(8,KT,3,0,"div",518),o.qZA()),2&t){const t=o.oxw(5);o.Q6J("ngClass",o.VKq(5,XT,"preview"==t.currentApp.currentAction)),o.xp6(4),o.Q6J("ngIf","trigger"===t.nodeType),o.xp6(1),o.Q6J("ngIf","trigger"!==t.nodeType),o.xp6(2),o.Oqu(t.currentApp.actionNameTitle_display),o.xp6(1),o.Q6J("ngIf",!t.isTemplate&&"preview"!=t.currentApp.currentAction)}}function eO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",524),o.TgZ(1,"a",528),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).changeStep("account")}),o._uU(2,"Change"),o.qZA(),o.qZA()}}function nO(t,e){if(1&t&&(o.TgZ(0,"div",514),o.TgZ(1,"div",515),o._UZ(2,"i",516),o.qZA(),o.TgZ(3,"div",517),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.TgZ(6,"h5"),o.TgZ(7,"a",529),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.YNc(9,eO,3,0,"div",518),o.qZA()),2&t){const t=o.oxw(5);o.Q6J("ngClass",o.VKq(4,XT,"preview"==t.currentApp.currentAction)),o.xp6(5),o.hij("",t.currentApp.displayName," Account:"),o.xp6(3),o.Oqu(null==t.currentApp.auth?null:t.currentApp.auth.accountName),o.xp6(1),o.Q6J("ngIf","preview"!=t.currentApp.currentAction)}}function iO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",532),o.TgZ(1,"app-preview-options",533),o.NdJ("selectedApp",function(e){return o.CHM(t),o.oxw(6).selectedApp(e)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(6);o.xp6(1),o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.warningInfo)}}function oO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",524),o.TgZ(1,"a",528),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).changeStep("options")}),o._uU(2,"Change"),o.qZA(),o.qZA()}}function rO(t,e){if(1&t&&(o.TgZ(0,"div",530),o.TgZ(1,"div",442),o.TgZ(2,"div",515),o._UZ(3,"i",516),o.qZA(),o.TgZ(4,"div",517),o.TgZ(5,"span"),o._uU(6,"Set Up Option"),o.qZA(),o.qZA(),o.qZA(),o.YNc(7,iO,2,8,"div",531),o.YNc(8,oO,3,0,"div",518),o.qZA()),2&t){const t=o.oxw(5);o.Q6J("ngClass",o.VKq(3,XT,"preview"==t.currentApp.currentAction)),o.xp6(7),o.Q6J("ngIf","preview"===t.currentApp.currentAction),o.xp6(1),o.Q6J("ngIf","preview"!=t.currentApp.currentAction)}}const sO=function(t,e){return{"class-appselected-step2":t,"class-2appselected-step2":e}};function aO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",534),o._UZ(1,"div",501),o.TgZ(2,"div",502),o.TgZ(3,"div",503),o.TgZ(4,"h3"),o._uU(5,"Trigger Event"),o.qZA(),o.TgZ(6,"p"),o._uU(7,"You have to select a trigger from the dropdown menu which will initiate the trigger."),o.qZA(),o.qZA(),o.TgZ(8,"div",504),o.TgZ(9,"button",505),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).isTutorial=!1}),o._uU(10,"Quit"),o.qZA(),o.TgZ(11,"a",511),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep-1}),o._uU(12,"Previous"),o.qZA(),o.TgZ(13,"a",507),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep+1}),o._uU(14,"Next"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5);o.xp6(2),o.Q6J("ngClass",o.WLB(1,sO,1===t.connectList.length,2===t.connectList.length))}}function cO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",535),o._UZ(1,"div",501),o.TgZ(2,"div",536),o.TgZ(3,"div",503),o.TgZ(4,"h3"),o._uU(5,"Help Section"),o.qZA(),o.TgZ(6,"p"),o._uU(7,"If you still feel you have any doubts while completing the steps you can checkout each step here."),o.qZA(),o.qZA(),o.TgZ(8,"div",504),o.TgZ(9,"button",505),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).isTutorial=!1}),o._uU(10,"Quit"),o.qZA(),o.TgZ(11,"a",511),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.tuteStep=e.tuteStep-1}),o._uU(12,"Previous"),o.qZA(),o.TgZ(13,"a",537),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).isTutorial=!1}),o._uU(14,"Done"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}function lO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"setup-options",538),o.NdJ("selectedApp",function(e){return o.CHM(t),o.oxw(5).selectedApp(e)})("moveToNextAction",function(){return o.CHM(t),o.oxw(5).moveToNextAction()}),o.qZA()}if(2&t){const t=o.oxw(5);o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.w
1arningInfo)}}function dO(t,e){if(1&t&&(o.TgZ(0,"section",513),o.TgZ(1,"div",514),o.TgZ(2,"div",515),o._UZ(3,"i",516),o.qZA(),o.TgZ(4,"div",517),o.YNc(5,HT,2,0,"span",47),o.YNc(6,QT,2,0,"span",47),o.TgZ(7,"h5"),o._uU(8),o.qZA(),o.qZA(),o.YNc(9,VT,3,2,"div",518),o.qZA(),o.YNc(10,tO,9,7,"div",519),o.YNc(11,nO,10,6,"div",519),o.YNc(12,rO,9,5,"div",520),o.YNc(13,aO,15,4,"div",521),o.YNc(14,cO,15,0,"div",522),o.YNc(15,lO,1,8,"setup-options",523),o.qZA()),2&t){const t=o.oxw(4);o.Q6J("ngClass",o.VKq(12,Bk,"preview"==t.currentApp.currentAction)),o.xp6(1),o.Q6J("ngClass",o.VKq(14,XT,"preview"==t.currentApp.currentAction)),o.xp6(4),o.Q6J("ngIf","trigger"===t.nodeType&&"AI Agent"!==t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf","trigger"!==t.nodeType&&"AI Agent"!==t.currentApp.displayName),o.xp6(2),o.Oqu(t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf",!t.isTemplate&&"preview"!=t.currentApp.currentAction),o.xp6(1),o.Q6J("ngIf","app"!==t.currentApp.currentAction&&"action"!==t.currentApp.currentAction&&"AI Agent"!==t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf","app"!==t.currentApp.currentAction&&"action"!==t.currentApp.currentAction&&"account"!==t.currentApp.currentAction&&"k2P4o45df5f473111E0g"!==t.currentApp.appId&&"k2P4o45df5f473111E0f"!==t.currentApp.appId&&"k2P4o69wb5f473388E6g"!==t.currentApp.appId&&"k2P4o69wb5f4733delay"!==t.currentApp.appId&&"k2P4o69wb5f4733twowaysync"!==t.currentApp.appId&&"k2P4o69wb5f4733syncdata"!==t.currentApp.appId&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId&&"k2P4o69wb5f4733pdfgenerator"!==t.currentApp.appId&&"k2P4p45df5f222345E0a"!==t.currentApp.appId&&"jlp5059wb5f473388e6f"!==t.currentApp.appId&&"janrjh1l08ex59386f67g7nh"!==t.currentApp.appId&&"janrjh1l08ex59386f8cx5lp"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf",t.isOption()&&("app"!==t.currentApp.currentAction&&"action"!==t.currentApp.currentAction&&"account"!==t.currentApp.currentAction&&"options"!==t.currentApp.currentAction&&"k2P4o45df5f473111E0g"!==t.currentApp.appId&&"k2P4o45df5f473111E0f"!==t.currentApp.appId&&"k2P4o69wb5f473388E6g"!==t.currentApp.appId&&"k2P4o69wb5f4733delay"!==t.currentApp.appId&&"k2P4o69wb5f4733twowaysync"!==t.currentApp.appId&&"k2P4o69wb5f4733syncdata"!==t.currentApp.appId&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId&&"k2P4o69wb5f4733pdfgenerator"!==t.currentApp.appId&&"k2P4p45df5f222345E0a"!==t.currentApp.appId&&"jlp5059wb5f473388e6f"!==t.currentApp.appId&&"janrjh1l08ex59386f67g7nh"!==t.currentApp.appId&&"janrjh1l08ex59386f8cx5lp"!==t.currentApp.appId||"preview"==t.currentApp.currentAction)),o.xp6(1),o.Q6J("ngIf",t.isTutorial&&2===t.tuteStep),o.xp6(1),o.Q6J("ngIf",t.isTutorial&&4===t.tuteStep),o.xp6(1),o.Q6J("ngIf","testView"===t.currentApp.currentAction)}}function uO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-app-account",539),o.NdJ("beforeAccountChange",function(){return o.CHM(t),o.oxw(4).pushUndoState()})("selectedApp",function(e){return o.CHM(t),o.oxw(4).selectedApp(e)}),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.warningInfo)}}function pO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-app-event",540),o.NdJ("beforeEventChange",function(){return o.CHM(t),o.oxw(4).pushUndoState()})("selectedApp",function(e){return o.CHM(t),o.oxw(4).selectedApp(e)})("setUnSavedChanges",function(e){return o.CHM(t),o.oxw(4).setUnSavedChanges(e)}),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.warningInfo)}}function hO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-app-edit-options",541),o.NdJ("updateTestMode",function(e){return o.CHM(t),o.oxw(4).handleUpdateTestMode(e)})("beforeOptionsChange",function(){return o.CHM(t),o.oxw(4).pushUndoState()})("selectedApp",function(e){return o.CHM(t),o.oxw(4).selectedApp(e)})("closeSetupOption",function(){return o.CHM(t),o.oxw(4).handleCloseSetupOption()}),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("isTemplate",t.isTemplate)("singleClickTemplate",t.singleClickTemplate)("connectId",t.connectId)("nodeType",t.nodeType)("connectList",t.connectList)("currentApp",t.currentApp)("translation",t.translation)("warningInfo",t.w
1arningInfo)("isActionFailed",t.isActionFailed)("actionFailedIndex",t.actionFailedIndex)("actionFailedData",t.actionFailedData)("actionData",t.actionData)("isSetUpOption",t.isSetUpOption)}}function gO(t,e){if(1&t&&(o.TgZ(0,"div",454),o.YNc(1,PT,38,25,"div",455),o.YNc(2,DT,13,9,"div",456),o.YNc(3,$T,13,4,"div",457),o.YNc(4,BT,1,8,"app-select-apps",458),o.YNc(5,dO,16,16,"section",459),o.YNc(6,uO,1,8,"app-app-account",460),o.YNc(7,pO,1,8,"app-app-event",461),o.YNc(8,hO,1,13,"app-app-edit-options",462),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",t.currentApp&&!("overview"===t.currentApp.currentAction&&!t.testloader)||t.showAppListing),o.xp6(1),o.Q6J("ngIf",t.isTutorial&&1===t.tuteStep),o.xp6(1),o.Q6J("ngIf",t.isTutorial&&3===t.tuteStep),o.xp6(1),o.Q6J("ngIf","app"===t.currentApp.currentAction&&!t.testloader),o.xp6(1),o.Q6J("ngIf","app"!==t.currentApp.currentAction&&"overview"!==t.currentApp.currentAction&&!t.testloader),o.xp6(1),o.Q6J("ngIf","account"===t.currentApp.currentAction&&!t.testloader),o.xp6(1),o.Q6J("ngIf","action"===t.currentApp.currentAction),o.xp6(1),o.Q6J("ngIf","options"===t.currentApp.currentAction&&t.isSetUpOption)}}const fO=function(t){return{overflowhidden:t}};function mO(t,e){if(1&t&&(o.TgZ(0,"div",421),o.YNc(1,Kk,14,1,"div",422),o.YNc(2,Xk,25,2,"div",423),o.YNc(3,gO,9,8,"div",424),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(4,fO,"action"===(null==t.currentApp?null:t.currentApp.currentAction))),o.xp6(1),o.Q6J("ngIf",t.showChatModelPanel&&"chatModel"===t.panelType&&"chatModelSelection"===(null==t.currentApp?null:t.currentApp.currentAction)),o.xp6(1),o.Q6J("ngIf",t.isAIAgentMode&&t.isPanelVisible),o.xp6(1),o.Q6J("ngIf",!(t.showChatModelPanel&&"chatModel"===t.panelType&&"chatModelSelection"===(null==t.currentApp?null:t.currentApp.currentAction)||t.showMemoryPanel&&"memory"===t.panelType&&"memorySelection"===(null==t.currentApp?null:t.currentApp.currentAction)||t.showToolsPanel&&"tool"===t.panelType&&"toolSelection"===(null==t.currentApp?null:t.currentApp.currentAction)||t.isAIAgentMode))}}function vO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",546),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).changeMode()}),o._uU(1,"Edit Setup"),o.qZA()}}function bO(t,e){if(1&t&&(o.TgZ(0,"div",544),o.TgZ(1,"p",445),o._uU(2," Note: Preview mode on. Click on "),o.TgZ(3,"strong"),o._uU(4,"Edit Setup"),o.qZA(),o._uU(5," to make changes "),o.qZA(),o.YNc(6,vO,2,0,"button",545),o.qZA()),2&t){const t=o.oxw(3);o.xp6(6),o.Q6J("ngIf","preview"==t.globalAction)}}function xO(t,e){if(1&t&&(o.TgZ(0,"div",542),o.YNc(1,bO,7,1,"div",543),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(2,Bk,"preview"==t.currentApp.currentAction)),o.xp6(1),o.Q6J("ngIf","preview"==t.globalAction)}}function _O(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",546),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).changeMode()}),o._uU(1,"Edit Setup"),o.qZA()}}function CO(t,e){if(1&t&&(o.TgZ(0,"div",544),o.TgZ(1,"p",445),o._uU(2," Note: Preview mode on. Click on "),o.TgZ(3,"strong"),o._uU(4,"Edit Setup"),o.qZA(),o._uU(5," to make changes "),o.qZA(),o.YNc(6,_O,2,0,"button",545),o.qZA()),2&t){const t=o.oxw(3);o.xp6(6),o.Q6J("ngIf","preview"==t.globalAction)}}function wO(t,e){if(1&t&&(o.TgZ(0,"div",542),o.YNc(1,CO,7,1,"div",543),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(2,Bk,"preview"==t.currentApp.currentAction)),o.xp6(1),o.Q6J("ngIf","preview"==t.globalAction)}}const yO=function(t,e,n){return{"pb-0":t,"full-screen":e,"overflow-hidden":n}};function AO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"section",387,388),o.TgZ(3,"div",389),o.NdJ("mousedown",function(e){return o.CHM(t),o.oxw().startResize(e)}),o.qZA(),o.TgZ(4,"div",390),o.YNc(5,$k,2,0,"div",391),o.YNc(6,Hk,3,3,"div",392),o.YNc(7,Qk,3,4,"div",392),o.YNc(8,zk,6,3,"button",393),o.YNc(9,Vk,6,0,"button",394),o.qZA(),o.YNc(10,Gk,12,0,"div",395),o.YNc(11,mO,4,6,"div",396),o.YNc(12,xO,2,4,"div",397),o.YNc(13,wO,2,4,"div",397),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("ngClass",o.kEZ(10,yO,t.currentApp.currentAction||"preview"!==t.globalAction,t.isFullScreen,t.hasAnyConfirmDelete())),o.xp6(5),o.Q6J("ngIf",t.testloader),o.xp6(1),o.Q6J("ngIf","trigger"===t.nodeType&&"overview"!==t.currentApp.currentAction&&!t.testloader),o.xp6(1),o.Q6J("ngIf","trigger"!==t.nodeType&&"overview"!==(null==t.currentApp?null:t.currentApp.currentAction)&&!t.testloader),o.xp6(1),o.Q6J("ngIf",t.isFullScreen),o.xp6(1),o.Q6J("ngIf",!t.isFullScreen),o.xp6(1),o.Q6J("ngIf",t.testloader),o.xp6(1),o.Q6J("ngIf",t.currentApp||t.showChatModelPanel),o.xp6(1),o.Q6J("ngIf","trigger"===t.nodeType&&"overview"!==t.currentApp.currentAction&&!t.testloader),o.xp6(1),o.Q6J("ngIf","trigger"!==t.nodeType&&"overview"!==(null==t.currentApp?null:t.currentApp.currentAction)&&!t.testloader)}}function ZO(t,e){1&t&&(o.O4$(),o.ynx(0),o._UZ(1,"rect",551),o._UZ(2,"rect",552),o._UZ(3,"path",553),o._UZ(4,"path",554),o.BQk())}function kO(t,e){1&t&&(o.O4$(),o._UZ(0,"rect",551),o._UZ(1,"rect",552),o._UZ(2,"path",553),o._UZ(3,"path",555))}function TO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",547),o.TgZ(1,"button",548),o.NdJ("click",function(e){return o.CHM(t),o.oxw().togglePanelView(e)}),o.O4$(),o.TgZ(2,"svg",549),o.YNc(3,ZO,5,0,"ng-container",356),o.YNc(4,kO,4,0,"ng-template",null,550,o.W1O),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.MAs(5),e=o.oxw();o.xp6(1),o.uIk("data-tooltip",e.isPanelVisible?"close panel":"open panel"),o.xp6(2),o.Q6J("ngIf",!e.isPanelVisible)("ngIfElse",t)}}function OO(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"button",566),o._uU(2),o.O4$(),o.TgZ(3,"svg",567),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).deleteNodePopup(e)}),o._UZ(4,"path",568),o.qZA(),o.qZA(),o.BQk()}if(2&t){const t=e.$implicit;o.xp6(2),o.hij(" ",t.headerName," ")}}function MO(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",556,200),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",557),o.TgZ(3,"h2",445),o._uU(4,"Flow Branch"),o.qZA(),o.TgZ(5,"button",558),o.NdJ("click",function(){return o.CHM(t),o.oxw().handleCloseNewStep()}),o.O4$(),o.TgZ(6,"svg",150),o._UZ(7,"path",151),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"div",559),o.TgZ(9,"div",560),o.TgZ(10,"h4"),o._uU(11,"Added Flows"),o.qZA(),o.TgZ(12,"button",561),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleDisplay()}),o._UZ(13,"i",562),o.qZA(),o.qZA(),o.YNc(14,OO,5,1,"ng-container",563),o.qZA(),o.TgZ(15,"div",564),o.TgZ(16,"button",565),o.NdJ("click",function(){return o.CHM(t),o.oxw().addMoreFlow()}),o._uU(17," Add more flow "),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(14),o.Q6J("ngForOf",t.filteredFlows)}}function IO(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",569),o.TgZ(1,"button",570),o.O4$(),o.TgZ(2,"svg",72),o._UZ(3,"path",571),o.qZA(),o.qZA(),o.qZA())}function SO(t,e){1&t&&o._UZ(0,"app-loader")}function PO(t,e){1&t&&(o.TgZ(0,"div",572),o.TgZ(1,"div",573),o.TgZ(2,"h3"),o._uU(3,"It's time to create your first Connect!"),o.qZA(),o.TgZ(4,"ul"),o.TgZ(5,"li"),o._uU(6,"Informational"),o.qZA(),o.TgZ(7,"li"),o._uU(8,"Actionable"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"div",574),o.TgZ(10,"p"),o._uU(11,"You'll see both the apps added in this page. We have highlighted few field to give you a better understanding for your 1st integration at connect."),o.qZA(),o.TgZ(12,"div",575),o.TgZ(13,"label",576),o._uU(14,"What's trigger ? "),o._UZ(15,"input",577),o._UZ(16,"span",578),o.qZA(),o.TgZ(17,"label",576),o._uU(18,"Select your trigger event! "),o._UZ(19,"input",579),o._UZ(20,"span",578),o.qZA(),o.TgZ(21,"label",576),o._uU(22,"What is Action event? "),o._UZ(23,"input",579),o._UZ(24,"span",578),o.qZA(),o.TgZ(25,"label",576),o._uU(26,"Select your action event! "),o._UZ(27,"input",579),o._UZ(28,"span",578),o.qZA(),o.qZA(),o.TgZ(29,"a",580),o._uU(30,"Dismiss Checklist"),o.qZA(),o.qZA(),o.qZA())}function NO(t,e){1&t&&(o.TgZ(0,"button",581),o._UZ(1,"img",582),o.qZA())}const qO=function(t){return{"aside-60":t}},UO=function(t){return{"height-calc":t}},EO=function(t){return{"copilot-open-shift":t}};var FO=(()=>(function(t){t.LEFT_TO_RIGHT="LR",t.TOP_TO_BOTTOM="TB"}(FO||(FO={})),FO))();const DO={[FO.LEFT_TO_RIGHT]:{outputSide:dp.RIGHT,inputSide:dp.LEFT},[FO.TOP_TO_BOTTOM]:{outputSide:dp.BOTTOM,inputSide:dp.TOP}};let LO=(()=>{class t{constructor(t,e,n,i,r,s,a,c,l,d,u,p,h,g,f){this.translatorService=t,this.actRoute=e,this.customerConnectService=n,this.router=i,this.modalService=r,this.dataService=s,this.commonService=a,this.customerService=c,this.location=l,this.cookieService=d,this.cdRef=u,this.changeDetectorRef=p,this.cdr=h,this.userGuideService=g,this.shellEvents=f,this.isDragging=!1,this.offsetX=0,this.offsetY=0,this.graph_data=[],this.appList=[],this.appyConfig=go.N,this.warningInfo=[],this.currentApp={},this.globalAction="preview",this.connectList=[],this.selectedAppArray=[],this.allTriggerNotFoundIndex=-1,this.triggerTestFail=!1,this.triggerTestFailStatus=!1,this.appointmentBookingCheckStatus=!1,this.showallTriggerFound=!1,this.isSkipRunTest=!1,this.showAppListing=!0,this.pendingTestCompleteCallback=null,this.pendingTestNodeLabel="",this.AppBranching=!0,this.previousConnectList=[],this.isUnsavedData=!1,this.parentIndex=null,this.childIndex=null,this.showToolbarMenu=!1,this.isInitialPageLoad=!0,this.flowToolbarMenu=!1,this.isMenuBarActive=!0,this.activateAgent=!1,this.activeAgent=!1,this.nodes=[],this.connections=[],this.configuration=DO[FO.TOP_TO_BOTTOM],this.eMarkerType=Hh,this.isAutoLayout=!0,this.bookExpert=!0,this.bookExpertIcon=!1,this.errorCount=0,this.zoomLevel=70,this.canResetFlowView=!1,this.isResettingFlow=!1,this.resetFlowState=null,this.hasCenteredAfterPanelLoad=!1,this.selection=[],this.secondaryButtonOffsetX=0,this.secondaryButtonOffsetY=0,this.activeConnection=null,this.lastActiveConnection=null,this.isSetUpOption=!1,this.setUpOptionMenu=!1,this.onlyContinueIf=!1,this.changeAppCondition=!1,this.previousConnectorId=null,this.showSuccessAlert=!1,this.showErrorAlert=!1,this.oldEventFinalData=null,this.deleteDataCheck=!1,this.isShow=!0,this.isCreatedBranch=!1,this.pendingDuplicateNodeIndex=null,this.deleteLoader=!1,this.createNodeFlowCondition=!1,this.errorNodeIds=new Set,this.lastErrorNodeId=null,this.openPanel=!1,this.currentAINodeId="",this.showChatModelPanel=!1,this.showMemoryPanel=!1,this.showToolsPanel=!1,this.panelType="",this.originalCurrentApp=null,this.isPanelVisible=!1,this.undoRedoToastMessage="",this.undoRedoToastType="undo",this.undoRedoToastTimer=null,this.isTool=!1,this.chatModelContainer=!1,this.chatToolContainer=!1,this.menuOpenModel=!1,this.menuOpenModelKey=!1,this.toolId="",this.chatModelId="",this.showCallAgentToggle=!1,this.showButtonCall=!1,this.publishedActiveConnects=[],this.showCopilot=!1,this.isConnectCanvasLoading=!1,this.canvasSkeletonSettleTimer=null,this.webhookConnectIds=new Set,this.showOldToolUI=!1,this.isAIAgentMode=!1,this.currentAIAgentNode=null,this.aiAgentPrompt="",this.aiAgentSystemMessage="",this.selectedTools=[],this.pendingToolId="",this.pendingToolDisplay="",this.pendingToolName="",this.pendingToolDescription="",this.isAddingTool=!1,this.languageModels=[{id:"openai-chatgpt",name:"ChatGPT",description:"OpenAI ChatGPT Language Model",provider:"OpenAI",icon:"\ud83e\udd16"},{id:"google-gemini",name:"Gemini",description:"Google Gemini Language Model",provider:"Google",icon:"\ud83c\udf1f"},{id:"xai-grok",name:"Grok",description:"xAI Grok Language Model",provider:"xAI",icon:"\ud83d\ude80"}],this.chatModels=[{value:"Appy Pie Flawless Text",displayName:"Appy Pie Flawless Text",requiresApiKey:!1},{value:"chatgpt",displayName:"ChatGPT",requiresApiKey:!0},{value:"gemini",displayName:"Gemini",requiresApiKey:!0},{value:"grok",displayName:"Grok",requiresApiKey:!0},{value:"claude",displayName:"Claude",requiresApiKey:!0}],this.chatSubModels={},this.menuOpenSubModel=!1,this.selectedSubModel="",this.fetchedSubModels={},this.isLoadingSubModels=!1,this.closeSetupOption=new o.vpe,this.selectedStatus="Active",this.dragStartX=0,this.dragStartY=0,this.dragThreshold=5,this.isDraggingNode=!1,this.isFullScreen=!1,this.showConfirmDelete=new Map,this.noteInputFocused={},this.isNoteExpanded={},this.skippanel=!1,this.isResizing=!1,this.lastDownX=0,this.panel=null,this.continueDiv=null,this.continueDivs=null,this.centerContainer=null,this.customPanelWidth=400,this.hasCustomPanelSize=!1,this.undoStack=[],this.redoStack=[],this.maxUndoSteps=50,this.isRestoringState=!1,this.deletedNodesCache=new Map,this.flowWheelHandler=t=>this.onFlowWheel(t),this.isFlowPointerDown=!1,this.flowPointerDownHandler=t=>this.onFlowPointerDown(t),this.flowPointerUpHandler=()=>{this.isFlowPointerDown&&(this.isFlowPointerDown=!1,this.canResetFlowView=!0)},this.listenerFunction=t=>{if(this.isUnsavedData){const e="Are you sure you want to leave this page?";return t.returnValue=e,e}},this.node={position:{x:85,y:-25}},this.activeNodeMenu=null,this.closeMenuOnClickOutsideHandler=t=>{const e=t.target;if(null!==e.closest('button[data-tooltip="Add New Step"]')||null!==e.closest("#add-new-step-button")||null!==e.closest("button.menu-button")||null!==e.closest("[fNodeOutput]")||null!==e.closest("button.custom-options-tooltip"))return;const n=!(!this.dropdown||!this.dropdown.nativeElement)&&this.dropdown.nativeElement.contains(e),i=e.matches("button.btn");(this.showToolbarMenu||this.flowToolbarMenu||this.activeNodeMenu)&&!n&&!i&&(this.showToolbarMenu=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null,this.showConfirmDelete.clear());for(const o in this.noteInputFocused)this.noteInputFocused[o]&&(this.noteInputFocused[o]=!1)},this.showNodeTypeSelection=!1,this.initializeTranslation(),this.setCurrentAppProperties(),this.setTutorialProperties()}ngOnChanges(t){const e=this.connectList.find(e=>e.index==t).editOptions&&this.hasEditOptionsChanged(t)||this.hasAccountChanged(t);return e&&(this.previousConnectList=JSON.parse(JSON.stringify(this.connectList))),e}hasEditOptionsChanged(t){const e=this.connectList.find(e=>(null==e?void 0:e.index)==t),n=this.previousConnectList.find(e=>(null==e?void 0:e.index)==t),i=t=>{if(!t)return{};let e={};for(let i in t)try{e[i]=JSON.parse(t[i])}catch(n){e[i]=t[i]}return e};if(!n)return!0;const o=Object.assign(Object.assign({},n),{editOptions:i(n.editOptions),filterEditOptions:i(n.filterEditOptions),triggerOptions:i(n.triggerOptions),additionalTriggerEditOptions:i(n.additionalTriggerEditOptions)}),r=t=>t?Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length?{}:Array.isArray(t)?t:"object"==typeof t&&Object.keys(t).every(t=>!isNaN(Number(t)))?Object.values(t):t:{},s=(t,e)=>{const n=r(t),i=r(e);return JSON.stringify(n)!==JSON.stringify(i)},a=s(e.editOptions,o.editOptions),c=s(e.filterEditOptions,o.filterEditOptions),l=s(e.triggerOptions,o.triggerOptions),d=s(e.additionalTriggerEditOptions,o.additionalTriggerEditOptions);return a||c||l||d}hasAccountChanged(t){var e,n,i,o;return JSON.stringify(null===(n=null===(e=this.connectList.find(e=>(null==e?void 0:e.index)==t))||void 0===e?void 0:e.auth)||void 0===n?void 0:n._id)!==JSON.stringify(null===(o=null===(i=this.previousConnectList.find(e=>(null==e?void 0:e.index)==t))||void 0===i?void 0:i.auth)||void 0===o?void 0:o._id)}initializeTranslation(){this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t})}setCurrentAppProperties(){this.currentApp||(this.currentApp={}),this.actRoute.params.subscribe(t=>{this.isRestoringState||(this.currentApp.nodeId=t.nodeId,this.currentApp.currentAction=t.currentAction,this.currentApp.triggerId=t.triggerId,this.connectId=t.triggerId)}),this.globalAction="preview"===this.currentApp.currentAction?"preview":this.currentApp.currentAction}settleCanvasSkeleton(){if(!this.isConnectCanvasLoading||this.canvasSkeletonSettleTimer)return;const t=Date.now();this.canvasSkeletonSettleTimer=setInterval(()=>{const e=Date.now()-t;((this.AppBranching&&!this.testloader||!this.AppBranching&&e>2500)&&!this.dataService.copilotRailLoading||e>1e4)&&(clearInterval(this.canvasSkeletonSettleTimer),this.canvasSkeletonSettleTimer=null,this.isConnectCanvasLoading=!1,this.dataService.editorSkeletonActive=!1)},150)}setTutorialProperties(){"tutorial"===this.actRoute.snapshot.params.currentAction?(this.isTutorial=!0,this.tuteStep=1):this.isTutorial=!1}generateUniqueIdNew(){return"id-"+Math.random().toString(36).substring(2,15)}ngOnInit(){var t,e,n;this.shellEvents.editorLeave=t=>this.nsLeaveEditor(t),this.
1shellEvents.editorCopilotToggle=()=>this.toggleCopilot(),this.selectedTools=this.parseToolSelections(),this.previousConnectList=JSON.parse(JSON.stringify(this.connectList)),this.dataService.consumeCopilotOpen()&&(this.showCopilot=!0),this.dataService.copilotToggle$.subscribe(()=>{this.showCopilot=!0}),this.flowToolbarMenu=!1,this.AppBranching=!1,this.isPanelVisible=!1,this.currentUser=this.customerService.GetCurrent(),!0===(null===(t=this.currentUser)||void 0===t?void 0:t.appointmentBookingCheck)||"jc0fgwefcky2"===(null===(e=this.currentUser)||void 0===e?void 0:e.planId)?(this.bookExpert=!0,this.bookExpertIcon=!0,this.appointmentBookingCheckStatus=!0):this.bookExpert=!1;let i=this.actRoute.snapshot.queryParams.nodeType;i||(i=this.actRoute.snapshot.params.currentAction||this.actRoute.snapshot.paramMap.get("currentAction")),this.graph_data="trigger"===i?[{id:"0",parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}]:"action"===i?[{id:"1",parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}]:[{id:"0",parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}],this.isConnectCanvasLoading=!!this.connectId&&"newNode"!==this.connectId,this.dataService.editorSkeletonActive=this.isConnectCanvasLoading,this.isConnectCanvasLoading&&setTimeout(()=>{this.isConnectCanvasLoading=!1,this.dataService.editorSkeletonActive=!1},15e3),setTimeout(()=>{this.customerConnectService.getUserConnectData(this.connectId).subscribe(t=>{if(this.settleCanvasSkeleton(),this.activateAgent=this.isReadyToPublish((null==t?void 0:t.userConnects)||[]),this.activeAgent=this.isPublished((null==t?void 0:t.userConnects)||[]),Array.isArray(null==t?void 0:t.userConnects)&&t.userConnects.length>0){const e=t.userConnects[0];if(Array.isArray(e.nodesData)&&(this.nodes=e.nodesData.map(t=>Object.assign(Object.assign({},t),{id:t._id||this.generateUniqueIdNew(),connectorId:t.connectorId||t.id,position:t.position||{x:0,y:0},headerName:t.headerName||"",displayName:t.displayName||"",imageFinal:t.imageFinal||t.image||"",eventFinal:t.eventFinal||t.actionNameTitle_display||"",comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""}))),Array.isArray(e.graphData)){this.graph_data=e.graphData.map(t=>Object.assign(Object.assign({},t),{id:t.id||this.generateUniqueIdNew(),parentId:t.parentId||null,connectorId:t.connectorId||t.id,position:t.position||{x:0,y:0},headerName:t.headerName||"",displayName:t.displayName||"",imageFinal:t.imageFinal||t.image||"",eventFinal:t.eventFinal||t.actionNameTitle_display||"",comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""}));let t=this.actRoute.snapshot.queryParams.nodeType;"trigger"===t?this.graph_data=this.graph_data.filter(t=>"0"===String(t.id)||0===Number(t.id)):"action"===t&&(this.graph_data=this.graph_data.filter(t=>{const e=Number(t.id);return 0===e||1===e}))}this.graph_data.forEach(t=>{const e=this.nodes.find(e=>e.connectorId==t.id||e.id==t.id);e&&(t.headerName=e.headerName||t.headerName||"",t.displayName=e.displayName||t.displayName||"",t.imageFinal=e.imageFinal||t.imageFinal||"",t.eventFinal=e.eventFinal||t.eventFinal||"",t.comments=e.comments||t.comments||"",t.chatModel=e.chatModel||t.chatModel||"",t.memory=e.memory||t.memory||"",t.tool=e.tool||t.tool||"",t.toolImage=e.toolImage||t.toolImage||"",e.headerName=t.headerName,e.displayName=t.displayName,e.imageFinal=t.imageFinal,e.eventFinal=t.eventFinal,e.comments=t.comments,e.chatModel=t.chatModel,e.memory=t.memory,e.tool=t.tool,e.toolImage=t.toolImage)}),this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.cdRef.detectChanges()}this.graph_data.forEach(t=>{const e=this.nodes.find(e=>e.connectorId==t.id);e&&(e.headerName=t.headerName||"",e.displayName=t.displayName||"",e.imageFinal=t.imageFinal||"",e.eventFinal=t.eventFinal||"",e.comments=t.comments||"",e.chatModel=t.chatModel||"",e.memory=t.memory||"",e.tool=t.tool||"",e.toolImage=t.toolImage||"")});const e=this.nodes;this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=e,this.cdRef.detectChanges()},()=>{this.isConnectCanvasLoading=!1,this.dataService.editorSkeletonActive=!1})},10),this.cdRef.detectChanges();let o=this.cookieService.get("fromPurchasePage");
1"jc0fgwefcky2"===(null===(n=this.currentUser)||void 0===n?void 0:n.planId)&&"true"===o?this.router.navigateByUrl("/purchase"):(this.cookieService.delete("actionAppObject","/"),this.cookieService.delete("triggerAppObject","/"),this.cookieService.delete("fromPurchasePage","/"),$("button#next_1").click(function(){$("#tooltip-helper-backdrop_1").hide(),$("#tooltip-helper-backdrop_2").show()}),$("button#next_2").click(function(){$("#tooltip-helper-backdrop_2").hide(),$("#tooltip-helper-backdrop_3").show()}),$("button#next_3").click(function(){$("#tooltip-helper-backdrop_3").hide(),$("#tooltip-helper-backdrop_4").show()}),$("#dismiss_btn").click(function(){$("#dismiss_checklist").fadeToggle()}),$("#dismiss_btn_checklist").click(function(){$("#dismiss_checklist").fadeOut()}),$("#ButtonCloseSidebar").on("click",function(t){$("#asideMenu").removeClass("Activesidebar"),$(".navlist li button").removeClass("active"),$(".stepside").removeClass("active")}),$(".navlist li .btnbysection").click(function(){$("#asideMenu").addClass("Activesidebar");var t=$(this).attr("data-tab");$(".navlist li .btnbysection").removeClass("active"),$(".stepside").removeClass("active"),$(this).addClass("active"),$("#"+t).addClass("active")}),$(".helpbtns>.BaseButton").on("click",function(){$(".helpbtns>.BaseButton").prop("disabled",!0),$("#formhelpful").removeClass("d-none")}),$("#submitButton").on("click",function(){$(".helpbtns>.BaseButton").prop("disabled",!1),$("#formhelpful").addClass("d-none")}),$(document).on("keyup","#textarea",t=>{const e=$("#textarea").val();$("#submitButton").prop("disabled",""===e)}),$(document).on("click",function(t){var e=$("#asideMenu");$(t.target).closest(e).length||(e.removeClass("Activesidebar"),$(".navlist li button").removeClass("active"),$(".stepside").removeClass("active"))})),this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM)}getUserConnectData(){var t;let e="";(null===(t=this.currentApp)||void 0===t?void 0:t.triggerId)&&(e=this.currentApp.triggerId),this.testloader=!0,this.customerConnectService.getUserConnectData(this.connectId+"?Page="+e).subscribe(t=>{var e,n;const i=(null==t?void 0:t.userConnects)||[];if(this.totalNodes=i.length-1,0===i.length)this.router.navigateByUrl("/connects");else{this.currentApp.nodeId=i.some(t=>{var e;return t._id===(null===(e=this.currentApp)||void 0===e?void 0:e.nodeId)})?this.currentApp.nodeId:i[i.length-1]._id,this.triggerCompleteFlag=!1,this.isTestStepEnable="complete"===i[this.totalNodes].nodeStatus,this.isPopularConnect=!!i[this.totalNodes].templateId,"preview"!==this.globalAction&&("app"===this.currentApp.currentAction||"action"===this.currentApp.currentAction)&&this.isPopularConnect&&this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/account/${this.currentApp.triggerId}`),this.editorTitle=i[0].connectTitle||this.connectId||(null===(e=this.translation)||void 0===e?void 0:e.CUSTOM_CREATE_A_CONNECT)||"Name your Connect",this.cTitle=i[0].connectTitle||this.connectId||"",this.globaleditorTitle=this.cTitle,this.connectList=[],this.loadConnectPageDataNew();const t=i[0];Array.isArray(null==t?void 0:t.nodesData)&&t.nodesData.length>0&&(this.nodes=t.nodesData.map(t=>Object.assign(Object.assign({},t),{id:t._id||this.generateUniqueIdNew(),connectorId:t.connectorId||t.id,position:t.position||{x:0,y:0},headerName:t.headerName||"",displayName:t.displayName||"",imageFinal:t.imageFinal||t.image||"",eventFinal:t.eventFinal||t.actionNameTitle_display||"",comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""}))),Array.isArray(null==t?void 0:t.graphData)&&t.graphData.length>0&&(this.graph_data=t.graphData.map(t=>Object.assign(Object.assign({},t),{id:t.id||this.generateUniqueIdNew(),parentId:t.parentId||null,connectorId:t.connectorId||t.id,position:t.position||{x:0,y:0},headerName:t.headerName||"",displayName:t.displayName||"",imageFinal:t.imageFinal||t.image||"",eventFinal:t.eventFinal||t.actionNameTitle_display||"",comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""})),this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.cdRef.detectChanges()),(null===(n=i[0])||void 0===n?void 0:n.templateId)?(this.isTemplate=!1,this.singleClickTemplate=!!i[0].singleClickTemplate):(this.isTemplate=!1,this.singleClickTemplate=!1)}})}loadConnectPageDataNew(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);let t=0;this.cookieService.set("connectId",this.connectId,7,"/","",!0,"Strict"),this.customerConnectService.loadConnectPageDataAggregateQuery({connectId:this.connectId}).subscribe({next:e=>{for(let n of e){if(n.hasOwnProperty("sample_data")&&(n.isLoadedFromDB=!0),n.auth=n.auth?Object.assign(Object.assign({},n.auth),{authId:n.authId}):{authId:n.authId},this.currentApp.nodeId===n.nodeId){this.nodeType=n.nodeType;let t={nodeId:n._id,currentAction:n.nodeStatus,isLoadedFromDB:!0,connectTitle:n.connectTitle?n.connectTitle:"",actionNameTitle:n.actionNameTitle,actionNameTitle_display:n.actionNameTitle_display,index:n.index,appId:n.appId,desc:"",categoryId:[],image:"",name:"",app_type:"",credentialUrlName:"",triggerId:n.triggerId,auth:{authId:n.connected_account_id},sample_data:n.sample_data,nodeType:n.nodeType,editOptions:n.editOptions,filterEditOptions:n.filterEditOptions,status:n.status,actionCat:n.actionCat||null};this.currentApp=Object.assign(Object.assign({},this.currentApp),t)}""===n.appId?(n.currentAction="preview"===this.globalAction?"preview":"app",this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index]),(void 0===this.currentApp.index||this.currentApp.index>n.index)&&(this.currentApp=this.connectList[n.index],this.nodeType=n.nodeType,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${n.currentAction}/${this.currentApp.triggerId}`))):""!==n.actionNameTitle&&n.triggerOptions&&n.triggerOptions.options?(n.editOptions&&n.auth&&n.auth.authId||n.isSpecialAppIds2)&&(n.isUserConnected||n.isS
1pecialAppIds3)?n.isSpecialAppIds3?(n.currentAction="preview"===this.globalAction?"preview":"options",this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index],"flowbyautomate"==this.currentApp.credentialUrlName&&"ta_selected"==this.currentApp.nodeStatus&&(this.currentApp.currentAction="action"))):(t++,this.customerConnectService.readAuth(n.credentialUrlName?n.credentialUrlName:(n.name||"").split(" ").join("").toLowerCase(),n.appId,n.authId,n.nodeId,this.currentUser.customerId||this.cookieService.get("customerId")).subscribe({next:t=>{"Success"===t.message||"success"===t.message||"SUCCESS"===t.message?("complete"!==n.nodeStatus&&!0===n.accountChanged||"Draft"===n.connectStatus?(this.isSetUpOption=!0,n.currentAction="options",this.globalAction="options"):(this.isSetUpOption=!0,n.currentAction="preview"===this.globalAction?"preview":"options"),this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index])):(n.currentAction="preview"===this.globalAction?"preview":"account",this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index]),(void 0===this.currentApp.index||this.currentApp.index>n.index)&&(this.currentApp=this.connectList[n.index],this.nodeType=n.nodeType,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${n.currentAction}/${this.currentApp.triggerId}`)))},error:e=>{if(t--,this.isCreatedBranch||(this.testloader=!1),0===t&&this.pendingDuplicateNodeIndex){const t=this.pendingDuplicateNodeIndex;this.pendingDuplicateNodeIndex=null,this.goToConnectApp(t)}},complete:()=>{if(t--,0===t&&(this.isCreatedBranch||(this.testloader=!1),this.pendingDuplicateNodeIndex)){const t=this.pendingDuplicateNodeIndex;this.pendingDuplicateNodeIndex=null,this.goToConnectApp(t)}}})):(n.currentAction="preview"===this.globalAction?"preview":"ta_selected"===n.nodeStatus?"account":"app_selected"===n.nodeStatus?"action":"app",this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index]),(void 0===this.currentApp.index||this.currentApp.index>n.index)&&(this.currentApp=this.connectList[n.index],this.nodeType=n.nodeType,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${n.currentAction}/${this.currentApp.triggerId}`))):(n.currentAction="preview"===this.globalAction?"preview":"action",this.connectList[n.index]=n,this.previousConnectList[n.index]=n,n.index===this.currentApp.index&&(this.currentApp=this.connectList[n.index]),(void 0===this.currentApp.index||this.currentApp.index>n.index)&&(this.currentApp=this.connectList[n.index],this.nodeType=n.nodeType,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${n.currentAction}/${this.currentApp.triggerId}`)))}},error:t=>{this.isCreatedBranch||(this.testloader=!1),this.pendingDuplicateNodeIndex=null},complete:()=>{var e;let n=this.actRoute.snapshot.queryParams.nodeType;if(n||(n=this.actRoute.snapshot.params.currentAction||this.actRoute.snapshot.paramMap.get("currentAction")),("trigger"===n||"action"===n)&&("trigger"===n?(this.connectList=this.connectList.filter(t=>t&&(0===t.index||"0"===t.index)),this.previousConnectList=this.previousConnectList.filter(t=>t&&(0===t.index||"0"===t.index))):"action"===n&&(this.connectList=this.connectList.filter(t=>t&&(1===t.index||"1"===t.index)),this.previousConnectList=this.previousConnectList.filter(t=>t&&(1===t.index||"1"===t.index)))),0===t&&(this.isCreatedBranch||(this.testloader=!1)),setTimeout(()=>{this.isInitialPageLoad=!1},100),(null===(e=this.currentApp)||void 0===e?void 0:e.nodeId)&&(this.AppBranching=!0,this.isPanelVisible=!0),this.pendingDuplicateNodeIndex&&0===t){const t=this.pendingDuplicateNodeIndex;this.pendingDuplicateNodeIndex=null,this.goToConnectApp(t)}}})}ngAfterContentInit(){document.addEventListener("click",this.closeMenuOnClickOutsideHandler,!0),document.addEventListener("wheel",this.flowWheelHandler,{passive:!1,capture:!0}),document.addEventListener("pointerdown",this.flowPointerDownHandler,!0),document.addEventListener("pointerup",this.flowPointerUpHandler,!0),document.addEventListener("pointercancel",this.flowPointerUpHandler,!0),setTimeout(()=>{"fresh"===this.currentApp.nodeId?this.redirectOnSuccess():(this.connectId=this.currentApp.triggerId,this.getUserConnectData()),this.currentUser=this.customerService.GetCurrent()},100),"preview"!=this.globalAction&&(this.connectList&&this.connectList.length>0&&(!this.connectList[0].connectTitle||this.connectList[0].connectTitle===this.connectId)&&(this.connectList[0].connectTitle=this.connectList[0].displayName+" to "+this.connectList[this.connectList.length-1].displayName+" Integration",this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:this.connectList[0].connectTitle}).subscribe(t=>{})),this.testloader=!1)}ngAfterViewChecked(){var t;if(!this.hasCenteredAfterPanelLoad&&this.fCanvas&&(null===(t=this.resizablePanel)||void 0===t?void 0:t.nativeElement)){this.hasCenteredAfterPanelLoad=!0;const t=document.querySelector(".center-container"),e=this.resizablePanel.nativeElement;t&&e&&(t.style.width=`calc(100% - ${e.offsetWidth||400}px)`,setTimeout(()=>{requestAnimationFrame(()=>{const t=window.innerWidth<=768?.35:.7,e=this.getCanvasViewportCenter();this.fCanvas.resetScaleAndCenter(!1),this.fitToScreen(),this.fCanvas.setZoom(t,e),this.fCanvas.redraw(),"function"==typeof this.fCanvas.emitCanvasChangeEvent&&this.fCanvas.emitCanvasChangeEvent(),this.cdRef.detectChanges()})},0))}}redirectOnSuccess(){const t=this.dataService.createConnectId();let e=this.actRoute.snapshot.queryParams.nodeType;e||(e=this.actRoute.snapshot.params.currentAction||this.actRoute.snapshot.paramMap.get("currentAction"));const n="trigger"===e||"action"===e;n&&"trigger"===e?this.customerConnectService.addUserConnect({actionName:{title:"",desc:""},desc:"",title:"",appId:"",auth:{},connectId:t,connectStatus:"Draft",connectTitle:t,customConnect:!0,index:0,nodeStatus:"new",nodeType:"trigger",status:0,parentIndex:null,childIndex:[],isTool:!0}).subscribe(e=>{this.graph_data=[{id:"0",parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}],this.customerConnectService.updateConnectByConnectId(t,{graphData:this.graph_data}).subscribe(()=>{this.selectedAccountArray=[],this.triggerActForm={},this.connectId=t,this.currentApp.nodeId=e.insertedId||"",this.currentApp.triggerId=t,this.currentApp.currentAction="app",this.getUserConnectData(),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`)})}):n&&"action"===e?this.customerConnectService.addUserConnect({actionName:{title:"",desc:""},desc:"",title:"",appId:"",auth:{},connectId:t,connectStatus:"Draft",connectTitle:t,customConnect:!0,index:1,nodeStatus:"new",nodeType:"actions",status:0,parentIndex:null,childIndex:[null],isTool:!0}).subscribe(e=>{this.graph_data=[{id:1,parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}],this.customerConnectService.updateConnectByConnectId(t,{graphData:this.graph_data}).subscribe(()=>{this.selectedAccountArray=[],this.triggerActForm={},this.connectId=t,this.currentApp.nodeId=e.insertedId||"",this.currentApp.triggerId=t,this.currentApp.currentAction="app",this.currentApp.nodeType="actions",this.nodeType="action",this.getUserConnectData(),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`)})}):this.customerConnectService.addUserConnect({actionName:{title:"",desc:""},desc:"",title:"",appId:"",auth:{},connectId:t,connectStatus:"Draft",connectTitle:t,customConnect:!0,index:0,nodeStatus:"new",nodeType:"trigger",status:0,parentIndex:null,childIndex:[null]}).subscribe(e=>{this.selectedAccountArray=[],this.triggerActForm={},this.connectId=t,this.currentApp.nodeId=e.insertedId||"",this.currentApp.triggerId=t,this.currentApp.currentAction="app",this.getUserConnectData(),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`)})}selectedApp(t){var e,n,i,o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_,C,w,y,A,Z,k,T,O,M,I,S,P;if(t.updateGraphData&&t.graphData)return this.graph_data=t.graphData,this.nodes.find(e=>e.connectorId==t.currentApp.index).chatModel=t.graphData.find(e=>e.id==t.currentApp.index).chatModel,this.nodes.find(e=>e.connectorId==t.currentApp.index).tool=t.graphData.find(e=>e.id==t.currentApp.index).tool,this.nodes.find(e=>e.connectorId==t.currentApp.index).memory=t.graphData.find(e=>e.id==t.currentApp.index).memory,void(this.nodes.find(e=>e.connectorId==t.currentApp.index).toolImage=t.graphData.find(e=>e.id==t.currentApp.index).toolImage);if(null==t?void 0:t.triggerButtonCentering)return void setTimeout(()=>{this.resetContinueButtonPositions()},0);(null===(e=null==t?void 0:t.app)||void 0===e?void 0:e.image)==(null===(n=null==t?void 0:t.currentApp)||void 0===n?void 0:n.image)&&(this.isSkipRunTest=!1,this.isSetUpOption=!0,this.setUpOptionMenu=!0);const N=this.graph_data.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)});if(N){if(this.oldEventFinalData=N.eventFinal,N.displayName=null===(i=t.currentApp)||void 0===i?void 0:i.displayName,N.imageFinal=null===(o=t.currentApp)||void 0===o?void 0:o.image,N.eventFinal="AI Agent"===N.displayName&&"Create AI Agent"!=N.eventFinal?N.eventFinal:null===(r=t.currentApp)||void 0===r?void 0:r.actionNameTitle_display,null===(s=t.currentApp)||void 0===s?void 0:s.graphData){const e=t.currentApp.graphData.find(e=>e.id==t.currentApp.index);e&&(N.chatModel=e.chatModel,N.tool=e.tool,N.memory=e.memory)}}else if(t.currentApp){const e={id:t.currentApp.index,parentId:this.childIndex,displayName:null===(a=t.currentApp)||void 0===a?void 0:a.displayName,imageFinal:null===(c=t.currentApp)||void 0===c?void 0:c.image,eventFinal:null===(l=t.currentApp)||void 0===l?void 0:l.actionNameTitle_display,headerName:"",comments:"",chatModel:"",memory:"",tool:""};this.graph_data.push(e)}this.currentApp=Object.assign(Object.assign({},this.currentApp),{graphData:this.graph_data});const q=this.nodes.find(e=>{var n;return e.connectorId==(null===(n=t.currentApp)||void 0===n?void 0:n.index)});if(q)q.displayName=null===(d=t.currentApp)||void 0===d?void 0:d.displayName,q.
1imageFinal=null===(u=t.currentApp)||void 0===u?void 0:u.image,q.eventFinal="AI Agent"===q.displayName&&"Create AI Agent"!=q.eventFinal?q.eventFinal:null===(p=t.currentApp)||void 0===p?void 0:p.actionNameTitle_display,q.chatModel=null===(g=null===(h=t.currentApp.graphData)||void 0===h?void 0:h.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===g?void 0:g.chatModel,q.memory=null===(m=null===(f=t.currentApp.graphData)||void 0===f?void 0:f.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===m?void 0:m.memory,q.tool=null===(b=null===(v=t.currentApp.graphData)||void 0===v?void 0:v.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===b?void 0:b.tool;else{const e={connectorId:null===(x=t.currentApp)||void 0===x?void 0:x.index,id:this.generateUniqueIdNew(),position:{x:60,y:100+50*this.nodes.length},displayName:null===(_=t.currentApp)||void 0===_?void 0:_.displayName,imageFinal:null===(C=t.currentApp)||void 0===C?void 0:C.image,eventFinal:null===(w=t.currentApp)||void 0===w?void 0:w.actionNameTitle_display,chatModel:null===(Z=null===(A=null===(y=t.currentApp)||void 0===y?void 0:y.graphData)||void 0===A?void 0:A.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===Z?void 0:Z.chatModel,memory:null===(O=null===(T=null===(k=t.currentApp)||void 0===k?void 0:k.graphData)||void 0===T?void 0:T.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===O?void 0:O.memory,tool:null===(S=null===(I=null===(M=t.currentApp)||void 0===M?void 0:M.graphData)||void 0===I?void 0:I.find(e=>{var n;return e.id==(null===(n=t.currentApp)||void 0===n?void 0:n.index)}))||void 0===S?void 0:S.tool};this.nodes.push(e)}const U=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""})),E=JSON.stringify(U),F=JSON.stringify(this.graph_data);if(this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.cdRef.detectChanges(),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(E),graphData:JSON.parse(F)}).subscribe(e=>{t.callTestFunction||(this.testloader=!1),this.currentApp=Object.assign(Object.assign({},this.currentApp),{nodesData:JSON.parse(E),graphData:JSON.parse(F)}),setTimeout(()=>{this.resetContinueButtonPositions()},0)}),this.showallTriggerFound=!1,"false"===t.allTriggerFound)this.allTriggerNotFoundIndex=this.currentApp.index,this.showallTriggerFound=!0;else{if(t.app){this.selectedApps||(this.selectedApps=[]),this.selectedApps[this.currentApp.index]?this.selectedApps[this.currentApp.index]=t.app.name:this.selectedApps.push(t.app.name),this.activeAgent=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const e=this.connectList.findIndex(e=>e&&e.index==t.currentApp.index);-1!==e&&(this.currentApp.nodeStatus="app_selected",this.connectList[e]=Object.assign(Object.assign({},this.connectList[e]),{nodeStatus:"app_selected"}),this.cdRef.detectChanges(),setTimeout(()=>{this.resetContinueButtonPositions()},0)),this.updateDb({nodeStatus:"app_selected"}),this.currentApp.connectStatus="Draft",this.connectList=this.connectList.map(t=>Object.assign(Object.assign({},t),{connectStatus:"Draft"})),this.updateUserConnectStatus(t.currentApp.connectTitle,0,"Draft","Inactive"),this.getNodeStatus(t.currentApp.index)}if(this.connectList||(this.connectList=[]),this.connectList[t.currentApp.index]){"ta_selected"==t.currentApp.nodeStatus&&(this.activeAgent=!1);const e=this.connectList.findIndex(e=>e&&e.index==t.currentApp.index);-1!==e&&(this.connectList[e]=t.currentApp),this.nodeType=t.currentApp.nodeType}else this.connectList.find(e=>e.index==t.currentApp.index)?this.connectList.find(e=>e.index==t.currentApp.index).nodeStatus=t.currentApp.nodeStatus:this.connectList.push(t.currentApp);if(t.auth){this.isSkipRunTest=!1,this.currentApp.auth=t.auth,this.connectList.find(e=>e.index==t.currentApp.index).auth=t.auth,"Draft"==t.currentApp.connectStatus&&(this.connectList.find(e=>e.index==t.currentApp.index).nodeStatus="account_selected",this.activeAgent=!1,this.updateUserConnectStatus(t.currentApp.connectTitle,0,"Draft","Inactive")),this.updateUserLastTouchedApp(this.currentApp.appId);let e="account_selected";this.currentApp.auth._id===this.currentApp.authId&&(e="complete"),this.updateDb({appId:t.auth.appI
1d,displayName:t.auth.appName,image:t.auth.appImage,nodeStatus:e,auth:{connected:!0,userEmail:t.auth.userEmail},connected_account_id:t.auth._id,editOptions:this.currentApp.editOptions?this.currentApp.editOptions:{}}),this.connectList.find(e=>e.index==t.currentApp.index).displayName=t.auth.appName,this.connectList.find(e=>e.index==t.currentApp.index).image=t.auth.appImage,setTimeout(()=>{this.resetContinueButtonPositions()},0)}t.callTestFunction&&(localStorage.setItem("activeTab","draft"),t.isRunTest?this.callTestFunction(t.skipRunTest,t.isRunTest):(document.querySelector(`[data-f-output-id="${t.currentApp.index}"]`),this.callTestFunction(t.skipRunTest),t.skipRunTest&&this.closeError(t.currentApp.index))),("options"===(null===(P=t.currentApp)||void 0===P?void 0:P.currentAction)||t.openSetupOptions)&&(("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId||"k2P4o69wb5f473388E6g"===this.currentApp.appId||"k2P4o69wb5f4733delay"===this.currentApp.appId||"k2P4o69wb5f4733twowaysync"===this.currentApp.appId||"k2P4o69wb5f4733syncdata"===this.currentApp.appId||"k2P4o69wb5f4733aiagent"===this.currentApp.appId||"k2P4o69wb5f4733pdfgenerator"===this.currentApp.appId||"k2P4p45df5f222345E0a"===this.currentApp.appId||"jlp5059wb5f473388e6f"===this.currentApp.appId||"janrjh1l08ex59386f67g7nh"===this.currentApp.appId||"janrjh1l08ex59386f8cx5lp"===this.currentApp.appId||"lna8nwtk00qb7189999ylsri"===this.currentApp.appId)&&this.updateDb({appId:t.currentApp.appId,displayName:t.currentApp.displayName,image:t.currentApp.image,nodeStatus:"options",editOptions:this.currentApp.editOptions?Object.keys(this.currentApp.editOptions).reduce((t,e)=>
1(t[e]="string"==typeof this.currentApp.editOptions[e]?this.currentApp.editOptions[e]:JSON.stringify(this.currentApp.editOptions[e]),t),{}):{}}),this.isSkipRunTest?(this.isUnsavedData=!1,"complete"==t.currentApp.nodeStatus?(this.AppBranching=!1,this.isPanelVisible=!1,this.isSetUpOption=!1,this.setUpOptionMenu=!1):(this.isSetUpOption=!0,this.setUpOptionMenu=!0)):(this.isSetUpOption=!0,this.isUnsavedData=!1,this.setUpOptionMenu=!0))}setTimeout(()=>{this.resetContinueButtonPositions()},0),1==this.connectList.length&&0==this.currentApp.index&&!this.isInitialPageLoad&&(this.showToolbarMenu=!0,this.lastActiveConnection=0)}saveNodesToCookies(t){const e=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position})),n=JSON.stringify(e);document.cookie=`nodes_${t}=${encodeURIComponent(n)}; path=/; max-age=604800`}updateDb(t){this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,t).subscribe(t=>{setTimeout(()=>{this.resetContinueButtonPositions()},0)})}updateUserLastTouchedApp(t){this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t}).subscribe(t=>{})}moveToNextAction(){this.nodes.filter(t=>{var e;return null===(e=t.headerName)||void 0===e?void 0:e.toLowerCase().includes("flow")}),this.moveToNextAction1(),setTimeout(()=>{this.resetContinueButtonPositions()},1e3)}moveToNextAction1(){this.testloader=!1;const t=this.connectList.length,e=this.currentApp.childIndex||[];let n,i;if(null===e[0])return this.currentApp.currentAction="options",this.AppBranching=!1,this.isSetUpOption=!1,this.isPanelVisible=!1,void(1==this.connectList.length&&0==this.currentApp.index&&(this.showToolbarMenu=!0,this.lastActiveConnection=0));if(n=e.length>0?Number(e[0]):this.currentApp.index,this.connectList.find(t=>{if((null==t?void 0:t.index)===n){let n=t.childIndex;i=(null==n?void 0:n.length)>1?Number(n[0])-1:Number(e[0])-1}}),!(1===t&&0===i||t>1&&void 0===this.connectList[i+1]&&0===i)){const t=i+1;if(this.connectList.some(e=>e.index==t)){document.querySelectorAll(".f-node.f-selected").forEach(t=>t.classList.remove("f-selected")),this.currentApp=this.connectList.find(e=>(null==e?void 0:e.index)==t);const e=this.currentApp.childIndex[0];"Splits in different flows"==this.currentApp.actionNameTitle&&(this.currentApp=this.connectList.find(t=>t.index==e)),this.isTemplate?this.currentApp.currentAction=this.currentApp.auth&&this.currentApp.auth.authId||"k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId||"k2P4o69wb5f473388E6g"===this.currentApp.appId||"k2P4o69wb5f4733delay"===this.currentApp.appId||"k2P4o69wb5f4733twowaysync"===this.currentApp.appId||"k2P4o69wb5f4733syncdata"===this.currentApp.appId||"k2P4o69wb5f4733aiagent"===this.currentApp.appId||"k2P4o69wb5f4733pdfgenerator"===this.currentApp.appId||"k2P4p45df5f222345E0a"===this.currentApp.appId||"jlp5059wb5f473388e6f"===this.currentApp.appId||"janrjh1l08ex59386f67g7nh"===this.currentApp.appId||"janrjh1l08ex59386f8cx5lp"===this.currentApp.appId||"lna8nwtk00qb7189999ylsri"===this.currentApp.appId?"options":"account":this.customerService.getNodeStatusByConnectID({connectId:this.connectId,index:this.currentApp.index}).subscribe(t=>{const e=t.nodeStatus;this.currentApp.currentAction="app_selected"===e?"action":"ta_selected"===e?"account":"account_selected"===e?"k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId||"k2P4o69wb5f473388E6g"===this.currentApp.appId||"k2P4o69wb5f4733delay"===this.currentApp.appId||"k2P4o69wb5f4733twowaysync"===this.currentApp.appId||"k2P4o69wb5f4733syncdata"===this.currentApp.appId||"k2P4o69wb5f4733aiagent"===this.currentApp.appId||"k2P4o69wb5f4733pdfgenerator"===this.currentApp.appId||"k2P4p45df5f222345E0a"===this.currentApp.appId||"jlp5059wb5f473388e6f"===this.currentApp.appId||"janrjh1l08ex59386f67g7nh"===this.currentApp.appId||"janrjh1l08ex59386f8cx5lp"===this.currentApp.appId||"lna8nwtk00qb7189999ylsri"===this.currentApp.appId?"options":"account":"complete"===e||"app_options"===e||"incomplete"===e||"options"===e?"options":"app"}),this.nodeType=this.currentApp.nodeType,this.testloader=!1,this.router.navigateByUrl(`/customeditor/${this.connectList.find(e=>(null==e?void 0:e.index)===t)._id}/app/${this.connectId}`),setTimeout(()=>{this.resetContinueButtonPositions()},0)}
1else this.AppBranching=!1,this.isPanelVisible=!1}"overview"===this.currentApp.currentAction&&(this.currentApp.currentAction="overview",this.testloader=!1,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/overview/${this.connectId}`),setTimeout(()=>{this.resetContinueButtonPositions()},0)),"preview"===this.currentApp.currentAction||(this.currentApp.currentAction="overview"),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`)}createNode(t,e,n,i){let o,r,s,a,c,l,d,u,p,h,g,f,m,v,b;if(this.clearChatModelPanelState(),"number"==typeof e?(o=e,l="",d="",u="",p="",h="new",g={},f={},m={},v={},b={}):(o=e.id,r=e.parentIndex,s=e.childIndex,a=e.nodesData,c=e.graphData,l=e.appId,d=e.title,u=e.desc,p=e.image,h=e.nodeStatus,g=e.editOptions,f=e.filterEditOptions,m=e.sample_data,v=e.connected_account_id,b=e.aiConfig),localStorage.setItem("activeTab","draft"),!this.isTemplate&&"addAction"===t){let t;this.testloader=!0,t={},t.connectId=this.connectId,t.triggerId=this.connectId,t.connectTitle="",t.appId=l,t.actionName={title:d,desc:u},t.index=o+1,t.status=0,t.connectStatus="Draft",t.nodeType=n,t.nodeStatus=h,t.customConnect=!0,t.parentIndex=r,t.childIndex=s,t.nodesData=a,t.graphData=c,t.image=p,t.editOptions=g,t.filterEditOptions=f,t.sample_data=m,t.connected_account_id=v,t.aiConfig=b;const e=this.totalNodes;if(this.totalNodes>0&&(this.hideDeleteNodeBtn=[]),Number(e)===Number(o))this.isRestoringState||this.pushUndoState(),this.customerConnectService.addUserConnect(t).subscribe(e=>{if(e){const i=e.insertedId;this.nodeType=n,this.currentApp=t,this.currentApp.currentAction="app",this.currentApp.nodeId=i,this.connectList.some(t=>t.index==this.currentApp.index)||this.connectList.push(this.currentApp),this.previousConnectList.some(t=>t.index==this.currentApp.index)||this.previousConnectList.push(this.currentApp),this.totalNodes=this.connectList.length-1,this.isCreatedBranch||(this.testloader=!1)}});else{let t;t={},t.connectId=this.connectId,t.triggerId=this.connectId,t.connectTitle="",t.appId=l,t.actionName={title:d,desc:u},t.index=o+1,t.status=0,t.connectStatus="Draft",t.nodeType=n,t.nodeStatus=h,t.customConnect=!0,t.parentIndex=r,t.childIndex=s,t.nodesData=a,t.graphData=c,t.image=p,t.editOptions=g,t.filterEditOptions=f,t.sample_data=m,t.connected_account_id=v,t.aiConfig=b,Number(this.totalNodes)>Number(o)&&0==i?(this.isRestoringState||this.pushUndoState(),this.customerConnectService.addUserConnect(t).subscribe(e=>{if(e){const i=e.insertedId;this.nodeType=n,this.currentApp=t,this.currentApp.currentAction="app",this.currentApp.nodeId=i,this.connectList[o+1]=this.currentApp,this.previousConnectList[o+1]=this.currentApp,this.totalNodes=this.connectList.length-1,this.isCreatedBranch||(this.testloader=!1)}})):(this.isRestoringState||this.pushUndoState(),this.customerConnectService.addUserConnect(t).subscribe(e=>{if(e){const i=e.insertedId;this.customerConnectService.getNodeSampleData({indexVal:o,connectId:this.connectId,type:"create"}).subscribe(e=>{e.length>0&&"nodata"!==e?this.shiftNextAction(e,0,t,i,o,n):(this.currentApp=t,this.nodeType=n,this.isCreatedBranch||(this.testloader=!1),this.currentApp.currentAction="app",this.currentApp.nodeId=i,this.connectList[o+1]=this.currentApp,this.previousConnectList[o+1]=this.currentApp,this.totalNodes=this.connectList.length-1,this.isCreatedBranch||(this.testloader=!1))})}}))}}}shiftNextAction(t,e,n,i,o,r){this.testloader=!0;const s=t[e];let a;a={};const c=s.editOptions?s.editOptions:{};let l=s.nodeStatus?s.nodeStatus:"new";Object.keys(c).length>0?(Object.keys(c).forEach(t=>{let e;e=[],c.hasOwnProperty(t)&&(JSON.parse(c[t]).forEach((t,n)=>{if("label"===t.type)t.nodeIndex>o&&(t.nodeIndex=t.nodeIndex+1),e.push(t);else if(!0===t.custom){const n=JSON.parse(t.value);n.forEach(t=>{t.nodeIndex>o&&(t.nodeIndex=t.nodeIndex+1)}),t.value=JSON.stringify(n),e.push(t)}else e.push(t)}),e.length>0&&(a[t]=JSON.stringify(e)))}),0===Object.keys(a).length&&(l="account_selected"),this.customerConnectService.updateUserConnectBy_Id(s._id,{nodeStatus:l,editOptions:a}).subscribe(s=>{e===t.length-1?(this.router.navigateByUrl(`/customeditor/${i}/app/${this.connectId}`),this.currentApp=n,this.nodeType=r,this.isCreatedBranch||(this.testloader=!1),this.currentApp.currentAction="app",this.currentApp.nodeId=i,this.getUserConnectData(),this.isCreatedBranch||(this.testloader=!1)):this.shiftNextAction(t,e+1,n,i,o,r)})):e===t.length-1?(this.router.navigateByUrl(`/customeditor/${i}/app/${this.connectId}`),this.currentApp=n,this.nodeType=r,this.currentApp.currentAction="app",this.currentApp.nodeId=i,this.getUserConnectData(),this.isCreatedBranch||(this.testloader=!1)):this.shiftNextAction(t,e+1,n,i,o,r)}changeStep(t){"app"!==t&&(this.currentApp.aiMappingStatus="false"),("account"===t||"action"===t)&&(this.isSetUpOption=!0,this.setUpOptionMenu=!0),localStorage.setItem("changeStep","1"),this.currentApp.currentAction=t,this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`).then(()=>{setTimeout(()=>{this.resetContinueButtonPositions()},10)})}formatDataAfterTest(t,e,n,i){t.forEach((t,o)=>{if("object"==typeof t&&null!=t){let i=o,r=o;void 0!==e&&(i=e+"__"+o,"number"==typeof o&&(i=e+"["+o+"]")),void 0!==n&&(r=n+"."+o,"number"==typeof o&&(r=n+".["+o+"]")),this.formatDataAfterTest(t,i,r,t instanceof Array?"array":"object")}else void 0!==e?"array"===(void 0===i?"string":i)?(void 0===this.formattedData[e]&&(this.formattedData[e]={}),void 0===this.formattedData[e][o]&&(this.formattedData[e][o]={}),this.formattedData[e][o].value=t,this.formattedData[e][o].key=n+".["+o+"]"):(void 0===this.formattedData[e+"__"+o]&&(this.formattedData[e+"__"+o]={}),this.formattedData[e+"__"+o].value=t,this.formattedData[e+"__"+o].key=n+"."+o):(void 0===this.formattedData[o]&&(this.formattedData[o]={}),this.formattedData[o].value=t,this.formattedData[o].key=o)})}edit_delete_dropbtn(t){this.openedEditDeleteDropbtn=t===this.openedEditDeleteDropbtn?null:t}goToConnectApp(t,e=!1){var n,i,o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x;this.clearChatModelPanelState(),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const _=null!==(n=this.connectList.find(e=>e.index==t))&&void 0!==n?n:{};this.currentApp=_,this.testloader=!0,this.openPanel=!1,this.showallTriggerFound=!1,this.allTriggerNotFoundIndex=-1,this.showAppListing=!0,this.Ap
1pBranching=!0;const C=this.connectList.find(e=>e.index==t);return C?(this.currentApp=Object.assign({},C),e?(this.currentApp.currentAction="app",void(this.testloader=!1)):("preview"!=this.globalAction&&(this.currentApp.currentAction=this.currentApp&&this.currentApp.auth&&this.currentApp.auth.authId&&"account"!==this.currentApp.currentAction||"k2P4o45df5f473111E0g"===(null===(i=this.currentApp)||void 0===i?void 0:i.appId)||"k2P4o45df5f473111E0f"===(null===(o=this.currentApp)||void 0===o?void 0:o.appId)||"k2P4o69wb5f473388E6g"===(null===(r=this.currentApp)||void 0===r?void 0:r.appId)||"k2P4o69wb5f4733delay"===(null===(s=this.currentApp)||void 0===s?void 0:s.appId)||"k2P4o69wb5f4733twowaysync"===(null===(a=this.currentApp)||void 0===a?void 0:a.appId)||"k2P4o69wb5f4733syncdata"===(null===(c=this.currentApp)||void 0===c?void 0:c.appId)||"k2P4o69wb5f4733aiagent"===(null===(l=this.currentApp)||void 0===l?void 0:l.appId)||"k2P4o69wb5f4733pdfgenerator"===(null===(d=this.currentApp)||void 0===d?void 0:d.appId)||"k2P4p45df5f222345E0a"===(null===(u=this.currentApp)||void 0===u?void 0:u.appId)||"jlp5059wb5f473388e6f"===(null===(p=this.currentApp)||void 0===p?void 0:p.appId)||"janrjh1l08ex59386f67g7nh"===(null===(h=this.currentApp)||void 0===h?void 0:h.appId)||"janrjh1l08ex59386f8cx5lp"===(null===(g=this.currentApp)||void 0===g?void 0:g.appId)||"lna8nwtk00qb7189999ylsri"===(null===(f=this.currentApp)||void 0===f?void 0:f.appId)?0===this.currentApp.index?"app_options"==this.currentApp.currentAction?"options":0==this.changeAppCondition?"app":"action"==this.currentApp.currentAction?"action":"options"==this.currentApp.currentAction||"complete"==this.currentApp.nodeStatus||"account_selected"===this.currentApp.nodeStatus?"options":"app"==this.currentApp.currentAction?"action":"testView":"complete"==this.currentApp.nodeStatus?"options":"action"==this.currentApp.currentAction||"action"==this.currentApp.currentAction&&"app_selected"==this.currentApp.nodeStatus||"app"==this.currentApp.currentAction&&"ta_selected"==this.currentApp.nodeStatus||"app"==this.currentApp.currentAction&&"new"==this.currentApp.nodeStatus?"action":"app"==this.currentApp.currentAction&&"account_selected"==this.currentApp.nodeStatus?"options":"app"==this.currentApp.currentAction?"action":0!=this.changeAppCondition||this.isSkipRunTest?"Only continue if"==this.currentApp.actionNameTitle&&"Flow By Automate"==this.currentApp.name&&"complete"!=this.currentApp.nodeStatus?"action":"options":"app":(null===(m=this.currentApp)||void 0===m?void 0:m.triggerEditOptions)?"complete"==this.currentApp.nodeStatus?"options":"account":"action"==(null===(v=this.currentApp)||void 0===v?void 0:v.currentAction)&&this.currentApp.categoryId&&this.currentApp.categoryId.length>0||"action"==(null===(b=this.currentApp)||void 0===b?void 0:b.currentAction)||"app_selected"==(null===(x=this.currentApp)||void 0===x?void 0:x.nodeStatus)?"action":"app",this.changeAppCondition=!1),void this.customerConnectService.getEditOptionsByConnectId({connectId:this.connectId,index:t}).subscribe({next:e=>{var n,i,o,r;(null==e?void 0:e.editOptions)&&(this.connectList[t].editOptions=e.editOptions,this.currentApp.editOptions=e.editOptions),this.nodeType=null===(n=this.currentApp)||void 0===n?void 0:n.nodeType,this.openedEditDeleteDropbtn=null,this.isSetUpOption=!0;const s=`/customeditor/${null===(i=this.currentApp)||void 0===i?void 0:i.nodeId}/${null===(o=this.currentApp)||void 0===o?void 0:o.currentAction}/${null===(r=this.currentApp)||void 0===r?void 0:r.triggerId}`;this.router.navigateByUrl(s).then(()=>{this.testloader=!1,this.resetContinueButtonPositions(),this.cdRef.detectChanges()}).catch(()=>{this.testloader=!1,this.resetContinueButtonPositions(),this.cdRef.detectChanges()})},error:()=>{this.testloader=!1,this.resetContinueButtonPositions(),this.cdRef.detectChanges()}}))):(console.warn(`No matching item found in connectList for index: ${t}`),void(this.testloader=!1))}updateConnectName(t){const e=t.target.value;this.connectList.forEach(t=>{t&&(t.connectTitle=e)}),this.currentApp&&(this.currentApp.connectTitle=e),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:e}).subscribe(t=>{this.testloader=!1})}callTestFunction(t=!1,e=!1){if(this.showErrorAlert=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),this.isSkipRunTest=!!t,this.testloader=!0,this.currentApp.currentAction="options",this.connectList.find(t=>t.index==this.currentApp.index).currentAction=this.currentApp.currentAction,0===this.currentApp.index||"k2P4o69wb5f4733aiagent"===this.currentApp.appId){if(console.log("[AI Agent] currentApp",this.currentApp),"k2P4o69wb5f4733aiagent"===this.currentApp.appId&&"testView"!=this.currentApp.currentAction){if(t)this.checkSampleData(this.connectList,this.currentApp)&&!this.ngOnChanges(this.currentApp.index)?this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete"}).subscribe(()=>{this.runTestNode(this.currentApp.index),t&&this.connectList.length>1?this.moveToActionForSkip():this.moveToNextAction()}):(this.testloader=!0,this.skipStep());else{const t=(()=>{var t,e,n;try{const i=null!==(e=null===(t=this.currentApp.editOptions)||void 0===t?void 0:t.prompt)&&void 0!==e?e:null===(n=this.currentApp.editOptions)||void 0===n?void 0:n.ACT__prompt,o="string"==typeof i?JSON.parse(i):i;if(Array.isArray(o)&&o.length>0)return o.map(t=>{var e;return null!==(e=null==t?void 0:t.value)&&void 0!==e?e:""}).join("")}catch(i){}return""})(),e={connectId:this.currentApp.triggerId,nodeId:this.currentApp.nodeId,mode:"execute",userInput:t||"Run AI Agent test",timestamp:(new Date).toISOString()};console.log("[AI Agent] executeOpenAiAgent request",e),this.commonService.executeOpenAiAgent(e).subscribe(t=>{var e,n,i,o,r,s,a;this.testloader=!1;const c=null!==(n=null!==(e=null==t?void 0:t.data)&&void 0!==e?e:null==t?void 0:t.message)&&void 0!==n?n:"";let l=[];const d=(null==t?void 0:t.executionMeta)||{};l=(null===(o=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.returnData)||void 0===o?void 0:o.data)&&Array.isArray(t.data.returnData.data)?t.data.returnData.data:Array.isArray(c)?c:[{key:"agent_output",text:"Agent Output",value:"string"==typeof c?c:JSON.stringify(c)},{key:"final_step_type",text:"Final Step Type",value:d.finalStepType||""},{key:"final_step_output",text:"Final Step Output",value:d.finalStepOutput||""},{key:"response_id",text:"Response ID",value:d.responseId||""},{key:"trace_id",text:"Trace ID",value:d.traceId||""},{key:"turn_count",text:"Turn Count",value:null!==(r=d.turnCount)&&void 0!==r?r:""},{key:"max_turns",text:"Max Turns",value:null!==(s=d.maxTurns)&&void 0!==s?s:""},{key:"tools_used",text:"Tools Used",value:Array.isArray(d.toolsUsed)?d.toolsUsed.join(", "):d.toolsUsed||""},{key:"generated_item_count",text:"Generated Item Count",value:null!==(a=d.generatedItemCount)&&void 0!==a?a:""}],l=l.map((t,e)=>t&&void 0!==t.key?t:{key:(null==t?void 0:t.text)||(null==t?void 0:t.label)||`agent_output_${e+1}`,text:(null==t?void 0:t.text)||(null==t?void 0:t.label)||`Agent Output ${e+1}`,value:void 0!==(null==t?void 0:t.value)?t.value:t});const u=[{format:!1,date:Date.now(),data:l}];this.currentApp.sample_data=u;const p=this.connectList.find(t=>t.index==this.currentApp.index);p&&(p.sample_data=u,p.nodeStatus="complete",p.connectStatus="Draft",p.status=0),this.currentApp.nodeStatus="complete",this.currentApp.currentAction="testView",this.connectList.find(t=>t.index==this.currentApp.index).currentAction=this.currentApp.currentAction,this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete",connectStatus:"Draft",status:0,sample_data:u}).subscribe(()=>{var t;this.connectList.forEach(t=>{t.connectStatus="Draft",t.status=0}),this.customerConnectService.updateConnectByConnectId(this.connectList[0].triggerId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(t=this.connectList)||void 0===t?void 0:t.userConnects)||[]),this.runTestNode(this.currentApp.index)})},t=>{this.testloader=!1,this.currentApp.currentAction="testView",this.connectList.find(t=>t.index==this.currentApp.index).currentAction=this.currentApp.currentAction,console.error("[AI Agent] executeOpenAiAgent error",t)})}return}var n=0;"k2P4o69wb5f4733aiagent"===this.currentApp.appId&&(n=this.currentApp.index),"testView"!=this.currentApp.currentAction?t?(this.connectList&&this.connectList[0]&&(this.connectList[0].triggerData=this.connectList[0].triggerData||{},this.connectList[0].triggerData.triggerTestFail=!1),this.checkSampleData(this.connectList,this.currentApp)&&!this.ngOnChanges(this.currentApp.index)?this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete"}).subscribe(e=>{this.runTestNode(this.currentApp.index),t&&this.connectList.length>1?this.moveToActionForSkip():this.moveToNextAction()}):(this.testloader=!0,this.skipStep())):(this.createNodeFlowCondition=!0,this.connectTestTrigger(n,t=>{if(t){let t=!0;
1this.checkSampleData(this.connectList,this.currentApp)&&(t=this.ngOnChanges(this.currentApp.index)),this.currentApp.currentAction="testView",this.testloader=!1,t&&(this.currentApp.connectStatus="Draft",this.currentApp.nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).connectStatus="Draft",this.connectList.find(t=>t.index==this.currentApp.index).currentAction=this.currentApp.currentAction,this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete",connectStatus:"Draft",status:0}).subscribe(t=>{var e;this.connectList.forEach(t=>{t.connectStatus="Draft",t.status=0}),this.customerConnectService.updateConnectByConnectId(this.connectList[0].triggerId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[]),this.runTestNode(this.currentApp.index)}))}else this.currentApp.currentAction="testView",this.connectList.find(t=>t.index==this.currentApp.index).currentAction=this.currentApp.currentAction,this.testloader=!1})):this.moveToNextAction()}else{let e=!0;if(this.checkSampleData(this.connectList,this.currentApp)&&(e=this.ngOnChanges(this.currentApp.index)),e)if(t)e?(this.activeAgent=!1,this.currentApp.connectStatus="Draft",this.currentApp.nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).connectStatus="Draft",this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete",connectStatus:"Draft",status:0}).subscribe(t=>{var e;this.connectList.forEach(t=>{t.connectStatus="Draft",t.status=0}),this.customerConnectService.updateConnectByConnectId(this.connectList[0].triggerId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[]),this.runTestNode(this.currentApp.index),this.skipStep()})):this.skipStep();else{const t=this.currentApp.index;this.connectTestAction(t,e=>{e?(this.activeAgent=!1,this.currentApp.connectStatus="Draft",this.currentApp.nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).connectStatus="Draft",this.connectList.find(t=>t.index==this.currentApp.index).status=0,this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete",connectStatus:"Draft",status:0}).subscribe(e=>{this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),this.runTestNode(t)}),this.moveToNextAction(),this.cdRef.detectChanges()):(this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="incomplete",this.connectList.find(t=>t.index==this.currentApp.index).connectStatus="Draft",this.currentApp.connectStatus="Draft",this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"incomplete",connectStatus:"Draft",status:0}).subscribe(e=>{this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),this.runTestNode(t)}))})}else this.connectTestAction(this.currentApp.index,e=>{e||t?(this.currentApp.nodeStatus="complete",this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="complete",this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"complete"}).subscribe(e=>{this.runTestNode(this.currentApp.index),t?this.moveToActionForSkip():this.moveToNextAction()})):(this.connectList.find(t=>t.index==this.currentApp.index).nodeStatus="incomplete",this.connectList.find(t=>t.index==this.currentApp.index).connectStatus="Draft",this.currentApp.connectStatus="Draft",this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==this.currentApp.index).nodeId,{nodeStatus:"incomplete",connectStatus:"Draft"}).subscribe(t=>{this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),this.runTestNode(this.currentApp.index)}))})}}checkSampleData(t,e){return t.find(t=>t.index==e.index)&&t.find(t=>t.index==e.index).sample_data&&t.find(t=>t.index==e.index).sample_data[0]&&t.find(t=>t.index==e.index).sample_data[0].data&&t.find(t=>t.index==e.index).sample_data[0].data.length>0}checkSampleDataByIndex(t,e){return t[e]&&t[e].sample_data&&t[e].sample_data[0]&&t[e].sample_data[0].data&&t[e].sample_data[0].data.length>0}skipStep(){let t=this.prepareData(this.currentApp),e=t.editOptionsData,n=t.funName,i=t.connectData;this.actionFailedData=null,this.isActionFailed=!1,this.actionFailedIndex=null,this.actionData=null,this.connectList&&this.connectList[0]&&(this.connectList[0].triggerData=this.connectList[0].triggerData||{},this.connectList[0].triggerData.triggerTestFail=!1),this.commonService.getResponseData({appId:this.currentApp.appId,taName:this.currentApp.actionNameTitle}).subscribe(t=>{var o;"notfound"===t.message||"dynamic"===("notfound"!==t.message?t.type:"dynamic")?this.commonService.triggerTestAction(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:null===(o=this.currentApp.name)||void 0===o?void 0:o.split(" ").join("").toLowerCase(),n,e,this.currentApp.filterEditOptions,i).pipe(Rl(1e4),(0,$l.K)(t=>(0==this.currentApp.index?(this.connectList[0].triggerData={},this.connectList[0].triggerData={triggerTestFail:!0,triggerTestFailMessage:"Something Went Wrong!"},this.currentApp.currentAction="testView",this.testloader=!1):(this.actionData={data:"Something Went Wrong!"},this.isActionFailed=!0,this.actionFailedData="Something Went Wrong!",this.actionFailedIndex=this.currentApp.index,this.currentApp.currentAction="overview",this.testloader=!1),t))).subscribe(e=>{if(e.returnData){let n,i;if(this.formattedData={},n=[],void 0!==e.returnData.format){this.format=!0;const t=[];e.returnData.data.forEach((e,n)=>{e.value=e.text,t[n]=e}),i={format:e.returnData.format,date:new Date,data:t,type:"static"},n.push({format:!0,date:Date.now(),data:t}),this.formattedData=t}else n.push({format:!1,date:Date.now(),data:e.returnData}),i={format:!1,date:new Date,data:e.returnData,type:"dynamic"};n[0].data&&n[0].data.forEach(t=>{t.value&&(t.value="")}
1);const o=this.currentApp.index;this.updateEditOptions(n[0].data,o,e=>{n[0].data=e,this.showSuccessAlert=!0,setTimeout(()=>{this.showSuccessAlert=!1},7e3),this.connectList.find(t=>t.index==this.currentApp.index).sample_data=n,this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,{nodeStatus:"complete",sample_data:n}).subscribe(e=>{this.runTestNode(o),"notfound"===t.message&&this.commonService.saveResponseData({appId:this.currentApp.appId,taName:this.currentApp.actionNameTitle,response_data:i}).subscribe(t=>{})}),this.connectList.length>1?this.moveToActionForSkip():this.moveToNextAction()})}else"notfound"!==t.message&&Array.isArray(t.data)&&t.length>0?this.getSampleFromDB(t):(0==this.currentApp.index?(this.connectList[0].triggerData={},this.connectList[0].triggerData={triggerTestFail:!0,triggerTestFailMessage:e.message},this.currentApp.currentAction="testView"):(this.actionData=e,this.isActionFailed=!0,this.actionFailedData=e&&e.message?e.message:e.data||"Something Went Wrong!",this.actionFailedIndex=this.currentApp.index,this.currentApp.currentAction="overview"),this.testloader=!1)}):this.getSampleFromDB(t)})}moveToActionForSkip(){this.customerConnectService.checkNodeStatusCompleted({connectId:this.connectId}).subscribe(t=>{const e=this.connectList.find(t=>t.index==this.currentApp.index),n=(null==e?void 0:e.childIndex)||[],i=t=>{const e=this.connectList.find(e=>e.index==t);if(e){if("complete"!==e.nodeStatus)return t;if(e.childIndex&&e.childIndex.length>0&&null!==e.childIndex[0])for(const t of e.childIndex){const e=i(t);if(void 0!==e)return e}}};if(n.length>0&&null!==n[0]){const t=i(n[0]);void 0!==t&&(document.querySelectorAll(".f-node.f-selected").forEach(t=>t.classList.remove("f-selected")),this.goToConnectApp(t))}else this.skippanel=!0,this.AppBranching=!1,this.isPanelVisible=!1,this.currentApp.currentAction="overview"}),this.testloader=!1}getSampleFromDB(t){let e;this.formattedData=t.data,e=[],e.push({format:t.format,date:Date.now(),data:t.data}),e[0].data&&e[0].data.forEach(t=>{t.value&&(t.value="")}
1),this.updateEditOptions(e[0].data,this.currentApp.index,t=>{e[0].data=t,this.connectList.find(t=>t.index==this.currentApp.index).sample_data=e,this.currentApp.sample_data=e;const n=this.connectList.findIndex(t=>t.index==this.currentApp.index);-1!==n&&(this.connectList[n]=Object.assign(Object.assign({},this.connectList[n]),{nodeStatus:"complete"}),this.cdRef.detectChanges()),this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,{nodeStatus:"complete",sample_data:e}).subscribe(t=>{}),this.showSuccessAlert=!0,setTimeout(()=>{this.showSuccessAlert=!1},7e3),this.testloader=!1,this.connectList.length>1?this.moveToActionForSkip():this.moveToNextAction()})}prepareData(t){let e;t.editOptions?(e={},0===t.index||"k2P4o69wb5f4733aiagent"===t.appId?(e=t.editOptions,Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/\[:space:\]/g," "))})):Object.keys(t.editOptions).forEach(n=>{if(t.editOptions[n][0].custom){var i=JSON.parse(JSON.stringify(t.editOptions[n]));i[0].value="",t.editOptions[n][0].value.forEach(t=>{i[0].value=i[0].value+t.value}),e[n]=JSON.stringify(i)}else e[n]=JSON.stringify(t.editOptions[n])})):e={};let n,i="";return i="actions"!==t.nodeType&&"action"!==t.nodeType?t.name+t.actionNameTitle:t.actionNameTitle,i=i.replace(/ /g,""),i=i.replace(/-/g,""),i=i.replace("/",""),i=i.replace("{",""),i=i.replace("}",""),i=i.replace("(",""),i=i.replace(")",""),n={connectid:t.triggerId,appId:t.appId},n.connectId=t.triggerId,n.nodeId=t.nodeId,t.auth&&t.auth.authId&&(n.authId=t.auth.authId),{editOptionsData:e,funName:i,connectData:n}}connectTestTrigger(t,e){let n=this.prepareData(this.currentApp),i=n.editOptionsData,o=n.funName,r=n.connectData;this.commonService.triggerTestAction(this.connectList.find(e=>e.index==t).credentialUrlName?this.connectList.find(e=>e.index==t).credentialUrlName:this.connectList.find(e=>e.index==t).name.split(" ").join("").toLowerCase(),o,i,this.currentApp.filterEditOptions,r).subscribe(n=>{if(1===n.status)if(this.triggerTestStatus=n.status,n.returnData){let i;if(i=[],void 0!==n.returnData.format){const t=[];n.returnData.data.forEach((e,n)=>{!0===e.value&&"boolean"==typeof e.value?e.value="true":!1===e.value&&"boolean"==typeof e.value?e.value="false":null==e.value?e.value="":"number"==typeof e.value&&(e.value=e.value.toString()),t[n]=e}),i.push({format:!0,date:Date.now(),data:t})}else i.push({format:!1,date:Date.now(),data:n.returnData});this.updateEditOptions(i[0].data,t,n=>{i[0].data=n,this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(e=>e.index==t).nodeId,{nodeStatus:"complete",sample_data:i}).subscribe(n=>{this.runTestNode(t),this.connectList.find(e=>e.index==t).sample_data=i,this.currentApp.sample_data=i,this.connectList.map(e=>{e.index==t&&(e.nodeStatus="complete")}),this.connectList.find(e=>e.index==t).triggerData={triggerTestFail:!1},e(!0)})})}else this.connectList.find(e=>e.index==t).triggerData={triggerTestFail:!0,triggerTestFailMessage:n.message},e(!1);else this.connectList.find(e=>e.index==t).triggerData={triggerTestFail:!0,triggerTestFailMessage:n.message},e(!1)})}connectTestAction(t,e){var n,i;this.triggerTestFail=!1,this.commonService.connectTestMultiAction({connectId:this.connectList.find(e=>e.index==t).triggerId,current_Id:this.connectList.find(e=>e.index==t).nodeId,nodeId:this.connectList.find(e=>e.index==t).nodeId,authId:null===(i=null===(n=this.connectList.find(e=>e.index==t))||void 0===n?void 0:n.auth)||void 0===i?void 0:i.authId}).subscribe(n=>{if(this.testloader=!1,this.actionData=n,n.data||n.error)this.isActionFailed=!0,this.actionFailedData=n.data?n.data:"object"==typeof n.error?JSON.stringify(n.error):n.error,this.actionFailedIndex=t,this.currentApp.currentAction="overview",this.AppBranching=!1,this.isPanelVisible=!1,e(!1);else if(this.actionFailedData=null,this.isActionFailed=!1,this.actionFailedIndex=null,"success"===n.message)e(!0);else{const i=n.returnData||{format:!0,data:[]};let o=[{format:i.format,date:Date.now(),data:i.data}];this.updateEditOptions(o[0].data,t,n=>{o[0].data=n,0==this.connectList.some(t=>1===t.status)&&this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{status:0,connectStatus:"Draft"}).subscribe(t=>{this.connectList.forEach(t=>{t.connectStatus="Draft"})}),this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(e=>e.index==t).nodeId,{nodeStatus:"complete",sample_data:o}).subscribe(n=>{var i,r;this.runTestNode(t),this.connectList.find(e=>e.index==t).sample_data=o,this.connectList.find(e=>e.index==t).nodeStatus="complete",(!(null===(i=this.connectList.find(e=>e.index==t))||void 0===i?void 0:i.childIndex)||1===(null===(r=this.connectList.find(e=>e.index==t))||void 0===r?void 0:r.childIndex.length)&&null===this.connectList.find(e=>e.index==t).childIndex[0])&&(this.AppBranching=!1,this.isSetUpOption=!1,this.isPanelVisible=!1),this.customerConnectService.getUserConnectData(this.connectId).subscribe(t=>{this.activateAgent=this.isReadyToPublish((null==t?void 0:t.userConnects)||[]),this.activeAgent=this.isPublished((null==t?void 0:t.userConnects)||[]),this.cdRef.detectChanges()}),e(!0)})})}})}isReadyToPublish(t){return!(!t||t.length<1)&&t.filter(t=>t&&Object.keys(t).length>0).every(t=>"complete"===t.nodeStatus&&0==t.status)}isPublished(t){return!(!t||t.length<1)&&t.every(t=>"complete"===t.nodeStatus&&1===t.status)}updateUserConnectStatus(t,e,n,i){var o;if(1===e&&"Inactive"===i&&(e=0,this.createNodeFlowCondition=!1),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),this.testloader=!0,this.selectedStatus=i,this.currentUser.connect_data>=this.currentUser.plan_details[0].connects&&"Active"===i&&"jc0fgwefcky2"!==this.currentUser.planId)this.router.navigateByUrl("/plans");else{let i=!1;for(const t of this.connectList)-1===this.currentUser.plan_details[0].apps.indexOf(null==t?void 0:t.app_type)&&(i=!0);"action"===(null===(o=this.connectList[0])||void 0===o?void 0:o.nodeType)&&1===this.connectList.length&&(i=!1);const r="Enterprise"!=this.currentUser.plan_details[0].planName,s=this.connectList.filter(t=>"Enterprise"===t.app_type),a=s.length>0;if(r&&a&&1!==this.currentUser.testingAccount){this.goToConnectApp(this.connectList.length-1);const t=s.map(t=>t.displayName).join(", ");let e=this.modalService.show(Yl,{initialState:{appNames:t}});this.testloader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0),e.hide()}else!i&&"jc0fgwefcky2"!==this.currentUser.planId||1==this.currentUser.testingAccount?this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:t,connectStatus:n}).subscribe(t=>
1{if(1===e){let t=this.connectList.map(t=>t.nodeId);this.customerConnectService.updateUserConnectOnFinishMultiple(t,{status:1,connectStatus:"Completed",userConnectId:this.connectId}).subscribe(t=>{t.desc=t.desc||[],"success"==t.result?(localStorage.setItem("activeTab","Published"),this.currentApp.connectStatus="Completed",this.connectList.forEach(t=>{t.connectStatus="Completed"}),this.activeAgent=!0,this.undoStack=[],this.redoStack=[],this.testloader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0)):(this.testloader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0))});for(let e=0;e<this.connectList.length;e++)this.connectList[e].status=1}else{this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{status:e}).subscribe(t=>{this.customerConnectService.deleteUserConnectCron(this.currentApp.triggerId).subscribe(t=>{var n;if(this.isCreatedBranch||"options"==this.currentApp.currentAction?this.deleteLoader?(this.testloader=!1,this.deleteLoader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0)):this.createNodeFlowCondition||(this.testloader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0)):(this.testloader=!1,this.deleteLoader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0)),this.createNodeFlowCondition=!1,1===(null===(n=this.connectList[this.connectList.length-1])||void 0===n?void 0:n.status)){const t=this.customerService.GetCurrent();t.connect_data=t.connect_data-1,this.customerService.setCurrent(t),this.connectList[this.connectList.length-1].status=e,this.activeAgent=!1,this.activateAgent=!0,this.testloader=!1,setTimeout(()=>{this.resetContinueButtonPositions()},0)}})});for(let t=0;t<this.connectList.length;t++)this.connectList[t].status=0}}):this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{status:0,connectTitle:t,connectStatus:n}).subscribe(t=>{this.customerConnectService.deleteUserConnectCron(this.currentApp.triggerId).subscribe(t=>{this.connectList[this.connectList.length-1].status=0,$("#off").prop("checked",!0),$("#on").prop("checked",!1),1===e&&"jc0fgwefcky2"!==this.currentUser.planId?(this.modalService.show(Vl),setTimeout(()=>{this.resetContinueButtonPositions()},0)):"jc0fgwefcky2"===this.currentUser.planId&&this.activateAgent&&(this.modalService.show(zl,{initialState:{customerId:this.currentUser.customerId}}),this.goToConnectApp(this.connectList.length-1),setTimeout(()=>{this.resetContinueButtonPositions()},0))})})}}updateEditOptions(t,e,n){let i,o=this.connectList.find(t=>t.index==e);i={};let r="no";o.index>e&&o.editOptions&&Object.keys(o.editOptions).length>0&&Object.keys(o.editOptions).forEach(n=>{let s=[];s="string"==typeof o.editOptions[n]?JSON.parse(o.editOptions[n]):o.editOptions[n],s[0]&&s[0].custom?("string"==typeof s[0].value&&(s[0].value=JSON.parse(s[0].value)),s[0].value.forEach((n,i)=>{if("label"===n.type&&n.nodeIndex===e){r="yes";const o=[...t].filter(t=>t.key===n.key);o&&o[0]?s[0].value[i].value=o[0].value:t.push(this.connectList[e].sample_data[0].data.find(t=>null!=t&&t.key===n.key))}})):s[0]&&s.forEach((n,i)=>{if("label"===n.type&&n.nodeIndex===e){r="yes";const o=[...t].filter(t=>t.key===n.key);o&&o[0]?s[i].value=o[0].value:t.push(this.connectList[e].sample_data[0].data.find(t=>null!=t&&t.key===n.key))}}),i[n]=s}
1),"yes"===r&&(Object.keys(i).forEach(t=>{i[t][0]&&i[t][0].custom&&(i[t][0].value=JSON.stringify(i[t][0].value)),i[t]=JSON.stringify(i[t])}),this.customerConnectService.updateUserConnect(o.nodeId,{editOptions:i}).subscribe(t=>{})),n(t)}deleteNode(t){this.isActionFailed=!1,this.actionFailedIndex=null,this.actionFailedData=null,this.actionData=null,this.testloader=!0;const e=t.nodeId?t.nodeId:t._id,n=!!t.index&&t.index;""!==e&&n>0&&this.customerConnectService.updateConnectStatus(this.connectId).subscribe(t=>{this.customerConnectService.getUserConnectBy_Id(e+"?Page=getappid&cId="+(this.currentUser.customerId||this.cookieService.get("customerId"))).subscribe(t=>{this.customerConnectService.deleteConnectNode(e).subscribe(e=>{if(e){this.warningInfo=[];const e={connectId:this.connectId,currentIndex:n,customerId:this.currentUser.customerId||this.cookieService.get("customerId"),type:"delete"};this.customerConnectService.updateConnectByCondition(e).subscribe(e=>{if(e){let e;e=[],this.connectList.forEach((t,e)=>{}),this.connectList=e,this.previousConnectList=JSON.parse(JSON.stringify(e)),this.currentApp={};const i=!!(t.sample_data&&t.sample_data.length>0)&&t.sample_data[0];if(i){const t={indexVal:n,connectId:this.connectId,customerId:this.currentUser.customerId||this.cookieService.get("customerId"),type:"delete"};this.customerConnectService.getNodeSampleData(t).subscribe(t=>{if(t.length>0&&"nodata"!==t){let e;if(e=[],!0===i.format)i.data.forEach((t,i)=>{t&&""!==t.key&&e.push(t.key+"~~"+n)});else if(Object.keys(i.data).length>0)for(const t in i.data)i.data.hasOwnProperty(t)&&e.push(t+"~~"+n);e.length>0?t.forEach((i,o)=>{const r={},s=i.editOptions?i.editOptions:{};let a=i.nodeStatus?i.nodeStatus:"new";Object.keys(s).length>0?(Object.keys(s).forEach(t=>{let i;i=[],s.hasOwnProperty(t)&&(JSON.parse(s[t]).forEach((t,o)=>{if("label"===t.type)t.nodeIndex===n?e.indexOf(t.key+"~~"+n)>=0||i.push(t):(t.nodeIndex>n&&(t.nodeIndex=t.nodeIndex-1),i.push(t));else if(!0===t.custom){if(!0===t.custom&&t.value)try{let e=JSON.parse(t.value);if(Array.isArray(e)){for(let t=e.length-1;t>=0;t--){const i=e[t];void 0!==i.nodeIndex&&(i.nodeIndex===n?e.splice(t,1):i.nodeIndex>n&&(i.nodeIndex=i.nodeIndex-1))}t.value=JSON.stringify(e),i.push(t)}}catch(r){console.error("Failed to parse item.value for key:",r)}}else i.push(t)}),i.length>0&&(r[t]=JSON.stringify(i)))}),0===Object.keys(r).length&&(a="account_selected"),this.customerConnectService.updateUserConnectBy_Id(i._id,{nodeStatus:a,editOptions:r}).subscribe(e=>{o===t.length-1&&(this.currentApp=this.connectList[n-1],this.getUserConnectData())})):o===t.length-1&&(this.currentApp=this.connectList[n-1],this.getUserConnectData())}):(this.currentApp=this.connectList[n-1],this.getUserConnectData())}else this.currentApp=this.connectList[n-1],this.getUserConnectData()})}else{const t={indexVal:n,connectId:this.connectId,customerId:this.currentUser.customerId||this.cookieService.get("customerId"),type:"delete"};this.customerConnectService.getNodeSampleData(t).subscribe(t=>{t.length>0&&"nodata"!==t?t.forEach((e,i)=>{const o={},r=e.editOptions?e.editOptions:{};let s=e.nodeStatus?e.nodeStatus:"new";Object.keys(r).length>0?(Object.keys(r).forEach(t=>{let e;e=[],r.hasOwnProperty(t)&&(JSON.parse(r[t]).forEach((t,i)=>{"label"===t.type&&t.nodeIndex>n&&(t.nodeIndex=t.nodeIndex-1),e.push(t)}),e.length>0&&(o[t]=JSON.stringify(e)))}),0===Object.keys(o).length&&(s="account_selected"),this.customerConnectService.updateUserConnectBy_Id(e._id,{nodeStatus:s,editOptions:o}).subscribe(e=>{i===t.length-1&&(this.currentApp=this.connectList[n-1],this.getUserConnectData())})):i===t.length-1&&(this.currentApp=this.connectList[n-1],this.getUserConnectData())}):(this.currentApp=this.connectList[n-1],this.getUserConnectData())})}}})}})})})}createActionByIndex(t){let e;e={},e.connectId=this.connectId,e.connectTitle="",e.appId="",e.actionName={title:"",desc:""},e.index=t,e.status=0,e.connectStatus="Draft",e.nodeType="actions",e.nodeStatus="new",e.customConnect=!0,this.customerConnectService.addUserConnect(e).subscribe(t=>{if(t){const n=t.insertedId;this.nodeType=e.nodeType,this.currentApp=e,this.currentApp.currentAction="app",this.currentApp.nodeId=n,this.connectList.push(this.currentApp)}})}updateShowAppListing(t){if(this.showAppListing=t.showAppListing,!1===t.showAppListing&&this.pendingTestCompleteCallback){const t=this.pendingTestCompleteCallback,e=this.pendingTestNodeLabel;this.pendingTestCompleteCallback=null,this.pendingTestNodeLabel="",t(!0,e)}}testFailed(t){if(this.pendingTestCompleteCallback){const t=this.pendingTestCompleteCallback,e=this.pendingTestNodeLabel;this.pendingTestCompleteCallback=null,this.pendingTestNodeLabel="",t(!1,e)}this.triggerTestFailStatus=t.triggerTestFail,void 0===this.triggerTestFailStatus&&(this.triggerTestFailStatus=!1),this.errorCount=t.errorCount,void 0===this.errorCount||this.errorCount>=2?(this.bookExpert=!0,this.bookExpertIcon=!0):(this.bookExpert=!1,this.bookExpertIcon=1==this.currentUser.appointmentBookingCheck||1==this.appointmentBookingCheckStatus)}changeMode(){var t;this.globalAction="edit",this.location.replaceState("/some/newstate/"),this.currentApp.currentAction=this.isOption()?"options":"account","k2P4o45df5f473111E0f"===(null===(t=this.currentApp)||void 0===t?void 0:t.appId)&&
1(this.currentApp.currentAction="options");let e=this.router.url;e=e.replace("/preview","/"+this.currentApp.currentAction),this.location.replaceState(e)}isOption(){var t,e,n,i,o;return Object.keys(null!==(e=null===(t=this.currentApp)||void 0===t?void 0:t.editOptions)&&void 0!==e?e:{}).length>0||(null===(i=null===(n=this.currentApp)||void 0===n?void 0:n.additionalTriggerEditOptions)||void 0===i?void 0:i.length)>0||"webhookUrl"===(null===(o=this.currentApp)||void 0===o?void 0:o.triggerType)}handleUpdateTestMode(t){this.isActionFailed=t.isActionFailed,this.actionFailedIndex=t.actionFailedIndex,this.actionFailedData=t.actionFailedData,this.actionData=t.actionData}unMappedFields(t){try{if(this.connectList[t].editOptions){let e={},n=!0;return Object.keys(this.connectList[t].editOptions).forEach(i=>{try{if(e[i]="string"==typeof this.connectList[t].editOptions[i]?JSON.parse(this.connectList[t].editOptions[i]):this.connectList[t].editOptions[i],e[i][0]&&e[i][0].custom&&e[i][0].value&&"string"==typeof e[i][0].value)try{e[i][0].value=JSON.parse(e[i][0].value)}catch(o){e[i][0].value=i}e[i][0]&&e[i].forEach((t,o)=>{"label"===t.type&&this.connectList[t.nodeIndex]&&(this.connectList[t.nodeIndex].sample_data&&this.connectList[t.nodeIndex].sample_data[0]&&this.connectList[t.nodeIndex].sample_data[0].data.find(n=>{if(n.key===t.key)return e[i][o].value=n.value,!0})||(n=!1))})}catch(o){return!0}}),n}}catch(e){return!0}}toggleCopilot(){this.showCopilot=!this.showCopilot}closeCopilot(){this.showCopilot=!1}onCopilotShortcut(t){!t.metaKey&&!t.ctrlKey||t.shiftKey||t.altKey||!t.key||"k"!==t.key.toLowerCase()||(t.preventDefault(),this.toggleCopilot())}onCopilotAppSetup(t){var e,n,i,o;const{app:r,event:s,account:a,targetNode:c,nodeIndex:l}=t;if(!r||void 0===l)return;const d=this.connectList.findIndex(t=>t.index===l);if(-1===d)return;if(this.connectList[d]=Object.assign(Object.assign({},this.connectList[d]),{appId:r.appId,image:r.image,displayName:r.displayName,nodeStatus:s?"ta_selected":"app_selected",currentAction:s?a?"options":"account":"action",actionNameTitle:(null==s?void 0:s.trigger_action_name)||"",actionNameTitle_display:(null==s?void 0:s.trigger_action_displayname)||"",triggerEditOptions:(null==s?void 0:s.options)||[]}),a){const t=a.accountName||a.accountNickName||"";this.connectList[d].connected_account_id=a._id,this.connectList[d].authId=a._id,this.connectList[d].auth={authId:a._id,connected:!0,userEmail:t,accountName:t},this.connectList[d].nodeStatus="account_selected",this.customerConnectService.updateUserConnectBy_Id(c.nodeId,{nodeStatus:"account_selected",auth:{connected:!0,userEmail:t,accountName:t},connected_account_id:a._id}).subscribe()}if(this.currentApp.index===l){const t=(null==a?void 0:a.accountName)||(null==a?void 0:a.accountNickName)||"";Object.assign(this.currentApp,{appId:r.appId,image:r.image,displayName:r.displayName,currentAction:s?a?"options":"account":"action",nodeStatus:a?"account_selected":s?"ta_selected":"app_selected",actionNameTitle:(null==s?void 0:s.trigger_action_name)||"",actionNameTitle_display:(null==s?void 0:s.trigger_action_displayname)||"",triggerEditOptions:(null==s?void 0:s.options)||[],name:r.name,credentialUrlName:(null===(e=r.credential)||void 0===e?void 0:e.urlName)||null}),a&&(this.currentApp.connected_account_id=a._id,this.currentApp.authId=a._id,this.currentApp.auth={authId:a._id,connected:!0,userEmail:t,accountName:t}),s&&a&&(this.isSetUpOption=!0)}const u=null===(n=this.graph_data)||void 0===n?void 0:n.find(t=>t.id==l);u&&(u.displayName=r.displayName,u.imageFinal=r.image,u.eventFinal=(null==s?void 0:s.trigger_action_displayname)||"");const p=null===(i=this.nodes)||void 0===i?void 0:i.find(t=>t.connectorId==l);if(p&&(p.displayName=r.displayName,p.imageFinal=r.image,p.eventFinal=(null==s?void 0:s.trigger_action_displayname)||""),(null===(o=this.currentApp)||void 0===o?void 0:o.triggerId)&&this.nodes){const t=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""}));this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:t,graphData:this.graph_data}).subscribe()}this.cdRef.detectChanges()}getCopilotInsertPosition(t){var e,n,i;if(null!=t){this.parentIndex=t.toString();const n=this.connectList.find(e=>e&&e.index==t),i=null===(e=null==n?void 0:n.childIndex)||void 0===e?void 0:e[0];this.childIndex=null!=i&&null!==i?i.toString():null}else{const t=this.connectList.filter(t=>t&&Object.keys(t).length>0).reduce((t,e)=>Number(e.index)>Number(t.index)?e:t,this.connectList[0]);this.parentIndex=null!==(i=null===(n=null==t?void 0:t.index)||void 0===n?void 0:n.toString())&&void 0!==i?i:"0",this.childIndex=null}}onCopilotAddNode(t){this.getCopilotInsertPosition(null==t?void 0:t.afterNodeIndex),this.createNodeFlow()}onCopilotAddFlow(t){this.getCopilotInsertPosition(null==t?void 0:t.afterNodeIndex),this.createBranchFlow()}onCopilotAddAIAgent(t){this.getCopilotInsertPosition(null==t?void 0:t.afterNodeIndex),this.createAIAgentNode()}onCopilotDeleteNode(t){var e;if(!t||0===t.index)return;const n=null===(e=this.nodes)||void 0===e?void 0:e.find(e=>e.connectorId==t.index);n&&this.deleteNodeFlow(n)}onCopilotRenameConnect(t){!(null==t?void 0:t.newName)||(this.connectList[0].connectTitle=t.newName,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:t.newName}).subscribe(()=>{}))}onCopilotActivateConnect(t){var e;const n=(null===(e=this.connectList[0])||void 0===e?void 0:e.connectTitle)||"";if(null==t?void 0:t.activate){const e=this.connectList.filter(t=>t&&Object.keys(t).length>0).filter(t=>
1!t.appId||""===t.appId||"complete"!==t.nodeStatus);if(e.length>0){const n=e.map(t=>{const e=t.nodeStatus||"new";return`Node ${t.index} (${t.displayName||"Not configured"}) \u2014 ${t.appId?"app_selected"===e?"event not selected":"ta_selected"===e?"account not connected":"account_selected"===e?"setup options not completed":"not complete":"app not selected"}`}).join("\n");return void((null==t?void 0:t.onIncomplete)&&t.onIncomplete(n))}this.updateUserConnectStatus(n,1,"Completed","Active")}else this.updateUserConnectStatus(n,0,"Inactive","Inactive")}onCopilotAddNodeNote(t){if(void 0===(null==t?void 0:t.nodeIndex)||!(null==t?void 0:t.noteText))return;const e=this.connectList.find(e=>(null==e?void 0:e.index)==t.nodeIndex);e&&(e.comments=t.noteText,this.saveNodeNote({connectorId:t.nodeIndex,comments:t.noteText}))}resolveActionNodeForMapping(t,e){var n;if(!(null===(n=this.connectList)||void 0===n?void 0:n.length))return null;let i=null;if(null!=t&&(i=this.connectList.find(e=>(null==e?void 0:e.index)==t)),!i&&e){const t=String(e).toLowerCase().replace(/\s+/g,""),n=this.connectList.filter(e=>{if(!(null==e?void 0:e.appId))return!1;const n=((null==e?void 0:e.name)||"").toLowerCase().replace(/\s+/g,"");return n===t||n.includes(t)});1===n.length?i=n[0]:n.length>1&&(i=(this.currentApp?n.find(t=>t.index==this.currentApp.index):null)||null)}if(!i&&this.currentApp&&this.currentApp.index>=0&&(i=this.connectList.find(t=>(null==t?void 0:t.index)==this.currentApp.index)),!i){const t=this.connectList.filter(t=>null==t?void 0:t.appId);1===t.length&&(i=t[0])}return i}resolveFieldDef(t,e){if(!t||!e)return null;const n=[...t.triggerEditOptions||[],...t.additionalTriggerEditOptions||[]];if(this.currentApp&&this.currentApp.index==t.index){for(const t of this.currentApp.triggerEditOptions||[])n.some(e=>e.name===t.name)||n.push(t);for(const t of this.currentApp.additionalTriggerEditOptions||[])n.some(e=>e.name===t.name)||n.push(t)}const i=this.appEditOptionsRef;if((null==i?void 0:i.currentApp)&&i.currentApp.index==t.index){for(const t of i.currentApp.triggerEditOptions||[])n.some(e=>e.name===t.name)||n.push(t);for(const t of i.currentApp.additionalTriggerEditOptions||[])n.some(e=>e.name===t.name)||n.push(t)}const o=e.toLowerCase().replace(/\s+/g,""),r=t=>String(t||"").toLowerCase().replace(/\s+/g,"");let s=n.filter(t=>r(t.name)===o);return s.length>0?this.pickFieldVariant(s,t):(s=n.filter(t=>r(t.label)===o),s.length>0?this.pickFieldVariant(s,t):(s=n.filter(t=>r(t.name).includes(o)||r(t.label).includes(o)),s.length>0?this.pickFieldVariant(s,t):(s=n.filter(t=>{const e=r(t.name),n=r(t.label);return e.length>4&&o.includes(e)||n.length>4&&o.includes(n)}),s.length>0?this.pickFieldVariant(s,t):null)))}pickFieldVariant(t,e){if(1===t.length)return t[0];const n=e&&e.editOptions||{},i=(t,e)=>null==t||("string"==typeof t?0===t.trim().length:"number"!=typeof t&&"boolean"!=typeof t&&(Array.isArray(t)?0===t.length||t.every(t=>i(t,e)):"object"==typeof t&&!(null!=t[e]&&String(t[e]).length>0||null!=t.value&&String(t.value).length>0||null!=t.key&&String(t.key).length>0)));return t.find(t=>(!0===t.required||"true"===t.required)&&i(n[t.name],t.name))||t[0]}parseMappingSource(t,e){var n,i;const o=[],r=/\{\{\s*([^}]+?)\s*\}\}/g;let s,a=0;for(;null!==(s=r.exec(t));){s.index>a&&o.push({kind:"literal",text:t.slice(a,s.index)});const c=s[1],l=c.indexOf("."),d=-1===l?"trigger":c.slice(0,l).trim(),u=-1===l?c.trim():c.slice(l+1).trim(),p=this.resolveNodeRef(d,e);if(p){const t=(null===(i=null===(n=null==p?void 0:p.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)||[],e=t.find(t=>(t.key||"").toLowerCase()===u.toLowerCase())||t.find(t=>(t.key||"").toLowerCase().includes(u.toLowerCase()))||t.find(t=>(t.text||t.label||"").toLowerCase()===u.toLowerCase());o.push(e?{kind:"reference",nodeIndex:p.index,fieldKey:e.key,sampleValue:e.value}:0===t.length?{kind:"reference",nodeIndex:p.index,fieldKey:u,sampleValue:""}:{kind:"reference",nodeIndex:p.index,fieldKey:u,error:`No field "${u}" in ${p.name} sample data`})}else o.push({kind:"reference",nodeIndex:-1,fieldKey:u,error:`Could not resolve "${d}"`});a=r.lastIndex}return a<t.length&&o.push({kind:"literal",text:t.slice(a)}),o}resolveNodeRef(t,e){if(!this.connectList)return null;const n=String(t).toLowerCase().trim();if("trigger"===n)return this.connectList.find(t=>0===(null==t?void 0:t.index));const i=/^step\s*(\d+)$/.exec(n);if(i){const t=parseInt(i[1],10)-1;return this.connectList.find(n=>(null==n?void 0:n.index)==t&&(null==n?void 0:n.index)<e)}const o=this.connectList.filter(t=>(null==t?void 0:t.appId)&&t.index<e),r=n.replace(/\s+/g,"");return o.find(t=>{const e=((null==t?void 0:t.name)||"").toLowerCase().replace(/\s+/g,"");return e===r||e.includes(r)})||null}buildEditOptionsEntry(t){if(!t||0===t.length)return[];if(!t.some(t=>"reference"===t.kind))return[{type:"text",key:"",value:t.map(t=>t.text||"").join("")}];const e=t=>null!=t.sampleValue&&"object"!=typeof t.sampleValue?t.sampleValue:t.fieldKey||"";if(1===t.length&&"reference"===t[0].kind){const n=t[0];return[{type:"label",key:n.fieldKey,value:e(n),nodeIndex:n.nodeIndex}]}return[{type:"text",value:t.map(t=>
1"literal"===t.kind?{type:"text",key:"",value:t.text}:{type:"label",key:t.fieldKey,value:e(t),nodeIndex:t.nodeIndex}),display_value:"Use a Custom value (Advanced)",key:"",custom:!0}]}describeEditOptionsEntry(t){var e;if(!t||!Array.isArray(t)||0===t.length)return"_(empty)_";const n=t[0];return(null==n?void 0:n.custom)&&Array.isArray(n.value)?n.value.map(t=>{var e;return"label"===(null==t?void 0:t.type)?`{${t.key}}`:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:"")}).join(""):"label"===(null==n?void 0:n.type)?`{${n.key}} (from upstream)`:"text"===(null==n?void 0:n.type)?`${String(null!==(e=n.value)&&void 0!==e?e:"")}`:JSON.stringify(n)}ensureFocusedOnTarget(t){this.currentApp&&this.currentApp.index==t.index&&"options"===this.currentApp.currentAction&&this.isSetUpOption||(this.isSetUpOption=!1,setTimeout(()=>{this.goToConnectApp(t.index),this.currentApp&&this.currentApp.appId&&(this.currentApp.currentAction="options"),this.isSetUpOption=!0},0))}onCopilotSetFieldMapping(t){if(!t)return;const{fieldName:e,source:n,nodeIndex:i,targetAppName:o,onResult:r,_retryCount:s}=t,a=this.resolveActionNodeForMapping(i,o);if(!a){const e=s||0;return e<4?void setTimeout(()=>{this.onCopilotSetFieldMapping(Object.assign(Object.assign({},t),{_retryCount:e+1}))},2500*(e+1)):void(r&&r("I couldn't find a step to update. Please open the step you want to change."))}this.ensureFocusedOnTarget(a);const c=this.resolveFieldDef(a,e);if(!c){const n=s||0;return n<10?void setTimeout(()=>{this.onCopilotSetFieldMapping(Object.assign(Object.assign({},t),{_retryCount:n+1}))},5e3):void(r&&r(`I couldn't find a field called **${e}** on ${a.name}${a.actionNameTitle?" \u2014 "+a.actionNameTitle:""}. Say "what's mapped" to see its fields.`))}if("select"===c.type||"nestedSelect"===c.type)return void this.handleDropdownSet(a,c,n||"",r);if(0===a.index&&/\{\{/.test(n||""))return void(r&&r("The trigger has no upstream variables to map from. Provide a literal value, or pick from the dropdown options."));const l=this.parseMappingSource(n||"",a.index),d=l.filter(t=>t.error).map(t=>t.error);if(d.length>0)return void(r&&r(`Couldn't resolve some references:\n${d.map(t=>"\u2022 "+t).join("\n")}\n\nSay "what variables are available" to see upstream fields.`));const u=this.buildEditOptionsEntry(l);this.applyFieldMutation(a,c.name,u,c,r,"set")}onCopilotSetFilterCondition(t){if(!t)return;const{nodeIndex:e,fieldHint:n,operator:i,opDisplay:o,value:r,needsValue:s,onResult:a,_retryCount:c}=t,l=(this.connectList||[]).find(t=>t&&t.index==e),d=!!l&&(["k2P4o45df5f473111E0g","k2P4o45df5f473111E0f"].includes(l.appId)||/filter/i.test(String((null==l?void 0:l.name)||(null==l?void 0:l.appName)||"")));if(!l||!d){const e=c||0;return e<4?void setTimeout(()=>this.onCopilotSetFilterCondition(Object.assign(Object.assign({},t),{_retryCount:e+1})),2e3*(e+1)):void(a&&a("I could not find the Filter step to update."))}this.ensureFocusedOnTarget(l),this.waitForAppEditOptionsRef(0,t=>{var e,c;try{if(!t)return void(a&&a("the Filter panel did not open in time"));const d=t.newConnectList||[],u=t=>String(t||"").toLowerCase().replace(/[^a-z0-9]/g,""),p=u(n);let h=null;for(let t=0;t<d.length;t++){const n=d[t],i=(null===(c=null===(e=null==n?void 0:n.sample_data)||void 0===e?void 0:e[0])||void 0===c?void 0:c.data)||[],o=i.find(t=>t&&(u(t.text)===p||u(t.key)===p))||i.find(t=>t&&p&&(u(t.text).includes(p)||u(t.key).includes(p)));if(o){h={item:o,nodeIndex:t,realIndex:n.index};break}}if(!h)return void(a&&a(`I couldn't find an upstream field matching "${n}"`));const g={type:"label",key:h.item.key,value:h.item.value||h.item.key,nodeIndex:h.nodeIndex,realIndex:h.realIndex},f={type:"text",key:"",value:i,display_value:o},m=s?[{type:"text",key:"",value:String(null==r?"":r)}]:null;t.ANDORFilter=[[{keyData:[g],filterType:[f],searchData:m}]];try{"function"==typeof t.isReadyForContinue&&t.isReadyForContinue()}catch(l){}if("function"!=typeof t.persistEditOptionsFromChat)return void(a&&a("the Filter panel could not save the condition"));t.persistEditOptionsFromChat(),a&&a("__filter_applied__")}catch(d){console.warn("[Copilot setFilterCondition]",d),a&&a("an error occurred while applying the filter")}})}fetchFieldOptions(t,e,n){Array.isArray(e.options)&&e.options.length>0?n(e.options.filter(t=>!String(t.disp_val||"").includes("---Select---"))):this.waitForAppEditOptionsRef(0,t=>{var i,o;try{if(!t)return void n([],"The field editor panel is not ready yet \u2014 please try again in a moment.");const r=e.function;if(!r)return void n([],"This dropdown has no options configured.");const s=(null===(i=t.currentApp)||void 0===i?void 0:i.credentialUrlName)?t.currentApp.credentialUrlName:String((null===(o=t.currentApp)||void 0===o?void 0:o.name)||"").split(" ").join("").toLowerCase();t.editOptionsService.optionsSelectData(s,r,t.currentApp.appId,t.currentApp.auth,t.currentApp.nodeId,t.currentApp.triggerId,t.triggerDropDownData).subscribe({next:t=>{const e=Array.isArray(t)?t:[];n(e.filter(t=>!String(t.disp_val||"").includes("---Select---")))},error:t=>{console.warn("[Copilot dropdown fetch]",t),n([],"Could not load options for this dropdown.")}})}catch(r){console.warn("[Copilot dropdown fetch] error",r),n([],"Could not load options for this dropdown.")}})}matchDropdownOption(t,e){const n=String(t||"").trim().toLowerCase();if(!n)return{exact:null,candidates:e};const i=e.find(t=>{const e=String(t.disp_val||"").toLowerCase(),i=String(t.value||"").toLowerCase();return e===n||i===n});return i?{exact:i,candidates:[i]}:{exact:null,candidates:e.filter(t=>{const e=String(t.disp_val||"").toLowerCase(),i=String(t.value||"").toLowerCase();return e.includes(n)||i.includes(n)})}}buildSelectEntry(t,e){var n;const i=[{}];return i[0][t.name]=e.value,i[0][t.name+"__disp"]=null!==(n=e.disp_val)&&void 0!==n?n:e.value,i}handleDropdownSet(t,e,n,i){this.fetchFieldOptions(t,e,(o,r)=>{if(r)return void(i&&i(r));if(0===o.length)return void(i&&i(`No options currently available for **${e.label||e.name}**. This dropdown may depend on a parent field being set first.`));const{exact:s,candidates:a}=this.matchDropdownOption(n,o);let c=null;if(s?c=s:1===a.length&&(c=a[0]),c)return void this.invokeSelectValueOnEditOptions(t,e,c,o,i);const l=(a.length>0?a:o).slice(0,25).map(t=>{var e;return`\u2022 **${null!==(e=t.disp_val)&&void 0!==e?e:t.value}**`}).join("\n");i&&i(`${a.length>1?`"${n}" matches multiple options for **${e.label||e.name}**. Which one did you mean?`:`I couldn't match "${n}" to any option for **${e.label||e.name}**. Available options:`}\n\n${l}${o.length>25?`\n\n\u2026and ${o.length-25} more`:""}\n\nReply with the exact name (e.g. "set ${e.label||e.name} to <option name>").`)})}invokeSelectValueOnEditOptions(t,e,n,i,o){this.waitForAppEditOptionsRef(0,t=>{var r,s,a;try{const l=(null===(r=t.currentApp)||void 0===r?void 0:r.triggerEditOptions)||[],d=(null===(s=t.currentApp)||void 0===s?void 0:s.additionalTriggerEditOptions)||[];let u=l.findIndex(t=>(null==t?void 0:t.name)===e.name);if(-1===u){const t=d.findIndex(t=>(null==t?void 0:t.name)===e.name);-1!==t&&(u=l.length+t)}if(-1===u)return void(o&&o(`Couldn't locate the **${e.label||e.name}** field in the panel. Please open the action step and try again.`));let p=(Array.isArray(e.options)?e.options:i).findIndex(t=>void 0!==t.value&&t.value===n.value||void 0!==t.disp_val&&t.disp_val===n.disp_val);if(p<0&&(p=0),"function"!=typeof t.selectValue)return void(o&&o("Could not access the dropdown selector. Please pick the value manually in the panel."));t.selectValue(u,n,p),"function"==typeof t.persistEditOptionsFromChat&&t.persistEditOptionsFromChat();try{t.cdr&&"function"==typeof t.cdr.detectChanges?t.cdr.detectChanges():this.cdr&&"function"==typeof this.cdr.detectChanges&&this.cdr.detectChanges()}catch(c){}const h=e.label||e.displayName||e.name,g=null!==(a=n.disp_val)&&void 0!==a?a:n.value;o&&o(`\u2705 **${h}** \u2192 **${g}**`)}catch(l){console.error("[Copilot invokeSelectValue]",l),o&&o("Could not update the dropdown. Please pick the value manually in the panel.")}},o)}onCopilotListFieldOptions(t){if(!t)return;const{fieldName:e,nodeIndex:n,targetAppName:i,onResult:o,onOptions:r,_retryCount:s}=t,a=this.resolveActionNodeForMapping(n,i);if(!a){const e=s||0;return e<4?void setTimeout(()=>{this.onCopilotListFieldOptions(Object.assign(Object.assign({},t),{_retryCount:e+1}))},2500*(e+1)):r?void r(null,[]):void(o&&o("I couldn't find a step to inspect."))}const c=this.resolveFieldDef(a,e);return c?"select"!==c.type&&"nestedSelect"!==c.type?r?void r(c,[]):void(o&&o(`**${c.label||c.name}** is a ${c.type||"text"} field, not a dropdown \u2014 you can set it to any value. Example: "set ${c.label||c.name} to <value>".`)):(this.ensureFocusedOnTarget(a),void this.fetchFieldOptions(a,c,(t,e)=>{if(r)return void r(c,e?[]:t||[]);if(e)return void(o&&o(e));if(0===t.length)return void(o&&o(`No options available for **${c.label||c.name}** \u2014 it may depend on a parent field being set first.`));const n=t.slice(0,50).map(t=>{var e;return`\u2022 **${null!==(e=t.disp_val)&&void 0!==e?e:t.value}**`}).join("\n");o&&o(`Options for **${c.label||c.name}** (${t.length}):\n\n${n}${t.length>50?`\n\n\u2026and ${t.length-50} more`:""}\n\nTo pick one, say "set ${c.label||c.name} to <name>".`)})):r?void r(null,[]):void(o&&o(`I couldn't find a field called **${e}** on this step.`))}onCopilotClearFieldMapping(t){if(!t)return;const{fieldName:e,nodeIndex:n,targetAppName:i,onResult:o,_retryCount:r}=t,s=this.resolveActionNodeForMapping(n,i);if(!s){const e=r||0;return e<4?void setTimeout(()=>{this.onCopilotClearFieldMapping(Object.assign(Object.assign({},t),{_retryCount:e+1}))},2500*(e+1)):void(o&&o("I couldn't find a step to update."))}const a=this.resolveFieldDef(s,e);a?(this.ensureFocusedOnTarget(s),this.applyFieldMutation(s,a.name,[],a,o,"clear")):o&&o(`I couldn't find a field called **${e}** on this step.`)}onCopilotShowCurrentMapping(t){if(!t)return;const{nodeIndex:e,targetAppName:n,onResult:i}=t,o=this.resolveActionNodeForMapping(e,n);if(!o)return void(i&&i("I couldn't find a step to inspect."));const r=this.currentApp&&this.currentApp.index==o.index&&"options"===this.currentApp.currentAction&&this.appEditOptionsRef?this.appEditOptionsRef.editOptions:o.editOptions||{},s=[...o.triggerEditOptions||[],...o.additionalTriggerEditOptions||[]];if(0===s.length)return void(i&&i(`${o.name} has no configurable fields.`));const a=s.map(t=>
1{const e=t.label||t.displayName||t.name,n=null==r?void 0:r[t.name];return`\u2022 **${e}**${!0===t.required||"true"===t.required?" (required)":""}: ${this.describeEditOptionsEntry(n)}${"select"!==t.type&&"nestedSelect"!==t.type||n&&0!==n.length?"":' _(dropdown \u2014 say "show '+e+' options" to list values)_'}`});i&&i(`Current mapping for **${o.name}${o.actionNameTitle?" \u2014 "+o.actionNameTitle:""}**:\n\n${a.join("\n")}`)}applyFieldMutation(t,e,n,i,o,r){this.waitForAppEditOptionsRef(0,t=>{var s,a,c;try{if(t.editOptions||(t.editOptions={}),t.triggerDropDownData||(t.triggerDropDownData={}),"clear"===r||0===n.length)delete t.editOptions[e],delete t.triggerDropDownData[e];else{t.editOptions[e]=n;const i=n[0]||{};if(void 0!==i[e+"__disp"]||void 0!==i[e])t.triggerDropDownData[e]=null!==(s=i[e])&&void 0!==s?s:"";else if(i.custom&&Array.isArray(i.value)){const n=i.value.map(t=>{var e;return String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:"")}).join("");t.triggerDropDownData[e]=n}else"label"===i.type?t.triggerDropDownData[e]=String(null!==(a=i.value)&&void 0!==a?a:""):"text"===i.type&&(t.triggerDropDownData[e]=String(null!==(c=i.value)&&void 0!==c?c:""))}"function"==typeof t.isReadyForContinue&&t.isReadyForContinue(),"function"==typeof t.persistEditOptionsFromChat&&t.persistEditOptionsFromChat();try{t.cdr&&"function"==typeof t.cdr.detectChanges?t.cdr.detectChanges():this.cdr&&"function"==typeof this.cdr.detectChanges&&this.cdr.detectChanges()}catch(l){}const d=i.label||i.displayName||i.name;if(o)if("clear"===r)o(`\ud83d\uddd1\ufe0f **${d}** cleared.`);else{const t=this.describeEditOptionsEntry(n);o(`\u2705 **${d}** \u2192 **${t}**`)}}catch(d){console.error("[Copilot applyFieldMutation]",d),o&&o("Could not update the field. Please try again or edit it manually in the panel.")}},o)}waitForAppEditOptionsRef(t,e,n){setTimeout(()=>{const i=this.appEditOptionsRef;if(i)e(i);else if(t<15)this.waitForAppEditOptionsRef(t+1,e,n);else{n&&n("Could not open the field editor panel. Please click the action step in the canvas and try again.");try{e(null)}catch(o){}}},200)}onCopilotMapFields(t){var e;if(!t)return;const{nodeIndex:n,targetAppName:i,workflowIntent:o,onResult:r,onNeedsTest:s,onMapped:a}=t;if(!this.connectList||0===this.connectList.length)return void(r&&r("Run AI Mapping from inside the custom editor with a workflow open."));let c=null;if(null!=n&&(c=this.connectList.find(t=>(null==t?void 0:t.index)==n)),!c&&i){const t=String(i).toLowerCase().replace(/\s+/g,""),e=this.connectList.filter(e=>{if(!(null==e?void 0:e.appId)||0===e.index)return!1;const n=((null==e?void 0:e.name)||"").toLowerCase().replace(/\s+/g,"");return n===t||n.includes(t)});if(1===e.length)c=e[0];else if(e.length>1&&(c=(this.currentApp?e.find(t=>t.index==this.currentApp.index):null)||null,!c)){const t=e.map(t=>`\u2022 ${t.name}${t.actionNameTitle?" \u2014 "+t.actionNameTitle:""}`).join("\n");return void(r&&r(`There are multiple **${i}** action steps. Which one should I map?\n\n${t}`))}}if(!c&&this.currentApp&&this.currentApp.index>=1&&(c=this.connectList.find(t=>(null==t?void 0:t.index)==this.currentApp.index)),!c){const t=this.connectList.filter(t=>(null==t?void 0:t.index)>=1&&(null==t?void 0:t.appId));1===t.length&&(c=t[0])}if(!c)return void(r&&r("I couldn't find an action step to map. AI Mapping only works on action steps (not the trigger). Please open the action step you want to map."));if(0===c.index)return void(r&&r("AI Mapping is for action steps only \u2014 the trigger fetches data, it doesn't need mapping."));if(!c.appId)return void(r&&r("This action step has no app configured yet. Please set up an app on it first."));const l=this.connectList.filter(t=>(null==t?void 0:t.index)<c.index&&(null==t?void 0:t.appId)),d=l.filter(t=>{var e;return Array.isArray(null==t?void 0:t.sample_data)&&t.sample_data.length>0&&Array.isArray(null===(e=t.sample_data[0])||void 0===e?void 0:e.data)&&t.sample_data[0].data.length>0});if(0!==l.length){if(0===d.length){const t=l[0];return s?void s({targetIndex:c.index,triggerIndex:null!==(e=null==t?void 0:t.index)&&void 0!==e?e:0}):void(r&&r("Upstream steps have no sample data yet. Please run the trigger test first so AI Mapping has data to work with."))}this.currentApp&&this.currentApp.index==c.index&&"options"===this.currentApp.currentAction||(this.isSetUpOption=!1,this.goToConnectApp(c.index),this.currentApp&&this.currentApp.appId&&(this.currentApp.currentAction="options")),r&&r(`Running AI Mapping for **${c.name}${c.actionNameTitle?" \u2014 "+c.actionNameTitle:""}**...`),this.triggerAIMappingOnEditOptions(0,r,a,o,c.index)}else r&&r("There are no upstream steps above this one. Add/configure a trigger first.")}triggerAIMappingOnEditOptions(t,e,n,i,o,r=-1){setTimeout(()=>{var s,a,c,l,d,u;const p=this.appEditOptionsRef,h=((null===(a=null===(s=null==p?void 0:p.currentApp)||void 0===s?void 0:s.triggerEditOptions)||void 0===a?void 0:a.length)||0)+((null===(l=null===(c=null==p?void 0:p.currentApp)||void 0===c?void 0:c.additionalTriggerEditOptions)||void 0===l?void 0:l.length)||0);if(p&&"function"==typeof p.getAIMapping&&(void 0===o||(null===(d=p.currentApp)||void 0===d?void 0:d.index)==o)&&Array.isArray(null===(u=p.currentApp)||void 0===u?void 0:u.triggerEditOptions)&&h>0&&h===r)try{const t=p.getAIMapping(i),o=()=>{e&&e('AI Mapping applied and saved! Review the filled fields \u2014 say "run test" when ready, or ask me to change any specific field.')};return void(t&&"function"==typeof t.then?t.then(()=>
1this.waitForAIMappingCompletion(p,0,o,e,n)).catch(t=>{console.error("[Copilot mapFields] getAIMapping() rejected",t),e&&e('AI Mapping ran into an error. Please try clicking the "AI Mapping" button in the right panel.')}):this.waitForAIMappingCompletion(p,0,o,e,n))}catch(g){return console.error("[Copilot mapFields] getAIMapping() failed",g),void(e&&e('AI Mapping ran into an error. Please try clicking the "AI Mapping" button in the right panel.'))}t<45?this.triggerAIMappingOnEditOptions(t+1,e,n,i,o,h):(e&&e("Could not open the mapping panel. Please click on the action step in the canvas and try again."),n&&n({mappedCount:0,missingLabels:[],missingFields:[],totalRequired:0,panelNotReady:!0}))},400)}summarizeAIMappingResult(t){var e,n;const i=(null==t?void 0:t.editOptions)||{},o=[...(null===(e=null==t?void 0:t.currentApp)||void 0===e?void 0:e.triggerEditOptions)||[],...(null===(n=null==t?void 0:t.currentApp)||void 0===n?void 0:n.additionalTriggerEditOptions)||[]].filter(t=>t&&(!0===t.required||"true"===t.required)),r=t=>!(!Array.isArray(t)||0===t.length)&&t.some(t=>!!t&&(!("label"!==t.type||!t.key)||null!=t.value&&("string"==typeof t.value?t.value.trim().length>0:Array.isArray(t.value)?t.value.length>0:"object"!=typeof t.value||Object.keys(t.value).length>0)));let s=0;const a=[],c=[];for(const l of o)if(r(i[l.name]))s++;else{const t=l.label||l.displayName||l.name;t&&a.push(t),c.push({name:l.name,label:t||l.name,type:l.type})}return{mappedCount:s,missingLabels:a,missingFields:c,totalRequired:o.length}}waitForAIMappingCompletion(t,e,n,i,o){setTimeout(()=>{var r;if(!1===t.testloader){const{mappedCount:e,missingLabels:n,missingFields:a,totalRequired:c}=this.summarizeAIMappingResult(t);try{"function"==typeof t.isReadyForContinue&&t.isReadyForContinue(),e>0&&"function"==typeof t.persistEditOptionsFromChat&&t.persistEditOptionsFromChat()}catch(s){console.warn("[Copilot AI Mapping] Persist failed",s)}return o?void o({mappedCount:e,totalRequired:c,missingLabels:n,missingFields:a,targetIndex:null===(r=null==t?void 0:t.currentApp)||void 0===r?void 0:r.index}):void(i&&i(0===c?"This step has no required fields \u2014 nothing to map.":0===e?`AI Mapping couldn't find matches for this step's required fields. The upstream trigger/action data doesn't semantically fit ${n.join(", ")}. You'll need to fill these manually, or say "what variables are available" to see what's in the upstream nodes.`:0===n.length?`AI Mapping applied and saved! All ${e} required field(s) are mapped. Say "run test" when ready.`:`AI Mapping applied and saved \u2014 mapped ${e} of ${c} required fields. These still need values:\n\n${n.map(t=>"\u2022 "+t).join("\n")}\n\nYou can fill them manually in the panel, or say "what variables are available" to see upstream data.`))}e<40?this.waitForAIMappingCompletion(t,e+1,n,i,o):i&&i("AI Mapping is still running \u2014 please wait a moment, then check the panel.")},300)}onCopilotRunTest(t){var e,n,i,o,r,s,a,c;if(!t)return;const{nodeIndex:l,appName:d,nodeType:u,onMissingFields:p,onNodeNotFound:h,onTestStarted:g,onTestComplete:f}=t,m=()=>(t.__runTestWaits=(t.__runTestWaits||0)+1,t.__runTestWaits<=30&&(setTimeout(()=>this.onCopilotRunTest(t),500),!0));if(!this.connectList||0===this.connectList.length){if(m())return;return void(h&&h("Run Test is only available inside the custom editor with a workflow open. Please open a connect first."))}if("trigger"===u||0===l||"0"===l){const t=(this.connectList||[]).find(t=>t&&(0===t.index||"0"===t.index));if(!t){if(m())return;return void(h&&h('The workflow is still loading. Give it a moment and say "run test" again.'))}if(!t.appId)return void(h&&h('You need to set up an app on the trigger node before running a test. Which app would you like to use as the trigger? (e.g. "add Gmail as trigger")'))}let v=null;if(null!=l&&(v=null===(e=this.connectList)||void 0===e?void 0:e.find(t=>(null==t?void 0:t.index)==l)),!v&&d){const t=String(d).toLowerCase().replace(/\s+/g,"");let e=(this.connectList||[]).filter(e=>{const n=((null==e?void 0:e.name)||"").toLowerCase().replace(/\s+/g,"");
1return(null==e?void 0:e.appId)&&(n===t||n.includes(t))});if(e.length>1&&"trigger"===u){const t=e.filter(t=>0===(null==t?void 0:t.index));t.length&&(e=t)}if(e.length>1&&"action"===u){const t=e.filter(t=>(null==t?void 0:t.index)>=1);t.length&&(e=t)}if(1===e.length)v=e[0];else if(e.length>1){const t=this.currentApp?e.find(t=>t.index==this.currentApp.index):null;if(!t){const t=e.map(t=>`\u2022 ${0===t.index?"Trigger":"Action"}: ${t.name}${t.actionNameTitle?` \u2014 ${t.actionNameTitle}`:""}`).join("\n");return void(h&&h(`There are multiple **${d}** steps in this workflow:\n\n${t}\n\nWhich one should I run? You can say e.g. "run ${d} trigger", "run ${d} action", or name the event (e.g. "run ${d} send email").`))}v=t}}if(!v&&"trigger"===u&&(v=null===(n=this.connectList)||void 0===n?void 0:n.find(t=>0===(null==t?void 0:t.index))),!v&&"action"===u){const t=(this.connectList||[]).filter(t=>(null==t?void 0:t.index)>=1&&(null==t?void 0:t.appId));if(1===t.length)v=t[0];else if(t.length>1&&(v=(this.currentApp?t.find(t=>t.index==this.currentApp.index):null)||null,!v)){const e=t.map(t=>`\u2022 ${t.name}${t.actionNameTitle?" \u2014 "+t.actionNameTitle:""}`).join("\n");return void(h&&h(`There are multiple action steps:\n\n${e}\n\nWhich one should I run? You can name the app (e.g. "run slack action") or the event (e.g. "run send email").`))}}if(v||(v=this.currentApp?null===(i=this.connectList)||void 0===i?void 0:i.find(t=>(null==t?void 0:t.index)==this.currentApp.index):null),!v)return void(h&&h("I could not find a matching node to run the test for. Please open the node you want to test and try again."));if(!v.appId)return void(h&&h("The selected node has no app configured yet. Please set up an app on it first."));const b=v.name?`${v.name}${v.actionNameTitle?" \u2014 "+v.actionNameTitle:""} (Node ${v.index+1})`:`Node ${v.index+1}`,x=this.currentApp&&this.currentApp.index==v.index&&"options"===this.currentApp.currentAction;x||(this.isSetUpOption=!1,this.goToConnectApp(v.index),this.currentApp&&this.currentApp.appId&&("complete"===this.currentApp.nodeStatus||this.currentApp.auth&&this.currentApp.auth.authId||"account_selected"===this.currentApp.nodeStatus?this.currentApp.currentAction="options":this.currentApp.name&&(this.currentApp.currentAction="account")),setTimeout(()=>{var t;"options"===(null===(t=this.currentApp)||void 0===t?void 0:t.currentAction)&&(this.isSetUpOption=!0)},600));const _=x&&this.appEditOptionsRef?this.appEditOptionsRef:null,C=_?Object.assign(Object.assign({},v),{editOptions:_.editOptions||v.editOptions,triggerEditOptions:(null===(o=_.currentApp)||void 0===o?void 0:o.triggerEditOptions)||v.triggerEditOptions,additionalTriggerEditOptions:(null===(r=_.currentApp)||void 0===r?void 0:r.additionalTriggerEditOptions)||v.additionalTriggerEditOptions}):v,w=this.findMissingRequiredFieldsForRunTest(C);w.length>0?p&&p(b,w):(f&&(this.pendingTestCompleteCallback=f,this.pendingTestNodeLabel=b,this.isActionFailed=!1,this.actionFailedData=null,(null===(c=null===(a=null===(s=this.connectList)||void 0===s?void 0:s[0])||void 0===a?void 0:a.triggerData)||void 0===c?void 0:c.triggerTestFail)&&(this.connectList[0].triggerData.triggerTestFail=!1),this.watchForTestFailure(0)),g&&g(b),this.triggerRunTestOnEditOptions(v,0))}watchForTestFailure(t){var e,n;if(!this.pendingTestCompleteCallback)return;const i=null===(n=null===(e=this.connectList)||void 0===e?void 0:e[0])||void 0===n?void 0:n.triggerData,o=this.isActionFailed?this.actionFailedData||"The step's test failed.":(null==i?void 0:i.triggerTestFail)?i.triggerTestFailMessage||"The trigger test failed.":null;if(o){const t=this.pendingTestCompleteCallback,e=this.pendingTestNodeLabel;return this.pendingTestCompleteCallback=null,this.pendingTestNodeLabel="",console.info("[Copilot runTest] test FAILED:",o),void t(!1,e,String(o).slice(0,400))}t<120&&setTimeout(()=>this.watchForTestFailure(t+1),1e3)}triggerRunTestOnEditOptions(t,e){setTimeout(()=>{var n;const i=this.appEditOptionsRef;if(i&&"function"==typeof i.continue){try{"function"==typeof i.isReadyForContinue&&i.isReadyForContinue()}catch(r){}if(i.readyForContinue||i.readyForSkip){const e=0===(null==t?void 0:t.index);try{return i.continue(!e&&(null==t?void 0:t.index)==(null===(n=this.connectList)||void 0===n?void 0:n.length)-1),void this.autoClickSetupOptionsContinue(0,t)}catch(s){console.error("[Copilot runTest] continue() failed",s)}}}const o=document.querySelector('app-app-edit-options button[data-track="continue"]:not([disabled])');if(o)return o.click(),void this.autoClickSetupOptionsContinue(0,t);if(e<12)this.triggerRunTestOnEditOptions(t,e+1);else if(console.warn("[Copilot runTest] gave up after",12,"attempts \u2014 readyForContinue never became true for node",null==t?void 0:t.index),this.pendingTestCompleteCallback){const e=this.pendingTestCompleteCallback,n=this.pendingTestNodeLabel;this.pendingTestCompleteCallback=null,this.pendingTestNodeLabel="",e(!1,n||`step ${Number(null==t?void 0:t.index)+1}`)}},300)}autoClickSetupOptionsContinue(t,e){setTimeout(()=>{const n=document.querySelector('setup-options button[data-track="continue"]:not([disabled])');if(n){if(null!=e&&this.currentApp&&this.currentApp.index!=e.index)return;n.click()}else t<40&&this.autoClickSetupOptionsContinue(t+1,e)},500)}findMissingRequiredFieldsForRunTest(t){const e=[],n=(null==t?void 0:t.editOptions)||{},i=(t,e)=>null!=t&&("string"==typeof t?t.trim().length>0:"number"==typeof t||"boolean"==typeof t||(Array.isArray(t)?t.some(t=>i(t,e)):"object"!=typeof t||!!(e&&null!=t[e]&&String(t[e]).length>0||null!=t.value&&String(t.value).length>0||null!=t.key&&String(t.key).length>0)||Object.keys(t).some(e=>{if("type"===e||"custom"===e||"display_value"===e||e.endsWith("__disp"))return!1;const n=t[e];return null!=n&&String(n).length>0}))),o=t=>
1{if(Array.isArray(t))for(const o of t)if(o&&("true"===o.required||!0===o.required)&&!i(n[o.name],o.name)){const t=o.label||o.displayName||o.name;t&&!e.includes(t)&&e.push(t)}};if(o(null==t?void 0:t.triggerEditOptions),o(null==t?void 0:t.additionalTriggerEditOptions),/formatter|filter/i.test(String((null==t?void 0:t.name)||(null==t?void 0:t.appName)||""))){const o=[...(null==t?void 0:t.triggerEditOptions)||[],...(null==t?void 0:t.additionalTriggerEditOptions)||[]];for(const t of o){const o=(null==t?void 0:t.label)||(null==t?void 0:t.displayName)||(null==t?void 0:t.name)||"";/^input$/i.test(String(o))&&!i(n[t.name],t.name)&&(e.includes(o)||e.push(o))}}return e}onCopilotNavigateToNode(t){void 0!==(null==t?void 0:t.nodeIndex)&&(this.goToConnectApp(t.nodeIndex),this.currentApp&&this.currentApp.appId&&("complete"===this.currentApp.nodeStatus||this.currentApp.auth&&this.currentApp.auth.authId||"account_selected"===this.currentApp.nodeStatus?this.currentApp.currentAction="options":this.currentApp.name&&(this.currentApp.currentAction="account")))}nsLeaveEditor(t){if(!t||!t.startsWith("/customeditor/"))return void this.navigateToConnects(t);const e=this.router.routeReuseStrategy.shouldReuseRoute,n=()=>{this.router.routeReuseStrategy.shouldReuseRoute=e,i.unsubscribe()},i=this.router.events.subscribe(e=>{(e instanceof ui.OD&&e.url.split("?")[0]!==t||e instanceof ui.m2||e instanceof ui.gk||e instanceof ui.Q3)&&n()});this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.navigateToConnects(t)}navigateToConnects(t="/connects"){"/connects"===t&&("draft"===localStorage.getItem("activeTab")&&localStorage.setItem("activeTab","draft"),!this.connectList[0].AppData&&""===this.connectList[0].appId&&localStorage.setItem("activeTab","published")),this.isUnsavedData?this.modalService.show(Hl,{initialState:{modelTitle:"Alert !",modelContent:"There are unsaved changes in your connect flow.",translation:this.translation}}).content.onClose.subscribe(e=>{e&&(this.resetToOriginalState(),this.setUnSavedChanges(!1),this.showRenamePopupAndNavigate(t))}):this.showRenamePopupAndNavigate(t)}showRenamePopupAndNavigate(t="/connects"){var e,n;const i=null===(n=null===(e=this.connectList)||void 0===e?void 0:e[0])||void 0===n?void 0:n.connectTitle;i&&i===this.connectId?this.modalService.show(Ql,{initialState:{connectTitle:""}}).content.onClose.subscribe(e=>{e?(this.connectList[0].connectTitle=e,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:e}).subscribe(()=>{this.router.navigate([t])})):this.router.navigate([t])}):this.router.navigate([t])}setUnSavedChanges(t){this.isUnsavedData=t,this.isUnsavedData?window.addEventListener("beforeunload",this.listenerFunction):window.removeEventListener("beforeunload",this.listenerFunction)}ngOnDestroy(){this.shellEvents.editorLeave=null,this.shellEvents.editorCopilotToggle=null,this.canvasSkeletonSettleTimer&&(clearInterval(this.canvasSkeletonSettleTimer),this.canvasSkeletonSettleTimer=null),window.removeEventListener("beforeunload",this.listenerFunction),document.removeEventListener("click",this.closeMenuOnClickOutsideHandler,!0),document.removeEventListener("wheel",this.flowWheelHandler,!0),document.removeEventListener("pointerdown",this.flowPointerDownHandler,!0),document.removeEventListener("pointerup",this.flowPointerUpHandler,!0),document.removeEventListener("pointercancel",this.flowPointerUpHandler,!0)}onFlowPointerDown(t){const e=document.querySelector(".center-container");(null==e?void 0:e.contains(t.target))&&0===t.button&&(this.isFlowPointerDown=!0)}onFlowWheel(t){const e=document.querySelector(".center-container");if(!e)return;if(!e.contains(t.target))return void t.stopPropagation();if(!t.ctrlKey)return t.preventDefault(),t.stopPropagation(),void this.panFlowByWheel(t.deltaX,t.deltaY);const n=e.querySelector("f-flow");((null==n?void 0:n.classList.contains("f-dragging"))||this.isFlowPointerDown)&&(t.preventDefault(),t.stopPropagation())}panFlowByWheel(t,e){if(this.fCanvas&&"function"==typeof this.fCanvas.getPosition)try{const n=this.fCanvas.getPosition(),i=Wl.initialize(n.x-t,n.y-e);this.fCanvas.setPosition(i),this.fCanvas.redraw(),"function"==typeof this.fCanvas.emitCanvasChangeEvent&&this.fCanvas.emitCanvasChangeEvent()}catch(n){}}hideAlert(){this.showallTriggerFound=!1,this.cdRef.detectChanges()}horizontal(){this.getData(new ev.graphlib.Graph,FO.LEFT_TO_RIGHT),this.configuration=DO[FO.LEFT_TO_RIGHT]}vertical(){this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.configuration=DO[FO.TOP_TO_BOTTOM]}getData(t,e){this.isAutoLayout&&this.fFlowComponent.reset(),this.setGraph(t,e),this.nodes=this.getNodes(t),this.connections=this.getConnections(t)}setGraph(t,e){this.configuration=DO[e],t.setGraph({rankdir:e,nodesep:148}
1),this.graph_data.forEach(e=>{t.setNode(e.id,{width:350,height:165}),null!=e.parentId&&t.setEdge(e.parentId,e.id,{})}),ev.layout(t)}getNodes(t){return t.nodes().map(e=>{let n=t.node(e);const i=this.graph_data.find(t=>t.id===e)||this.nodes.find(t=>t.connectorId===e);return{id:wd(),connectorId:e,position:{x:null==n?void 0:n.x,y:null==n?void 0:n.y},headerName:(null==i?void 0:i.headerName)||"",displayName:(null==i?void 0:i.displayName)||"",imageFinal:(null==i?void 0:i.imageFinal)||"",eventFinal:(null==i?void 0:i.eventFinal)||"",comments:(null==i?void 0:i.comments)||"",chatModel:(null==i?void 0:i.chatModel)||"",memory:(null==i?void 0:i.memory)||"",tool:(null==i?void 0:i.tool)||""}})}getConnections(t){return t.edges().map(t=>({id:wd(),from:t.v,to:t.w}))}onClick(t){}trackByNodeId(t,e){return e.id}getButtonPosition(t){const e=this.nodes.find(e=>e.connectorId===t);if(e&&"Flow"===e.headerName){const e=this.graph_data.filter(e=>{var n;return e.parentId===t&&(null===(n=e.headerName)||void 0===n?void 0:n.startsWith("Flow"))});let n=100,i="-34px";return 3===e.length?(n=200,i="-34px"):4===e.length?(n=300,i="-34px"):5==e.length?(n=400,i="-34px"):6==e.length?(n=500,i="-34px"):7==e.length?(n=600,i="-34px"):8==e.length?(n=700,i="-34px"):9==e.length||10==e.length?(n=800,i="-34px"):1==e.length&&(n=0,i="auto"),{top:i,left:`${n}px`,transform:"translate(-50%, -50%)",position:"absolute"}}}showMenu(t,e,n){this.activeNodeMenu=null;const i=this.nodes.find(e=>e.connectorId===t);return this.showToolbarMenu&&this.activeConnection===n?(this.showToolbarMenu=!1,this.activeConnection=null,void(this.flowToolbarMenu=!1)):this.flowToolbarMenu&&i&&"Flow"==i.headerName?(this.flowToolbarMenu=!1,this.showToolbarMenu=!1,void(this.activeConnection=null)):void(i&&i.headerName?"Flow"==i.headerName?(this.parentIndex=t,this.childIndex=e,this.showToolbarMenu=!1,this.activeConnection=null,this.AppBranching=!1,this.flowToolbarMenu=!0,this.isPanelVisible=!1):(this.parentIndex=t,this.childIndex=e,this.showToolbarMenu=!0,this.activeConnection=n,this.lastActiveConnection=null,this.AppBranching=!1,this.flowToolbarMenu=!1,this.isPanelVisible=!1):(this.parentIndex=t,this.childIndex=e,this.showToolbarMenu=!0,this.lastActiveConnection=null,this.activeConnection=n,this.AppBranching=!1,this.flowToolbarMenu=!1,this.isSetUpOption=!1,this.isPanelVisible=!1))}showSecondAction(t,e){this.parentIndex=t,this.childIndex=e,this.showToolbarMenu=!0}trackByConnectionId(t,e){return e.id}onSecondAction(t,e){if(this.showToolbarMenu&&this.lastActiveConnection===e)return this.showToolbarMenu=!1,this.lastActiveConnection=null,void(this.activeConnection=null);this.parentIndex=t.connectorId,this.childIndex=null,this.showToolbarMenu=!0,this.activeConnection=null,this.lastActiveConnection=e,this.AppBranching=!1,this.isSetUpOption=!1,this.isPanelVisible=!1,this.activeNodeMenu=null}calculateSecondaryButtonPosition(t){const e=this.getNodePosition(t.from),n=this.getNodePosition(t.to);return{position:"absolute",left:`${(e.x+n.x)/2+this.secondaryButtonOffsetX}px`,top:`${(e.y+n.y)/2+this.secondaryButtonOffsetY+100}px`}}getNodePosition(t){const e=this.nodes.find(e=>e.connectorId===t);return(null==e?void 0:e.position)||{x:0,y:0}}onLoaded(){this.hasCenteredAfterPanelLoad=!1;try{this.fCanvas.resetScaleAndCenter(!1),this.fitToScreen()}catch(i){setTimeout(()=>{this.fCanvas.resetScaleAndCenter(!1),this.fitToScreen()},10)}const t=window.innerWidth<=768,e=t?.35:.7,n=this.getCanvasViewportCenter();this.zoomLevel=t?35:70,this.fCanvas.setZoom(e,n),this.fCanvas.redraw(),"function"==typeof this.fCanvas.emitCanvasChangeEvent&&this.fCanvas.emitCanvasChangeEvent(),setTimeout(()=>this.saveResetFlowState(),100),this.cdRef.detectChanges()}getCanvasViewportCenter(){const t=document.querySelector(".center-container");return t?Wl.initialize(t.clientWidth/2,t.clientHeight/2):Wl.initialize(500,500)}fitToScreen(t={x:0,y:0},e=!0){this.fCanvasComponent.fitToScreen(this.getCanvasViewportCenter(),!1)}onZoomIn(){this.zoomLevel<200&&(this.zoomLevel+=10,this.fZoom.zoomIn())}onZoomOut(){this.zoomLevel>10&&(this.zoomLevel-=10,this.fZoom.zoomOut())}onZoomLevelChange(t){if(null!=(null==t?void 0:t.scale)){const e=Math.round(100*t.scale);this.zoomLevel=Math.max(10,Math.min(200,e))}this.updateCanResetFlowView(),this.cdRef.detectChanges()}updateCanResetFlowView(){this.fCanvas&&this.nodes.length>0&&(this.canResetFlowView=!0)}saveResetFlowState(){if(this.fCanvas)try{const t=this.zoomLevel/100,e="function"==typeof this.fCanvas.getPosition?this.fCanvas.getPosition():{x:0,y:0};this.resetFlowState={scale:t,position:{x:e.x,y:e.y}},this.canResetFlowView=!1}catch(t){this.resetFlowState=null}}createAIAgentNode(){var t;this.customPanelWidth=400,this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,this.deleteLoader=!1,this.updateUserConnectStatus(null===(t=this.connectList[0])||void 0===t?void 0:t.connectTitle,0,"Completed","Inactive"),localStorage.setItem("activeTab","draft"),this.activeAgent=!1,this.activateAgent=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const e=(Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)))+1).toString();1==this.connectList.length&&null==this.parentIndex&&null==this.childIndex&&(this.parentIndex="0"),this.createNode("addAction",{id:Number(e)-1,title:"Create AI Agent",desc:"Create an AI Agent",parentIndex:this.parentIndex,childIndex:[this.childIndex],nodesData:this.nodes,graphData:this.graph_data,aiConfig:{},appId:"k2P4o69wb5f4733aiagent",image:"aiagent2.png",nodeStatus:"options",editOptions:{},filterEditOptions:{},sample_data:{},connected_account_id:{}},"actions",0);let n={id:e,parentId:this.parentIndex,connectorId:e,position:{x:0,y:0},displayName:"AI Agent",imageFinal:"aiagent2.png",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""};this.connectList.find(t=>{var e;t.index==this.parentIndex&&(null===(e=this.connectList.find(t=>t.index==this.parentIndex))||void 0===e?void 0:e.childIndex)&&(this.connectList.find(t=>t.index==this.parentIndex).childIndex=[n.id]),t.index==this.childIndex&&(this.connectList.find(t=>
1t.index==this.childIndex).parentIndex=n.id)});const i=this.graph_data.some(t=>t.id===n.id&&t.parentId===n.parentId);if(this.cdRef.detectChanges(),i)this.childIndex=(Number(this.childIndex)+1).toFixed(2).toString(),this.updateNodesCookie(),this.createAIAgentNode();else{const t=JSON.parse(JSON.stringify(this.nodes));if(this.graph_data.push(n),null!==this.childIndex){const t=this.graph_data.findIndex(t=>t.id===this.childIndex);t>=0&&(this.graph_data[t].parentId=n.connectorId)}this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(e=>{const n=t.find(t=>t.connectorId===e.connectorId);return n?Object.assign(Object.assign({},e),{displayName:n.displayName,imageFinal:n.imageFinal,eventFinal:n.eventFinal,headerName:n.headerName,comments:n.comments}):e});const i=this.nodes.findIndex(t=>t.connectorId===e);i>=0&&(this.nodes[i]=Object.assign(Object.assign({},this.nodes[i]),{displayName:"AI Agent",imageFinal:"aiagent2.png",chatModel:"",memory:"",tool:""}));let o=JSON.stringify(this.nodes),r=JSON.stringify(this.graph_data);setTimeout(()=>{this.AppBranching=!0,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(o),graphData:JSON.parse(r),connectStatus:"Draft"}).subscribe(t=>{if(this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),"success"===t.message){this.updateDb({parentIndex:this.parentIndex,childIndex:[this.childIndex]});const t=this.connectList.findIndex(t=>t.index==e);-1!==t&&(this.connectList[t].parentIndex=this.parentIndex,this.connectList[t].childIndex=[this.childIndex],this.connectList[t].nodesData=JSON.parse(o),this.connectList[t].graphData=JSON.parse(r),this.connectList[t].displayName="AI Agent",this.connectList[t].actionNameTitle_display="Create AI Agent",this.connectList[t].actionNameTitle="Create AI Agent",this.commonService.getAppOptionsByAppId("k2P4o69wb5f4733aiagent",{type:"actions"}).subscribe(e=>{if(null==e?void 0:e.app_options){const n=e.app_options,i=Array.isArray(n)?n:n.action||[];if(Array.isArray(i)){const e=i.find(t=>"Create AI Agent"===t.trigger_action_name);e&&(this.currentApp.triggerEditOptions=e.options,this.connectList[t].triggerEditOptions=e.options,this.currentApp.actionNameTitle=e.trigger_action_name,this.currentApp.actionNameTitle_display=e.trigger_action_displayname,this.currentApp.currentAction="options",this.isSetUpOption=!0,this.setUpOptionMenu=!0,this.cdRef.detectChanges())}}})),this.connectList.forEach(t=>{t.nodesData=JSON.parse(o),t.graphData=JSON.parse(r)})}this.connectList.find(t=>{t.index==this.parentIndex&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{childIndex:[e]}).subscribe(t=>{}),t.index==this.childIndex&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{parentIndex:n.id}).subscribe(t=>{})})})},1e3),this.showToolbarMenu=!1,this.cdRef.detectChanges()}setTimeout(()=>{this.isCreatedBranch=!1,this.createNodeFlowCondition=!1,this.showToolbarMenu=!1,this.testloader=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null},5e3)}isSubComponentConfigured(t,e){const n=this.graph_data.find(e=>e.id==t);return n&&n[e]&&""!==n[e].trim()}getSubComponentStatus(t,e){const n=this.graph_data.find(e=>e.id==t);return n&&n[e]&&""!==n[e].trim()?`\u2713 ${n[e]}`:"+ Add"}saveAIAgentConfiguration(){this.testloader=!0;const t=this.chatModelId||this.toolId,e=!!this.toolId,n=this.connectList.find(e=>e.index==t);if(n){n.editOptions||(n.editOptions={});const e={};if(this.chatModelId){const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions){t.editOptions.chatModel&&(e.chatModel=t.editOptions.chatModel);const n=this.getSelectedChatModel();if("Appy Pie Flawless Text"===n){const n=[{type:"text",key:"",value:""}];e.chatModelApiKey=JSON.stringify(n),t.editOptions.chatModelApiKey=JSON.stringify(n)}else t.editOptions.chatModelApiKey&&"Appy Pie Flawless Text"!=n&&(e.chatModelApiKey=t.editOptions.chatModelApiKey)}}if(this.toolId){const t=this.connectList.find(t=>t.index==this.toolId);t&&t.editOptions&&(this.selectedTools&&this.selectedTools.length>0?e.tool=JSON.stringify(this.selectedTools):t.editOptions.tool&&(e.tool=t.editOptions.tool),t.editOptions.toolApiKey&&(e.toolApiKey=t.editOptions.toolApiKey))}n.editOptions=Object.assign(Object.assign({},n.editOptions),e);const o=this.graph_data.find(e=>e.id==t);if(o){if(e.chatModel)try{const t=JSON.parse(e.chatModel);t&&t.length>0&&t[0].value&&(o.chatModel=t[0].value)}catch(i){console.error("Error parsing chatModel for graph_data:",i)}if(e.tool)try{let t;t="string"==typeof e.tool?JSON.parse(e.tool):e.tool,t&&t.length>0&&t[0].value&&(o.tool=t[0].value)}catch(i){console.error("Error parsing tool for graph_data:",i)}}this.customerConnectService.updateUserConnectBy_Id(n.nodeId,{editOptions:n.editOptions}).subscribe(t=>{}),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{graphData:this.graph_data,nodesData:this.nodes}).subscribe(t=>{})}else console.error("No connectList item found for currentNodeId:",t);setTimeout(()=>{this.testloader=!1,this.chatModelContainer=!1,this.chatToolContainer=!1,this.chatModelId="",this.toolId="",e&&null!=t&&""!==t&&(this.isPanelVisible=!0,this.goToConnectApp(t),this.currentApp&&(this.currentApp.currentAction="options"),this.isSetUpOption=!0,this.setUpOptionMenu=!0,this.cdRef.detectChanges())},2e3)}runAIAgent(){!this.currentAIAgentNode||alert("AI Agent executed successfully! (Implementation pending)")}openAISubNodeConfig(t,e){if(this.chatModelId=t,this.chatModelContainer=!this.chatModelContainer,this.chatToolContainer=!1,this.Ap
1pBranching=!1,"chatModel"===e&&this.chatModelContainer){const t=this.getSelectedChatModel(),e=this.getChatModelApiKeyValue();t&&this.hasSubModels()&&e&&e.trim()&&this.fetchSubModelsFromAPI(t,e)}}openChatModelSelector(t){if(!this.graph_data.find(e=>e.id===t&&e.isAIAgent))return void console.error("AI Agent node not found");this.currentAINodeId=t,this.showChatModelPanel=!0,this.panelType="chatModel",this.AppBranching=!0,this.testloader=!1,this.originalCurrentApp=this.currentApp?Object.assign({},this.currentApp):null,this.currentApp={index:-1,nodeId:t,currentAction:"chatModelSelection",image:null},this.isPanelVisible=!0,this.openPanel=!0;const e=document.getElementById("custom-landing-page");e&&(e.style.display="block"),this.cdRef.detectChanges()}selectLanguageModel(t){if(!this.currentAINodeId)return void console.error("No AI node selected");const e=this.graph_data.find(t=>t.id===this.currentAINodeId&&t.isAIAgent);e&&(e.aiConfig.chatModel=Object.assign(Object.assign({},e.aiConfig.chatModel),{selectedModel:t,isConfigured:!0,eventFinal:t.name,modelData:t}),this.updateNodesCookie(),this.cdRef.detectChanges(),this.closeChatModelPanel())}closeChatModelPanel(){this.panelType="",this.currentAINodeId="",this.AppBranching=!1;const t=document.getElementById("custom-landing-page");t&&(t.style.display="none"),this.currentApp=this.originalCurrentApp,this.originalCurrentApp=null,this.cdRef.detectChanges()}clearChatModelPanelState(){(this.showChatModelPanel||this.showMemoryPanel||this.showToolsPanel)&&(this.showChatModelPanel=!1,this.showMemoryPanel=!1,this.showToolsPanel=!1,this.panelType="",this.currentAINodeId="",this.originalCurrentApp=null)}openMemorySelector(t){if(!this.graph_data.find(e=>e.id===t&&e.isAIAgent))return void console.error("AI Agent node not found");this.currentAINodeId=t,this.originalCurrentApp=this.currentApp?Object.assign({},this.currentApp):null,this.showMemoryPanel=!0,this.panelType="memory",this.AppBranching=!0,this.testloader=!1,this.currentApp={index:-1,nodeId:t,currentAction:"memorySelection",image:null},this.isPanelVisible=!0,this.openPanel=!0;const e=document.getElementById("custom-landing-page");e&&(e.style.display="block"),this.cdRef.detectChanges()}selectMemory(t){if(!this.currentAINodeId)return void console.error("No AI node selected");const e=this.graph_data.find(t=>t.id===this.currentAINodeId&&t.isAIAgent);e&&(e.aiConfig.memory={id:t.id,name:t.name,provider:t.provider,description:t.description,category:t.category},this.closeMemoryPanel(),this.cdRef.detectChanges())}closeMemoryPanel(){this.showMemoryPanel=!1,this.panelType="",this.isPanelVisible=!1,this.openPanel=!1,this.currentAINodeId="",this.AppBranching=!1;const t=document.getElementById("custom-landing-page");t&&(t.style.display="none"),this.currentApp=this.originalCurrentApp,this.originalCurrentApp=null,this.cdRef.detectChanges()}openToolSelector(t){if(!this.graph_data.find(e=>e.id===t&&e.isAIAgent))return void console.error("AI Agent node not found");this.currentAINodeId=t,this.originalCurrentApp=this.currentApp?Object.assign({},this.currentApp):null,this.showToolsPanel=!0,this.panelType="tool",this.AppBranching=!0,this.testloader=!1,this.currentApp={index:-1,nodeId:t,currentAction:"toolSelection",image:null},this.isPanelVisible=!0,this.openPanel=!0;const e=document.getElementById("custom-landing-page");e&&(e.style.display="block"),this.cdRef.detectChanges()}selectTool(t){if(!this.currentAINodeId)return void console.error("No AI node selected");const e=this.graph_data.find(t=>t.id===this.currentAINodeId&&t.isAIAgent);e&&(e.aiConfig.tool={id:t.id,name:t.name,provider:t.provider,description:t.description,category:t.category},this.closeToolsPanel(),this.cdRef.detectChanges())}closeToolsPanel(){this.showToolsPanel=!1,this.panelType="",this.isPanelVisible=!1,this.openPanel=!1,this.currentAINodeId="",this.AppBranching=!1;const t=document.getElementById("custom-landing-page");t&&(t.style.display="none"),this.currentApp=this.originalCurrentApp,this.originalCurrentApp=null,this.cdRef.detectChanges()}createBranchFlow(){var t;this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,localStorage.setItem("activeTab","draft"),this.updateUserConnectStatus(this.connectList[0].connectTitle,0,"Completed","Inactive"),this.Ap
1pBranching=!1,this.isPanelVisible=!1;const e=Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)));1==this.connectList.length&&null==this.parentIndex&&null==this.childIndex&&(this.parentIndex="0"),this.activeAgent=!1,this.activateAgent=!1;const n={id:(e+1).toString(),parentId:this.parentIndex,connectorId:(e+1).toString(),position:{x:0,y:0},displayName:"Splits in different flows",imageFinal:"branch_flow_image.png",eventFinal:"",headerName:"Flow",comments:"",chatModel:"",memory:"",tool:""},i={id:(e+2).toString(),parentId:n.id,connectorId:(e+2).toString(),position:{x:0,y:0},displayName:"Custom Rules (Default)",imageFinal:"branch_flow_image.png",eventFinal:"Only continue if",headerName:"Flow 1",comments:"",chatModel:"",memory:"",tool:""},o={id:(e+3).toString(),parentId:n.id,connectorId:(e+3).toString(),position:{x:0,y:0},displayName:"Custom Rules (Default)",imageFinal:"branch_flow_image.png",eventFinal:"Only continue if",headerName:"Flow 2",comments:"",chatModel:"",memory:"",tool:""};let r=[];if(null===this.childIndex)r=[{id:(e+4).toString(),parentId:i.id,connectorId:(e+4).toString(),position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""},{id:(e+5).toString(),parentId:o.id,connectorId:(e+5).toString(),position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}];else{const t=this.graph_data.find(t=>t.id===this.childIndex);t&&(t.parentId=i.id),r=[{id:(e+4).toString(),parentId:o.id,connectorId:(e+4).toString(),position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""}]}this.graph_data.push(n,i,o,...r);const s=JSON.parse(JSON.stringify(this.nodes));this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(t=>{const e=s.find(e=>e.connectorId===t.connectorId);return e?Object.assign(Object.assign({},t),{displayName:e.displayName,imageFinal:e.imageFinal,eventFinal:e.eventFinal,headerName:e.headerName,comments:e.comments}):t});const a=JSON.stringify(this.nodes),c=JSON.stringify(this.graph_data),l=this.parentIndex,d=this.childIndex;this.createNode("addAction",{id:Number(n.id)-1,parentIndex:this.parentIndex,childIndex:[i.id,o.id],nodesData:JSON.parse(a),graphData:JSON.parse(c),appId:"k2P4o45df5f473111E0f",title:"Splits in different flows",desc:"Splits in different flows",image:"branch_flow_image.png",nodeStatus:"complete"},"actions",1),this.createNode("addAction",{id:Number(i.id)-1,parentIndex:n.id,childIndex:[null!==(t=this.childIndex)&&void 0!==t?t:r.length>1?r[0].id:null],nodesData:JSON.parse(a),graphData:JSON.parse(c),appId:"k2P4o45df5f473111E0f",title:"Only continue if",desc:"Set up rules to specify when this Connect can continue running",image:"branch_flow_image.png",nodeStatus:"ta_selected"},"actions",1),this.createNode("addAction",{id:Number(o.id)-1,parentIndex:n.id,childIndex:[Number(o.id)+(r.length>1?2:1)],nodesData:JSON.parse(a),graphData:JSON.parse(c),appId:"k2P4o45df5f473111E0f",title:"Only continue if",desc:"Set up rules to specify when this Connect can continue running",image:"branch_flow_image.png",nodeStatus:"ta_selected"},"actions",1),r.forEach(t=>{this.createNode("addAction",{id:Number(t.id)-1,parentIndex:t.parentId,childIndex:[null],nodesData:JSON.parse(a),graphData:JSON.parse(c),appId:"",title:"",desc:"",image:"",nodeStatus:"new"},"actions",1)}),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:this.nodes,graphData:this.graph_data,connectStatus:"Draft"}).subscribe(()=>{this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),l&&this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==l).nodeId,{childIndex:[n.id]}).subscribe(),d&&this.customerConnectService.updateUserConnectBy_Id(this.connectList.find(t=>t.index==d).nodeId,{parentIndex:i.id}).subscribe()}),setTimeout(()=>
1{this.testloader=!1,this.isCreatedBranch=!1,this.AppBranching=!0},7e3),this.showToolbarMenu=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null,this.childIndex=null,this.parentIndex=null,this.cdRef.detectChanges()}createNodeFlow(){var t;this.customPanelWidth=400,this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,this.deleteLoader=!1,1==this.connectList.length&&null==this.parentIndex&&null==this.childIndex&&(this.parentIndex="0"),this.updateUserConnectStatus(null===(t=this.connectList[0])||void 0===t?void 0:t.connectTitle,0,"Completed","Inactive"),localStorage.setItem("activeTab","draft"),this.activeAgent=!1,this.activateAgent=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const e=`nodes_${this.connectId}=`,n=document.cookie.split("; ").find(t=>t.startsWith(e));let i=[];if(n){const t=n.split("=")[1];i=JSON.parse(decodeURIComponent(t))}const o=(Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)))+1).toString();this.createNode("addAction",Number(o)-1,"actions",0);let r={id:o,parentId:this.parentIndex,connectorId:o,position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""};this.connectList.find(t=>{var e;t.index==this.parentIndex&&(null===(e=this.connectList.find(t=>t.index==this.parentIndex))||void 0===e?void 0:e.childIndex)&&(this.connectList.find(t=>t.index==this.parentIndex).childIndex=[r.id]),t.index==this.childIndex&&(this.connectList.find(t=>t.index==this.childIndex).parentIndex=r.id)});const s=this.graph_data.some(t=>t.id===r.id&&t.parentId===r.parentId);if(this.cdRef.detectChanges(),s)this.childIndex=(Number(this.childIndex)+1).toFixed(2).toString(),this.updateNodesCookie(),this.createNodeFlow();else{const t=JSON.parse(JSON.stringify(this.nodes));if(this.graph_data.push(r),null!==this.childIndex){const t=this.graph_data.findIndex(t=>t.id===this.childIndex);t>=0&&(this.graph_data[t].parentId=r.connectorId)}this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(e=>{const n=t.find(t=>t.connectorId===e.connectorId);return n?Object.assign(Object.assign({},e),{displayName:n.displayName,imageFinal:n.imageFinal,eventFinal:n.eventFinal,headerName:n.headerName,comments:n.comments}):e});let e=JSON.stringify(this.nodes),n=JSON.stringify(this.graph_data);setTimeout(()=>{this.AppBranching=!0,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(e),graphData:JSON.parse(n),connectStatus:"Draft"}).subscribe(t=>{if(this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),"success"===t.message){this.updateDb({parentIndex:this.parentIndex,childIndex:[this.childIndex]});const t=this.connectList.findIndex(t=>t.index==o);-1!==t&&(this.connectList[t].parentIndex=this.parentIndex,this.connectList[t].childIndex=[this.childIndex],this.connectList[t].nodesData=JSON.parse(e),this.connectList[t].graphData=JSON.parse(n)),this.connectList.forEach(t=>{t.nodesData=JSON.parse(e),t.graphData=JSON.parse(n)})}this.connectList.find(t=>{t.index==this.parentIndex&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{childIndex:[o]}).subscribe(t=>{}),t.index==this.childIndex&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{parentIndex:r.id}).subscribe(t=>{})})})},1e3),this.showToolbarMenu=!1,this.cdRef.detectChanges()}setTimeout(()=>{this.isCreatedBranch=!1,this.createNodeFlowCondition=!1,this.showToolbarMenu=!1,this.testloader=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null},5e3)}createLastNodeFlow(t){this.parentIndex=t,this.childIndex=t.connectorId;const e=`nodes_${this.connectId}=`,n=document.cookie.split("; ").find(t=>t.startsWith(e));if(n){const t=n.split("=")[1];JSON.parse(decodeURIComponent(t))}const i={id:Math.floor(Number(this.childIndex)+1).toFixed(Math.floor(Number(this.childIndex)+1)).toString(),parentId:this.childIndex,connectorId:(Number(this.childIndex)+1).toFixed(Number(this.childIndex)+1).toString(),position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""};if(this.graph_data.some(t=>t.id===i.id&&t.parentId===i.parentId))this.childIndex=(Number(this.childIndex)+1).toFixed(Number(this.childIndex)+1).toString(),this.createNodeFlow();else{const t=JSON.parse(JSON.stringify(this.nodes));this.graph_data.push(i),this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(e=>{const n=t.find(t=>t.connectorId===e.connectorId);return n?Object.assign(Object.assign({},e),{displayName:n.displayName,imageFinal:n.imageFinal,eventFinal:n.eventFinal,headerName:n.headerName,comments:n.comments}):e});const e=JSON.stringify(this.nodes),n=JSON.stringify(this.graph_data);document.cookie=`nodes_${this.connectId}=${encodeURIComponent(e)}; path=/; max-age=604800`,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(e)}).subscribe(t=>{this.testloader=!1}),document.cookie=`graph_${this.connectId}=${encodeURIComponent(n)}; path=/; max-age=604800`,this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{graphData:JSON.parse(n)}).subscribe(t=>{this.testloader=!1,this.showToolbarMenu=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null}),this.showToolbarMenu=!1,this.childIndex=null,this.parentIndex=null,this.cdRef.detectChanges()}}updateNodesCookie(){const t=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||""})),e=JSON.stringify(t),n=JSON.stringify(this.graph_data);this.customerConnectService.updateConnectByConnectId(this.connectId,{nodesData:JSON.parse(e),graphData:JSON.parse(n)}).subscribe(t=>{this.testloader=!1})}toggleNodeMenu(t){this.activeNodeMenu===t.connectorId?(this.activeNodeMenu=null,this.showConfirmDelete.clear()):(this.showToolbarMenu=!1,this.activeConnection=null,this.flowToolbarMenu=!1,this.showConfirmDelete.clear(),this.activeNodeMenu=t.connectorId)}deleteNodePopup(t){this.setConfirmDelete(t.connectorId,!0),t.headerName.startsWith("Flow")?(this.bsModalRef=this.modalService.show(ov,{initialState:{nodeData:t},class:"flowNode-modal"}),this.bsModalRef.content.onClose.subscribe(e=>{e&&(this.deleteNodeFlow(e),this.clearConfirmDelete(t.connectorId))})):(this.deleteNodeFlow(t),this.clearConfirmDelete(t.connectorId))}deleteNodeFlow(t){var e,n,i,o;this.isRestoringState||this.pushUndoState(),this.deleteLoader=!0,this.updateUserConnectStatus(t.actionNameTitle,0,"Draft","Inactive"),this.currentApp.connectStatus="Draft",this.connectList.forEach(t=>{t.connectStatus="Draft"}),this.activeAgent=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const r=t.connectorId%1==0?Math.floor(t.connectorId):Number(t.connectorId),s=this.getAllChildIndices(r);for(let h=0;h<s.length;h++){const t=s[h],e=this.connectList.find(e=>e.index==t);if(e){if(["Splits in different flows","Always Run","Fallback"].includes(e.actionNameTitle))continue;this.customerConnectService.updateUserConnectBy_Id(e.nodeId,{nodeStatus:"complete"===e.nodeStatus?"app_options":e.nodeStatus}).subscribe(),e.nodeStatus="complete"===e.nodeStatus?"app_options":e.nodeStatus}}let a=null!==(e=this.connectList.find(t=>t.index==r))&&void 0!==e?e:{};const c=null===(i=null===(n=this.connectList.find(t=>t.index==(null==a?void 0:a.parentIndex)))||void 0===n?void 0:n.childIndex)||void 0===i?void 0:i.length;1==c&&/^Flow (?:[1-9]|10)$/.test(t.headerName)&&(a=this.connectList.find(t=>t.index==(null==a?void 0:a.parentIndex)));const l=this.connectList.find(t=>t.index==(null==a?void 0:a.parentIndex)),d=this.connectList.filter(t=>t.parentIndex==(null==a?void 0:a.index)),u=this.nodes.find(e=>e.connectorId===t.connectorId),p=u&&u.headerName&&u.headerName.startsWith("Flow");if(this.AppBranching=!1,this.isSetUpOption=!1,this.isPanelVisible=!1,p){if(this.deleteNodeAndChildren(a),l){const t=l.childIndex.filter(t=>t!=a.index);
1this.connectList.forEach(e=>{e.index==l.index&&(e.childIndex=t)}),this.customerConnectService.updateUserConnectBy_Id(l.nodeId,{childIndex:t.length>0?t:[null]}).subscribe()}d.forEach(t=>{this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{parentIndex:a.parentIndex}).subscribe()})}else this.deleteRegularNode(a,l,d);if(1==c&&/^Flow (?:[1-9]|10)$/.test(t.headerName)?(this.flowToolbarMenu=!1,this.updateGraphAfterDeletion(String(a.index))):this.updateGraphAfterDeletion(t.connectorId),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0),(null===(o=this.currentApp)||void 0===o?void 0:o.index)==r){const t=this.connectList.find(t=>t.index==(null==a?void 0:a.parentIndex));if(t){this.currentApp=t,document.querySelectorAll("[data-f-output-id]").forEach(t=>t.classList.remove("f-active-node"));const e=document.querySelector(`[data-f-output-id="${t.index}"]`);null==e||e.classList.add("f-active-node")}else{const t=this.connectList.find(t=>0===t.index);t&&(this.currentApp=t)}}this.isPanelVisible=!1,this.updateNodeData(a)}deleteNodeAndChildren(t){this.connectList.filter(e=>e.parentIndex==t.index).forEach(t=>{this.deleteNodeAndChildren(t)}),this.customerConnectService.deleteConnectNode(t.nodeId).subscribe(),this.connectList=this.connectList.filter(e=>e.index!=t.index)}updateGraphAfterDeletion(t){const e=this.nodes.find(e=>e.connectorId==t);let n;if(e&&e.headerName&&e.headerName.startsWith("Flow"))n=this.findAllChildNodes(t);else{n=[t];const e=this.graph_data.find(e=>e.id===t);e&&this.graph_data.forEach(n=>{n.parentId===t&&(n.parentId=e.parentId)})}this.nodes=this.nodes.filter(t=>!n.includes(t.connectorId)),this.graph_data=this.graph_data.filter(t=>!n.includes(t.id));const i=new ev.graphlib.Graph;i.setGraph({rankdir:FO.TOP_TO_BOTTOM}),this.graph_data.forEach(t=>{i.setNode(t.id,{width:350,height:135}),null!=t.parentId&&i.setEdge(t.parentId,t.id,{})}),ev.layout(i),this.nodes=this.nodes.map(t=>{const e=i.node(t.connectorId);return e?Object.assign(Object.assign({},t),{position:{x:e.x,y:e.y}}):t}),this.customerConnectService.updateConnectByConnectId(this.currentApp.connectId,{nodesData:this.nodes,graphData:this.graph_data}).subscribe(()=>{this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.cdRef.detectChanges()})}findAllChildNodes(t){const e=[t],n=t=>{this.graph_data.filter(e=>e.parentId==t).forEach(t=>{e.push(t.id),n(t.id)})};return n(t),e}deleteRegularNode(t,e,n){if(this.customerConnectService.deleteConnectNode(t.nodeId).subscribe(),this.connectList=this.connectList.filter(e=>e.index!=t.index),e){const i=e.childIndex.filter(e=>e!=t.index);n.forEach(t=>{i.includes(t.index)||i.push(t.index)}),this.customerConnectService.updateUserConnectBy_Id(e.nodeId,{childIndex:i.length>0?i:[null]}).subscribe();const o=this.connectList.findIndex(t=>t.nodeId===e.nodeId);-1!==o&&(this.connectList[o].childIndex=i.length>0?i:[null])}n.forEach(e=>{this.customerConnectService.updateUserConnectBy_Id(e.nodeId,{parentIndex:t.parentIndex}).subscribe();const n=this.connectList.findIndex(t=>t.nodeId===e.nodeId);-1!==n&&(this.connectList[n].parentIndex=t.parentIndex)})}addNodeAfterLast(){Number(this.nodes[this.nodes.length-1].connectorId)}onConnectionDropped(t){this.cdRef.detectChanges()}openTrigger(t){1==this.isSetUpOption&&(this.isSetUpOption=!1),this.changeAppCondition=!0;let e=this.normalizeConnectorId(t.connectorId);if(["Splits in different flows"].includes(t.eventFinal||t.displayName)){const t=document.querySelector(`[data-f-output-id="${e}"]`);return document.querySelectorAll(".f-node.f-selected").forEach(e=>{e!==t&&e.classList.remove("f-selected")}),document.querySelectorAll(".f-node.f-active-node").forEach(e=>{e!==t&&e.classList.remove("f-active-node")}),this.AppBranching=!1,void(this.isPanelVisible=!1)}this.AppBranching=this.previousConnectorId!==e||!this.AppBranching,this.previousConnectorId=e,this.AppBranching?(this.isPanelVisible=!0,this.goToConnectApp(e)):this.isPanelVisible=!1}normalizeConnectorId(t){const e=t.match(/(\d+)$/);if(e)return e[1];let n=parseFloat(t);return n%1==0?n.toString():n.toFixed(2)}closeTrigger(){this.AppBranching=!1,this.isPanelVisible=!1,this.cdRef.detectChanges(),this.isSetUpOption=!1,this.setUpOptionMenu=!1,this.isFullScreen=!1}handleCloseNewStep(){this.showToolbarMenu=!1,this.flowToolbarMenu=!1}closeBookExpert(){let t;t=!0,this.customerService.updateCustomerAppointmentBookingCheck({appointmentBookingCheck:!0}).subscribe(t=>{}),this.currentUser=this.customerService.GetCurrent(),this.bookExpert=!this.bookExpert,this.appointmentBookingCheckStatus=!0,this.currentUser.appointmentBookingCheck=!0,this.bookExpertIcon=!this.bookExpertIcon}openAppointmentPop(){this.bsModalRef=this.modalService.show(nv,{initialState:{}})}showUserGuide(){localStorage.removeItem("userGuideDisabled"),this.userGuideService.isCompleted()&&this.userGuideService.resetGuide(),this.userGuideService.startGuide()}openBookExpertAssistancePop(){this.bsModalRef=this.modalService.show(iv,{initialState:{},class:"bookexpert-modal"})}onDragStart(t){const e=this.draggableSection.nativeElement;this.isDragging=!0,this.offsetX=t.clientX-e.offsetLeft,this.offsetY=t.clientY-e.offsetTop}onDragMove(t){if(!this.isDragging)return;const e=this.draggableSection.nativeElement,n=window.innerWidth,i=window.innerHeight;let o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;const s=e.offsetWidth,a=e.offsetHeight;o<90&&(o=90),r<90&&(r=90),o+s>n&&(o=n-s),r+a>i&&(r=i-a),e.style.left=`${o}px`,e.style.top=`${r}px`,e.style.position="absolute"}onDragEnd(){this.isDragging=!1}onSelectionChange(t){this.selection.push(t.nodes)}isLastNode(t){const e=this.graph_data.some(e=>e.parentId===t.connectorId),n=1==this.graph_data.length&&0==t.connectorId,i=this.connectList.find(e=>(null==e?void 0:e.index)==t.connectorId);return(!e||n)&&!0!==(null==i?void 0:i.isTool)}shouldDisplayNodeName(t){var e;return!(null===(e=t.displayName)||void 0===e?void 0:e.match(/^Flow\d*$/))}getImagePath(t){return t.imageFinal&&t.imageFinal.startsWith("assets")?t.imageFinal:this.appyConfig.cdnMediaPath+t.imageFinal}isFirstOccurrence(t,e){return!(this.connections.filter(e=>e.from===t).length>1)&&this.connections.findIndex(e=>e.from===t)===e}addMoreFlow(){this.testloader=!0,this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,this.updateUserConnectStatus(this.connectList[0].connectTitle,0,"Completed","Inactive"),this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.graph_data.filter(t=>t.parentId===this.parentIndex);if(t.length>=10)return void alert("Maximum of 10 flows allowed.");const e=t.length+1,n=Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)));let i=(n+1).toString(),o=(n+1).toString(),r={id:i,parentId:this.parentIndex,connectorId:o,position:{x:0,y:0},displayName:"Custom Rules (Default)",imageFinal:"branch_flow_image.png",eventFinal:"Only continue if",headerName:`Flow ${e}`,comments:"",chatModel:"",memory:"",tool:""},s=(parseFloat(i)+1).toString(),a=(parseFloat(o)+1).toString();const c={id:s,parentId:r.id,connectorId:a,position:{x:0,y:0},displayName:"",imageFinal:"",eventFinal:"",headerName:"",comments:"",chatModel:"",memory:"",tool:""};this.graph_data.some(t=>t.id===r.id)||this.graph_data.push(r),this.graph_data.some(t=>t.id===c.id)||this.graph_data.push(c),this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM);const l=JSON.parse(JSON.stringify(this.graph_data));this.nodes=this.nodes.map(t=>{const e=l.find(e=>e.id===t.connectorId);return e?Object.assign(Object.assign({}
1,t),{displayName:e.displayName||t.displayName,imageFinal:e.imageFinal||t.imageFinal,eventFinal:e.eventFinal||t.eventFinal,headerName:e.headerName||t.headerName}):t});const d=JSON.stringify(this.nodes),u=JSON.stringify(this.graph_data),p={id:Number(r.id)-1,parentIndex:this.parentIndex,childIndex:[Number(i)+1],nodesData:JSON.parse(d),graphData:JSON.parse(u),appId:"k2P4o45df5f473111E0f",title:"Only continue if",desc:"Set up rules to specify when this Connect can continue running",image:"branch_flow_image.png",nodeStatus:"ta_selected"},h={id:Number(c.id)-1,parentIndex:r.id,childIndex:[null],nodesData:JSON.parse(d),graphData:JSON.parse(u),appId:"",title:"",desc:"",image:"",nodeStatus:"new"};this.createNode("addAction",p,"actions",1),this.createNode("addAction",h,"actions",1),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(d),graphData:JSON.parse(u)}).subscribe(()=>{this.connectList.find(t=>{t.index==this.parentIndex&&(t.childIndex.length>0&&t.childIndex.push(r.id),this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{childIndex:t.childIndex}).subscribe(t=>{}))})}),this.showToolbarMenu=!1,this.cdRef.detectChanges(),setTimeout(()=>{this.isCreatedBranch=!1,this.createNodeFlowCondition=!1,this.testloader=!1},6e3)}get filteredFlows(){return this.graph_data.filter(t=>t.parentId===this.parentIndex).map(t=>{const e=this.nodes.find(e=>e.connectorId===t.id);return Object.assign(Object.assign({},t),e)})}deleteSpecificFlow(t){const e=t.connectorId,n=new Set;this.findChildNodes(e,n),this.graph_data=this.graph_data.filter(t=>!n.has(t.id)),this.nodes=this.nodes.filter(t=>!n.has(t.connectorId)),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(JSON.stringify(this.nodes)),graphData:JSON.parse(JSON.stringify(this.graph_data))}).subscribe(()=>{this.testloader=!1;const t=[...this.nodes];this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=t}),this.showToolbarMenu=!1,this.cdRef.detectChanges()}findChildNodes(t,e){e.add(t),this.graph_data.forEach(n=>{n.parentId===t&&this.findChildNodes(n.id,e)})}duplicateSingleNode(t){this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,this.deleteLoader=!1,this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const e=this.connectList.find(e=>e.index==t.connectorId);if(!e)return void console.error("Node not found in connectList");const n=this.graph_data.find(e=>e.id==t.connectorId),i=(Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)))+1).toString(),o=e.childIndex,r={id:i,parentId:e.index.toString(),connectorId:i,position:{x:0,y:0},displayName:n.displayName||"",imageFinal:n.imageFinal||"",eventFinal:n.eventFinal||"",headerName:n.headerName||"",comments:n.comments||"",chatModel:n.chatModel||"",memory:n.memory||"",tool:n.tool||""};this.graph_data.push(r),this.graph_data.forEach(t=>{o[0]==t.id&&(t.parentId=i)});const s=JSON.parse(JSON.stringify(this.nodes));this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(t=>{const e=s.find(e=>e.connectorId==t.connectorId);return e?Object.assign(Object.assign({},t),{displayName:e.displayName,imageFinal:e.imageFinal,eventFinal:e.eventFinal,headerName:e.headerName,comments:e.comments}):t});const a=JSON.stringify(this.nodes),c=JSON.stringify(this.graph_data);this.createNode("addAction",{id:Number(i)-1,parentIndex:String(e.index),childIndex:o||[null],nodesData:JSON.parse(a),graphData:JSON.parse(c),appId:e.appId||"",title:e.actionNameTitle||"",desc:e.desc||"",image:e.image||"",editOptions:e.editOptions,filterEditOptions:e.filterEditOptions,sample_data:e.sample_data,nodeStatus:e.nodeStatus,connected_account_id:e.connected_account_id},"actions",1),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:JSON.parse(a),graphData:JSON.parse(c)}).subscribe(t=>{if(this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])}),"success"===t.message){const t=this.connectList.find(t=>t.index==e.index);t&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{childIndex:[i]}).subscribe(),o&&o.forEach(t=>{const e=this.connectList.find(e=>e.index==t);e&&this.customerConnectService.updateUserConnectBy_Id(e.nodeId,{parentIndex:i}).subscribe()})}setTimeout(()=>{this.isCreatedBranch=!1,this.createNodeFlowCondition=!1,this.testloader=!1,this.pendingDuplicateNodeIndex=i,this.getUserConnectData()},3e3)}),this.showToolbarMenu=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null,this.cdRef.detectChanges()}duplicateFlow(t){this.isCreatedBranch=!0,this.createNodeFlowCondition=!0,this.deleteLoader=!1;let e=Math.floor(Number(this.graph_data.reduce((t,e)=>Math.max(t,Number(e.id)),0)))+1;this.activeNodeMenu=null;const n=new Map,i=t=>{let e=1;return this.graph_data.filter(e=>e.parentId===t).forEach(t=>{e+=i(t.id)}),e},o=1e3*(i(t.connectorId)+4),r=(i,o)=>{var s;const a=this.graph_data.find(t=>
1t.id===i);if(!a)return null;this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const c=this.connectList.find(t=>t.index==i),l=(e++).toString();n.set(i,l);const d=this.connectList.find(e=>e.index==t.connectorId).parentIndex,u=Object.assign(Object.assign({},a),{id:l,parentId:o||d,connectorId:l,displayName:a.displayName,imageFinal:a.imageFinal,eventFinal:a.eventFinal,comments:a.comments,chatModel:a.chatModel||"",memory:a.memory||"",tool:a.tool||"",headerName:null===(s=a.headerName)||void 0===s?void 0:s.replace(/(\d+)$/,()=>(this.graph_data.filter(t=>{var e;return t.parentId===d&&(null===(e=t.headerName)||void 0===e?void 0:e.startsWith("Flow"))}).length+1).toString())});if(this.graph_data.push(u),c){this.connectList.find(t=>t.index==u.parentId);const t=this.graph_data.some(t=>t.parentId===i);this.createNode("addAction",{id:Number(l)-1,parentIndex:u.parentId||d,childIndex:t?[String(Number(l)+1)]:[null],nodesData:this.nodes,graphData:this.graph_data,appId:c.appId||"",title:c.actionNameTitle||"",desc:c.desc||"",image:c.image||"",editOptions:c.editOptions,filterEditOptions:c.filterEditOptions,sample_data:c.sample_data,nodeStatus:c.nodeStatus,connected_account_id:c.connected_account_id},"actions",1)}return this.graph_data.filter(t=>t.parentId===i).map(t=>r(t.id,l)),u},s=r(t.connectorId),a=JSON.parse(JSON.stringify(this.nodes));this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.nodes=this.nodes.map(t=>{const e=a.find(e=>e.connectorId===t.connectorId);return e?Object.assign(Object.assign({},t),{displayName:e.displayName,imageFinal:e.imageFinal,eventFinal:e.eventFinal,headerName:e.headerName,comments:e.comments}):t}),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:this.nodes,graphData:this.graph_data}).subscribe(()=>{this.connectList.forEach(t=>{var e;t.connectStatus="Draft",t.status=0,this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{connectStatus:"Draft",status:0}).subscribe(),this.activeAgent=this.isReadyToPublish((null===(e=this.connectList)||void 0===e?void 0:e.userConnects)||[])});const e=this.connectList.find(e=>e.index==t.connectorId).parentIndex,n=this.connectList.find(t=>t.index==e);if(n){const t=[...n.childIndex||[]];t.push(s.id),this.customerConnectService.updateUserConnectBy_Id(n.nodeId,{childIndex:t}).subscribe()}setTimeout(()=>{this.isCreatedBranch=!1,this.createNodeFlowCondition=!1,this.testloader=!1,this.pendingDuplicateNodeIndex=s.id,this.getUserConnectData()},o),this.showToolbarMenu=!1,this.flowToolbarMenu=!1,this.activeNodeMenu=null,this.cdRef.detectChanges()})}duplicateSelectedFlow(t){this.duplicateFlow(t),this.activeNodeMenu=null}ToggleOptions(t){"app"!==t&&(this.currentApp.aiMappingStatus="false"),localStorage.setItem("changeStep","1"),this.currentApp.currentAction=t,localStorage.getItem("isSetUpOptionFinal"),this.isSetUpOption=!0,this.setUpOptionMenu=!0,this.closeSetupOption.emit(),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`).then(()=>{this.cdRef.detectChanges()})}handleOnlyContinueIf(){this.onlyContinueIf=!this.onlyContinueIf}handleCloseSetupOption(){this.isSetUpOption=!1,this.setUpOptionMenu=!1}getNodeStatus(t){var e;if(!this.connectList||0===this.connectList.length)return"";let n=this.connectList.find(e=>(null==e?void 0:e.connectorId)===t);return n||(n=this.connectList.find(e=>(null==e?void 0:e.index)===parseInt(t))),this.activateAgent=this.isReadyToPublish(this.connectList),null!==(e=null==n?void 0:n.nodeStatus)&&void 0!==e?e:""}runTestNode(t){this.customerService.getNodeStatusByConnectID({connectId:this.connectId,index:t}).subscribe(e=>{var n;const i=e.nodeStatus;if("complete"===i){this.showErrorAlert=!1;const e=document.querySelector(`[data-f-output-id="${t}"]`);null==e||e.classList.remove("f-node-error"),null===(n=this.errorNodeIds)||void 0===n||n.delete(String(t)),this.showSuccessAlert=!0,setTimeout(()=>{this.showSuccessAlert=!1},7e3)}else if("incomplete"===i){const e=document.querySelector(`[data-f-output-id="${t}"]`);
1null==e||e.classList.add("f-node-error"),this.showErrorAlert=!0,this.errorNodeIds.add(String(t)),this.lastErrorNodeId=t}})}areAllChildNodesComplete(t){if("Flow"===t.headerName){const e=this.getFlowBranchNodes(t.connectorId);return 0!==e.length&&e.every(t=>{const e=this.connectList.find(e=>(null==e?void 0:e.index)==t.connectorId);return"complete"===(null==e?void 0:e.nodeStatus)})}return"complete"===this.getNodeStatus(t.connectorId)}getFlowBranchNodes(t){const e=[],n=new Set,i=t=>{n.has(t)||(n.add(t),this.connections.filter(e=>e.from===t).forEach(t=>{var n;const o=this.nodes.find(e=>e.connectorId===t.to);o&&((null===(n=o.headerName)||void 0===n?void 0:n.startsWith("Flow"))||e.push(o),i(t.to))}))};return i(t),e}getHeaderTitle(){var t,e,n;const i=null===(e=null===(t=this.currentApp)||void 0===t?void 0:t.nodesData)||void 0===e?void 0:e.find(t=>{var e;return t.connectorId==(null===(e=this.currentApp)||void 0===e?void 0:e.index)});if(["Flow","Flow 1","Flow 2","Flow 3","Flow 4","Flow 5","Flow 6","Flow 7","Flow 8","Flow 9","Flow 10"].includes(null==i?void 0:i.headerName))return"Flow"===(null==i?void 0:i.headerName)?i.headerName:`${null==i?void 0:i.headerName} Branch`;const o=null===(n=this.graph_data)||void 0===n?void 0:n.find(t=>{var e;return t.id==(null===(e=this.currentApp)||void 0===e?void 0:e.index)});return(null==o?void 0:o.isAIAgent)?"Tool Details":"Action Details"}hasExactlyTwoChildren(t){return this.connections.filter(e=>e.from==t.connectorId).length>=2}areImmediateChildNodesComplete(t){const e=this.connections.filter(e=>e.from===t.connectorId).map(t=>t.to);return 0===e.length||e.every(t=>{const e=this.nodes.find(e=>e.connectorId===t);return e&&"complete"===this.getNodeStatus(e.connectorId)&&this.areImmediateChildNodesComplete(e)})}resetToOriginalState(){var t;const e=null===(t=this.currentApp)||void 0===t?void 0:t.index;null!=e&&this.customerConnectService.getUserConnectData(this.connectId).subscribe(t=>{const n=((null==t?void 0:t.userConnects)||[]).find(t=>t.index==e);!n||(this.nodes=n.nodesData.map(t=>t.connectorId==n.index?Object.assign(Object.assign({},t),{displayName:n.displayName,imageFinal:n.image,eventFinal:n.actionName.title,comments:t.comments||""}):t),this.graph_data=n.graphData.map(t=>t.id==n.index?Object.assign(Object.assign({},t),{displayName:n.displayName,imageFinal:n.image,eventFinal:n.actionName.title}):t),this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:this.nodes,graphData:this.graph_data}).subscribe(t=>{this.connectList.forEach(t=>{t.nodesData=this.nodes,t.graphData=this.graph_data}),this.cdRef.detectChanges()},t=>{console.error("Error updating database:",t)}))})}isNodeComplete(t){return"complete"===this.getNodeStatus(t)}isPreviousNodeComplete(t){const e=this.connections.find(e=>e.to==t);if(!e)return!1;const n=e.from;return!!this.nodes.find(t=>t.connectorId==n)&&this.isNodeComplete(n)}getAllChildIndices(t){const e=[],n=[t],i=new Set;for(;n.length>0;){let t=n.shift();if(i.has(t))continue;i.add(t);let o=this.connectList.find(e=>e.index==t);if(o&&o.childIndex&&Array.isArray(o.childIndex))for(let i of o.childIndex)"number"==typeof i&&!isNaN(i)&&isFinite(i)&&(e.push(i),n.push(i))}return e}getAllChildIndicesInCreateNode(t){const e=[t],n=[t];for(;n.length>0;){let t=n.shift(),i=this.connectList.find(e=>(null==e?void 0:e.index)==t);if(i&&i.childIndex&&i.childIndex.length>0)for(let o of i.childIndex)null!=o&&(e.push(o),n.push(o))}return e}updateNodeData(t){this.isActionFailed=!1,this.actionFailedIndex=null,this.actionFailedData=null,this.actionData=null,this.testloader=!0;const e=t.index||!1;this.connectList.forEach(t=>{let n=t.editOptions,i=t.filterEditOptions;if(n)try{let r=!1;if(Object.keys(n).forEach(i=>{if(n[i]){let s;try{"string"==typeof n[i]?s=JSON.parse(n[i]):"object"==typeof n[i]&&(s=n[i])}catch(o){s=null}if(Array.isArray(s)){const n=s.filter(t=>{if(t.realIndex===e)return r=!0,!1;if(void 0===t.realIndex&&t.nodeIndex===e)return r=!0,!1;if(!0===t.custom){let i;try{if("string"==typeof t.value)i=JSON.parse(t.value);else{if(!Array.isArray(t.value)&&"object"!=typeof t.value)throw new Error("Invalid value format");i=t.value}}catch(n){console.error("Error parsing custom editOptions value:",t.value,n),i=[]}if(Array.isArray(i)){const n=i.filter(t=>t.realIndex!==e&&(void 0!==t.realIndex||t.nodeIndex!==e)||(r=!0,!1));t.value=JSON.stringify(n)}return!1}return!0});t.editOptions[i]=JSON.stringify(n)}}}
1),i&&"object"==typeof i)try{Array.isArray(i)?i.forEach((t,n)=>{Array.isArray(t)&&t.forEach((t,n)=>{Object.keys(t).forEach(n=>{const i=t[n];let o=i;if("string"==typeof i)try{o=JSON.parse(i)}catch(s){console.error("Failed to parse fieldValue:",i,s),o=[]}if(Array.isArray(o)){const i=o.filter(t=>{if(t.realIndex===e||void 0===t.realIndex&&t.nodeIndex===e)return r=!0,!1;if(!0===t.custom){let i=[];try{i="string"==typeof t.value?JSON.parse(t.value):t.value}catch(n){i=[]}if(Array.isArray(i)){const n=i.filter(t=>t.realIndex!==e&&!(void 0===t.realIndex&&t.nodeIndex===e));t.value=JSON.stringify(n),r=!0}return!0}return!0});t[n]=i}})})}):Object.keys(i).forEach(t=>{const n=i[t];Array.isArray(n)&&n.forEach((t,n)=>{t&&"object"==typeof t&&Object.keys(t).forEach(n=>{const i=t[n];let o=i;if("string"==typeof i)try{o=JSON.parse(i)}catch(s){console.error("Failed to parse fieldValue:",i,s),o=[]}if(Array.isArray(o)){const i=o.filter(t=>{if(t.realIndex===e||void 0===t.realIndex&&t.nodeIndex===e)return r=!0,!1;if(!0===t.custom){let i=[];try{i="string"==typeof t.value?JSON.parse(t.value):t.value}catch(n){i=[]}if(Array.isArray(i)){const n=i.filter(t=>t.realIndex!==e&&!(void 0===t.realIndex&&t.nodeIndex===e));t.value=JSON.stringify(n),r=!0}return!0}return!0});t[n]=i}})})})}catch(o){console.error("Error processing filterEditOptions:",o)}r?(t.nodeStatus="account_selected",this.customerConnectService.updateUserConnect(t.nodeId,{editOptions:n,nodeStatus:"account_selected"}).subscribe({next:()=>this.testloader=!1,error:()=>this.testloader=!1})):setTimeout(()=>{this.testloader=!1},1500)}catch(r){console.error("Error parsing editOptions:",r)}else setTimeout(()=>{this.testloader=!1},1500)})}toggleDisplay(){0===this.currentApp.index?this.isShow=!this.isShow:this.modalService.show(rv,{initialState:{},class:"ai-mapping-modal"})}onMouseDown(t){this.dragStartX=t.clientX,this.dragStartY=t.clientY,this.isDraggingNode=!1}onMouseMove(t){const e=Math.abs(t.clientX-this.dragStartX),n=Math.abs(t.clientY-this.dragStartY);(e>this.dragThreshold||n>this.dragThreshold)&&(this.isDraggingNode=!0)}onClickNode(t,e){if(this.isDraggingNode)return t.preventDefault(),void t.stopPropagation();this.isInitialPageLoad||this.testloader||(this.chatToolContainer=!1,this.chatModelContainer=!1,this.openTrigger(e))}onClickToolNode(t,e){this.toolId=e.connectorId,this.chatToolContainer=!this.chatToolContainer,this.chatModelContainer=!1,this.AppBranching=!1,this.chatToolContainer&&(this.selectedTools=this.parseToolSelections(),(!this.publishedActiveConnects||0===this.publishedActiveConnects.length)&&this.loadPublishedActiveConnects())}closeError(t){this.showErrorAlert=!1;const e=document.querySelector(`[data-f-output-id="${t}"]`);null==e||e.classList.remove("f-node-error"),this.errorNodeIds.delete(String(t)),this.lastErrorNodeId===t&&(this.lastErrorNodeId=null)}hasError(t){return this.errorNodeIds.has(String(t))}expandFullScreen(){this.isFullScreen=!this.isFullScreen,setTimeout(()=>{this.resetContinueButtonPositions()},0)}resetContinueButtonPositions(){const t=document.querySelector(".custom-landing-page"),e=document.querySelectorAll(".continue");if(!t||0===e.length)return;const n=t.classList.contains("full-screen");if(t.style.width=`${this.customPanelWidth}px`,n){const t=this.hasCustomPanelSize?this.customPanelWidth:window.innerWidth,n=(t-399)/2;e.forEach(e=>{e.style.width=`${t}px`,e.style.right=`${n}px`})}else{const t=this.hasCustomPanelSize?this.customPanelWidth:400,n=(t-399)/2;e.forEach(e=>{e.style.width=`${t}px`,e.style.right=`${n}px`})}}startResize(t){t.target.classList.contains("resize-handle")&&(t.preventDefault(),this.isResizing=!0,this.panel=document.querySelector(".custom-landing-page"),this.continueDiv=document.querySelector(".continue"),this.centerContainer=document.querySelector(".center-container"),!this.hasCustomPanelSize&&this.panel&&(this.customPanelWidth=this.panel.offsetWidth||400),this.continueDiv||setTimeout(()=>{this.continueDiv=document.querySelector(".continue")},0),this.lastDownX=t.clientX,document.body.style.cursor="ew-resize",document.body.style.userSelect="none",this.isFullScreen=!1)}
1onMouseMove2(t){if(this.isFullScreen||!this.isResizing||!this.panel||!this.centerContainer)return;t.preventDefault();let e=Math.max(400,Math.min(window.innerWidth-569,this.panel.offsetWidth+(this.lastDownX-t.clientX)));if(this.panel.style.width=`${e}px`,this.centerContainer.style.width=`calc(100% - ${e}px)`,this.customPanelWidth=e,this.hasCustomPanelSize=!0,this.fCanvas&&this.fCanvasComponent){const t=this.getCanvasViewportCenter(),e=this.zoomLevel/100;this.fCanvas.resetScaleAndCenter(!1),this.fCanvasComponent.fitToScreen(t,!1),this.fCanvas.setZoom(e,t)}this.continueDiv&&(this.continueDiv.style.width=`${e}px`,this.continueDiv.style.right=(e-399)/2+"px"),document.querySelectorAll(".continue").forEach(t=>{t.style.width=`${e}px`,t.style.right=(e-399)/2+"px"}),this.lastDownX=t.clientX}stopResize(){if(this.isResizing&&(this.isResizing=!1,this.hasCustomPanelSize=!0,this.panel=null,this.continueDiv=null,this.continueDivs=null,this.centerContainer=null,document.body.style.cursor="",document.body.style.userSelect="",this.fFlowElement&&this.fFlowElement.nativeElement)){const t=this.fFlowElement.nativeElement;t.style.position="",t.style.width="100%"}}setConfirmDelete(t,e){this.showConfirmDelete.set(t,e)}getConfirmDelete(t){return this.showConfirmDelete.get(t)||!1}clearConfirmDelete(t){this.showConfirmDelete.delete(t)}hasAnyConfirmDelete(){return Array.from(this.showConfirmDelete.values()).some(t=>t)}closePanelView(t){if(!this.isFullScreen){if(this.isResizing=!1,this.panel=document.querySelector(".custom-landing-page"),this.continueDiv=document.querySelector(".continue"),this.centerContainer=document.querySelector(".center-container"),!this.panel||!this.centerContainer)return;const e=this.customPanelWidth||400;this.panel.style.width=`${e}px`,this.centerContainer.style.width=`calc(100% - ${e}px)`,this.centerContainer.style.position="relative";const n=(e-399)/2;this.continueDiv&&(this.continueDiv.style.width=`${e}px`,this.continueDiv.style.right=`${n}px`),document.querySelectorAll(".continue").forEach(t=>{t.style.width=`${e}px`,t.style.right=`${n}px`}),this.fFlowElement&&this.fFlowElement.nativeElement&&(this.fFlowElement.nativeElement.style.width=`calc(100% - ${e}px)`),t.preventDefault()}}saveNodeNote(t){if(t&&void 0!==t.connectorId){const e=this.connectList.find(e=>(null==e?void 0:e.index)==t.connectorId);if(e&&e.nodeId){const n=e.comments,i=[...this.nodes];e.comments=t.comments;const o=this.nodes.findIndex(e=>e.connectorId==t.connectorId);-1!==o&&(this.nodes[o].comments=t.comments);const r=this.graph_data.findIndex(e=>e.id==t.connectorId);-1!==r&&(this.graph_data[r].comments=t.comments);const s=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||"",headerName:t.headerName}));this.customerConnectService.updateUserConnectBy_Id(e.nodeId,{nodesData:s}).subscribe(t=>{var e;(null===(e=this.currentApp)||void 0===e?void 0:e.triggerId)&&this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:s,graphData:this.graph_data}).subscribe(t=>{},t=>{console.error("Error updating connect-level nodesData:",t)})},o=>{e.comments=n,t.comments=n,this.nodes=i;const r=this.graph_data.findIndex(e=>e.id==t.connectorId);-1!==r&&(this.graph_data[r].comments=n)})}}}onNoteChange(t){t.comments&&t.comments.length>180&&(t.comments=t.comments.substring(0,180))}toggleNoteExpand(t,e){t.stopPropagation(),this.isNoteExpanded[e.id]=!this.isNoteExpanded[e.id]}onNoteClick(t,e){var n;t.stopPropagation();const i=this.normalizeConnectorId(e.connectorId),o=document.querySelector(`[data-f-output-id="${i}"]`);document.querySelectorAll(".f-node.f-selected").forEach(t=>{t!==o&&t.classList.remove("f-selected")}),null==o||o.classList.add("f-selected"),(null===(n=this.currentApp)||void 0===n?void 0:n.index)!=i&&this.openTrigger(e)}enableNoteEdit(t,e){var n;t.stopPropagation();const i=this.normalizeConnectorId(e.connectorId),o=document.querySelector(`[data-f-output-id="${i}"]`);document.querySelectorAll(".f-node.f-selected").forEach(t=>{t!==o&&t.classList.remove("f-selected")}),null==o||o.classList.add("f-selected"),this.noteInputFocused[e.id]=!0,(null===(n=this.currentApp)||void 0===n?void 0:n.index)!=i&&this.openTrigger(e)}handleDuplicateNode(t){this.isFlowNode(t)?this.duplicateFlow(t):this.duplicateSingleNode(t)}getDuplicationType(t){return this.isFlowNode(t)?"flow":"single"}isFlowNode(t){return!(!t.headerName||!t.headerName.startsWith("Flow"))}duplicateNodeWithType(t,e){"flow"===e?this.duplicateFlow(t):this.duplicateSingleNode(t)}onNoteBlur(t){setTimeout(()=>{this.noteInputFocused[t.id]=!1,this.saveNodeNote(t)},0)}togglePanelView(t){const e=document.getElementById("custom-landing-page");if(!e)return this.chatToolContainer=!1,this.chatModelContainer=!1,this.cdRef.detectChanges(),void t.preventDefault();{const t="none"!==e.style.display;e.style.display=t?"none":"block",this.isPanelVisible=!t}this.openPanel=!0,t.preventDefault(),this.cdRef.detectChanges(),this.Ap
1pBranching&&(this.skippanel&&(this.skippanel=!1),this.resetContinueButtonPositions())}resetConnectGraph(){if(this.isResettingFlow)return;if(this.isResettingFlow=!0,this.canResetFlowView=!1,this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.configuration=DO[FO.TOP_TO_BOTTOM],this.graph_data.forEach(t=>{const e=this.nodes.find(e=>e.connectorId===t.id||String(e.connectorId)===String(t.id));(null==e?void 0:e.position)&&(t.x=e.position.x,t.y=e.position.y)}),this.cdRef.detectChanges(),!this.fCanvas||"function"!=typeof this.fCanvas.resetScaleAndCenter)return void(this.isResettingFlow=!1);if(!this.fZoom)return void(this.isResettingFlow=!1);const t=window.innerWidth<=768,e=t?.35:.7;this.zoomLevel=t?35:70,setTimeout(()=>{requestAnimationFrame(()=>{const t=this.getCanvasViewportCenter();try{this.fCanvas.resetScaleAndCenter(!1),this.fitToScreen(),this.fCanvas.setZoom(e,t),this.fCanvas.redraw(),"function"==typeof this.fCanvas.emitCanvasChangeEvent&&this.fCanvas.emitCanvasChangeEvent()}catch(n){this.fCanvas.resetScaleAndCenter(!1),this.fitToScreen(),this.fCanvas.setZoom(e,t),this.fCanvas.redraw(),"function"==typeof this.fCanvas.emitCanvasChangeEvent&&this.fCanvas.emitCanvasChangeEvent()}this.saveResetChanges(),setTimeout(()=>{this.saveResetFlowState(),this.isResettingFlow=!1,this.cdRef.detectChanges()},50),this.cdRef.detectChanges()})},100)}saveResetChanges(){var t;if(!(null===(t=this.currentApp)||void 0===t?void 0:t.triggerId))return;const e=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""}));this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:e,graphData:this.graph_data}).subscribe(()=>{this.currentApp=Object.assign(Object.assign({},this.currentApp),{nodesData:e,graphData:this.graph_data}),this.cdRef.detectChanges()})}toggleMenu(){this.menuOpenModel=!this.menuOpenModel,this.menuOpenModelKey=!1,this.menuOpenSubModel=!1}toggleMenukey(){this.menuOpenModelKey=!this.menuOpenModelKey,this.menuOpenModel=!1,this.menuOpenModelKey&&this.loadPublishedActiveConnects()}loadPublishedActiveConnects(){this.customerConnectService.getUserConnectList({connectStatus:"Completed",pageSize:100}).subscribe(t=>{if(t&&t.userConnects){const e=new Map;t.userConnects.forEach(t=>{if(1===t.status&&"Completed"===t.connectStatus){const n=e.get(t.connectId)||0;e.set(t.connectId,n+1)}});const n=new Map;t.userConnects.forEach(t=>{1===t.status&&"Completed"===t.connectStatus&&(e.get(t.connectId)||0)>=1&&!n.has(t.connectId)&&n.set(t.connectId,{connectId:t.connectId,connectTitle:t.connectTitle||t.connectId,displayName:t.connectTitle||t.connectId})}),this.publishedActiveConnects=Array.from(n.values()),this.publishedActiveConnects.sort((t,e)=>(t.displayName||"").localeCompare(e.displayName||"")),this.cdRef.detectChanges();const i=this.publishedActiveConnects;if(0===i.length)return void(this.webhookConnectIds=new Set);const o=i.map(t=>this.customerConnectService.getUserConnectData(t.connectId).pipe(Rl(1e4),(0,$l.K)(()=>(0,Tr.of)({userConnects:[]}))));(0,qo.D)(o).subscribe(t=>{const e=new Set;t.forEach((t,n)=>{const o=(null==t?void 0:t.userConnects)||[],r=o.find(t=>0===t.index)||o[0];r&&("webhookUrl"===r.triggerType||"webhook"===r.triggerType)&&i[n]&&e.add(i[n].connectId)}),this.webhookConnectIds=e,this.cdRef.detectChanges()})}},t=>{console.error("Error loading published active connects:",t)})}removeSelectedValue(){const t=this.connectList.find(t=>t.index==this.chatModelId);t&&t.editOptions&&t.editOptions.chatModel&&delete t.editOptions.chatModel,this.menuOpenModel=!1,this.cdRef.detectChanges()}removeSelectedValueKey(){const t=this.connectList.find(t=>t.index==this.toolId);t&&t.editOptions&&t.editOptions.tool&&delete t.editOptions.tool,this.selectedTools=[],this.menuOpenModelKey=!1,this.cdRef.detectChanges()}outsideClick(t){t.target.closest(".menu_container")||(this.menuOpenModel=!1,this.menuOpenModelKey=!1,this.menuOpenSubModel=!1)}getToolDisplayValue(){const t=this.selectedTools.length>0?this.selectedTools:this.parseToolSelections();return t.length>0?t.map(t=>
1t.display_value||t.value).filter(Boolean).join(", "):"Select Tool"}getChatModelDisplayValue(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions&&t.editOptions.chatModel)try{let e;if(e="string"==typeof t.editOptions.chatModel?JSON.parse(t.editOptions.chatModel):t.editOptions.chatModel,e&&e.length>0&&e[0].display_value)return e[0].display_value}catch(e){console.error("Error parsing chatModel:",e)}return"Select Chat Model"}getSelectedChatModel(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions&&t.editOptions.chatModel)try{let e;if(e="string"==typeof t.editOptions.chatModel?JSON.parse(t.editOptions.chatModel):t.editOptions.chatModel,e&&e.length>0&&e[0].value)return e[0].value}catch(e){console.error("Error parsing chatModel:",e)}return""}parseToolSelections(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.connectList.find(t=>t.index==this.toolId);if(!t||!t.editOptions||!t.editOptions.tool)return[];try{let e;return e="string"==typeof t.editOptions.tool?JSON.parse(t.editOptions.tool):t.editOptions.tool,Array.isArray(e)?e:[]}catch(e){return console.error("Error parsing tool:",e),[]}}extractToolConnectId(t){if(!t)return"";if(t.display_value){const e=t.display_value.match(/^([^\s-]+)/);if(e)return e[1]}return t.value||""}getSelectedTools(){return 0===this.selectedTools.length&&(this.selectedTools=this.parseToolSelections()),this.selectedTools}getSelectedToolIds(){return this.getSelectedTools().map(t=>this.extractToolConnectId(t)).filter(Boolean)}isToolSelected(t){return this.getSelectedToolIds().includes(t)}getSelectedTool(){const t=this.getSelectedToolIds();return t.length>0?t[0]:""}getChatModelApiKeyValue(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions&&t.editOptions.chatModelApiKey)try{let e;if(e="string"==typeof t.editOptions.chatModelApiKey?JSON.parse(t.editOptions.chatModelApiKey):t.editOptions.chatModelApiKey,e&&e.length>0&&e[0].value)return e[0].value}catch(e){console.error("Error parsing chatModelApiKey:",e)}return""}isChatModelReady(){const t=this.getSelectedChatModel();if(!t||!t.trim())return!1;if("Appy Pie Flawless Text"===t)return!0;const e=this.getChatModelApiKeyValue();return!(!e||!e.trim())}getToolApiKeyValue(){this.connectList=this.connectList.filter(t=>t&&Object.keys(t).length>0);const t=this.connectList.find(t=>t.index==this.toolId);if(t&&t.editOptions&&t.editOptions.toolApiKey)try{let e;if(e="string"==typeof t.editOptions.toolApiKey?JSON.parse(t.editOptions.toolApiKey):t.editOptions.toolApiKey,e&&e.length>0&&e[0].value)return e[0].value}catch(e){console.error("Error parsing toolApiKey:",e)}return""}isToolReady(){const t=this.getSelectedTools();return!(!t||0===t.length)&&(this.getToolApiKeyValue(),!0)}isApiKeyRequired(){return!1}updateChatModelApiKey(t){const e=t.target.value,n=this.connectList.find(t=>t.index==this.chatModelId);if(n){n.editOptions||(n.editOptions={}),n.editOptions.chatModelApiKey=JSON.stringify([{type:"text",key:"",value:e}]);const t=this.getSelectedChatModel();if(!e||!e.trim())return t&&delete this.fetchedSubModels[t],this.clearSelectedSubModel(),void this.cdRef.detectChanges();t&&this.hasSubModels()&&e&&e.trim()&&(delete this.fetchedSubModels[t],this.clearSelectedSubModel(),this.fetchSubModelsFromAPI(t,e))}}updateChatModel(t,e){const n=this.getSelectedChatModel(),i=this.connectList.find(t=>t.index==this.chatModelId);if(i){i.editOptions||(i.editOptions={});const n=this.getSelectedChatModel();i.editOptions.chatModel=JSON.stringify([{type:"text",key:"",value:t,display_value:e}]),n!==t&&(i.editOptions.chatModelApiKey=JSON.stringify([{type:"text",key:"",value:""}]))}const o=this.graph_data.find(t=>t.id==this.chatModelId);o&&(o.chatModel=t);const r=this.nodes.find(t=>t.connectorId==this.chatModelId);r&&(r.chatModel=t),n!==t&&(this.clearSelectedSubModel(),n&&delete this.fetchedSubModels[n]),this.menuOpenModel=!1,"Appy Pie Flawless Text"!==t&&""!==t&&["chatgpt","gemini","claude","grok"].includes(t.toLowerCase())&&(n&&n!==t&&delete this.fetchedSubModels[n],delete this.fetchedSubModels[t]),this.cdRef.detectChanges()}getAvailableSubModels(){const t=this.getSelectedChatModel();return t&&this.fetchedSubModels[t]?this.fetchedSubModels[t]:t&&this.chatSubModels[t]?this.chatSubModels[t]:[]}hasSubModels(){const t=this.getSelectedChatModel();return"Appy Pie Flawless Text"!==t&&""!==t&&["chatgpt","gemini","claude","grok"].includes(t.toLowerCase())}toggleSubModelMenu(){this.menuOpenSubModel=!this.menuOpenSubModel,this.menuOpenSubModel&&(this.menuOpenModel=!1,this.menuOpenModelKey=!1)}getSelectedSubModel(){const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions&&t.editOptions.chatSubModel)try{let e;if(e="string"==typeof t.editOptions.chatSubModel?JSON.parse(t.editOptions.chatSubModel):t.editOptions.chatSubModel,e&&e.length>0&&e[0].value)return e[0].value}catch(e){console.error("Error parsing chatSubModel:",e)}return""}getSelectedSubModelDisplayValue(){const t=this.connectList.find(t=>t.index==this.chatModelId);if(t&&t.editOptions&&t.editOptions.chatSubModel)try{let e;if(e="string"==typeof t.editOptions.chatSubModel?JSON.parse(t.editOptions.chatSubModel):t.editOptions.chatSubModel,e&&e.length>0&&e[0].display_value)return e[0].display_value;if(e&&e.length>0&&e[0].value)return e[0].value}catch(e){console.error("Error parsing chatSubModel:",e)}return"Select Model"}updateSubModel(t,e){const n=this.connectList.find(t=>t.index==this.chatModelId);n&&(n.editOptions||(n.editOptions={}),n.editOptions.chatSubModel=JSON.stringify([{type:"text",key:"",value:t,display_value:e}]),this.selectedSubModel=t),this.menuOpenSubModel=!1,this.cdRef.detectChanges()}clearSelectedSubModel(){const t=this.connectList.find(t=>t.index==this.chatModelId);t&&t.editOptions&&delete t.editOptions.chatSubModel,this.selectedSubModel="",this.menuOpenSubModel=!1}fetchSubModelsFromAPI(t,e){!e||!e.trim()||this.fetchedSubModels[t]||(this.isLoadingSubModels=!0,this.customerConnectService.getAIModels({provider:t,apiKey:e}).subscribe(e=>{this.isLoadingSubModels=!1,e&&e.data&&Array.isArray(e.data)&&e.data.length>0?(this.fetchedSubModels[t]=e.data,this.cdRef.detectChanges()):console.warn(`No models returned from API for ${t}`)},e=>{console.error(`Error fetching ${t} models:`,e),this.isLoadingSubModels=!1}))}updateToolApiKey(t){const e=t.target.value,n=this.connectList.find(t=>t.index==this.toolId);n&&(n.editOptions||(n.editOptions={}),n.editOptions.toolApiKey=JSON.stringify([{type:"text",key:"",value:e}]))}updateTool(t,e){if(this.isToolSelected(t))return this.menuOpenModelKey=!1,void this.cdRef.detectChanges();const n=this.connectList.find(t=>t.index==this.toolId);let i=null;const o=this.getSelectedTools();this.customerConnectService.getUserConnectData(t).subscribe(t=>
1{if(i=t.userConnects[0],n){n.editOptions||(n.editOptions={});const t=[...o,{type:"text",key:"",value:i.displayName,display_value:e}];n.editOptions.tool=JSON.stringify(t),this.selectedTools=t}const r=this.graph_data.find(t=>t.id==this.toolId);r&&(r.tool=i.displayName,r.toolImage=i.image,r.eventFinal=i.actionName.title+" AI Agent");const s=this.nodes.find(t=>t.connectorId==this.toolId);s&&(s.tool=i.displayName,s.toolImage=i.image,s.eventFinal=i.actionName.title+" AI Agent"),n&&(n.graphData=this.graph_data,n.nodesData=this.nodes),this.cdRef.detectChanges()})}onPendingToolSelect(t){const e=t.target.value,n=this.publishedActiveConnects.find(t=>t.connectId===e);this.pendingToolId=e||"",this.pendingToolDisplay=n?`${n.connectId} - ${n.displayName}`:"",this.pendingToolName="",this.pendingToolDescription="",this.cdRef.detectChanges()}canAddPendingTool(){return!!this.pendingToolId&&!!this.pendingToolName.trim()&&!!this.pendingToolDescription.trim()}getAvailableToolsForDropdown(){const t=new Set(this.getSelectedToolIds());let e=(this.publishedActiveConnects||[]).filter(e=>!t.has(e.connectId));return this.webhookConnectIds.size>0&&(e=e.filter(t=>this.webhookConnectIds.has(t.connectId))),e}normalizeEditOptions(t){if(!t)return{};if("string"==typeof t)try{const e=JSON.parse(t);return e&&"object"==typeof e?e:{}}catch(e){return{}}return"object"==typeof t?t:{}}addSelectedToolWithDescription(){if(!this.canAddPendingTool()||this.isAddingTool)return;if(this.isToolSelected(this.pendingToolId))return this.pendingToolId="",this.pendingToolDisplay="",this.pendingToolName="",this.pendingToolDescription="",void this.cdRef.detectChanges();const t=this.connectList.find(t=>t.index==this.toolId),e=this.getSelectedTools();this.isAddingTool=!0;const n={connectId:this.pendingToolId,toolDescription:this.pendingToolDescription.trim(),toolDisplayName:this.pendingToolDisplay},i=(n=[],i="")=>{this.customerConnectService.getUserConnectData(this.pendingToolId).subscribe(o=>{const r=o.userConnects[0];if(t){const o=this.normalizeEditOptions(t.editOptions);t.editOptions=o;const s=[...e,{type:"text",key:"",value:r.displayName,display_value:this.pendingToolDisplay,description:this.pendingToolDescription.trim(),params:Array.isArray(n)?n:[],tool_name:this.pendingToolName.trim()||i||this.pendingToolDisplay||r.displayName||""}];t.editOptions=Object.assign(Object.assign({},t.editOptions),{tool:JSON.stringify(s)}),this.selectedTools=s}const s=this.graph_data.find(t=>t.id==this.toolId),a=this.nodes.find(t=>t.connectorId==this.toolId);s&&(s.tool=r.displayName,s.toolImage=r.image,s.eventFinal=r.actionName.title+" AI Agent"),a&&(a.tool=r.displayName,a.toolImage=r.image,a.eventFinal=r.actionName.title+" AI Agent"),t&&(t.graphData=this.graph_data,t.nodesData=this.nodes),this.pendingToolId="",this.pendingToolDisplay="",this.pendingToolName="",this.pendingToolDescription="",this.isAddingTool=!1,this.cdRef.detectChanges()},t=>{console.warn("[AI Agent] getUserConnectData failed",t),this.isAddingTool=!1,this.cdRef.detectChanges()})};this.commonService.generateToolParamDescriptions(n).subscribe(t=>{const e=(null==t?void 0:t.data)||{},n=Array.isArray(null==e?void 0:e.params)?e.params:Array.isArray(null==t?void 0:t.data)?t.data:[];i(n,(null==e?void 0:e.tool_name)||"")},t=>{console.warn("[AI Agent] generateToolParamDescriptions failed",t),i([],"")})}removeSelectedTool(t,e){e&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation()),console.log("[AI Agent] removeSelectedTool clicked",{iSelected:t,toolId:this.toolId});const n=this.connectList.find(t=>t.index==this.toolId);if(!n||!n.editOptions||!n.editOptions.tool)return void console.warn("[AI Agent] removeSelectedTool missing tool data");const i=this.getSelectedTools();if(t<0||t>=i.length)return void console.warn("[AI Agent] removeSelectedTool invalid index",{iSelected:t,length:i.length});i.splice(t,1),0===i.length?delete n.editOptions.tool:n.editOptions.tool=JSON.stringify(i),this.selectedTools=[...i];const o=this.graph_data.find(t=>t.id==this.toolId),r=this.nodes.find(t=>t.connectorId==this.toolId);if(0===i.length)o&&(o.tool="",o.toolImage=""),r&&(r.tool="",r.toolImage="");else{const t=i[0],e=(null==t?void 0:t.display_value)||(null==t?void 0:t.value)||"";o&&(o.tool=e),r&&(r.tool=e)}n&&(n.graphData=this.graph_data,n.nodesData=this.nodes),this.cdRef.detectChanges()}addNewTool(){console.log("[AI Agent] addNewTool clicked"),this.showNodeTypeSelection=!0,this.cdRef.detectChanges()}selectNodeTypeForTool(t){this.showNodeTypeSelection=!1,window.open(`/cu
1stomeditor/fresh/app/newNode?nodeType=${t}`,"_blank"),this.cdRef.detectChanges()}cancelNodeTypeSelection(){this.showNodeTypeSelection=!1,this.cdRef.detectChanges()}callAgentToggle(){this.showCallAgentToggle=!this.showCallAgentToggle,this.showButtonCall=!this.showButtonCall,this.cdRef.detectChanges()}pushUndoState(){var t,e,n,i;if(this.isRestoringState||!(null===(t=this.connectList)||void 0===t?void 0:t.length)||null==(null===(e=this.currentApp)||void 0===e?void 0:e.index))return;const o=this.connectList.findIndex(t=>t&&t.index==this.currentApp.index);-1!==o&&(this.connectList[o]=Object.assign(Object.assign({},this.connectList[o]),this.currentApp));const r={connectList:JSON.parse(JSON.stringify(this.connectList)),graph_data:JSON.parse(JSON.stringify(this.graph_data||[])),nodes:JSON.parse(JSON.stringify(this.nodes||[])),currentAppIndex:this.currentApp.index,selectedApps:this.selectedApps?JSON.parse(JSON.stringify(this.selectedApps)):[],AppBranching:this.AppBranching},s=this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:null;if(s&&s.currentAppIndex===r.currentAppIndex){const t=s.connectList.find(t=>t&&t.index==s.currentAppIndex),e=this.connectList.find(t=>t&&t.index==this.currentApp.index);if(t&&e){const o=(null==t?void 0:t.appId)!==(null==e?void 0:e.appId)||(null==t?void 0:t.displayName)!==(null==e?void 0:e.displayName),r=(null==t?void 0:t.actionNameTitle)!==(null==e?void 0:e.actionNameTitle)||(null==t?void 0:t.actionNameTitle_display)!==(null==e?void 0:e.actionNameTitle_display)||(null==t?void 0:t.triggerId)!==(null==e?void 0:e.triggerId),s=(null===(n=null==t?void 0:t.auth)||void 0===n?void 0:n._id)!==(null===(i=null==e?void 0:e.auth)||void 0===i?void 0:i._id)||(null==t?void 0:t.connected_account_id)!==(null==e?void 0:e.connected_account_id)||(null==t?void 0:t.nodeStatus)!==(null==e?void 0:e.nodeStatus),a=JSON.stringify((null==t?void 0:t.editOptions)||{})!==JSON.stringify((null==e?void 0:e.editOptions)||{});if(!(o||r||s||a))return}}this.undoStack.push(r),this.undoStack.length>this.maxUndoSteps&&this.undoStack.shift(),this.redoStack=[]}pushRedoState(){var t,e;if(!(null===(t=this.connectList)||void 0===t?void 0:t.length)||null==(null===(e=this.currentApp)||void 0===e?void 0:e.index))return;const n=this.connectList.findIndex(t=>t.index==this.currentApp.index);-1!==n&&(this.connectList[n]=Object.assign(Object.assign({},this.connectList[n]),this.currentApp));const i={connectList:JSON.parse(JSON.stringify(this.connectList)),graph_data:JSON.parse(JSON.stringify(this.graph_data||[])),nodes:JSON.parse(JSON.stringify(this.nodes||[])),currentAppIndex:this.currentApp.index,selectedApps:this.selectedApps?JSON.parse(JSON.stringify(this.selectedApps)):[],AppBranching:this.AppBranching};this.redoStack.push(i)}pushUndoStateWithoutClearingRedo(){var t,e,n,i;if(this.isRestoringState||!(null===(t=this.connectList)||void 0===t?void 0:t.length)||null==(null===(e=this.currentApp)||void 0===e?void 0:e.index))return void console.warn("Cannot push undo state:",{isRestoringState:this.isRestoringState,connectListLength:null===(n=this.connectList)||void 0===n?void 0:n.length,currentAppIndex:null===(i=this.currentApp)||void 0===i?void 0:i.index});const o=this.connectList.findIndex(t=>t.index==this.currentApp.index);-1!==o&&(this.connectList[o]=Object.assign(Object.assign({},this.connectList[o]),this.currentApp));const r={connectList:JSON.parse(JSON.stringify(this.connectList)),graph_data:JSON.parse(JSON.stringify(this.graph_data||[])),nodes:JSON.parse(JSON.stringify(this.nodes||[])),currentAppIndex:this.currentApp.index,selectedApps:this.selectedApps?JSON.parse(JSON.stringify(this.selectedApps)):[],AppBranching:this.AppBranching};this.undoStack.push(r),this.undoStack.length>this.maxUndoSteps&&this.undoStack.shift()}applyStateSnapshot(t){var e,n;if(!(null==t?void 0:t.connectList))return;this.isRestoringState=!0;const i=JSON.parse(JSON.stringify(this.connectList)),o=new Set(this.connectList.map(t=>{var e;return null===(e=t.index)||void 0===e?void 0:e.toString()})),r=new Set(t.connectList.map(t=>{var e;return null===(e=t.index)||void 0===e?void 0:e.toString()})),s=t.connectList.filter(t=>{var e;return!o.has(null===(e=t.index)||void 0===e?void 0:e.toString())}),a=i.filter(t=>{var e;return t&&null!=t.index&&!r.has(null===(e=t.index)||void 0===e?void 0:e.toString())}),c=null===(e=this.connectList[0])||void 0===e?void 0:e.connectTitle;this.connectList=JSON.parse(JSON.stringify(t.connectList)),void 0!==c&&this.connectList[0]&&(this.connectList[0].connectTitle=c),this.graph_data=JSON.parse(JSON.stringify(t.graph_data||[])),this.nodes=JSON.parse(JSON.stringify(t.nodes||[])),this.selectedApps=(null===(n=t.selectedApps)||void 0===n?void 0:n.length)?JSON.parse(JSON.stringify(t.selectedApps)):[],this.syncGraphDataWithConnectList(t.connectList),this.deleteNodesFromDatabase(a,i).then(()=>this.restoreDeletedNodesInDatabase(s,t.connectList)).then(()=>{var e,n;if(s.length>0&&this.redoStack.length>
10&&s.forEach(t=>{const e=this.connectList.find(e=>e.index==t.index);(null==e?void 0:e.nodeId)&&this.redoStack.forEach(n=>{var i;const o=null===(i=n.connectList)||void 0===i?void 0:i.find(e=>e.index==t.index);o&&(o.nodeId=e.nodeId)})}),this.rebuildNodesAndGraphDataFromConnectList(t.nodes||[],t.graph_data||[]),setTimeout(()=>{this.getData(new ev.graphlib.Graph,FO.TOP_TO_BOTTOM),this.cdRef.detectChanges()},0),this.restoreNodeRelationships(t.connectList),null===(e=this.currentApp)||void 0===e?void 0:e.triggerId){const t=this.nodes.map(t=>({connectorId:t.connectorId,displayName:t.displayName,imageFinal:t.imageFinal,eventFinal:t.eventFinal,position:t.position,comments:t.comments||"",chatModel:t.chatModel||"",memory:t.memory||"",tool:t.tool||""})),e=JSON.stringify(this.graph_data);this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{nodesData:t,graphData:JSON.parse(e)}).subscribe(()=>{},t=>{console.error("\u274c Error saving to database:",t)})}this.connectList.forEach(t=>{var e,n;if(t&&t.nodeId){const i=!!t.appId,o=!(!t.actionNameTitle||"Event not selected"===t.actionNameTitle),r=!!(t.connected_account_id||t.authId||(null===(e=t.auth)||void 0===e?void 0:e.authId)),s=!!(t.editOptions&&Object.keys(t.editOptions).length>0);let a=t.nodeStatus||"";i?o?r?!s&&"complete"===a&&(a="account_selected"):a="ta_selected":a="app_selected":a="new";let c=t.currentAction||"";i?o?r?r&&"action"===c&&(c=s?"options":"account"):c="account":c="action":c="app";const l={appId:t.appId||"",displayName:t.displayName||"",image:t.image||"",name:t.name||"",desc:t.desc||"",app_type:t.app_type||"",credentialUrlName:t.credentialUrlName||"",nodeStatus:a,nodeType:t.nodeType||"",actionName:o?{title:t.actionNameTitle,desc:t.desc||"",display_title:t.actionNameTitle_display||""}:{title:"",desc:"",display_title:""},actionNameTitle:o?t.actionNameTitle:"",actionNameTitle_display:o&&t.actionNameTitle_display||"",currentAction:c,authId:r&&(t.authId||(null===(n=t.auth)||void 0===n?void 0:n.authId)||t.connected_account_id)||"",auth:r&&t.auth||{},connected_account_id:r&&t.connected_account_id||"",editOptions:t.editOptions||{},filterEditOptions:t.filterEditOptions||{},sample_data:t.sample_data||[],triggerId:t.triggerId||"",connectTitle:t.connectTitle||"",connectStatus:t.connectStatus||"Draft",triggerType:t.triggerType||"",triggerEditOptions:t.triggerEditOptions||[],status:null!=t.status?t.status:0};this.customerConnectService.updateUserConnectBy_Id(t.nodeId,l).subscribe(()=>{},e=>console.error(`\u274c Error updating node ${t.nodeId}:`,e))}});const i=t.currentAppIndex,o=this.connectList.find(t=>t.index==i||t.index===i);if(o){const e=JSON.parse(JSON.stringify(o));this.currentApp=e,this.nodeType=e.nodeType,this.connectId=e.triggerId;const i=void 0===t.AppBranching||t.AppBranching;this.showAppListing=!0,this.isPanelVisible=i,this.AppBranching=i,this.openPanel=!1,this.showallTriggerFound=!1,this.activeNodeMenu=null;const r=!(!e.actionNameTitle||"Event not selected"===e.actionNameTitle),s=!!(e.connected_account_id||e.authId||(null===(n=e.auth)||void 0===n?void 0:n.authId));let a=e.currentAction||"app";e.appId?r?s?s&&("app"===a||"overview"===a)&&(a=e.editOptions&&Object.keys(e.editOptions).length>0?"options":"account"):a="account":a="action":a="app",this.currentApp.currentAction=a,e.currentAction=a,"options"===a&&(this.isSetUpOption=!0),this.router.navigateByUrl(`/customeditor/${e.nodeId}/${a}/${e.triggerId}`,{skipLocationChange:!1}).then(()=>{setTimeout(()=>{this.isRestoringState=!1,this.testloader=!1,this.cdRef.detectChanges(),setTimeout(()=>this.resetContinueButtonPositions(),0)},500)}).catch(()=>{this.isRestoringState=!1,this.testloader=!1,this.cdRef.detectChanges()})}else this.isRestoringState=!1,this.testloader=!1,this.cdRef.detectChanges()})}deleteNodesFromDatabase(t,e){return(0,Jo.mG)(this,void 0,void 0,function*(){if(!t||0===t.length)return Promise.resolve();const n=(t,e)=>{const i=e.filter(e=>e.parentIndex==t),o=[];return i.forEach(t=>{o.push(t),o.push(...n(t.index,e))}),o},i=new Map;t.forEach(t=>{var o;i.set(null===(o=t.index)||void 0===o?void 0:o.toString(),t),n(t.index,e).forEach(t=>{var e;i.set(null===(e=t.index)||void 0===e?void 0:e.toString(),t)})});const o=Array.from(i.values()).sort((t,e)=>(e.index||0)-(t.index||0)).map(t=>new Promise(n=>{let i=t.nodeId;if(!i){const n=e.find(e=>e.index==t.index);i=null==n?void 0:n.nodeId}i?this.customerConnectService.deleteConnectNode(i).subscribe(t=>{n()},e=>{console.warn(`Failed to delete node with nodeId ${i} for index ${t.index}. Error:`,e),(t.triggerId||t.connectId||this.connectId)&&console.warn(`Node at index ${t.index} may have been deleted already or nodeId ${i} is incorrect.`),n()}):(console.warn(`\u26a0 No nodeId found for node at index ${t.index}. Node may not exist in database.`),n())}));yield Promise.all(o)})}restoreDeletedNodesInDatabase(t,e){return(0,Jo.mG)(this,void 0,void 0,function*(){if(!t||0===t.length)return Promise.resolve();const e=t.map(t=>new Promise(e=>{this.createNodeForRestore(t,e)}));yield Promise.all(e)})}createNodeForRestore(t,e){var n;const i={connectId:t.triggerId||t.connectId||this.connectId,triggerId:t.triggerId||this.connectId,connectTitle:t.connectTitle||"",appId:t.appId||"",dis
1playName:t.displayName||"",image:t.image||"",nodeStatus:t.nodeStatus||"new",index:t.index,status:void 0!==t.status?t.status:0,parentIndex:t.parentIndex,childIndex:t.childIndex||[null],connectStatus:t.connectStatus||"Draft",currentAction:t.currentAction||"app",nodeType:t.nodeType||"actions",customConnect:void 0===t.customConnect||t.customConnect,auth:t.auth||{},editOptions:t.editOptions||{},filterEditOptions:t.filterEditOptions||{},connected_account_id:t.connected_account_id||"",actionNameTitle:t.actionNameTitle||"",actionNameTitle_display:t.actionNameTitle_display||"",actionName:t.actionName||{title:t.actionNameTitle||"",desc:"",display_title:t.actionNameTitle_display||""},nodesData:t.nodesData||[],graphData:t.graphData||[],sample_data:t.sample_data||[],aiConfig:t.aiConfig||{},customerId:(null===(n=this.currentUser)||void 0===n?void 0:n._id)||""},o=new Set(["connectId","triggerId","connectTitle","appId","displayName","image","nodeStatus","index","status","parentIndex","childIndex","connectStatus","currentAction","nodeType","customConnect","auth","editOptions","filterEditOptions","connected_account_id","actionNameTitle","actionNameTitle_display","actionName","nodesData","graphData","sample_data","aiConfig","customerId","nodeId","triggerType","webhook_functions","fields_error","templateId"]);Object.keys(t).forEach(e=>{!o.has(e)&&null!=t[e]&&(i[e]=t[e])}),this.customerConnectService.addUserConnect(i).subscribe(n=>{if(null==n?void 0:n.insertedId){const e=this.connectList.find(e=>e.index==t.index);e?e.nodeId=n.insertedId:console.warn(`\u26a0\ufe0f Node at index ${t.index} not found in connectList after creation`)}else console.warn(`\u26a0\ufe0f Node created but no insertedId returned for index ${t.index}. Result:`,n);e()},n=>{console.error(`\u274c Failed to create node at index ${t.index}:`,n),e()})}syncGraphDataWithConnectList(t){this.graph_data.forEach(e=>{const n=t.find(t=>{var n,i;return(null===(n=t.index)||void 0===n?void 0:n.toString())===(null===(i=e.id)||void 0===i?void 0:i.toString())});n&&(e.parentId=null!=n.parentIndex?n.parentIndex.toString():null)})}restoreNodeRelationships(t){t.forEach(t=>{t.nodeId&&this.customerConnectService.updateUserConnectBy_Id(t.nodeId,{parentIndex:t.parentIndex,childIndex:t.childIndex||[null]}).subscribe()})}rebuildNodesAndGraphDataFromConnectList(t,e){if(!this.connectList||0===this.connectList.length)return void console.warn("\u26a0\ufe0f Cannot rebuild nodes: connectList is empty");const n=[];this.connectList.forEach(t=>{if(null!=t.index){const i=null==e?void 0:e.find(e=>e.id===t.index.toString()),o=this.graph_data.find(e=>e.id===t.index.toString()),r={id:t.index.toString(),parentId:null!=t.parentIndex?t.parentIndex.toString():null,displayName:(null==i?void 0:i.displayName)||(null==o?void 0:o.displayName)||t.displayName||"",imageFinal:(null==i?void 0:i.imageFinal)||(null==o?void 0:o.imageFinal)||t.image||"",eventFinal:(null==i?void 0:i.eventFinal)||(null==o?void 0:o.eventFinal)||t.actionNameTitle||"",headerName:(null==i?void 0:i.headerName)||(null==o?void 0:o.headerName)||t.connectTitle||"",comments:(null==i?void 0:i.comments)||(null==o?void 0:o.comments)||t.comments||"",chatModel:(null==i?void 0:i.chatModel)||(null==o?void 0:o.chatModel)||t.chatModel||"",memory:(null==i?void 0:i.memory)||(null==o?void 0:o.memory)||t.memory||"",tool:(null==i?void 0:i.tool)||(null==o?void 0:o.tool)||t.tool||""};n.push(r)}}),this.graph_data=n;const i=[];this.connectList.forEach(e=>{if(null!=e.index){const n=null==t?void 0:t.find(t=>t.connectorId===e.index.toString()),o=this.nodes.find(t=>t.connectorId===e.index.toString()),r={id:(null==n?void 0:n.id)||(null==o?void 0:o.id)||wd(),connectorId:e.index.toString(),displayName:(null==n?void 0:n.displayName)||e.displayName||(null==o?void 0:o.displayName)||"",imageFinal:(null==n?void 0:n.imageFinal)||e.image||(null==o?void 0:o.imageFinal)||"",eventFinal:(null==n?void 0:n.eventFinal)||e.actionNameTitle||(null==o?void 0:o.eventFinal)||"",position:(null==n?void 0:n.position)||(null==o?void 0:o.position)||{x:0,y:0},comments:(null==n?void 0:n.comments)||e.comments||(null==o?void 0:o.comments)||"",chatModel:(null==n?void 0:n.chatModel)||e.chatModel||(null==o?void 0:o.chatModel)||"",memory:(null==n?void 0:n.memory)||e.memory||(null==o?void 0:o.memory)||"",tool:(null==n?void 0:n.tool)||e.tool||(null==o?void 0:o.tool)||"",headerName:(null==n?void 0:n.headerName)||(null==o?void 0:o.headerName)||e.connectTitle||""};i.push(r)}}),this.nodes=i}updateGraphLayout(){const t=new ev.graphlib.Graph;t.setGraph({rankdir:FO.TOP_TO_BOTTOM}
1),this.graph_data.forEach(e=>{t.setNode(e.id,{width:350,height:135}),null!=e.parentId&&t.setEdge(e.parentId,e.id,{})}),ev.layout(t),this.nodes=this.nodes.map(e=>{const n=t.node(e.connectorId);return n?Object.assign(Object.assign({},e),{position:{x:n.x,y:n.y}}):e})}undo(){if(!this.canUndo||this.isRestoringState||0===this.undoStack.length)return;const t=this.undoStack[this.undoStack.length-1];this.testloader=!0,this.pushRedoState(),this.undoStack.pop(),this.applyStateSnapshot(t),this.showUndoRedoToast("Undo successful","undo")}redo(){if(!this.canRedo||this.isRestoringState)return void console.warn("Redo blocked:",{canRedo:this.canRedo,isRestoringState:this.isRestoringState});if(0===this.redoStack.length)return void console.warn("Redo stack is empty");const t=this.redoStack[this.redoStack.length-1];this.testloader=!0,this.pushUndoStateWithoutClearingRedo(),this.redoStack.pop(),this.applyStateSnapshot(t),this.showUndoRedoToast("Redo successful","redo")}showUndoRedoToast(t,e){this.undoRedoToastTimer&&clearTimeout(this.undoRedoToastTimer),this.undoRedoToastMessage=t,this.undoRedoToastType=e,this.undoRedoToastTimer=setTimeout(()=>{this.undoRedoToastMessage="",this.cdRef.detectChanges()},1500)}get canUndo(){return this.undoStack.length>0&&!this.isRestoringState&&!this.activeAgent}get canRedo(){return this.redoStack.length>0&&!this.isRestoringState&&!this.activeAgent}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(ui.gz),o.Y36(Fo),o.Y36(ui.F0),o.Y36(mo.tT),o.Y36(DA),o.Y36(wo.v),o.Y36(yo),o.Y36(to.Ye),o.Y36(lo.N),o.Y36(o.sBO),o.Y36(o.sBO),o.Y36(o.sBO),o.Y36(LA),o.Y36(JA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-custom-editor"]],viewQuery:function(t,e){if(1&t&&(o.Gf(jA,5),o.Gf(FA,5),o.Gf(Wm,7),o.Gf(zm,7),o.Gf(zm,7),o.Gf(Xm,7),o.Gf(RA,5),o.Gf($A,5),o.Gf(BA,5),o.Gf(HA,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.draggableSection=t.first),o.iGM(t=o.CRH())&&(e.appEditOptionsRef=t.first),o.iGM(t=o.CRH())&&(e.fFlowComponent=t.first),o.iGM(t=o.CRH())&&(e.fCanvasComponent=t.first),o.iGM(t=o.CRH())&&(e.fCanvas=t.first),o.iGM(t=o.CRH())&&(e.fZoom=t.first),o.iGM(t=o.CRH())&&(e.dropdown=t.first),o.iGM(t=o.CRH())&&(e.resizablePanel=t.first),o.iGM(t=o.CRH())&&(e.fFlowElement=t.first),o.iGM(t=o.CRH())&&(e.fCanvasElement=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("keydown",function(t){return e.onCopilotShortcut(t)},!1,o.evT)("mousemove",function(t){return e.onMouseMove2(t)},!1,o.evT)("mouseup",function(){return e.stopResize()},!1,o.evT)("click",function(t){return e.outsideClick(t)},!1,o.evT)},outputs:{closeSetupOption:"closeSetupOption"},features:[o.TTD],decls:132,vars:39,consts:[["class","d-flex align-items-start align-items-xl-center justify-content-center gap-3 book_expert_assistance  px-3","id","book_expert_assistance",4,"ngIf"],["id","page-container","class","side-scroll header-navbar-fixed header-site",3,"ngClass",4,"ngIf"],["id","asideMenu",1,"asidemenu",3,"ngClass"],[1,"editorsidebar"],[1,"navlist","d-flex","justify-content-center","gap-1","align-items-center","flex-column"],[1,"brand-logo-link",3,"click"],["src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","36","height","36","alt","Flozic",1,"brand-logo-img"],[1,"editor-create-li"],[1,"editor-create-btn",3,"click"],["width","22","height","22","viewBox","0 0 25 25","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.5 12.5H19.5","stroke","white","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 5.5V19.5","stroke","white","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["aria-label","tooltip",1,"custom_tooltip"],["data-tab","My Connects",1,"btnbysection","current","active",3,"click"],["preserveAspectRatio","none","width","24px","height","18px","viewBox","0 0 24 18","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink"],["id","s-Image_29-iPhone-X","stroke","none","stroke-width","1","fill","none","fill-rule","evenodd","transform","translate(-9.000000, -153.000000)"],["d","M15.1470575,154.802949 C12.6639514,154.802949 10.6437155,156.773081 10.6437155,159.194603 C10.6437155,160.447254 11.1851553,161.578188 12.0507359,162.379022 L12.0507359,164.369992 C10.2277459,163.328716 9,161.399406 9,159.194603 C9,155.889108 11.7574971,153.2 15.1470575,153.2 L21.928918,153.2 C25.3184784,153.2 28.0759755,155.889108 28.0759755,159.194603 C28.0759755,162.500098 25.3184784,165.189312 21.928918,165.189312 L18.013259,165.189312 L18.013259,163.586363 L21.928918,163.586363 C24.4121337,163.586363 26.43226,161.616232 26.43226,159.194603 C26.43226,156.773081 24.4121337,154.802949 21.928918,154.802949 L15.1470575,154.802949 Z M29.9493737,159.030008 C31.7722541,160.071284 33,162.000594 33,164.205504 C33,167.510892 30.2425029,170.2 26.8529425,170.2 L20.071082,170.2 C16.6815216,170.2 13.9240245,167.510892 13.9240245,164.205504 C13.9240245,160.900009 16.6815216,158.210688 20.071082,158.210688 L23.986741,158.210688 L23.986741,159.813637 L20.071082,159.813637 C17.5878663,159.813637 15.56774,161.783768 15.56774,164.205504 C15.56774,166.627026 17.5878663,168.597051 20.071082,168.597051 L26.8529425,168.597051 C29.3360486,168.597051 31.3562845,166.
1627026 31.3562845,164.205504 C31.3562845,162.952746 30.8148447,161.821812 29.9493737,161.020978 L29.9493737,159.030008 Z","id","s-Image_29-Hotspot-Icon","fill","CurrentColor"],["data-tab","My Agents","href","/agent/",1,"btnbysection"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 20 20","fill","none"],["d","M10 7V4H6.8M2 11.5H3.6M16.4 11.5H18M12.4 10.75V12.25M7.6 10.75V12.25M5.2 7H14.8C15.6837 7 16.4 7.67157 16.4 8.5V14.5C16.4 15.3284 15.6837 16 14.8 16H5.2C4.31634 16 3.6 15.3284 3.6 14.5V8.5C3.6 7.67157 4.31634 7 5.2 7Z","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["data-tab","History Section",1,"btnbysection",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none"],["d","M3 12C3 13.78 3.52784 15.5201 4.51677 17.0001C5.50571 18.4802 6.91131 19.6337 8.55585 20.3149C10.2004 20.9961 12.01 21.1743 13.7558 20.8271C15.5016 20.4798 17.1053 19.6226 18.364 18.364C19.6226 17.1053 20.4798 15.5016 20.8271 13.7558C21.1743 12.01 20.9961 10.2004 20.3149 8.55585C19.6337 6.91131 18.4802 5.50571 17.0001 4.51677C15.5201 3.52784 13.78 3 12 3C9.48395 3.00947 7.06897 3.99122 5.26 5.74L3 8","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M3 3V8H8","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 7V12L16 14","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["data-tab","Linked Accounts",1,"btnbysection",3,"click"],["preserveAspectRatio","none","fill","CurrentColor","id","Linked_Accountss-Image_67-Layer_1","data-name","Layer 1","xmlns","http://www.w3.org/2000/svg","width","25","height","25","viewBox","0 0 64 64"],["d","M9,20a5,5,0,1,0-5-5A5,5,0,0,0,9,20Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,12Z",1,"cls-1"],["d","M9,38a5,5,0,1,0-5-5A5,5,0,0,0,9,38Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,30Z",1,"cls-1"],["d","M9,56a5,5,0,1,0-5-5A5,5,0,0,0,9,56Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,48Z",1,"cls-1"],["d","M59,14H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,14Z",1,"cls-1"],["d","M59,32H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,32Z",1,"cls-1"],["d","M59,50H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,50Z",1,"cls-1"],["data-tab","MCP",1,"btnbysection",3,"click"],[1,"icon-w","mcpIcon"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12 2L2 7L12 12L22 7L12 2Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M2 17L12 22L22 17","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M2 12L12 17L22 12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 2V12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["data-tab","Tools",1,"btnbysection",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 16 16","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M14.773 3.485l-.78-.184-2.108 2.096-1.194-1.216 2.056-2.157-.18-.792a4.42 4.42 0 0 0-1.347-.228 3.64 3.64 0 0 0-1.457.28 3.824 3.824 0 0 0-1.186.84 3.736 3.736 0 0 0-.875 1.265 3.938 3.938 0 0 0 0 2.966 335.341 335.341 0 0 0-6.173 6.234c-.21.275-.31.618-.284.963a1.403 1.403 0 0 0 .464.967c.124.135.272.247.437.328.17.075.353.118.538.127.316-.006.619-.126.854-.337 1.548-1.457 4.514-4.45 6.199-6.204.457.194.948.294 1.444.293a3.736 3.736 0 0 0 2.677-1.133 3.885 3.885 0 0 0 1.111-2.73 4.211 4.211 0 0 0-.196-1.378zM2.933 13.928a.31.31 0 0 1-.135.07.437.437 0 0 1-.149 0 .346.346 0 0 1-.144-.057.336.336 0 0 1-.114-.11c-.14-.143-.271-.415-.14-.568 1.37-1.457 4.191-4.305 5.955-6.046.1.132.21.258.328.376.118.123.245.237.38.341-1.706 1.75-4.488 4.564-5.98 5.994zm11.118-9.065c.002.765-.296 1.5-.832 2.048a2.861 2.861 0 0 1-4.007 0 2.992 2.992 0 0 1-.635-3.137A2.748 2.748 0 0 1 10.14 2.18a2.76 2.76 0 0 1 1.072-.214h.254L9.649 3.839v.696l1.895 1.886h.66l1.847-1.816v.258zM3.24 6.688h1.531l.705.717.678-.674-.665-.678V6.01l.057-1.649-.22-.437-2.86-1.882-.591.066-.831.849-.066.599 1.838 2.918.424.215zm-.945-3.632L4.609 4.58 4.57 5.703H3.494L2.002 3.341l.293-.285zm7.105 6.96l.674-.673 3.106 3.185a1.479 1.479 0 0 1 0 2.039 1.404 1.404 0 0 1-1.549.315 1.31 1.31 0 0 1-.437-.315l-3.142-3.203.679-.678 3.132 3.194a.402.402 0 0 0 .153.105.477.477 0 0 0 .359 0 .403.403 0 0 0 .153-.105.436.436 0 0 0 .1-.153.525.525 0 0 0 .036-.184.547.547 0 0 0-.035-.184.436.43
16 0 0 0-.1-.153L9.4 10.016z"],["href","https://helpdesk.flozic.ai/portal/en/kb/flozic/flozic-user-guide-and-faq","target","_blank",1,"btnbysection"],["d","M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 16V12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 8H12.01","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[4,"ngIf"],["data-tab","Folders",1,"btnbysection",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","width","24","height","24","xmlns","http://www.w3.org/2000/svg"],["d","M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],["href","https://mailhub.flozic.ai/","target","_blank",1,"btnbysection"],["d","M3 6h18v12H3z"],["d","M3 6l9 7 9-7"],["class","talk-expert",3,"click",4,"ngIf"],[1,"position-relative","branch-container",3,"ngClass"],["class","canvas-loading-skeleton",3,"cls-copilot-open",4,"ngIf"],[1,"center-container",3,"ngClass"],["fDraggable","",3,"fLoaded","fSelectionChange","fCreateConnection"],["fFlow",""],[1,"bg-white"],[3,"fZoom","fCanvasChange"],["fCanvas",""],["fBehavior","fixed","fType","segment","class","gradient-color","fStartColor","var(--connection-gradient-1)","fEndColor","var(--connection-gradient-1)",3,"fReassignDisabled","fOutputId","fInputId","fOffset",4,"ngFor","ngForOf","ngForTrackBy"],["fNode","","fDragHandle","","fNodeOutput","","fNodeInput","",3,"fNodePosition","fOutputId","fOutputConnectableSide","fInputId","fInputConnectableSide","f-active-node","blue-node","f-not-selected","ngClass","mousedown","mousemove","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","chat-model-container",4,"ngIf"],["id","custom-landing-page","class","custom-landing-page",3,"ngClass",4,"ngIf"],["class","togglePanelView",4,"ngIf"],["class","toolbar-newStep flowbranch_toolbar",3,"click",4,"ngIf"],[1,"zoom-toolbar"],[1,"align-items-center","d-flex","justify-content-center","text-center","zoom-buttons"],["type","button",1,"f-button","btn","p-1","border-0","bg-white",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","15","viewBox","0 0 24 24","fill","none"],["d","M5 12H19","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M5 12H19M12 5V19","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","zoom-buttons",4,"ngIf"],[1,"reset-connect-graph"],["type","button","data-tooltip","Re
1set Node Flow",1,"f-button","btn","p-2","border-0","bg-white","custom-options-tooltip","reset-tooltip-top","d-flex","align-items-center","gap-2",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.3","stroke-linecap","round","stroke-linejoin","round"],["d","M21 6H3"],["d","M7 12H3"],["d","M7 18H3"],["d","M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14"],["d","M11 10v4h4"],[3,"showButtonCall"],["class","dismiss-checklist","id","dismiss_checklist",4,"ngIf"],["type","button","class","btn dismiss_btn","id","dismiss_btn",4,"ngIf"],["type","button","data-tooltip","Copilot","aria-label","Copilot",1,"copilot-floating-btn",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","#fff"],["d","M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"],["panelSide","left",3,"isOpen","currentUser","currentApp","connectList","showConnectsRail","closeCopilot","appSetupComplete","addNodeRequest","addFlowRequest","addAIAgentRequest","deleteNodeRequest","renameConnectRequest","activateConnectRequest","addNodeNoteRequest","navigateToNodeRequest","runTestRequest","mapFieldsRequest","setFieldMappingRequest","clearFieldMappingRequest","showCurrentMappingRequest","listFieldOptionsRequest","setFilterConditionRequest","bookExpertRequest","accountConnected"],["id","book_expert_assistance",1,"d-flex","align-items-start","align-items-xl-center","justify-content-center","gap-3","book_expert_assistance","px-3"],[1,"mb-0","mx-auto","d-flex","align-items-center","gap-2","gap-xl-3","flex-wrap"],["type","button",1,"btn","book_expert_btn","text-white","fw-semibold",3,"click"],["type","button",1,"btn","bg-transparent","py-0","px-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none"],["d","M12 14.5551L3.05703 23.4981C2.72243 23.8327 2.29658 24 1.77947 24C1.26236 24 0.836501 23.8327 0.5019 23.4981C0.1673 23.1635 0 22.7376 0 22.2205C0 21.7034 0.1673 21.2776 0.5019 20.943L9.44487 12L0.5019 3.05703C0.1673 2.72243 0 2.29658 0 1.77947C0 1.26236 0.1673 0.836501 0.5019 0.5019C0.836501 0.1673 1.26236 0 1.77947 0C2.29658 0 2.72243 0.1673 3.05703 0.5019L12 9.44487L20.943 0.5019C21.2776 0.1673 21.7034 0 22.2205 0C22.7376 0 23.1635 0.1673 23.4981 0.5019C23.8327 0.836501 24 1.26236 24 1.77947C24 2.29658 23.8327 2.72243 23.4981 3.05703L14.5551 12L23.4981 20.943C23.8327 21.2776 24 21.7034 24 22.2205C24 22.7376 23.8327 23.1635 23.4981 23.4981C23.1635 23.8327 22.7376 24 22.2205 24C21.7034 24 21.2776 23.8327 20.943 23.4981L12 14.5551Z","fill","white"],["id","page-container",1,"side-scroll","header-navbar-fixed","header-site",3,"ngClass"],["id","header-navbar","ui-view","header",1,"bg-white"],[1,"dashlink-connect","px-0","position-relative"],[1,"d-xl-none",3,"click"],["src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","50","height","50","alt","Flozic"],[1,"connect-name","me-auto"],["for","connectName",4,"ngIf"],[1,"btn","edittitle"],[1,"si","si-pencil"],[1,"align-items-center","d-inline-flex","justify-content-center","px-3","py-1","rounded-pill","draft-save",3,"ngClass"],[1,"undo-redo-buttons","d-flex","align-items-center","gap-2"],["type","button","data-tooltip","Undo","aria-label","Undo",1,"btn","undo-redo-btn","custom-options-tooltip",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"lucide","lucide-undo2-icon","lucide-undo-2"],["d","M9 14 4 9l5-5"],["d","M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"],["type","button","data-tooltip","Redo","aria-label","Redo",1,"btn","undo-redo-btn","custom-options-tooltip",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"lucide","lucide-redo2-icon","lucide-redo-2"],["d","m15 14 5-5-5-5"],["d","M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"],["class","dashboard-link positoin-relative ms-1",4,"ngIf"],[1,"theme-toggle-custom-editor"],[3,"variant","size","showLabel"],["class","position-relative",4,"ngIf"],["class","dropdown ms-2 ms-lg-3",4,"ngIf"],["class","alert-success-flow",4,"ngIf"],["class","aleat-error-flow",4,"ngIf"],["class","undo-redo-toast",4,"ngIf"],["for","connectName"],["type","text","id","connectName","data-track","edit connection name","placeholder","Give a name to your Connect",1,"form-control",3,"value","keyup"],[1,"dashboard-link","positoin-relative","ms-1"],["type","button","target","_blank","data-tooltip","Get Expert Assistance",1,"custom-options-tooltip","bottom-tooltip","p-0","border-0","bg-transparent","btn",3,"click"],["src","/assets/images/book.svg","alt","","width","36","height","36",1,"d-inline-block"],[1,"position-relative"],["type","button",1,"btn","active_agent_Button",3,"disabled","click"],["class","hoverTooltip",4,"ngIf"],[1,"hoverTooltip"],[1,"dropdown","ms-2","ms-lg-3"],["type","button","id","dropdownMenuButton","data-bs-toggle","dropdown","aria-expanded","fal
1se",1,"btn","dropdown-toggle","bg-transparent"],[1,"dotpill",3,"ngClass"],[1,"dropdown-menu","end-0","py-1"],["role","button",1,"btn","fw-normal","activetoption","text-start","w-100",3,"click"],[1,"dotpill","dotactive"],[1,"dotpill","dotinactive"],[1,"alert-success-flow"],[1,"alert-header"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M10.5007 14L12.834 16.3333L17.5007 11.6666M25.6673 14C25.6673 20.4433 20.444 25.6666 14.0007 25.6666C7.55733 25.6666 2.33398 20.4433 2.33398 14C2.33398 7.55666 7.55733 2.33331 14.0007 2.33331C20.444 2.33331 25.6673 7.55666 25.6673 14Z","stroke","#469F3E","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","alert-body",4,"ngIf"],[1,"alert-body"],[1,"aleat-error-flow"],["class","btn bg-transparent border-0 p-0 close-alert-btn",3,"click",4,"ngIf"],["d","M14.0002 10.5001V15.1668M14.0002 19.8334H14.0118M25.3518 21.0001L16.0185 4.66677C15.815 4.30767 15.5199 4.00898 15.1632 3.80118C14.8066 3.59337 14.4012 3.48389 13.9885 3.48389C13.5757 3.48389 13.1704 3.59337 12.8138 3.80118C12.4571 4.00898 12.162 4.30767 11.9585 4.66677L2.62516 21.0001C2.41946 21.3563 2.31159 21.7607 2.31251 22.172C2.31342 22.5834 2.42307 22.9872 2.63035 23.3426C2.83763 23.6979 3.13517 23.9921 3.49281 24.1954C3.85045 24.3987 4.25547 24.5038 4.66683 24.5001H23.3335C23.7429 24.4997 24.1449 24.3916 24.4993 24.1866C24.8537 23.9816 25.1479 23.687 25.3524 23.3324C25.5569 22.9778 25.6645 22.5755 25.6644 22.1662C25.6643 21.7568 25.5565 21.3546 25.3518 21.0001Z","stroke","#F64343","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"btn","bg-transparent","border-0","p-0","close-alert-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","25","viewBox","0 0 24 25","fill","none"],["d","M18 6.5L6 18.5M6 6.5L18 18.5","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"undo-redo-toast"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","#4CAF50","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","#2196F3","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","#4CAF50","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["points","1 4 1 10 7 10"],["d","M3.51 15a9 9 0 1 0 2.13-9.36L1 10"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","#2196F3","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.13-9.36L23 10"],["data-tab","User Management",1,"btnbysection",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 640 512","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"],["aria-label","tooltip",1,"custom_tooltip","user-management-tooltip"],[1,"talk-expert",3,"click"],["type","button","data-tab","Request a Callback",1,"btnbysection"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["fill","none","d","M0 0h24v24H0V0z"],["d","M16.49 3c-2.21 0-4.21.9-5.66 2.34l1.06 1.06a6.47 6.47 0 0 1 9.18 0l1.06-1.06A7.932 7.932 0 0 0 16.49 3z"],["d","M20.03 7.46a5.022 5.022 0 0 0-7.08 0l1.06 1.06c.63-.63 1.51-1.03 2.47-1.03s1.84.39 2.47 1.03l1.08-1.06zM15.08 9.59 16.49 11l1.41-1.41c-.36-.37-.86-.59-1.41-.59s-1.05.22-1.41.59z"],["d","m15.63 14.4-2.52 2.5c-2.5-1.43-4.57-3.5-6-6l2.5-2.52c.23-.24.33-.57.27-.9L9.13 3.8c-.09-.46-.5-.8-.98-.8H4c-.56 0-1.03.47-1 1.03.17 2.89 1.05 5.6 2.43 7.97 1.58 2.73 3.85 4.99 6.57 6.57 2.37 1.37 5.08 2.26 7.97 2.43.56.03 1.03-.44 1.03-1v-4.15c0-.48-.34-.89-.8-.98l-3.67-.73a.985.985 0 0 0-.9.26z"],[1,"canvas-loading-skeleton"],[1,"cls-canvas-area"],[1,"cls-node"],[1,"cls-icon"],[1,"cls-lines"],[1,"cls-line",2,"width","70%"],[1,"cls-line",2,"width","45%"],[1,"cls-connector"],[1,"cls-line",2,"width","60%"],[1,"cls-line",2,"width","40%"],[1,"cls-panel"],[1,"cls-line",2,"width","40%","height","16px"],[1,"cls-panel-block"],[1,"cls-line",2,"width","35%"],[1,"cls-panel-block","cls-tall"],["fBehavior","fixed","fType","segment","fStartColor","var(--connection-gradient-1)","fEndColor","var(--connection-gradient-1)",1,"gradient-color",3,"fReassignDisabled","fOutputId","fInputId","fOffset"],["fBehavior","floating",3,"fReassignDisabled","fOutputId","fInputId"],["viewBox","0 0 700 700","fMarker","","markerUnits","strokeWidth",1,"connection-marker",3,"type","height","width","refX","refY"],["cx","350","cy","350","r","350","fill","#5371ff"],["viewBox","0 0 6 7","fMarker","","markerUnits","strokeWidth","orient","auto",1,"connection-marker",3,"type","height","width","refX","refY"],["d","M0.000391006 0L6 3.5L0.000391006 7L0.000391006 0Z","fill","#5371ff"],["fConnectionCenter",""],["class","btn btn-primary rounded-circle node-plusbtn custom-options-tooltip","data-tooltip","Add New Step","id","add-new-step-button","fConnectionCenter","",3,"blue-plus-btn","ngStyle","disabled","click",4,"ngIf"],["class","toolbar-newStep",3,"click",4,"ngIf"],["data-tooltip","Add New Step","id","add-new-step-button","fConnectionCenter","",1,"btn","btn-primary","rounded-circle","node-plusbtn","custom-options-tooltip",3,"ngStyle","disabled","click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","d","M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z","clip-rule","evenodd"],[1,"toolbar-newStep",3,"click"],["dropdown",""],[1,"bg-white","buttons_wrap","d-flex","flex-row","w-100"],["type","button",1,"f-button","btn",3,"click"],["d","M9 3H4C3.44772 3 3 3.44772 3 4V9C3 9.55228 3.44772 10 4 10H9C9.55228 10 10 9.55228 10 9V4C10 3.44772 9.55228 3 9 3Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M20 3H1
15C14.4477 3 14 3.44772 14 4V9C14 9.55228 14.4477 10 15 10H20C20.5523 10 21 9.55228 21 9V4C21 3.44772 20.5523 3 20 3Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M20 14H15C14.4477 14 14 14.4477 14 15V20C14 20.5523 14.4477 21 15 21H20C20.5523 21 21 20.5523 21 20V15C21 14.4477 20.5523 14 20 14Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 14H4C3.44772 14 3 14.4477 3 15V20C3 20.5523 3.44772 21 4 21H9C9.55228 21 10 20.5523 10 20V15C10 14.4477 9.55228 14 9 14Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","20","width","20","xmlns","http://www.w3.org/2000/svg",1,"ms-auto"],["aria-hidden","true","focusable","false","data-prefix","fas","data-icon","robot","role","img","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 512","width","20","height","20",1,"svg-inline--fa","fa-robot","fa-w-20"],["fill","#000000","d","M32,224H64V416H32A31.96166,31.96166,0,0,1,0,384V256A31.96166,31.96166,0,0,1,32,224Zm512-48V448a64.06328,64.06328,0,0,1-64,64H160a64.06328,64.06328,0,0,1-64-64V176a79.974,79.974,0,0,1,80-80H288V32a32,32,0,0,1,64,0V96H464A79.974,79.974,0,0,1,544,176ZM264,256a40,40,0,1,0-40,40A39.997,39.997,0,0,0,264,256Zm-8,128H192v32h64Zm96,0H288v32h64ZM456,256a40,40,0,1,0-40,40A39.997,39.997,0,0,0,456,256Zm-8,128H384v32h64ZM640,256V384a31.96166,31.96166,0,0,1-32,32H576V224h32A31.96166,31.96166,0,0,1,640,256Z"],["d","M10.2 6.3L6.3 10.2M7 12C7 13.3807 5.88071 14.5 4.5 14.5C3.11929 14.5 2 13.3807 2 12C2 10.6193 3.11929 9.5 4.5 9.5C5.88071 9.5 7 10.6193 7 12ZM7 12H17M17 12C17 13.3807 18.1193 14.5 19.5 14.5C20.8807 14.5 22 13.3807 22 12C22 10.6193 20.8807 9.5 19.5 9.5C18.1193 9.5 17 10.6193 17 12ZM13.8 17.7L17.7 13.8M14.5 4.5C14.5 5.88071 13.3807 7 12 7C10.6193 7 9.5 5.88071 9.5 4.5C9.5 3.11929 10.6193 2 12 2C13.3807 2 14.5 3.11929 14.5 4.5ZM14.5 19.5C14.5 20.8807 13.3807 22 12 22C10.6193 22 9.5 20.8807 9.5 19.5C9.5 18.1193 10.6193 17 12 17C13.3807 17 14.5 18.1193 14.5 19.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["fNode","","fDragHandle","","fNodeOutput","","fNodeInput","",3,"fNodePosition","fOutputId","fOutputConnectableSide","fInputId","fInputConnectableSide","ngClass","mousedown","mousemove","click"],["fNodeOutput","",3,"fOutputId","fOutputConnectableSide","ngClass","click",4,"ngIf"],[1,"d-flex","justify-content-start","node-item","flex-column","w-100"],[1,"align-items-center","d-flex","gap-3","justify-content-start","w-100","position-relative"],["class","img-fluid","width","120","height","120",3,"src","alt",4,"ngIf","ngIfElse"],["class","done-app",4,"ngIf"],["class","done-app alerticon-app",4,"ngIf"],["showSVG",""],[1,"d-flex","flex-column","gap-1"],["class","ai-agent-container",4,"ngIf","ngIfElse"],["checkSubComponent",""],["normalNode",""],["class","note-section mt-2",4,"ngIf"],["class","trigger-action-event d-block mt-2 pt-2",4,"ngIf"],["class","menu-container dropdown",3,"ngClass",4,"ngIf"],["class","secondary-btn-container",3,"blue-plus-secondary","ngClass",4,"ngIf"],["fNodeOutput","",3,"fOutputId","fOutputConnectableSide","ngClass","click"],["type","button","data-tooltip","Add New Step",1,"btn","btn-primary","rounded-circle","node-plusbtn","custom-options-tooltip",3,"disabled"],["width","120","height","120",1,"img-fluid",3,"src","alt"],[1,"done-app"],[1,"done-app","alerticon-app"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 18 18","fill","none"],["d","M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z","fill","#EBA936"],["d","M9 6V9M9 12H9.0075","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M10.5 3.5H4.66667C4.02233 3.5 3.5 4.02233 3.5 4.66667V10.5C3.5 11.1443 4.02233 11.6667 4.66667 11.6667H10.5C11.1443 11.6667 11.6667 11.1443 11.6667 10.5V4.66667C11.6667 4.02233 11.1443 3.5 10.5 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3333 3.5H17.5C16.8557 3.5 16.3333 4.02233 16.3333 4.66667V10.5C16.3333 11.1443 16.8557 11.6667 17.5 11.6667H23.3333C23.9777 11.6667 24.5 11.1443 24.5 10.5V4.66667C24.5 4.02233 23.9777 3.5 23.3333 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3333 16.3333H17.5C16.8557 16.3333 16.3333 16.8557 16.3333 17.5V23.3333C16.3333 23.9777 16.8557 24.5 17.5 24.5H23.3333C23.9777 24.5 24.5 23.9777 24.5 23.3333V17.5C24.5 16.8557 23.9777 16.3333 23.3333 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M10.5 16.3333H4.66667C4.02233 16.3333 3.5 16.8557 3.5 17.5V23.3333C3.5 23.9777 4.02233 24.5 4.66667 24.5H10.5C11.1443 24.5 11.6667 23.9777 11.6667 23.3333V17.5C11.6667 16.8557 11.1443 16.3333 10.5 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"ai-agent-container"],[1,"ai-left-components",3,"ngClass"],[1,"ai-sub-node",3,"click"],[1,"sub-status-icon"],["src","https://mediaconnect.appypie.com/media/icons/128x128/appypie.png","alt","Model","width","128","height","128",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/chatgpt1685534967703.png","alt","Model","width","128","height","128",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/groklogo1758281515712.png","alt","Model","width","128","height","128",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/Geminilanguagemodellogo1702968140324.png","alt","Model","width","128","height","128",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/claudelogo1725865468503.png","alt","Model","width","128","height","128",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none",4,"ngIf"],[1,"sub-label"],[1,"sub-label-text"],[1,"sub-status"],[1,"ai-main-content",3,"click"],[3,"ngClass","ngStyle"],["class","trigger-action",4,"ngIf"],[1,"ai-right-components",3,"ngClass"],["class","sub-status-icon",3,"background-image",4,"ngIf"],["class","sub-status-icon",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/appypie.png","alt","Model","width","128","height","128"],["src","https://mediaconnect.appypie.com/media/icons/128x128/chatgpt1685534967703.png","alt","Model","width","128","height","128"],["src","https://mediaconnect.appypie.com/media/icons/128x128/groklogo1758281515712.png","alt","Model","width","128","height","128"],["src","https://mediaconnect.appypie.com/media/icons/128x128/Geminilanguagemodellogo1702968140324.png","alt","Model","width","128","height","128"],["src","https://mediaconnect.appypie.com/media/icons/128x128/claudelogo1725865468503.png","alt","Model","width","128","height","128"],["d","M9 3H4C3.44772 3 3 3.44772 3 4V9C3 9.55228 3.44772 10 4 10H9C9.55228 10 10 9.55228 10 9V4C10 3.44772 9.55228 3 9 3Z","stroke","#212529","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M20 3H1
15C14.4477 3 14 3.44772 14 4V9C14 9.55228 14.4477 10 15 10H20C20.5523 10 21 9.55228 21 9V4C21 3.44772 20.5523 3 20 3Z","stroke","#212529","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M20 14H15C14.4477 14 14 14.4477 14 15V20C14 20.5523 14.4477 21 15 21H20C20.5523 21 21 20.5523 21 20V15C21 14.4477 20.5523 14 20 14Z","stroke","#212529","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 14H4C3.44772 14 3 14.4477 3 15V20C3 20.5523 3.44772 21 4 21H9C9.55228 21 10 20.5523 10 20V15C10 14.4477 9.55228 14 9 14Z","stroke","#212529","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"trigger-action"],["src","https://mediaconnect.appypie.com/media/icons/128x128/weather1625556000473.jpeg","alt","Tool","width","24","height","24","style","display: block;",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/servicefusion1692959052144.png","alt","Tool","width","24","height","24","style","display: block;",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/download1727936597589.png","alt","Tool","width","24","height","24","style","display: block;",4,"ngIf"],["src","https://mediaconnect.appypie.com/media/icons/128x128/weather1625556000473.jpeg","alt","Tool","width","24","height","24",2,"display","block"],["src","https://mediaconnect.appypie.com/media/icons/128x128/servicefusion1692959052144.png","alt","Tool","width","24","height","24",2,"display","block"],["src","https://mediaconnect.appypie.com/media/icons/128x128/download1727936597589.png","alt","Tool","width","24","height","24",2,"display","block"],["class","ai-sub-component-node",4,"ngIf","ngIfElse"],[1,"ai-sub-component-node"],[2,"color","#8b5cf6","font-weight","500","font-size","14px"],[1,"btn","btn-sm","btn-outline-primary","ai-sub-btn",3,"click"],[1,"note-section","mt-2"],[1,"note-wrapper"],["type","text","class","note-input","maxlength","180","autofocus","",3,"placeholder","hidden","ngModel","title","ngModelChange","click","focus","blur",4,"ngIf"],["class","note-text",3,"expanded","click",4,"ngIf"],["class","char-count",4,"ngIf"],["class","note-toggle-icon",3,"click",4,"ngIf"],["type","text","maxlength","180","autofocus","",1,"note-input",3,"placeholder","ngModel","title","ngModelChange","click","focus","blur"],[1,"note-text",3,"click"],[1,"char-count"],[1,"note-toggle-icon",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M4 6L8 10L12 6","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"trigger-action-event","d-block","mt-2","pt-2"],[1,"btn",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 448 512","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["d","M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"],["class","",4,"ngIf"],[1,""],[1,"menu-container","dropdown",3,"ngClass"],["type","button",1,"btn","p-0","menu-button",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.99996 10.8337C10.4602 10.8337 10.8333 10.4606 10.8333 10.0003C10.8333 9.54009 10.4602 9.16699 9.99996 9.16699C9.53972 9.16699 9.16663 9.54009 9.16663 10.0003C9.16663 10.4606 9.53972 10.8337 9.99996 10.8337Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M9.99996 4.99967C10.4602 4.99967 10.8333 4.62658 10.8333 4.16634C10.8333 3.7061 10.4602 3.33301 9.99996 3.33301C9.53972 3.33301 9.16663 3.7061 9.16663 4.16634C9.16663 4.62658 9.53972 4.99967 9.99996 4.99967Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M9.99996 16.6667C10.4602 16.6667 10.8333 16.2936 10.8333 15.8333C10.8333 15.3731 10.4602 15 9.99996 15C9.53972 15 9.16663 15.3731 9.16663 15.8333C9.16663 16.2936 9.53972 16.6667 9.99996 16.6667Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","menu-options",4,"ngIf"],[1,"menu-options"],["class","btn dropdown-item","type","button",3,"click",4,"ngIf"],["class","btn dropdown-item text-danger","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","dropdown-item",3,"click"],["clip-path","url(#clip0_269_1879)"],["d","M9.33325 2.66683C9.33325 1.9335 9.93325 1.3335 10.6666 1.3335","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M13.3333 1.3335C14.0666 1.3335 14.6666 1.9335 14.6666 2.66683","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M14.6666 5.3335C14.6666 6.06683 14.0666 6.66683 13.3333 6.66683","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M10.6666 6.66683C9.93325 6.66683 9.33325 6.06683 9.33325 5.3335","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M2 4.6665L4 6.666
15L6 4.6665","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M4 6.66683V3.3335C4 2.20016 4.86667 1.3335 6 1.3335H6.66667","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M5.33325 9.3335H2.66658C1.93021 9.3335 1.33325 9.93045 1.33325 10.6668V13.3335C1.33325 14.0699 1.93021 14.6668 2.66658 14.6668H5.33325C6.06963 14.6668 6.66658 14.0699 6.66658 13.3335V10.6668C6.66658 9.93045 6.06963 9.3335 5.33325 9.3335Z","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["clip-path","url(#clip0_679_2088)"],["d","M2.66634 10.6668C1.93301 10.6668 1.33301 10.0668 1.33301 9.3335V2.66683C1.33301 1.9335 1.93301 1.3335 2.66634 1.3335H9.33301C10.0663 1.3335 10.6663 1.9335 10.6663 2.66683M6.66634 5.3335H13.333C14.0694 5.3335 14.6663 5.93045 14.6663 6.66683V13.3335C14.6663 14.0699 14.0694 14.6668 13.333 14.6668H6.66634C5.92996 14.6668 5.33301 14.0699 5.33301 13.3335V6.66683C5.33301 5.93045 5.92996 5.3335 6.66634 5.3335Z","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["type","button",1,"btn","dropdown-item","text-danger",3,"click"],["d","M2 4.00016H14M12.6667 4.00016V13.3335C12.6667 14.0002 12 14.6668 11.3333 14.6668H4.66667C4 14.6668 3.33333 14.0002 3.33333 13.3335V4.00016M5.33333 4.00016V2.66683C5.33333 2.00016 6 1.3335 6.66667 1.3335H9.33333C10 1.3335 10.6667 2.00016 10.6667 2.66683V4.00016M6.66667 7.3335V11.3335M9.33333 7.3335V11.3335","stroke","#FF0000","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],[1,"secondary-btn-container",3,"ngClass"],["data-tooltip","Add New Step",1,"btn","btn-secondary","rounded-circle","custom-options-tooltip","center-btn",3,"disabled","click"],["class","toolbar-newStep last_toolbar-newStep",3,"click",4,"ngIf"],[1,"toolbar-newStep","last_toolbar-newStep",3,"click"],[1,"chat-model-container"],[1,"align-items-center","border-bottom","chat-model-header","d-flex","gap-3","justify-content-between","p-12","pe-5","w-100"],[1,"fs-5","fw-semibold","mb-0","theme-color"],[1,"chat-model-body","p-12"],[1,"chat-model-content"],[1,"form-group"],[1,"menu_container"],[1,"menu","ps-2",3,"ngClass","click"],["class","selectedname selected-itemdropdwn ng-star-inserted","id","chat01",4,"ngIf"],["class","placeholder-text",4,"ngIf"],["class","menu_dropdown d-block opacity-100",4,"ngIf"],["class","form-group",4,"ngIf"],[1,"chat-model-footer","p-12"],["type","button","data-track","continue",1,"btn","btn-lg","w-100","continueBtn",3,"disabled","click"],["id","chat01",1,"selectedname","selected-itemdropdwn","ng-star-inserted"],[1,"imgapps-icon","slack32x32",2,"background-image","url(https://mediaconnect.appypie.com/media/icons/128x128/aiagent.png)"],[1,"choice-label","m-0"],["type","button",1,"btn","btn-close","btn-sm",3,"click"],[1,"fa","fa-close"],[1,"placeholder-text"],[1,"menu_dropdown","d-block","opacity-100"],["id","single-dropdown","class","menu_dropdown-option ps-25",3,"ngClass","click",4,"ngFor","ngForOf"],["id","single-dropdown",1,"menu_dropdown-option","ps-25",3,"ngClass","click"],["type","text","placeholder","Enter API key...",1,"form-control",3,"value","input"],["class","selectedname selected-itemdropdwn ng-star-inserted","id","submodel01",4,"ngIf"],["id","submodel01",1,"selectedname","selected-itemdropdwn","ng-star-inserted"],["class","menu_dropdown-option ps-25","style","color: #999; padding: 10px;",4,"ngIf"],[1,"menu_dropdown-option","ps-25",2,"color","#999","padding","10px"],[1,"tool-selection-panel","border","rounded-2","p-3"],[1,"mb-3"],[1,"fw-semibold","mb-2"],["class","text-muted",4,"ngIf"],["class","d-flex align-items-start justify-content-between gap-2 border rounded-2 p-2 mb-2",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["noToolsAvailable",""],["type","button","class","btn btn-outline-primary w-100",3,"click",4,"ngIf"],["class","node-type-selection",4,"ngIf"],[1,"menu","ps-2","flex-column",3,"ngClass","click"],["class","selectedname selected-itemdropdwn ng-star-inserted",3,"id",4,"ngFor","ngForOf"],[1,"selectedname","selected-itemdropdwn","ng-star-inserted",3,"id"],["type","button",1,"btn","btn-close","btn-sm","checkClick",3,"id","click"],[1,"text-muted"],[1,"d-flex","align-items-start","justify-content-between","gap-2","border","rounded-2","p-2","mb-2"],[1,"flex-grow-1"],[1,"fw-semibold"],["type","button",1,"btn","btn-sm","tool-remove-btn",3,"click"],[1,"form-label"],[1,"form-control",3,"disabled","change"],["value",""],[3,"value",4,"ngFor","ngForOf"],["class","mb-3",4,"ngIf"],["type","button",1,"btn","btn-primary","w-100",3,"disabled","click"],[3,"value"],["placeholder","e.g. create_contact",1,"form-control",3,"ngModel","disabled","ngModelChange"],["rows","3","placeholder","Describe what this tool does",1,"form-control",3,"ngModel","disabled","ngModelChange"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm","me-2"],["type","button",1,"btn","btn-outline-primary","w-100",3,"click"],[1,"fa","fa-plus"],[1,"n
1ode-type-selection"],[1,"mb-3","text-center"],[1,"d-flex","gap-2"],["type","button",1,"btn","btn-primary","flex-fill",3,"click"],["type","button",1,"btn","btn-success","flex-fill",3,"click"],["type","button",1,"btn","btn-secondary",3,"click"],["id","custom-landing-page",1,"custom-landing-page",3,"ngClass"],["dropdown","","resizablePanel",""],[1,"resize-handle",3,"mousedown"],[1,"align-items-center","bg-white","border-bottom","d-flex","gap-3","info-wrap","justify-content-between","position-sticky","top-0","w-100","pe-5"],["class","flex-grow-1",4,"ngIf"],["class","flex-grow-1",3,"ngClass",4,"ngIf"],["class","btn bg-transparent border-0 p-0 custom-options-tooltip d-none d-xl-block tooltip-bottom me-lg-2","type","button","data-tooltip","Minimize",3,"ngClass","click",4,"ngIf"],["class","btn bg-transparent border-0 p-0 custom-options-tooltip d-none d-xl-block tooltip-bottom me-lg-2","type","button","data-tooltip","Expand",3,"click",4,"ngIf"],["class","rp-sk-body",4,"ngIf"],["class","main-landing",3,"ngClass",4,"ngIf"],["class","flex-shrink-0 preview_info",3,"ngClass",4,"ngIf"],[1,"rp-sk-title"],[1,"flex-grow-1",3,"ngClass"],[1,"theme-color","fw-semibold","mb-0"],["type","button","data-tooltip","Minimize",1,"btn","bg-transparent","border-0","p-0","custom-options-tooltip","d-none","d-xl-block","tooltip-bottom","me-lg-2",3,"ngClass","click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","17","width","17","xmlns","http://www.w3.org/2000/svg"],["points","4 14 10 14 10 20"],["points","20 10 14 10 14 4"],["x1","14","x2","21","y1","10","y2","3"],["x1","3","x2","10","y1","21","y2","14"],["type","button","data-tooltip","Expand",1,"btn","bg-transparent","border-0","p-0","custom-options-tooltip","d-none","d-xl-block","tooltip-bottom","me-lg-2",3,"click"],["points","15 3 21 3 21 9"],["points","9 21 3 21 3 15"],["x1","21","y1","3","x2","14","y2","10"],["x1","3","y1","21","x2","10","y2","14"],[1,"rp-sk-body"],[1,"rp-sk-app-row"],[1,"rp-sk-app-icon"],[1,"rp-sk-app-info"],[1,"rp-sk-line","rp-sk-line-md"],[1,"rp-sk-line","rp-sk-line-sm"],[1,"rp-sk-line","rp-sk-line-label"],[1,"rp-sk-line","rp-sk-line-full"],[1,"rp-sk-line","rp-sk-line-full","rp-sk-line-tall"],[1,"main-landing",3,"ngClass"],["class","language-models-panel",4,"ngIf"],["class","ai-agent-simple-panel",4,"ngIf"],["class","listingscrolling",4,"ngIf"],[1,"language-models-panel"],[1,"panel-header"],[1,"d-flex","justify-content-between","align-items-center"],[1,"mb-1"],[1,"text-muted","mb-0"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],["width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"models-list"],["class","model-item",3,"click",4,"ngFor","ngForOf"],[1,"model-item",3,"click"],[1,"model-icon"],[1,"model-info"],[1,"model-provider"],[1,"badge","bg-secondary"],[1,"ai-agent-simple-panel"],[1,"d-flex","align-items-center"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"me-2"],["d","M12 2L13.09 8.26L20 9L13.09 9.74L12 16L10.91 9.74L4 9L10.91 8.26L12 2Z","fill","currentColor"],[1,"mb-0"],[1,"btn","btn-outline-secondary","btn-sm",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M12 4L4 12M4 4L12 12","stroke","currentColor","stroke-width","2","stroke-linecap","round"],[1,"ai-agent-content"],["rows","4","placeholder","Enter your prompt here...",1,"form-control",3,"ngModel","ngModelChange"],["rows","3","placeholder","Enter system message...",1,"form-control",3,"ngModel","ngModelChange"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-success",3,"click"],[1,"listingscrolling"],["class","apps-listing","id","appendDiv","style","display: none;",4,"ngIf"],["class","tooltip-helper-backdrop","id","tooltip-helper-backdrop_1",4,"ngIf"],["class","tooltip-helper-backdrop","id","tooltip-helper-backdrop_3",4,"ngIf"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeAppChange","selectedApp","setUnSavedChanges",4,"ngIf"],["class","halfcolume",3,"ngClass",4,"ngIf"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeAccountChange","selectedApp",4,"ngIf"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeEventChange","selectedApp","setUnSavedChanges",4,"ngIf"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","isActionFailed","actionFailedIndex","actionFailedData","actionData","isSetUpOption","updateTestMode","beforeOptionsChange","selectedApp","closeSetupOption",4,"ngIf"],["id","appendDiv",1,"apps-listing",2,"display","none"],[1,"items-connect-list",3,"ngClass"],[1,"media-items"],[1,"service-icon-logo"],["src","https://media.appypieautomate.ai/assets/img/zap.svg","width","128","height","128","alt","",4,"ngIf"],["width","128","height","128","alt","",3,"src",4,"ngIf"],[1,"media-body-items"],[3,"click"],["class","edit-delete-dropbtn dropdown",3,"ngClass",4,"ngIf"],[1,"btn-group","dropup"],[1,"d-flex-dots"],["type","button",1,"btn","dropdown-toggle",3,"disabled","click"],["id","createActionSearch","aria-hidden","true",1,"fa","fa-plus"],["id","repeat_itemsContList",1,"items-connect-list",3,"ngClass"],["class","d-flex-dots ",4,"ngIf"],[1,"warning","attn",2,"display","none"],["class","items-connect-list","id","repeat_itemsContList",3,"ngClass",4,"ngFor","ngForOf"],["src","https://media.appypieautomate.ai/assets/img/zap.svg","width","128","height","128","alt",""],["width","128","height","128","alt","",3,"src"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 19 19","fill","none"],["d","M9.50004 17.4167C13.8723 17.4167 17.4167 13.8723 17.4167 9.5C17.4167 5.12774 13.8723 1.58333 9.50004 1.58333C5.12779 1.58333 1.58337 5.12774 1.58337 9.5C1.58337 13.8723 5.12779 17.4167 9.50004 17.4167Z","fill","#CFCFCF"],["d","M9.5 6.33333V9.5M9.5 12.6663H9.50742","stroke","#232323","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"edit-delete-dropbtn","dropdown",3,"ngClass"],["type","button","id","dropdownMenu2","data-bs-toggle","dropdown","aria-expanded","fal
1se",1,"btn","dropdown-toggle",3,"disabled"],["aria-hidden","true",1,"fa","fa-ellipsis-v","fa-fw","fa-lg"],["aria-labelledby","dropdownMenu2",1,"dropdown-menu","dropdown-menu-end","connect-steps","text-center"],[1,"dropdown-item",3,"click"],["src","assets/images/pen.svg"],["type","button","id","dropdownMenu1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","dropdown-toggle",3,"disabled"],["aria-labelledby","dropdownMenu1",1,"dropdown-menu","dropdown-menu-end","connect-steps","text-center"],["href","javascript:void(0);","id","delete_itemsContList_1",1,"dropdown-item",3,"click"],["src","assets/images/delete.svg"],["type","button","class","btn dropdown-toggle",3,"disabled","click",4,"ngIf"],[1,"edit-delete-dropbtn","dropdown",3,"hidden","ngClass"],["type","button","id","dropdownMenu3","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","dropdown-toggle",3,"disabled"],["aria-labelledby","dropdownMenu3",1,"dropdown-menu","dropdown-menu-end","connect-steps","text-center"],["class","dropdown-item",3,"click",4,"ngIf"],["id","tooltip-helper-backdrop_1",1,"tooltip-helper-backdrop"],["id","tooltip-helper-active",1,"tooltip-helper-active"],[1,"tooltip-helper-active-description",3,"ngClass"],["id","tooltip-helper-active-description-text"],[1,"tooltip-helper-footer"],["type","button","id","QuitBtn",1,"btn","btn-dark","rounded-0",3,"click"],["id","NextBtn","type","button","class","btn btn-primary ms-2 rounded-0",3,"click",4,"ngIf"],["id","NextBtn","type","button",1,"btn","btn-primary","ms-2","rounded-0",3,"click"],["id","tooltip-helper-backdrop_3",1,"tooltip-helper-backdrop"],[1,"tooltip-helper-active-description",2,"right","27%","top","-81px"],["id","PreviousBtn","type","button","class","btn btn-secondary ms-auto rounded-0",3,"click",4,"ngIf"],["id","PreviousBtn","type","button",1,"btn","btn-secondary","ms-auto","rounded-0",3,"click"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeAppChange","selectedApp","setUnSavedChanges"],[1,"halfcolume",3,"ngClass"],[1,"trigger-event","mar-15-b",3,"ngClass"],[1,"trgrevent-icon"],[1,"fa","fa-check-circle","fa-fw","fa-2x"],[1,"trgrevent-application","mar-5-l"],["class","trgrevent-change m-auto-l",4,"ngIf"],["class","trigger-event mar-15-b",3,"ngClass",4,"ngIf"],["class","trigger-event mar-15-b align-items-start flex-column",3,"ngClass",4,"ngIf"],["class","tooltip-helper-backdrop","id","tooltip-helper-backdrop_2",4,"ngIf"],["class","tooltip-helper-backdrop","id","tooltip-helper-backdrop_4",4,"ngIf"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","selectedApp","moveToNextAction",4,"ngIf"],[1,"trgrevent-change","m-auto-l"],["class","btn change-btn popup","data-bs-toggle","modal","data-bs-target","#AllAppSelectModal",4,"ngIf"],["class","btn change-btn",3,"click",4,"ngIf"],["data-bs-toggle","modal","data-bs-target","#AllAppSelectModal",1,"btn","change-btn","popup"],[1,"btn","change-btn",3,"click"],[1,"textdots"],[1,"trigger-event","mar-15-b","align-items-start","flex-column",3,"ngClass"],["class","app-preview-options-column",4,"ngIf"],[1,"app-preview-options-column"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","selectedApp"],["id","tooltip-helper-backdrop_2",1,"tooltip-helper-backdrop"],["id","tooltip-helper-backdrop_4",1,"tooltip-helper-backdrop"],[1,"tooltip-helper-active-description",2,"right","0%","top","-175px"],["type","button",1,"btn","btn-primary","ms-2","rounded-0",3,"click"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","selectedApp","moveToNextAction"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeAccountChange","selectedApp"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","beforeEventChange","selectedApp","setUnSavedChanges"],[3,"isTemplate","singleClickTemplate","connectId","nodeType","connectList","currentApp","translation","warningInfo","isActionFailed","actionFailedIndex","actionFailedData","actionData","isSetUpOption","updateTestMode","beforeOptionsChange","selectedApp","closeSetupOption"],[1,"flex-shrink-0","preview_info",3,"ngClass"],["class","align-items-center d-flex gap-2 p-12 flex-column",4,"ngIf"],[1,"align-items-center","d-flex","gap-2","p-12","flex-column"],["type","button","class","btn btn-primary editconnect-btn",3,"click",4,"ngIf"],["type","button",1,"btn","btn-primary","editconnect-btn",3,"click"],[1,"togglePanelView"],["type","button",1,"btn","bg-transparent","border-0","p-0","custom-options-tooltip","tooltip-bottom",3,"click"],["width","24","height","25","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["openPanel",""],["x","2","y","6","width","16","height","12","stroke","CurrentColor","stroke-width","1.5"],["x","18","y","6","width","4","height","12","stroke","CurrentColor","stroke-width","1.5"],["d","M8 12h6","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round"],["d","M11 9l-3 3 3 3","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M11 9l3 3-3 3","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"toolbar-newStep","flowbranch_toolbar",3,"click"],[1,"d-flex","align-items-center","gap-3","justify-content-between","w-100","flow-cardheader"],["type","button",1,"btn","p-0","bg-transparent","border-0",3,"click"],[1,"bg-white","buttons_wrap","d-flex","flex-column","w-100","choose-trigger-event","flow-cardbody"],[1,"d-flex","align-items-center","gap-3","justify-content-between","guide-flex","flex-wrap","mb
1-0"],["type","button","tooltip","Guide","placement","top",1,"btn","step_guide",3,"click"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],[4,"ngFor","ngForOf"],[1,"bg-white","flow-cardfooter","w-100","border-top","mt-0"],["type","button",1,"f-button","btn","w-100","add-more-flow","btn-primary","py-3",3,"click"],["type","button",1,"btn","f-button","justify-content-between"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none",3,"click"],["d","M3 6H21M19 6V20C19 21 18 22 17 22H7C6 22 5 21 5 20V6M8 6V4C8 3 9 2 10 2H14C15 2 16 3 16 4V6M10 11V17M14 11V17","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"zoom-buttons"],["type","button",1,"f-button","btn","p-1","border-0","bg-white"],["d","M9.09 9C9.3251 8.33167 9.78915 7.76811 10.4 7.40913C11.0108 7.05016 11.7289 6.91894 12.4272 7.03871C13.1255 7.15849 13.7588 7.52152 14.2151 8.06353C14.6713 8.60553 14.9211 9.29152 14.92 10C14.92 12 11.92 13 11.92 13M12 17H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["id","dismiss_checklist",1,"dismiss-checklist"],[1,"dismiss-header"],[1,"middle-dismiss"],[1,"liststep"],[1,"dismiss-label"],["type","checkbox","checked","checked"],[1,"checkmark"],["type","checkbox"],["href","javascript:void(0);","id","dismiss_btn_checklist",1,"link-btn"],["type","button","id","dismiss_btn",1,"btn","dismiss_btn"],["src","assets/images/dismiss_icon.png","alt","dismiss_icon"]],template:function(t,e){1&t&&(o.YNc(0,QA,9,0,"div",0),o.YNc(1,lZ,29,18,"div",1),o.TgZ(2,"aside",2),o.TgZ(3,"nav",3),o.TgZ(4,"ul",4),o.TgZ(5,"li"),o.TgZ(6,"a",5),o.NdJ("click",function(){return e.navigateToConnects()}),o._UZ(7,"img",6),o.qZA(),o.qZA(),o.TgZ(8,"li",7),o.TgZ(9,"a",8),o.NdJ("click",function(){return e.navigateToConnects("/customeditor/fresh/app/newNode")}),o.O4$(),o.TgZ(10,"svg",9),o._UZ(11,"path",10),o._UZ(12,"path",11),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"span",12),o._uU(14,"Create Connect"),o.qZA(),o.qZA(),o.TgZ(15,"li"),o.TgZ(16,"a",13),o.NdJ("click",function(){return e.navigateToConnects("/connects")}),o.O4$(),o.TgZ(17,"svg",14),o._UZ(18,"defs"),o.TgZ(19,"g",15),o._UZ(20,"path",16),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(21,"span",12),o._uU(22,"My Loops"),o.qZA(),o.qZA(),o.TgZ(23,"li"),o.TgZ(24,"a",17),o.O4$(),o.TgZ(25,"svg",18),o._UZ(26,"path",19),o.qZA(),o.qZA(),o.kcU(),o.TgZ(27,"span",12),o._uU(28,"My Agents"),o.qZA(),o.qZA(),o.TgZ(29,"li"),o.TgZ(30,"a",20),o.NdJ("click",function(){return e.navigateToConnects("/history")}),o.O4$(),o.TgZ(31,"svg",21),o._UZ(32,"path",22),o._UZ(33,"path",23),o._UZ(34,"path",24),o.qZA(),o.qZA(),o.kcU(),o.TgZ(35,"span",12),o._uU(36,"Task History"),o.qZA(),o.qZA(),o.TgZ(37,"li"),o.TgZ(38,"a",25),o.NdJ("click",function(){return e.navigateToConnects("/authorizations")}),o.O4$(),o.TgZ(39,"svg",26),o._UZ(40,"path",27),o._UZ(41,"path",28),o._UZ(42,"path",29),o._UZ(43,"path",30),o._UZ(44,"path",31),o._UZ(45,"path",32),o.qZA(),o.qZA(),o.kcU(),o.TgZ(46,"span",12),o._uU(47,"Linked A
1ccounts"),o.qZA(),o.qZA(),o.TgZ(48,"li"),o.TgZ(49,"a",33),o.NdJ("click",function(){return e.navigateToConnects("/mcp")}),o.TgZ(50,"span",34),o.O4$(),o.TgZ(51,"svg",35),o._UZ(52,"path",36),o._UZ(53,"path",37),o._UZ(54,"path",38),o._UZ(55,"path",39),o.qZA(),o.qZA(),o.kcU(),o.TgZ(56,"span",12),o._uU(57,"MCP"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(58,"li"),o.TgZ(59,"a",40),o.NdJ("click",function(){return e.navigateToConnects("/tools")}),o.TgZ(60,"span",34),o.O4$(),o.TgZ(61,"svg",41),o._UZ(62,"path",42),o.qZA(),o.qZA(),o.kcU(),o.TgZ(63,"span",12),o._uU(64,"Tools"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(65,"li"),o.TgZ(66,"a",43),o.O4$(),o.TgZ(67,"svg",21),o._UZ(68,"path",44),o._UZ(69,"path",45),o._UZ(70,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(71,"span",12),o._uU(72,"Help"),o.qZA(),o.qZA(),o.YNc(73,dZ,7,0,"li",47),o.TgZ(74,"li"),o.TgZ(75,"a",48),o.NdJ("click",function(){return e.navigateToConnects("/folders")}),o.O4$(),o.TgZ(76,"svg",49),o._UZ(77,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(78,"span",12),o._uU(79,"Folders"),o.qZA(),o.qZA(),o.TgZ(80,"li"),o.TgZ(81,"a",51),o.O4$(),o.TgZ(82,"svg",49),o._UZ(83,"path",52),o._UZ(84,"path",53),o.qZA(),o.qZA(),o.kcU(),o.TgZ(85,"span",12),o._uU(86,"Email Templates"),o.qZA(),o.qZA(),o.YNc(87,uZ,9,0,"li",54),o.qZA(),o.qZA(),o.qZA(),o.TgZ(88,"div",55),o.YNc(89,pZ,20,2,"div",56),o.TgZ(90,"div",57),o.TgZ(91,"f-flow",58,59),o.NdJ("fLoaded",function(){return e.onLoaded()})("fSelectionChange",function(t){return e.onSelectionChange(t)})("fCreateConnection",function(t){return e.onConnectionDropped(t)}),o.TgZ(93,"f-background",60),o._UZ(94,"f-circle-pattern"),o.qZA(),o.TgZ(95,"f-canvas",61,62),o.NdJ("fCanvasChange",function(t){return e.onZoomLevelChange(t)}),o.YNc(97,fZ,13,29,"f-connection",63),o.YNc(98,dk,21,27,"div",64),o.qZA(),o.qZA(),o.qZA(),o.YNc(99,yk,21,9,"div",65),o.YNc(100,Rk,25,8,"div",65),o.YNc(101,AO,14,14,"section",66),o.YNc(102,TO,6,3,"div",67),o.YNc(103,MO,18,1,"div",68),o.TgZ(104,"div",69),o.TgZ(105,"div",70),o.TgZ(106,"button",71),o.NdJ("click",function(){return e.onZoomOut()}),o.O4$(),o.TgZ(107,"svg",72),o._UZ(108,"path",73),o.qZA(),o.qZA(),o.kcU(),o.TgZ(109,"span"),o._uU(110),o.qZA(),o.TgZ(111,"button",71),o.NdJ("click",function(){return e.onZoomIn()}),o.O4$(),o.TgZ(112,"svg",72),o._UZ(113,"path",74),o.qZA(),o.qZA(),o.qZA(),o.YNc(114,IO,4,0,"div",75),o.qZA(),o.kcU(),o.TgZ(115,"div",76),o.TgZ(116,"button",77),o.NdJ("click",function(){return e.resetConnectGraph()}),o.O4$(),o.TgZ(117,"svg",78),o._UZ(118,"path",79),o._UZ(119,"path",80),o._UZ(120,"path",81),o._UZ(121,"path",82),o._UZ(122,"path",83),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o._UZ(123,"app-call-agent",84),o.YNc(124,SO,1,0,"app-loader",47),o.YNc(125,PO,31,0,"div",85),o.YNc(126,NO,2,0,"button",86),o._UZ(127,"app-user-guide"),o.TgZ(128,"button",87),o.NdJ("click",function(){return e.toggleCopilot()}),o.O4$(),o.TgZ(129,"svg",88),o._UZ(130,"path",89),o.qZA(),o.qZA(),o.kcU(),o.TgZ(131,"app-appypie-copilot",90),o.NdJ("closeCopilot",function(){return e.closeCopilot()})("appSetupComplete",function(t){return e.onCopilotAppSetup(t)})("addNodeRequest",function(t){return e.onCopilotAddNode(t)})("addFlowRequest",function(t){return e.onCopilotAddFlow(t)})("addAIAgentRequest",function(t){return e.onCopilotAddAIAgent(t)})("deleteNodeRequest",function(t){return e.onCopilotDeleteNode(t)})("renameConnectRequest",function(t){return e.onCopilotRenameConnect(t)})("activateConnectRequest",function(t){return e.onCopilotActivateConnect(t)})("addNodeNoteRequest",function(t){return e.onCopilotAddNodeNote(t)})("navigateToNodeRequest",function(t){return e.onCopilotNavigateToNode(t)})("runTestRequest",function(t){return e.onCopilotRunTest(t)})("mapFieldsRequest",function(t){return e.onCopilotMapFields(t)})("setFieldMappingRequest",function(t){return e.onCopilotSetFieldMapping(t)})("clearFieldMappingRequest",function(t){return e.onCopilotClearFieldMapping(t)})("showCurrentMappingRequest",function(t){return e.onCopilotShowCurrentMapping(t)})("listFieldOptionsRequest",function(t){return e.onCopilotListFieldOptions(t)})("setFilterConditionRequest",function(t){return e.onCopilotSetFilterCondition(t)})("bookExpertRequest",function(){return e.openBookExpertAssistancePop()})("accountConnected",function(){return e.getUserConnectData()}),o.qZA()),2&t&&(o.Q6J("ngIf",!e.bookExpert&&"jc0fgwefcky2"!==e.currentUser.planId&&!e.triggerTestFailStatus&&e.errorCount<2&&!e.appointmentBookingCheckStatus),o.xp6(1),o.Q6J("ngIf",e.translation&&e.connectList&&(e.connectList[0]||e.connectList[1])),o.xp6(1),o.Q6J("ngClass",o.VKq(31,qO,!e.bookExpert&&!e.bookExpertIcon)),o.xp6(71),o.Q6J("ngIf",!(null!=e.currentUser&&e.currentUser.isSubUser)),o.xp6(14),o.Q6J("ngIf",e.showButtonCall),o.xp6(1),o.Q6J("ngClass",o.VKq(33,UO,!e.bookExpert&&!e.bookExpertIcon)),o.xp6(1),o.Q6J("ngIf",e.isConnectCanvasLoading),o.xp6(1),o.Q6J("ngClass",o.VKq(35,EO,e.showCopilot)),o.xp6(5),o.Q6J("fZoom",!0),o.xp6(2),o.Q6J("ngForOf",e.connections)("ngForTrackBy",e.trackByConnectionId),o.xp6(1),o.Q6J("ngForOf",e.nodes)("ngForTrackBy",e.trackByNodeId),o.xp6(1),o.Q6J("ngIf",e.chatModelContainer),o.xp6(1),o.Q6J("ngIf",e.chatToolContainer),o.xp6(1),o.Q6J("ngIf",e.AppBranching&&e.currentApp),o.xp6(1),o.Q6J("ngIf",e.currentApp),o.xp6(1),o.Q6J("ngIf",e.flowToolbarMenu),o.xp6(7),o.hij("",e.zoomLevel,"%"),o.xp6(4),o.Q6J("ngIf",!1),o.xp6(2),o.Q6J("disabled",!e.canResetFlowView),o.xp6(7),o.Q6J("showButtonCall",e.showButtonCall),o.xp6(1),o.Q6J("ngIf",e.testloader),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(2),o.Q6J("ngClass",o.VKq(37,FZ,e.showCopilot)),o.xp6(3),o.Q6J("isOpen",e.showCopilot)("currentUser",e.currentUser)("currentApp",e.currentApp)("connectList",e.connectList)("showConnectsRail",!0))},styles:["@keyframes rp-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.rp-sk-title[_ngcontent-%COMP%], .rp-sk-line[_ngcontent-%COMP%], .rp-sk-app-icon[_ngcontent-%COMP%]{display:block;background:linear-gradient(90deg,#e8e8e8 25%,#f0f0f0 50%,#e8e8e8 75%);background-size:200% 100%;animation:rp-shimmer 1.4s infinite;border-radius:6px}.rp-sk-title[_ngcontent-%COMP%]{width:130px;height:20px;border-radius:4px}.rp-sk-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px;padding:20px 16px}.rp-sk-app-row[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;margin-bottom:8px}.rp-sk-app-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:10px;flex-shrink:0}.rp-sk-app-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:6px;gap:6px;flex:1}.rp-sk-line[_ngcontent-%COMP%]{width:100%;height:34px;border-radius:6px}.rp-sk-line-label[_ngcontent-%COMP%]{height:12px;width:70px}.rp-sk-line-md[_ngcontent-%COMP%]{height:14px;width:120px}.rp-sk-line-sm[_ngcontent-%COMP%]{height:11px;width:80px}.rp-sk-line-full[_ngcontent-%COMP%]{width:100%}.rp-sk-line-tall[_ngcontent-%COMP%]{height:68px}.class-appselected-step1[_ngcontent-%COMP%]{top:70px;right:20%}.class-2appselected-step1[_ngcontent-%COMP%]{top:5px;right:20%}.class-appNotSelected-step1[_ngcontent-%COMP%]{top:70px;left:230px}.class-2appselected-step2[_ngcontent-%COMP%]{left:55%;top:0px}.class-appselected-step2[_ngcontent-%COMP%]{right:20%;top:0px}.app-preview-options-column[_ngcontent-%COMP%]{width:100%;margin-top:15px}.preview-width[_ngcontent-%COMP%]{max-width:100%!important}.edit[_ngcontent-%COMP%]{text-align:right}.editconnect-btn[_ngcontent-%COMP%]{width:375px!important;display:flex;padding:13px 12px;justify-content:center;align-items:center;grid-gap:10px;gap:10px;border-radius:8px;background:#5371FF;font-weight:400;font-size:14px;line-height:20px;color:#fff}.editconnect-btn[_ngcontent-%COMP%]:hover, .editconnect-btn[_ngcontent-%COMP%]:focus{opacity:.9;box-shadow:0 7px 30px -10px #96aab480}@media (max-width: 767px){.editconnect-btn[_ngcontent-%COMP%]{font-size:12px}}.dashlink-connect[_ngcontent-%COMP%]{display:flex;width:100%;padding:3px 15px;align-items:center}.header-site[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{width:calc(100% - 70px);z-index:25;position:fixed;top:0;left:0;backface-visibility:hidden;display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border-bottom:1px solid #C7C8CA;margin-left:70px}.bottom-tooltip[_ngcontent-%COMP%]:after{right:0;transform:translate(5%);background-color:#989898;min-width:-moz-max-content;min-width:max-content;left:auto;top:45px;padding:4px 12px;bottom:auto}.bottom-tooltip[_ngcontent-%COMP%]:before{top:35px;border-bottom-color:#989898;bottom:auto;border-top-color:transparent}.book_expert_assistance[_ngcontent-%COMP%]{background:#165ED4!important;color:#fff;position:fixed;z-index:100;font-size:clamp(11px,1vw,15px);font-weight:500;padding-top:.75rem;padding-bottom:.75rem;width:100%;top:0;left:0}.book_expert_btn[_ngcontent-%COMP%]{border-radius:9px;border:1.5px solid #FFF!important;background:#165ED4!important;color:#fff!important;font-size:15px}.book_expert_btn[_ngcontent-%COMP%]:hover{background:var(--Primary-Color);opacity:1}.top-60[_ngcontent-%COMP%]{margin-top:60px}.top-60[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{top:60px}.aside-60[_ngcontent-%COMP%]{top:60px}.asidemenu[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.asidemenu.aside-60[_ngcontent-%COMP%]{height:calc(100vh - 60px)}.editorsidebar[_ngcontent-%COMP%]   .navlist[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:10;background:#fff}.editorsidebar[_ngcontent-%COMP%]   .navlist[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:first-child:before{content:\"\";position:absolute;
1left:-12px;right:-12px;bottom:100%;height:24px;background:#fff}.editorsidebar[_ngcontent-%COMP%]   .navlist[_ngcontent-%COMP%]{padding-bottom:64px}.editorsidebar[_ngcontent-%COMP%]   .editor-create-li[_ngcontent-%COMP%]{display:none!important}.active_agent_Button[_ngcontent-%COMP%]{border-radius:8px;background:var(--Primary-Color);display:flex;padding:10px 20px;justify-content:center;align-items:center;color:#fff;font-size:15px;font-weight:400;line-height:20px;margin-left:0}.active_agent_Button[_ngcontent-%COMP%]:disabled{pointer-events:auto}.hoverTooltip[_ngcontent-%COMP%]{position:absolute;opacity:0;top:100%;color:#fff;font-size:12px;padding:6px 12px;border-radius:4px;border:1px solid #413E3E;background:#1D1D1D;font-weight:500;min-width:19em;right:0;margin-top:10px;display:inline-block;visibility:hidden;transition:all .3s ease}.active_agent_Button[_ngcontent-%COMP%]:disabled:hover + .hoverTooltip[_ngcontent-%COMP%]{opacity:1;visibility:visible}@media (max-width: 1199px){.header-navbar-fixed[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{padding:.25rem .5rem}.book_expert_assistance[_ngcontent-%COMP%]{padding:12px!important}.book_expert_btn[_ngcontent-%COMP%]{border-radius:0;background:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"21\" viewBox=\"0 0 20 21\" fill=\"none\">
1<path d=\"M4.16675 10.5H15.8334M15.8334 10.5L10.0001 4.66669M15.8334 10.5L10.0001 16.3334\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>');font-size:11px;border:0!important;padding:0 25px 0 0!important;font-weight:600!important;text-decoration:underline;background-position:right top;background-repeat:no-repeat}.book_expert_assistance[_ngcontent-%COMP%] > .mb-0.mx-auto[_ngcontent-%COMP%]{grid-gap:0px!important;gap:0px!important}.book_expert_assistance[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:11px;height:11px}.top-60[_ngcontent-%COMP%]{margin-top:47px}.top-60[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{top:47px}.active_agent_Button[_ngcontent-%COMP%]{font-size:11px;padding:6px;line-height:15px;white-space:nowrap;margin-left:0}}@media (max-width: 767px){.top-60[_ngcontent-%COMP%]{margin-top:87px}.top-60[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{top:87px}}@media screen and (max-width: 767px) and (orientation: landscape){.top-60[_ngcontent-%COMP%]{margin-top:69px}.top-60[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{top:69px}}@media screen and (min-width: 736px) and (max-width: 1199px) and (orientation: landscape){.top-60[_ngcontent-%COMP%]{margin-top:47px}.top-60[_ngcontent-%COMP%]   #header-navbar[_ngcontent-%COMP%]{top:47px}}.close-alert-btn[_ngcontent-%COMP%]{position:absolute!important;top:8px;right:8px;z-index:2}.center-container.copilot-open-shift[_ngcontent-%COMP%]{transform:translate(330px);transition:transform .3s ease}.canvas-loading-skeleton[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:60;background:#fff;background:var(--primary-bg, #fff);display:flex;flex-direction:row;align-items:stretch}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-canvas-area[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-panel[_ngcontent-%COMP%]{width:420px;max-width:34%;flex:0 0 auto;border-left:1px solid #e5e7eb;border-left:1px solid var(--border-color, #e5e7eb);background:#fff;background:var(--primary-bg, #fff);padding:26px 22px;display:flex;flex-direction:column;grid-gap:14px;gap:14px}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-panel-block[_ngcontent-%COMP%]{height:44px;border-radius:8px;background:rgba(20,23,33,.06);animation:clsPulse 1.2s ease-in-out infinite}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-panel-block.cls-tall[_ngcontent-%COMP%]{height:96px}.canvas-loading-skeleton.cls-copilot-open[_ngcontent-%COMP%]   .cls-canvas-area[_ngcontent-%COMP%]{padding-left:660px}@media (max-width: 991px){.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-panel[_ngcontent-%COMP%]{display:none}}@media (max-width: 767px){.canvas-loading-skeleton.cls-copilot-open[_ngcontent-%COMP%]   .cls-canvas-area[_ngcontent-%COMP%]{padding-left:0}}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-node[_ngcontent-%COMP%]{width:280px;border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);border-radius:10px;background:#fff;background:var(--primary-bg, #fff);box-shadow:0 2px 10px #1118270d;padding:14px 16px;display:flex;align-items:center;grid-gap:12px;gap:12px}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:8px;flex:0 0 auto;background:rgba(83,113,255,.12);animation:clsPulse 1.2s ease-in-out infinite}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-lines[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;grid-gap:8px;gap:8px}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-line[_ngcontent-%COMP%]{height:10px;border-radius:5px;background:rgba(20,23,33,.08);animation:clsPulse 1.2s ease-in-out infinite}.canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-connector[_ngcontent-%COMP%]{width:2px;height:46px;background:rgba(83,113,255,.35);animation:clsPulse 1.2s ease-in-out infinite}@keyframes clsPulse{0%,to{opacity:.55}50%{opacity:1}}.theme-dark[_ngcontent-%COMP%]   .canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-node[_ngcontent-%COMP%]{box-shadow:none}.theme-dark[_ngcontent-%COMP%]   .canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-line[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .canvas-loading-skeleton[_ngcontent-%COMP%]   .cls-panel-block[_ngcontent-%COMP%]{background:rgba(255,255,255,.1)}@media (max-width: 768px){.center-container.copilot-open-shift[_ngcontent-%COMP%]{transform:none}}.center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]{cursor:grab}.center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]:active{cursor:grabbing}.center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   .dropdown-toggle[_ngcontent-%COMP%]{cursor:default}.center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .center-container[_ngcontent-%COMP%]   f-flow[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{cursor:pointer}.node-box[_ngcontent-%COMP%]{border:1px solid transparent;border-radius:12px;background-color:#fff;padding:12px;transition:border .2s,background .2s}.selected-node[_ngcontent-%COMP%]{border:2px solid #4481f6;background-color:#f5f9ff}.note-section[_ngcontent-%COMP%]{border-top:1px solid #ccc;padding-top:6px;display:flex;align-items:flex-start;width:100%;grid-gap:4px;gap:4px}.note-wrapper[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;align-items:center}.note-text[_ngcontent-%COMP%]{overflow:hidden;color:#74748a;text-overflow:ellipsis;font-size:14px;font-style:normal;font-family:Poppins;font-weight:400;line-height:24px;display:-webkit-box;-webkit-box-orient:vertical;flex:1 0 0;margin-bottom:0;width:210px;padding:6px 8px}.note-input[_ngcontent-%COMP%]{cursor:text;width:100%;border:none;font-family:\"Poppins\",sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#74748a;padding:6px 8px;background-color:transparent;outline:none;transition:border-color .2s,background-color .2s}.note-input[_ngcontent-%COMP%]::-moz-placeholder{color:#74748a}.note-input[_ngcontent-%COMP%]::placeholder{color:#74748a}.note-input[_ngcontent-%COMP%]:hover{cursor:text}.f-selected[_ngcontent-%COMP%]   .note-input[_ngcontent-%COMP%], .f-active-node[_ngcontent-%COMP%]   .note-input[_ngcontent-%COMP%]{background-color:#f5f9ff}.f-selected[_ngcontent-%COMP%]   .note-input[_ngcontent-%COMP%]:focus, .f-active-node[_ngcontent-%COMP%]   .note-input[_ngcontent-%COMP%]:focus{background-color:#f5f9ff}.char-count[_ngcontent-%COMP%]{margin-left:8px;font-size:12px;color:#aaa;white-space:nowrap}.note-display-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:4px;gap:4px;padding:6px 8px;background-color:#f5f9ff;border-radius:6px;font-family:\"Poppins\",sans-serif;font-size:14px;color:#74748a;cursor:pointer}.note-text.expanded[_ngcontent-%COMP%]{white-space:normal;overflow:visible;display:block;line-break:anywhere}.note-text[_ngcontent-%COMP%]:not(.expanded){-webkit-line-clamp:1}.note-toggle-icon[_ngcontent-%COMP%]{width:16px;height:16px;display:flex;align-items:center;justify-content:center;margin-top:6px}html.dark[_ngcontent-%COMP%]{.header-site #header-navbar {border-bottom: 1px solid var(--border-color); background: var(--header-bg); color: var(--primary-text);};.node-box {background-color: var(--card-bg); border-color: var(--border-color); color: var(--primary-text);};.selected-node {border-color: var(--accent-color); background-color: var(--tertiary-bg);};.note-section {border-top: 1px solid var(--border-color);};.note-text {color: var(--secondary-text);};.note-input {color: var(--secondary-text); background-color: transparent;};.note-input::-moz-placeholder {color: var(--muted-text);};.note-input::placeholder {color: var(--muted-text);};.f-selected .note-input,.f-active-node .note-input {background-color: var(--tertiary-bg);};.f-selected .note-input:focus,.f-active-node .note-input:focus {background-color: var(--tertiary-bg);};.char-count {color: var(--muted-text);};.note-display-wrapper {background-color: var(--tertiary-bg); color: var(--secondary-text);};.bottom-tooltip::after {background-color: var(--secondary-bg); color: var(--primary-text);};.bottom-tooltip::before {border-bottom-color: var(--secondary-bg);};.hoverTooltip {background: var(--secondary-bg); border: 1px solid var(--border-color); color: var(--primary-text);};.editconnect-btn {background: var(--accent-color); color: var(--button-primary-text);};.book_expert_btn {background: var(--accent-color); border-color: var(--accent-color);};.active_agent_Button {background: var(--accent-color); color: var(--button-primary-text);};.center-container {background: var(--primary-bg);};.center-container f-flow {background: var(--primary-bg);};* {scrollbar-color: var(--secondary-text) var(--secondary-bg);};*::-webkit-scrollbar {background-color: var(--secondary-bg);};*::-webkit-scrollbar-track {background: var(--secondary-bg);};*::-webkit-scrollbar-thumb {background-color: var(--secondary-text); border-radius: 6px;};*::-webkit-scrollbar-thumb:hover {background-color: var(--primary-text);}}.undo-redo-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 4px 0 0}.undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;background-color:transparent;color:#6c757d;border:1px solid #dee2e6;border-radius:50%;transition:all .2s ease}.undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f8f9fa;color:#495057;border-color:#5371ff}.undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed}html.dark[_ngcontent-%COMP%]   .undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]{color:#9ca3af;border-color:#6b7280;background-color:transparent}html.dark[_ngcontent-%COMP%]   .undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#374151;color:#f9fafb;border-color:#5371ff}html.dark[_ngcontent-%COMP%]   .undo-redo-buttons[_ngcontent-%COMP%]   .undo-redo-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed}.undo-redo-toast[_ngcontent-%COMP%]{position:fixed;top:80px;left:50%;transform:translate(-50%);display:flex;align-items:center;grid-gap:8px;gap:8px;padding:10px 20px;background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 4px 16px #0000001f;z-index:10000;font-size:14px;font-weight:500;color:#333;animation:toastSlideIn .3s ease-out}html.dark[_ngcontent-%COMP%]   .undo-redo-toast[_ngcontent-%COMP%]{background:#2d2d2d;border-color:#444;color:#e0e0e0;box-shadow:0 4px 16px #0000004d}@keyframes toastSlideIn{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.copilot-btn-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 8px 0 0}
1.btn-copilot[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:6px;gap:6px;padding:8px 14px;border-radius:8px;border:1px solid #C7C8CA;border:1px solid var(--border-color, #C7C8CA);background:#fff;background:var(--body-bg, #fff);color:#374151;color:var(--body-color, #374151);font-size:14px;font-weight:500;transition:background .15s,border-color .15s}.btn-copilot[_ngcontent-%COMP%]:hover{background:#f3f4f6;background:var(--hover-bg, #f3f4f6);border-color:#5371ff;border-color:var(--Primary-Color, #5371FF);color:#5371ff;color:var(--Primary-Color, #5371FF)}.copilot-floating-btn[_ngcontent-%COMP%]{position:fixed;left:12px;bottom:14px;width:42px;height:42px;border-radius:50%;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#5371ff 0%,#8a5cff 100%);color:#fff;box-shadow:0 6px 18px #5371ff66;cursor:pointer;z-index:1050;transition:transform .2s ease,box-shadow .2s ease,background .25s ease}.copilot-floating-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{pointer-events:none;width:20px;height:20px;transition:transform .25s ease}@property --copilot-angle{syntax: \"<angle>\"; initial-value: 0deg; inherits: false;}@keyframes copilot-rotate-gradient{to{--copilot-angle: 360deg}}.copilot-floating-btn[_ngcontent-%COMP%]:hover, .copilot-floating-btn.active[_ngcontent-%COMP%]{background:conic-gradient(from var(--copilot-angle),#ff7a1a 0deg,#ff3d6e 120deg,#c63cb8 200deg,#ff3d6e 280deg,#ff7a1a 360deg);animation:copilot-rotate-gradient 3s linear infinite;box-shadow:0 10px 26px #c63cb880}.copilot-floating-btn[_ngcontent-%COMP%]:hover{transform:scale(1.08)}.copilot-floating-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #5371ff59}.copilot-floating-btn[_ngcontent-%COMP%]:after{content:attr(data-tooltip);position:absolute;left:calc(100% + 12px);top:50%;transform:translateY(-50%) translate(-6px);background:linear-gradient(135deg,#5371ff 0%,#6f5bff 100%);color:#fff;font-size:12px;font-weight:500;letter-spacing:.2px;padding:6px 12px;border-radius:8px;white-space:nowrap;box-shadow:0 6px 18px #5371ff59;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease,visibility .18s ease}.copilot-floating-btn[_ngcontent-%COMP%]:hover:after{opacity:1;visibility:visible;transform:translateY(-50%) translate(0)}.theme-toggle-custom-editor[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 12px;padding:0 4px}.theme-toggle-custom-editor[_ngcontent-%COMP%]   app-theme-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.theme-toggle-custom-editor[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{color:#6c757d}.theme-toggle-custom-editor[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]:hover{color:#495057}html.dark[_ngcontent-%COMP%]   .theme-toggle-custom-editor[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{color:#9ca3af}html.dark[_ngcontent-%COMP%]   .theme-toggle-custom-editor[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]:hover{color:#f9fafb}@media (max-width: 767px){.theme-toggle-custom-editor[_ngcontent-%COMP%]{margin:0 8px}}.ai-agent-container[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;width:100%;min-height:unset;max-width:300px;margin:0 auto}.ai-left-components[_ngcontent-%COMP%]{position:absolute;top:100%;transform:translate(-100%,-35%);display:flex;flex-direction:column;z-index:10;width:auto;left:-44px;align-items:flex-start;justify-content:flex-start;text-align:left;background:none!important}.ai-right-components[_ngcontent-%COMP%]{position:absolute;right:-295px;display:flex;flex-direction:column;justify-content:center;top:100%;transform:translate(-86%,-35%);z-index:10;width:auto;align-items:flex-end;background:none!important}.ai-main-content[_ngcontent-%COMP%]{flex:1;text-align:left;padding:0;position:relative;width:250px}.ai-agent-main-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:#f8f9ff;border-radius:8px;border:1px solid #e5e7eb}.ai-agent-main-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:32px;height:32px}.ai-sub-node[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;cursor:pointer;transition:all .2s ease;position:relative;margin-top:0}.ai-sub-node.active[_ngcontent-%COMP%]{border-width:2px;border-color:#5371ff;background:#F6F9FF}.ai-right-components.active[_ngcontent-%COMP%]   .sub-status-icon[_ngcontent-%COMP%], .ai-left-components.active[_ngcontent-%COMP%]   .sub-status-icon[_ngcontent-%COMP%]{border-color:#5371ff!important}.sub-label[_ngcontent-%COMP%]:before{content:\"\";position:absolute;top:50%;transform:translateY(-50%);z-index:0;transition:all .2s ease;border-radius:2px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='18' viewBox='0 0 84 18' fill='none'%3E%3Cpath d='M0 8.66028L8.66028 17.3205L17.3205 8.66028L8.66028 0L0 8.66028ZM83.3205 8.66027L74.6603 0L66 8.66027L74.6603 17.3205L83.3205 8.66027ZM8.66028 8.66028V10.1603H74.6603V8.66027V7.16027H8.66028V8.66028Z' fill='%235371FF'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center;background-size:contain;width:90px;height:18px}.ai-left-components[_ngcontent-%COMP%]   .ai-sub-node[_ngcontent-%COMP%]:before{right:-61.5px}.ai-right-components[_ngcontent-%COMP%]   .ai-sub-node[_ngcontent-%COMP%]:before{left:-60.5px}.sub-label[_ngcontent-%COMP%]{display:flex;font-size:10px;font-weight:600;color:#6b7280;margin-bottom:0;text-transform:uppercase;letter-spacing:.5px;z-index:1;width:84px;align-items:center;justify-content:center}.sub-status[_ngcontent-%COMP%]{font-size:11px;font-weight:500;color:#74748a;display:inline-block;max-width:120px;white-space:pre-wrap;word-break:break-word}.sub-label-text[_ngcontent-%COMP%]{background-color:#fff;z-index:1;padding:0 3px}.sub-status-icon[_ngcontent-%COMP%]{width:55px;height:55px;display:flex;align-items:center;justify-content:center;border-radius:60px;border:2px solid #d5dbe7!important;background-color:#f6f9ff!important;background-size:70% 70%;background-position:center;background-repeat:no-repeat;padding:10px;flex-shrink:0;box-sizing:border-box;overflow:hidden}.ai-sub-component-node[_ngcontent-%COMP%]{display:none!important}.ai-right-components[_ngcontent-%COMP%]   .sub-status[_ngcontent-%COMP%]{padding-right:10px}.ai-right-components[_ngcontent-%COMP%]   .sub-status.configured[_ngcontent-%COMP%]{padding:0}.ai-left-components[_ngcontent-%COMP%]   .sub-status[_ngcontent-%COMP%]{padding-left:10px}.ai-left-components[_ngcontent-%COMP%]   .sub-status.configured[_ngcontent-%COMP%]{padding:0}.f-node[_ngcontent-%COMP%]:has(.ai-agent-container){min-width:320px!important;max-width:350px!important}.language-models-panel[_ngcontent-%COMP%]{padding:20px 5px 20px 0;background:#ffffff;height:100%;overflow-y:auto;position:relative;z-index:1000;width:100%}.language-models-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{border-bottom:1px solid #e5e7eb;padding-bottom:15px;margin-bottom:20px}.language-models-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#1f2937;font-size:18px;font-weight:600;margin:0}.language-models-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#6b7280;margin:0;font-size:14px}.models-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:12px;gap:12px}.model-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:16px;border:1px solid #e5e7eb;border-radius:8px;
1cursor:pointer;transition:all .2s ease;background:#ffffff}.model-icon[_ngcontent-%COMP%]{font-size:24px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:#f9fafb;border-radius:8px;margin-right:16px}.model-info[_ngcontent-%COMP%]{flex:1}.model-info[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0 0 4px;font-size:14px;font-weight:600;color:#1f2937}.model-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#6b7280}.model-provider[_ngcontent-%COMP%]{margin-left:12px}.model-provider[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]{font-size:12px;padding:4px 8px;border-radius:4px}.memory-panel[_ngcontent-%COMP%]{padding:20px;background:#ffffff;height:100%;overflow-y:auto;position:relative;z-index:1000;width:100%}.memory-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{border-bottom:1px solid #e5e7eb;padding-bottom:15px;margin-bottom:20px}.memory-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#1f2937;font-size:24px;font-weight:600;margin:0}.memory-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#6b7280;margin:0;font-size:14px}.memory-section[_ngcontent-%COMP%]{margin-bottom:25px}.section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;padding:10px 0;border-bottom:1px solid #f3f4f6}.section-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#374151;font-size:16px;font-weight:600;margin:0}.section-header[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#9ca3af}.memory-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:12px;gap:12px}.memory-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding:16px;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#ffffff}.memory-option[_ngcontent-%COMP%]:hover{border-color:#8b5cf6;box-shadow:0 4px 12px #8b5cf626;transform:translateY(-1px)}.memory-icon[_ngcontent-%COMP%]{font-size:20px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#f9fafb;border-radius:6px;margin-right:12px;flex-shrink:0}.memory-info[_ngcontent-%COMP%]{flex:1}.memory-info[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:0 0 4px;font-size:15px;font-weight:600;color:#1f2937}.memory-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#6b7280;line-height:1.4}.tools-panel[_ngcontent-%COMP%]{padding:20px;background:#ffffff;height:100%;overflow-y:auto;position:relative;z-index:1000;width:100%}.tools-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{border-bottom:1px solid #e5e7eb;padding-bottom:15px;margin-bottom:20px}.tools-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#1f2937;font-size:24px;font-weight:600;margin:0 0 10px}.search-input[_ngcontent-%COMP%]{border:1px solid #d1d5db;border-radius:6px;padding:8px 12px;font-size:14px;width:100%;max-width:300px}.search-input[_ngcontent-%COMP%]::-moz-placeholder{color:#9ca3af}.search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.tools-section[_ngcontent-%COMP%]{margin-bottom:25px}.tools-section[_ngcontent-%COMP%]   .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;padding:10px 0;border-bottom:1px solid #f3f4f6}.tools-section[_ngcontent-%COMP%]   .section-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#374151;font-size:16px;font-weight:600;margin:0}.tools-section[_ngcontent-%COMP%]   .section-header[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#9ca3af}.tools-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:8px;gap:8px}.tool-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding:12px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;transition:all .2s ease;background:#ffffff}.tool-option[_ngcontent-%COMP%]:hover{border-color:#8b5cf6;box-shadow:0 2px 8px #8b5cf626;transform:translateY(-1px)}.tool-icon[_ngcontent-%COMP%]{font-size:18px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:#f9fafb;border-radius:6px;margin-right:12px;flex-shrink:0}.tool-info[_ngcontent-%COMP%]{flex:1}
1.tool-info[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:0 0 3px;font-size:14px;font-weight:600;color:#1f2937}.tool-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#6b7280;line-height:1.3}.ai-sub-node[_ngcontent-%COMP%]:active{transform:translateY(1px)}.ai-agent-simple-panel[_ngcontent-%COMP%]{position:fixed;top:0;right:0;width:400px;height:100vh;background:#fff;border-left:1px solid #e0e0e0;z-index:1000;overflow-y:auto;box-shadow:-2px 0 10px #0000001a}.ai-agent-simple-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{padding:20px;border-bottom:1px solid #e0e0e0;background:#f8f9fa}.ai-agent-simple-panel[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{color:#333;font-size:18px;font-weight:600}.ai-agent-simple-panel[_ngcontent-%COMP%]   .ai-agent-content[_ngcontent-%COMP%]{padding:20px}.ai-agent-simple-panel[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{margin-bottom:20px}.ai-agent-simple-panel[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;font-weight:500;color:#333;font-size:14px}.ai-agent-simple-panel[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{width:100%;padding:12px;border:1px solid #ddd;border-radius:6px;font-size:14px;transition:border-color .2s ease;resize:vertical}.ai-agent-simple-panel[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{outline:none;border-color:#5371ff;box-shadow:0 0 0 2px #5371ff1a}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{font-size:14px;font-weight:500;padding:10px 20px;border-radius:6px;transition:all .2s ease}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-primary[_ngcontent-%COMP%]{background:#5371FF;border-color:#5371ff;color:#fff}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-primary[_ngcontent-%COMP%]:hover{background:#4a63e6;border-color:#4a63e6}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-success[_ngcontent-%COMP%]{background:#28a745;border-color:#28a745;color:#fff}.tool-selection-panel[_ngcontent-%COMP%]   .tool-remove-btn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#dc3545;font-size:14px}.tool-selection-panel[_ngcontent-%COMP%]   .tool-remove-btn[_ngcontent-%COMP%]{padding:0 4px;line-height:1}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-success[_ngcontent-%COMP%]:hover{background:#218838;border-color:#218838}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-outline-secondary[_ngcontent-%COMP%]{background:transparent;border-color:#6c757d;color:#6c757d}.ai-agent-simple-panel[_ngcontent-%COMP%]   .btn-outline-secondary[_ngcontent-%COMP%]:hover{background:#6c757d;border-color:#6c757d;color:#fff}.ai-agent-simple-panel[_ngcontent-%COMP%]   .d-flex.gap-2[_ngcontent-%COMP%]{grid-gap:10px;gap:10px}@media (max-width: 768px){.ai-agent-simple-panel[_ngcontent-%COMP%]{width:100%;right:0}}.chat-model-container[_ngcontent-%COMP%]{position:relative;width:400px;background:#fff;z-index:1;height:calc(100dvh - 70px);overflow-y:auto;border-left:1px solid var(--cc-border-color);scrollbar-width:none;cursor:unset;max-width:100%;display:flex;flex-direction:column}.continueBtn[_ngcontent-%COMP%]{font-size:14px;padding:12px;background-color:#3d70f3;border:1px solid #3D70F3;color:#fff;font-weight:400;transition:box-shadow .3s ease-in-out 0s;border-radius:8px;width:100%}.continueBtn[_ngcontent-%COMP%]:hover, .continueBtn[_ngcontent-%COMP%]:focus{background-color:var(--Primary-Color);color:#fff;box-shadow:0 .5rem 1rem #00000026}.chat-model-footer[_ngcontent-%COMP%], .chat-model-header[_ngcontent-%COMP%]{flex-shrink:0}.chat-model-body[_ngcontent-%COMP%]{overflow-y:auto;flex:1}.chat-model-content[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{font-size:12px;margin-bottom:5px;font-weight:600;color:var(--cc-text-color)}.chat-model-content[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   sup[_ngcontent-%COMP%]{color:#d26a5c;font-size:16px;display:inline-block;top:0;position:inherit}.menu.active[_ngcontent-%COMP%]{border-color:#0077f4;z-index:1}.menu.active[_ngcontent-%COMP%]   .menu_dropdown[_ngcontent-%COMP%]{margin-top:5px}.menu_container[_ngcontent-%COMP%] > .menu[_ngcontent-%COMP%]:after{content:\"\";width:1rem;height:1.3rem;margin-top:0;position:absolute;right:10px;top:15px;z-index:0;background-repeat:no-repeat;background-size:contain;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='20' viewBox='0 0 11 20' fill='none'%3E%3Cpath d='M1.11133 6.44444L5.55577 2L10.0002 6.44444' stroke='%23BDB5B5' stroke-width='2'/%3E%3Cpath d='M1.11133 13.5556L5.55577 18L10.0002 13.5556' stroke='%23BDB5B5' stroke-width='2'/%3E%3C/svg%3E\");background-position:center}.ai-left-components.active[_ngcontent-%COMP%] > .ai-sub-node[_ngcontent-%COMP%], .ai-right-components.active[_ngcontent-%COMP%] > .ai-sub-node[_ngcontent-%COMP%]{border-color:#8b5cf6}.chat-model-content[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%] > .form-control[_ngcontent-%COMP%]{border-radius:8px;font-size:14px;height:50px}.talk-expert[_ngcontent-%COMP%]   .custom_tooltip[_ngcontent-%COMP%]{min-width:11em;transform:translate(134px,-50%)}.user-management-tooltip[_ngcontent-%COMP%]{transform:translate(145px,-50%);min-width:12em}","[_ngcontent-%COMP%]:root{--background-element-color: rgba(0, 0, 0, .1);--selection-area-color: rgba(100, 108, 255, .14);--disabled-color: #e2e2e2;--node-background-color: #ffffff;--node-border-radius: 2px;--node-border-color: rgba(60, 60, 67, .36);--node-selected-border-color: #5371FF;--node-color: rgba(60, 60, 67, .78);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: rgba(60, 60, 67, .78);--snap-connection-color: rgba(60, 60, 67, .38);--connection-gradient-1: #5371FF;--connection-gradient-2: #74748A;
1--outlet-color: #5371FF;--input-output-color: rgba(60, 60, 67, .78);--minimap-background-color: #ffffff;--minimap-node-color: rgba(60, 60, 67);--minimap-node-selected-color: #5371FF;--minimap-view-color: rgba(100, 108, 255, .14);--primary-bg: #ffffff;--secondary-bg: #f8f9fa;--tertiary-bg: #f1f3f4;--primary-text: #212529;--secondary-text: #6c757d;--muted-text: #9ca3af;--border-color: #dee2e6;--border-light: #e9ecef;--border-dark: #adb5bd;--accent-color: #5371FF;--accent-hover: #4157d1;--success-color: #28a745;--danger-color: #dc3545;--warning-color: #ffc107;--info-color: #17a2b8;--shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);--shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);--shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);--header-bg: #ffffff;--sidebar-bg: #f8f9fa;--card-bg: #ffffff;--input-bg: #ffffff;--input-border: #ced4da;--input-focus-border: #5371FF;--button-primary-bg: #5371FF;--button-primary-text: #ffffff;--button-secondary-bg: #6c757d;--button-secondary-text: #ffffff;--modal-bg: #ffffff;--modal-backdrop: rgba(0, 0, 0, .5);--dropdown-bg: #ffffff;--dropdown-border: #dee2e6;--dropdown-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);--table-bg: #ffffff;--table-stripe-bg: #f8f9fa;--table-border: #dee2e6;--navbar-brand-color: #212529;--navbar-text-color: #6c757d;--scrollbar-track: #f1f1f1;--scrollbar-thumb: #c1c1c1;--scrollbar-thumb-hover: #a8a8a8;--form-field-text-color: var(--node-color);--form-field-background: var(--minimap-view-color);--form-field-panel-shadow: var(--shadow);--form-field-panel-background: var(--node-background-color);--form-field-active-color: var(--minimap-node-selected-color)}html.dark[_ngcontent-%COMP%]{--background-element-color: rgba(255, 255, 255, .1);--selection-area-color: rgba(100, 108, 255, .16);--disabled-color: #2c2c2e;--node-background-color: #1e1e1e;--node-border-radius: 2px;--node-border-color: rgba(235, 235, 245, .38);--node-selected-border-color: #a8b1ff;--node-color: rgba(235, 235, 245, .6);--node-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .4);--connection-color: rgba(235, 235, 245, .6);--snap-connection-color: rgba(235, 235, 245, .2);--connection-gradient-1: #5371FF;--connection-gradient-2: #74748A;--outlet-color: #a8b1ff;--input-output-color: rgba(235, 235, 245, .6);--minimap-background-color: #1b1b1f;--minimap-node-color: rgba(255, 255, 245, .86);--minimap-node-selected-color: #a8b1ff;--minimap-view-color: rgba(100, 108, 255, .16);--primary-bg: #0d1117;--secondary-bg: #161b22;--tertiary-bg: #21262d;--primary-text: #f0f6fc;--secondary-text: #7d8590;--muted-text: #656d76;--border-color: #30363d;--border-light: #21262d;--border-dark: #484f58;--accent-color: #6c82ff;--accent-hover: #5568e8;--success-color: #238636;--danger-color: #da3633;--warning-color: #9e6a03;--info-color: #0969da;--shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .3);--shadow: 0 .5rem 1rem rgba(0, 0, 0, .4);--shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .5);--header-bg: #161b22;--sidebar-bg: #0d1117;--card-bg: #161b22;--input-bg: #0d1117;--input-border: #30363d;--input-focus-border: #6c82ff;--button-primary-bg: #6c82ff;--button-primary-text: #ffffff;--button-secondary-bg: #30363d;--button-secondary-text: #f0f6fc;--modal-bg: #161b22;--modal-backdrop: rgba(0, 0, 0, .8);--dropdown-bg: #161b22;--dropdown-border: #30363d;--dropdown-shadow: 0 .5rem 1rem rgba(0, 0, 0, .6);--table-bg: #161b22;--table-stripe-bg: #21262d;--table-border: #30363d;--navbar-brand-color: #f0f6fc;--navbar-text-color: #7d8590;--scrollbar-track: #21262d;--scrollbar-thumb: #484f58;--scrollbar-thumb-hover: #656d76}body[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--primary-bg);color:#212529;color:var(--primary-text);transition:background-color .3s ease,color .3s ease}.card[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--card-bg);border-color:#dee2e6;border-color:var(--border-color);box-shadow:0 .125rem .25rem #00000013;box-shadow:var(--shadow-sm)}.btn-primary[_ngcontent-%COMP%]{background-color:#5371ff;background-color:var(--button-primary-bg);border-color:#5371ff;border-color:var(--button-primary-bg);color:#fff;color:var(--button-primary-text)}.btn-primary[_ngcontent-%COMP%]:hover{background-color:#4157d1;background-color:var(--accent-hover);border-color:#4157d1;border-color:var(--accent-hover)}.btn-secondary[_ngcontent-%COMP%]{background-color:#6c757d;background-color:var(--button-secondary-bg);border-color:#6c757d;border-color:var(--button-secondary-bg);color:#fff;color:var(--button-secondary-text)}.form-control[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--input-bg);border-color:#ced4da;border-color:var(--input-border);color:#212529;color:var(--primary-text)}.form-control[_ngcontent-%COMP%]:focus{border-color:#5371ff;border-color:var(--input-focus-border);box-shadow:0 0 0 .2rem #5371ff40}.modal-content[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--modal-bg);color:#212529;color:var(--primary-text)}.dropdown-menu[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--dropdown-bg);border-color:#dee2e6;border-color:var(--dropdown-border);box-shadow:0 .5rem 1rem #00000026;box-shadow:var(--dropdown-shadow)}.table[_ngcontent-%COMP%]{background-color:#fff;background-color:var(--table-bg);color:#212529;color:var(--primary-text)}.table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-color:#dee2e6;border-color:var(--table-border)}.table[_ngcontent-%COMP%]   .table-striped[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-of-type(odd){background-color:#f8f9fa;background-color:var(--table-stripe-bg)}[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;background:var(--scrollbar-track)}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#c1c1c1;background:var(--scrollbar-thumb);border-radius:4px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#a8a8a8;background:var(--scrollbar-thumb-hover)}.text-primary-themed[_ngcontent-%COMP%]{color:#212529!important;color:var(--primary-text)!important}.text-secondary-themed[_ngcontent-%COMP%]{color:#6c757d!important;color:var(--secondary-text)!important}.text-muted-themed[_ngcontent-%COMP%]{color:#9ca3af!important;color:var(--muted-text)!important}.bg-primary-themed[_ngcontent-%COMP%]{background-color:#fff!important;background-color:var(--primary-bg)!important}.bg-secondary-themed[_ngcontent-%COMP%]{background-color:#f8f9fa!important;background-color:var(--secondary-bg)!important}.bg-card-themed[_ngcontent-%COMP%]{background-color:#fff!important;background-color:var(--card-bg)!important}.border-themed[_ngcontent-%COMP%]{border-color:#dee2e6!important;border-color:var(--border-color)!important}.border-light-themed[_ngcontent-%COMP%]{border-color:#e9ecef!important;border-color:var(--border-light)!important}  app-custom-editor .f-connection .f-connection-drag-handle{fill:none;stroke:none}  app-custom-editor .f-connection .f-connection-selection{fill:none;stroke-width:20}  app-custom-editor .f-connection .f-connection-path{fill:none;stroke-width:2}  app-custom-editor .f-connection:not(.gradient-color) .f-connection-path{stroke:var(--Primary-Color);stroke-width:2}  app-custom-editor .f-background line{stroke:#0000001a;stroke:var(--background-element-color)}  app-custom-editor .f-background circle{fill:#0000001a;
1fill:var(--background-element-color)}.f-node[_ngcontent-%COMP%]{width:350px;padding:.5rem;height:auto;border-radius:10px;border:2px solid #D5DBE7;background:#fff;color:#1d1d1d;cursor:move}.f-node[_ngcontent-%COMP%]:active{box-shadow:0 1px 2px #0000000a,0 1px 2px #0000000f;box-shadow:var(--node-shadow);border-radius:10px;border:2px solid #5371FF;background:#F6F9FF}.f-node[fDragHandle][_ngcontent-%COMP%]{cursor:pointer}.f-node[fDragHandle][_ngcontent-%COMP%]:hover{cursor:pointer}.f-node[fDragHandle][_ngcontent-%COMP%]:active{cursor:grabbing}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node), .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node){position:absolute;width:30px;height:30px;border-radius:50%;border:.2px solid rgba(60,60,67,.36);border:.2px solid var(--node-border-color);background-color:#fff;background-color:var(--node-background-color)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).left, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).left{left:-8px;top:50%;transform:translateY(-50%)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).right, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).right{right:-8px;top:50%;transform:translateY(-50%)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).top, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).top{top:-8px;left:50%;transform:translate(-50%)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).top-left, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).top-left{top:-8px;left:-8px}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).top-right, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).top-right{top:-8px;right:-8px}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).bottom, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).bottom{bottom:-45px;left:50%;transform:translate(-50%)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).bottom-left, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).bottom-left{bottom:-8px;left:-8px}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).bottom-right, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).bottom-right{bottom:-8px;right:-8px}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).f-node-output-not-connectable, .f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node).f-node-input-not-connectable, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).f-node-output-not-connectable, .f-node[_ngcontent-%COMP%]   .f-node-output[_ngcontent-%COMP%]:not(.f-node).f-node-input-not-connectable{background-color:#e2e2e2;background-color:var(--disabled-color)}.f-node[_ngcontent-%COMP%]   .f-node-input[_ngcontent-%COMP%]:not(.f-node){border-radius:4px}.toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;grid-gap:8px;gap:8px;position:absolute;right:16px;top:16px}.toolbar[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:500;border:none;border-radius:2px;padding:4px 8px;line-height:normal}.branch_wrapper[_ngcontent-%COMP%]{position:absolute;top:80px;left:275px;max-width:400px;width:100%;height:auto;display:flex;flex-direction:column;align-items:flex-start;border-radius:8px;border:1.2px solid #D5DBE7;background:#ffffff;background:var(--card-bg);z-index:1;max-height:800px;overflow-y:auto;padding:1rem;font-size:14px;color:#212529;color:var(--primary-text);scroll-behavior:smooth;scrollbar-width:none}.center-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;width:100%;overflow:hidden;flex:1;min-width:0;max-width:100%}.node-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{flex:0 0 auto;width:28px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.node-item[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:16px;font-weight:500}.node-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:var(--Primary-Color);font-size:14px;font-style:normal;font-weight:400;line-height:20px}.trigger-action-event[_ngcontent-%COMP%]{font-size:13px;color:#74748a;border-top:1px solid #D5DBE7}.center-btn[_ngcontent-%COMP%]{position:absolute!important;transform:translate(-50%,100%)!important;top:100%;left:50%}.button-blinking[_ngcontent-%COMP%] > .center-btn[_ngcontent-%COMP%]{animation:pulseBlink 1.5s infinite;overflow:hidden}@keyframes pulseBlink{0%{transform:scale(1);box-shadow:0 0 #5371ffcc;opacity:1}50%{transform:scale(1.15);box-shadow:0 0 0 15px #5371ff00;opacity:.9}to{transform:scale(1);box-shadow:0 0 #5371ff00;opacity:1}}@keyframes iconZoomSoft{0%,to{transform:scale(1)}50%{transform:scale(1.25)}}.button-blinking[_ngcontent-%COMP%] > .center-btn[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{animation:iconZoomSoft 1.6s ease-in-out infinite}.node-plusbtn[_ngcontent-%COMP%], .center-btn[_ngcontent-%COMP%]{width:30px;height:30px;display:flex;justify-content:center;align-items:center;background-color:#5371ff!important;color:#fff;border:none;z-index:10;padding:0;outline-offset:0px;outline-width:4px;outline-style:solid;outline-color:#fafafa;font-size:20px}.f-node.f-selected[_ngcontent-%COMP%], .f-node.f-active-node[_ngcontent-%COMP%], .f-node-output-not-connectable[_ngcontent-%COMP%]{border-radius:10px;border:2px solid #D5DBE7;background:#ffffff;background:var(--card-bg)}.f-node.f-selected[_ngcontent-%COMP%], .f-node.f-active-node[_ngcontent-%COMP%]{border-width:2px;border-color:#5371ff;background:#F6F9FF}
1.f-node-error[_ngcontent-%COMP%]{border:4px solid #FE4748!important;background:#FFF6F6!important}.node-plusbtn[_ngcontent-%COMP%]:hover, .center-btn[_ngcontent-%COMP%]:hover{background-color:var(--Primary-Color);outline-color:#e7f3ff;box-shadow:0 .5rem 1rem #00000026}.blue-plus-btn[_ngcontent-%COMP%]{background-color:var(--Primary-Color)!important;border-color:var(--Primary-Color)!important;color:#fff!important}.blue-node[_ngcontent-%COMP%]{border-color:#d5dbe7}.blue-plus-btn[_ngcontent-%COMP%]:disabled{background-color:#ccd3f1!important;opacity:1}.f-node.f-not-selected[_ngcontent-%COMP%]{border-width:2px}.reset-tooltip-top[_ngcontent-%COMP%]:before{bottom:30px;border-top-color:#000;top:auto;border-bottom-color:transparent}.reset-tooltip-top[_ngcontent-%COMP%]:after{bottom:40px;top:auto;min-width:-moz-max-content;min-width:max-content}.reset-connect-graph[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none!important}.reset-connect-graph[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:disabled:hover{background-color:#fff!important;box-shadow:none!important}html.dark[_ngcontent-%COMP%]   .branch_wrapper[_ngcontent-%COMP%]{background:#ffffff;background:var(--card-bg);color:#212529;color:var(--primary-text);border-color:#dee2e6;border-color:var(--border-color)}html.dark[_ngcontent-%COMP%]   .f-node.f-selected[_ngcontent-%COMP%], html.dark[_ngcontent-%COMP%]   .f-node.f-active-node[_ngcontent-%COMP%], html.dark[_ngcontent-%COMP%]   .f-node-output-not-connectable[_ngcontent-%COMP%]{background:#ffffff;background:var(--card-bg);border-color:#dee2e6;border-color:var(--border-color)}html.dark[_ngcontent-%COMP%]   .f-node.f-selected[_ngcontent-%COMP%], html.dark[_ngcontent-%COMP%]   .f-node.f-active-node[_ngcontent-%COMP%]{border-color:#5371ff;border-color:var(--accent-color);background:#f1f3f4;background:var(--tertiary-bg)}html.dark[_ngcontent-%COMP%]   .f-node-error[_ngcontent-%COMP%]{background:#f1f3f4!important;background:var(--tertiary-bg)!important;border-color:#dc3545!important;border-color:var(--danger-color)!important}html.dark[_ngcontent-%COMP%]   .node-plusbtn[_ngcontent-%COMP%], html.dark[_ngcontent-%COMP%]   .center-btn[_ngcontent-%COMP%]{background-color:#6c757d;background-color:var(--secondary-text);outline-color:#f1f3f4;outline-color:var(--tertiary-bg)}html.dark[_ngcontent-%COMP%]   .node-plusbtn[_ngcontent-%COMP%]:hover, html.dark[_ngcontent-%COMP%]   .center-btn[_ngcontent-%COMP%]:hover{background-color:#5371ff;background-color:var(--accent-color);outline-color:#f1f3f4;outline-color:var(--tertiary-bg)}html.dark[_ngcontent-%COMP%]   .trigger-action-event[_ngcontent-%COMP%]{color:#6c757d;color:var(--secondary-text);border-top:1px solid #dee2e6;border-top:1px solid var(--border-color)}html.dark[_ngcontent-%COMP%]   .node-item[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#212529;color:var(--primary-text)}html.dark[_ngcontent-%COMP%]   .node-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#5371ff;color:var(--accent-color)}html.dark[_ngcontent-%COMP%]   .blue-node[_ngcontent-%COMP%]{border-color:#dee2e6;border-color:var(--border-color)}html.dark[_ngcontent-%COMP%]   .reset-tooltip-top[_ngcontent-%COMP%]:before{border-top-color:#212529;border-top-color:var(--primary-text)}.theme-dark[_ngcontent-%COMP%]   .branch_wrapper[_ngcontent-%COMP%]{background:#ffffff!important;background:var(--card-bg)!important;color:#212529!important;color:var(--primary-text)!important;border-color:#dee2e6!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .f-node.f-selected[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .f-node.f-active-node[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .f-node-output-not-connectable[_ngcontent-%COMP%]{background:#ffffff!important;background:var(--card-bg)!important;border-color:#dee2e6!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .f-node.f-selected[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .f-node.f-active-node[_ngcontent-%COMP%]{border-color:#5371ff!important;border-color:var(--accent-color)!important;background:#f1f3f4!important;background:var(--tertiary-bg)!important}.theme-dark[_ngcontent-%COMP%]   .f-node-error[_ngcontent-%COMP%]{background:#f1f3f4!important;background:var(--tertiary-bg)!important;border-color:#dc3545!important;border-color:var(--danger-color)!important}.theme-dark[_ngcontent-%COMP%]   .node-plusbtn[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .center-btn[_ngcontent-%COMP%]{background-color:#6c757d!important;background-color:var(--secondary-text)!important;outline-color:#f1f3f4!important;outline-color:var(--tertiary-bg)!important}.theme-dark[_ngcontent-%COMP%]   .node-plusbtn[_ngcontent-%COMP%]:hover, .theme-dark[_ngcontent-%COMP%]   .center-btn[_ngcontent-%COMP%]:hover{background-color:#5371ff!important;background-color:var(--accent-color)!important;outline-color:#f1f3f4!important;outline-color:var(--tertiary-bg)!important}.theme-dark[_ngcontent-%COMP%]   .trigger-action-event[_ngcontent-%COMP%]{color:#6c757d!important;color:var(--secondary-text)!important;border-top:1px solid #dee2e6!important;border-top:1px solid var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .node-item[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#212529!important;color:var(--primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .node-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#5371ff!important;color:var(--accent-color)!important}.theme-dark[_ngcontent-%COMP%]   .blue-node[_ngcontent-%COMP%]{border-color:#dee2e6!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .reset-tooltip-top[_ngcontent-%COMP%]:before{border-top-color:#212529!important;border-top-color:var(--primary-text)!important}"]}),t})(),JO=(()=>{class t{constructor(t,e){this.apiService=t,this.router=e,this.isRouted=new fo.xQ}canActivate(t,e){return this.apiService.isLoggedIn()&&this.isRouted.next(e.url),!0}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s),o.LFG(ui.F0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const jO=function(t,e){return{"theme-bgcl border-0":t,btn_delete:e}};let RO=(()=>{class t{constructor(t){this.bsModalRef=t,this.IsDelete=!1}ngOnInit(){this.onClose=new fo.xQ}confirmDeleteConnect(t){this.onClose.next(!0),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-delete-multiple-confirm-pop-up"]],decls:13,vars:8,consts:[[1,"testfetch-main"],[1,"block-header","testfetch-header"],[1,"testfetch-title"],[1,"block-options"],[1,"block-content","text-start","modal
1-body","py-0"],[1,"testfetch-footer","modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],[1,"btn","btn-default","rounded-pill","btn_confirm",3,"ngClass","click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"h3",2),o._uU(3),o.qZA(),o._UZ(4,"ul",3),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"div",5),o.TgZ(9,"a",6),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(10),o.qZA(),o.TgZ(11,"a",7),o.NdJ("click",function(){return e.confirmDeleteConnect(!0)}),o._uU(12),o.qZA(),o.qZA()),2&t&&(o.xp6(3),o.Oqu(e.modelTitle),o.xp6(4),o.Oqu(e.modelContent),o.xp6(3),o.Oqu(e.translation.CANCEL),o.xp6(1),o.Q6J("ngClass",o.WLB(5,jO,!e.IsDelete,e.IsDelete)),o.xp6(1),o.Oqu(e.translation.CONFIRM))},directives:[to.mk],styles:[".testfetch-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600}"]}),t})();var $O=n(2204);const BO=["hoursInput"],HO=["minutesInput"];function QO(t,e){1&t&&(o.ynx(0),o._uU(1,"s"),o.BQk())}function YO(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.YNc(2,QO,2,0,"ng-container",29),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("",t.days," day"),o.xp6(1),o.Q6J("ngIf",t.days>1)}}function zO(t,e){1&t&&(o.ynx(0),o._uU(1,", "),o.BQk())}function VO(t,e){1&t&&(o.ynx(0),o._uU(1,"s"),o.BQk())}function GO(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.YNc(2,VO,2,0,"ng-container",29),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("",t.hours," hour"),o.xp6(1),o.Q6J("ngIf",t.hours>1)}}function WO(t,e){1&t&&(o.ynx(0),o._uU(1,", "),o.BQk())}function KO(t,e){1&t&&(o.ynx(0),o._uU(1,"s"),o.BQk())}function XO(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.YNc(2,KO,2,0,"ng-container",29),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("",t.minutes," minute"),o.xp6(1),o.Q6J("ngIf",t.minutes>1)}}function tM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"div",30),o.TgZ(2,"input",31),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setTaskFrequency(5)}),o.qZA(),o.TgZ(3,"label",32),o.YNc(4,YO,3,2,"ng-container",29),o.YNc(5,zO,2,0,"ng-container",29),o.YNc(6,GO,3,2,"ng-container",29),o.YNc(7,WO,2,0,"ng-container",29),o.YNc(8,XO,3,2,"ng-container",29),o.TgZ(9,"span",33),o._uU(10,"(Custom)"),o.qZA(),o.TgZ(11,"button",34),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toogleEditOptionMinutes()}),o.O4$(),o.TgZ(12,"svg",35),o._UZ(13,"path",36),o._UZ(14,"path",37),o.qZA(),o._uU(15," Edit "),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("checked",5==t.frequencyId||t.minutes||t.hours||t.days),o.xp6(2),o.Q6J("ngIf",t.days&&t.days>0),o.xp6(1),o.Q6J("ngIf",t.days&&t.days>0&&(t.hours>0||t.minutes>0)),o.xp6(1),o.Q6J("ngIf",t.hours&&t.hours>0),o.xp6(1),o.Q6J("ngIf",t.hours&&t.hours>0&&t.minutes>0),o.xp6(1),o.Q6J("ngIf",t.minutes&&t.minutes>0)}}function eM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",17),o.TgZ(1,"li"),o.TgZ(2,"div",18),o.TgZ(3,"input",19),o.NdJ("click",function(){return o.CHM(t),o.oxw().setTaskFrequency(-1)}),o.qZA(),o.TgZ(4,"label",20),o._uU(5),o.qZA(),o.qZA(),o.qZA(),o.TgZ(6,"li"),o.TgZ(7,"div",18),o.TgZ(8,"input",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().setTaskFrequency(1)}),o.qZA(),o.TgZ(9,"label",22),o._uU(10,"1 hour"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"li"),o.TgZ(12,"div",18),o.TgZ(13,"input",23),o.NdJ("click",function(){return o.CHM(t),o.oxw().setTaskFrequency(2)}),o.qZA(),o.TgZ(14,"label",24),o._uU(15,"6 hours"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"li"),o.TgZ(17,"div",18),o.TgZ(18,"input",25),o.NdJ("click",function(){return o.CHM(t),o.oxw().setTaskFrequency(3)}),o.qZA(),o.TgZ(19,"label",26),o._uU(20,"12 hours"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(21,"li"),o.TgZ(22,"div",18),o.TgZ(23,"input",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().setTaskFrequency(4)}),o.qZA(),o.TgZ(24,"label",28),o._uU(25,"24 hours"),o.qZA(),o.qZA(),o.qZA(),o.YNc(26,tM,16,6,"li",29),o.qZA()}if(2&t){const t=o.oxw();o.xp6(3),o.Q6J("checked",-1==t.frequencyId),o.xp6(2),o.Oqu(t.defaultFrequencyDisplay),o.xp6(3),o.Q6J("checked",1==t.frequencyId),o.xp6(5),o.Q6J("checked",2==t.frequencyId),o.xp6(5),o.Q6J("checked",3==t.frequencyId),o.xp6(5),o.Q6J("checked",4==t.frequencyId),o.xp6(3),o.Q6J("ngIf",(t.minutes||t.days||t.hours)&&t.showCustomMinutesOption||5==t.frequencyId)}}
1function nM(t,e){if(1&t&&(o.TgZ(0,"div",38),o.TgZ(1,"div",39),o.TgZ(2,"div",40),o.TgZ(3,"p"),o._uU(4),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(3),o.Udp("color","red"),o.xp6(1),o.hij("",t.alertMessage," ")}}function iM(t,e){if(1&t&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.hij(" ",t," ")}}function oM(t,e){if(1&t&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.Oqu(t)}}function rM(t,e){if(1&t&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.Oqu(t)}}function sM(t,e){if(1&t&&(o.TgZ(0,"div",55),o._UZ(1,"div",56),o.TgZ(2,"div",57),o.TgZ(3,"span"),o._uU(4,"Days"),o.qZA(),o.TgZ(5,"ul",58),o.YNc(6,iM,2,1,"li",59),o.qZA(),o.qZA(),o.TgZ(7,"div",57),o.TgZ(8,"span"),o._uU(9,"Hours"),o.qZA(),o.TgZ(10,"ul",60),o.YNc(11,oM,2,1,"li",59),o.qZA(),o.qZA(),o.TgZ(12,"div",57),o.TgZ(13,"span"),o._uU(14,"Minutes"),o.qZA(),o.TgZ(15,"ul",61),o.YNc(16,rM,2,1,"li",59),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("ngForOf",t.daysArroy),o.xp6(5),o.Q6J("ngForOf",t.hoursArroy),o.xp6(5),o.Q6J("ngForOf",t.minutesArroy)}}const aM=function(t){return{"text-black":t}};function cM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",41),o.TgZ(1,"div",42),o.TgZ(2,"div",43),o.TgZ(3,"button",44),o.NdJ("click",function(){return o.CHM(t),o.oxw().increment("days")}),o.O4$(),o.TgZ(4,"svg",45),o._UZ(5,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",47),o.NdJ("click",function(e){return o.CHM(t),o.oxw().addClassOnClick(e)}),o.TgZ(7,"input",48),o.NdJ("keydown",function(e){return o.CHM(t),o.oxw().preventE(e)})("ngModelChange",function(e){return o.CHM(t),o.oxw().days=e})("input",function(e){o.CHM(t);const n=o.oxw();return n.limitToTwoDigits(e),n.validateTime(e,"days")})("click",function(){return o.CHM(t),o.oxw().handleHoursClick()}),o.qZA(),o.qZA(),o.TgZ(8,"button",49),o.NdJ("click",function(){return o.CHM(t),o.oxw().decrement("days")}),o.O4$(),o.TgZ(9,"svg",45),o._UZ(10,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(11,"p",51),o._uU(12,"Days"),o.qZA(),o.qZA(),o.TgZ(13,"div",43),o.TgZ(14,"button",44),o.NdJ("click",function(){return o.CHM(t),o.oxw().increment("hours")}),o.O4$(),o.TgZ(15,"svg",45),o._UZ(16,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(17,"div",47),o.NdJ("click",function(e){return o.CHM(t),o.oxw().addClassOnClick(e)}),o.TgZ(18,"input",52),o.NdJ("keydown",function(e){return o.CHM(t),o.oxw().preventE(e)})("ngModelChange",function(e){return o.CHM(t),o.oxw().hours=e})("input",function(e){o.CHM(t);const n=o.oxw();return n.limitToTwoDigits(e),n.validateTime(e,"hours")})("click",function(){return o.CHM(t),o.oxw().handleHoursClick()}),o.qZA(),o.qZA(),o.TgZ(19,"button",49),o.NdJ("click",function(){return o.CHM(t),o.oxw().decrement("hours")}),o.O4$(),o.TgZ(20,"svg",45),o._UZ(21,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(22,"p",51),o._uU(23,"Hours"),o.qZA(),o.qZA(),o.TgZ(24,"div",43),o.TgZ(25,"button",44),o.NdJ("click",function(){return o.CHM(t),o.oxw().increment("minutes")}),o.O4$(),o.TgZ(26,"svg",45),o._UZ(27,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(28,"div",47),o.NdJ("click",function(e){return o.CHM(t),o.oxw().addClassOnClick(e)}),o.TgZ(29,"input",53),o.NdJ("keydown",function(e){return o.CHM(t),o.oxw().preventE(e)})("ngModelChange",function(e){return o.CHM(t),o.oxw().minutes=e})("input",function(e){o.CHM(t);const n=o.oxw();return n.limitToTwoDigits(e),n.validateTime(e,"minutes")})("click",function(){return o.CHM(t),o.oxw().handleHoursClick()}),o.qZA(),o.qZA(),o.TgZ(30,"button",49),o.NdJ("click",function(){return o.CHM(t),o.oxw().decrement("minutes")}),o.O4$(),o.TgZ(31,"svg",45),o._UZ(32,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(33,"p",51),o._uU(34,"Minutes"),o.qZA(),o.qZA(),o.qZA(),o.YNc(35,sM,17,3,"div",54),o.qZA()}if(2&t){const t=o.oxw();o.xp6(7),o.Q6J("ngModel",t.days)("ngClass",o.VKq(7,aM,t.days&&"0"!==t.days&&"00"!==t.days)),o.xp6(11),o.Q6J("ngModel",t.hours)("ngClass",o.VKq(9,aM,t.hours&&"0"!==t.hours&&"00"!==t.hours)),o.xp6(11),o.Q6J("ngModel",t.minutes)("ngClass",o.VKq(11,aM,t.minutes&&"0"!==t.minutes&&"00"!==t.minutes)),o.xp6(6),o.Q6J("ngIf",!1)}}function lM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleShowDaysView()}),o.O4$(),o.TgZ(1,"svg",63),o._UZ(2,"path",64),o.qZA(),o._uU(3," Add Custom time interval "),o.qZA()}}function dM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",65),o.NdJ("click",function(){return o.CHM(t),o.oxw().bsModalRef.hide()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.translation.CANCEL)}}function uM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",66),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.confirmTaskFrequency(e.modelConnectId)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw();
1o.xp6(1),o.Oqu(t.translation.CONFIRM)}}function pM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",67),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleBackDisplay()}),o._uU(1,"Back"),o.qZA()}}function hM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",66),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.confirmTaskFrequencyData(e.modelConnectId)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw();o.Udp("pointer-events",t.isConfirmDisabled()?"none":"auto"),o.ekj("disabled",t.isConfirmDisabled()),o.uIk("aria-disabled",t.isConfirmDisabled()),o.xp6(1),o.Oqu(t.translation.CONFIRM)}}let gM=(()=>{class t{constructor(t,e,n,i){this.bsModalRef=t,this.customerService=e,this.cdr=n,this.renderer=i,this.showCustomMinutesOption=!1,this.showDaysHoursMinutes=!0,this.editButtonCheck=!1,this.showButton=!0,this.alertMessage="",this.alertMessageData=!1,this.alertMessageDataCustom=!1,this.alphaData=!1,this.days="00",this.hours="00",this.minutes="15",this.daysArroy=[],this.hoursArroy=[],this.minutesArroy=[],this.selectedDay=null,this.isEditing=!1,this.isCustomTimeIntervalOpen=!1;for(let o=0;o<=29;o++)this.daysArroy.push(o);for(let o=0;o<=23;o++)this.hoursArroy.push(o);for(let o=0;o<=59;o++)this.minutesArroy.push(o)}secondsToDays(t){return Math.floor(t/86400)}secondsToHours(t){return Math.floor(t%86400/3600)}secondsToMinutes(t){return Math.floor(t%3600/60)}selectDay(t){this.selectedDay=t,this.isEditing=!0}updateDay(t){if(null!==this.selectedDay){const e=this.daysArroy.indexOf(this.selectedDay);this.daysArroy[e]=t.target.value,this.isEditing=!1,this.selectedDay=null}}cancelEdit(){this.isEditing=!1,this.selectedDay=null}ngOnInit(){if(5==this.frequencyId){if(this.frequency){this.frequency=this.frequency;let t=this.frequency;this.days=this.secondsToDays(t),t-=24*this.days*60*60,this.hours=this.secondsToHours(t),t-=60*this.hours*60,this.minutes=this.secondsToMinutes(t),this.days=Math.min(this.days,30),this.hours=Math.min(this.hours,23),this.minutes=Math.min(this.minutes,59),this.updatedDays=this.days,this.updatedHours=this.hours,this.updatedMinutes=this.minutes,this.frequencyId=5,this.showCustomMinutesOption=!0,this.showButton=!1}}else this.showCustomMinutesOption=!1,this.showButton=!0;this.onClose=new fo.xQ}setTaskFrequency(t){this.frequencyId=t}confirmTaskFrequencyData(t){var e,n,i,o,r,s,a,c;if(null==this.days&&(this.days=""),null==this.hours&&(this.hours=""),null==this.minutes&&(this.minutes=""),this.frequencyId=5,this.alertMessageData=!1,this.days=this.days.toString().replace(/^0+/,"").slice(0,2),this.hours=this.hours.toString().replace(/^0+/,"").slice(0,2),this.minutes=this.minutes.toString().replace(/^0+/,"").slice(0,2),this.newMinutes=this.minutes,"00"!=this.days&&0!=this.days||"00"!=this.hours&&0!=this.hours||!("0"==this.minutes||0==this.minutes||this.minutes<5))this.updatedDays=this.days,this.updatedHours=this.hours,this.updatedMinutes=this.newMinutes,this.showCustomMinutesOption=!0,this.alertMessageDataCustom=!1,(this.minutes||this.minutes>0||0===this.minutes||""==this.minutes)&&(this.showDaysHoursMinutes=!this.showDaysHoursMinutes),this.isCustomTimeIntervalOpen=!1;else{let t=this.customerService.GetCurrent(),l=15;"enterprise"===(null===(n=null===(e=null==t?void 0:t.plan_details)||void 0===e?void 0:e[0])||void 0===n?void 0:n.identifire)||"business2"===(null===(o=null===(i=null==t?void 0:t.plan_details)||void 0===i?void 0:i[0])||void 0===o?void 0:o.identifire)?l=1:"professional"===(null===(s=null===(r=null==t?void 0:t.plan_details)||void 0===r?void 0:r[0])||void 0===s?void 0:s.identifire)?l=2:"standard"===(null===(c=null===(a=null==t?void 0:t.plan_details)||void 0===a?void 0:a[0])||void 0===c?void 0:c.identifire)&&(l=5),this.minutes<l?(this.editButtonCheck=!0,this.alertMessageDataCustom=!0,this.alertMessageData=!0,this.alertMessage=`Upgrade plan to set time interval below ${l} minutes.`,this.days="00",this.hours="00",this.minutes=l):(this.updatedDays=this.days,this.updatedHours=this.hours,this.updatedMinutes=this.newMinutes,this.showCustomMinutesOption=!0,this.alertMessageDataCustom=!1,(this.minutes||this.minutes>0||0===this.minutes||""==this.minutes)&&(this.showDaysHoursMinutes=!this.showDaysHoursMinutes),this.isCu
1stomTimeIntervalOpen=!1)}}confirmTaskFrequency(t){let e=0;5===this.frequencyId&&(e=24*(this.days||0)*60*60+60*(this.hours||0)*60+60*(this.minutes||0)),this.onClose.next({confirm:!0,connectId:t,frequencyId:parseInt(this.frequencyId),cronData:e}),this.bsModalRef.hide()}increment(t){this.alphaData=!1,"days"===t?this.days<29?(this.alertMessageData=!1,this.days++):(this.alertMessageData=!0,this.alertMessage="Cron time interval cannot exceed 30 days.",this.hours=23,this.minutes=59):"hours"===t&&this.hours<23?(this.hours++,this.alertMessageData=!1):"minutes"===t&&this.minutes<59&&(this.alertMessageData=!1,this.minutes++)}decrement(t){var e,n,i,o,r,s,a,c;let l=this.customerService.GetCurrent(),d=15;"enterprise"===(null===(n=null===(e=null==l?void 0:l.plan_details)||void 0===e?void 0:e[0])||void 0===n?void 0:n.identifire)||"business2"===(null===(o=null===(i=null==l?void 0:l.plan_details)||void 0===i?void 0:i[0])||void 0===o?void 0:o.identifire)?d=1:"professional"===(null===(s=null===(r=null==l?void 0:l.plan_details)||void 0===r?void 0:r[0])||void 0===s?void 0:s.identifire)?d=2:"standard"===(null===(c=null===(a=null==l?void 0:l.plan_details)||void 0===a?void 0:a[0])||void 0===c?void 0:c.identifire)&&(d=5),"days"===t&&this.days>0?(this.alertMessageData=!1,this.days--):"hours"===t&&this.hours>0?(this.alertMessageData=!1,this.hours--):"minutes"===t&&("00"!==this.days&&0!==this.days&&"0"!==this.days||"00"!==this.hours&&0!==this.hours&&"0"!==this.hours||this.alphaData?this.minutes>0&&(this.minutes--,this.alertMessageData=!1):this.minutes>d?(this.minutes--,this.alertMessageData=!1):this.minutes===d&&(1===d?this.alertMessageData=!1:(this.alertMessageData=!0,this.alertMessage=`Upgrade plan to set time interval below ${d} minutes.`))),(0===this.hours||"00"==this.hours||null===this.hours)&&(0===this.days||"00"===this.days||null===this.days)&&(0===this.minutes||null===this.minutes||"00"===this.minutes)&&(this.alertMessageData=!0,this.alertMessage=`Frequency must be at least ${d} minute.`),this.cdr.detectChanges()}toggleShowDaysView(){this.showDaysHoursMinutes=!this.showDaysHoursMinutes,this.showButton=!this.showButton,this.isCustomTimeIntervalOpen=!this.isCu
1stomTimeIntervalOpen}toggleBackDisplay(){this.updatedMinutes&&(this.alertMessageDataCustom=!1),null==this.days&&(this.days=""),null==this.hours&&(this.hours=""),null==this.minutes&&(this.minutes=""),this.alertMessageData=!1,(this.minutes||this.minutes>0||0===this.minutes||""===this.minutes)&&(this.showDaysHoursMinutes=!this.showDaysHoursMinutes),this.showButton=!this.editButtonCheck,this.isCustomTimeIntervalOpen=!1,this.alertMessageDataCustom?this.updatedMinutes||(this.showButton=!0,this.showCustomMinutesOption=!1,this.frequencyId=-1,this.minutes="15"):(this.updatedDays===this.days&&this.updatedHours===this.hours&&this.updatedMinutes===this.minutes?(this.minutes=this.minutes,this.hours=this.hours,this.days=this.days):(this.hours=this.updatedHours||"00",this.days=this.updatedDays||"00",this.minutes=this.updatedMinutes||"00"),("00"===this.days||0===this.days||""===this.days)&&("00"===this.hours||0===this.hours||""===this.hours)&&("00"===this.minutes||0===this.minutes||""===this.minutes)&&(this.minutes="15"))}toogleEditOptionMinutes(){this.alphaData=!1,this.editButtonCheck=!0,this.showDaysHoursMinutes=!this.showDaysHoursMinutes,this.showButton=!1,this.isCustomTimeIntervalOpen=!this.isCu
1stomTimeIntervalOpen,""===this.days||""===this.hours||""===this.minutes?(this.days=this.days||"00",this.hours=this.hours||"00",this.minutes=this.minutes||"00"):("0"===this.days||0===this.days||"0"===this.hours||0===this.hours||"0"===this.minutes||0===this.minutes)&&(this.days=this.days||"00",this.hours=this.hours||"00")}validateTime(t,e){var n,i,o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_;if(this.alphaData=!1,0!==this.hours&&"00"!=this.hours&&null!==this.hours||0!==this.days&&"00"!==this.days&&null!==this.days||0!==this.minutes&&"00"!==this.minutes&&null!==this.minutes)this.days<29&&(this.alertMessageData=!1);else{let t=this.customerService.GetCurrent(),e=15;"enterprise"===(null===(i=null===(n=null==t?void 0:t.plan_details)||void 0===n?void 0:n[0])||void 0===i?void 0:i.identifire)||"business2"===(null===(r=null===(o=null==t?void 0:t.plan_details)||void 0===o?void 0:o[0])||void 0===r?void 0:r.identifire)?e=1:"professional"===(null===(a=null===(s=null==t?void 0:t.plan_details)||void 0===s?void 0:s[0])||void 0===a?void 0:a.identifire)?e=2:"standard"===(null===(l=null===(c=null==t?void 0:t.plan_details)||void 0===c?void 0:c[0])||void 0===l?void 0:l.identifire)&&(e=5),this.alertMessageData=!0,this.alertMessage=`Frequency must be at least ${e} minute.`}(this.days||this.hours||this.minutes)&&(2===(null===(d=this.days)||void 0===d?void 0:d.length)||2===(null===(u=this.hours)||void 0===u?void 0:u.length)||2===(null===(p=this.minutes)||void 0===p?void 0:p.length))&&t.preventDefault();const C=String.fromCharCode(t.charCode);/^[0-9]*$/.test(C)||t.preventDefault();let w=2;if("days"===e&&(w=2),!("minutes"!==e||"00"!==this.minutes||"00"!==this.days&&0!==this.days&&"0"!==this.days||"00"!==this.hours&&0!==this.hours&&"0"!==this.hours)){let t=this.customerService.GetCurrent();this.minutes=15,"enterprise"===(null===(g=null===(h=null==t?void 0:t.plan_details)||void 0===h?void 0:h[0])||void 0===g?void 0:g.identifire)||"business2"===(null===(m=null===(f=null==t?void 0:t.plan_details)||void 0===f?void 0:f[0])||void 0===m?void 0:m.identifire)?this.minutes=1:"professional"===(null===(b=null===(v=null==t?void 0:t.plan_details)||void 0===v?void 0:v[0])||void 0===b?void 0:b.identifire)?this.minutes=2:"standard"===(null===(_=null===(x=null==t?void 0:t.plan_details)||void 0===x?void 0:x[0])||void 0===_?void 0:_.identifire)&&(this.minutes=5)}const y=(this[e]||"").toString(),A=Number(y);y.length===w&&""!==C?(t.preventDefault(),"days"===e&&A>29?(this.days=29,this.hours=23,this.minutes=59):"days"===e&&A>29?(this.hours=23,this.minutes=59):"hours"===e&&A>23?this.hours=23:"minutes"===e&&A>59&&(this.minutes=59)):y.length===w-1&&0===A&&""!==C&&t.preventDefault()}limitToTwoDigits(t){const e=t.target;null===e.value?e.value="":e.value.length>2&&(e.value=e.value.slice(0,2))}isConfirmDisabled(){return!(0!==this.hours&&"00"!=this.hours&&null!==this.hours||0!==this.days&&"00"!==this.days&&null!==this.days||0!==this.minutes&&"00"!==this.minutes&&null!==this.minutes)}preventE(t){"Backspace"===t.key||"Delete"===t.key||"Tab"===t.key||"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Enter"===t.key||t.key.match(/[0-9]/)||t.preventDefault()}handleHoursClick(){null===this.hours&&(this.hours="00"),null===this.days&&(this.days="00"),null===this.minutes&&(this.minutes="00")}addClassOnClick(t){const e=t.target.closest(".counter-item.custom-options-tooltip");e&&this.renderer.addClass(e,"remove-hover")}handleOutsideClick(t){t.target.closest(".counter-item")||(null===this.hours&&(this.hours="00"),null===this.days&&(this.days="00"),null===this.minutes&&(this.minutes="00"))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo),o.Y36(o.sBO),o.Y36(o.Qsj))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-set-task-frequency"]],viewQuery:function(t,e){if(1&t&&(o.Gf(BO,5),o.Gf(HO,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.hoursInputRef=t.first),o.iGM(t=o.CRH())&&(e.minutesInputRef=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.handleOutsideClick(t)},!1,o.evT)},decls:20,vars:10,consts:[[1,"modal-header","pb-2","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn",3,"click"],[1,"si","si-close"],[1,"modal-body","pt-0"],[1,"text-start"],[1,"fw-normal","color-text"],["class","my-3 set-task-list px-2 mb-0",4,"ngIf"],["class","alert-overlay",4,"ngIf"],["class","days-hours-minuts my-5",4,"ngIf"],[1,"d-flex","align-items-center"],["class","btn d-inline-flex align-items-center gap-1 btnadd-custom px-1",3,"click",4,"ngIf"],[1,"modal-footer","text-center","justify-content-center","justify-content-lg-end","border-0"],["class","btn btn-default btn_cancel roun
1ded-pill","type","link","data-dismiss","modal",3,"click",4,"ngIf"],["class","btn btn-default btn_confirm rounded-pill btn-themebg","type","link",3,"click",4,"ngIf"],["class","btn btn-default btn_cancel rounded-pill me-2","type","button",3,"click",4,"ngIf"],["class","btn btn-default btn_confirm rounded-pill btn-themebg","type","link",3,"disabled","pointer-events","click",4,"ngIf"],[1,"my-3","set-task-list","px-2","mb-0"],[1,"form-check","form-check-inline","fs-5","mb-2","me-0"],["type","radio","name","inlineRadioOptions","id","inlineRadio1","value","-1",1,"form-check-input",3,"checked","click"],["for","inlineRadio1",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0"],["type","radio","name","inlineRadioOptions","id","inlineRadio2","value","1",1,"form-check-input",3,"checked","click"],["for","inlineRadio2",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0"],["type","radio","name","inlineRadioOptions","id","inlineRadio3","value","2",1,"form-check-input",3,"checked","click"],["for","inlineRadio3",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0"],["type","radio","name","inlineRadioOptions","id","inlineRadio4","value","3",1,"form-check-input",3,"checked","click"],["for","inlineRadio4",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0"],["type","radio","name","inlineRadioOptions","id","inlineRadio5","value","4",1,"form-check-input",3,"checked","click"],["for","inlineRadio5",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0"],[4,"ngIf"],[1,"form-check","form-check-inline","fs-5","mb-2","me-0","w-100"],["type","radio","name","inlineRadioOptions","id","inlineRadio6","value","5",1,"form-check-input",3,"checked","click"],["for","inlineRadio6",1,"form-check-label","fw-bold","small","text-black","fs-6","me-0","d-flex","align-items-center","gap-1"],[1,"fw-light"],["type","button",1,"btn","edit-custom","d-flex","align-items-center","gap-1","p-0","border-0",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["fill","none","d","M0 0h24v24H0z"],["d","M3 21h3.75L17.81 9.94l-3.75-3.75L3 17.25V21zm2-2.92 9.06-9.06.92.92L5.92 19H5v-.92zM18.37 3.29a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34z"],[1,"alert-overlay"],[1,"alert-modal"],[1,"alert-content"],[1,"days-hours-minuts","my-5"],[1,"listed","d-flex","justify-content-center","gap-3","align-items-center","text-center"],[1,"d-flex","flex-column"],[1,"btn","upButton",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["d","M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"],["data-tooltip","Click to edit",1,"counter-item","custom-options-tooltip",3,"click"],["type","number","maxlength","2","max","29",1,"counter-item",3,"ngModel","ngClass","keydown","ngModelChange","input","click"],[1,"btn","downButton",3,"click"],["d","M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"],[1,"mb-0"],["type","number","maxlength","2","max","23",1,"counter-item",3,"ngModel","ngClass","keydown","ngModelChange","input","click"],["type","number","maxlength","2","max","59",1,"counter-item",3,"ngModel","ngClass","keydown","ngModelChange","input","click"],["class","picker",4,"ngIf"],[1,"picker"],[1,"picker-window"],[1,"grid-item"],[1,"picker-day"],[4,"ngFor","ngForOf"],[1,"picker-hour"],[1,"picker-minute"],[1,"btn","d-inline-flex","align-items-center","gap-1","btnadd-custom","px-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none"],["d","M5 12H19M12 5V19","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","link","data-dismiss","modal",1,"btn","btn-default","btn_cancel","rounded-pill",3,"click"],["type","link",1,"btn","btn-default","btn_confirm","rounded-pill","btn-themebg",3,"click"],["type","button",1,"btn","btn-default","btn_cancel","rounded-pill","me-2",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(4,"i",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"p",6),o._uU(8),o.qZA(),o.YNc(9,eM,27,7,"ul",7),o.YNc(10,nM,5,3,"div",8),o.YNc(11,cM,36,13,"div",9),o.TgZ(12,"div",10),o.YNc(13,lM,4,0,"button",11),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"div",12),o.YNc(15,dM,2,1,"a",13),o.YNc(16,uM,2,1,"a",14),o.TgZ(17,"div"),o.YNc(18,pM,2,0,"button",15),o.YNc(19,hM,2,6,"a",16),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(6),o.Oqu(e.modelContent),o.xp6(1),o.Q6J("ngIf",e.showDaysHoursMinutes),o.xp6(1),o.Q6J("ngIf",e.alertMessageData),o.xp6(1),o.Q6J("ngIf",!e.showDaysHoursMinutes),o.xp6(2),o.Q6J("ngIf",e.showButton),o.xp6(2),o.Q6J("ngIf",!e.isCustomTimeIntervalOpen),o.xp6(1),o.Q6J("ngIf",!e.isCustomTimeIntervalOpen),o.xp6(2),o.Q6J("ngIf",e.isCustomTimeIntervalOpen),o.xp6(1),o.Q6J("ngIf",e.isCustomTimeIntervalOpen))},directives:[to.O5,Xi.Fd,Xi.wV,Xi.Fj,Xi.nD,Xi.JJ,Xi.On,to.mk,to.sg],styles:['.form-check[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{margin-top:3px;text-transform:capitalize;font-weight:500!important}.edit-custom[_ngcontent-%COMP%]{color:var(--Primary-Color)}.btnadd-custom[_ngcontent-%COMP%]:hover, .btnadd-custom[_ngcontent-%COMP%]:focus{color:var(--Primary-Color)}.counter-item[_ngcontent-%COMP%]{background:#F3F4F6;padding:5px 10px;color:#a6b1bc;font-size:40px;font-weight:600;width:90px;height:80px;letter-spacing:3.2px;border-radius:4px;display:flex;line-height:normal;align-items:center;justify-content:center;border:1px solid #F3F4F6;outline:none;text-align:center;-moz-appearance:none;appearance:none;-webkit-appearance:none}.listed[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#0f1035!important;text-align:center;font-size:15px!important;font-weight:500!important;letter-spacing:.3px!important}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-moz-appearance:none;-webkit-appearance:none;margin:0}input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button, input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, input[type=number][_ngcontent-%COMP%]::-moz-outer-spin-button, input[type=number][_ngcontent-%COMP%]::-moz-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield;-webkit-appearance:none;appearance:none}.counter-item[_ngcontent-%COMP%]:hover{color:#000!important}.counter-item[_ngcontent-%COMP%]:after{left:100%;transform:translate(0);padding:10px 5px;letter-spacing:0px;font-size:14px;background:rgb(0 0 0 / 80%);font-weight:400;min-width:10em}.counter-item[_ngcontent-%COMP%]:before{display:none}.picker-window[_ngcontent-%COMP%]{position:absolute;border-top:1px solid #d4d9d9;border-bottom:1px solid #d4d9d9;height:45px;left:0;top:50%;transform:translateY(-50%);width:100%;pointer-events:none}.picker[_ngcontent-%COMP%]{display:grid;position:relative;background:#fff;grid-template-columns:repeat(3,fit-content(500px));font-size:calc(.5rem + 2.4vw);font-feature-settings:"tnum";overflow:hidden;grid-gap:2rem;gap:2rem;margin:2rem 0;justify-content:center;align-items:center}.picker[_ngcontent-%COMP%]:before, .picker[_ngcontent-%COMP%]:after{content:"";position:absolute;width:100%;height:118px;pointer-events:none;z-index:1}.picker[_ngcontent-%COMP%]:before{top:-.2em;background:linear-gradient(white,rgba(255,255,255,.7))}.picker[_ngcontent-%COMP%]:after{bottom:-.2em;background:linear-gradient(rgba(255,255,255,.7),white)}.picker[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{-ms-overflow-style:none;max-height:200px;overflow-y:scroll;scroll-snap-type:y mandatory;padding-bottom:100px;padding-top:100px;position:relative}.picker[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.picker[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{scroll-snap-align:center;height:42px;color:#0f1035;text-align:center;font-size:30px;font-weight:600}.grid-item[_ngcontent-%COMP%]{position:relative;width:80px;padding:30px 0}.grid-item[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:14px;color:#0f1035;position:absolute;top:0;left:50%;text-align:center;transform:translate(-50%);z-index:1;background:#fff;width:100%;font-weight:600}.remove-hover[_ngcontent-%COMP%]:after{display:none}input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield}@media (max-width: 991px){.counter-item[_ngcontent-%COMP%]{font-size:30px;width:80px}.set-task-list[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{font-size:14px!important;margin-right:0;flex-wrap:wrap}.counter-item[_ngcontent-%COMP%]:before, .counter-item[_ngcontent-%COMP%]:after{display:none}}.color-text[_ngcontent-%COMP%]{color:#74748a!important}']}),t})(),fM=(()=>{class t{constructor(t){this.bsModalRef=t}ngOnInit(){this.onClose=new fo.xQ}confirmDeleteConnect(t){this.onClose.next(!0),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-delete-confirm-pop-up"]],decls:12,vars:3,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close-btn",3,"click"],[1,"si","si-close"],[1,"modal-body","py-0"],[1,"text-start"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link",1,"btn","btn-default","cntinue",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._UZ(4,"i",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"p"),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"div",6),o.TgZ(10,"a",7),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(11),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(6),o.Oqu(e.modelContent),o.xp6(3),o.Oqu(e.translation.OK))},styles:[""]}),t})(),mM=(()=>{class t{constructor(t){this.apiService=t,this.folderChanged=new fo.xQ,this.folderChanged$=this.folderChanged.asObservable()}notifyFolderChanged(t){this.folderChanged.next(t||null)}createFolder(t){return this.apiService.request("post","folder/create",t)}getFolders(t){return this.apiService.request("post","folder/list",t)}getFolderTree(){return this.apiService.request("get","folder/tree",{})}getFolderById(t){return this.apiService.request("get","folder/getById/"+t,{})}updateFolder(t,e){return this.apiService.request("put","folder/update/"+t,e)}deleteFolder(t){return this.apiService.request("delete","folder/delete/"+t,{})}forceDeleteFolder(t){return this.apiService.request("delete","folder/forceDelete/"+t,{})}moveConnectToFolder(t){return this.apiService.request("put","folder/moveConnect",t)}bulkMoveConnects(t){return this.apiService.request("put","folder/bulkMoveConnects",t)}getConnectsByFolder(t){return this.apiService.request("post","folder/getConnectsByFolder",{folderId:t})}getConnectsByIds(t){return this.apiService.request("post","folder/getConnectsByIds",{connectIds:t})}searchConnects(t,e){return this.apiService.request("post","folder/searchConnects",{searchTXT:t,folderIds:e||[]})}toggleFavorite(t,e){return this.apiService.request("post","folder/toggleFavorite",{itemId:t,itemType:e})}getFavorites(){return this.apiService.request("get","folder/getFavorites",{})}moveFolderToTrash(t){return this.apiService.request("put","folder/moveToTrash/"+t,{})}getTrashFolders(){return this.apiService.request("get","folder/getTrash",{})}restoreFolderFromTrash(t){return this.apiService.request("put","folder/restoreFromTrash/"+t,{})}permanentDeleteFolder(t){return this.apiService.request("delete","folder/permanentDeleteFolder/"+t,{})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();
1function vM(t,e){if(1&t&&(o.TgZ(0,"div",12),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.errorMsg)}}const bM=function(t){return{"cursor-not-allowed":t}};let xM=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.folderService=e,this.modelTitle="Create folder",this.IsDelete=!1,this.folderName="",this.parentFolderId=null,this.isRename=!1,this.folderId=null,this.isSaving=!1,this.errorMsg=""}ngOnInit(){this.onClose=new fo.xQ}createFolder(){!this.folderName.trim()||this.isSaving||(this.isSaving=!0,this.errorMsg="",this.isRename&&this.folderId?this.folderService.updateFolder(this.folderId,{folderName:this.folderName.trim()}).subscribe(t=>{this.isSaving=!1,t&&t.success?(this.onClose.next(t.result),this.bsModalRef.hide()):this.errorMsg=(null==t?void 0:t.msg)||"Failed to rename folder"},()=>{this.isSaving=!1,this.errorMsg="Something went wrong. Please try again."}):this.folderService.createFolder({folderName:this.folderName.trim(),parentFolderId:this.parentFolderId}).subscribe(t=>{this.isSaving=!1,t&&t.success?(this.onClose.next(t.folder),this.bsModalRef.hide()):this.errorMsg=(null==t?void 0:t.msg)||"Failed to create folder"},()=>{this.isSaving=!1,this.errorMsg="Something went wrong. Please try again."}))}onFolderNameChange(t){this.errorMsg=""}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(mM))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-folder-popup"]],decls:18,vars:9,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],[1,"modal-body","py-0"],[1,"mb-3"],["for","folderName",1,"f-14","fw-semibold","mb-1"],[1,"text-danger","f18","lh-1"],["type","text","placeholder","Enter folder name","id","folderName","maxlength","50",1,"form-control","rounded-3","mb-1","fw-semibold",3,"ngModel","ngModelChange","click"],[1,"f-12"],["class","text-danger f-12 mt-1",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","button",1,"btn","btn-default","rounded-pill","btn_confirm",3,"disabled","ngClass","click"],[1,"text-danger","f-12","mt-1"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.TgZ(4,"div",3),o.TgZ(5,"label",4),o._uU(6,"Name "),o.TgZ(7,"span",5),o._uU(8,"*"),o.qZA(),o.qZA(),o.TgZ(9,"input",6),o.NdJ("ngModelChange",function(t){return e.folderName=t})("ngModelChange",function(t){return e.onFolderNameChange(t)})("click",function(t){return t.stopPropagation()}),o.qZA(),o.TgZ(10,"small",7),o._uU(11),o.qZA(),o.YNc(12,vM,2,1,"div",8),o.qZA(),o.qZA(),o.TgZ(13,"div",9),o.TgZ(14,"a",10),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(15,"Cancel"),o.qZA(),o.TgZ(16,"button",11),o.NdJ("click",function(){return e.createFolder()}),o._uU(17),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.isRename?"Rename folder":e.parentFolderId?"Create Subfolder":"Create folder"),o.xp6(7),o.Q6J("ngModel",e.folderName),o.xp6(2),o.hij("Maximum 50 characters (",e.folderName.length,"/50)"),o.xp6(1),o.Q6J("ngIf",e.errorMsg),o.xp6(4),o.Q6J("disabled",!e.folderName.trim()||e.isSaving)("ngClass",o.VKq(7,bM,!e.folderName.trim()||e.isSaving)),o.xp6(1),o.Oqu(e.isSaving?"Saving...":"Save"))},directives:[Xi.Fj,Xi.nD,Xi.JJ,Xi.On,to.O5,to.mk],styles:[""]}),t})();function _M(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().clearSearch()}),o.O4$(),o.TgZ(1,"svg",7),o._UZ(2,"path",22),o.qZA(),o.qZA()}}function CM(t,e){if(1&t&&(o.TgZ(0,"div",23),o.O4$(),o.TgZ(1,"svg",24),o._UZ(2,"path",25),o.qZA(),o.kcU(),o.TgZ(3,"span",26),o._uU(4,"Current Folder : "),o.TgZ(5,"span",27),o._uU(6),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(6),o.Oqu(t.currentFolderName||"Folder")}}function wM(t,e){1&t&&(o.TgZ(0,"div",28),o._uU(1," Loading folders... "),o.qZA())}function yM(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij('No folders found matching "',t.folderSearchTxt,'"')}}function AM(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"No folders yet. Create a folder first."),o.qZA())}
1function ZM(t,e){if(1&t&&(o.TgZ(0,"div",28),o.YNc(1,yM,2,1,"span",29),o.YNc(2,AM,2,0,"span",29),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.folderSearchTxt),o.xp6(1),o.Q6J("ngIf",!t.folderSearchTxt)}}function kM(t,e){1&t&&o.GkF(0)}const TM=function(t){return{$implicit:t,depth:0}};function OM(t,e){if(1&t&&(o.ynx(0),o.YNc(1,kM,1,0,"ng-container",32),o.BQk()),2&t){const t=e.$implicit;o.oxw(2);const n=o.MAs(25);o.xp6(1),o.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",o.VKq(2,TM,t))}}function MM(t,e){if(1&t&&(o.TgZ(0,"div",30),o.YNc(1,OM,2,4,"ng-container",31),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.filteredFolderTree)}}function IM(t,e){if(1&t&&(o.TgZ(0,"div",33),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.errorMsg)}}const SM=function(t){return{"rotate-90":t}};function PM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",39),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().toggleExpand(n._id),e.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",40),o._UZ(2,"polyline",41),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("ngClass",o.VKq(1,SM,e.isExpanded(t._id)))}}function NM(t,e){1&t&&o._UZ(0,"span",42)}function qM(t,e){1&t&&(o.TgZ(0,"span",43),o._uU(1,"(current)"),o.qZA())}function UM(t,e){1&t&&o.GkF(0)}const EM=function(t,e){return{$implicit:t,depth:e}};function FM(t,e){if(1&t&&(o.ynx(0),o.YNc(1,UM,1,0,"ng-container",32),o.BQk()),2&t){const t=e.$implicit,n=o.oxw(2).depth;o.oxw();const i=o.MAs(25);o.xp6(1),o.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",o.WLB(2,EM,t,n+1))}}function DM(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,FM,2,5,"ng-container",31),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.children)}}const LM=function(t,e){return{"folder-selected":t,"folder-current":e}};function JM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",34),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw().selectFolder(e._id)}),o.YNc(1,PM,3,3,"button",35),o.YNc(2,NM,1,0,"span",36),o.O4$(),o.TgZ(3,"svg",24),o._UZ(4,"path",25),o.qZA(),o.kcU(),o.TgZ(5,"span",37),o._uU(6),o.qZA(),o.YNc(7,qM,2,0,"span",38),o.qZA(),o.YNc(8,DM,2,1,"div",29)}if(2&t){const t=e.$implicit,n=e.depth,i=o.oxw();o.Udp("padding-left",20*n,"px"),o.Q6J("ngClass",o.WLB(8,LM,i.selectedFolderId===t._id,i.currentFolderId===t._id)),o.xp6(1),o.Q6J("ngIf",t.children&&t.children.length>0),o.xp6(1),o.Q6J("ngIf",!t.children||0===t.children.length),o.xp6(4),o.Oqu(t.folderName),o.xp6(1),o.Q6J("ngIf",i.currentFolderId===t._id),o.xp6(1),o.Q6J("ngIf",t.children&&t.children.length>0&&i.isExpanded(t._id))}}const jM=function(t){return{"cursor-not-allowed":t}};let RM=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.folderService=e,this.connectTitle="",this.connectId="",this.connectIds=[],this.currentFolderId=null,this.currentFolderName="",this.folderSearchTxt="",this.folderTree=[],this.filteredFolderTree=[],this.selectedFolderId=null,this.expandedFolders={},this.isLoading=!0,this.isMoving=!1,this.errorMsg="",this.onClose=new fo.xQ}ngOnInit(){this.loadFolderTree()}loadFolderTree(){this.isLoading=!0,this.folderService.getFolderTree().subscribe(t=>{this.isLoading=!1,t&&t.success&&(this.folderTree=t.tree||[],this.filteredFolderTree=this.folderTree,this.currentFolderId&&(this.currentFolderName=this.findFolderName(this.folderTree,this.currentFolderId)||""),this.autoExpandCurrentPath(this.folderTree))},()=>{this.isLoading=!1})}findFolderName(t,e){for(const n of t){if(n._id===e)return n.folderName;if(n.children&&n.children.length>0){const t=this.findFolderName(n.children,e);if(t)return t}}return""}autoExpandCurrentPath(t){for(const e of t){if(e._id===this.currentFolderId)return!0;if(e.children&&e.children.length>0&&this.autoExpandCurrentPath(e.children))return this.expandedFolders[e._id]=!0,!0}return!1}toggleExpand(t){this.expandedFolders[t]=!this.expandedFolders[t]}isExpanded(t){return!!this.expandedFolders[t]}selectFolder(t){t!==this.currentFolderId&&(this.selectedFolderId=t,this.errorMsg="")}searchFolders(t){if(this.folderSearchTxt=t,!t||!t.trim())return void(this.filteredFolderTree=this.folderTree);const e=t.toLowerCase();this.filteredFolderTree=this.filterTree(this.folderTree,e),this.expandedFolders={},this.expandMatchedParents(this.filteredFolderTree,e)}filterTree(t,e){return t.map(t=>{const n=t.children?this.filterTree(t.children,e):[];return t.folderName.toLowerCase().includes(e)?Object.assign(Object.assign({},t),{children:n.length>0?n:t.children||[]}):n.length>0?Object.assign(Object.assign({},t),{children:n}):null}).filter(t=>null!==t)}expandMatchedParents(t,e){for(const n of t){if(!n.children||0===n.children.length)continue;const t=n.folderName.toLowerCase().includes(e),i=n.children.some(t=>t.folderName.toLowerCase().includes(e));(!t||i)&&(this.expandedFolders[n._id]=!0),this.expandMatchedParents(n.children,e)}}clearSearch(){this.folderSearchTxt="",this.filteredFolderTree=this.folderTree}moveFolder(){const t=this.connectIds&&this.connectIds.length>0;this.selectedFolderId&&!this.isMoving&&(t||this.connectId)&&(this.isMoving=!0,this.errorMsg="",(t?this.folderService.bulkMoveConnects({connectIds:this.connectIds,folderId:this.selectedFolderId}):this.folderService.moveConnectToFolder({connectId:this.connectId,folderId:this.selectedFolderId})).subscribe(e=>{if(this.isMoving=!1,e&&e.success){const e=this.findFolderName(this.folderTree,this.selectedFolderId)||"";this.onClose.next({success:!0,folderId:this.selectedFolderId,folderName:e,bulk:t}),this.bsModalRef.hide()}
1else this.errorMsg=(null==e?void 0:e.msg)||"Failed to move connect"},()=>{this.isMoving=!1,this.errorMsg="Something went wrong. Please try again."}))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(mM))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-folder-move-popup"]],decls:26,vars:13,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","py-0"],[1,"mb-3","d-flex","flex-column","gap-3","w-100"],[1,"searchtask","position-relative","max-width-100"],["title","Search Folders",1,"searchtask-btn"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M12.8333 22.1667C17.988 22.1667 22.1667 17.988 22.1667 12.8333C22.1667 7.67868 17.988 3.5 12.8333 3.5C7.67868 3.5 3.5 7.67868 3.5 12.8333C3.5 17.988 7.67868 22.1667 12.8333 22.1667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M24.5001 24.5001L22.1667 22.1667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","text","name","folderSearchTxt","id","folderSearchTxt","placeholder","Filter folders",1,"form-control",3,"ngModel","ngModelChange","input"],["class","searchtask-btn right-left","title","Clear Search","type","button",3,"click",4,"ngIf"],["class","current-folder-info d-flex align-items-center gap-2 px-3 py-2 rounded-3",4,"ngIf"],[1,"border","p-3","rounded-3","w-100",2,"max-height","300px","overflow-y","auto"],["class","text-center py-3 text-secondary",4,"ngIf"],["class","folders-list-group",4,"ngIf"],["class","text-danger f-12",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","button",1,"btn","btn-default","rounded-pill","btn_confirm",3,"disabled","ngClass","click"],["folderNode",""],["t
1itle","Clear Search","type","button",1,"searchtask-btn","right-left",3,"click"],["d","M21 7L7 21M7 7L21 21","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"current-folder-info","d-flex","align-items-center","gap-2","px-3","py-2","rounded-3"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["d","M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],[1,"f-13"],[1,"fw-semibold"],[1,"text-center","py-3","text-secondary"],[4,"ngIf"],[1,"folders-list-group"],[4,"ngFor","ngForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-danger","f-12"],[1,"d-flex","align-items-center","gap-1","folderItem","py-1","px-2","rounded-2",3,"ngClass","click"],["type","button","title","Expand","class","btn p-0 expandButton",3,"ngClass","click",4,"ngIf"],["style","width: 14px; display: inline-block;",4,"ngIf"],[1,"folder-name","text-truncate",2,"cursor","pointer"],["class","f-11 text-muted ms-1",4,"ngIf"],["type","button","title","Expand",1,"btn","p-0","expandButton",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["points","9 18 15 12 9 6"],[2,"width","14px","display","inline-block"],[1,"f-11","text-muted","ms-1"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.bsModalRef.hide()}),o.qZA(),o.qZA(),o.TgZ(4,"div",3),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"button",6),o.O4$(),o.TgZ(8,"svg",7),o._UZ(9,"path",8),o._UZ(10,"path",9),o.qZA(),o.qZA(),o.kcU(),o.TgZ(11,"input",10),o.NdJ("ngModelChange",function(t){return e.folderSearchTxt=t})("input",function(){return e.searchFolders(e.folderSearchTxt)}),o.qZA(),o.YNc(12,_M,3,0,"button",11),o.qZA(),o.YNc(13,CM,7,1,"div",12),o.TgZ(14,"div",13),o.YNc(15,wM,2,0,"div",14),o.YNc(16,ZM,3,2,"div",14),o.YNc(17,MM,2,1,"div",15),o.qZA(),o.YNc(18,IM,2,1,"div",16),o.qZA(),o.qZA(),o.TgZ(19,"div",17),o.TgZ(20,"a",18),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(21,"Cancel"),o.qZA(),o.TgZ(22,"button",19),o.NdJ("click",function(){return e.moveFolder()}),o._uU(23),o.qZA(),o.qZA(),o.YNc(24,JM,9,11,"ng-template",null,20,o.W1O)),2&t&&(o.xp6(2),o.hij("",e.connectIds&&e.connectIds.length>0?"Move "+e.connectIds.length+" connects":'Move "'+e.connectTitle+'"'," to selected folder"),o.xp6(9),o.Q6J("ngModel",e.folderSearchTxt),o.xp6(1),o.Q6J("ngIf",e.folderSearchTxt),o.xp6(1),o.Q6J("ngIf",e.currentFolderId),o.xp6(2),o.Q6J("ngIf",e.isLoading),o.xp6(1),o.Q6J("ngIf",!e.isLoading&&0===e.filteredFolderTree.length),o.xp6(1),o.Q6J("ngIf",!e.isLoading&&e.filteredFolderTree.length>0),o.xp6(1),o.Q6J("ngIf",e.errorMsg),o.xp6(4),o.Q6J("disabled",!e.selectedFolderId||e.isMoving)("ngClass",o.VKq(11,jM,!e.selectedFolderId||e.isMoving)),o.xp6(1),o.Oqu(e.isMoving?"Moving...":"Move to folder"))},directives:[Xi.Fj,Xi.JJ,Xi.On,to.O5,to.mk,to.sg,to.tP],styles:[".max-width-100[_ngcontent-%COMP%]{max-width:100%}.folderItem[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease}.folderItem[_ngcontent-%COMP%]:hover{background-color:#f0f0ff}.folder-selected[_ngcontent-%COMP%]{background-color:#e8e5ff!important;border:1px solid #6c63ff;color:#1d1d1d}.theme-dark[_nghost-%COMP%]   .folderItem[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .folderItem[_ngcontent-%COMP%]:hover{background-color:#6366f126}.theme-dark[_nghost-%COMP%]   .folder-selected[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .folder-selected[_ngcontent-%COMP%]{background-color:#6366f140!important;border-color:#818cf8;color:#e2e8f0}.folder-current[_ngcontent-%COMP%]{opacity:.45;cursor:not-allowed!important;background-color:transparent!important}.folder-current[_ngcontent-%COMP%]:hover{background-color:transparent!important}.folder-current[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{cursor:not-allowed!important}.current-folder-info[_ngcontent-%COMP%]{background:rgba(83,113,255,.08);border:1px solid rgba(83,113,255,.2);color:#5371ff;color:var(--Primary-Color, #5371FF)}.theme-dark[_nghost-%COMP%]   .current-folder-info[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .current-folder-info[_ngcontent-%COMP%], html.dark[_nghost-%COMP%]   .current-folder-info[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .current-folder-info[_ngcontent-%COMP%]{background:rgba(108,130,255,.12);border-color:#6c82ff40}.expandButton[_ngcontent-%COMP%]{transition:transform .2s ease;min-width:14px}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.rotate-90[_ngcontent-%COMP%]{transform:rotate(90deg)}"]}),t})(),$M=(()=>{class t{transform(t){return t&&t.replace(/\b\w/g,t=>t.toUpperCase())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"capitalizeWords",type:t,pure:!0}),t})(),BM=(()=>{class t{transform(t,e){return e?t.filter(t=>{var n,i,o,r,s,a;const c="string"==typeof t.connectId,l="string"==typeof t.connectTitle,d=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e);if(t&&(c&&(null===(i=null===(n=t.connectId)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.match(new RegExp(null===(o=null==d?void 0:d.trim())||void 0===o?void 0:o.toLowerCase(),"i")))||l&&(null===(s=null===(r=t.connectTitle)||void 0===r?void 0:r.toLowerCase())||void 0===s?void 0:s.match(new RegExp(null===(a=null==d?void 0:d.trim())||void 0===a?void 0:a.toLowerCase(),"i")))))return t}):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"filterConnects",type:t,pure:!0}),t})();function HM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",67),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).closeRecommendationEngine()}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function QM(t,e){1&t&&o._UZ(0,"img",71)}function YM(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(3);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.triggerAppObject?null:t.triggerAppObject.image),o.LSH)("alt",(null==t.triggerAppObject?null:t.triggerAppObject.displayName)+" Integration")}}function zM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearSearchText("searchTextTrigger")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}const VM=function(t){return{selected:t}};function GM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",74),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setTriggerAppObject(e)}),o._UZ(2,"img",72),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(4,VM,n.triggerAppObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(1),o.hij(" ",t.displayName," ")}}function WM(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No App Found "),o.qZA())}function KM(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).emailUs("trigger")}),o._uU(1,"Submit your app request"),o.qZA()}}function XM(t,e){1&t&&o._UZ(0,"img",71)}function tI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(4);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.triggerAppObject?null:t.triggerAppObject.image),o.LSH)("alt",(null==t.triggerAppObject?null:t.triggerAppObject.displayName)+" Integration")}}function eI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).clearSearchTextOptions("searchTextTriggerOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function nI(t,e){1&t&&o._UZ(0,"img",71)}function iI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.triggerAppObject?null:t.triggerAppObject.image),o.LSH)("alt",(null==t.triggerAppObject?null:t.triggerAppObject.displayName)+" Integration")}}function oI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).clearSearchTextOptions("searchTextTriggerOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function rI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",74),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).setTriggerAppOptionsObject(e)}),o._UZ(2,"img",72),o.TgZ(3,"div",86),o.TgZ(4,"h3"),o._uU(5),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(5);o.xp6(1),o.Q6J("ngClass",o.VKq(5,VM,n.triggerAppOptionObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+(null==n.triggerAppObject?null:n.triggerAppObject.image),o.LSH)("alt",(null==n.triggerAppObject?null:n.triggerAppObject.displayName)+" Integration"),o.xp6(3),o.Oqu(t.trigger_action_displayname),o.xp6(2),o.Oqu(t.de
1sc)}}function sI(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No Trigger Event Found "),o.qZA())}function aI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).emailUs("trigger","event")}),o._uU(1,"Submit your trigger event request"),o.qZA()}}const cI=function(t){return{show:t}};function lI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",80),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).closeTriggerOverlayMobile()}),o.TgZ(1,"div",81),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).stopPropagation(e)}),o.TgZ(2,"div",82),o.TgZ(3,"h3",83),o._uU(4,"Select Trigger Event "),o.qZA(),o.qZA(),o.TgZ(5,"div",44),o.TgZ(6,"span",45),o.YNc(7,nI,1,0,"img",46),o.YNc(8,iI,1,2,"img",47),o.qZA(),o.TgZ(9,"input",84),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(4);return(null==n.triggerAppOptionObject?null:n.triggerAppOptionObject.trigger_action_displayname)||(n.searchTextTriggerOptions=e)})("input",function(){o.CHM(t);const e=o.oxw(4);return e.filterAppOptions(e.searchTextTriggerOptions,"triggerAppOptionObject")}),o.qZA(),o.YNc(10,oI,4,0,"button",49),o.qZA(),o.TgZ(11,"ul",85),o.YNc(12,rI,8,7,"li",53),o.ALo(13,"slice"),o.YNc(14,sI,2,0,"li",54),o.YNc(15,aI,2,0,"a",55),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("ngClass",o.VKq(16,cI,t.showTriggerAppOptionsMenuInMobile)),o.xp6(5),o.ekj("border-success",t.triggerAppOptionObject)("border-danger",t.showBorderAlert&&!t.triggerAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)||t.searchTextTriggerOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextTriggerOptions||(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)),o.xp6(2),o.Q6J("ngForOf",o.Dn7(13,12,t.triggerFilteredAppOptionsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.triggerFilteredAppOptionsList.length),o.xp6(1),o.Q6J("ngIf",0===t.triggerFilteredAppOptionsList.length)}}function dI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",77),o.TgZ(1,"div",44),o.TgZ(2,"span",45),o.YNc(3,XM,1,0,"img",46),o.YNc(4,tI,1,2,"img",47),o.qZA(),o.TgZ(5,"input",78),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(3);return(null==n.triggerAppOptionObject?null:n.triggerAppOptionObject.trigger_action_displayname)||(n.searchTextTriggerOptions=e)})("click",function(){return o.CHM(t),o.oxw(3).showTriggerAppOptionsMenuInMobile=!0}),o.qZA(),o.YNc(6,eI,4,0,"button",49),o.qZA(),o.YNc(7,lI,16,18,"div",79),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.ekj("border-success",t.triggerAppOptionObject)("border-danger",t.showBorderAlert&&!t.triggerAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)||t.searchTextTriggerOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextTriggerOptions||(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.showTriggerAppOptionsMenuInMobile)}}function uI(t,e){1&t&&o._UZ(0,"img",90)}function pI(t,e){1&t&&o._UZ(0,"img",91)}function hI(t,e){if(1&t&&(o.TgZ(0,"div",87),o.YNc(1,uI,1,0,"img",88),o.YNc(2,pI,1,0,"img",89),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",!t.triggerAppObject||!t.actionAppObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject)}}function gI(t,e){1&t&&o._UZ(0,"img",90)}function fI(t,e){1&t&&o._UZ(0,"img",91)}function mI(t,e){if(1&t&&(o.TgZ(0,"div",87),o.YNc(1,gI,1,0,"img",88),o.YNc(2,fI,1,0,"img",89),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",!t.triggerAppObject||!t.actionAppObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject)}}function vI(t,e){1&t&&o._UZ(0,"img",90)}function bI(t,e){1&t&&o._UZ(0,"img",91)}function xI(t,e){if(1&t&&(o.TgZ(0,"div",87),o.YNc(1,vI,1,0,"img",88),o.YNc(2,bI,1,0,"img",89),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",!(t.triggerAppObject&&t.actionAppObject&&t.triggerAppOptionObject&&t.actionAppOptionObject)),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.triggerAppOptionObject&&t.actionAppOptionObject)}}function _I(t,e){1&t&&o._UZ(0,"img",71)}function CI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(3);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.actionAppObject?null:t.actionAppObject.image),o.LSH)("alt",(null==t.actionAppObject?null:t.actionAppObject.displayName)+" Integration")}}function wI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).closeOverlayMobile("searchTextAction")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function yI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",74),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setActionAppObject(e)}),o._UZ(2,"img",72),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(4,VM,n.actionAppObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(1),o.hij(" ",t.displayName," ")}}function AI(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No App Found "),o.qZA())}function ZI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).emailUs("action")}),o._uU(1,"Submit your app request"),o.qZA()}}function kI(t,e){1&t&&o._UZ(0,"img",71)}function TI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(4);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.actionAppObject?null:t.actionAppObject.image),o.LSH)("alt",(null==t.actionAppObject?null:t.actionAppObject.displayName)+" Integration")}}function OI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).clearSearchTextOptions("searchTextActionOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function MI(t,e){1&t&&o._UZ(0,"img",71)}function II(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(5);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.actionAppObject?null:t.actionAppObject.image),o.LSH)("alt",(null==t.actionAppObject?null:t.actionAppObject.displayName)+" Integration")}}function SI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).clearSearchTextOptions("searchTextActionOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function PI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",74),o.NdJ("click",function(){const e=o.CHM(t).$implicit;
1return o.oxw(5).setActionAppOptionsObject(e)}),o._UZ(2,"img",72),o.TgZ(3,"div",86),o.TgZ(4,"h3"),o._uU(5),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(5);o.xp6(1),o.Q6J("ngClass",o.VKq(5,VM,n.actionAppOptionObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+(null==n.actionAppObject?null:n.actionAppObject.image),o.LSH)("alt",(null==n.actionAppObject?null:n.actionAppObject.displayName)+" Integration"),o.xp6(3),o.hij(" ",t.trigger_action_displayname,""),o.xp6(2),o.Oqu(t.desc)}}function NI(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No Action Event Found "),o.qZA())}function qI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).emailUs("action","event")}),o._uU(1,"Submit your action event request"),o.qZA()}}function UI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",80),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).closeActionOverlayMobile()}),o.TgZ(1,"div",81),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).stopPropagation(e)}),o.TgZ(2,"div",82),o.TgZ(3,"h3",83),o._uU(4,"Select Action Event "),o.qZA(),o.qZA(),o.TgZ(5,"div",44),o.TgZ(6,"span",45),o.YNc(7,MI,1,0,"img",46),o.YNc(8,II,1,2,"img",47),o.qZA(),o.TgZ(9,"input",93),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(4);return(null==n.actionAppOptionObject?null:n.actionAppOptionObject.trigger_action_displayname)||(n.searchTextActionOptions=e)})("input",function(){o.CHM(t);const e=o.oxw(4);return e.filterAppOptions(e.searchTextActionOptions,"actionAppOptionObject")}),o.qZA(),o.YNc(10,SI,4,0,"button",49),o.qZA(),o.TgZ(11,"ul",85),o.YNc(12,PI,8,7,"li",53),o.ALo(13,"slice"),o.YNc(14,NI,2,0,"li",54),o.YNc(15,qI,2,0,"a",55),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("ngClass",o.VKq(16,cI,t.showActionAppOptionsMenuInMobile)),o.xp6(5),o.ekj("border-success",t.actionAppOptionObject)("border-danger",t.showBorderAlert&&!t.actionAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.actionAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.actionAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)||t.searchTextActionOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextActionOptions||(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)),o.xp6(2),o.Q6J("ngForOf",o.Dn7(13,12,t.actionFilteredAppOptionsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.actionFilteredAppOptionsList.length),o.xp6(1),o.Q6J("ngIf",0===t.actionFilteredAppOptionsList.length)}}function EI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",77),o.TgZ(1,"div",44),o.TgZ(2,"span",45),o.YNc(3,kI,1,0,"img",46),o.YNc(4,TI,1,2,"img",47),o.qZA(),o.TgZ(5,"input",92),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(3);return(null==n.actionAppOptionObject?null:n.actionAppOptionObject.trigger_action_displayname)||(n.searchTextActionOptions=e)})("click",function(){return o.CHM(t),o.oxw(3).showActionAppOptionsMenuInMobile=!0}),o.qZA(),o.YNc(6,OI,4,0,"button",49),o.qZA(),o.YNc(7,UI,16,18,"div",79),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.ekj("border-success",t.actionAppOptionObject)("border-danger",t.showBorderAlert&&!t.actionAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.actionAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.actionAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)||t.searchTextActionOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextActionOptions||(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.showActionAppOptionsMenuInMobile)}}function FI(t,e){1&t&&o._UZ(0,"img",71)}function DI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(4);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.triggerAppObject?null:t.triggerAppObject.image),o.LSH)("alt",(null==t.triggerAppObject?null:t.triggerAppObject.displayName)+" Integration")}}function LI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).clearSearchTextOptions("searchTextTriggerOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function JI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",100),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).setTriggerAppOptionsObject(e)}),o._UZ(2,"img",72),o.TgZ(3,"div",86),o.TgZ(4,"h3"),o._uU(5),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(5,VM,n.triggerAppOptionObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+(null==n.triggerAppObject?null:n.triggerAppObject.image),o.LSH)("alt",(null==n.triggerAppObject?null:n.triggerAppObject.displayName)+" Integration"),o.xp6(3),o.hij(" ",t.trigger_action_displayname,""),o.xp6(2),o.Oqu(t.de
1sc)}}function jI(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No Trigger Event Found "),o.qZA())}function RI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).emailUs("trigger","event")}),o._uU(1,"Submit your trigger event request"),o.qZA()}}function $I(t,e){1&t&&o._UZ(0,"img",90)}function BI(t,e){1&t&&o._UZ(0,"img",91)}function HI(t,e){1&t&&o._UZ(0,"img",71)}function QI(t,e){if(1&t&&o._UZ(0,"img",72),2&t){const t=o.oxw(4);o.Q6J("src",t.appyConfig.cdnMediaPath+(null==t.actionAppObject?null:t.actionAppObject.image),o.LSH)("alt",(null==t.actionAppObject?null:t.actionAppObject.displayName)+" Integration")}}function YI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).closeOverlayMobileOption("searchTextActionOptions")}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}function zI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",100),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).setActionAppOptionsObject(e)}),o._UZ(2,"img",72),o.TgZ(3,"div",86),o.TgZ(4,"h3"),o._uU(5),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(5,VM,n.actionAppOptionObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+(null==n.actionAppObject?null:n.actionAppObject.image),o.LSH)("alt",(null==n.actionAppObject?null:n.actionAppObject.displayName)+" Integration"),o.xp6(3),o.hij(" ",t.trigger_action_displayname,""),o.xp6(2),o.Oqu(t.desc)}}function VI(t,e){1&t&&(o.TgZ(0,"li",75),o._uU(1," No Action Event Found "),o.qZA())}function GI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",76),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).emailUs("action","event")}),o._uU(1,"Submit your action event request"),o.qZA()}}const WI=function(t){return{open:t}};function KI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",94),o.TgZ(1,"div",95),o.TgZ(2,"div",44),o.TgZ(3,"span",45),o.YNc(4,FI,1,0,"img",46),o.YNc(5,DI,1,2,"img",47),o.qZA(),o.TgZ(6,"input",96),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(3);return(null==n.triggerAppOptionObject?null:n.triggerAppOptionObject.trigger_action_displayname)||(n.searchTextTriggerOptions=e)})("click",function(){return o.CHM(t),o.oxw(3).triggerAppOptionsToggleMenu()})("input",function(){o.CHM(t);const e=o.oxw(3);return e.filterAppOptions(e.searchTextTriggerOptions,"triggerAppOptionObject")}),o.qZA(),o.YNc(7,LI,4,0,"button",49),o.qZA(),o.TgZ(8,"div",97),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).actionOptionsCloseOverlay()}),o.TgZ(9,"div",51),o.NdJ("click",function(e){return o.CHM(t),o.oxw(3).stopPropagation(e)}),o.TgZ(10,"ul",85),o.YNc(11,JI,8,7,"li",53),o.ALo(12,"slice"),o.YNc(13,jI,2,0,"li",54),o.YNc(14,RI,2,0,"a",55),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(15,"div",98),o.YNc(16,$I,1,0,"img",88),o.YNc(17,BI,1,0,"img",89),o.qZA(),o.TgZ(18,"div",95),o.TgZ(19,"div",44),o.TgZ(20,"span",45),o.YNc(21,HI,1,0,"img",46),o.YNc(22,QI,1,2,"img",47),o.qZA(),o.TgZ(23,"input",99),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(3);return(null==n.actionAppOptionObject?null:n.actionAppOptionObject.trigger_action_displayname)||(n.searchTextActionOptions=e)})("click",function(){return o.CHM(t),o.oxw(3).actionAppOptionsToggleMenu()})("input",function(){o.CHM(t);const e=o.oxw(3);return e.filterAppOptions(e.searchTextActionOptions,"actionAppOptionObject")}),o.qZA(),o.YNc(24,YI,4,0,"button",49),o.qZA(),o.TgZ(25,"div",97),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).actionOptionsCloseOverlay()}),o.TgZ(26,"div",51),o.NdJ("click",function(e){return o.CHM(t),o.oxw(3).stopPropagation(e)}),o.TgZ(27,"ul",85),o.YNc(28,zI,8,7,"li",53),o.ALo(29,"slice"),o.YNc(30,VI,2,0,"li",54),o.YNc(31,GI,2,0,"a",55),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.ekj("border-success",t.triggerAppOptionObject)("border-danger",t.showBorderAlert&&!t.triggerAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)||t.searchTextTriggerOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextTriggerOptions||(null==t.triggerAppOptionObject?null:t.triggerAppOptionObject.trigger_action_displayname)),o.xp6(1),o.Q6J("ngClass",o.VKq(34,WI,t.triggerOptionsOverlayOpen)),o.xp6(3),o.Q6J("ngForOf",o.Dn7(12,26,t.triggerFilteredAppOptionsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.triggerFilteredAppOptionsList.length),o.xp6(1),o.Q6J("ngIf",0===t.triggerFilteredAppOptionsList.length),o.xp6(2),o.Q6J("ngIf",!t.triggerAppOptionObject||!t.actionAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppOptionObject&&t.actionAppOptionObject),o.xp6(2),o.ekj("border-success",t.actionAppOptionObject)("border-danger",t.showBorderAlert&&!t.actionAppOptionObject),o.xp6(2),o.Q6J("ngIf",!t.actionAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.actionAppOptionObject),o.xp6(1),o.Q6J("ngModel",(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)||t.searchTextActionOptions),o.xp6(1),o.Q6J("ngIf",t.searchTextActionOptions||(null==t.actionAppOptionObject?null:t.actionAppOptionObject.trigger_action_displayname)),o.xp6(1),o.Q6J("ngClass",o.VKq(36,WI,t.actionOptionsOverlayOpen)),o.xp6(3),o.Q6J("ngForOf",o.Dn7(29,30,t.actionFilteredAppOptionsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.actionFilteredAppOptionsList.length),o.xp6(1),o.Q6J("ngIf",0===t.actionFilteredAppOptionsList.length)}}function XI(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",111),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).switchRecommendationToAppOptions()}),o.O4$(),o.TgZ(1,"svg",68),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o.qZA()}}const eS=function(t){return{selectedCard:t}};function nS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",112),o.TgZ(1,"div",113),o.NdJ("click",function(){const e=o.CHM(t).index;return o.oxw(4).selectCard(e)}),o.TgZ(2,"ul",114),o.TgZ(3,"li",115),o._UZ(4,"img",116),o.qZA(),o.TgZ(5,"li",115),o._UZ(6,"img",116),o.qZA(),o.qZA(),o.TgZ(7,"div",117),o.TgZ(8,"a",118),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).createTwoStepConnectWithAppOptions(e)}),o._uU(9),o.qZA(),o.TgZ(10,"div",119),o.TgZ(11,"h4"),o._uU(12,"When this happens:"),o.qZA(),o.TgZ(13,"p"),o._uU(14),o.qZA(),o.qZA(),o.TgZ(15,"div",119),o.TgZ(16,"h4"),o._uU(17,"Then do this:"),o.qZA(),o.TgZ(18,"p"),o._uU(19),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(9,eS,i.selectedCard===n)),o.xp6(3),o.Q6J("src",i.appyConfig.cdnMediaPath+(null==i.triggerAppObject?null:i.triggerAppObject.image),o.LSH),o.xp6(2),o.Q6J("src",i.appyConfig.cdnMediaPath+(null==i.actionAppObject?null:i.actionAppObject.image),o.LSH),o.xp6(3),o.HOy("",null==t[1]?null:t[1].trigger_action_displayname," in ",null==i.actionAppObject?null:i.actionAppObject.displayName," when ",null==t[0]?null:t[0].trigger_action_displayname," in ",null==i.triggerAppObject?null:i.triggerAppObject.displayName,""),o.xp6(5),o.Oqu(null==t[0]?null:t[0].trigger_action_displayname),o.xp6(5),o.Oqu(null==t[1]?null:t[1].trigger_action_displayname)}}const iS=function(t){return{rotate:t}};function oS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",120),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).toggleViewMore()}),o._uU(1),o.O4$(),o.TgZ(2,"svg",121),o._UZ(3,"path",122),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.hij(" ",t.showMore?"View Less":"View More"," "),o.xp6(1),o.Q6J("ngClass",o.VKq(2,iS,t.showMore))}}function rS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",123),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.createTwoStepConnect(e.triggerAppObject,e.actionAppObject)}),o._uU(1," Proceed "),o.qZA()}}function sS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",124),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).createTwoStepConnectWithoutAppOptions()}),o._uU(1," Skip & Create Your Own Connects "),o.qZA()}}function aS(t,e){1&t&&(o.TgZ(0,"button",125),o._uU(1," Processing"),o._UZ(2,"span",126),o.qZA())}const cS=function(t){return{thinScrollHeight:t}};function lS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",101),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).closeRecommendOverlay()}),o.TgZ(1,"div",81),o.NdJ("click",function(e){return o.CHM(t),o.oxw(3).stopPropagation(e)}),o.TgZ(2,"div",82),o.TgZ(3,"h3",83),o._uU(4),o.qZA(),o.YNc(5,XI,4,0,"button",102),o.qZA(),o.TgZ(6,"div",103),o.TgZ(7,"div",104),o.YNc(8,nS,20,11,"div",105),o.qZA(),o.qZA(),o.TgZ(9,"div",106),o.YNc(10,oS,4,4,"button",107),o.YNc(11,rS,2,0,"button",108),o.YNc(12,sS,2,0,"button",109),o.YNc(13,aS,3,0,"button",110),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(9,cI,t.openRecommendOverlay)),o.xp6(4),o.hij("",(null==t.nonRepetitiveCombinations?null:t.nonRepetitiveCombinations.length)>0?"Recommended Loops For You!":"No Recommended Loops Found!"," "),o.xp6(1),o.Q6J("ngIf",(null==t.nonRepetitiveCombinations?null:t.nonRepetitiveCombinations.length)>0||t.isMobileView),o.xp6(1),o.Q6J("ngClass",o.VKq(11,cS,t.showMore)),o.xp6(2),o.Q6J("ngForOf",t.recommendationCards),o.xp6(2),o.Q6J("ngIf",(null==t.nonRepetitiveCombinations?null:t.nonRepetitiveCombinations.length)>3),o.xp6(1),o.Q6J("ngIf",(null==t.nonRepetitiveCombinations?null:t.nonRepetitiveCombinations.length)>0),o.xp6(1),o.Q6J("ngIf",t.isSkipButtonActive),o.xp6(1),o.Q6J("ngIf",!t.isSkipButtonActive)}}const dS=function(t){return{"ms-0":t}};function uS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",127),o._UZ(1,"img",128),o.TgZ(2,"p",129),o._uU(3,"Create Connect Using Prompt."),o.qZA(),o.TgZ(4,"button",130),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).openAIAgent()}),o._uU(5," Try Now "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(1,dS,t.triggerAppObject&&t.actionAppObject))}}function pS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",127),o.TgZ(1,"button",130),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).switchAppOptionsToRecommendation()}),o._uU(2," Show Recommendations > "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(1,dS,t.triggerAppObject&&t.actionAppObject&&!t.triggerAppOptionObject&&!t.actionAppOptionObject))}}function hS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",131),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.createTwoStepConnectWithAppOptions([e.triggerAppOptionObject,e.actionAppOptionObject])}),o._uU(1," Setup your Connects "),o.qZA()}}function gS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",132),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.createTwoStepConnect(e.triggerAppObject,e.actionAppObject)}),o._uU(1," Skip & Create Your Own Connects "),o.qZA()}}function fS(t,e){1&t&&(o.TgZ(0,"button",133),o._uU(1," Processing"),o._UZ(2,"span",126),o.qZA())}function mS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"section",37),o.TgZ(1,"div",38),o.TgZ(2,"h2",39),o._uU(3,"Build my workflow"),o.qZA(),o.YNc(4,HM,4,0,"button",40),o.qZA(),o.TgZ(5,"div",41),o.TgZ(6,"div",42),o.TgZ(7,"h5"),o._uU(8,"When this triggers"),o.qZA(),o.TgZ(9,"div",43),o.TgZ(10,"div",44),o.TgZ(11,"span",45),o.YNc(12,QM,1,0,"img",46),o.YNc(13,YM,1,2,"img",47),o.qZA(),o.TgZ(14,"input",48),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(2);return(null==n.triggerAppObject?null:n.triggerAppObject.displayName)||(n.searchTextTrigger=e)})("click",function(){return o.CHM(t),o.oxw(2).triggerAppToggleMenu()})("input",function(){o.CHM(t);const e=o.oxw(2);return e.filterApps(e.searchTextTrigger,"triggerAppObject")}),o.qZA(),o.YNc(15,zM,4,0,"button",49),o.qZA(),o.TgZ(16,"div",50),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).actionCloseOverlay()}),o.TgZ(17,"div",51),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).stopPropagation(e)}),o.TgZ(18,"ul",52),o.YNc(19,GM,4,6,"li",53),o.ALo(20,"slice"),o.YNc(21,WM,2,0,"li",54),o.YNc(22,KM,2,0,"a",55),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,dI,8,9,"div",56),o.qZA(),o.YNc(24,hI,3,2,"div",57),o.YNc(25,mI,3,2,"div",57),o.YNc(26,xI,3,2,"div",57),o.TgZ(27,"div",42),o.TgZ(28,"h5"),o._uU(29,"Then do this"),o.qZA(),o.TgZ(30,"div",43),o.TgZ(31,"div",44),o.TgZ(32,"span",45),o.YNc(33,_I,
11,0,"img",46),o.YNc(34,CI,1,2,"img",47),o.qZA(),o.TgZ(35,"input",58),o.NdJ("ngModelChange",function(e){o.CHM(t);const n=o.oxw(2);return(null==n.actionAppObject?null:n.actionAppObject.displayName)||(n.searchTextAction=e)})("click",function(){return o.CHM(t),o.oxw(2).actionAppToggleMenu()})("input",function(){o.CHM(t);const e=o.oxw(2);return e.filterApps(e.searchTextAction,"actionAppObject")}),o.qZA(),o.YNc(36,wI,4,0,"button",49),o.qZA(),o.TgZ(37,"div",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).triggerCloseOverlay()}),o.TgZ(38,"div",51),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).stopPropagation(e)}),o.TgZ(39,"ul",52),o.YNc(40,yI,4,6,"li",53),o.ALo(41,"slice"),o.YNc(42,AI,2,0,"li",54),o.YNc(43,ZI,2,0,"a",55),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(44,EI,8,9,"div",56),o.qZA(),o.qZA(),o.YNc(45,KI,32,38,"div",60),o.YNc(46,lS,14,13,"div",61),o.TgZ(47,"div",62),o.YNc(48,uS,6,3,"div",63),o.YNc(49,pS,3,3,"div",63),o.YNc(50,hS,2,0,"button",64),o.YNc(51,gS,2,0,"button",65),o.YNc(52,fS,3,0,"button",66),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(4),o.Q6J("ngIf",0!==t.userCompleteConnects.length||0!==t.userDraftConnects.length),o.xp6(6),o.ekj("border-success",t.triggerAppObject)("border-danger",t.showBorderAlert&&!t.triggerAppObject),o.xp6(2),o.Q6J("ngIf",!t.triggerAppObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject),o.xp6(1),o.Q6J("ngModel",(null==t.triggerAppObject?null:t.triggerAppObject.displayName)||t.searchTextTrigger),o.xp6(1),o.Q6J("ngIf",t.searchTextTrigger||(null==t.triggerAppObject?null:t.triggerAppObject.displayName)),o.xp6(1),o.Q6J("ngClass",o.VKq(45,WI,t.triggerOverlayOpen)),o.xp6(3),o.Q6J("ngForOf",o.Dn7(20,37,t.triggerFilteredAppsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.triggerFilteredAppsList.length),o.xp6(1),o.Q6J("ngIf",0===t.triggerFilteredAppsList.length),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.showAppOptionsMenuInMobile),o.xp6(1),o.Q6J("ngIf",!t.isMobileView),o.xp6(1),o.Q6J("ngIf",t.isMobileView&&!t.showAppOptionsMenuInMobile),o.xp6(1),o.Q6J("ngIf",t.isMobileView&&t.showAppOptionsMenuInMobile),o.xp6(5),o.ekj("border-success",t.actionAppObject)("border-danger",t.showBorderAlert&&!t.actionAppObject),o.xp6(2),o.Q6J("ngIf",!t.actionAppObject),o.xp6(1),o.Q6J("ngIf",t.actionAppObject),o.xp6(1),o.Q6J("ngModel",(null==t.actionAppObject?null:t.actionAppObject.displayName)||t.searchTextAction),o.xp6(1),o.Q6J("ngIf",t.searchTextAction||(null==t.actionAppObject?null:t.actionAppObject.displayName)),o.xp6(1),o.Q6J("ngClass",o.VKq(47,WI,t.actionOverlayOpen)),o.xp6(3),o.Q6J("ngForOf",o.Dn7(41,41,t.actionFilteredAppsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.actionFilteredAppsList.length),o.xp6(1),o.Q6J("ngIf",0===t.actionFilteredAppsList.length),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.showAppOptionsMenuInMobile),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&!t.showRecommendationCard&&t.showAppOptionsMenu),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&t.showRecommendationCard),o.xp6(2),o.Q6J("ngIf",!(t.showShowRecommendationButton&&!t.triggerAppOptionObject&&!t.actionAppOptionObject)),o.xp6(1),o.Q6J("ngIf",t.showShowRecommendationButton&&t.triggerAppObject&&t.actionAppObject&&!t.triggerAppOptionObject&&!t.actionAppOptionObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&(t.triggerAppOptionObject||t.actionAppOptionObject)&&t.isSkipButtonActive),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&!t.triggerAppOptionObject&&!t.actionAppOptionObject&&t.isSkipButtonActive),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject&&t.actionAppObject&&!t.isSkipButtonActive)}}function vS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",149),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).buildMyWorkflow()}),o.O4$(),o.TgZ(1,"svg",150),o._UZ(2,"path",151),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("disabled",t.aiForm.get("aiText").invalid||t.aiForm.get("aiText").pristine)}}function bS(t,e){1&t&&(o.ynx(0),o._UZ(1,"span",155),o._uU(2," Creating your loop\u2026 "),o.BQk())}function xS(t,e){1&t&&(o.ynx(0),o._uU(1," Building"),o._UZ(2,"span",126),o.BQk())}function _S(t,e){1&t&&(o.ynx(0),o.O4$(),o.TgZ(1,"svg",156),o._UZ(2,"path",157),o.qZA(),o._uU(3," Create my loop "),o.BQk())}function CS(t,e){1&t&&(o.TgZ(0,"p",158),o._uU(1," Setting up your workflow"),o.TgZ(2,"span",159),o._uU(3,"."),o.qZA(),o.TgZ(4,"span",159),o._uU(5,"."),o.qZA(),o.TgZ(6,"span",159),o._uU(7,"."),o.qZA(),o._uU(8," opening the editor "),o.qZA())}function wS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",152),o.TgZ(1,"button",153),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).buildMyWorkflow()}),o.YNc(2,bS,3,0,"ng-container",1),o.YNc(3,xS,3,0,"ng-container",1),o.YNc(4,_S,4,0,"ng-container",1),o.qZA(),o.YNc(5,CS,9,0,"p",154),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.ekj("is-creating",t.isCreatingLoop),o.Q6J("disabled",t.aiForm.get("aiText").invalid||t.aiForm.get("aiText").pristine||t.isLoading||t.isCreatingLoop||t.charCount>t.charLimit),o.xp6(1),o.Q6J("ngIf",t.isCreatingLoop),o.xp6(1),o.Q6J("ngIf",!t.isCreatingLoop&&t.isLoading&&t.isAiPrompt),o.xp6(1),o.Q6J("ngIf",!t.isCreatingLoop&&!t.isLoading&&t.showGenerateButton),o.xp6(1),o.Q6J("ngIf",t.isCreatingLoop)}}
1function yS(t,e){if(1&t&&(o.TgZ(0,"p",160),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij(" Character limit exceeded! (",t.charCount,"/1000) ")}}function AS(t,e){1&t&&(o.TgZ(0,"p",160),o._uU(1," Sorry, No AI generated agent found. Please modify the prompt. "),o.qZA())}function ZS(t,e){1&t&&(o.TgZ(0,"div",161),o._UZ(1,"img",162),o.TgZ(2,"p",163),o._uU(3," Create Loop Manually."),o.qZA(),o.TgZ(4,"button",164),o._uU(5," Try Now "),o.qZA(),o.qZA())}function kS(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw().index;o.xp6(1),o.Oqu(t)}}function TS(t,e){if(1&t&&(o.TgZ(0,"li",173),o.TgZ(1,"span",174),o._UZ(2,"img",175),o.qZA(),o.TgZ(3,"p",176),o.TgZ(4,"span",177),o._uU(5),o.ALo(6,"capitalizeWords"),o.YNc(7,kS,2,1,"span",1),o._uU(8),o.ALo(9,"capitalizeWords"),o.qZA(),o.TgZ(10,"span",178),o._uU(11),o.ALo(12,"capitalizeWords"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(4);o.xp6(2),o.Q6J("alt",t.appImage)("src",i.appyConfig.cdnMediaPath+t.appImage,o.LSH),o.xp6(3),o.hij(" ",o.lcZ(6,6,t.appOptionsType)," "),o.xp6(2),o.Q6J("ngIf",n>0&&i.connectEventsFromTextPrompt.length>2),o.xp6(1),o.hij(" (",o.lcZ(9,8,t.appName),") "),o.xp6(3),o.hij(" ",o.lcZ(12,10,t.appOptionsDisplayName)," ")}}function OS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",179),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).createMultiStepConnect()}),o._uU(1," Proceed with it "),o.qZA()}if(2&t){const t=o.oxw(4);o.Q6J("disabled",!t.showProceedButton)}}function MS(t,e){1&t&&(o.TgZ(0,"button",180),o._uU(1," Processing"),o._UZ(2,"span",126),o.qZA())}function IS(t,e){if(1&t&&(o.TgZ(0,"div",165),o.TgZ(1,"h2",166),o._uU(2,"Here's your AI Generated Agent: "),o.qZA(),o.TgZ(3,"div",167),o.TgZ(4,"p"),o._uU(5),o.qZA(),o.TgZ(6,"ul",168),o.YNc(7,TS,13,12,"li",169),o.qZA(),o.qZA(),o.TgZ(8,"div",170),o.YNc(9,OS,2,1,"button",171),o.YNc(10,MS,3,0,"button",172),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(5),o.Oqu(t.userOldPromptInput),o.xp6(2),o.Q6J("ngForOf",t.connectEventsFromTextPrompt),o.xp6(2),o.Q6J("ngIf",!t.showCreatingAgentButton),o.xp6(1),o.Q6J("ngIf",t.showCreatingAgentButton)}}function SS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",134),o.TgZ(1,"div",135),o.TgZ(2,"button",136),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).insertPromptToken("mention")}),o.TgZ(3,"span",137),o._uU(4,"@"),o.qZA(),o._uU(5," Mention App "),o.qZA(),o.TgZ(6,"button",136),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).insertPromptToken("variable")}),o.O4$(),o.TgZ(7,"svg",138),o._UZ(8,"path",139),o.qZA(),o._uU(9," Add Variable "),o.qZA(),o.qZA(),o.kcU(),o.TgZ(10,"form",140),o.TgZ(11,"div",141),o.TgZ(12,"textarea",142),o.NdJ("input",function(e){return o.CHM(t),o.oxw(2).adjustTextareaRows(e)}),o._uU(13,"                                    "),o.qZA(),o.YNc(14,vS,3,1,"button",143),o.YNc(15,wS,6,7,"div",144),o.qZA(),o.qZA(),o.YNc(16,yS,2,1,"p",145),o.YNc(17,AS,2,0,"p",145),o.TgZ(18,"div",146),o.YNc(19,ZS,6,0,"div",147),o.qZA(),o.YNc(20,IS,11,4,"div",148),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(10),o.Q6J("formGroup",t.aiForm),o.xp6(2),o.ekj("disabled",t.isLoading&&t.isAiPrompt),o.xp6(2),o.Q6J("ngIf",!t.showGenerateButton),o.xp6(1),o.Q6J("ngIf",t.isCreatingLoop||t.isLoading&&t.isAiPrompt||!t.isLoading&&t.showGenerateButton),o.xp6(1),o.Q6J("ngIf",t.charCount>t.charLimit),o.xp6(1),o.Q6J("ngIf",!t.showProceedButton),o.xp6(2),o.Q6J("ngIf",!t.isLoading),o.xp6(1),o.Q6J("ngIf",t.isAiPrompt&&!t.isLoading)}}function PS(t,e){if(1&t&&(o.TgZ(0,"h1",181),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("",t.translation.YOUR_CONNECTS," ")}}function NS(t,e){if(1&t&&(o.TgZ(0,"h1",182),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("",t.translation.YOUR_CONNECTS," ")}}function qS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"form",183),o.TgZ(1,"div",184),o.TgZ(2,"button",185),o.O4$(),o.TgZ(3,"svg",186),o._UZ(4,"rect",187),o._UZ(5,"path",188),o._UZ(6,"path",189),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"input",190,191),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).searchTxt=e})("keyup",function(){return o.CHM(t),o.oxw(2).setPageIndex()})("keydown",function(){return o.CHM(t),o.oxw(2).setPageIndex()}),o.qZA(),o.TgZ(9,"button",192),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).hideForm()}),o.O4$(),o.TgZ(10,"svg",193),o._UZ(11,"path",194),o._UZ(12,"path",195),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(7),o.s9C("placeholder",t.translation.FILTER_CONNECTS),o.Q6J("ngModel",t.searchTxt)}}function US(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",198),o._UZ(1,"rect",187),o._UZ(2,"path",188),o._UZ(3,"path",189),o.qZA())}function ES(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",196),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleForm()}),o.YNc(1,US,4,0,"svg",197),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",0!==t.userCompleteConnects.length||0!==t.userDraftConnects.length)}}function FS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",209),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).setActiveTab("published")}),o.O4$(),o.TgZ(1,"svg",210),o._UZ(2,"path",211),o.qZA(),o._uU(3," Published"),o.qZA()}if(2&t){const t=o.oxw(3);o.ekj("active","published"===t.activeTab)}}function DS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",212),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).setActiveTab("draft")}),o.O4$(),o.TgZ(1,"svg",213),o._UZ(2,"path",214),o._UZ(3,"path",215),o.qZA(),o._uU(4," Draft "),o.qZA()}if(2&t){const t=o.oxw(3);o.ekj("active","draft"===t.activeTab)}}function LS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",216),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).toggleListViewChange()}),o.O4$(),o.TgZ(1,"svg",217),o._UZ(2,"path",218),o._UZ(3,"path",219),o._UZ(4,"path",220),o._UZ(5,"path",221),o.qZA(),o.qZA()}}function JS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",222),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).toggleCardViewChange()}),o.O4$(),o.TgZ(1,"svg",223),o._UZ(2,"path",224),o._UZ(3,"path",225),o._UZ(4,"path",226),o._UZ(5,"path",227),o._UZ(6,"path",228),o._UZ(7,"path",229),o.qZA(),o.qZA()}}function jS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",230),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).toggleForm()}),o.O4$(),o.TgZ(1,"svg",231),o._UZ(2,"rect",187),o._UZ(3,"path",188),o._UZ(4,"path",189),o.qZA(),o.qZA()}}function RS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",232),o.TgZ(1,"span",233),o._uU(2),o.qZA(),o.TgZ(3,"button",234),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).toggleSelectAll()}),o._uU(4,"Select All "),o.qZA(),o.TgZ(5,"button",234),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).unselectAllUserConnects()}),o._uU(6,"Clear"),o.qZA(),o.TgZ(7,"button",235),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).bulkMoveToFolder()}),o.O4$(),o.TgZ(8,"svg",236),o._UZ(9,"path",237),o._UZ(10,"path",238),o._UZ(11,"path",239),o.qZA(),o._uU(12," Move to Folder "),o.qZA(),o.kcU(),o.TgZ(13,"button",240),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).deleteMultipleConnects("userCompleteConnect")}),o.O4$(),o.TgZ(14,"svg",193),o._UZ(15,"path",241),o._UZ(16,"path",242),o._UZ(17,"path",243),o._UZ(18,"path",244),o.qZA(),o._uU(19," Delete "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.hij("Selected (",t.checkIfSelectedCount(),")")}}function $S(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"form",245),o.TgZ(1,"div",246),o.TgZ(2,"button",185),o.O4$(),o.TgZ(3,"svg",186),o._UZ(4,"re
1ct",187),o._UZ(5,"path",188),o._UZ(6,"path",189),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"input",247,191),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).searchTxt=e})("keyup",function(){return o.CHM(t),o.oxw(3).setPageIndex()})("keydown",function(){return o.CHM(t),o.oxw(3).setPageIndex()})("input",function(e){return o.CHM(t),o.oxw(3).onSearchTextChanged(e)}),o.qZA(),o.TgZ(9,"button",192),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).hideForm()}),o.O4$(),o.TgZ(10,"svg",193),o._UZ(11,"path",194),o._UZ(12,"path",195),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(7),o.s9C("placeholder",t.translation.FILTER_CONNECTS),o.Q6J("ngModel",t.searchTxt)}}function BS(t,e){if(1&t&&(o.TgZ(0,"div",34),o.TgZ(1,"div",199),o.TgZ(2,"div",200),o.YNc(3,FS,4,2,"button",201),o.YNc(4,DS,5,2,"button",202),o.qZA(),o.TgZ(5,"div",203),o.YNc(6,LS,6,0,"button",204),o.YNc(7,JS,8,0,"button",205),o.YNc(8,jS,5,0,"button",206),o.qZA(),o.YNc(9,RS,20,1,"div",207),o.YNc(10,$S,13,2,"form",208),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(3),o.Q6J("ngIf",!t.isHidePublish()),o.xp6(1),o.Q6J("ngIf",!t.isHideDraft()),o.xp6(2),o.Q6J("ngIf",t.isListViewButton&&t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",t.isCardViewButton&&t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",t.showButton&&t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",!t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",t.showForm)}}function HS(t,e){1&t&&(o.TgZ(0,"li",267),o.TgZ(1,"div",268),o._UZ(2,"span",254),o.qZA(),o.TgZ(3,"div",255),o._UZ(4,"span",269),o.qZA(),o.TgZ(5,"div",270),o._UZ(6,"span",256),o.qZA(),o.TgZ(7,"div",271),o._UZ(8,"span",272),o._UZ(9,"span",273),o.qZA(),o.TgZ(10,"div",261),o._UZ(11,"span",256),o.qZA(),o.TgZ(12,"div",263),o._UZ(13,"span",256),o.qZA(),o.TgZ(14,"div",264),o._UZ(15,"span",274),o.qZA(),o.qZA())}const QS=function(){return[1,2,3,4,5,6,7]};function YS(t,e){1&t&&(o.TgZ(0,"div",251),o.TgZ(1,"div",252),o.TgZ(2,"div",253),o._UZ(3,"span",254),o.qZA(),o.TgZ(4,"div",255),o._UZ(5,"span",256),o.qZA(),o.TgZ(6,"div",257),o._UZ(7,"span",258),o.qZA(),o.TgZ(8,"div",259),o._UZ(9,"span",260),o.qZA(),o.TgZ(10,"div",261),o._UZ(11,"span",262),o.qZA(),o.TgZ(12,"div",263),o._UZ(13,"span",262),o.qZA(),o.TgZ(14,"div",264),o._UZ(15,"span",260),o.qZA(),o.qZA(),o.TgZ(16,"ul",265),o.YNc(17,HS,16,0,"li",266),o.qZA(),o.qZA()),2&t&&(o.xp6(17),o.Q6J("ngForOf",o.DdM(1,QS)))}function zS(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",253),o.TgZ(1,"label",285),o.TgZ(2,"input",286),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(5).selectedAll=e})("ngModelChange",function(){o.CHM(t);const e=o.oxw(5);return e.selectAll(e.userCompleteConnects)}),o.qZA(),o._UZ(3,"span",287),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5);o.xp6(2),o.Q6J("ngModel",t.selectedAll)}}function VS(t,e){if(1&t&&(o.TgZ(0,"div",252),o.YNc(1,zS,4,1,"div",281),o.TgZ(2,"div",282),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA(),o.TgZ(5,"div",283),o.TgZ(6,"span"),o._uU(7,"ID"),o.qZA(),o.qZA(),o.TgZ(8,"div",259),o.TgZ(9,"span"),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",261),o.TgZ(12,"span"),o._uU(13,"Created On "),o.qZA(),o.qZA(),o.TgZ(14,"div",263),o.TgZ(15,"span"),o._uU(16,"Last edit"),o.qZA(),o.qZA(),o.TgZ(17,"div",284),o.TgZ(18,"span"),o._uU(19,"Actions"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngIf",t.userCompleteConnects.length>0),o.xp6(3),o.Oqu(t.translation.CONNECT_NAME),o.xp6(6),o.Oqu(t.translation.CONNECT_APPS)}}function GS(t,e){if(1&t&&(o.TgZ(0,"div",302),o.TgZ(1,"div",303),o.TgZ(2,"div",304),o._UZ(3,"img",305),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(3),o.s9C("src",t.actionImage?e.appyConfig.cdnMediaPath+t.actionImage:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function WS(t,e){if(1&t&&(o.TgZ(0,"span",366),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij("+",t.totalApp-2,"")}}function KS(t,e){if(1&t&&o._UZ(0,"img",305),2&t){const t=o.oxw(2).$implicit,e=o.oxw(5);o.s9C("src",t.lastActionImage?e.appyConfig.cdnMediaPath+t.lastActionImage:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function XS(t,e){if(1&t&&(o.TgZ(0,"div",302),o.TgZ(1,"div",303),o.TgZ(2,"div",304),o.YNc(3,WS,2,1,"span",364),o.YNc(4,KS,1,1,"img",365),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(3),o.Q6J("ngIf",t.totalApp>3),o.xp6(1),o.Q6J("ngIf",3==t.totalApp)}}function tP(t,e){1&t&&(o.TgZ(0,"div",367),o._UZ(1,"span",368),o._uU(2," Active "),o.qZA())}function eP(t,e){1&t&&(o.TgZ(0,"div",367),o._UZ(1,"span",369),o._uU(2," InActive "),o.qZA())}function nP(t,e){1&t&&(o.TgZ(0,"button",370),o._UZ(1,"span",368),o._uU(2," Active "),o.qZA())}function iP(t,e){1&t&&(o.TgZ(0,"button",370),o._UZ(1,"span",369),o._uU(2," InActive "),o.qZA())}function oP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",371),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(5).editConnect(e.connectId)}),o._uU(1," View Connects"),o.qZA()}}function rP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",371),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(5).editConnect(e.connectId)}),o._uU(1," View Connects "),o.qZA()}}
1function sP(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",372),o.NdJ("click",function(t){return t.stopPropagation(),t.preventDefault()}),o.O4$(),o.TgZ(2,"svg",373),o._UZ(3,"path",237),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(5),o.hij("In Folder: ",t.folderName||"Folder","")}}function aP(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",372),o.NdJ("click",function(t){return t.stopPropagation(),t.preventDefault()}),o.O4$(),o.TgZ(2,"svg",373),o._UZ(3,"path",237),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(7);o.xp6(5),o.hij("In Folder: ",(null==t.userConnectMobileData?null:t.userConnectMobileData.folderName)||"Folder","")}}function cP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",374),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(5).closeOverlay(e)}),o.TgZ(1,"div",375),o.TgZ(2,"ul",376),o.TgZ(3,"li",118),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.updateUserConnectStatus(e.userConnectMobileData.status,e.userConnectMobileData.connectId,!0)}),o.TgZ(4,"a",330),o.O4$(),o.TgZ(5,"svg",331),o.TgZ(6,"g",332),o._UZ(7,"path",333),o._UZ(8,"path",334),o._UZ(9,"path",335),o.qZA(),o.TgZ(10,"defs"),o.TgZ(11,"clipPath",336),o._UZ(12,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"span"),o._uU(14),o.qZA(),o.qZA(),o.qZA(),o.TgZ(15,"li"),o.TgZ(16,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.createDuplicateConnect(e.userConnectMobileData.connectId)}),o.O4$(),o.TgZ(17,"svg",331),o.TgZ(18,"g",339),o._UZ(19,"path",340),o._UZ(20,"path",341),o.qZA(),o.TgZ(21,"defs"),o.TgZ(22,"clipPath",342),o._UZ(23,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(24,"span"),o._uU(25," Duplicate"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"li"),o.TgZ(27,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.setTaskFrequency(e.userConnectMobileData.connectId)}),o.O4$(),o.TgZ(28,"svg",331),o.TgZ(29,"g",343),o._UZ(30,"path",333),o._UZ(31,"path",344),o.qZA(),o.TgZ(32,"defs"),o.TgZ(33,"clipPath",345),o._UZ(34,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(35,"span"),o._uU(36,"Set Task Frequency"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(37,"li"),o.TgZ(38,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.stateGo(e.userConnectMobileData)}),o.O4$(),o.TgZ(39,"svg",331),o._UZ(40,"path",346),o._UZ(41,"path",347),o._UZ(42,"path",348),o.qZA(),o.kcU(),o.TgZ(43,"span"),o._uU(44,"See Task History"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(45,"li"),o.TgZ(46,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.revertTimeBack(e.userConnectMobileData.connectId)}),o.O4$(),o.TgZ(47,"svg",331),o._UZ(48,"path",349),o._UZ(49,"path",350),o._UZ(50,"path",351),o.qZA(),o.kcU(),o.TgZ(51,"span"),o._uU(52,"Sync Past 24hrs Data"),o.qZA(),o.qZA(),o.qZA(),o.YNc(53,aP,6,1,"li",1),o.TgZ(54,"li"),o.TgZ(55,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.moveToFolder(e.userConnectMobileData)}),o.O4$(),o.TgZ(56,"svg",352),o._UZ(57,"path",353),o._UZ(58,"path",354),o._UZ(59,"path",355),o.qZA(),o.kcU(),o.TgZ(60,"span"),o._uU(61,"Move to folder"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(62,"li"),o.TgZ(63,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(6);return e.deleteConnect(e.userConnectMobileData.connectId,"userCompleteConnect")}),o.TgZ(64,"span",356),o.O4$(),o.TgZ(65,"svg",331),o._UZ(66,"path",357),o._UZ(67,"path",358),o._UZ(68,"path",359),o._UZ(69,"path",360),o._UZ(70,"path",361),o.qZA(),o.qZA(),o.kcU(),o.TgZ(71,"span",362),o._uU(72,"Delete Connects"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(5);o.Q6J("id","published_mobile"+t),o.xp6(1),o.Q6J("@slideDownAnimation",e.isOverlayOpen[t]),o.xp6(13),o.Oqu(0==e.userConnectMobileData.status?"Activate The Connect":"Pause The Connect"),o.xp6(39),o.Q6J("ngIf",null==e.userConnectMobileData?null:e.userConnectMobileData.folderId)}}const lP=function(t){return{active:t}},dP=function(t,e){return{dotactive:t,dotinactive:e}},uP=function(t,e){return{dotinactive:t,dotactive:e}};function pP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",289),o.NdJ("scroll",function(e){return o.CHM(t),o.oxw(5).onScroll(e)}),o.TgZ(1,"div",290),o.TgZ(2,"label",285),o._uU(3,"Select "),o.TgZ(4,"input",286),o.NdJ("ngModelChange",function(e){return o.CHM(t).$implicit.Selected=e})("ngModelChange",function(){const e=o.CHM(t).$implicit;return o.oxw(5).checkIfAllSelected(e)}),o.qZA(),o._UZ(5,"span",291),o.qZA(),o.qZA(),o.TgZ(6,"div",292),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(5).clickProp(n.connectId,e)}),o.TgZ(7,"span",293),o.TgZ(8,"a",294),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",295),o.TgZ(11,"span",296),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(5).copyToClipboard(n.connectId,e)}),o._uU(12),o.TgZ(13,"button",297),o.O4$(),o.TgZ(14,"svg",298),o._UZ(15,"rect",299),o._UZ(16,"path",300),o._UZ(17,"path",301),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"div",271),o.TgZ(19,"div",302),o.TgZ(20,"div",303),o.TgZ(21,"div",304),o._UZ(22,"img",305),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,GS,4,1,"div",306),o.YNc(24,XS,5,2,"div",306),o.qZA(),o.TgZ(25,"div",261),o.TgZ(26,"span",307),o._uU(27,"Created On: "),o.qZA(),o.TgZ(28,"span"),o._uU(29),o.ALo(30,"date"),o.qZA(),o.qZA(),o.TgZ(31,"div",263),o.TgZ(32,"span",307),o._uU(33,"Last edit: "),o.qZA(),o.TgZ(34,"strong"),o._uU(35),o.ALo(36,"date"),o.qZA(),o.qZA(),o.TgZ(37,"div",308),o.YNc(38,tP,3,0,"div",309),o.YNc(39,eP,3,0,"div",309),o.TgZ(40,"div",310),o.YNc(41,nP,3,0,"button",311),o.YNc(42,iP,3,0,"button",311),o.TgZ(43,"ul",312),o.TgZ(44,"li"),o.TgZ(45,"button",313),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).updateUserConnectStatus(e.status,e.connectId,!1)}),o._UZ(46,"span",314),o._uU(47),o.qZA(),o.qZA(),o.TgZ(48,"li"),o.TgZ(49,"button",313),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).updateUserConnectStatus(e.status,e.connectId,!0)}),o._UZ(50,"span",314),o._uU(51),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(52,"div",315),o.TgZ(53,"button",316),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).editConnect(e.connectId)}),o.O4$(),o.TgZ(54,"svg",317),o._UZ(55,"path",318),o._UZ(56,"path",319),o.qZA(),o._uU(57," View "),o.qZA(),o.qZA(),o.kcU(),o.TgZ(58,"div",320),o.TgZ(59,"button",321),o.NdJ("click",function(e){const n=o.CHM(t).index;return o.oxw(5).toggleActive(n,e)}),o.O4$(),o.TgZ(60,"svg",322),o._UZ(61,"path",323),o.qZA(),o.qZA(),o.kcU(),o.TgZ(62,"div",324),o.TgZ(63,"button",325),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index;return o.oxw(5).openOverlay(n,i)}),o._uU(64," Options"),o.qZA(),o.YNc(65,oP,2,0,"button",326),o.YNc(66,rP,2,0,"button",326),o.qZA(),o.TgZ(67,"div",327),o.TgZ(68,"ul",328),o.TgZ(69,"li",329),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).updateUserConnectStatus(e.status,e.connectId,!0)}),o.TgZ(70,"a",330),o.O4$(),o.TgZ(71,"svg",331),o.TgZ(72,"g",332),o._UZ(73,"path",333),o._UZ(74,"path",334),o._UZ(75,"path",335),o.qZA(),o.TgZ(76,"defs"),o.TgZ(77,"clipPath",336),o._UZ(78,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(79,"span"),o._uU(80),o.qZA(),o.qZA(),o.qZA(),o.TgZ(81,"li"),o.TgZ(82,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).createDuplicateConnect(e.connectId)}),o.O4$(),o.TgZ(83,"svg",331),o.TgZ(84,"g",339),o._UZ(85,"path",340),o._UZ(86,"path",341),o.qZA(),o.TgZ(87,"defs"),o.TgZ(88,"clipPath",342),o._UZ(89,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(90,"span"),o._uU(91," Duplicate"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(92,"li"),o.TgZ(93,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).setTaskFrequency(e.connectId)}),o.O4$(),o.TgZ(94,"svg",331),o.TgZ(95,"g",343),o._UZ(96,"path",333),o._UZ(97,"path",344),o.qZA(),o.TgZ(98,"defs"),o.TgZ(99,"clipPath",345),o._UZ(100,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(101,"span"),o._uU(102,"Set Task Frequency"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(103,"li"),o.TgZ(104,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).stateGo(e)}),o.O4$(),o.TgZ(105,"svg",331),o._UZ(106,"path",346),o._UZ(107,"path",347),o._UZ(108,"path",348),o.qZA(),o.kcU(),o.TgZ(109,"span"),o._uU(110,"See Task History"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(111,"li"),o.TgZ(112,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).revertTimeBack(e.connectId)}),o.O4$(),o.TgZ(113,"svg",331),o._UZ(114,"path",349),o._UZ(115,"path",350),o._UZ(116,"path",351),o.qZA(),o.kcU(),o.TgZ(117,"span"),o._uU(118,"Sync Past 24hrs Data"),o.qZA(),o.qZA(),o.qZA(),o.YNc(119,sP,6,1,"li",1),o.TgZ(120,"li"),o.TgZ(121,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).moveToFolder(e)}),o.O4$(),o.TgZ(122,"svg",352),o._UZ(123,"path",353),o._UZ(124,"path",354),o._UZ(125,"path",355),o.qZA(),o.kcU(),o.TgZ(126,"span"),o._uU(127,"Move to folder"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(128,"li"),o.TgZ(129,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).deleteConnect(e.connectId,"userCompleteConnect")}),o.TgZ(130,"span",356),o.O4$(),o.TgZ(131,"svg",331),o._UZ(132,"path",357),o._UZ(133,"path",358),o._UZ(134,"path",359),o._UZ(135,"path",360),o._UZ(136,"path",361),o.qZA(),o.qZA(),o.kcU(),o.TgZ(137,"span",362),o._uU(138,"Delete Connect"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(139,cP,73,4,"div",363),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(5);o.Q6J("ngClass",o.VKq(39,lP,i.activeIndex===n))("id","connect"+n)("hidden",0==i.userCompleteConnects.length),o.xp6(1),o.Q6J("ngClass",0==i.selectedIds.length?"class-if-not-selected":"class-if--selected"),o.xp6(3),o.Q6J("ngModel",t.Selected),o.xp6(3),o.uIk("data-tooltip",t.connectTitle),o.xp6(2),o.Oqu(t.connectTitle),o.xp6(1),o.MGl("id","connect",n,""),o.xp6(2),o.hij("",t.connectId," "),o.xp6(10),o.s9C("src",t.triggerImage?i.appyConfig.cdnMediaPath+t.triggerImage:i.appyConfig.cdnMediaPath+"connect.png",o.LSH),o.xp6(1),o.Q6J("ngIf",t.totalApp>1),o.xp6(1),o.Q6J("ngIf",t.lastActionImage),o.xp6(5),o.Oqu(o.Dn7(30,31,t._created_at,"MM-dd-yyyy","localTimezone")),o.xp6(6),o.Oqu(o.Dn7(36,35,t._updated_at,"MM-dd-yyyy","localTimezone")),o.xp6(3),o.Q6J("ngIf",1==t.status),o.xp6(1),o.Q6J("ngIf",0==t.status),o.xp6(2),o.Q6J("ngIf",1==t.status),o.xp6(1),o.Q6J("ngIf",1!=t.status),o.xp6(1),o.MGl("id","complete_connect_",t.connectId,""),o.xp6(3),o.Q6J("ngClass",o.WLB(4
11,dP,1==t.status,1!=t.status)),o.xp6(1),o.hij(" ",1==t.status?"Active":"InActive"," "),o.xp6(3),o.Q6J("ngClass",o.WLB(44,uP,1==t.status,1!=t.status)),o.xp6(1),o.hij(" ",0!=t.status?"InActive":"Active"," "),o.xp6(8),o.Q6J("id","dropdownMenuLink"+n),o.xp6(4),o.Q6J("id","OptionsMenu"+n),o.xp6(2),o.Q6J("ngIf",0==t.status),o.xp6(1),o.Q6J("ngIf",1==t.status),o.xp6(1),o.Q6J("ngClass",o.VKq(47,cI,i.activeIndex===n)),o.xp6(13),o.Oqu(0==t.status?"Activate The Connects":"Pause The Connects"),o.xp6(39),o.Q6J("ngIf",t.folderId),o.xp6(20),o.Q6J("ngIf",i.isOverlayOpen[n])}}function hP(t,e){if(1&t&&(o.TgZ(0,"ul",265),o.YNc(1,pP,140,49,"li",288),o.ALo(2,"slice"),o.ALo(3,"filterConnects"),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",o.Dn7(2,1,o.xi3(3,5,t.userCompleteConnects,t.searchTxt),0,t.completeFilLim))}}function gP(t,e){1&t&&(o.TgZ(0,"div",377),o.TgZ(1,"div",378),o.O4$(),o.TgZ(2,"svg",379),o._UZ(3,"path",380),o._UZ(4,"path",381),o.qZA(),o.kcU(),o.TgZ(5,"div",382),o.TgZ(6,"h3",383),o._uU(7,"No Connects created till date. "),o.qZA(),o.TgZ(8,"div",384),o.TgZ(9,"a",385),o.O4$(),o.TgZ(10,"svg",386),o._UZ(11,"path",387),o.qZA(),o._uU(12," Create Connect"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function fP(t,e){1&t&&(o.TgZ(0,"div",388),o.TgZ(1,"span",389),o._uU(2,"No active connect found!"),o.qZA(),o.qZA())}function mP(t,e){if(1&t){const t=o.EpF();
1o.TgZ(0,"div",390),o.TgZ(1,"a",391),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).showHideDraftConnects(e)}),o._uU(2),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.Oqu(t.translation.DRAFTS)}}const vP=function(t,e){return{"card-view":t,"list-view":e}};function bP(t,e){if(1&t&&(o.TgZ(0,"div",275),o.YNc(1,VS,20,3,"div",276),o.YNc(2,hP,4,8,"ul",277),o.YNc(3,gP,13,0,"div",278),o.YNc(4,fP,3,0,"div",279),o.YNc(5,mP,3,1,"div",280),o.qZA()),2&t){const t=o.oxw(3);o.Q6J("ngClass",o.WLB(6,vP,!t.isClassViewChange,t.isClassViewChange)),o.xp6(1),o.Q6J("ngIf",t.userCompleteConnects.length>=1||t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.userCompleteConnects.length>=1),o.xp6(1),o.Q6J("ngIf",0==t.userCompleteConnects.length&&0==t.userDraftConnects.length),o.xp6(1),o.Q6J("ngIf",!t.showNot&&t.searchTxt&&t.searchTxt.length>0||0==t.userCompleteConnects.length),o.xp6(1),o.Q6J("ngIf",t.userDraftConnects.length>0)}}function xP(t,e){if(1&t&&(o.TgZ(0,"div",248),o.YNc(1,YS,18,2,"div",249),o.YNc(2,bP,6,9,"div",250),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.testloader),o.xp6(1),o.Q6J("ngIf",!t.testloader)}}function _P(t,e){1&t&&(o.TgZ(0,"li",267),o.TgZ(1,"div",268),o._UZ(2,"span",254),o.qZA(),o.TgZ(3,"div",255),o._UZ(4,"span",269),o.qZA(),o.TgZ(5,"div",270),o._UZ(6,"span",256),o.qZA(),o.TgZ(7,"div",271),o._UZ(8,"span",272),o._UZ(9,"span",273),o.qZA(),o.TgZ(10,"div",261),o._UZ(11,"span",256),o.qZA(),o.TgZ(12,"div",263),o._UZ(13,"span",256),o.qZA(),o.TgZ(14,"div",264),o._UZ(15,"span",274),o.qZA(),o.qZA())}const CP=function(){return[1,2,3,4,5]};function wP(t,e){1&t&&(o.TgZ(0,"div",395),o.TgZ(1,"div",252),o.TgZ(2,"div",253),o._UZ(3,"span",254),o.qZA(),o.TgZ(4,"div",255),o._UZ(5,"span",256),o.qZA(),o.TgZ(6,"div",257),o._UZ(7,"span",258),o.qZA(),o.TgZ(8,"div",259),o._UZ(9,"span",260),o.qZA(),o.TgZ(10,"div",261),o._UZ(11,"span",262),o.qZA(),o.TgZ(12,"div",263),o._UZ(13,"span",262),o.qZA(),o.TgZ(14,"div",264),o._UZ(15,"span",260),o.qZA(),o.qZA(),o.TgZ(16,"ul",265),o.YNc(17,_P,16,0,"li",266),o.qZA(),o.qZA()),2&t&&(o.xp6(17),o.Q6J("ngForOf",o.DdM(1,CP)))}function yP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"label",285),o.TgZ(1,"input",286),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(5).selectedAllDrafts=e})("ngModelChange",function(){return o.CHM(t),o.oxw(5).selectAllDtafts()}),o.qZA(),o._UZ(2,"span",287),o.qZA()}if(2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngModel",t.selectedAllDrafts)}}function AP(t,e){if(1&t&&(o.TgZ(0,"div",252),o.TgZ(1,"div",398),o.YNc(2,yP,3,1,"label",399),o.qZA(),o.TgZ(3,"div",255),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"div",257),o.TgZ(7,"span"),o._uU(8,"ID"),o.qZA(),o.qZA(),o.TgZ(9,"div",259),o.TgZ(10,"span"),o._uU(11),o.qZA(),o.qZA(),o.TgZ(12,"div",261),o.TgZ(13,"span"),o._uU(14,"Created On "),o.qZA(),o.qZA(),o.TgZ(15,"div",263),o.TgZ(16,"span"),o._uU(17,"Last edit "),o.qZA(),o.qZA(),o.TgZ(18,"div",284),o.TgZ(19,"span"),o._uU(20,"Actions"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(2),o.Q6J("ngIf",t.userDraftConnects.length>0),o.xp6(3),o.Oqu(t.translation.CONNECT_NAME),o.xp6(6),o.Oqu(t.translation.CONNECT_APPS)}}function ZP(t,e){if(1&t&&(o.TgZ(0,"div",302),o.TgZ(1,"div",303),o.TgZ(2,"div",304),o._UZ(3,"img",305),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(3),o.s9C("src",t.actionImage?e.appyConfig.cdnMediaPath+t.actionImage:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function kP(t,e){if(1&t&&(o.TgZ(0,"span",366),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.hij("+",t.totalApp-2,"")}}function TP(t,e){if(1&t&&o._UZ(0,"img",305),2&t){const t=o.oxw(2).$implicit,e=o.oxw(4);o.s9C("src",t.lastActionImage?e.appyConfig.cdnMediaPath+t.lastActionImage:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function OP(t,e){if(1&t&&(o.TgZ(0,"div",302),o.TgZ(1,"div",303),o.TgZ(2,"div",304),o.YNc(3,kP,2,1,"span",364),o.YNc(4,TP,1,1,"img",365),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(3),o.Q6J("ngIf",t.totalApp>3),o.xp6(1),o.Q6J("ngIf",3==t.totalApp)}}function MP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",316),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(4).editConnect(e.connectId)}),o.O4$(),o.TgZ(1,"svg",317),o._UZ(2,"path",318),o._UZ(3,"path",319),o.qZA(),o._uU(4," Edit "),o.qZA()}}
1function IP(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",372),o.NdJ("click",function(t){return t.stopPropagation(),t.preventDefault()}),o.O4$(),o.TgZ(2,"svg",373),o._UZ(3,"path",237),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(5),o.hij("In Folder: ",t.folderName||"Folder","")}}function SP(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",372),o.NdJ("click",function(t){return t.stopPropagation(),t.preventDefault()}),o.O4$(),o.TgZ(2,"svg",373),o._UZ(3,"path",237),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(6);o.xp6(5),o.hij("In Folder: ",(null==t.userConnectMobileData?null:t.userConnectMobileData.folderName)||"Folder","")}}function PP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",374),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().index;return o.oxw(4).closeOverlay(e)}),o.TgZ(1,"div",81),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).stopPropagation(e)}),o.TgZ(2,"ul",376),o.TgZ(3,"li"),o.TgZ(4,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.createDuplicateConnect(e.userConnectMobileData.connectId)}),o.TgZ(5,"span",356),o.O4$(),o.TgZ(6,"svg",331),o.TgZ(7,"g",339),o._UZ(8,"path",340),o._UZ(9,"path",341),o.qZA(),o.TgZ(10,"defs"),o.TgZ(11,"clipPath",342),o._UZ(12,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"span"),o._uU(14," Duplicate"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(15,"li"),o.TgZ(16,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.stateGo(e.userConnectMobileData)}),o.O4$(),o.TgZ(17,"svg",331),o._UZ(18,"path",346),o._UZ(19,"path",347),o._UZ(20,"path",348),o.qZA(),o.kcU(),o.TgZ(21,"span"),o._uU(22,"See Task History"),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,SP,6,1,"li",1),o.TgZ(24,"li"),o.TgZ(25,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.moveToFolder(e.userConnectMobileData)}),o.O4$(),o.TgZ(26,"svg",352),o._UZ(27,"path",353),o._UZ(28,"path",354),o._UZ(29,"path",355),o.qZA(),o.kcU(),o.TgZ(30,"span"),o._uU(31,"Move to folder"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(32,"li"),o.TgZ(33,"a",338),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.deleteConnect(e.userConnectMobileData.connectId,"userDraftConnect")}),o.TgZ(34,"span",356),o.O4$(),o.TgZ(35,"svg",331),o._UZ(36,"path",357),o._UZ(37,"path",358),o._UZ(38,"path",359),o._UZ(39,"path",360),o._UZ(4
10,"path",361),o.qZA(),o.qZA(),o.kcU(),o.TgZ(41,"span",362),o._uU(42,"Delete Connects"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().index,e=o.oxw(4);o.Q6J("id","draft_mobile"+t),o.xp6(1),o.Q6J("@slideDownAnimation",e.isOverlayOpen[t]),o.xp6(22),o.Q6J("ngIf",null==e.userConnectMobileData?null:e.userConnectMobileData.folderId)}}function NP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",400),o.NdJ("scroll",function(e){return o.CHM(t),o.oxw(4).onScroll(e)}),o.TgZ(1,"div",290),o.TgZ(2,"label",285),o._uU(3,"Select "),o.TgZ(4,"input",286),o.NdJ("ngModelChange",function(e){return o.CHM(t).$implicit.Selected=e})("ngModelChange",function(){const e=o.CHM(t).$implicit;return o.oxw(4).checkIfAllSelectedDrafts(e)}),o.qZA(),o._UZ(5,"span",291),o.qZA(),o.qZA(),o.TgZ(6,"div",292),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o.TgZ(7,"span",293),o.TgZ(8,"a",294),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",401),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).copyToClipboard(n.connectId,e)}),o.TgZ(11,"span",402),o._uU(12),o.TgZ(13,"button",297),o.O4$(),o.TgZ(14,"svg",298),o._UZ(15,"rect",299),o._UZ(16,"path",300),o._UZ(17,"path",301),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"div",271),o.TgZ(19,"div",302),o.TgZ(20,"div",303),o.TgZ(21,"div",304),o._UZ(22,"img",305),o.qZA(),o.qZA(),o.qZA(),o.YNc(23,ZP,4,1,"div",306),o.YNc(24,OP,5,2,"div",306),o.qZA(),o.TgZ(25,"div",261),o.TgZ(26,"span",307),o._uU(27,"Created On: "),o.qZA(),o.TgZ(28,"span"),o._uU(29),o.ALo(30,"date"),o.qZA(),o.qZA(),o.TgZ(31,"div",263),o.TgZ(32,"span",307),o._uU(33,"Last edit: "),o.qZA(),o.TgZ(34,"strong"),o._uU(35),o.ALo(36,"date"),o.qZA(),o.qZA(),o.TgZ(37,"div",308),o.TgZ(38,"div",403),o.YNc(39,MP,5,0,"button",404),o.TgZ(40,"button",405),o.NdJ("click",function(){const e=o.CHM(t),n=e.$implicit,i=e.index;return o.oxw(4).openOverlay(n,i)}),o._uU(41," Options"),o.qZA(),o.qZA(),o.TgZ(42,"ul",406),o.TgZ(43,"li",407),o.TgZ(44,"a",408),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).editConnect(e.connectId)}),o._uU(45," Edit "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(46,"div",320),o.TgZ(47,"button",409),o.NdJ("click",function(e){const n=o.CHM(t).index;return o.oxw(4).toggleActive(n,e)}),o.O4$(),o.TgZ(48,"svg",322),o._UZ(49,"path",323),o.qZA(),o.qZA(),o.kcU(),o.TgZ(50,"div",410),o.TgZ(51,"ul",411),o.TgZ(52,"li"),o.TgZ(53,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).createDuplicateConnect(e.connectId)}),o.TgZ(54,"span",356),o.O4$(),o.TgZ(55,"svg",331),o.TgZ(56,"g",339),o._UZ(57,"path",340),o._UZ(58,"path",341),o.qZA(),o.TgZ(59,"defs"),o.TgZ(60,"clipPath",342),o._UZ(61,"rect",337),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(62,"span"),o._uU(63," Duplicate"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(64,"li"),o.TgZ(65,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).stateGo(e)}),o.O4$(),o.TgZ(66,"svg",331),o._UZ(67,"path",346),o._UZ(68,"path",347),o._UZ(69,"path",348),o.qZA(),o.kcU(),o.TgZ(70,"span"),o._uU(71,"See Task History"),o.qZA(),o.qZA(),o.qZA(),o.YNc(72,IP,6,1,"li",1),o.TgZ(73,"li"),o.TgZ(74,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).moveToFolder(e)}),o.O4$(),o.TgZ(75,"svg",352),o._UZ(76,"path",353),o._UZ(77,"path",354),o._UZ(78,"path",355),o.qZA(),o.kcU(),o.TgZ(79,"span"),o._uU(80,"Move to folder"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(81,"li"),o.TgZ(82,"a",338),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).deleteConnect(e.connectId,"userDraftConnect")}),o.TgZ(83,"span",356),o.O4$(),o.TgZ(84,"svg",331),o._UZ(85,"path",357),o._UZ(86,"path",358),o._UZ(87,"path",359),o._UZ(88,"path",360),o._UZ(89,"path",361),o.qZA(),o.qZA(),o.kcU(),o.TgZ(90,"span",362),o._uU(91,"Delete Connect"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(92,PP,43,3,"div",363),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4);o.Q6J("ngClass",o.VKq(23,lP,i.activeIndex===n)),o.xp6(1),o.Q6J("ngClass",0==i.selectedDraftsIds.length?"class-if-not-selected":"class-if--selected"),o.xp6(3),o.Q6J("ngModel",t.Selected),o.xp6(3),o.uIk("data-tooltip",t.connectTitle),o.xp6(2),o.Oqu(t.connectTitle),o.xp6(3),o.hij("",t.connectId," "),o.xp6(10),o.s9C("src",t.triggerImage?i.appyConfig.cdnMediaPath+t.triggerImage:i.appyConfig.cdnMediaPath+"connect.png",o.LSH),o.xp6(1),o.Q6J("ngIf",t.totalApp>1),o.xp6(1),o.Q6J("ngIf",t.lastActionImage),o.xp6(5),o.Oqu(o.xi3(30,17,t._created_at,"MM-dd-yyyy")),o.xp6(6),o.Oqu(o.xi3(36,20,t._updated_at,"MM-dd-yyyy")),o.xp6(4),o.Q6J("ngIf",0==t.status),o.xp6(1),o.Q6J("id","draftOptionsMenu"+n),o.xp6(7),o.Q6J("id","dropdownMenuDraft"+n),o.xp6(3),o.Q6J("ngClass",o.VKq(25,cI,i.activeIndex===n)),o.xp6(22),o.Q6J("ngIf",t.folderId),o.xp6(20),o.Q6J("ngIf",i.isOverlayOpen[n])}}
1function qP(t,e){if(1&t&&(o.TgZ(0,"div",396),o.YNc(1,AP,21,3,"div",276),o.TgZ(2,"ul",265),o.YNc(3,NP,93,27,"li",397),o.ALo(4,"slice"),o.ALo(5,"filterConnects"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.Udp("display",""),o.Q6J("ngClass",o.WLB(12,vP,!t.isClassViewChange,t.isClassViewChange)),o.xp6(1),o.Q6J("ngIf",t.userDraftConnects.length>=1||t.searchTxt),o.xp6(2),o.Q6J("ngForOf",o.Dn7(4,5,o.xi3(5,9,t.userDraftConnects,t.searchTxt),0,t.draftFilLim))}}function UP(t,e){1&t&&(o.TgZ(0,"li",267),o.TgZ(1,"div",268),o._UZ(2,"span",254),o.qZA(),o.TgZ(3,"div",255),o._UZ(4,"span",412),o.qZA(),o.TgZ(5,"div",270),o._UZ(6,"span",256),o.qZA(),o.TgZ(7,"div",271),o._UZ(8,"span",272),o._UZ(9,"span",273),o.qZA(),o.TgZ(10,"div",261),o._UZ(11,"span",256),o.qZA(),o.TgZ(12,"div",263),o._UZ(13,"span",256),o.qZA(),o.TgZ(14,"div",264),o._UZ(15,"span",274),o.qZA(),o.qZA())}const EP=function(){return[1,2,3]};function FP(t,e){1&t&&(o.TgZ(0,"ul",265),o.YNc(1,UP,16,0,"li",266),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,EP)))}function DP(t,e){if(1&t&&(o.TgZ(0,"div",392),o.YNc(1,wP,18,2,"div",393),o.YNc(2,qP,6,15,"div",394),o.YNc(3,FP,2,2,"ul",277),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.testloader),o.xp6(1),o.Q6J("ngIf",!t.testloader),o.xp6(1),o.Q6J("ngIf",t.loadMoreLoderShow)}}const LP=function(t){return{"new-Task-alert__removeText":t}},JP=function(t){return{"User-connects":t}};function jP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"main",13),o.TgZ(1,"div",14),o.TgZ(2,"div",15),o.TgZ(3,"div",16),o.TgZ(4,"div",17),o.TgZ(5,"div",18),o.YNc(6,mS,53,49,"section",19),o.YNc(7,SS,21,9,"div",20),o.TgZ(8,"div",21),o.YNc(9,PS,2,1,"h1",22),o.YNc(10,NS,2,1,"h1",23),o.YNc(11,qS,13,2,"form",24),o.YNc(12,ES,2,1,"button",25),o.TgZ(13,"div",26),o.TgZ(14,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().openNewFolderModal()}),o.O4$(),o.TgZ(15,"svg",28),o._UZ(16,"path",29),o._UZ(17,"line",30),o._UZ(18,"line",31),o.qZA(),o._uU(19," Folders "),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(20,"div",32),o.YNc(21,BS,11,7,"div",33),o.TgZ(22,"div",34),o.YNc(23,xP,3,2,"div",35),o.YNc(24,DP,4,3,"div",36),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.Q6J("ngClass",o.VKq(13,LP,t.taskalert&&t.isAlertShow)),o.xp6(6),o.Q6J("ngIf",t.isRecommendationEngine),o.xp6(1),o.Q6J("ngIf",t.showWorkflowPromptBox&&!t.isRecommendationEngine),o.xp6(2),o.Q6J("ngIf",!t.showForm&&(0!==t.userCompleteConnects.length||0!==t.userDraftConnects.length)),o.xp6(1),o.Q6J("ngIf",0!==t.userCompleteConnects.length||0!==t.userDraftConnects.length),o.xp6(1),o.Q6J("ngIf",t.showForm),o.xp6(1),o.Q6J("ngIf",t.showButton&&t.checkIfNoneSelected()),o.xp6(8),o.Q6J("ngClass",o.VKq(15,JP,0==t.userCompleteConnects.length&&0==t.userDraftConnects.length)),o.xp6(1),o.Q6J("ngIf",t.userCompleteConnects.length>0||t.userDraftConnects.length>0),o.xp6(2),o.Q6J("ngIf","published"===t.activeTab),o.xp6(1),o.Q6J("ngIf","draft"===t.activeTab)}}function RP(t,e){1&t&&o._UZ(0,"app-loader")}const $P=n(202);let BP=(()=>{class t{constructor(t,e,n,i,r,s,a,c,l,d,u,p,h,g,f){this.cusService=t,this.translatorService=e,this.commonService=n,this.customerService=i,this.dataService=r,this.elRef=s,this.renderer=a,this.modalService=c,this.customerConnectService=l,this.router=d,this.fb=u,this.cookieService=p,this.planService=h,this.actRoute=g,this.folderService=f,this.appyConfig=go.N,this.userCompleteConnects=[],this.userDraftConnects=[],this.goToConnectApp=new o.vpe,this.userCompleteConnectsRawData=[],this.userDraftConnectsRawData=[],this.draftFilLim=20,this.selectedAllDrafts=!1,this.selectedDraftsIds=[],this.isMenuBarActive=!0,this.mindbodypresent=!1,this.showonce=!1,this.selectedIds=[],this.connectedAccounts=[],this.selectedAll=!1,this.completeFilLim=20,this.loadMoreLoderShow=!1,this.pagesShown=1,this.pageSize=10,this.filteredConnect=[],this.showCreateAConnectBtn=!0,this.originalCompleteConnectsCount=0,this.originalDraftConnectsCount=0,this.isDraftEmpty=!1,this.isCompleteCommectEmpty=!1,this.cstate="dashboard",this.testloader=!0,this.totalCompletedConnects=0,this.LastTouchedConnectElement=null,this.activeTab="published",this.show
1Form=!1,this.showButton=!0,this.isClassViewChange=!1,this.isListViewButton=!0,this.isCardViewButton=!1,this.isMobileMenuOpen=!1,this.isOverlayOpen=[],this.searchTextChanged=new fo.xQ,this.userConnectMobileData={},this.sortDirection={isAsc:!0,isCreated:!0},this.charCount=0,this.charLimit=1e3,this.isAiAgent=!1,this.isAiPrompt=!1,this.isLoading=!1,this.isCreatingLoop=!1,this.showGenerateButton=!0,this.showProceedButton=!0,this.showCreatingAgentButton=!1,this.userPromptInput="",this.userOldPromptInput="",this.connectEventsFromTextPrompt=[{}],this.taskalert=!0,this.isAlertShow=!1,this.activeIndex=null,this.isOverlayOpenMobile=!1,this.triggerOverlayOpen=!1,this.actionOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1,this.actionOptionsOverlayOpen=!1,this.triggerAppObject=null,this.actionAppObject=null,this.triggerAppOptionObject=null,this.actionAppOptionObject=null,this.appsListTriggerAction=[],this.searchTextTrigger="",this.searchTextAction="",this.searchTextTriggerOptions="",this.searchTextActionOptions="",this.triggerFilteredAppsList=[],this.actionFilteredAppsList=[],this.triggerAppOptionsList=[],this.actionAppOptionsList=[],this.triggerFilteredAppOptionsList=[],this.actionFilteredAppOptionsList=[],this.closeSelectTrigger=!1,this.closeActionTrigger=!1,this.closeEventSelectTrigger=!1,this.closeEventActionTrigger=!1,this.openRecommendOverlay=!1,this.selectedCard=null,this.showMore=!1,this.documentId="",this.isRecommendationEngine=!1,this.showWorkflowPromptBox=!0,this.isSkipButtonActive=!0,this.recommendationCards=[],this.nonRepetitiveCombinations=[],this.showRecommendationCard=!1,this.showAppOptionsMenu=!1,this.showAppOptionsMenuInMobile=!1,this.showTriggerAppOptionsMenuInMobile=!1,this.showActionAppOptionsMenuInMobile=!1,this.showShowRecommendationButton=!1,this.showBorderAlert=!1,this.AIFormAutomationPrompt="",this.marketingPageLoader=!1,this.copyToClipboard=function(t,e){if(e.stopPropagation(),navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t);else{var n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}var i=e.target;i.classList.add("custom-options-tooltip"),i.classList.add("connectId-copy-tooltip"),i.setAttribute("data-tooltip","ID Copied!"),setTimeout(function(){i.classList.remove("custom-options-tooltip")},1100)},this.actRoute.queryParams.subscribe(t=>{this.AIFormAutomationPrompt=t.AIFormAutomationPrompt}),this.actRoute.params.subscribe(t=>{this.redirectFrom=t.redirectFrom}),this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.aiForm=this.fb.group({aiText:["",[Xi.kI.required,Xi.kI.maxLength(this.charLimit)]]}),this.aiForm.get("aiText").valueChanges.subscribe(t=>{this.charCount=t.length,this.userPromptInput=t}),this.commonService.getAppsCustom("trigger").subscribe(t=>{this.appsList=(null==t?void 0:t.apps_list)||[],this.triggerFilteredAppsList=(null==t?void 0:t.apps_list)||[],this.actionFilteredAppsList=(null==t?void 0:t.apps_list)||[]}),this.checkIfMobile()}onClick(t){this.LastTouchedConnectElement&&(this.renderer.removeClass(this.LastTouchedConnectElement,"demo"),this.LastTouchedConnectElement=null)}adjustTextareaRows(t){const e=t.target;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}createMultiStepConnect(){var t;try{const e=this.dataService.createConnectId();let n="";this.showCreatingAgentButton=!0;const i=null===(t=this.userPromptInput)||void 0===t?void 0:t.substring(0,100),o=this.connectEventsFromTextPrompt.map((t,o)=>{var r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_,C,w,y,A,Z,k,T,O,M;let I=0===(null==t?void 0:t.index)&&"trigger"!==(null==t?void 0:t.appOptionsType)||0!==(null==t?void 0:t.index)&&"trigger"===(null==t?void 0:t.appOptionsType);const S={customerId:null===(r=this.currentUser)||void 0===r?void 0:r.customerId,connectId:e,connectTitle:i,appId:I?"":null==t?void 0:t.appId,actionName:{title:I?"":null==t?void 0:t.appOptionsName,desc:I?"":null==t?void 0:t.appOptionsDesc},image:I?"":null==t?void 0:t.appImage,index:null==t?void 0:t.index,status:0,connectStatus:"Draft",nodeType:I?"trigger":null==t?void 0:t.appOptionsType,nodeStatus:I?"new":"ta_selected",customConnect:!0,parentIndex:0===(null==t?void 0:t.index)?null:(null==t?void 0:t.index)-1,childIndex:0===(null==t?void 0:t.index)?[1]:this.connectEventsFromTextPrompt.length-1===(null==t?void 0:t.index)?[null]:[(null==t?void 0:t.index)+1],graphData:[{id:"0",parentId:null,displayName:I?"":(null===(a=null===(s=this.connectEventsFromTextPrompt)||void 0===s?void 0:s[0])||void 0===a?void 0:a.appName)||"",imageFinal:I?"":(null===(l=null===(c=this.connectEventsFromTextPrompt)||void 0===c?void 0:c[0])||void 0===l?void 0:l.appImage)||"",eventFinal:I?"":(null===(u=null===(d=this.connectEventsFromTextPrompt)||void 0===d?void 0:d[0])||void 0===u?void 0:u.appOptionsName)||"",headerName:i||""},{id:"1",parentId:"0",displayName:I?"":(null===(h=null===(p=this.connectEventsFromTextPrompt)||void 0===p?void 0:p[1])||void 0===h?void 0:h.appName)||"",imageFinal:I?"":(null===(f=null===(g=this.connectEventsFromTextPrompt)||void 0===g?void 0:g[1])||void 0===f?void 0:f.a
1ppImage)||"",eventFinal:I?"":(null===(v=null===(m=this.connectEventsFromTextPrompt)||void 0===m?void 0:m[1])||void 0===v?void 0:v.appOptionsName)||"",headerName:i||""}],nodesData:[{connectorId:"0",displayName:I?"":(null===(x=null===(b=this.connectEventsFromTextPrompt)||void 0===b?void 0:b[0])||void 0===x?void 0:x.appName)||"",imageFinal:I?"":(null===(C=null===(_=this.connectEventsFromTextPrompt)||void 0===_?void 0:_[0])||void 0===C?void 0:C.appImage)||"",eventFinal:I?"":(null===(y=null===(w=this.connectEventsFromTextPrompt)||void 0===w?void 0:w[0])||void 0===y?void 0:y.appOptionsName)||"",position:{x:175,y:67.5}},{connectorId:"1",displayName:I?"":(null===(Z=null===(A=this.connectEventsFromTextPrompt)||void 0===A?void 0:A[1])||void 0===Z?void 0:Z.appName)||"",imageFinal:I?"":(null===(T=null===(k=this.connectEventsFromTextPrompt)||void 0===k?void 0:k[1])||void 0===T?void 0:T.appImage)||"",eventFinal:I?"":(null===(M=null===(O=this.connectEventsFromTextPrompt)||void 0===O?void 0:O[1])||void 0===M?void 0:M.appOptionsName)||"",position:{x:175,y:252.5}}]};return this.customerConnectService.addUserConnect(S).pipe((0,Uo.U)(e=>(0===(null==t?void 0:t.index)&&(n=(null==e?void 0:e.insertedId)||""),e)))}),r=this.commonService.updateTextToConnectDocument({documentId:this.documentId,connectId:e});(0,qo.D)([...o,r]).subscribe({next:()=>{this.router.navigateByUrl(`/customeditor/${n}/account/${e}`)},error:t=>{this.showCreatingAgentButton=!1,console.error("Error creating multi-step connect:",t)}})}catch(e){this.showCreatingAgentButton=!1,console.error("Error creating multi-step connect:",e)}}createAiPrompt(){var t;(null===(t=this.aiForm)||void 0===t?void 0:t.valid)&&this.charCount<=this.charLimit&&(this.isLoading=!0,this.isAiPrompt=!0,this.userOldPromptInput=this.userPromptInput,this.commonService.getConnectEventsFromTextPrompt({prompt:this.userPromptInput}).subscribe(t=>{this.documentId=t.documentId,this.connectEventsFromTextPrompt=t.finalConnectEvents,this.isLoading=!1,this.showGenerateButton=!1,t?this.showProceedButton=!0:(this.showProceedButton=!1,console.warn("Mapping is null due to an error."))}))}generateMarketingPageUserConnects(){const t=atob(this.AIFormAutomationPrompt);let e=t;try{e=decodeURIComponent(escape(t))}catch(n){}this.launchWorkflowFromPrompt(e)}buildMyWorkflow(){this.launchWorkflowFromPrompt(this.userPromptInput)}insertPromptToken(t){const e=this.aiForm.get("aiText");e&&(e.setValue(`${e.value||""}${"mention"===t?"@":"{{variable}}"}`),e.markAsDirty())}launchWorkflowFromPrompt(t){if(this.isValidPrompt(t)){this.dataService.setAutoPrompt(t.trim());const e=this.customerService.GetCurrent();if(!(null==e?void 0:e.customerId))return;this.isCreatingLoop=!0;const n=this.dataService.createConnectId(),i="New Connect";let o="";const r=["trigger","actions"].map((t,r)=>this.customerConnectService.addUserConnect({customerId:e.customerId,connectId:n,connectTitle:i,appId:"",actionName:{title:"",desc:""},image:"",index:r,status:0,connectStatus:"Draft",nodeType:t,nodeStatus:"new",customConnect:!0,parentIndex:0===r?null:0,childIndex:0===r?[1]:[null],editOptions:{},graphData:[{id:"0",parentId:null,displayName:"",imageFinal:"",eventFinal:"",headerName:i},{id:"1",parentId:"0",displayName:"",imageFinal:"",eventFinal:"",headerName:i}],nodesData:[{connectorId:"0",displayName:"",imageFinal:"",eventFinal:"",position:{x:175,y:67.5}},{connectorId:"1",displayName:"",imageFinal:"",eventFinal:"",position:{x:175,y:252.5}}]}).pipe((0,Uo.U)(t=>(0===r&&(o=(null==t?void 0:t.insertedId)||""),t))));(0,qo.D)(r).subscribe({next:()=>{this.dataService.openCopilot(),this.router.navigateByUrl(`/customeditor/${o}/account/${n}`)},error:t=>{this.isCreatingLoop=!1,console.error("Error creating skeleton connect:",t)}})}}isValidPrompt(t){if("string"!=typeof t)return!1;const e=t.trim();return!(0===e.length||e.length>this.charLimit||/<script|<\/script|javascript:/i.test(e)&&(console.warn("Potentially unsafe content detected in prompt."),1))}closeAIAgent(){this.isAiAgent=!1}openAIAgent(){this.isAiAgent=!0,this.isRecommendationEngine=!1}toggleMobileMenu(){this.isMobileMenuOpen=!this.isMobileMenuOpen}closeMobileMenu(){this.isMobileMenuOpen=!1}setActiveTab(t){this.activeTab=t,localStorage.setItem("activeTab",t),this.unselectAllUserConnects(),0==this.userDraftConnects.length&&"published"!=t?(this.loadMoreLoderShow=!0,this.reloadDraftConnectsList()):0==this.userCompleteConnects.length&&"published"==t&&(this.loadMoreLoderShow=!0,this.reloadCompleteConnectsList()),this.loadData()}toggleSelectAll(){"published"==this.activeTab?(this.selectedAll=!0,this.selectAll(this.userCompleteConnects)):(this.selectedAllDrafts=!0,this.selectAllDtafts()),this.selectedAllDrafts=!0}
1toggleForm(){this.showForm=!this.showForm,this.showButton=!1}hideForm(t=!1){this.showForm=!t&&!this.showForm,this.showButton=!0,this.searchTxt="",this.searchText="",this.reloadCompleteConnectsList(),this.reloadDraftConnectsList(),this.loadData()}toggleListViewChange(){this.isClassViewChange=!this.isClassViewChange,localStorage.setItem("isGridView",this.isClassViewChange?"1":"0"),this.isListViewButton=!1,this.isCardViewButton=!0}toggleCardViewChange(){this.isClassViewChange=!this.isClassViewChange,localStorage.setItem("isGridView",this.isClassViewChange?"1":"0"),this.isCardViewButton=!1,this.isListViewButton=!0}openOverlay(t,e){const n=document.querySelector("body");this.userConnectMobileData=t,this.isOverlayOpen[e]=!0,n.classList.add("overflow-hidden")}closeOverlay(t){const e=document.querySelector("body");this.userConnectMobileData={},this.isOverlayOpen[t]=!1,e.classList.remove("overflow-hidden")}stopPropagation(t){t.stopPropagation()}ngOnInit(){var t,e,n,i,o;this.currentUser=this.customerService.GetCurrent(),this.triggerAppObject&&(this.searchTextTrigger=null===(t=this.triggerAppObject)||void 0===t?void 0:t.displayName,this.getAppOptions(null===(e=this.triggerAppObject)||void 0===e?void 0:e.appId,"trigger")),this.actionAppObject&&(this.searchTextAction=null===(n=this.actionAppObject)||void 0===n?void 0:n.displayName,this.getAppOptions(null===(i=this.actionAppObject)||void 0===i?void 0:i.appId,"action")),this.areAppObjectsAndOptionsListsValid()&&this.updateCardsInView(),("trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status)&&200===this.currentUser.used_task&&(this.isAlertShow=!0);let r=this.cookieService.get("fromPurchasePage");"jc0fgwefcky2"===(null===(o=this.currentUser)||void 0===o?void 0:o.planId)&&"true"===r?this.router.navigateByUrl("/purchase"):(this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),"draft"===localStorage.getItem("activeTab")&&this.setActiveTab("draft"),"1"===localStorage.getItem("isGridView")&&this.toggleListViewChange(),this.searchTextChanged.pipe(ad(500)).subscribe(t=>{this.onInputSearch(t)}),this.testloader=!0,this.loadMoreLoderShow=!0,this.originalCompleteConnectsCount=0,this.originalDraftConnectsCount=0,this.reloadCompleteConnectsList(),this.reloadDraftConnectsList(),setTimeout(()=>{const t=window;t.$(function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map(function(e){return new t.bootstrap.Tooltip(e)}),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(e){return new t.bootstrap.Popover(e)})})},3e3),this.AIFormAutomationPrompt&&this.generateMarketingPageUserConnects())}reloadCompleteConnectsList(t=!0){let e={connectStatus:"Completed",pageSize:this.completeFilLim};this.searchText&&""!==this.searchText.trim()&&(e.searchTXT=this.searchText),this.customerConnectService.getUserConnectList(e).subscribe(e=>{var n;if(this.testloader=!1,t){const t=this.formatConnectData(e);this.userCompleteConnects=t,this.userCompleteConnectsRawData=e&&e.userConnects}else{let t={userConnects:[]};for(let i of e.userConnects)this.userCompleteConnectsRawData.some(t=>t.connectId===i.connectId)||t.userConnects.push(i);const n=this.formatConnectData(t);this.userCompleteConnects=[...this.userCompleteConnects,...n],this.userCompleteConnectsRawData=[...this.userCompleteConnectsRawData,...t&&t.userConnects]}this.isCompleteCommectEmpty=0==this.userCompleteConnects.length,(!this.searchText||""===this.searchText.trim())&&(this.originalCompleteConnectsCount=this.userCompleteConnects.length),this.isDraftEmpty&&this.isCompleteCommectEmpty&&0==this.userCompleteConnects.length&&0==this.userDraftConnects.length&&("published"!==localStorage.getItem("activeTab")&&this.setActiveTab("published"),"jc0fgwefcky2"===(null===(n=this.currentUser)||void 0===n?void 0:n.planId)&&"fromAccounts"===this.redirectFrom&&this.router.navigateByUrl("/setup-editor")),this.searchTxt||this.setNotEmptyTab(this.isDraftEmpty,this.isCompleteCommectEmpty),this.loadMoreLoderShow=!1,ad(500),this.searchText||this.loadData()})}reloadDraftConnectsList(t=!0){let e={connectStatus:"Draft",pageSize:this.draftFilLim};this.searchText&&""!==this.searchText.trim()&&(e.searchTXT=this.searchText),this.customerConnectService.getUserConnectList(e).subscribe(e=>{var n;if(this.testloader=!1,t){const t=this.formatConnectData(e);this.userDraftConnects=t,this.userDraftConnectsRawData=e&&e.userConnects}else{let t={userConnects:[]};for(let i of e.userConnects)this.userDraftConnectsRawData.some(t=>t.connectId===i.connectId)||t.userConnects.push(i);const n=this.formatConnectData(t);this.userDraftConnects=[...this.userDraftConnects,...n],this.userDraftConnectsRawData=[...this.userDraftConnectsRawData,...t&&t.userConnects]}this.isDraftEmpty=0==this.userDraftConnects.length,(!this.searchText||""===this.searchText.trim())&&(this.originalDraftConnectsCount=this.userDraftConnects.length),this.isDraftEmpty&&this.isCompleteCommectEmpty&&0==this.userCompleteConnects.length&&0==this.userDraftConnects.length&&("published"!==localStorage.getItem("activeTab")&&this.setActiveTab("published"),"jc0fgwefcky2"===(null===(n=this.currentUser)||void 0===n?void 0:n.planId)&&"fromAccounts"===this.redirectFrom&&this.router.navigateByUrl("/setup-editor")),this.searchTxt||this.setNotEmptyTab(this.isDraftEmpty,this.isCompleteCommectEmpty),this.loadMoreLoderShow=!1,ad(500),this.searchText||this.loadData()})}setNotEmptyTab(t,e){t&&!e&&"published"!==localStorage.getItem("activeTab")&&this.setActiveTab("published"),!t&&e&&"draft"!==localStorage.getItem("activeTab")&&this.setActiveTab("draft")}formatConnectData(t){var e,n,i,o;const r={},s={};if(t&&t.userConnects)for(let c=0;c<t.userConnects.length;c++){const a=t.userConnects[c].connectId;if(r[a]||(r[a]={},s[a]=[]),s[a].push(a),r[a].connectId=a,r[a].connectTitle="string"==typeof t.userConnects[c].connectTitle&&t.userConnects[c].connectTitle.trim().length>0?t.userConnects[c].connectTitle:a,r[a].status=t.userConnects[c].status,r[a].connectStatus=t.userConnects[c].connectStatus,r[a]._created_at=t.userConnects[c].oldest_created_at,r[a]._updated_at=t.userConnects[c].recent_updated_at,r[a].customConnect=t.userConnects[c].customConnect,r[a].folderId=t.userConnects[c].folderId||null,r[a].folderName=t.userConnects[c].folderName||null,0==t.userConnects[c].index){r[a].triggerImage=t.userConnects[c].triggerImage,r[a].triggerAppName=t.userConnects[c].appName,this.firstChildIndex=(null===(n=null===(e=t.userConnects[c])||void 0===e?void 0:e.childIndex)||void 0===n?void 0:n.length)>0?null===(i=t.userConnects[c])||void 0===i?void 0:i.childIndex[0]:null;const s=t.userConnects.find(t=>t.connectId===a&&t.index==this.firstChildIndex);s&&(r[a].actionImage=s.triggerImage,r[a].actionAppName=s.appName,this.secondChildIndex=(null===(o=null==s?void 0:s.childIndex)||void 0===o?void 0:o.length)>0?null==s?void 0:s.childIndex[0]:null);const l=t.userConnects.find(t=>t.connectId===a&&t.index==this.secondChildIndex);l&&(r[a].lastActionImage=l.triggerImage,r[a].lastActionAppName=l.appName)}}const a=[];for(const c of Object.keys(r))r[c].totalApp=s[c].length,a.push(r[c]);return a}editConnect(t){const e=[...this.userCompleteConnectsRawData,...this.userDraftConnectsRawData].filter(e=>e.connectId===t).sort((t,e)=>t.index-e.index),n=e[e.length-1];let i=1===n.status||e[0].sample_data&&0==e[0].sample_data.length?e[0]._id:n._id,o=1===n.status?"preview":"overview",r=!0;for(let s of e)if(!s.sample_data||0===s.sample_data.length||"Completed"!=s.connectStatus){r=!1;break}r&&(o="preview",i=e[0]._id),this.router.navigateByUrl(`/customeditor/${i}/${o}/${t}`)}deleteConnect(t,e){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Delete Connect?",modelContent:this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE,modelConnectId:t,translation:this.translation,IsDelete:!0}}),this.bsModalRef.content.onClose.subscribe(n=>{n&&(this.testloader=!0,"userCompleteConnect"==e?(this.updateUserConnectStatus(1,t,!0),this.customerConnectService.deleteUserConnectCron(t).subscribe(e=>{this.customerConnectService.deleteUserConnects(t).subscribe(()=>{this.reloadCompleteConnectsList()})})):this.customerConnectService.deleteUserConnects(t).subscribe(t=>{this.reloadDraftConnectsList()}))}),this.unselectAllUserConnects()}deleteMultipleConnects(t){let e=this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE_MANY_CONNECTS;const n=this.selectedIds.concat(this.selectedDraftsIds),i=n.filter((t,e)=>n.indexOf(t)===e);let o=i.length;e=1==o?this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE:e.replace("__NUMBER__",o),this.bsModalRef=this.modalService.show(RO,{initialState:{modelTitle:"Delete Selected Connects",modelContent:e,translation:this.translation,IsDelete:!0}}),this.bsModalRef.content.onClose.subscribe(t=>{t&&(this.testloader=!0,this.customerConnectService.deleteManyConnects({connectIds:i}).subscribe(t=>{"success"==t.message&&(this.selectedDraftsIds=[],this.selectedIds=[],this.reloadCurrentCustomer(!0),this.unselectAllUserConnects()),Array.isArray(t)&&t.forEach(t=>{})}))})}stateGo(t){this.historyLogFilter=t,this.router.navigate(["/history",t.connectId])}
1selectAllDtafts(){this.userDraftConnects.forEach((t,e)=>{this.draftFilLim>e&&!this.selectedDraftsIds.includes(t.connectId)&&(t.Selected=this.selectedAllDrafts,this.selectedDraftsIds.push(t.connectId))}),this.selectedAllDrafts||this.unselectAllUserConnects()}showHideDraftConnects(t){t.target.className.indexOf("collapsed")>=0?($(t.target).removeClass("collapsed"),$(".draft-toggle-target").show(),document.getElementById("draftConnectsCollapsed").setAttribute("class","accordion-toggle"),this.draftConnectsCollapsed=!0):(document.getElementById("draftConnectsCollapsed").setAttribute("class","accordion-toggle collapsed"),this.draftConnectsCollapsed=!1,$(t.target).addClass("collapsed"),$(".draft-toggle-target").hide())}selectAll(t){t.forEach((t,e)=>{this.completeFilLim>e&&!this.selectedIds.includes(t.connectId)&&(t.Selected=this.selectedAll,this.selectedIds.push(t.connectId))}),this.selectedAll||this.unselectAllUserConnects()}loadMoreUserDraftConnects(){this.draftFilLim<=this.userDraftConnects.length&&(this.loadMoreLoderShow=!0,this.draftFilLim=this.draftFilLim+10,this.reloadDraftConnectsList(!1))}loadMoreUserCompleteConnects(){this.completeFilLim<=this.userCompleteConnects.length?(this.loadMoreLoderShow=!0,this.completeFilLim=this.completeFilLim+10,this.reloadCompleteConnectsList(!1)):this.loadMoreLoderShow=!1}hasMoreItemsToShow(t){return!1}updateUserConnectStatus(t,e,n){if(n){let n;n=this.customerService.GetCurrent(),n.connect_data>=n.plan_details[0].connects&&0===t&&"jc0fgwefcky2"!==n.planId?this.router.navigateByUrl("/plans"):(this.testloader=!0,this.commonService.GetConnectAppDetails(e).subscribe(i=>{const o=i[1].appType,r=n.plan_details[0].apps;if(r.indexOf(i[0].appType)>=0&&r.indexOf(o)>=0||1==n.testingAccount){let i=0;i=1===t?0:1,this.customerConnectService.updateConnectStatusByConnectId(e,0===i?{status:i}:{}).subscribe(o=>{if(o.status&&"error"===o.status&&("published"==this.activeTab?this.reloadCompleteConnectsList():this.reloadDraftConnectsList(),this.triggerStatus=this.actionStatus=i),0===t){let t=this.userCompleteConnectsRawData.filter(t=>t.connectId===e).map(t=>t._id);this.updateUserConnectOnFinishMultiple(t,e,()=>{})}else this.customerConnectService.deleteUserConnectCron(e).subscribe(t=>{n.connect_data=n.connect_data-1,this.customerService.setCurrent(n),this.triggerStatus=this.actionStatus=i,this.reloadCurrentCustomer()});this.unselectAllUserConnects()})}else{if($(`#complete_connect_${e}`).prop("checked",""),this.validPlan=!1,this.showPlanInfo=!0,0===t&&"jc0fgwefcky2"==n.planId)this.modalService.show(zl,{initialState:{customerId:n.customerId}});else{this.commonService.GetConnectAppDetails(e).subscribe(t=>{});const o="Enterprise"!=n.plan_details[0].planName,r=i.filter(t=>"Enterprise"===t.appType),s=r.length>0;if(o&&s&&1!==n.testingAccount&&0===t){this.goToConnectApp.emit(i.length-1);const t=r.map(t=>t.appName).join(", ");let e=this.modalService.show(Yl,{initialState:{appNames:t}});this.testloader=!1,e.hide()}else{let n=0;n=1===t?0:1,this.customerConnectService.updateConnectStatusByConnectId(e,0===n?{status:n}:{}).subscribe(t=>{"success"===t.message&&(this.triggerStatus=this.actionStatus=n,this.testloader=!1,this.reloadCurrentCustomer())})}}this.unselectAllUserConnects(),this.testloader=!1}}))}}updateUserConnectOnFinishMultiple(t,e,n=null){return this.customerConnectService.updateUserConnectOnFinishMultiple(t,{status:1,connectStatus:"Completed",userConnectId:e}).subscribe(t=>(t.desc=t.desc||[],this.OnFinishMultiple=t,delete this.OnFinishMultiple.reconnectApprovedAccount,t&&t.desc&&t.desc.length?this.router.navigateByUrl(`/customeditor/${t.current.nodeId}/overview/${t.connectId}`):"error"===t.nmvbnxcvzresult?this.reloadCurrentCustomer():"error"===t.result?(this.editConnect(e),$(`#complete_connect_${e}`).prop("checked","")):"success"===t.result?this.reloadCurrentCustomer():this.editConnect(e),n&&n(t),t))}setPageIndex(){this.showNot=document.getElementById("connect0"),this.pagesShown=1}checkIfAllSelected(t){if(!0===t.Selected&&!1===this.selectedAll&&this.selectedIds.push(t.connectId),!1===t.Selected){const e=this.selectedIds.indexOf(t.connectId);this.selectedIds.splice(e,1)}this.selectedAll=this.userCompleteConnects.every(t=>!0===t.Selected),this.checked=this.userCompleteConnects.filter(t=>!0===t.Selected).length,this.checked===this.completeFilLim&&(this.selectedAll=!0)}checkIfAllSelectedDrafts(t){if(!0===t.Selected&&!1===this.selectedAllDrafts&&this.selectedDraftsIds.push(t.connectId),!1===t.Selected){const e=this.selectedDraftsIds.indexOf(t.connectId);this.selectedDraftsIds.splice(e,1)}this.selectedAllDrafts=this.userDraftConnects.every(t=>!0===t.Selected),this.checkedDrafts=this.userDraftConnects.filter(t=>!0===t.Selected).length,this.checkedDrafts===this.draftFilLim&&(this.selectedAllDrafts=!0)}checkIfNoneSelected(){return 0==this.selectedIds.concat(this.selectedDraftsIds).length}checkIfSelectedCount(){return this.selectedIds.concat(this.selectedDraftsIds).length}checkIfSelected(t){return t.Selected}
1unselectAllUserConnects(){this.userCompleteConnects.forEach(t=>t.Selected=!1),this.userDraftConnects.forEach(t=>t.Selected=!1),this.selectedIds=[],this.selectedDraftsIds=[],this.selectedAllDrafts=!1,this.selectedAll=!1}reloadCurrentCustomer(t=!1){this.testloader=!0,this.cusService.getCurrentUser({}).subscribe(e=>{this.cusService.setCurrent(e),t?(this.reloadCompleteConnectsList(),this.reloadDraftConnectsList()):"published"==this.activeTab?this.reloadCompleteConnectsList():this.reloadDraftConnectsList()},()=>{this.testloader=!1})}createDuplicateConnect(t){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Duplicate Connect?",modelContent:this.translation.ARE_YOU_SURE_YOU_WANT_TO_DUPLICATE,modelConnectId:t,translation:this.translation}}),this.bsModalRef.content.onClose.subscribe(e=>{if(e){const e=this.dataService.createConnectId();this.testloader=!0,this.customerConnectService.createDuplicateConnect({orignalConnectId:t,dulicateConnectId:e}).subscribe(t=>{"published"==this.activeTab?this.reloadCompleteConnectsList():this.reloadDraftConnectsList()})}}),this.unselectAllUserConnects()}revertTimeBack(t){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Sync past 24hrs Data?",modelContent:this.translation.ARE_YOU_SURE_YOU_WANT_TO_REVERT_TIME,modelConnectId:t,translation:this.translation}}),this.bsModalRef.content.onClose.subscribe(e=>{e&&(this.bsModalRef.hide(),this.customerConnectService.revertTimeBack(t).subscribe(e=>{if(!e.success){var n=e.message.match(/"([^"]+)"/);n&&n.length>1&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Unable to revert connect time",modelContent:n[1],modelConnectId:t,translation:this.translation}})},500)}"success"==e.message&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Connect Time Reverted",modelContent:"Your connect time is reverted back to past 24 hour.",modelConnectId:t,translation:this.translation}})},500)}))})}setTaskFrequency(t){let e,n;e=this.customerService.GetCurrent(),this.testloader=!0,this.customerService.getCurrentTaskFrequencyForConnect(t).subscribe(i=>{var o,r,s,a,c,l,d,u;this.testloader=!1,i||(i.frequencyId=-1),n="enterprise"==(null===(r=null===(o=null==e?void 0:e.plan_details)||void 0===o?void 0:o[0])||void 0===r?void 0:r.identifire)||"business2"==(null===(a=null===(s=null==e?void 0:e.plan_details)||void 0===s?void 0:s[0])||void 0===a?void 0:a.identifire)?"Every 1 min (Default)":"professional"==(null===(l=null===(c=null==e?void 0:e.plan_details)||void 0===c?void 0:c[0])||void 0===l?void 0:l.identifire)?"Every 2 min (Default)":"standard"==(null===(u=null===(d=null==e?void 0:e.plan_details)||void 0===d?void 0:d[0])||void 0===u?void 0:u.identifire)?"Every 5 min (Default)":"Every 15 min (Default)",this.bsModalRef=this.modalService.show(gM,{initialState:{modelTitle:"Set Task Frequency",modelContent:"Customize the frequency of your task to auto-update your data at chosen intervals. ",modelConnectId:t,translation:this.translation,frequencyId:i.frequencyId,frequency:null==i?void 0:i.frequency,defaultFrequencyDisplay:n}}),this.bsModalRef.content.onClose.subscribe(e=>{(null==e?void 0:e.confirm)&&(this.testloader=!0,this.customerConnectService.setTaskFrequencyForConnect(e).subscribe(e=>{if(!e.success){var n=e.message.match(/"([^"]+)"/);n&&n.length>1&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Unable to set task frequency",modelContent:n[1],modelConnectId:t,translation:this.translation}})},500)}"success"==e.message&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Task Frequency Updated",modelContent:"Task Frequency of your connect has been updated.",modelConnectId:t,translation:this.translation}})},500),this.testloader=!1}))})})}onScroll(t){(document.documentElement.scrollTop||document.body.scrollTop)+document.documentElement.offsetHeight>=document.documentElement.scrollHeight-5&&0==this.loadMoreLoderShow&&this.userCompleteConnects.length>=0&&("published"==this.activeTab?this.loadMoreUserCompleteConnects():this.loadMoreUserDraftConnects())}onTouchMove(t){(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop)+window.innerHeight>=(document.documentElement.scrollHeight||document.body.scrollHeight)-5&&0==this.loadMoreLoderShow&&this.userCompleteConnects.length>=0&&("published"==this.activeTab?this.loadMoreUserCompleteConnects():this.loadMoreUserDraftConnects())}loadData(){setTimeout(()=>{(document.documentElement.scrollTop||document.body.scrollTop)+document.documentElement.offsetHeight>=document.documentElement.scrollHeight&&("published"==this.activeTab?this.loadMoreUserCompleteConnects():this.loadMoreUserDraftConnects())},200)}onResize(t){this.loadData(),this.checkIfMobile()}clickProp(t,e){window.innerWidth>1199&&!this.isClassViewChange?this.editConnect(t):e.stopPropagation(),"draft"===this.activeTab&&localStorage.setItem("activeTab","draft")}onInputSearch(t){this.loadMoreLoderShow=!0,this.customerConnectService.getUserConnectList({connectStatus:"published"==this.activeTab?"Completed":"Draft",searchTXT:t,pageSize:20}).subscribe(t=>{let e={userConnects:[]};for(let i of t.userConnects)"published"==this.activeTab?this.userCompleteConnectsRawData.some(t=>t.connectId===i.connectId)||e.userConnects.push(i):this.userDraftConnectsRawData.some(t=>t.connectId===i.connectId)||e.userConnects.push(i);const n=this.formatConnectData(e);"published"==this.activeTab?(this.userCompleteConnects=[...this.userCompleteConnects,...n],this.userCompleteConnectsRawData=[...this.userCompleteConnectsRawData,...t&&t.userConnects]):(this.userDraftConnects=[...this.userDraftConnects,...n],this.userDraftConnectsRawData=[...this.userDraftConnectsRawData,...t&&t.userConnects]),this.loadMoreLoderShow=!1})}onSearchTextChanged(t){""!=t.target.value&&(this.searchTextChanged.next(t.target.value.trim()),this.searchText=t.target.value.trim())}isHidePublish(){return this.originalCompleteConnectsCount<1&&this.originalDraftConnectsCount>=1}isHideDraft(){return this.originalDraftConnectsCount<1&&this.originalCompleteConnectsCount>=1}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}upgradePlan(t,e){this.currentUser=this.customerService.GetCurrent(),this.customerInfo=this.currentUser,this.customerInfo.upgrade_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.planPeriod=t.paymentType,localStorage.setItem("planId",t.planId);const n=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),i=btoa(encodeURIComponent(n));this.cookieService.set("custPlan",i,1,"/");var o=localStorage.getItem("mode");"jnpl1uik645c878la4sp"==o?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=o,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>
1{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}toggleActive(t,e){e.stopPropagation(),this.activeIndex=this.activeIndex===t?null:t}onClickOutside(t){this.elRef.nativeElement.querySelector("ul").contains(t.target)||(this.activeIndex=null)}triggerAppToggleMenu(){this.triggerOverlayOpen=!this.triggerOverlayOpen,this.actionCloseOverlay()}actionAppToggleMenu(){this.actionOverlayOpen=!this.actionOverlayOpen,this.triggerCloseOverlay()}triggerAppOptionsToggleMenu(){this.triggerOptionsOverlayOpen=!this.triggerOptionsOverlayOpen,this.actionOptionsCloseOverlay()}actionAppOptionsToggleMenu(){this.actionOptionsOverlayOpen=!this.actionOptionsOverlayOpen,this.triggerOptionsCloseOverlay()}closeOverlayMobile(t){this.isOverlayOpenMobile=!1,this.actionOverlayOpen=!1,this.triggerOverlayOpen=!1,this.clearSearchText(t)}closeOverlayMobileOption(t){this.isOverlayOpenMobile=!1,this.actionOptionsOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1,this.clearSearchTextOptions(t)}triggerCloseOverlay(){this.triggerOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1,this.actionOptionsOverlayOpen=!1,this.isOverlayOpenMobile=!1}actionCloseOverlay(){this.actionOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1,this.actionOptionsOverlayOpen=!1,this.isOverlayOpenMobile=!1}triggerOptionsCloseOverlay(){this.triggerOverlayOpen=!1,this.actionOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1,this.isOverlayOpenMobile=!1}actionOptionsCloseOverlay(){this.triggerOverlayOpen=!1,this.actionOverlayOpen=!1,this.actionOptionsOverlayOpen=!1,this.isOverlayOpenMobile=!1}closeMenuOnClickOutside(t){const e=t.target;(this.isOverlayOpenMobile||this.actionOverlayOpen||this.triggerOverlayOpen||this.actionOptionsOverlayOpen||this.triggerOptionsOverlayOpen)&&!e.closest(".search_trigger_action")&&!e.closest("img")&&(this.isOverlayOpenMobile=!1,this.actionOverlayOpen=!1,this.triggerOverlayOpen=!1,this.actionOptionsOverlayOpen=!1,this.triggerOptionsOverlayOpen=!1)}setTriggerAppObject(t){var e;this.triggerOverlayOpen=!1,this.closeSelectTrigger=!this.closeSelectTrigger,this.triggerAppObject=t,this.searchTextTriggerOptions="",this.clearAppOptionList("triggerAppObject"),this.getAppOptions(null==t?void 0:t.appId,"trigger"),this.searchTextTrigger=null===(e=this.triggerAppObject)||void 0===e?void 0:e.displayName}setActionAppObject(t){var e;this.actionOverlayOpen=!1,this.closeActionTrigger=!this.closeActionTrigger,this.actionAppObject=t,this.searchTextActionOptions="",this.clearAppOptionList("actionAppObject"),this.getAppOptions(null==t?void 0:t.appId,"action"),this.searchTextAction=null===(e=this.actionAppObject)||void 0===e?void 0:e.displayName}setTriggerAppOptionsObject(t){var e;this.triggerOptionsOverlayOpen=!1,this.showTriggerAppOptionsMenuInMobile=!1,this.closeSelectTrigger=!this.closeSelectTrigger,this.triggerAppOptionObject=t,this.searchTextTriggerOptions=null===(e=this.triggerAppOptionObject)||void 0===e?void 0:e.trigger_action_displayname}setActionAppOptionsObject(t){var e;this.actionOptionsOverlayOpen=!1,this.showActionAppOptionsMenuInMobile=!1,this.closeActionTrigger=!this.closeActionTrigger,this.actionAppOptionObject=t,this.searchTextActionOptions=null===(e=this.actionAppOptionObject)||void 0===e?void 0:e.trigger_action_displayname}clearSearchText(t){this.showBorderAlert=!1,this.showShowRecommendationButton=!1,this[t]="",this["searchTextTrigger"===t?"triggerAppObject":"actionAppObject"]=null,this["searchTextTrigger"===t?"triggerFilteredAppsList":"actionFilteredAppsList"]=$P.cloneDeep(this.appsList),this.showAppOptionsMenu=!1,this.showAppOptionsMenuInMobile=!1,this.clearRecommendationCard(),this.clearAppOptionList(t)}clearAppOptionList(t){this["searchTextTrigger"===t||"triggerAppObject"===t?"triggerAppOptionObject":"actionAppOptionObject"]=null,this["searchTextTrigger"===t||"triggerAppObject"===t?"triggerFilteredAppOptionsList":"actionFilteredAppOptionsList"]=[],this["searchTextTrigger"===t||"triggerAppObject"===t?"triggerAppOptionsList":"actionAppOptionsList"]=[]}clearSearchTextOptions(t){this.showBorderAlert=!1,this[t]="",this["searchTextTriggerOptions"===t?"triggerAppOptionObject":"actionAppOptionObject"]=null,this["searchTextTriggerOptions"===t?"triggerFilteredAppOptionsList":"actionFilteredAppOptionsList"]=$P.cloneDeep(this["searchTextTriggerOptions"===t?"triggerAppOptionsList":"actionAppOptionsList"])}filterApps(t,e){const n=t.trim();this[e]=null,this["triggerAppObject"===e?"searchTextTriggerOptions":"searchTextActionOptions"]="",this.clearAp
1pOptionList(e),this.showShowRecommendationButton=!1,this["triggerAppObject"===e?"triggerFilteredAppsList":"actionFilteredAppsList"]=this.appsList.filter(t=>t.displayName.toLowerCase().includes(n.toLowerCase()))}filterAppOptions(t,e){this[e]=null,this["triggerAppOptionObject"===e?"triggerFilteredAppOptionsList":"actionFilteredAppOptionsList"]=this["triggerAppOptionObject"===e?"triggerAppOptionsList":"actionAppOptionsList"].filter(e=>e.trigger_action_displayname.toLowerCase().includes(t.toLowerCase()))}closeRecommendOverlay(){this.openRecommendOverlay=!0,this.showAppOptionsMenuInMobile=!1}closeActionOverlayMobile(){this.showActionAppOptionsMenuInMobile=!1}closeTriggerOverlayMobile(){this.showTriggerAppOptionsMenuInMobile=!1}actionEventsAppMenu(){}selectCard(t){this.selectedCard=t}toggleViewMore(){this.showMore=!this.showMore,this.updateCardsInView(),this.isOverlayOpenMobile=!1,this.actionOverlayOpen=!1,this.triggerOverlayOpen=!1}updateCardsInView(){this.recommendationCards=$P.cloneDeep(this.showMore?this.nonRepetitiveCombinations:this.nonRepetitiveCombinations.slice(0,3))}checkIfMobile(){this.isMobileView=window.innerWidth<=768}closeRecommendationEngine(){this.isRecommendationEngine=!1}openRecommendationEngine(){this.isRecommendationEngine=!0,this.isAiAgent=!1}closeWorkflowPromptBox(){this.showWorkflowPromptBox=!1}openWorkflowPromptBox(){this.showWorkflowPromptBox=!this.showWorkflowPromptBox,this.isRecommendationEngine=!1,this.showWorkflowPromptBox&&setTimeout(()=>{var t,e;null===(t=document.getElementById("buildWorkflowBox"))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"}),null===(e=document.getElementById("aiText"))||void 0===e||e.focus({preventScroll:!0})})}openCopilot(){this.dataService.openCopilot()}switchRecommendationToAppOptions(){var t;this.showShowRecommendationButton=!0,this.hideRecommendationCard(),this.isMobileView?(null===(t=this.nonRepetitiveCombinations)||void 0===t?void 0:t.length)>0&&(this.showAppOptionsMenuInMobile=!0):this.showAppOptionsMenu=!0}switchAppOptionsToRecommendation(){this.showShowRecommendationButton=!1,this.showRecommendationCard=!0,this.openRecommendOverlay=!0,this.isMobileView?this.showAppOptionsMenuInMobile=!1:this.showAppOptionsMenu=!1}hideRecommendationCard(){this.showRecommendationCard=!1,this.openRecommendOverlay=!1}clearRecommendationCard(){this.nonRepetitiveCombinations=[],this.recommendationCards=[],this.hideRecommendationCard()}createTwoStepConnect(t,e){try{const n=this.dataService.createConnectId();let i="";this.isSkipButtonActive=!1;const o=["trigger","action"].map((o,r)=>
1{var s;const a="trigger"===o?t:e,c=`${(null==t?void 0:t.displayName)||"Trigger App"} to ${(null==e?void 0:e.displayName)||"Action App"}`,l={customerId:null===(s=this.currentUser)||void 0===s?void 0:s.customerId,connectId:n,connectTitle:c,appId:null==a?void 0:a.appId,actionName:{title:(null==a?void 0:a.appOptionsName)||"",desc:(null==a?void 0:a.appOptionsDesc)||""},image:(null==a?void 0:a.image)||"",index:r,status:0,connectStatus:"Draft",nodeType:(null==a?void 0:a.type)||o,nodeStatus:(null==a?void 0:a.appId)?(null==a?void 0:a.appOptionsName)?"ta_selected":"app_selected":"new",customConnect:!0,parentIndex:"trigger"===o?null:0,childIndex:"trigger"===o?[1]:[null],graphData:[{id:"0",parentId:null,displayName:(null==t?void 0:t.displayName)||"",imageFinal:(null==t?void 0:t.image)||"",eventFinal:(null==t?void 0:t.appOptionsName)||"",headerName:c||""},{id:"1",parentId:"0",displayName:(null==e?void 0:e.displayName)||"",imageFinal:(null==e?void 0:e.image)||"",eventFinal:(null==e?void 0:e.appOptionsName)||"",headerName:c||""}],nodesData:[{connectorId:"0",displayName:(null==t?void 0:t.displayName)||"",imageFinal:(null==t?void 0:t.image)||"",eventFinal:(null==t?void 0:t.appOptionsName)||"",position:{x:175,y:67.5}},{connectorId:"1",displayName:(null==e?void 0:e.displayName)||"",imageFinal:(null==e?void 0:e.image)||"",eventFinal:(null==e?void 0:e.appOptionsName)||"",position:{x:175,y:252.5}}]};return this.customerConnectService.addUserConnect(l).pipe((0,Uo.U)(t=>(0===r&&(i=(null==t?void 0:t.insertedId)||""),t)))});(0,qo.D)(o).subscribe({next:()=>{this.router.navigateByUrl(`/customeditor/${i}/account/${n}`)},error:t=>{this.isSkipButtonActive=!0,console.error("Error creating two-step connect:",t)}})}catch(n){this.isSkipButtonActive=!0,console.error("Error creating two-step connect:",n)}}createTwoStepConnectWithAppOptions(t){if(this.showBorderAlert=!0,!Array.isArray(t)||t.length<2)return void console.log("Invalid appCombo array");const[e,n]=t;if(!e)return void console.log("Trigger app option is missing.");if(!n)return void console.log("Action app option is missing.");const i=Object.assign(Object.assign({},$P.cloneDeep(this.triggerAppObject)),{appOptionsName:e.trigger_action_name,appOptionsDesc:e.desc,type:"trigger"}),o=Object.assign(Object.assign({},$P.cloneDeep(this.actionAppObject)),{appOptionsName:n.trigger_action_name,appOptionsDesc:n.desc,type:n.type});!this.isMobileView||this.showAppOptionsMenuInMobile?this.createTwoStepConnect(i,o):(this.triggerAppObject=i,this.actionAppObject=o)}createTwoStepConnectWithoutAppOptions(){delete this.triggerAppObject.appOptionsName,delete this.triggerAppObject.appOptionsDesc,delete this.triggerAppObject.type,delete this.actionAppObject.appOptionsName,delete this.actionAppObject.appOptionsDesc,delete this.actionAppObject.type,this.createTwoStepConnect(this.triggerAppObject,this.actionAppObject)}getAppOptions(t,e){this.commonService.getAppOptionsByAppIdShort(t,{type:e}).subscribe(t=>{var n,i;const o=t.app_options;if(o){if("trigger"===e?(this.triggerAppOptionsList=o,this.triggerFilteredAppOptionsList=o):(this.actionAppOptionsList=o,this.actionFilteredAppOptionsList=o),this.triggerAppObject&&this.actionAppObject&&(0===(null===(n=this.triggerAppOptionsList)||void 0===n?void 0:n.length)||0===(null===(i=this.actionAppOptionsList)||void 0===i?void 0:i.length)))return this.nonRepetitiveCombinations=[],this.showRecommendationCard=!0,this.showTriggerAppOptionsMenuInMobile=!1,this.showActionAppOptionsMenuInMobile=!1,this.openRecommendOverlay=!0,this.recommendationCards=[],void(this.showShowRecommendationButton=!1);this.areAppObjectsAndOptionsListsValid()&&this.generateSequence()}})}areAppObjectsAndOptionsListsValid(){var t,e;return!!(this.triggerAppObject&&this.actionAppObject&&(null===(t=this.triggerAppOptionsList)||void 0===t?void 0:t.length)&&(null===(e=this.actionAppOptionsList)||void 0===e?void 0:e.length))}getCombinations(t,e){let n=[];for(let i of t)for(let t of e)n.push([i,t]);return n}isValidCombination(t,e){const[n,i]=t,[o,r]=e;return(null==n?void 0:n._id)!==(null==o?void 0:o._id)&&(null==i?void 0:i._id)!==(null==r?void 0:r._id)}generateNonRepetitiveCombinations(t){if(0===t.length)return[];const e=[t[0]];let n=t.slice(1);const i=[];for(;n.length>0;){const t=e[e.length-1],o=n.findIndex(e=>this.isValidCombination(t,e));if(-1===o){i.push(...n);break}e.push(n[o]),n.splice(o,1)}return[...e,...i]}generateSequence(){const{triggerAppOptionsList:t,actionAppOptionsList:e}=this,n=this.getCombinations(t,e);this.nonRepetitiveCombinations=this.generateNonRepetitiveCombinations(n),this.showRecommendationCard=!0,this.openRecommendOverlay=!0,this.showTriggerAppOptionsMenuInMobile=!1,this.showActionAppOptionsMenuInMobile=!1,this.showShowRecommendationButton=!1,this.isMobileView?(this.recommendationCards=$P.cloneDeep(this.nonRepetitiveCombinations),this.recommendationCards.length>0&&(this.selectedCard=0)):this.recommendationCards=$P.cloneDeep(this.nonRepetitiveCombinations.slice(0,3))}emailUs(t,e=""){var n,i,o,r;let s="";"trigger"===t&&e?(e=(null===(n=this.triggerAppObject)||void 0===n?void 0:n.displayName)||"",s=(null===(i=this.triggerAppObject)||void 0===i?void 0:i.appId)||""):"action"===t&&e&&(e=(null===(o=this.actionAppObject)||void 0===o?void 0:o.displayName)||"",s=(null===(r=this.actionAppObject)||void 0===r?void 0:r.appId)||""),this.bsModalRef=this.modalService.show(Zo,{initialState:{nodeType:t,appName:e,appId:s}
1,class:"request-modal modal-lg modal-dialog-centered modal-dialog-scrollable"})}openNewFolderModal(){this.bsModalRef=this.modalService.show(xM,{initialState:{translation:this.translation},class:"new-folder-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{})}moveToFolder(t){this.bsModalRef=this.modalService.show(RM,{initialState:{connectTitle:t.connectTitle||t.folderName||"Connect",connectId:t.connectId||"",currentFolderId:t.folderId||null,currentFolderName:t.folderName||""},class:"folder-move-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(e=>{if(e&&e.success){const n=t.connectId,i=this.userCompleteConnects.find(t=>t.connectId===n);i&&(i.folderId=e.folderId,i.folderName=e.folderName||null);const o=this.userDraftConnects.find(t=>t.connectId===n);o&&(o.folderId=e.folderId,o.folderName=e.folderName||null),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast("Connect moved to folder successfully")}})}bulkMoveToFolder(){const t=this.selectedIds.concat(this.selectedDraftsIds),e=t.filter((e,n)=>t.indexOf(e)===n);0!==e.length&&(this.bsModalRef=this.modalService.show(RM,{initialState:{connectTitle:e.length+" connects",connectIds:e},class:"folder-move-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{t&&t.success&&(this.userCompleteConnects.forEach(n=>{e.includes(n.connectId)&&(n.folderId=t.folderId,n.folderName=t.folderName||null)}),this.userDraftConnects.forEach(n=>{e.includes(n.connectId)&&(n.folderId=t.folderId,n.folderName=t.folderName||null)}),this.unselectAllUserConnects(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast(e.length+" connects moved to folder successfully"))}))}bulkRemoveFromFolder(){const t=this.selectedIds.concat(this.selectedDraftsIds),e=t.filter((e,n)=>t.indexOf(e)===n);0!==e.length&&this.folderService.bulkMoveConnects({connectIds:e,folderId:null}).subscribe(t=>{t&&t.success&&(this.userCompleteConnects.forEach(t=>{e.includes(t.connectId)&&(t.folderId=null,t.folderName=null)}),this.userDraftConnects.forEach(t=>{e.includes(t.connectId)&&(t.folderId=null,t.folderName=null)}),this.unselectAllUserConnects(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast(e.length+" connects removed from folder successfully"))})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(Eo),o.Y36(wo.v),o.Y36(yo),o.Y36(DA),o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(mo.tT),o.Y36(Fo),o.Y36(ui.F0),o.Y36(Xi.qu),o.Y36(lo.N),o.Y36(Zr),o.Y36(ui.gz),o.Y36(mM))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-my-connects"]],hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.closeMenuOnClickOutside(t)},!1,o.evT)("scroll",function(t){return e.onScroll(t)},!1,o.Jf7)("touchmove",function(t){return e.onTouchMove(t)},!1,o.Jf7)("resize",function(t){return e.onResize(t)},!1,o.Jf7)("click",function(t){return e.onClickOutside(t)},!1,o.evT)},inputs:{userCompleteConnects:"userCompleteConnects",userDraftConnects:"userDraftConnects",isSlideClose:"isSlideClose"},outputs:{goToConnectApp:"goToConnectApp"},decls:42,vars:2,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],[4,"ngIf"],["id","showWarningPopUp","tabindex","-1","role","dialog","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal
1-dialog-popout"],[1,"modal-content","popUP","minimal-popUp"],["id","mindbody_pricing","tabindex","-1","aria-labelledby","exampleModalLabel","aria-hidden","true",1,"modal","fade"],[1,"modal-dialog","modal-dialog-centered","modal-lg"],[1,"modal-content","p-4"],[1,"modal-header","justify-content-center","text-black","border-0"],[1,"modal-title","fw-bold"],[1,"modal-body","text-black","fw-normal"],[1,"modal-footer","border-0","justify-content-center"],["type","button","data-bs-dismiss","modal",1,"btn","border-1","px-5","py-2","btn-outline-primary"],["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","myConnectpage",1,"dashboard-middle","clearfix","sectionpadding"],["class","aiprompt-sec position-relative mb-3 mb-md-4 recommendation-sec",4,"ngIf"],["class","aiprompt-sec build-workflow-box position-relative mb-3 mb-md-4","id","buildWorkflowBox",4,"ngIf"],[1,"align-items-center","d-flex","justify-content-between","mar-15-b","w-100"],["class","h3 d-lg-none",4,"ngIf"],["class","h3 d-lg-block d-none",4,"ngIf"],["class","formseach d-block d-lg-none bg-white py-2 rounded-3 w-100","method","post",4,"ngIf"],["class","btn viewbtn p-1 d-block d-xl-none","type","button","id","SearchButton","aria-label","Search",3,"click",4,"ngIf"],[1,"dropdown","ms-lg-auto","hidden","d-none"],["id","foldersDropdown","type","button",1,"btn","viewbtn","btn-primary","d-inline-flex","align-items-center","gap-1","justify-content-center","f-14","fw-normal","dropdown-toggle","bg-transparent","border-0","foldersButton",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],["x1","12","y1","11","x2","12","y2","17"],["x1","9","y1","14","x2","15","y2","14"],[1,"containerCustom","clearfix","bg-white","rounded-4","p-3","p-xl-4",3,"ngClass"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],["class","publishedTabs",4,"ngIf"],["class","draftTabs",4,"ngIf"],[1,"aiprompt-sec","position-relative","mb-3","mb-md-4","recommendation-sec"],[1,"d-flex","align-items-center","justify-content-center","gap-3","flex-column","flex-md-row","mb-2","mb-md-4"],[1,"fs-3","fw-semibold","lh-base"],["class","btn close-ai",3,"click",4,"ngIf"],[1,"d-flex","align-items-center","flex-column","flex-lg-row","w-100","mb-3"],[1,"items-trigger-action"],[1,"triggers","position-relative"],[1,"d-grid","position-relative","align-items-center","search_trigger_action"],[1,"connects-imgs"],["src","./assets/images/searchtri.svg","alt","","width","22","height","22",4,"ngIf"],["width","128","height","128",3,"src","alt",4,"ngIf"],["type","text","id","triggerInput","placeholder","Select Trigger App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click","input"],["class","btn connect-close","type","button",3,"click",4,"ngIf"],[1,"overlaymobileAI","desktop-trigger",3,"ngClass","click"],[1,"contentmobile_AI",3,"click"],[1,"dropdown-ai","thinScroll"],[4,"ngFor","ngForOf"],["class","px-3 text-black-50 py-2 text-start",4,"ngIf"],["class","px-3 text-blue-50 py-2 text-start","style","text-decoration: underline;",3,"click",4,"ngIf"],["class","items-trigger-action triggers position-relative d-xl-none mt-3",4,"ngIf"],["class","connects-hightlight-icon mt-4",4,"ngIf"],["type","text","id","actionInput","placeholder","Select Action App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click","input"],[1,"overlaymobileAI","desktop-action",3,"ngClass","click"],["class","d-flex align-items-center flex-column flex-lg-row w-100 d-none d-xl-flex",4,"ngIf"],["class","overlaymobile recommended-overlay my-xl-3",3,"ngClass","click",4,"ngIf"],[1,"mt-3","d-flex","justify-content-between","flex-wrap","gap-3","align-items-center","border-top","pt-3","buttons-warp"],["class","d-flex justify-content-center align-items-center gap-2 mx-auto",3,"ngClass",4,"ngIf"],["class","btn btn-generate btn-block rounded-pill fw-normal f-14 px-4 py-2","type","button",3,"click",4,"ngIf"],["class","btn btn-skip btn-block rounded-pill fw-normal f-14 px-4 py-2","type","button",3,"click",4,"ngIf"],["class","btn btn-skip btn-block rounded-pill fw-normal f-14 px-4 py-2","type","button","disabled","true",4,"ngIf"],[1,"btn","close-ai",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","30","height","30","viewBox","0 0 30 30","fill","none"],["d","M22.5 7.5L7.5 22.5","
1stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M7.5 7.5L22.5 22.5","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["src","./assets/images/searchtri.svg","alt","","width","22","height","22"],["width","128","height","128",3,"src","alt"],["type","button",1,"btn","connect-close",3,"click"],[1,"btn","d-flex","align-items-center","gap-2","w-100",3,"ngClass","click"],[1,"px-3","text-black-50","py-2","text-start"],[1,"px-3","text-blue-50","py-2","text-start",2,"text-decoration","underline",3,"click"],[1,"items-trigger-action","triggers","position-relative","d-xl-none","mt-3"],["type","text","id","triggerEventInput","placeholder","Select Event for Trigger App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click"],["class","overlaymobile recommended-overlay my-xl-3 triggle-action-overlay",3,"ngClass","click",4,"ngIf"],[1,"overlaymobile","recommended-overlay","my-xl-3","triggle-action-overlay",3,"ngClass","click"],[1,"contentmobile",3,"click"],[1,"d-flex","align-items-center","justify-content-between","gap-3","flex-wrap","mb-3"],[1,"mb-0","fs-5","text-body"],["type","text","id","triggerEventInput","placeholder","Select Event for Trigger App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","input"],[1,"dropdown-ai","thinScroll","action-trigger-wrap"],[1,"d-flex","flex-column"],[1,"connects-hightlight-icon","mt-4"],["src","./assets/images/connects-dark-icon.svg","width","70","height","24","alt","connect",4,"ngIf"],["src","./assets/images/connects-highlight-icon.svg","width","70","height","24","alt","connect",4,"ngIf"],["src","./assets/images/connects-dark-icon.svg","width","70","height","24","alt","connect"],["src","./assets/images/connects-highlight-icon.svg","width","70","height","24","alt","connect"],["type","text","id","actionEventInput","placeholder","Select Event for Action App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click"],["type","text","id","actionEventInput","placeholder","Select Event for Action App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","input"],[1,"d-flex","align-items-center","flex-column","flex-lg-row","w-100","d-none","d-xl-flex"],[1,"items-trigger-action","triggers","position-relative"],["type","text","id","triggerEventInput","placeholder","Select Event for Trigger App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click","input"],[1,"overlaymobileAI",3,"ngClass","click"],[1,"connects-hightlight-icon"],["type","text","id","actionEventInput","placeholder","Select Event for Action App","autocomplete","off",1,"form-control",3,"ngModel","ngModelChange","click","input"],[1,"btn","d-flex","align-items-center","gap-3","w-100",3,"ngClass","click"],[1,"overlaymobile","recommended-overlay","my-xl-3",3,"ngClass","click"],["type","button","class","bg-white btn f-14 ng-tns-c146-0 p-0 p-1 rounded-circle d-inline-block",3,"click",4,"ngIf"],[1,"thinScroll","recommend-templates","mb-3",3,"ngClass"],[1,"row","row-cols-1","row-cols-md-2","row-cols-lg-3","g-3"],["class","col",4,"ngFor","ngForOf"],[1,"d-flex","flex-column","gap-2"],["class","btn mx-auto d-none d-xl-flex align-items-center gap-2 justify-content-center p-1 viewmore text-primary","type","button",3,"click",4,"ngIf"],["class","btn btn-generate btn-block d-xl-none rounded-pill fw-normal f-14 px-4 py-2","type","button",3,"click",4,"ngIf"],["class","btn btn-skip btn-block d-xl-none rounded-pill fw-normal f-14 border-0 px-1 py-1 bg-transparent","type","button",3,"click",4,"ngIf"],["class","btn btn-skip btn-block d-xl-none rounded-pill fw-normal f-14 border-0 px-1 py-1 bg-transparent","type","button","disabled","true",4,"ngIf"],["type","button",1,"bg-white","btn","f-14","ng-tns-c146-0","p-0","p-1","rounded-circle","d-inline-block",3,"click"],[1,"col"],[1,"card","card-template","rounded-4","h-100",3,"ngClass","click"],[1,"card-template-img","p-3","align-items-center","d-flex","gap-3","pb-0"],[1,"align-items-center","d-flex","flex-lg-shrink-0","justify-content-center","p-2","rounded-circle"],["alt","","width","128","height","128",1,"img-fluid",3,"src"],[1,"card-body","card-template-body"],[3,"click"],[1,"mb-2"],["type","button",1,"btn","mx-auto","d-none","d-xl-flex","align-items-center","gap-2","justify-content-center","p-1","viewmore","text-primary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","14","height","8","viewBox","0 0 14 8","fill","none",3,"ngClass"],["d","M12.75 1.125L7 6.875L1.25 1.125","stroke","#5371FF","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","button",1,"btn","btn-generate","btn-block","d-xl-none","rounded-pill","fw-normal","f-14","px-4","py-2",3,"click"],["type","button",1,"btn","btn-skip","btn-block","d-xl-none","rounded-pill","fw-normal","f-14","border-0","px-1","py-1","bg-transparent",3,"click"],["type","button","disabled","true",1,"btn","btn-skip","btn-block","d-xl-none","rounded-pill","fw-normal","f-14","border-0","px-1","py-1","bg-transparent"],[1,"loading-dots"],[1,"d-flex","justify-content-center","align-items-center","gap-2","mx-auto",3,"ngClass"],["src","./assets/images/aiprompt.svg","alt","ai","width","25","height","25"],[1,"mb-0","f18","font-w600","text-body"],["type","button",1,"btn","p-0","bg-transparent","border-0","trynow",3,"click"],["type","button",1,"btn","btn-generate","btn-block","rounded-pill","fw-normal","f-14","px-4","py-2",3,"click"],["type","button",1,"btn","btn-skip","btn-block","rounded-pill","fw-normal","f-14","px-4","py-2",3,"click"],["type","button","disabled","true",1,"btn","btn-skip","btn-block","rounded-pill","fw-normal","f-14","px-4","py-2"],["id","buildWorkflowBox",1,"aiprompt-sec","build-workflow-box","position-relative","mb-3","mb-md-4"],[1,"b
1w-toolbar","d-flex","align-items-center","flex-wrap","gap-2","mb-3"],["type","button",1,"bw-chip",3,"click"],[1,"bw-chip-at"],["width","15","height","15","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13 2L4.5 13.5H11L10 22L19.5 10H13V2Z","fill","#f5b301"],[1,"aitext-wrap","w-100",3,"formGroup"],[1,"d-flex","align-items-end","justify-content-between","w-100","gap-2"],["formControlName","aiText","id","aiText","rows","1","placeholder","Describe the workflow you want to automate\u2026",1,"rezise-none","aitextarea","w-100","thinScroll",3,"input"],["class","btn p-0 btn-sm ai_send",3,"disabled","click",4,"ngIf"],["class","text-center flex-shrink-0",4,"ngIf"],["class","text-error mb-0 f-14 mt-2",4,"ngIf"],[1,"mt-2","d-flex","align-items-center","gap-3","flex-wrap"],["class","d-flex justify-content-center align-items-center gap-2",4,"ngIf"],["class","d-flex flex-column gap-3 generated-wrap mt-4",4,"ngIf"],[1,"btn","p-0","btn-sm","ai_send",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","26","height","26","viewBox","0 0 26 26","fill","none"],["d","M23.8332 2.16663L16.2498 23.8333L11.9165 14.0833M23.8332 2.16663L2.1665 9.74996L11.9165 14.0833M23.8332 2.16663L11.9165 14.0833","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"text-center","flex-shrink-0"],[1,"btn","btn-generate","btn-block","rounded-pill","fw-normal","f-14","px-4","py-2",3,"disabled","click"],["class","cml-status mb-0",4,"ngIf"],[1,"cml-spinner"],["width","16","height","16","viewBox","0 0 24 24","fill","currentColor","xmlns","http://www.w3.org/2000/svg"],["d","M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"],[1,"cml-status","mb-0"],[1,"cml-dot"],[1,"text-error","mb-0","f-14","mt-2"],[1,"d-flex","justify-content-center","align-items-center","gap-2"],["src","./assets/images/ai-connect.svg","alt","ai","width","18","height","18"],[1,"mb-0","f-14","font-w600","text-body"],["type","button","routerLink","/customeditor/fresh/app/newNode",1,"btn","p-0","bg-transparent","border-0","trynow"],[1,"d-flex","flex-column","gap-3","generated-wrap","mt-4"],[1,"fs-4","fw-semibold","text-center","text-md-start"],[1,"bg-white","rounded-4","p-3","border","d-flex","align-items-start","gap-3","flex-column"],[1,"generated-listed"],["class","d-flex align-items-center gap-2",4,"ngFor","ngForOf"],[1,"text-end"],["class","btn btn-generate btn-block rounded-pill fw-medium f-14 px-4 py-2",3,"disabled","click",4,"ngIf"],["class","btn btn-generate btn-block rounded-pill fw-medium f-14 px-4 py-2","disabled","true",4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],[1,"iconImg-box","d-flex","align-items-center","justify-content-center","overflow-hidden","rounded-circle"],["width","20","height","20",1,"iconImg",3,"alt","src"],[1,"d-flex","align-items-start","justify-content-start","flex-column","mb-0"],[1,"text-muted"],[1,"text"],[1,"btn","btn-generate","btn-block","rounded-pill","fw-medium","f-14","px-4","py-2",3,"disabled","click"],["disabled","true",1,"btn","btn-generate","btn-block","rounded-pill","fw-medium","f-14","px-4","py-2"],[1,"h3","d-lg-none"],[1,"h3","d-lg-block","d-none"],["method","post",1,"formseach","d-block","d-lg-none","bg-white","py-2","rounded-3","w-100"],[1,"gridform","mobile_w100"],["type","submit",1,"btn","p-0"],["width","30","height","30","viewBox","0 0 38 38","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","38","height","38","rx","10","fill","none"],["d","M17.8333 27.1667C22.988 27.1667 27.1667 22.988 27.1667 17.8333C27.1667 12.6787 22.988 8.5 17.8333 8.5C12.6787 8.5 8.5 12.6787 8.5 17.8333C8.5 22.988 12.6787 27.1667 17.8333 27.1667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.5001 29.5L27.1667 27.1667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","text","name","searchText",1,"form-control","dataapps","border-0","f-14","px-1",3,"placeholder","ngModel","ngModelChange","keyup","keydown"],["searchText",""],[1,"btn","p-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M15 5L5 15","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M5 5L15 15","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","button","id","SearchButton","aria-label","Search",1,"btn","viewbtn","p-1","d-block","d-xl-none",3,"click"],["class","searchicon","width","30","height","30","viewBox","0 0 38 38","fill","none","id","23","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","30","height","30","viewBox","0 0 38 38","fill","none","id","23","xmlns","http://www.w3.org/2000/svg",1,"searchicon"],[1,"d-flex","align-items-center","flex-wrap","gap-4","justify-content-between","mb-3"],[1,"tabs","d-flex","align-items-center","gap-3"],["class","tabs-btn published-btn active",3,"active","click",4,"ngIf"],["class","tabs-btn draft-btn",3,"active","click",4,"ngIf"],[1,"searchconnect","d-flex","align-items-center","gap-3","flex-wrap","ms-lg-auto--"],["class","btn viewbtn p-1 d-none d-xl-block","type","button","aria-label","Tile View",3,"click",4,"ngIf"],["class","btn viewbtn p-1",3,"click",4,"ngIf"],["class","btn viewbtn p-1 d-none d-xl-block","type","button","id","SearchButton","aria-label","Search",3,"click",4,"ngIf"],["class","d-flex align-items-center gap-md-3 flex-wrap justify-content-center ms-lg-auto mobile_fonts",4,"ngIf"],["class","formseach d-none d-lg-block","method","post",4,"ngIf"],[1,"tabs-btn","published-btn","active",3,"click"],["stroke","currentColor","fill","CurrentColor","stroke-width","0","viewBox","0 0 24 24","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11.0026 16L18.0737 8.92893L16.6595 7.51472L11.0026 13.1716L8.17421 10.3431L6.75999 11.7574L11.0026 16Z"],[1,"tabs-btn","draft
1-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","none"],["d","M13.4 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V12.6","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M18.4 2.59999C18.8168 2.33093 19.3133 2.21284 19.8066 2.26538C20.3 2.31793 20.7604 2.53794 21.1112 2.88876C21.4621 3.23957 21.6821 3.70001 21.7346 4.19336C21.7872 4.6867 21.6691 5.18315 21.4 5.59999L16 11L12 12L13 7.99999L18.4 2.59999Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","button","aria-label","Tile View",1,"btn","viewbtn","p-1","d-none","d-xl-block",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 28 28","fill","none"],["d","M10.5 3.5H4.66667C4.02233 3.5 3.5 4.02233 3.5 4.66667V10.5C3.5 11.1443 4.02233 11.6667 4.66667 11.6667H10.5C11.1443 11.6667 11.6667 11.1443 11.6667 10.5V4.66667C11.6667 4.02233 11.1443 3.5 10.5 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3335 3.5H17.5002C16.8558 3.5 16.3335 4.02233 16.3335 4.66667V10.5C16.3335 11.1443 16.8558 11.6667 17.5002 11.6667H23.3335C23.9778 11.6667 24.5002 11.1443 24.5002 10.5V4.66667C24.5002 4.02233 23.9778 3.5 23.3335 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3335 16.3333H17.5002C16.8558 16.3333 16.3335 16.8556 16.3335 17.5V23.3333C16.3335 23.9776 16.8558 24.5 17.5002 24.5H23.3335C23.9778 24.5 24.5002 23.9776 24.5002 23.3333V17.5C24.5002 16.8556 23.9778 16.3333 23.3335 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M10.5 16.3333H4.66667C4.02233 16.3333 3.5 16.8556 3.5 17.5V23.3333C3.5 23.9776 4.02233 24.5 4.66667 24.5H10.5C11.1443 24.5 11.6667 23.9776 11.6667 23.3333V17.5C11.6667 16.8556 11.1443 16.3333 10.5 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"btn","viewbtn","p-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M9.33301 7H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33301 14H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33301 21H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 7H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 14H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 21H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","button","id","SearchButton","aria-label","Search",1,"btn","viewbtn","p-1","d-none","d-xl-block",3,"click"],["width","30","height","30","viewBox","0 0 38 38","fill","none","xmlns","http://www.w3.org/2000/svg",1,"searchicon"],[1,"d-flex","align-items-center","gap-md-3","flex-wrap","justify-content-center","ms-lg-auto","mobile_fonts"],[1,"fw-normal","text-color","p-2","f-14"],["type","button",1,"btn","fw-normal","text-color","p-2","f-14","fw-normal","text-color","p-2",3,"click"],["type","button",1,"btn","fw-normal","text-color","p-2","f-14","d-inline-flex","align-items-center","gap-1","move-folder-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],["d","M12 10v6"],["d","m9 13 3-3 3 3"],["type","button",1,"btn","fw-normal","text-color","p-2","f-14","delete_button","d-inline-flex","align-items-center","gap-1",3,"click"],["d","M2.80005 5.20001H17.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M15.6 5.2V16.4C15.6 16.8243 15.4315 17.2313 15.1314 17.5314C14.8313 17.8314 14.4244 18 14 18H6.00002C5.57568 18 5.16871 17.8314 4.86865 17.5314C4.5686 17.2313 4.40002 16.8243 4.40002 16.4V5.2M6.80002 5.2V3.6C6.80002 3.17565 6.9686 2.76869 7.26865 2.46863C7.56871 2.16857 7.97568 2 8.40002 2H11.6C12.0244 2 12.4313 2.16857 12.7314 2.46863C13.0315 2.76869 13.2 3.17565 13.2 3.6V5.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M8.40002 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M11.6001 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["method","post",1,"formseach","d-none","d-lg-block"],[1,"gridform"],["type","text","name","searchText",1,"form-control","dataapps","border-0","f-14","px-1",3,"placeholder","ngModel","ngModelChange","keyup","keydown","input"],[1,"publishedTabs"],["class","myconnectapps list-view",4,"ngIf"],["class","myconnectapps",3,"ngClass",4,"ngIf"],[1,"myconnectapps","list-view"],[1,"headconnectapp","text-start"],[1,"select-all"],[1,"sk-box",2,"width","18px","height","18px","border-radius","4px"],[1,"connectname"],[1,"sk-box",2,"width","80px","height","14px"],[1,"connectname","appid_connect"],[1,"sk-box",2,"width","60px","height","14px"],[1,"connect"],[1,"sk-box",2,"width","50px","height","14px"],[1,"created"],[1,"sk-box",2,"width","70px","height","14px"],[1,"lastupdate"],[1,"actions"],[1,"mapping-list"],["class","headconnectapp connectitemsapp",4,"ngFor","ngForOf"],[1,"headconnectapp","connectitemsapp"],[1,"select"],[1,"sk-box",2,"width","65%","height","14px"],[1,"appid_connect"],[1,"connect","your_connects"],[1,"sk-box",2,"width","28px","height","28px","border-radius","50%"],[1,"sk-box",2,"width","28px","height","28px","border-radius","50%","margin-left","-8px"],[1,"sk-box",2,"width","60px","height","28px","border-radius","6px"],[1,"myconnectapps",3,"ngClass"],["class","headconnectapp text-start",4,"ngIf"],["class","mapping-list",4,"ngIf"],["class","bg-transparent border-0 no-connects-wrap shadow-none",4,"ngIf"],["class","connectitemsapp headconnectapp errornotfound d-none",4,"ngIf"],["class","draft
1-toggle margin-50 d-none",4,"ngIf"],["class","select-all",4,"ngIf"],[1,"connectname","d-flex","align-items-start","gap-2"],[1,"connectname","appid_connect","text-truncate"],[1,"actions","text-center"],[1,"container-checkbox"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"checkmark","d-none-before"],["class","headconnectapp connectitemsapp",3,"ngClass","id","hidden","scroll",4,"ngFor","ngForOf"],[1,"headconnectapp","connectitemsapp",3,"ngClass","id","hidden","scroll"],[1,"select",3,"ngClass"],[1,"checkmark"],[1,"connectname","connectname-effect",3,"click"],[1,"custom-options-tooltip"],[1,"lh-sm","d-inline-block","max-w-250","w-100","text-truncate"],[1,"appid_connect","text-truncate","overflow-visible","d-flex","align-items-center","gap-2",3,"id"],[1,"d-block",3,"click"],["type","button","data-tooltip","Copy ID",1,"btn","px-1","copyButton","custom-options-tooltip"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","24","height","24","rx","5","fill","none"],["d","M17.8287 9.59998H10.9715C10.2141 9.59998 9.6001 10.214 9.6001 10.9714V17.8285C9.6001 18.586 10.2141 19.2 10.9715 19.2H17.8287C18.5861 19.2 19.2001 18.586 19.2001 17.8285V10.9714C19.2001 10.214 18.5861 9.59998 17.8287 9.59998Z","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M6.17148 14.4C5.41719 14.4 4.80005 13.7828 4.80005 13.0286V6.17142C4.80005 5.41713 5.41719 4.79999 6.17148 4.79999H13.0286C13.7829 4.79999 14.4 5.41713 14.4 6.17142","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],[1,"slelected-app"],[1,"item","item-2x","item-circle"],[1,"img-avatar","img-avatar48"],["alt","","width","20","height","20",3,"src"],["class","slelected-app",4,"ngIf"],[1,"d-xl-none"],[1,"actions","actionMenu"],["class","activetoption btn end-0 f-14 fw-normal position-absolute px-3 pt-3 top-0 d-xl-none",4,"ngIf"],[1,"dropdown","inactivedrop","d-none","d-xl-block"],["class","btn dropdown-toggle f-14 fw-normal px-4 ps-2 activetoption","role","button","data-bs-toggle","dropdown","aria-expanded","false",4,"ngIf"],[1,"dropdown-menu",3,"id"],[1,"dropdown-item","f-14","fw-normal",3,"click"],[1,"dotpill",3,"ngClass"],[1,"listviewEdit"],[1,"btn","btn-primary","rounded-pill","px-3","my-2",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","19","height","18","viewBox","0 0 19 18","fill","none"],["d","M13.25 2.24999C13.441 2.02427 13.6773 1.84053 13.9438 1.7105C14.2102 1.58047 14.5011 1.50699 14.7977 1.49475C15.0944 1.48251 15.3904 1.53177 15.6668 1.6394C15.9432 1.74703 16.194 1.91067 16.4032 2.11988C16.6124 2.32909 16.7755 2.57929 16.8819 2.85452C16.9883 3.12975 17.0359 3.42399 17.0215 3.71847C17.007 4.01296 16.931 4.30123 16.7982 4.56491C16.6653 4.8286 16.4787 5.06191 16.25 5.24999L6.125 15.375L2 16.5L3.125 12.375L13.25 2.24999Z","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M11.75 3.75L14.75 6.75","stroke","white","stroke-linecap","round","stroke-linejoin","round"],[1,"dropdown","actions-dropdwon","dropdown-menu-end"],["type","button","data-tooltip","More Options","data-bs-toggle","dropdown","aria-expanded","false","aria-label","More Options",1,"btn","dropdown-toggle","custom-options-tooltip","d-none","d-xl-block",3,"id","click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","200px","width","200px","xmlns","http://www.w3.org/2000/svg"],["d","M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"],[1,"d-flex","d-xl-none","mobile_changeview"],["type","button",1,"btn","dropdown-toggle","d-block","d-xl-none","f-14","fw-normal","mobileBtn-outline","rounded-pill",3,"id","click"],["type","button","class","btn f-14 fw-normal d-block d-xl-none  mobileBtn-outline rounded-pill theme-bgcl text-white",3,"click",4,"ngIf"],["aria-labelledby","'dropdownMenuLink' + i",1,"dropdown-menu",3,"ngClass"],[1,"p-0"],[1,"pauseconnect",3,"click"],["href","javaScript:void(0);",1,"dropdown-item"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none"],["clip-path","url(#clip0_22_6582)"],["d","M7.99998 14.6666C11.6819 14.6666 14.6666 11.6819 14.6666 7.99998C14.6666 4.31808 11.6819 1.33331 7.99998 1.33331C4.31808 1.33331 1.33331 4.31808 1.33331 7.99998C1.33331 11.6819 4.31808 14.6666 7.99998 14.6666Z","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M6.66669 10V6","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33331 10V6","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_22_6582"],["width","16","height","16","fill","none"],["href","javascript:void(0);",1,"dropdown-item",3,"click"],["clip-path","url(#clip0_22_6589)"],["d","M13.3333 5.33331H6.66665C5.93027 5.33331 5.33331 5.93027 5.33331 6.66665V13.3333C5.33331 14.0697 5.93027 14.6666 6.66665 14.6666H13.3333C14.0697 14.6666 14.6666 14.0697 14.6666 13.3333V6.66665C14.6666 5.93027 14.0697 5.33331 13.3333 5.33331Z","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M2.66665 10.6666C1.93331 10.6666 1.33331 10.0666 1.33331 9.33331V2.66665C1.33331 1.93331 1.93331 1.33331 2.66665 1.33331H9.33331C10.0666 1.33331 10.6666 1.93331 10.6666 2.66665","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_22_6589"],["clip-path","url(#clip0_22_6595)"],["d","M8 4V8L10.6667 9.33333","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_22_6595"],["d","M2 8C2 9.18669 2.35189 10.3467 3.01118 11.3334C3.67047 12.3201 4.60754 13.0892 5.7039 13.5433C6.80026 13.9974 8.00666 14.1162 9.17054 13.8847C10.3344 13.6532 11.4035 13.0818 12.2426 12.2426C13.0818 11.4035 13.6532 10.3344 13.8847 9.17054C14.1162 8.00666 13.9974 6.80026 13.5433 5.7039C13.0892 4.60754 12.3201 3.67047 11.3334 3.01118C10.3467 2.35189 9.18669 2 8 2C6.32263 2.00631 4.71265 2.66082 3.50667 3.82667L2 5.33333","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M2 2V5.33333H5.33333","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M8 4.66669V8.00002L10.
16667 9.33335","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M2.66669 9.93266C2.17138 9.4266 1.79773 8.81447 1.57405 8.14262C1.35036 7.47077 1.28249 6.75682 1.3756 6.05486C1.4687 5.3529 1.72033 4.68133 2.11142 4.09102C2.50251 3.50071 3.02281 3.00714 3.63291 2.64769C4.24301 2.28825 4.92691 2.07236 5.6328 2.01638C6.33869 1.96039 7.04807 2.06578 7.7072 2.32457C8.36633 2.58335 8.95793 2.98873 9.43718 3.51002C9.91643 4.0313 10.2708 4.65481 10.4734 5.33333H11.6667C12.3104 5.33325 12.937 5.54021 13.454 5.92362C13.971 6.30703 14.351 6.84657 14.5379 7.46253C14.7247 8.07849 14.7085 8.73821 14.4916 9.34424C14.2747 9.95027 13.8686 10.4705 13.3334 10.828","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M8 8V14","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M10.6666 10.6667L7.99998 8L5.33331 10.6667","stroke","CurrentColor","stroke-linecap","round","stroke-linejoin","round"],["stroke","currentColor","fill","none","stroke-width","1.5","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["d","M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1"],["d","M2 13h10"],["d","m9 16 3-3-3-3"],[1,"svgicon"],["d","M2 4H14","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M12.6666 4V13.3333C12.6666 14 12 14.6667 11.3333 14.6667H4.66665C3.99998 14.6667 3.33331 14 3.33331 13.3333V4","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M5.33331 3.99998V2.66665C5.33331 1.99998 5.99998 1.33331 6.66665 1.33331H9.33331C9.99998 1.33331 10.6666 1.99998 10.6666 2.66665V3.99998","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M6.66669 7.33331V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33331 7.33331V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],[1,"text-danger"],["class","overlaymobile",3,"id","click",4,"ngIf"],["class","numbercountapps",4,"ngIf"],["alt","","width","20","height","20",3,"src",4,"ngIf"],[1,"numbercountapps"],[1,"activetoption","btn","end-0","f-14","fw-normal","position-absolute","px-3","pt-3","top-0","d-xl-none"],[1,"dotpill","dotactive"],[1,"dotpill","dotinactive"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","dropdown-toggle","f-14","fw-normal","px-4","ps-2","activetoption"],["type","button",1,"btn","f-14","fw-normal","d-block","d-xl-none","mobileBtn-outline","rounded-pill","theme-bgcl","text-white",3,"click"],["href","javascript:void(0);",1,"dropdown-item","folder-indicator-item",3,"click"],["stroke","currentColor","fill","none","stroke-width","1.5","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16"],[1,"overlaymobile",3,"id","click"],[1,"contentmobile"],[1,"dropdown_menu_mobile"],[1,"bg-transparent","border-0","no-connects-wrap","shadow-none"],[1,"block-content","block-content-full","text-center"],["width","288","height","158","viewBox","0 0 288 158","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M76.1751 63.5083C76.1751 56.7058 72.3087 50.8164 66.6576 47.8849C65.6981 47.0919 64.5252 45.6322 64.7062 43.2835C64.7062 43.2835 64.7638 41.7682 65.8457 40.4792H108.012C113.035 40.4792 117.106 44.5482 117.106 49.5658V91.5307C118.432 92.7722 120.102 92.8338 120.102 92.8338C122.452 93.0116 123.913 91.8418 124.707 90.8821C127.642 85.2363 133.538 81.3723 140.345 81.3723C150.077 81.3723 157.968 89.2548 157.968 98.9808C157.968 108.704 150.077 116.587 140.345 116.587C133.538 116.587 127.642 112.724 124.707 107.077C123.913 106.118 122.452 104.947 120.102 105.127C120.102 105.127 118.432 105.187 117.106 106.428V148.393C117.106 153.412 113.035 157.479 108.012 157.479H9.09482C4.07169 157.479 0 153.412 0 148.393V49.5658C0 44.5482 4.07169 40.4792 9.09482 40.4792H51.2596C52.3405 41.7682 52.4001 43.2835 52.4001 43.2835C52.5801 45.6322 51.4083 47.0919 50.4467 47.8849C44.7967 50.8164 40.9292 56.7058 40.9292 63.5083C40.9292 73.2323 48.8198 81.1147 58.5527 81.1147C68.2865 81.1147 76.1751 73.2323 76.1751 63.5083Z","fill","#DCEFFF"],["d","M194.048 81.8094C187.247 81.8094 181.359 85.6766 178.428 91.3288C177.635 92.2885 176.176 93.4616 173.828 93.2806C173.828 93.2806 172.313 93.223 171.024 92.1409V49.9665C171.024 44.9423 175.092 40.8698 180.109 40.8698H222.065C223.306 39.544 223.368 37.8733 223.368 37.8733C223.546 35.523 222.376 34.0617 221.417 33.2678C215.772 30.332 211.909 24.4351 211.909 17.626C211.909 7.89221 219.79 0 229.514 0C239.235 0 247.116 7.89221 247.116 17.626C247.116 24.4351 243.254 30.332 237.608 33.2678C236.649 34.0617 235.478 35.523 235.658 37.8733C235.658 37.8733 235.719 39.544 236.959 40.8698H278.915C283.934 40.8698 288 44.9423 288 49.9665V148.903C288 153.927 283.934 158 278.915 158H180.109C175.092 158 171.024 153.927 171.024 148.903V106.73C172.313 105.649 173.828 105.589 173.828 105.589C176.176 105.409 177.635 106.581 178.428 107.543C181.359 113.194 187.247 117.062 194.048 117.062C203.77 117.062 211.651 109.17 211.651 99.4354C211.651 89.6996 203.77 81.8094 194.048 81.8094Z","fill","#DCEFFF"],[1,"push-30","no-connects-content"],[1,"fw-normal","push-30-t","push-30","fs-5"],[1,"push-30"],["routerLink","//customeditor/fresh/app/newNode",1,"no-connects-btn"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 448 512","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["d","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"],[1,"connectitemsapp","headconnectapp","errornotfound","d-none"],[1,"showfillter"],[1,"draft-toggle","margin-50","d-none"],["id","draftConnectsCollapsed",1,"accordion-toggle",3,"click"],[1,"draftTabs"],["class","draft
1-toggle-target list-view",4,"ngIf"],["class","draft-toggle-target",3,"display","ngClass",4,"ngIf"],[1,"draft-toggle-target","list-view"],[1,"draft-toggle-target",3,"ngClass"],["class","headconnectapp connectitemsapp",3,"ngClass","scroll",4,"ngFor","ngForOf"],[1,"select","select-all"],["class","container-checkbox",4,"ngIf"],[1,"headconnectapp","connectitemsapp",3,"ngClass","scroll"],[1,"appid_connect","text-truncate","overflow-visible",3,"click"],[1,"d-block"],[1,"listviewEdit","draftlistviewEdit"],["class","btn btn-primary rounded-pill px-3 my-2",3,"click",4,"ngIf"],["type","button",1,"btn","d-block","d-xl-none","f-14","fw-normal","mobileBtn-outline","rounded-pill","bg-white",3,"id","click"],[1,"drafteditoptions","d-xl-block","d-none"],[1,"listview-hide"],["href","javascript:void(0);","data-tooltip","Edit Connect",1,"custom-options-tooltip","border-0","text-muted",3,"click"],["type","button","data-bs-toggle","dropdown","data-tooltip","More Options","aria-expanded","false","aria-label","More Options",1,"btn","dropdown-toggle","custom-options-tooltip","d-none","d-xl-block",3,"id","click"],["aria-labelledby","'dropdownMenuDraft' + i",1,"dropdown-menu","dropdown-menu-end",3,"ngClass"],[1,"d-none","d-xl-block"],[1,"sk-box",2,"width","55%","height","14px"]],template:function(t,e){1&t&&(o.YNc(0,jP,25,17,"main",0),o.YNc(1,RP,1,0,"app-loader",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o._UZ(4,"div",4),o.qZA(),o.qZA(),o.TgZ(5,"div",5),o.TgZ(6,"div",6),o.TgZ(7,"div",7),o.TgZ(8,"div",8),o.TgZ(9,"h3",9),o._uU(10,"Pricing Change Notice"),o.qZA(),o.qZA(),o.TgZ(11,"div",10),o.TgZ(12,"p"),o._uU(13,"Dear Valued User,"),o.qZA(),o.TgZ(14,"p"),o._uU(15," We hope this message finds you well. We would like to inform you of important changes that Mindbody has recently made to their pricing structure, which will affect your current service plan with Appy Pie Connect. "),o.qZA(),o.TgZ(16,"p"),o._uU(17,"how these changes may impact your account."),o.qZA(),o.TgZ(18,"p"),o._uU(19,"Under the new pricing arrangement:"),o.qZA(),o.TgZ(20,"ul"),o.TgZ(21,"li"),o._uU(22," - Users subscribed to the Standard or Professional plans will need to upgrade to the Business Plan to maintain access to the Mindbody integration. "),o.qZA(),o.TgZ(23,"li"),o._uU(24," - Business Plan users will incur a charge of $0.004 for each API call made. "),o.qZA(),o.TgZ(25,"li"),o._uU(26," - Additionally, the Business Plan now includes a revised quota of 1,000 free API calls per month. "),o.qZA(),o.qZA(),o.TgZ(27,"p"),o._uU(28," To avoid any disruption in service, we kindly urge you to upgrade your plan and ensure that your wallet is adequately funded by September 29th. Failure to upgrade or maintain a funded wallet may result in the cessation of task processing by active Mindbody Connects. "),o.qZA(),o.TgZ(29,"p"),o._uU(30," For your convenience, upgrading to the Business Plan will grant you access to 1,000 free API calls each month. Should you have any questions or require further assistance regarding this transition, please do not hesitate to contact us. Additional information is also available on our Contact page. "),o.qZA(),o.TgZ(31,"p"),o._uU(32," We appreciate your understanding and cooperation during this transition. "),o._UZ(33,"br"),o._uU(34," Thank you for your continued trust and partnership with Appy Pie Connect. "),o.qZA(),o.TgZ(35,"p"),o._uU(36,"Warm regards,"),o.qZA(),o.TgZ(37,"p"),o._uU(38,"The Appy Pie Automate Team"),o.qZA(),o.qZA(),o.TgZ(39,"div",11),o.TgZ(40,"button",12),o._uU(41," Close "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.Q6J("ngIf",e.translation),o.xp6(1),o.Q6J("ngIf",e.marketingPageLoader))},directives:[to.O5,to.mk,Xi.Fj,Xi.JJ,Xi.On,to.sg,Xi._Y,Xi.JL,Xi.sg,Xi.u,ui.rH,Xi.F,Xi.Wl,ui.yS,po],pipes:[to.OU,$M,BM,to.uU],styles:['.sk-box[_ngcontent-%COMP%]{display:inline-block;background:linear-gradient(90deg,#e8e8e8 25%,#f5f5f5 50%,#e8e8e8 75%);background-size:200% 100%;animation:sk-shimmer 1.4s infinite;border-radius:4px}@keyframes sk-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}body.theme-dark[_ngcontent-%COMP%]   .sk-box[_ngcontent-%COMP%], html.theme-dark[_ngcontent-%COMP%]   .sk-box[_ngcontent-%COMP%]{background:linear-gradient(90deg,#2a2d3a 25%,#353849 50%,#2a2d3a 75%);background-size:200% 100%;animation:sk-shimmer 1.4s infinite}.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%]{--bs-gutter-x: 1.5rem;--bs-gutter-y: 0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y)* -1);margin-right:calc(var(--bs-gutter-x)* -.5);margin-left:calc(var(--bs-gutter-x)* -.5);grid-gap:1.5rem;gap:1.5rem}.list-view[_ngcontent-%COMP%]{padding-right:calc(var(--bs-gutter-x)* .5);padding-left:calc(var(--bs-gutter-x)* .5)}.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x)* .5);padding-left:calc(var(--bs-gutter-x)* .5);margin-top:var(--bs-gutter-y)}.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{border-radius:16px;border:1.5px solid #E7E7EB;background:#fff;display:flex;height:auto;padding:30px 16px;flex-direction:column;justify-content:center;align-items:center;max-width:100%;grid-gap:0px;gap:0px;flex:0 0 auto;width:100%;position:relative;text-align:center}.list-view[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{display:none}.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%;justify-content:center;text-align:center}.list-view[_ngcontent-%COMP%]   .max-w-250[_ngcontent-%COMP%]{max-width:200
1px;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .select[_ngcontent-%COMP%]{position:absolute;top:15px;left:16px;opacity:0;visibility:hidden;width:30px!important}.list-view[_ngcontent-%COMP%]   .actions-dropdwon[_ngcontent-%COMP%]{position:absolute;right:10px;top:15px;opacity:0;visibility:hidden}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .select[_ngcontent-%COMP%], .list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .actions-dropdwon[_ngcontent-%COMP%]{opacity:1;visibility:visible}.list-view[_ngcontent-%COMP%]   .actions-dropdwon[_ngcontent-%COMP%] > .dropdown-toggle[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{transform:rotate(-90deg)}.list-view[_ngcontent-%COMP%]   .connect.your_connects[_ngcontent-%COMP%]{order:0;margin-bottom:16px}.list-view[_ngcontent-%COMP%]   .connectname.connectname-effect[_ngcontent-%COMP%]{order:1}.list-view[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]{order:2}.list-view[_ngcontent-%COMP%]   .lastupdate[_ngcontent-%COMP%]{order:4;font-size:12px}.list-view[_ngcontent-%COMP%]   .lastupdate[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-block!important}.list-view[_ngcontent-%COMP%]   .actions.actionMenu[_ngcontent-%COMP%]{order:3}.list-view[_ngcontent-%COMP%]   .actions.actionMenu[_ngcontent-%COMP%] > .inactivedrop[_ngcontent-%COMP%] > .activetoption[_ngcontent-%COMP%]:before{display:none!important}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .lastupdate[_ngcontent-%COMP%], .list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .inactivedrop[_ngcontent-%COMP%]{opacity:0;visibility:hidden}.list-view[_ngcontent-%COMP%]   .lastupdate[_ngcontent-%COMP%]{margin-bottom:.5rem}.listviewEdit[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;padding:1rem;display:none;border-radius:16px;opacity:0;visibility:hidden}.list-view[_ngcontent-%COMP%]   .listviewEdit[_ngcontent-%COMP%]{display:block}.listviewEdit[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{background-color:var(--Primary-Color);font-size:16px;font-weight:400;max-width:100px;width:100%}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .listviewEdit[_ngcontent-%COMP%]{opacity:1;display:block;visibility:visible}.list-view[_ngcontent-%COMP%]   .inactivedrop[_ngcontent-%COMP%] > .activetoption[_ngcontent-%COMP%]{border:0!important;font-size:12px}.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]:hover{border:1.5px solid #74748A}.draft-toggle-target.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%]   .connectitemsapp[_ngcontent-%COMP%]{display:flex;grid-gap:5px;gap:5px}.draft-toggle-target.list-view[_ngcontent-%COMP%]   .listview-hide[_ngcontent-%COMP%]{display:none}.list-view[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .draft-toggle-target.list-view[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{justify-content:center}.list-view[_ngcontent-%COMP%]   .copyButton[_ngcontent-%COMP%]{position:relative;right:0px;top:0}.inactivedrop[_ngcontent-%COMP%]   .activetoption[_ngcontent-%COMP%]{width:105px}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .created[_ngcontent-%COMP%]{opacity:0;visibility:hidden}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .created[_ngcontent-%COMP%]{order:4}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .created[_ngcontent-%COMP%]{font-size:12px}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .class-if--selected[_ngcontent-%COMP%]{opacity:1!important;visibility:visible!important}@media (min-width: 768px){.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{width:31.75%}}@media (min-width: 992px){.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{width:31.35%}}@media (min-width: 1400px){.list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{width:23.33%}}@media (max-width: 1199px){.overlaymobile[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%!important;height:100%;background-color:#0000007f;z-index:1031;display:flex;justify-content:flex-end;align-items:flex-end;transition:all .5s ease-in}.contentmobile[_ngcontent-%COMP%]{background-color:#fff;width:100%;max-width:100%;padding:20px;border-radius:10px 10px 0 0;overflow-y:auto;max-height:450px;scroll-behavior:smooth;scrollbar-width:none;position:absolute;bottom:0;left:0}.dropdown_menu_mobile[_ngcontent-%COMP%]{text-align:start}.dropdown_menu_mobile[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{font-size:1rem;padding:.5rem;display:flex;align-items:center;grid-gap:10px;gap:10px}.dropdown_menu_mobile[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:20px;height:20px}.listviewEdit[_ngcontent-%COMP%]{position:relative;padding:.5rem 0}
1.headconnectapp.connectitemsapp[_ngcontent-%COMP%]:hover   .listviewEdit.mobile_listviewEdit[_ngcontent-%COMP%]{display:flex;opacity:1;visibility:visible;align-items:center;justify-content:flex-start;grid-gap:1rem;gap:1rem;flex-wrap:wrap}.listviewEdit[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{font-size:11px;max-width:100%}.listviewEdit[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{width:14px;height:14px}.card-view[_ngcontent-%COMP%]   .connectitemsapp[_ngcontent-%COMP%]:hover   .listviewEdit.draftlistviewEdit[_ngcontent-%COMP%]{opacity:1;display:flex;visibility:visible;align-items:center;justify-content:center;grid-gap:1rem;gap:1rem}}.aiprompt-sec[_ngcontent-%COMP%]{border-radius:20px;border:1px solid rgba(83,113,255,.5);background:#F6FBFF;padding:2rem 3rem;box-shadow:0 12px 34px #5371ff14}.aitext-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;align-self:stretch;border-radius:16px;background:#FFF;border:1.5px solid rgba(20,23,33,.1);box-shadow:0 2px 10px #1118270d;transition:border-color .16s ease,box-shadow .16s ease}.aitext-wrap[_ngcontent-%COMP%]:focus-within{border-color:var(--Primary-Color);box-shadow:0 4px 18px #3a5cff29}.aitextarea[_ngcontent-%COMP%]{color:var(--text-primary);font-size:15px;line-height:1.5;border:0;resize:none;min-height:2.4em;max-height:7em;overflow-y:auto;scroll-behavior:smooth;flex:1;padding:6px 0;transition:height .2s ease-out}.theme-dark[_nghost-%COMP%]   .aiprompt-sec[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .aiprompt-sec[_ngcontent-%COMP%]{border-color:#788cff47;background:linear-gradient(135deg,#1b2030 0%,#201b34 100%);box-shadow:0 12px 34px #00000059}.theme-dark[_nghost-%COMP%]   .aitext-wrap[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .aitext-wrap[_ngcontent-%COMP%]{background:#14161f;border-color:#ffffff1a;box-shadow:none}.workspace-cards[_ngcontent-%COMP%]{width:100%}.ws-card[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:flex-start;grid-gap:10px;gap:10px;padding:20px 22px;border-radius:16px;background:#fff;border:1px solid rgba(20,23,33,.08);box-shadow:0 2px 10px #1118270a;text-decoration:none;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.ws-card[_ngcontent-%COMP%]:hover{transform:translateY(-3px);box-shadow:0 14px 34px #1118271f;border-color:#5371ffb3}.ws-card-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:13px;flex:0 0 auto}.ws-card-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block}.ws-card-connects[_ngcontent-%COMP%]{background:linear-gradient(135deg,#5b7cff 0%,#3a5cff 100%);box-shadow:0 6px 14px #3a5cff47}.ws-card-agents[_ngcontent-%COMP%]{background:linear-gradient(135deg,#9a6bff 0%,#6d3bff 100%);box-shadow:0 6px 14px #6d3bff42}.ws-card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:4px;gap:4px}.ws-card-title[_ngcontent-%COMP%]{font-size:17px;font-weight:650;color:#1a1f2e}.ws-card-sub[_ngcontent-%COMP%]{font-size:13px;color:#7c8397;line-height:1.45}.ws-card-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;margin-top:6px;font-size:13.5px;font-weight:600;color:#3a5cff}.ws-card-link[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transition:transform .16s ease}.ws-card[_ngcontent-%COMP%]:hover   .ws-card-link[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transform:translate(3px)}.theme-dark[_nghost-%COMP%]   .ws-card[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ws-card[_ngcontent-%COMP%]{background:#191c26;border-color:#ffffff14;box-shadow:0 2px 10px #0000004d}.theme-dark[_nghost-%COMP%]   .ws-card[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .ws-card[_ngcontent-%COMP%]:hover{border-color:#788cff66;box-shadow:0 14px 34px #00000080}.theme-dark[_nghost-%COMP%]   .ws-card-title[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ws-card-title[_ngcontent-%COMP%]{color:#eef1f8}.theme-dark[_nghost-%COMP%]   .ws-card-sub[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ws-card-sub[_ngcontent-%COMP%]{color:#939bb0}.theme-dark[_nghost-%COMP%]   .ws-card-link[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ws-card-link[_ngcontent-%COMP%]{color:#7c92ff}.aiprompt-sec.build-workflow-box[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;max-width:100%;overflow:hidden;border:1px solid rgba(83,113,255,.5);border-radius:20px;background:#F6FBFF;box-shadow:0 12px 34px #5371ff14;padding:1.25rem 1.5rem}.build-workflow-box[_ngcontent-%COMP%]   *[_ngcontent-%COMP%], .build-workflow-box[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]:before, .build-workflow-box[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]:after{box-sizing:border-box}.build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:7px;gap:7px;padding:7px 13px;border-radius:10px;background:#fff;border:1px solid rgba(20,23,33,.1);box-shadow:0 2px 8px #1118270a;color:#3c4257;font-size:13.5px;font-weight:500;cursor:pointer;transition:background .15s ease,border-color .15s ease}.build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%]:hover{border-color:#5371ff73;
1color:#1a1f2e}.build-workflow-box[_ngcontent-%COMP%]   .bw-chip-at[_ngcontent-%COMP%]{font-weight:700;color:#3a5cff}.build-workflow-box[_ngcontent-%COMP%]   .aitext-wrap[_ngcontent-%COMP%]{border-radius:12px;padding:14px 16px;align-items:stretch}.build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]{background:transparent;min-height:92px;max-height:200px}.build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::-moz-placeholder{color:#9aa0bd;font-style:italic;opacity:1}.build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::placeholder{color:#9aa0bd;font-style:italic;opacity:1}.build-workflow-box[_ngcontent-%COMP%]   .btn-generate[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:7px;gap:7px;padding:.45rem 1.1rem!important;font-weight:600!important;white-space:nowrap}.build-workflow-box[_ngcontent-%COMP%]   .btn-generate[_ngcontent-%COMP%]:disabled{background:#e3e7f4;color:#9298ac;box-shadow:none}.theme-dark[_nghost-%COMP%]   .aiprompt-sec.build-workflow-box[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .aiprompt-sec.build-workflow-box[_ngcontent-%COMP%]{border-color:#788cff47;background:linear-gradient(135deg,#1b2030 0%,#201b34 100%);box-shadow:0 12px 32px #0f121e52}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%]{background:#262b3b;border-color:#ffffff17;box-shadow:none;color:#d7dae6}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip[_ngcontent-%COMP%]:hover{border-color:#788cff73;color:#fff}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip-at[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .bw-chip-at[_ngcontent-%COMP%]{color:#a9b0c5}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]{color:#e9ecf7}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::-moz-placeholder, .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::-moz-placeholder{color:#9aa0bd}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::placeholder, .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .aitextarea[_ngcontent-%COMP%]::placeholder{color:#9aa0bd}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .text-body[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .text-body[_ngcontent-%COMP%]{color:#cfd3e6!important}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .trynow[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .trynow[_ngcontent-%COMP%]{color:#7c9dff}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .ai_send[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .ai_send[_ngcontent-%COMP%]{color:#b9a6ff}.theme-dark[_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .btn-generate[_ngcontent-%COMP%]:disabled, .theme-dark   [_nghost-%COMP%]   .build-workflow-box[_ngcontent-%COMP%]   .btn-generate[_ngcontent-%COMP%]:disabled{background:rgba(255,255,255,.1);color:#9298ac}.aitext-wrap[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{color:#383957;text-align:right;font-size:14px}textarea[_ngcontent-%COMP%]::-moz-placeholder{color:#b2b2d2}textarea[_ngcontent-%COMP%]::placeholder{color:#b2b2d2}textarea[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-within, textarea[_ngcontent-%COMP%]:focus{border:0;outline:none;box-shadow:none}.btn-generate[_ngcontent-%COMP%]{background:linear-gradient(135deg,#6a84ff 0%,#5371FF 100%);color:#fff;border:1px solid transparent;box-shadow:0 6px 16px #5371ff47}.btn-generate[_ngcontent-%COMP%]:hover{background:linear-gradient(135deg,#5371FF 0%,#4260ee 100%);color:#fff;border-color:transparent;box-shadow:0 8px 22px #5371ff57}.text-error[_ngcontent-%COMP%]{color:#fc491e}.ai_send[_ngcontent-%COMP%]{width:26px;height:26px;color:var(--Primary-Color);flex:0 0 auto}.ai_send[_ngcontent-%COMP%]:hover{color:var(--text-primary)}.close-ai[_ngcontent-%COMP%]{width:25px;height:25px;display:flex;padding:0;align-items:center;justify-content:center;position:absolute;top:15px;right:30px;color:#1d1d1d}.close-ai[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)}.trybeta[_ngcontent-%COMP%]{border:1.5px solid var(--Primary-Color);color:var(--Primary-Color);font-size:14px;font-weight:500;line-height:20px;flex:0 0 auto}.trybeta[_ngcontent-%COMP%]:hover{background-color:var(--Primary-Color);color:#fff}.generated-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#0f1035}.iconImg-box[_ngcontent-%COMP%]{width:32px;height:32px;background:#E4F3FF;flex:0 0 auto;padding:.25rem}.generated-listed[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:1rem;gap:1rem;justify-content:flex-start;width:100%;flex-wrap:wrap}.generated-listed[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{border-right:2px solid #D0DAE3;padding-right:1rem;margin-right:1rem;position:relative}.generated-listed[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:last-child{padding:0;margin:0;border:0}.User-connects[_ngcontent-%COMP%]{background:#f6fbff!important}.loading-dots[_ngcontent-%COMP%]:after{content:".";animation:dots 1s steps(5,end) infinite;font-size:25px;line-height:1px;display:inline-block;width:4px}@keyframes dots{0%,20%{color:#0000;text-shadow:.25em 0 0 rgba(0,0,0,0),.5em 0 0 rgba(0,0,0,0)}40%{color:#fff;text-shadow:.25em 0 0 rgba(0,0,0,0),.5em 0 0 rgba(0,0,0,0)}60%{text-shadow:.25em 0 0 #fff,.5em 0 0 rgba(0,0,0,0)}80%,to{text-shadow:.25em 0 0 #fff,.5em 0 0 #fff}}.loading-dots[_ngcontent-%COMP%]{display:inline-block;width:12px}@media (max-width: 767px){.aiprompt-sec[_ngcontent-%COMP%]{padding:.5rem!important}.aiprompt-sec[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:12px!important}.trybeta[_ngcontent-%COMP%]{padding:.5rem .75rem!important;font-size:12px;line-height:12px}.close-ai[_ngcontent-%COMP%]{width:16px;height:16px;top:15px;right:15px}.generated-listed[_ngcontent-%COMP%]{grid-gap:.5rem;gap:.5rem}.generated-listed[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{border-right:0;padding-right:0;margin-right:0;position:relative;border-bottom:1px solid #D0DAE3;width:100%;padding-bottom:.5rem}.btn-generate[_ngcontent-%COMP%]{width:100%}.generated-wrap[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:18px!important}.aitext-wrap[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .aitextarea[_ngcontent-%COMP%]{font-size:12px}.no-connects-wrap[_ngcontent-%COMP%]   .block-content[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{width:150px;height:100%}}.alert-task[_ngcontent-%COMP%]{color:#fff;background:#01499D;position:fixed;top:0;left:0;width:100%;z-index:22}.alert-task[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#fff;font-size:clamp(13px,2vw,17px);font-weight:400;line-height:clamp(15px,2vw,23px)}.alert-icon[_ngcontent-%COMP%]{width:21px;flex:0 0 auto}.activate-now[_ngcontent-%COMP%]{color:#fff;font-size:clamp(12px,2vw,14px);font-style:normal;font-weight:500;line-height:clamp(14px,2vw,18px);display:inline-block;text-decoration:underline}.activate-now[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transition:all .3s ease}.activate-now[_ngcontent-%COMP%]:hover   svg[_ngcontent-%COMP%]{transform:translate(6px)}.new-Task-alert[_ngcontent-%COMP%]{margin-top:120px}@media (min-width: 1200px){.list-view[_ngcontent-%COMP%]   .connectitemsapp.active[_ngcontent-%COMP%]{border-color:#74748a!important}.list-view[_ngcontent-%COMP%]   .connectitemsapp.active[_ngcontent-%COMP%]   .actions-dropdwon[_ngcontent-%COMP%]{opacity:1;visibility:visible}.list-view[_ngcontent-%COMP%]   .connectitemsapp.active[_ngcontent-%COMP%]   .custom-options-tooltip[_ngcontent-%COMP%]:hover:after, .list-view[_ngcontent-%COMP%]   .connectitemsapp.active[_ngcontent-%COMP%]   .custom-options-tooltip[_ngcontent-%COMP%]:hover:before{display:none}}@media (min-width: 768px){.alert-close[_ngcontent-%COMP%]{flex:0 0 auto}}.items-trigger-action[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{color:#1d1d1d;font-size:14px;font-weight:400;margin-bottom:10px}.items-trigger-action[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border-radius:0;border:0;color:#1d1d1d;padding:.75rem 0;font-size:14px;background:#FFF;text-align:start}.search_trigger_action[_ngcontent-%COMP%] > .connects-imgs[_ngcontent-%COMP%]{height:100%;width:100%;text-align:center;display:flex;align-items:center;justify-content:center}.search_trigger_action[_ngcontent-%COMP%]{display:grid;grid-template-columns:45px 1fr 35px;border-radius:12px;border:1.5px solid #74748A;border:1.5px solid var(--Text-Secondary, #74748A);background:#FFF;background:var(--White, #FFF);align-items:center;justify-content:center}.connect-close[_ngcontent-%COMP%]{padding:0;width:100%;height:100%;align-items:center;justify-content:center;display:flex}.search_trigger_action[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:22px;height:22px}.items-trigger-action[_ngcontent-%COMP%]{flex:1}.overlaymobileAI[_ngcontent-%COMP%]{position:absolute;top:100%;left:50%;min-width:20em;z-index:4;border:1px solid #74748A;background:#F6FBFF;border-radius:14px;width:100%;padding:0;margin-top:.2rem;transform:translate(-50%);opacity:0;visibility:hidden;display:none;overflow:hidden}.overlaymobileAI[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]{border-radius:14px;overflow:hidden}.overlaymobileAI.open[_ngcontent-%COMP%]{opacity:1;display:block;visibility:visible}.dropdown-ai[_ngcontent-%COMP%]{max-height:170px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;margin-right:3px;padding-bottom:.5rem}.dropdown-ai[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:25px!important}.dropdown-ai[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{font-size:clamp(12px,2vw,14px);text-align:start;border-radius:0;color:#0f1035;border-bottom:1px solid #74748A}.dropdown-ai[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:last-child > button[_ngcontent-%COMP%]{border-bottom:0}.dropdown-ai[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover, .selected[_ngcontent-%COMP%]{background-color:#5371ff1a}.trynow[_ngcontent-%COMP%]{color:var(--Primary-Color);font-size:clamp(12px,2vw,15px);font-weight:600;line-height:20px;width:auto!important}.trynow[_ngcontent-%COMP%]:hover{text-decoration:underline}.border-top[_ngcontent-%COMP%]{border-top:#D0DAE3 1px solid}.btn-skip[_ngcontent-%COMP%]{border-color:var(--Primary-Color);color:var(--Primary-Color);border-width:1px}.btn-skip[_ngcontent-%COMP%]:hover{background-color:#fff}.card-template-img[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{width:40px;height:40px;background:#EBF3FF;position:relative}.card-template-img[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:after{content:"";position:absolute;top:50%;left:44px;width:8px;height:8px;background:#eaf3ff;border-radius:50%;display:block;transform:translateY(-50%)}.card-template-img[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:last-child:after{display:none}.card-template-body[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#0f1035;font-size:14px;font-style:normal;font-weight:400;line-height:24px}.card-template-body[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#0f1035;font-size:14px;font-weight:400;margin-bottom:.75rem;line-height:24px;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:-webkit-inline-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
1.card-template-body[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{color:#74748a;font-size:13px;font-style:normal;font-weight:400;line-height:18px}.card-template-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#0f1035;font-style:normal;font-weight:400;line-height:20px;font-size:14px;margin:0}.card-template[_ngcontent-%COMP%]{border:1.5px solid transparent}.card-template[_ngcontent-%COMP%]:hover{border-color:var(--Primary-Color);box-shadow:0 2px 6px #0003}.card-template[_ngcontent-%COMP%]:hover   .card-template-body[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--Primary-Color)}.recommend-templates[_ngcontent-%COMP%]{max-height:350px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;padding:0 .5rem 0 0;scrollbar-width:auto}.connects-imgs[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:25px;height:25px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.rotate[_ngcontent-%COMP%]{transform:rotate(180deg);transition:transform .3s ease-in-out}.action-trigger-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#5e5e5e;font-weight:400;font-size:12px;margin:0}.action-trigger-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:14px;font-weight:600}@media (max-width: 1199px){.recommended-overlay[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}.recommended-overlay[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]{background-color:#ebf3ff;max-height:570px;transition:transform .5s ease;transform:translateY(100%)}.recommended-overlay.show[_ngcontent-%COMP%]{opacity:1;visibility:visible}.recommended-overlay.show[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]{transform:translateY(0)}.recommend-templates[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;padding:0;scrollbar-width:none}.triggle-action-overlay[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]{background:#fff}.triggle-action-overlay[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]   .dropdown-ai[_ngcontent-%COMP%]{height:450px;margin:0;scrollbar-width:none}.triggle-action-overlay[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%]   .dropdown-ai[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{padding:.5rem;border-color:#e3e3e3;align-items:flex-start!important}.triggle-action-overlay[_ngcontent-%COMP%] > .contentmobile[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > h3[_ngcontent-%COMP%]{font-size:16px!important;color:#1d1d1d!important}.items-trigger-action[_ngcontent-%COMP%]{width:100%}.recommendation-sec[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:.85rem!important}.card-template-body[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:14px;line-height:20px}.buttons-warp[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%}.buttons-warp[_ngcontent-%COMP%]   .f18[_ngcontent-%COMP%], .card-template-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px!important}.connects-hightlight-icon[_ngcontent-%COMP%]{transform:rotate(90deg);margin-bottom:1rem;width:50px;margin-top:1rem!important}.selectedCard[_ngcontent-%COMP%]{border-color:var(--Primary-Color);box-shadow:0 2px 6px #0003}.selectedCard[_ngcontent-%COMP%]   .card-template-body[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--Primary-Color)}.search_trigger_action[_ngcontent-%COMP%]{margin-bottom:1rem}}.theme-dark[_ngcontent-%COMP%]   .overlaymobile[_ngcontent-%COMP%]{background-color:var(--modal-backdrop)!important}.theme-dark[_ngcontent-%COMP%]   .contentmobile[_ngcontent-%COMP%]{background-color:var(--card-bg)!important;color:var(--primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]{background:var(--card-bg)!important;background-color:var(--card-bg)!important;border-color:var(--border-color)!important;color:var(--primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .list-view[_ngcontent-%COMP%]   .mapping-list[_ngcontent-%COMP%] > .headconnectapp[_ngcontent-%COMP%]:hover{border-color:var(--accent-color)!important}.theme-dark[_ngcontent-%COMP%]   .published-btn[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .published-btn.active[_ngcontent-%COMP%]{background:var(--secondary-bg)!important;background-color:var(--secondary-bg)!important;color:var(--primary-text)!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .published-btn.active[_ngcontent-%COMP%]{background:var(--accent-color)!important;background-color:var(--accent-color)!important;color:var(--button-primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .draft-btn[_ngcontent-%COMP%]{background:var(--secondary-bg)!important;background-color:var(--secondary-bg)!important;color:var(--primary-text)!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .connectitemsapp[_ngcontent-%COMP%]{background:var(--card-bg)!important;background-color:var(--card-bg)!important;color:var(--primary-text)!important;border-color:var(--border-color)!important}.theme-dark[_ngcontent-%COMP%]   .dropdown_menu_mobile[_ngcontent-%COMP%]{background-color:var(--dropdown-bg)!important;color:var(--primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .dropdown_menu_mobile[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{color:var(--primary-text)!important;background-color:transparent!important}.theme-dark[_ngcontent-%COMP%]   .dropdown_menu_mobile[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:hover{background-color:var(--secondary-bg)!important}.theme-dark[_ngcontent-%COMP%]   .listviewEdit[_ngcontent-%COMP%]{background-color:var(--card-bg)!important;color:var(--primary-text)!important}.theme-dark[_ngcontent-%COMP%]   .listviewEdit[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{background-color:var(--accent-color)!important;color:var(--button-primary-text)!important}.foldersButton[_ngcontent-%COMP%]:before{display:none!important}.foldersButton[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)}.folders-dropdown[_ngcontent-%COMP%]{min-width:11rem;overflow:hidden;border-radius:8px;border:1px solid #B5CDE6;background:#FAFDFF;padding:0}.folders-dropdown[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)}.folders-dropdown[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{border:0;width:100%;line-height:normal;border-radius:0;background:#FAFDFF;font-size:12px;padding:.75rem 1rem;color:#0f1035;color:var(--text-primary);border-bottom:1px solid #E7E7EB}.move-folder-btn[_ngcontent-%COMP%]{transition:color .2s ease}.move-folder-btn[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)!important}.folder-indicator-item[_ngcontent-%COMP%], .folder-indicator-item[_ngcontent-%COMP%]:hover, .folder-indicator-item[_ngcontent-%COMP%]:focus{color:#5371ff!important;color:var(--Primary-Color, #5371FF)!important;cursor:default!important;opacity:1!important;background:transparent!important}.cml-spinner[_ngcontent-%COMP%]{display:inline-block;width:14px;
1height:14px;margin-right:4px;vertical-align:-2px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:cmlSpin .7s linear infinite}@keyframes cmlSpin{to{transform:rotate(360deg)}}.cml-status[_ngcontent-%COMP%]{margin-top:8px;font-size:11.5px;color:#5371ff;color:var(--Primary-Color, #5371FF)}.cml-dot[_ngcontent-%COMP%]{animation:cmlDots 1.2s infinite}.cml-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.cml-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes cmlDots{0%,20%{opacity:.2}50%{opacity:1}to{opacity:.2}}.btn-generate[_ngcontent-%COMP%]:disabled   .cml-spinner[_ngcontent-%COMP%]{border-color:#ffffff59;border-top-color:#fff}.btn-generate.is-creating[_ngcontent-%COMP%], .btn-generate.is-creating[_ngcontent-%COMP%]:disabled, .build-workflow-box[_ngcontent-%COMP%]   .btn-generate.is-creating[_ngcontent-%COMP%]:disabled{background:linear-gradient(135deg,#6a84ff 0%,#5371FF 100%)!important;color:#fff!important;opacity:1!important;box-shadow:0 6px 16px #5371ff47!important;cursor:default}'],data:{animation:[tc("slideDownAnimation",[rc(":enter",[ic({transform:"translateY(100%)"}),ec("0.5s ease",ic({transform:"translateY(0)"}))]),rc(":leave",[ec("0.5s ease",ic({transform:"translateY(100%)"}))])])]}}),t})();const HP=["promptBox"];function QP(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw();o.xp6(1),o.hij(", ",t.firstName,"")}}function YP(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",26),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().insertToken("mention")}),o.TgZ(2,"span",28),o._uU(3,"@"),o.qZA(),o.TgZ(4,"span"),o._uU(5,"Mention App"),o.qZA(),o.qZA(),o.TgZ(6,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().insertToken("variable")}),o.O4$(),o.TgZ(7,"svg",29),o._UZ(8,"path",30),o.qZA(),o.kcU(),o.TgZ(9,"span"),o._uU(10,"Add Variable"),o.qZA(),o.qZA(),o.qZA()}}function zP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",45),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).setCategory(e.id)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("on",n.category===t.id),o.xp6(1),o.Oqu(t.label)}}function VP(t,e){if(1&t&&o._UZ(0,"img",54),2&t){const t=e.$implicit,n=o.oxw(3);o.Q6J("src",n.appIcon(t),o.LSH)("alt",n.appName(t))}}function GP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",46),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).usePreset(e)}),o.TgZ(1,"span",47),o.YNc(2,VP,1,2,"img",48),o.qZA(),o.TgZ(3,"span",49),o.TgZ(4,"span",50),o._uU(5),o.qZA(),o.TgZ(6,"span",51),o._uU(7),o.qZA(),o.qZA(),o.O4$(),o.TgZ(8,"svg",52),o._UZ(9,"path",53),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.Q6J("title",t.p),o.xp6(2),o.Q6J("ngForOf",n.presetApps(t)),o.xp6(3),o.Oqu(t.t),o.xp6(2),o.Oqu(n.presetRoute(t))}}function WP(t,e){if(1&t&&(o.TgZ(0,"p",55),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("No presets match \u201c",t.presetQuery,"\u201d.")}}function KP(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",56),o.TgZ(1,"button",57),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).showAll=!0}),o._uU(2),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.hij("Show more (",t.filteredPresets.length-12,")")}}function XP(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"section",31),o.TgZ(1,"div",32),o.TgZ(2,"h2"),o._uU(3,"Try a ready-made use case"),o.qZA(),o.TgZ(4,"p"),o._uU(5,"A few presets to get you started \u2014 choose a workflow below or describe what you need above."),o.qZA(),o.qZA(),o.TgZ(6,"div",33),o.TgZ(7,"div",34),o.YNc(8,zP,2,3,"button",35),o.qZA(),o.TgZ(9,"label",36),o.O4$(),o.TgZ(10,"svg",37),o._UZ(11,"circle",38),o._UZ(12,"path",39),o.qZA(),o.kcU(),o.TgZ(13,"input",40),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().presetQuery=e}),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"div",41),o.YNc(15,GP,10,4,"button",42),o.qZA(),o.YNc(16,WP,2,1,"p",43),o.YNc(17,KP,3,1,"div",44),o.qZA()}if(2&t){const t=o.oxw();o.xp6(8),o.Q6J("ngForOf",t.categories),o.xp6(5),o.Q6J("ngModel",t.presetQuery),o.xp6(2),o.Q6J("ngForOf",t.visiblePresets),o.xp6(1),o.Q6J("ngIf",!t.filteredPresets.length),o.xp6(1),o.Q6J("ngIf",!t.showAll&&t.filteredPresets.length>12)}}let tN=(()=>{class t{constructor(t,e,n){this.http=t,this.router=e,this.customerService=n,this.iconBase="https://media.flozic.ai/media/icons/128x128/",this.charLimit=1e3,this.categories=[{id:"popular",label:"Popular"},{id:"spreadsheets",label:"Spreadsheets"},{id:"messaging",label:"Messaging"},{id:"crm",label:"Sales & CRM"},{id:"ops",label:"Ops & files"},{id:"payments",label:"Payments"}],this.greeting="",this.firstName="",this.prompt="",this.plusOpen=!1,this.apps={},this.presets=[],this.category="popular",this.presetQuery="",this.showAll=!1}ngOnInit(){const t=(new Date).getHours();this.greeting=t<12?"Morning":t<17?"Afternoon":"Evening";const e=this.customerService.GetCurrent()||{}
1,n=(e.firstName||(e.email||"").split("@")[0]||"").trim();this.firstName=n.split(" ")[0],this.http.get("assets/data/create-agent-presets.json").subscribe(t=>{this.apps=t&&t.apps||{},this.presets=t&&t.presets||[]},()=>{})}get filteredPresets(){const t=this.presetQuery.trim().toLowerCase();return this.presets.filter(e=>("popular"===this.category||e.c===this.category)&&(!t||(e.t+" "+e.a.map(t=>this.appName(t)).join(" ")).toLowerCase().includes(t)))}get visiblePresets(){return this.showAll?this.filteredPresets:this.filteredPresets.slice(0,12)}appName(t){return this.apps[t]&&this.apps[t].n||t}appIcon(t){return this.apps[t]?this.iconBase+this.apps[t].i:""}presetApps(t){return t.a[0]===t.a[1]?[t.a[0]]:t.a}presetRoute(t){return t.a.map(t=>this.appName(t)).join(" \u2192 ")}setCategory(t){this.category=t,this.showAll=!1}togglePlus(t){t.stopPropagation(),this.plusOpen=!this.plusOpen}closePlus(){this.plusOpen=!1}insertToken(t){const e="mention"===t?"@":"{{variable}}",n=this.prompt&&!this.prompt.endsWith(" ")?" ":"";this.prompt=(this.prompt+n+e).slice(0,this.charLimit),this.plusOpen=!1,this.focusPrompt()}usePreset(t){this.prompt=t.p,window.scrollTo({top:0,behavior:"smooth"}),this.focusPrompt()}canSend(){const t=this.prompt.trim();return t.length>0&&t.length<=this.charLimit}onPromptKeydown(t){"Enter"===t.key&&!t.shiftKey&&(t.preventDefault(),this.createLoop())}createLoop(){if(!this.canSend())return;const t=this.prompt.trim();window.location.assign("https://loopbeta.flozic.ai/start?prompt="+encodeURIComponent(t))}buildManually(){this.router.navigateByUrl("/customeditor/fresh/app/newNode")}focusPrompt(){setTimeout(()=>{this.promptBox&&this.promptBox.nativeElement.focus()},0)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(di.eN),o.Y36(ui.F0),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-create-agent"]],viewQuery:function(t,e){if(1&t&&o.Gf(HP,5),2&t){let t;o.iGM(t=o.CRH())&&(e.promptBox=t.first)}},decls:29,vars:13,consts:[["id","main-container_",1,"main-container","ns-page",3,"click"],[1,"ca-home"],[1,"ca-col"],[1,"ca-greet"],["height","30","viewBox","-10 -14 190 146","fill","none","stroke","#C6FF3D","stroke-width","16","stroke-linecap","round","aria-hidden","true"],["d","M 4 118 C 40 114, 70 106, 96 94"],["d","M 14 74 C 60 68, 102 56, 140 42"],["d","M 28 24 C 78 14, 124 6, 166 0"],[4,"ngIf"],[1,"ca-form"],["rows","3","placeholder","Describe the workflow you want to automate\u2026","aria-label","Describe the workflow you want to automate",1,"ca-input",3,"ngModel","maxlength","ngModelChange","keydown"],["promptBox",""],[1,"ca-bar"],[1,"ca-plus-wrap"],["type","button","title","Mention App \xb7 Add Variable","aria-label","Mention App or Add Variable",1,"ca-plus",3,"click"],["width","18","height","18","viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round"],["d","M10 4.5v11M4.5 10h11"],["class","ca-menu",3,"click",4,"ngIf"],[1,"ca-sp"],["type","button",1,"ca-manual",3,"click"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["d","M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"],["type","button","title","Create agent","aria-label","Create agent",1,"ca-send",3,"disabled","click"],["width","18","height","18","viewBox","0 0 20 20","fill","none","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["d","M10 15.5v-11M5.5 9 10 4.5 14.5 9"],["class","ca-presets",4,"ngIf"],[1,"ca-menu",3,"click"],["type","button",1,"ca-mi",3,"click"],[1,"ca-at"],["width","15","height","15","viewBox","0 0 24 24","aria-hidden","true"],["d","M13 2L4.5 13.5H11L10 22L19.5 10H13V2Z","fill","#f5b301"],[1,"ca-presets"],[1,"ca-ph"],[1,"ca-ctl"],[1,"ca-chips"],["type","button","class","ca-chip",3,"on","click",4,"ngFor","ngForOf"],[1,"ca-search"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","aria-hidden","true"],["cx","11","cy","11","r","7.5"],["d","m20.5 20.5-4.2-4.2"],["type","text","placeholder","Search presets\u2026","aria-label","Search presets",3,"ngModel","ngModelChange"],[1,"ca-grid"],["type","button","class","ca-card",3,"title","click",4,"ngFor","ngForOf"],["class","ca-empty",4,"ngIf"],["class","ca-more",4,"ngIf"],["type","button",1,"ca-chip",3,"click"],["type","button",1,"ca-card",3,"title","click"],[1,"ca-strip"],["class","ca-logo",3,"src","alt",4,"ngFor","ngForOf"],[1,"ca-tx"],[1,"ca-t"],[1,"ca-s"],["width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.9","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"ca-go"],["d","M5 12h14M13 6l6 6-6 6"],[1,"ca-logo",3,"src","alt"],[1,"ca-empty"],[1,"ca-more"],["type","button",1,"ca-more-btn",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.NdJ("click",function(){return e.closePlus()}),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"h1",3),o.O4$(),o.TgZ(4,"svg",4),o._UZ(5,"path",5),o._UZ(6,"path",6),o._UZ(7,"path",7),o.qZA(),o.kcU(),o.TgZ(8,"span"),o._uU(9),o.YNc(10,QP,2,1,"ng-container",8),o.qZA(),o.qZA(),o.TgZ(11,"div",9),o.TgZ(12,"textarea",10,11),o.NdJ("ngModelChange",function(t){return e.prompt=t})("keydown",function(t){return e.onPromptKeydown(t)}),o.qZA(),o.TgZ(14,"div",12),o.TgZ(15,"div",13),o.TgZ(16,"button",14),o.NdJ("click",function(t){return e.togglePlus(t)}),o.O4$(),o.TgZ(17,"svg",15),o._UZ(18,"path",16),o.qZA(),o.qZA(),o.YNc(19,YP,11,0,"div",17),o.qZA(),o.kcU(),o._UZ(20,"span",18),o.TgZ(21,"button",19),o.NdJ("click",function(){return e.buildManually()}),o.O4$(),o.TgZ(22,"svg",20),o._UZ(23,"path",21),o.qZA(),o._uU(24," Build manually "),o.qZA(),o.kcU(),o.TgZ(25,"button",22),o.NdJ("click",function(){return e.createLoop()}),o.O4$(),o.TgZ(26,"svg",23),o._UZ(27,"path",24),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(28,XP,18,5,"section",25),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(9),o.Oqu(e.greeting),o.xp6(1),o.Q6J("ngIf",e.firstName),o.xp6(1),o.ekj("focus",e.plusOpen),o.xp6(1),o.Q6J("ngModel",e.prompt)("maxlength",e.charLimit),o.xp6(4),o.ekj("on",e.plusOpen),o.xp6(3),o.Q6J("ngIf",e.plusOpen),o.xp6(6),o.ekj("ready",e.canSend()),o.Q6J("disabled",!e.canSend()),o.xp6(3),o.Q6J("ngIf",e.presets.length))},directives:[to.O5,Xi.Fj,Xi.JJ,Xi.On,Xi.nD,to.sg],styles:[".ns-page[_ngcontent-%COMP%]{background:var(--ns-paper)!important;color:var(--ns-ink);font-family:var(--ns-sans);font-size:14px;line-height:1.45;min-height:calc(100vh - 70px)}.ca-home[_ngcontent-%COMP%]{padding:clamp(24px,5vh,64px) 24px 48px;display:grid;justify-items:center}.ca-col[_ngcontent-%COMP%]{width:min(1080px,100%);display:grid;justify-items:center;grid-gap:14px;gap:14px}.ca-greet[_ngcontent-%COMP%]{font-family:var(--ns-serif);font-size:44px;font-weight:400;line-height:1.1;letter-spacing:-.015em;color:var(--ns-ink);display:inline-flex;align-items:center;grid-gap:14px;gap:14px;margin:0 0 6px}.ca-form[_ngcontent-%COMP%]{width:min(680px,100%);margin-top:10px;border:1px solid var(--ns-line-strong);border-radius:24px;background:var(--ns-panel);box-shadow:0 4px 16px #0000000a;padding:18px 18px 14px;display:grid;grid-gap:10px;gap:10px;transition:border-color .15s,box-shadow .15s}
1.ca-form[_ngcontent-%COMP%]:focus-within, .ca-form.focus[_ngcontent-%COMP%]{border-color:var(--ns-accent);box-shadow:0 0 0 3px var(--ns-accent-soft),var(--ns-shadow)}.ca-input[_ngcontent-%COMP%]{width:100%;border:0;outline:0;resize:none;background:none;color:var(--ns-ink);font:inherit;font-size:16.5px;line-height:1.5;padding:4px 6px;min-height:84px}.ca-input[_ngcontent-%COMP%]::-moz-placeholder{color:var(--ns-muted)}.ca-input[_ngcontent-%COMP%]::placeholder{color:var(--ns-muted)}.ca-bar[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.ca-plus-wrap[_ngcontent-%COMP%]{position:relative}.ca-plus[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:8px;border:0;background:none;color:var(--ns-muted);display:grid;place-items:center;cursor:pointer}.ca-plus[_ngcontent-%COMP%]:hover, .ca-plus.on[_ngcontent-%COMP%]{background:var(--ns-panel-2);color:var(--ns-ink)}.ca-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);left:0;z-index:5;min-width:200px;padding:6px;background:var(--ns-panel);border:1px solid var(--ns-line-strong);border-radius:10px;box-shadow:var(--ns-shadow)}.ca-mi[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;grid-gap:10px;gap:10px;padding:7px 8px;border:0;border-radius:6px;background:none;color:var(--ns-ink);font:inherit;font-size:13px;text-align:left;cursor:pointer}.ca-mi[_ngcontent-%COMP%]:hover{background:var(--ns-accent-tint)}.ca-at[_ngcontent-%COMP%]{width:15px;text-align:center;font-weight:700;color:var(--ns-accent)}.ca-sp[_ngcontent-%COMP%]{flex:1}.ca-manual[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;padding:4px 8px;border:0;border-radius:8px;background:none;color:var(--ns-muted);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}.ca-manual[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink)}.ca-send[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:50%;border:0;background:var(--ns-accent);color:#fff;display:grid;place-items:center;cursor:pointer;opacity:.4;transition:opacity .15s}.ca-send.ready[_ngcontent-%COMP%]{opacity:1}.ca-send[_ngcontent-%COMP%]:disabled{cursor:default}.ca-presets[_ngcontent-%COMP%]{width:100%;margin-top:28px}.ca-ph[_ngcontent-%COMP%]{margin-bottom:18px}.ca-ph[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-family:var(--ns-sans);font-size:17px;font-weight:600;letter-spacing:-.01em;color:var(--ns-ink);margin:0}.ca-ph[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:13px;line-height:1.55;color:var(--ns-faint);margin:2px 0 0}.ca-ctl[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;grid-gap:10px 16px;gap:10px 16px;margin-bottom:14px}.ca-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;grid-gap:6px;gap:6px}.ca-chip[_ngcontent-%COMP%]{padding:7px 11px;border:1px solid var(--ns-line);border-radius:99px;background:var(--ns-panel);color:var(--ns-muted);font:inherit;font-size:12.5px;line-height:14px;cursor:pointer}.ca-chip[_ngcontent-%COMP%]:hover{border-color:var(--ns-line-strong);color:var(--ns-ink)}.ca-chip.on[_ngcontent-%COMP%]{background:var(--ns-accent);border-color:var(--ns-accent);color:#fff}.ca-search[_ngcontent-%COMP%]{flex:1 1 150px;max-width:260px;height:34px;padding:0 10px;margin:0;border:1px solid var(--ns-line);border-radius:99px;background:var(--ns-panel);color:var(--ns-faint);display:flex;align-items:center;grid-gap:7px;gap:7px}.ca-search[_ngcontent-%COMP%]:focus-within{border-color:var(--ns-accent);box-shadow:0 0 0 3px var(--ns-accent-ring)}.ca-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{flex:1;min-width:0;border:0;outline:0;background:none;color:var(--ns-ink);font:inherit;font-size:12.5px}.ca-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(340px,100%),1fr));grid-gap:12px;gap:12px}.ca-card[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:13px;gap:13px;padding:13px 14px;min-width:0;border:1px solid var(--ns-line);border-radius:12px;background:var(--ns-panel);color:var(--ns-ink);font:inherit;text-align:left;cursor:pointer;transition:transform .12s,background .12s,border-color .12s}.ca-card[_ngcontent-%COMP%]:hover{background:var(--ns-accent-wash);border-color:var(--ns-line-strong);transform:translateY(-1px)}.ca-strip[_ngcontent-%COMP%]{display:flex;min-width:52px;flex:none}.ca-logo[_ngcontent-%COMP%]{width:30px;height:30px;border:1px solid var(--ns-line);border-radius:8px;background:#fff;padding:3px;-o-object-fit:contain;object-fit:contain;flex:none}.ca-logo[_ngcontent-%COMP%] + .ca-logo[_ngcontent-%COMP%]{margin-left:-8px}.ca-tx[_ngcontent-%COMP%]{min-width:0;display:block}
1.ca-t[_ngcontent-%COMP%]{display:block;font-size:14px;font-weight:550;line-height:1.3}.ca-s[_ngcontent-%COMP%]{display:block;margin-top:2px;font-size:12px;color:var(--ns-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ca-go[_ngcontent-%COMP%]{margin-left:auto;flex:none;color:var(--ns-muted);opacity:0;transition:opacity .12s}.ca-card[_ngcontent-%COMP%]:hover   .ca-go[_ngcontent-%COMP%]{opacity:1}.ca-empty[_ngcontent-%COMP%]{font-size:12.5px;color:var(--ns-faint);margin:4px 0 0}.ca-more[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:16px}.ca-more-btn[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--ns-line-strong);border-radius:8px;background:var(--ns-panel);color:var(--ns-ink);font:inherit;font-size:13px;font-weight:600;cursor:pointer}.ca-more-btn[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2)}"]}),t})();function eN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",26),o.TgZ(1,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).callAgent()}),o.O4$(),o.TgZ(2,"svg",28),o._UZ(3,"path",29),o._UZ(4,"path",30),o._UZ(5,"path",31),o._UZ(6,"path",32),o.qZA(),o._uU(7," Request a Callback "),o.qZA(),o.qZA()}}function nN(t,e){1&t&&(o.TgZ(0,"option",45),o._uU(1,"Loading countries..."),o.qZA())}function iN(t,e){if(1&t&&(o.TgZ(0,"option",46),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.Q6J("value","+"+t.phoneCode),o.xp6(1),o.AsE(" ",t.CountryCode," (+",t.phoneCode,") ")}}const oN=function(t){return{disabled:t}};function rN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",33),o.TgZ(1,"div",34),o.TgZ(2,"label"),o._uU(3,"Phone Number "),o.TgZ(4,"sup",35),o._uU(5,"*"),o.qZA(),o.qZA(),o.TgZ(6,"div",36),o.TgZ(7,"select",37),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).selectedCountryCode=e})("ngModelChange",function(){return o.CHM(t),o.oxw(2).onCountryChange()}),o.YNc(8,nN,2,0,"option",38),o.YNc(9,iN,2,3,"option",39),o.qZA(),o.TgZ(10,"div",40),o.TgZ(11,"input",41),o.NdJ("input",function(e){return o.CHM(t),o.oxw(2).onPhoneNumberInput(e)}),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"div",42),o.TgZ(13,"button",43),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).sendPhoneNumber()}),o.O4$(),o.TgZ(14,"svg",28),o._UZ(15,"path",29),o._UZ(16,"path",30),o._UZ(17,"path",31),o._UZ(18,"path",32),o.qZA(),o.kcU(),o._UZ(19,"div",44),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(7),o.Q6J("ngModel",t.selectedCountryCode)("disabled",t.isLoadingCountries),o.xp6(1),o.Q6J("ngIf",t.isLoadingCountries),o.xp6(1),o.Q6J("ngForOf",t.countries),o.xp6(2),o.ekj("is-invalid",t.phoneNumberError),o.Q6J("value",t.phoneNumber),o.uIk("maxlength",t.getMaxLength()),o.xp6(2),o.Q6J("ngClass",o.VKq(10,oN,!t.canMakeCall()))("disabled",!t.canMakeCall())}}function sN(t,e){if(1&t&&(o.TgZ(0,"span",47),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.phoneNumberError)}}function aN(t,e){if(1&t&&(o.TgZ(0,"div",53),o.TgZ(1,"span"),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(2),o.Oqu(t.apiErrorDetails.retryAfter)}}function cN(t,e){if(1&t&&(o.TgZ(0,"div",51),o.YNc(1,aN,3,1,"div",52),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",t.apiErrorDetails.retryAfter)}}function lN(t,e){if(1&t&&(o.TgZ(0,"div",48),o.TgZ(1,"div",49),o._uU(2),o.qZA(),o.YNc(3,cN,2,1,"div",50),o.qZA()),2&t){const t=o.oxw(2);o.xp6(2),o.Oqu(t.apiError),o.xp6(1),o.Q6J("ngIf",t.apiErrorDetails)}}function dN(t,e){1&t&&(o.TgZ(0,"div",54),o.O4$(),o.TgZ(1,"svg",55),o._UZ(2,"circle",56),o._UZ(3,"polyline",57),o.qZA(),o.kcU(),o.TgZ(4,"span",58),o._uU(5,"Instant callback within 1 minute"),o.qZA(),o.qZA())}function uN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"div",5),o._uU(4,"Automate Support Available"),o.qZA(),o.TgZ(5,"button",6),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeCallAgent()}),o.O4$(),o.TgZ(6,"svg",7),o._UZ(7,"path",8),o._UZ(8,"path",9),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",10),o.TgZ(10,"h3",11),o._uU(11,"Stuck with your automation?"),o.qZA(),o.TgZ(12,"div",12),o.TgZ(13,"div",13),o.TgZ(14,"p",14),o._uU(15,"Our technical experts can review your Automate flow, fix errors, and help you get it working smoothly."),o.qZA(),o.TgZ(16,"div",15),o.TgZ(17,"div",16),o.O4$(),o.TgZ(18,"svg",17),o._UZ(19,"path",18),o.qZA(),o.kcU(),o.TgZ(20,"span"),o._uU(21,"Real engineers \u2022 Instant callback"),o.qZA(),o.qZA(),o.TgZ(22,"div",16),o.O4$(),o.TgZ(23,"svg",17),o._UZ(24,"path",18),o.qZA(),o.kcU(),o.TgZ(25,"span"),o._uU(26,"Automate-specific supp
1ort"),o.qZA(),o.qZA(),o.qZA(),o.YNc(27,eN,8,0,"div",19),o.YNc(28,rN,20,12,"div",20),o.YNc(29,sN,2,1,"span",21),o.YNc(30,lN,4,2,"div",22),o.YNc(31,dN,6,0,"div",23),o.qZA(),o.TgZ(32,"div",24),o._UZ(33,"img",25),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(27),o.Q6J("ngIf",!t.isPhoneNumber),o.xp6(1),o.Q6J("ngIf",t.isPhoneNumber),o.xp6(1),o.Q6J("ngIf",t.phoneNumberError),o.xp6(1),o.Q6J("ngIf",t.apiError),o.xp6(1),o.Q6J("ngIf",!t.phoneNumberError&&!t.apiError)}}function pN(t,e){1&t&&(o.TgZ(0,"div",59),o.TgZ(1,"div",60),o.TgZ(2,"div",61),o.TgZ(3,"div",62),o.TgZ(4,"div",63),o.TgZ(5,"p",64),o.TgZ(6,"span",65),o._uU(7,"Thanks for submitting your request. We\u2019ll call you shortly!"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA())}let hN=(()=>{class t{constructor(t,e,n,i,o){this.cdr=t,this.http=e,this.customEditorComponent=n,this.userGuideService=i,this.router=o,this.showButtonCall=!1,this.isIncomingCall=!1,this.callerName="",this.phoneNumber="",this.isPhoneNumber=!1,this.phoneNumberError="",this.apiError="",this.apiErrorDetails=null,this.selectedCountryCode="+1",this.countries=[],this.selectedCountry=null,this.isLoadingCountries=!1,this.isSendingPhoneNumber=!1,this.subscription=new pi.w,this.userGuideSubscription=new pi.w}ngOnInit(){this.loadCountries(),this.customEditorComponent.showCallAgentToggle=!1,this.customEditorComponent.showButtonCall=!0,this.userGuideSubscription=this.userGuideService.isActive$.subscribe(t=>{t?(this.customEditorComponent.showCallAgentToggle&&(this.customEditorComponent.showCallAgentToggle=!1,this.customEditorComponent.showButtonCall=!0),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)):this.checkAndShowCallAgent(),this.cdr.detectChanges()}),setTimeout(()=>{!this.userGuideService.isActive()&&!this.willUserGuideStart()&&this.checkAndShowCallAgent()},3e3)}willUserGuideStart(){const t=localStorage.getItem("userGuideDisabled");if("true"===t)return!1;const e=localStorage.getItem("userGuideCompleted"),n=sessionStorage.getItem("userGuideStarted"),i=this.router.url.includes("/customeditor");return!(e||n||!i||t)}checkAndShowCallAgent(){this.customEditorComponent.showCallAgentToggle||this.showTimeout||"true"!==sessionStorage.getItem("callAgentDismissed")&&(this.userGuideService.isActive()||this.willUserGuideStart()||(this.showTimeout=setTimeout(()=>{!this.userGuideService.isActive()&&!this.willUserGuideStart()&&(this.customEditorComponent.showCallAgentToggle=!0,this.customEditorComponent.showButtonCall=!1),this.showTimeout=null},2e3)))}loadCountries(){this.isLoadingCountries=!0,this.countries=[{CountryName:"United States",CountryCode:"US",currencyName:"US Dollar",currencyCode:"USD",currencySymbol:"$",MinLen:10,MaxLen:10,phoneCode:"1",filename:"us.png"},{CountryName:"United Kingdom",CountryCode:"GB",currencyName:"British Pound",currencyCode:"GBP",currencySymbol:"\xa3",MinLen:10,MaxLen:10,phoneCode:"44",filename:"gb.png"},{CountryName:"Australia",CountryCode:"AU",currencyName:"Australian Dollar",currencyCode:"AUD",currencySymbol:"A$",MinLen:9,MaxLen:9,phoneCode:"61",filename:"au.png"},{CountryName:"New Zealand",CountryCode:"NZ",currencyName:"New Zealand Dollar",currencyCode:"NZD",currencySymbol:"NZ$",MinLen:8,MaxLen:9,phoneCode:"64",filename:"nz.png"},{CountryName:"Canada",CountryCode:"CA",currencyName:"Canadian Dollar",currencyCode:"CAD",currencySymbol:"C$",MinLen:10,MaxLen:10,phoneCode:"1",filename:"ca.png"}];const t=this.countries.find(t=>"US"===t.CountryCode);t?(this.selectedCountryCode=`+${t.phoneCode}`,this.selectedCountry=t):this.countries.length>0&&(this.selectedCountryCode=`+${this.countries[0].phoneCode}`,this.selectedCountry=this.countries[0]),this.isLoadingCountries=!1,this.cdr.detectChanges()}onCountryChange(){const t=this.selectedCountryCode.replace("+","");this.selectedCountry=this.countries.find(e=>String(e.phoneCode)===t)||null,this.phoneNumberError="",this.apiError="",this.apiErrorDetails=null,this.cdr.detectChanges()}ngOnDestroy(){this.showTimeout&&clearTimeout(this.showTimeout),this.incomingCallTimeout&&clearTimeout(this.incomingCallTimeout),this.subscription.unsubscribe(),this.userGuideSubscription&&this.userGuideSubscription.unsubscribe()}closeCallAgent(){this.customEditorComponent.showCallAgentToggle=!1,this.cdr.detectChanges(),this.customEditorComponent.showButtonCall=!0,sessionStorage.setItem("callAgentDismissed","true")}recall(){this.phoneNumberError="",this.apiError="",this.apiErrorDetails=null,this.phoneNumber="",this.isPhoneNumber=!1,this.cdr.detectChanges()}callAgent(){this.isPhoneNumber=!0}answerCall(){this.phoneNumberError="",this.apiError="",this.apiErrorDetails=null,this.phoneNumber="",this.isPhoneNumber=!1,this.cdr.detectChanges()}declineCall(){this.isIncomingCall=!1,this.phoneNumberError="",this.apiError="",this.apiErrorDetails=null,this.phoneNumber="",this.isPhoneNumber=!1,this.cdr.detectChanges()}onPhoneNumberInput(t){const e=t.target.value,n=/[^0-9]/.test(e),i=e.replace(/[^0-9]/g,"");this.phoneNumber=i.substring(0,16);const o=i.length>16;t.target.value=this.phoneNumber,this.apiError="",this.apiErrorDetails=null,this.phoneNumberError=n&&o?"Only numeric characters are allowed and maximum 16 digits":n?"Only numeric characters are allowed":o?"Phone number cannot exceed 16 digits":this.phoneNumber.length>0&&this.phoneNumber.length<2?"Phone number must be at least 2 digits":""}getMaxLength(){return 16}isValidPhoneNumber(){if(!this.phoneNumber)return!1;const t=this.phoneNumber.length;return t>=2&&t<=16&&!this.phoneNumberError}canMakeCall(){return this.isValidPhoneNumber()&&!this.isSendingPhoneNumber&&!this.apiError}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}sendPhoneNumber(){if(this.canMakeCall()){const t=`${this.selectedCountryCode}${this.phoneNumber}`;this.isSendingPhoneNumber=!0,this.cdr.detectChanges();const e="https://us-central1-livechat-production.cloudfunctions.net/makeTwilioCall/makecall",n={userPhoneNumber:t,APPYID:this.getCookieValue("APPYID")};this.http.post(e,n).subscribe({next:t=>{this.isSendingPhoneNumber=!1,this.apiError="",this.apiErrorDetails=null,this.isIncomingCall=!0,this.cdr.detectChanges(),this.customEditorComponent.showCallAgentToggle=!1,this.customEditorComponent.showButtonCall=!0,this.incomingCallTimeout&&clearTimeout(this.incomingCallTimeout),this.incomingCallTimeout=setTimeout(()=>{this.isIncomingCall=!1,this.cdr.detectChanges()},2e3)},error:t=>{this.isSendingPhoneNumber=!1,this.isIncomingCall=!1,this.incomingCallTimeout&&(clearTimeout(this.incomingCallTimeout),this.incomingCallTimeout=null),t.error&&t.error.error?(this.apiError=t.error.error,(void 0!==t.error.callsInMinute||void 0!==t.error.callsToday||t.error.retryAfter)&&(this.apiErrorDetails={callsInMinute:t.error.callsInMinute,callsToday:t.error.callsToday,retryAfter:t.error.retryAfter}),this.customEditorComponent.showCallAgentToggle=!0,this.customEditorComponent.showButtonCall=!1):t.error&&"string"==typeof t.error?(this.apiError=t.error,this.apiErrorDetails=null,this.customEditorComponent.showCallAgentToggle=!0,this.customEditorComponent.showButtonCall=!1):t.message?(this.apiError=t.message,this.apiErrorDetails=null,this.customEditorComponent.showCallAgentToggle=!0,this.customEditorComponent.showButtonCall=!1):(this.apiError="An error occurred while processing your request. Please try again later.",this.apiErrorDetails=null,this.customEditorComponent.showCallAgentToggle=!0,this.customEditorComponent.showButtonCall=!1),this.cdr.detectChanges()}})}}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(di.eN),o.Y36((0,o.Gpc)(()=>LO)),o.Y36(LA),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-call-agent"]],inputs:{showButtonCall:"showButtonCall"},decls:2,vars:2,consts:[["class","call-agent-container",4,"ngIf"],["class","incoming-call-banner",4,"ngIf"],[1,"call-agent-container"],[1,"call-agent-content"],[1,"call-agent-header"],[1,"status-pill"],["type","button","aria-label","Close",1,"close-btn",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","22","width","22","xmlns","http://www.w3.org/2000/svg"],["fill","none","stroke-miterlimit","10","stroke-width","32","d","M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"],["fill","none","stroke-linecap","round","stroke-linejoin","round","stroke-width","32","d","M320 320 192 192m0 128 128-128"],[1,"call-agent-body"],[1,"call-agent-title"],[1,"align-items-start","call-agent-image-container","d-flex","flex-column","flex-lg-row","gap-3","justify-content-center"],[1,"call-agent-image-container-left","d-flex","flex-column","gap-3"],[1,"call-agent-description"],[1,"key-features"],[1,"feature-item"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"checkmark-icon"],["d","M20 6L9 17l-5-5","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","call-agent-footer",4,"ngIf"],["class","align-items-end bg-light d-flex gap-3 justify-content-between p-2 phoneNumber-wrap rounded-3 w-100",4,"ngIf"],["class","text-danger fw-semibold phone-error-message",4,"ngIf"],["class","api-error-container",4,"ngIf"],["class","callback-info text-start",4,"ngIf"],[1,"call-agent-image-container-right","flex-shrink-0","overflow-hidden","rounded-4","shadow"],["src","/assets/images/call-agent.png","alt","call-agent","loading","lazy","decoding","async",1,"call-agent-image"],[1,"call-agent-footer"],["type","button",1,"btn","btn-call-agent",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["fill","none","d","M0 0h24v24H0V0z"],["d","M16.49 3c-2.21 0-4.21.9-5.66 2.34l1.06 1.06a6.47 6.47 0 0 1 9.18 0l1.06-1.06A7.932 7.932 0 0 0 16.49 3z"],["d","M20.03 7.46a5.022 5.022 0 0 0-7.08 0l1.06 1.06c.63-.63 1.51-1.03 2.47-1.03s1.84.39 2.47 1.03l1.08-1.06zM15.08 9.59 16.49 11l1.41-1.41c-.36-.37-.86-.59-1.41-.59s-1.05.22-1.41.59z"],["d","m15.63 14.4-2.52 2.5c-2.5-1.43-4.57-3.5-6-6l2.5-2.52c.23-.24.33-.57.27-.9L9.13 3.8c-.09-.46-.5-.8-.98-.8H4c-.56 0-1.03.47-1 1.03.17 2.89 1.05 5.6 2.43 7.97 1.58 2.73 3.85 4.99 6.57 6.57 2.37 1.37 5.08 2.26 7.97 2.43.56.03 1.03-.44 1.03-1v-4.15c0-.48-.34-.89-.8-.98l-3.67-.73a.985.985 0 0 0-.9.26z"],[1,"align-items-end","bg-light","d-flex","gap-3","justify-content-between","p-2","phoneNumber-wrap","rounded-3","w-100"],[1,"ph
1oneNumber-item","d-flex","flex-column","gap-2","flex-fill"],[1,"text-danger"],[1,"d-flex","gap-0","align-items-stretch","phone-input-group"],["name","countryCode","title","Select country code","aria-label","Select country code",1,"form-select","f-14","country-code-select",3,"ngModel","disabled","ngModelChange"],["value","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"flex-fill","d-flex","flex-column"],["type","tel","placeholder","Enter your number","name","phoneNumber","pattern","[0-9]*","inputmode","numeric",1,"form-control","f-14","phone-number-input",3,"value","input"],[1,"call-actions"],["type","button","aria-label","Send Phone Number",1,"action-btn","send-btn","answer-btn",3,"ngClass","disabled","click"],[1,"ripple-ring-small"],["value",""],[3,"value"],[1,"text-danger","fw-semibold","phone-error-message"],[1,"api-error-container"],[1,"text-danger","fw-semibold","phone-error-message","mb-0"],["class","api-error-details",4,"ngIf"],[1,"api-error-details"],["class","error-detail-item",4,"ngIf"],[1,"error-detail-item"],[1,"callback-info","text-start"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"clock-icon"],["cx","12","cy","12","r","10","stroke","currentColor","stroke-width","2"],["points","12 6 12 12 16 14","stroke","currentColor","stroke-width","2","stroke-linecap","round"],[1,"btn-recall-text"],[1,"incoming-call-banner"],[1,"incoming-call-content"],[1,"call-info"],[1,"message-bubble"],[1,"message-content"],[1,"message-text"],[1,"message-body"]],template:function(t,e){1&t&&(o.YNc(0,uN,34,5,"div",0),o.YNc(1,pN,8,0,"div",1)),2&t&&(o.Q6J("ngIf",e.customEditorComponent.showCallAgentToggle),o.xp6(1),o.Q6J("ngIf",e.isIncomingCall))},directives:[to.O5,Xi.EJ,Xi.JJ,Xi.On,to.sg,to.mk,Xi.YN,Xi.Kr],styles:['.call-agent-container[_ngcontent-%COMP%]{position:absolute;top:150px;left:90px;z-index:9;width:100%;max-width:520px;padding:0;animation:slideInFromLeft .5s cubic-bezier(.4,0,.2,1);pointer-events:auto}@keyframes slideInFromLeft{0%{opacity:0;transform:translate(calc(-100% - 20px))}to{opacity:1;transform:translate(0)}}.call-agent-content[_ngcontent-%COMP%]{background:#f3f8ff;border-radius:18px;box-shadow:0 20px 50px #0000000d;position:relative;border:1px solid #dbdbdb;overflow:hidden;animation:slideInFromLeft .5s cubic-bezier(.4,0,.2,1)}.call-agent-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 0;border-bottom:none}.call-agent-title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:18px;font-weight:700;color:#1d1d1d;line-height:1.3}.close-btn[_ngcontent-%COMP%]{background:transparent;border:none;padding:0;cursor:pointer;color:#cbd5e1;font-size:22px;line-height:1;transition:all .2s ease;border-radius:4px;display:flex;align-items:center;justify-content:center}.close-btn[_ngcontent-%COMP%]:hover{color:#4560e6}.close-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #007bff40}.close-btn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:16px}.call-agent-body[_ngcontent-%COMP%]{padding:16px}.call-agent-description[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#4a5568;line-height:1.6;margin:0}.key-features[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px;margin-top:0}.feature-item[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px;font-size:12px;color:#2d3748;font-weight:500}.checkmark-icon[_ngcontent-%COMP%]{width:18px;height:18px;color:#2d3748;flex-shrink:0}.call-agent-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:12px;gap:12px}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;grid-gap:8px;gap:8px;padding:14px 24px;font-size:15px;font-weight:600;border-radius:10px;border:none;cursor:pointer;transition:all .3s ease;text-decoration:none;width:100%}.btn-recall-text[_ngcontent-%COMP%]{color:#64748b;font-size:13px;font-weight:500}.callback-info[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;justify-content:center;margin-top:4px}.clock-icon[_ngcontent-%COMP%]{width:16px;height:16px;color:#64748b;flex-shrink:0}.btn-call-agent[_ngcontent-%COMP%]{background:var(--Primary-Color);color:#fff}.btn-call-agent[_ngcontent-%COMP%]:hover{background:var(--Primary-Color);transform:translateY(-1px);box-shadow:0 4px 12px #9333ea4d}.btn-call-agent[_ngcontent-%COMP%]:active{transform:translateY(0)}.btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #5371ff40}.call-agent-image-container[_ngcontent-%COMP%]{width:100%}
1.call-agent-image-container-right[_ngcontent-%COMP%]{width:100%;max-width:150px;height:auto;aspect-ratio:1 / 1.2}.call-agent-image[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;display:block;border-radius:12px;transition:opacity .3s ease}.call-agent-image[loading=lazy][_ngcontent-%COMP%]{opacity:1}@keyframes fadeInImage{to{opacity:1}}.incoming-call-banner[_ngcontent-%COMP%]{position:absolute;top:150px;left:90px;z-index:1060;width:100%;max-width:500px;padding:0;animation:slideInFromLeft .5s cubic-bezier(.4,0,.2,1);background:none!important}.incoming-call-content[_ngcontent-%COMP%]{background:transparent;border-radius:12px;padding:0;display:flex;align-items:center;grid-gap:16px;gap:16px;box-shadow:none}.phone-icon-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0}.phone-icon[_ngcontent-%COMP%]{width:18px;height:18px;color:#4a5568;z-index:2;position:relative}.ripple-ring[_ngcontent-%COMP%]{position:absolute;width:28px;height:28px;border:2px solid #4a5568;border-radius:50%;opacity:.3;animation:ripple 2s infinite}.ripple-ring[_ngcontent-%COMP%]:nth-child(2){animation-delay:.5s}.ripple-ring[_ngcontent-%COMP%]:nth-child(3){animation-delay:1s}@keyframes ripple{0%{transform:scale(1);opacity:.3}to{transform:scale(2);opacity:0}}.call-info[_ngcontent-%COMP%]{flex:1;min-width:0}.call-text[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:500;color:#2d3748;line-height:1.5}.call-text[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:700;color:#1a202c}.message-bubble[_ngcontent-%COMP%]{background:linear-gradient(135deg,#10b981 0%,#059669 100%);border-radius:12px;padding:12px;box-shadow:0 8px 32px #10b9814d;position:relative;overflow:hidden;animation:slideInBubble .5s cubic-bezier(.34,1.56,.64,1)}.message-bubble[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-50%;right:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);animation:shimmer 3s infinite}@keyframes slideInBubble{0%{opacity:0;transform:translateY(20px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes shimmer{0%,to{transform:rotate(0)}50%{transform:rotate(180deg)}}.message-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.message-icon-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(255,255,255,.2);border-radius:50%;backdrop-filter:blur(10px)}.message-icon[_ngcontent-%COMP%]{width:20px;height:20px;color:#fff;z-index:2;position:relative;animation:phonePulse 2s infinite}.pulse-ring[_ngcontent-%COMP%]{position:absolute;width:40px;height:40px;border:2px solid rgba(255,255,255,.6);border-radius:50%;animation:pulseRing 2s infinite}@keyframes phonePulse{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}@keyframes pulseRing{0%{transform:scale(1);opacity:1}to{transform:scale(1.5);opacity:0}}.message-badge[_ngcontent-%COMP%]{background:rgba(255,255,255,.25);color:#fff;padding:6px 12px;border-radius:12px;font-size:11px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.3);animation:badgeGlow 2s infinite}@keyframes badgeGlow{0%,to{box-shadow:0 0 10px #ffffff4d}50%{box-shadow:0 0 20px #ffffff80}}.message-content[_ngcontent-%COMP%]{margin-bottom:0}.message-text[_ngcontent-%COMP%]{margin:0;color:#fff;line-height:1.6;display:flex;flex-direction:column;grid-gap:4px;gap:4px}.message-greeting[_ngcontent-%COMP%]{font-size:18px;font-weight:700;display:block;animation:fadeInUp .6s ease-out .2s both}.message-body[_ngcontent-%COMP%]{font-size:14px;font-weight:400;opacity:.95;display:block}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-footer[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.typing-indicator[_ngcontent-%COMP%]{display:flex;grid-gap:4px;gap:4px;align-items:center}.typing-indicator[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:6px;height:6px;background:rgba(255,255,255,.8);border-radius:50%;animation:typingDot 1.4s infinite}.typing-indicator[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(1){animation-delay:0s}.typing-indicator[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.typing-indicator[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes typingDot{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-8px);opacity:1}}.call-actions[_ngcontent-%COMP%]{display:flex;grid-gap:12px;gap:12px;align-items:center;flex-shrink:0}.action-btn[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:relative;flex-shrink:0}.action-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #0000001a}.action-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:16px;height:16px;z-index:2;position:relative}.answer-btn[_ngcontent-%COMP%]{background:#48bb78;color:#fff}.answer-btn[_ngcontent-%COMP%]:hover{background:#38a169;transform:scale(1.05)}.answer-btn[_ngcontent-%COMP%]:active{transform:scale(.95)}.ripple-ring-small[_ngcontent-%COMP%]{position:absolute;width:40px;height:40px;border:2px solid #48bb78;border-radius:50%;opacity:.4;animation:rippleSmall 1.5s infinite}@keyframes rippleSmall{0%{transform:scale(1);opacity:.4}to{transform:scale(1.5);opacity:0}
1}.decline-btn[_ngcontent-%COMP%]{background:#f56565;color:#fff}.decline-btn[_ngcontent-%COMP%]:hover{background:#e53e3e;transform:scale(1.05)}.decline-btn[_ngcontent-%COMP%]:active{transform:scale(.95)}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:#f0fdf4;color:#16a34a;padding:6px 12px;border-radius:6px;font-size:12px;font-weight:600;letter-spacing:.01em}.status-pill[_ngcontent-%COMP%]:before{content:"";width:6px;height:6px;background:#16a34a;border-radius:50%;margin-right:6px;flex-shrink:0}.answer-btn.disabled[_ngcontent-%COMP%]   .ripple-ring-small[_ngcontent-%COMP%]{animation:none}@media (max-width: 767px){.call-agent-container[_ngcontent-%COMP%]{max-width:calc(100% - 40px);padding:0;top:10px;left:20px;right:20px;position:fixed;z-index:103}.call-agent-title[_ngcontent-%COMP%]{font-size:18px}.call-agent-footer[_ngcontent-%COMP%]{flex-direction:column}.btn[_ngcontent-%COMP%]{width:100%;min-width:auto}.call-agent-image-container-right[_ngcontent-%COMP%]{max-width:100%;width:100%;margin-top:16px}.incoming-call-banner[_ngcontent-%COMP%]{top:10px;padding:0 15px}.incoming-call-content[_ngcontent-%COMP%]{padding:0;grid-gap:12px;gap:12px}.message-bubble[_ngcontent-%COMP%]{padding:12px;border-radius:12px}.message-icon-wrapper[_ngcontent-%COMP%]{width:36px;height:36px}.message-icon[_ngcontent-%COMP%]{width:18px;height:18px}.message-greeting[_ngcontent-%COMP%]{font-size:16px}.message-body[_ngcontent-%COMP%]{font-size:13px}.message-badge[_ngcontent-%COMP%]{font-size:10px;padding:5px 10px}.phone-icon[_ngcontent-%COMP%]{width:28px;height:28px}.call-text[_ngcontent-%COMP%]{font-size:13px}.action-btn[_ngcontent-%COMP%]{width:44px;height:44px}.action-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:20px;height:20px}.call-actions[_ngcontent-%COMP%]{grid-gap:10px;gap:10px}}.phone-input-group[_ngcontent-%COMP%]{width:100%}.country-code-select[_ngcontent-%COMP%]{max-width:100px;flex-shrink:0;border:1px solid #e2e8f0;border-radius:8px;padding:8px;font-size:12px;background-color:#fff;transition:all .2s ease;color:#1d1d1d;font-weight:400;margin-right:-1px;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.country-code-select[_ngcontent-%COMP%]:hover{border-color:#cbd5e1}.country-code-select[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.phone-number-input[_ngcontent-%COMP%]{border:1px solid #e2e8f0;border-radius:8px;padding:8px 12px;font-size:12px;transition:all .2s ease;color:#1d1d1d;font-weight:400;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.phone-number-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#4560e6;border-color:var(--Primary-Color, #4560e6);box-shadow:0 0 0 3px #4560e61a}.phone-number-input.is-invalid[_ngcontent-%COMP%]{border-color:#ef4444}.phone-number-input.is-invalid[_ngcontent-%COMP%]:focus{border-color:#ef4444;box-shadow:0 0 0 3px #ef44441a}.phone-error-message[_ngcontent-%COMP%]{font-size:11px;display:block;color:#a94442!important}@media (max-width: 767px){.country-code-select[_ngcontent-%COMP%]{max-width:140px;font-size:13px;padding:6px 10px}.phone-number-input[_ngcontent-%COMP%]{font-size:13px;padding:6px 10px}}.phoneNumber-wrap[_ngcontent-%COMP%]{border-style:solid;border-width:.5px;border-color:#1bb854}.api-error-container[_ngcontent-%COMP%]{margin-top:0;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px}.api-error-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:8px;gap:8px}.error-detail-item[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;font-size:12px;color:#991b1b;font-weight:500}.error-icon[_ngcontent-%COMP%]{width:16px;height:16px;color:#dc2626;flex-shrink:0}']}),t})();function gN(t,e){1&t&&(o.TgZ(0,"a",40),o.O4$(),o.TgZ(1,"svg",5),o._UZ(2,"path",6),o.qZA(),o.kcU(),o.TgZ(3,"span",29),o.O4$(),o.TgZ(4,"svg",8),o._UZ(5,"path",41),o._UZ(6,"circle",42),o._UZ(7,"path",43),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"span",11),o._uU(9,"User management"),o.qZA(),o.TgZ(10,"span",12),o._uU(11,"Invite moderators, set permissions"),o.qZA(),o.qZA())}
1function fN(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"a",36),o._uU(1,"Book an expert "),o.O4$(),o.TgZ(2,"svg",37),o._UZ(3,"path",23),o._UZ(4,"path",24),o._UZ(5,"path",25),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.Q6J("href",t.expertUrl,o.LSH)}}function mN(t,e){if(1&t&&(o.O4$(),o.kcU(),o._UZ(0,"app-call-agent",44)),2&t){const t=o.oxw();o.Q6J("showButtonCall",t.callAgentHost.showButtonCall)}}const vN=()=>({showCallAgentToggle:!1,showButtonCall:!0});let bN=(()=>{class t{constructor(t,e,n){this.customerService=t,this.shellEvents=e,this.callAgentHost=n,this.mailhubUrl="https://mailhub.flozic.ai/",this.helpUrl="https://helpdesk.flozic.ai/portal/en/kb/flozic/flozic-user-guide-and-faq",this.expertUrl="https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team",this.isSubUser=!1,this.isFreePlan=!1,this.mcpUsed=0,this.callbackMounted=!1}ngOnInit(){const t=this.customerService.GetCurrent()||{};this.isSubUser=!!t.isSubUser,this.isFreePlan="jc0fgwefcky2"===t.planId,this.mcpUsed=t.used_mcp_quota||0}run(t){this.shellEvents.run(t)}openCallback(){if(!this.callbackMounted)return this.callbackMounted=!0,void setTimeout(()=>{this.callAgentHost.showCallAgentToggle=!0},0);this.callAgentHost.showCallAgentToggle=!0}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(JA),o.Y36(LO))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-settings-hub"]],features:[o._Bn([{provide:LO,useFactory:vN}])],decls:82,vars:6,consts:[["id","main-container_",1,"main-container","ns-page"],[1,"sb-page"],[1,"sb-head"],[1,"sb-grid"],["type","button",1,"sb-card","sb-billing",3,"click"],["width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.9","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"sb-arrow"],["d","M7 17 17 7M8 7h9v9"],[1,"sb-tile","tone-amber"],["width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.9","stroke-linecap","round","stroke-linejoin","round"],["width","20","height","14","x","2","y","5","rx","2"],["d","M2 10h20"],[1,"sb-t"],[1,"sb-s"],["class","sb-card sb-users","routerLink","/team-moderator",4,"ngIf"],["routerLink","/tools",1,"sb-card","sb-tools"],[1,"sb-tile","tone-indigo"],["d","M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"],["routerLink","/mcp",1,"sb-card","sb-mcp"],["d","m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"],["d","m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65M22 12.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"],[1,"sb-big"],["target","_blank","rel","noopener",1,"sb-card","sb-email",3,"href"],["width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.9","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"sb-arrow"],["d","M15 3h6v6"],["d","M10 14 21 3"],["d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"],["width","20","height","16","x","2","y","4","rx","2"],["d","m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"],["type","button",1,"sb-card","sb-callback",3,"click"],[1,"sb-tile","tone-teal"],["d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z"],[1,"sb-card","sb-help"],[1,"sb-tile","tone-rose"],["cx","12","cy","12","r","10"],["d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"],[1,"sb-links"],["target","_blank","rel","noopener",3,"href"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["target","_blank","rel","noopener",3,"href",4,"ngIf"],[3,"showButtonCall",4,"ngIf"],["routerLink","/team-moderator",1,"sb-card","sb-users"],["d","M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"],["cx","9","cy","7","r","4"],["d","M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"],[3,"showButtonCall"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"h1"),o._uU(4,"Settings"),o.qZA(),o.TgZ(5,"p"),o._uU(6,"Everything that isn\u2019t in the sidebar."),o.qZA(),o.qZA(),o.TgZ(7,"div",3),o.TgZ(8,"button",4),o.NdJ("click",function(){return e.run("billing")}),o.O4$(),o.TgZ(9,"svg",5),o._UZ(10,"path",6),o.qZA(),o.kcU(),o.TgZ(11,"span",7),o.O4$(),o.TgZ(12,"svg",8),o._UZ(13,"rect",9),o._UZ(14,"path",10),o.qZA(),o.qZA(),o.kcU(),o.TgZ(15,"span",11),o._uU(16,"Billing"),o.qZA(),o.TgZ(17,"span",12),o._uU(18,"Invoices and payment method"),o.qZA(),o.qZA(),o.YNc(19,gN,12,0,"a",13),o.TgZ(20,"a",14),o.O4$(),o.TgZ(21,"svg",5),o._UZ(22,"path",6),o.qZA(),o.kcU(),o.TgZ(23,"span",15),o.O4$(),o.TgZ(24,"svg",8),o._UZ(25,"path",16),o.qZA(),o.qZA(),o.kcU(),o.TgZ(26,"span",11),o._uU(27,"Tools"),o.qZA(),o.TgZ(28,"span",12),o._uU(29,"My Tools"),o.qZA(),o.qZA(),o.TgZ(30,"a",17),o.O4$(),o.TgZ(31,"svg",5),o._UZ(32,"path",6),o.qZA(),o.kcU(),o.TgZ(33,"span",15),o.O4$(),o.TgZ(34,"svg",8),o._UZ(35,"path",18),o._UZ(36,"path",19),o.qZA(),o.qZA(),o.kcU(),o.TgZ(37,"span",11),o._uU(38,"MCP settings"),o.qZA(),o.TgZ(39,"span",20),o._uU(40),o.TgZ(41,"small"),o._uU(42,"/ 100 servers"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(43,"a",21),o.O4$(),o.TgZ(44,"svg",22),o._UZ(45,"path",23),o._UZ(46,"path",24),o._UZ(47,"path",25),o.qZA(),o.kcU(),o.TgZ(48,"span",15),o.O4$(),o.TgZ(49,"svg",8),o._UZ(50,"rect",26),o._UZ(51,"path",27),o.qZA(),o.qZA(),o.kcU(),o.TgZ(52,"span",11),o._uU(53,"Email templates"),o.qZA(),o.TgZ(54,"span",12),o._uU(55,"Opens Mailhub in a new tab"),o.qZA(),o.qZA(),o.TgZ(56,"button",28),o.NdJ("click",function(){return e.openCallback()}),o.O4$(),o.TgZ(57,"svg",5),o._UZ(58,"path",6),o.qZA(),o.kcU(),o.TgZ(59,"span",29),o.O4$(),o.TgZ(60,"svg",8),o._UZ(61,"path",30),o.qZA(),o.qZA(),o.kcU(),o.TgZ(62,"span",11),o._uU(63,"Request a callback"),o.qZA(),o.TgZ(64,"span",12),o._uU(65,"We call you back on your number"),o.qZA(),o.qZA(),o.TgZ(66,"div",31),o.TgZ(67,"span",32),o.O4$(),o.TgZ(68,"svg",8),o._UZ(69,"circle",33),o._UZ(70,"path",34),o.qZA(),o.qZA(),o.kcU(),o.TgZ(71,"span",11),o._uU(72,"Need a hand?"),o.qZA(),o.TgZ(73,"div",35),o.TgZ(74,"a",36),o._uU(75,"User guide & FAQ "),o.O4$(),o.TgZ(76,"svg",37),o._UZ(77,"path",23),o._UZ(78,"path",24),o._UZ(79,"path",25),o.qZA(),o.qZA(),o.YNc(80,fN,6,1,"a",38),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(81,mN,1,1,"app-call-agent",39),o.qZA()),2&t&&(o.xp6(19),o.Q6J("ngIf",!e.isSubUser),o.xp6(21),o.hij("",e.mcpUsed," "),o.xp6(3),o.Q6J("href",e.mailhubUrl,o.LSH),o.xp6(31),o.Q6J("href",e.helpUrl,o.LSH),o.xp6(6),o.Q6J("ngIf",!e.isFreePlan),o.xp6(1),o.Q6J("ngIf",e.callbackMounted))},directives:[to.O5,ui.yS,hN],styles:['[_nghost-%COMP%]{--tone-indigo-bg: #ececfd;--tone-indigo: #4342b8;--tone-teal-bg: #e2f5f1;--tone-teal: #0f766e;--tone-amber-bg: #fdf0e0;--tone-amber: #b45309;--tone-rose-bg: #fcebef;--tone-rose: #be3a5a;
1--sb-usage-glow: rgba(91, 91, 214, .14);--sb-wallet-glow: rgba(29, 122, 79, .08);--sb-shadow-lg: 0 2px 6px rgba(24, 24, 27, .06), 0 24px 48px rgba(24, 24, 27, .1)}.theme-dark[_nghost-%COMP%], .theme-dark   [_nghost-%COMP%]{--tone-indigo-bg: #232345;--tone-indigo: #a5a5f6;--tone-teal-bg: #0f2a26;--tone-teal: #5eead4;--tone-amber-bg: #33280f;--tone-amber: #f0b35a;--tone-rose-bg: #351820;--tone-rose: #f59ab0;--sb-usage-glow: rgba(123, 123, 236, .16);--sb-wallet-glow: rgba(76, 195, 138, .1);--sb-shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px rgba(0, 0, 0, .5)}.ns-page[_ngcontent-%COMP%]{background:var(--ns-paper)!important;color:var(--ns-ink);font-family:var(--ns-sans);font-size:14px;line-height:1.45;min-height:calc(100vh - 70px)}.sb-page[_ngcontent-%COMP%]{max-width:1120px;margin:0 auto;padding:8px 28px 64px}.sb-head[_ngcontent-%COMP%]{margin-bottom:22px}.sb-head[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-family:var(--ns-serif);font-size:30px;font-weight:600;line-height:1.15;letter-spacing:-.01em;color:var(--ns-ink);margin:0}.sb-head[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ns-muted);margin:4px 0 0}.sb-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:14px;gap:14px}.sb-card[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:flex-start;grid-gap:10px;gap:10px;min-height:150px;padding:18px;border:1px solid var(--ns-line);border-radius:18px;background:var(--ns-panel);color:var(--ns-ink);font:inherit;text-align:left;text-decoration:none;overflow:hidden;cursor:pointer;transition:transform .15s,box-shadow .15s,border-color .15s}.sb-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:var(--sb-shadow-lg);border-color:var(--ns-line-strong);color:var(--ns-ink);text-decoration:none}.sb-card[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ns-accent);outline-offset:2px}.sb-tile[_ngcontent-%COMP%]{width:34px;height:34px;flex:none;border-radius:10px;display:grid;place-items:center}.tone-indigo[_ngcontent-%COMP%]{background:var(--tone-indigo-bg);color:var(--tone-indigo)}.tone-teal[_ngcontent-%COMP%]{background:var(--tone-teal-bg);color:var(--tone-teal)}.tone-amber[_ngcontent-%COMP%]{background:var(--tone-amber-bg);color:var(--tone-amber)}.tone-rose[_ngcontent-%COMP%]{background:var(--tone-rose-bg);color:var(--tone-rose)}.sb-t[_ngcontent-%COMP%]{font-size:15px;font-weight:600}.sb-s[_ngcontent-%COMP%]{font-size:12.5px;color:var(--ns-faint)}.sb-arrow[_ngcontent-%COMP%]{position:absolute;top:16px;right:16px;color:var(--ns-faint);transition:transform .15s,color .15s}.sb-card[_ngcontent-%COMP%]:hover   .sb-arrow[_ngcontent-%COMP%]{transform:translate(2px,-2px);color:var(--ns-ink)}.sb-big[_ngcontent-%COMP%]{margin-top:auto;font-size:22px;font-weight:600;line-height:1;letter-spacing:-.02em;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.sb-big[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:12.5px;font-weight:500;letter-spacing:0;color:var(--ns-faint)}.sb-help[_ngcontent-%COMP%]{cursor:default}.sb-help[_ngcontent-%COMP%]:hover{transform:none;box-shadow:none;border-color:var(--ns-line)}.sb-links[_ngcontent-%COMP%]{display:grid;grid-gap:6px;gap:6px;width:100%;margin-top:auto}.sb-links[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:8px;gap:8px;padding:8px 10px;border-radius:10px;background:var(--ns-panel-2);color:var(--ns-ink);font-size:12.5px;font-weight:600;text-decoration:none}.sb-links[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{background:var(--ns-accent-soft);color:var(--ns-accent-ink);text-decoration:none}@media (max-width: 1200px){.sb-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 600px){.sb-page[_ngcontent-%COMP%]{padding:4px 14px 48px}.sb-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}']}),t})();function xN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",6),o.TgZ(1,"button",7),o.NdJ("click",function(){return o.CHM(t),o.oxw().secondary()}),o._uU(2),o.qZA(),o.TgZ(3,"button",8),o.NdJ("click",function(){return o.CHM(t),o.oxw().primary()}),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(2),o.Oqu(t.secondaryLabel),o.xp6(2),o.Oqu(t.primaryLabel)}}function _N(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",6),o.TgZ(1,"button",8),o.NdJ("click",function(){return o.CHM(t),o.oxw().secondary()}),o._uU(2),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(2),o.Oqu(t.primaryLabel)}}function CN(t,e){1&t&&(o.TgZ(0,"div",9),o._UZ(1,"span",10),o.TgZ(2,"span",11),o._uU(3,"Redirecting to secure checkout\u2026"),o.qZA(),o.qZA())}let wN=(()=>{class t{constructor(t){this.bsModalRef=t,this.primaryLabel="Continue",this.secondaryLabel="Cancel",this.variant="confirm",this.closeOnly=!1,this.loading=!1}ngOnInit(){this.onPrimary=new fo.xQ,this.onSecondary=new fo.xQ}primary(){if("confirm"===this.variant)return this.loading=!0,void this.onPrimary.next(!0);this.bsModalRef.hide(),this.onPrimary.next(!0)}secondary(){this.bsModalRef.hide(),this.onSecondary.next(!0)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["PlanChangeConfirmPopUp"]],decls:10,vars:5,consts:[[1,"pcc-modal"],["type","button","aria-label","Close",1,"pcc-close",3,"click"],[1,"pcc-title"],[1,"pcc-message"],["class","pcc-actions",4,"ngIf"],["class","pcc-loading","role","status","aria-live","polite",4,"ngIf"],[1,"pcc-actions"],["type","button",1,"pcc-btn","pcc-btn-secondary",3,"click"],["type","button",1,"pcc-btn","pcc-btn-primary",3,"click"],["role","status","aria-live","polite",1,"pcc-loading"],["aria-hidden","true",1,"pcc-spinner"],[1,"pcc-loading-text"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"button",1),o.NdJ("click",function(){return e.secondary()}),o._uU(2,"\xd7"),o.qZA(),o.TgZ(3,"h3",2),o._uU(4),o.qZA(),o.TgZ(5,"p",3),o._uU(6),o.qZA(),o.YNc(7,xN,5,2,"div",4),o.YNc(8,_N,3,1,"div",4),o.YNc(9,CN,4,0,"div",5),o.qZA()),2&t&&(o.xp6(4),o.Oqu(e.modelTitle),o.xp6(2),o.Oqu(e.modelContent),o.xp6(1),o.Q6J("ngIf",!e.loading&&!e.closeOnly),o.xp6(1),o.Q6J("ngIf",!e.loading&&e.closeOnly),o.xp6(1),o.Q6J("ngIf",e.loading))},directives:[to.O5],styles:[".pcc-modal[_ngcontent-%COMP%]{position:relative;background:#ffffff;border-radius:14px;padding:28px 28px 24px;box-shadow:0 12px 40px #0000002e}.pcc-close[_ngcontent-%COMP%]{position:absolute;top:12px;right:16px;width:32px;height:32px;background:transparent;border:0;font-size:28px;line-height:1;color:#6b7280;cursor:pointer;border-radius:8px}.pcc-close[_ngcontent-%COMP%]:hover{color:#111827;background:rgba(0,0,0,.05)}.pcc-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin:4px 40px 14px 0;color:#111827}.pcc-message[_ngcontent-%COMP%]{font-size:15px;line-height:1.65;color:#374151;margin:0 0 26px}.pcc-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-gap:12px;gap:12px;flex-wrap:wrap}.pcc-btn[_ngcontent-%COMP%]{border-radius:999px;padding:10px 24px;font-size:15px;font-weight:600;cursor:pointer;border:1px solid transparent;transition:background .15s ease,color .15s ease}.pcc-btn-secondary[_ngcontent-%COMP%]{background:#ffffff;color:#374151;border-color:#d1d5db}.pcc-btn-secondary[_ngcontent-%COMP%]:hover{background:#f3f4f6}.pcc-btn-primary[_ngcontent-%COMP%]{background:#5371ff;color:#fff}.pcc-btn-primary[_ngcontent-%COMP%]:hover{filter:brightness(.95)}.theme-dark[_nghost-%COMP%]   .pcc-modal[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-modal[_ngcontent-%COMP%]{background:#1e2230;box-shadow:0 12px 40px #00000080}.theme-dark[_nghost-%COMP%]   .pcc-title[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-title[_ngcontent-%COMP%]{color:#f3f4f6}.theme-dark[_nghost-%COMP%]   .pcc-message[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-message[_ngcontent-%COMP%]{color:#cbd5e1}.theme-dark[_nghost-%COMP%]   .pcc-close[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-close[_ngcontent-%COMP%]{color:#9ca3af}.theme-dark[_nghost-%COMP%]   .pcc-close[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .pcc-close[_ngcontent-%COMP%]:hover{color:#f3f4f6;background:rgba(255,255,255,.08)}.theme-dark[_nghost-%COMP%]   .pcc-btn-secondary[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-btn-secondary[_ngcontent-%COMP%]{background:transparent;color:#e5e7eb;border-color:#4b5563}.theme-dark[_nghost-%COMP%]   .pcc-btn-secondary[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .pcc-btn-secondary[_ngcontent-%COMP%]:hover{background:#374151}.pcc-loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;grid-gap:12px;gap:12px;min-height:44px}
1.pcc-spinner[_ngcontent-%COMP%]{width:22px;height:22px;flex:0 0 auto;border-radius:50%;border:3px solid rgba(83,113,255,.25);border-top-color:#5371ff;animation:pcc-spin .7s linear infinite}.pcc-loading-text[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#374151}@keyframes pcc-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.pcc-spinner[_ngcontent-%COMP%]{animation-duration:1.6s}}.theme-dark[_nghost-%COMP%]   .pcc-spinner[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-spinner[_ngcontent-%COMP%]{border-color:#ffffff2e;border-top-color:#8aa0ff}.theme-dark[_nghost-%COMP%]   .pcc-loading-text[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .pcc-loading-text[_ngcontent-%COMP%]{color:#cbd5e1}"]}),t})(),yN=(()=>{class t{constructor(t){this.apiService=t}createLogData(t){return this.apiService.request("post","log/createlogdata",t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),AN=(()=>{class t{tierOf(e){const n=e&&t.TIER_BY_ID[e.planId];return void 0!==n?n:t.TIER_BY_NAME[String(e&&e.planName||"").toUpperCase().trim()]}getDecision(t,e,n){const i=t&&t.plan_details&&t.plan_details[0];if(!i||!e)return null;const o=["trial","trialWithoutCC"].includes(t.payment_status)||"yes"===t.isSubscriptionTrial,r=["complete","renewal"].includes(t.payment_status)&&!o;if(!o&&!r)return null;const s=this.tierOf(i),a=this.tierOf(e),c=i.planName,l="monthly"===t.planPeriod?"monthly":"yearly",d=a>s,u=a===s;return o?u?{kind:"confirm",title:"Confirm Plan Change",message:`Your current ${c} trial will end immediately. By continuing, your selected ${"monthly"===n?"Monthly":"Yearly"} subscription will start immediately, and you will be charged according to the selected plan. This action cannot be undone.`,primaryLabel:"Confirm",secondaryLabel:"Cancel"}:"yearly"===n?d?{kind:"confirm",title:"Upgrade Plan",message:`You are currently on the ${c} trial plan. Upgrading to the selected plan will immediately end your trial and activate the new plan. Do you want to continue?`,primaryLabel:"Upgrade Plan",secondaryLabel:"Cancel"}:{kind:"block",title:"Downgrade not allowed",message:`Downgrading to a lower plan is not allowed while your ${c}
1 trial is active. Please continue using your current plan or contact Support for assistance.`,primaryLabel:"Contact Support",secondaryLabel:"Continue Current Plan"}:{kind:"confirm",title:"Purchase Plan",message:`You are currently on the ${c} trial plan. Purchasing the selected plan will immediately end your trial and activate the new plan. Do you want to continue?`,primaryLabel:"Buy Plan",secondaryLabel:"Cancel"}:d?{kind:"confirm",title:"Purchase Plan",message:`You are currently subscribed to the ${c} ${l} plan. Purchasing the selected plan will cancel your current plan and activate the new plan immediately. Do you want to continue?`,primaryLabel:"Buy Plan",secondaryLabel:"Cancel"}:u?"monthly"===l&&"yearly"===n?{kind:"confirm",title:"Switch to Yearly",message:`You are currently on the ${c} monthly plan. Switching to the yearly plan will cancel your monthly plan and activate the yearly plan immediately. Do you want to continue?`,primaryLabel:"Switch to Yearly",secondaryLabel:"Cancel"}:"yearly"===l&&"monthly"===n?{kind:"block",title:"Downgrade not allowed",message:`Switching from a yearly to a monthly plan is not allowed while your ${c} yearly plan is active. Please continue using your current plan or c
1ontact Support for assistance.`,primaryLabel:"Contact Support",secondaryLabel:"Continue Current Plan"}:{kind:"same",title:"Current Plan",message:"This is your current plan.",primaryLabel:"OK",secondaryLabel:"Close"}:{kind:"block",title:"Downgrade not allowed",message:`Downgrading to a lower plan is not allowed while your ${c} ${l} plan is active. Please continue using your current plan or contact Support for assistance.`,primaryLabel:"Contact Support",secondaryLabel:"Continue Current Plan"}}}return t.TIER_BY_ID={"4xm0pwqlhvw0uj":1,"4xm0pwqlinSqd2":2,"4xm1qx0lhbw0vk":3},t.TIER_BY_NAME={STANDARD:1,PROFESSIONAL:2,BUSINESS:3,ENTERPRISE:4},t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function ZN(t,e){1&t&&(o.TgZ(0,"h6",26),o._uU(1," 2 way integrations "),o.qZA())}function kN(t,e){1&t&&(o.TgZ(0,"h6",27),o._uU(1," Recommended "),o.qZA())}function TN(t,e){if(1&t&&(o.TgZ(0,"h3",28),o._uU(1),o.ALo(2,"number"),o.qZA()),2&t){const t=o.oxw(),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(1),o.AsE(" ",e.currencySign,"",o.xi3(2,2,i.planInfo[n].annualPrice,"1.0-2"),"/mo. ")}}function ON(t,e){1&t&&(o.TgZ(0,"h3",28),o._uU(1," Let's Talk "),o.qZA())}function MN(t,e){if(1&t&&(o.TgZ(0,"ul"),o.TgZ(1,"li"),o.TgZ(2,"span",29),o.O4$(),o.TgZ(3,"svg",30),o._UZ(4,"path",31),o._UZ(5,"path",32),o._UZ(6,"path",33),o._UZ(7,"path",34),o._UZ(8,"path",35),o._UZ(9,"path",36),o.qZA(),o.qZA(),o.kcU(),o.TgZ(10,"span"),o._uU(11),o.ALo(12,"number"),o.qZA(),o.qZA(),o.TgZ(13,"li"),o.TgZ(14,"span",29),o.O4$(),o.TgZ(15,"svg",30),o._UZ(16,"path",37),o._UZ(17,"path",38),o._UZ(18,"path",39),o.qZA(),o.qZA(),o.kcU(),o.TgZ(19,"span"),o._uU(20),o.ALo(21,"number"),o.qZA(),o.qZA(),o.TgZ(22,"li"),o.TgZ(23,"span",29),o.O4$(),o.TgZ(24,"svg",30),o._UZ(25,"path",40),o._UZ(26,"path",41),o._UZ(27,"path",42),o.qZA(),o.qZA(),o.kcU(),o.TgZ(28,"span"),o._uU(29),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(11),o.hij(" ",o.xi3(12,3,t.tasks,"1.0-2")," Tasks/mo. "),o.xp6(9),o.hij(" ","Unlimited"!=t.connects?o.xi3(21,6,t.connects,"1.0-2"):t.connects," Connects "),o.xp6(9),o.hij(" ",t.runInterval," minute(s) Run time Interval ")}}function IN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",44),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(4).tryPlan(e)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(6);o.xp6(1),o.hij(" ",t.translation.TRY_PLAN," ")}}function SN(t,e){if(1&t&&(o.ynx(0),o.YNc(1,IN,2,1,"button",43),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngIf",t.sortorder<=e.currentUser.plan_details[0].sortorder&&"yearly"!==e.currentUser.planPeriod&&"Enterprise"!==t.planName&&"yearly"===e.planLists.planPeriodButton||t.sortorder<e.currentUser.plan_details[0].sortorder&&"Enterprise"!==t.planName)}}function PN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",48),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(4).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(7);o.xp6(1),o.Oqu(t.translation.UPGRADE_PLAN)}}function NN(t,e){if(1&t&&(o.TgZ(0,"div",46),o.YNc(1,PN,2,1,"button",47),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName)}}function qN(t,e){if(1&t&&(o.ynx(0),o.YNc(1,NN,2,1,"div",45),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(1),o.Q6J("ngIf",("canceled"===e.currentUser.isSubscriptionTrial||"yes"===e.currentUser.isSubscriptionTrial)&&"Free Plan"===e.currentUser.plan_details[0].planName&&"Free Plan"!==t.planName)}}function UN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",48),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(4).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(7);o.xp6(1),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function EN(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,UN,2,1,"button",47),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","On Demand"!==t.tasks)}}function FN(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"button",48),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(4).upgradePlan(n,i)}),o._uU(2),o.qZA(),o.TgZ(3,"a",49),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(4).upgradePlan(n,i)}),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(6);o.xp6(2),o.hij(" ",t.translation.UPGRADE_PLAN," "),o.xp6(1),o.Q6J("innerHTML",t.translation.UPGRADE_PLAN,o.oJD)}}
1function DN(t,e){if(1&t&&(o.ynx(0),o.YNc(1,EN,2,1,"div",1),o.YNc(2,FN,4,2,"div",1),o.BQk()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngIf","Free Plan"!==t.currentUser.plan_details[0].planName&&("yes"!==t.currentUser.isSubscriptionTrial||t.isTrialExpired())),o.xp6(1),o.Q6J("ngIf","Free Plan"!==t.currentUser.plan_details[0].planName&&"yes"===t.currentUser.isSubscriptionTrial&&!t.isTrialExpired())}}function LN(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).openContactPage()}),o._uU(2," CONTACT US "),o.qZA(),o.BQk()}}function JN(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"span",57),o._uU(1," Your current subscription : "),o.TgZ(2,"span",58),o._uU(3),o.ALo(4,"number"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2),e=t.$implicit,n=t.index,i=o.oxw(4);o.xp6(3),o.lnq("",e.planName," \u2013 Monthly (",e.currencySign,"",o.xi3(4,3,i.planInfo[n].monthlyPrice,"1.0-2"),"/month)")}}function jN(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"button",48),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(4).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(6);o.xp6(1),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function RN(t,e){if(1&t&&(o.TgZ(0,"div",51),o.TgZ(1,"span",52),o.O4$(),o.TgZ(2,"svg",53),o._UZ(3,"path",54),o._UZ(4,"path",55),o.qZA(),o._uU(5),o.qZA(),o.YNc(6,JN,5,6,"span",56),o.YNc(7,jN,2,1,"button",47),o.qZA()),2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(4);o.xp6(5),o.Oqu(i.ongoingStatus),o.xp6(1),o.Q6J("ngIf","yearly"!==i.currentUser.planPeriod&&(null==i.planInfo[e]?null:i.planInfo[e].monthlyPrice)>0),o.xp6(1),o.Q6J("ngIf",!("canceled"!==i.currentUser.isSubscriptionTrial&&"yes"!==i.currentUser.isSubscriptionTrial||"trialWithoutCC"!==i.currentUser.payment_status&&"trial"!==i.currentUser.payment_status||"Free Plan"===n.planName))}}const $N=function(t,e,n){return{"standard-card":t,"border-primary":e,"border-warning":n}},BN=function(t){return{"d-flex flex-column mt-auto":t}};function HN(t,e){if(1&t&&(o.TgZ(0,"div",16),o.TgZ(1,"div",17),o.YNc(2,ZN,2,0,"h6",18),o.YNc(3,kN,2,0,"h6",19),o.TgZ(4,"div",20),o.TgZ(5,"h3",21),o._uU(6),o.qZA(),o.TgZ(7,"p",22),o._uU(8),o.qZA(),o.YNc(9,TN,3,5,"h3",23),o.YNc(10,ON,2,0,"h3",23),o.TgZ(11,"p",22),o._uU(12),o.qZA(),o.qZA(),o.TgZ(13,"div",24),o.YNc(14,MN,30,9,"ul",1),o.YNc(15,SN,2,1,"ng-container",1),o.YNc(16,qN,2,1,"ng-container",1),o.YNc(17,DN,3,2,"ng-container",1),o.YNc(18,LN,3,0,"ng-container",1),o.YNc(19,RN,8,3,"div",25),o.qZA(),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.kEZ(15,$N,"Standard"===t.planName,("Professional"===t.planName&&"trialWithoutCC"!==n.currentUser.payment_status||t.planName===n.currentUser.plan_details[0].planName&&"trialWithoutCC"===n.currentUser.payment_status)&&("Free Plan"===n.currentUser.plan_details[0].planName||"Standard"===n.currentUser.plan_details[0].planName)||"Professional"===t.planName&&"trialWithoutCC"===n.currentUser.payment_status&&"Free Plan"===n.currentUser.plan_details[0].planName,"Enterprise"===t.planName)),o.xp6(1),o.Q6J("ngIf","Enterprise"==t.planName),o.xp6(1),o.Q6J("ngIf","Professional"===t.planName&&("trialWithoutCC"!==n.currentUser.payment_status&&("Free Plan"===n.currentUser.plan_details[0].planName||"Standard"===n.currentUser.plan_details[0].planName)||"trialWithoutCC"===n.currentUser.payment_status&&"Free Plan"===n.currentUser.plan_details[0].planName)),o.xp6(3),o.hij(" ",t.planName," "),o.xp6(2),o.hij(" ",t.headerText," "),o.xp6(1),o.Q6J("ngIf","Enterprise"!=t.planName),o.xp6(1),o.Q6J("ngIf","Enterprise"==t.planName),o.xp6(2),o.hij(" ","Enterprise"==t.planName?"Get customized monthly tasks on-demand":"Billed annually"," "),o.xp6(1),o.Q6J("ngClass",o.VKq(19,BN,"Enterprise"===t.planName)),o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName),o.xp6(1),o.Q6J("ngIf",!n.currentUser.isSubscriptionTrial&&"Free Plan"===n.currentUser.plan_details[0].planName&&"Enterprise"!==t.planName&&n.currentUser.plan_details[0].planName!=t.planName),o.xp6(1),o.Q6J("ngIf",t.sortorder<n.currentUser.plan_details[0].sortorder),o.xp6(1),o.Q6J("ngIf",(t.sortorder<n.currentUser.plan_details[0].sortorder||n.isTrialExpired())&&"Enterprise"!==t.planName),o.xp6(1),o.Q6J("ngIf","Enterprise"===t.planName&&"Enterprise"!==n.currentUser.plan_details[0].planName),o.xp6(1),o.Q6J("ngIf",n.currentUser.plan_details[0].planName===t.planName&&n.ongoingStatus)}}function QN(t,e){1&t&&o._UZ(0,"th",70),2&t&&o.Q6J("innerHTML",e.$implicit.planName,o.oJD)}function YN(t,e){if(1&t&&o._UZ(0,"td",71),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"text-center":"")("innerHTML",t.connects,o.oJD)}}function zN(t,e){if(1&t&&o._UZ(0,"th",71),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"aeh":"")("innerHTML",t.automation_aeh,o.oJD)}}function VN(t,e){if(1&t&&o._UZ(0,"td",71),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"text-center":"")("innerHTML",t.runInterval,o.oJD)}}function GN(t,e){if(1&t&&o._UZ(0,"td",71),2&t){const t=e.$implicit,n=e.index,i=o.oxw(5);o.Q6J("ngClass","plan"===t.plan?"text-center":"")("innerHTML",n>0?i.planInfo[n-1].tasks:t.tasks,o.oJD)}}
1function WN(t,e){if(1&t&&(o.TgZ(0,"td",72),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"text-center":""),o.xp6(1),o.hij(" ",t.extraTaskPrice&&"-"!==t.extraTaskPrice?(t.currency?t.currency:"")+t.extraTaskPrice:"-"," ")}}function KN(t,e){if(1&t&&o._UZ(0,"td",71),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"text-center":"")("innerHTML",t.mindbodyFreeAPICalls,o.oJD)}}function XN(t,e){if(1&t&&(o.TgZ(0,"td",72),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.Q6J("ngClass","plan"===t.plan?"text-center":""),o.xp6(1),o.hij(" ","-"!=t.mindbodyOverageCost&&"On Demand"!=t.mindbodyOverageCost?(t.currency?t.currency:"")+t.mindbodyOverageCost:t.mindbodyOverageCost," ")}}function tq(t,e){if(1&t&&(o.TgZ(0,"th"),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.hij(" ",t.value," ")}}function eq(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"\xa0"),o.qZA())}function nq(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"\xa0"),o.qZA())}function iq(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"\xa0"),o.qZA())}function oq(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"\xa0"),o.qZA())}function rq(t,e){if(1&t&&(o.TgZ(0,"td"),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.hij(" ",t.value," ")}}function sq(t,e){1&t&&o._UZ(0,"div",76)}function aq(t,e){if(1&t&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(5);o.xp6(1),o.hij(" ",e.planLists[0].features[t.heading][t.column]," ")}}function cq(t,e){if(1&t&&(o.TgZ(0,"td",74),o.YNc(1,sq,1,0,"div",75),o.YNc(2,aq,2,1,"div",1),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",e.planLists[0].features&&e.planLists[0].features[t.heading]&&e.planLists[0].features[t.heading][t.column]&&"yes"===e.planLists[0].features[t.heading][t.column]),o.xp6(1),o.Q6J("ngIf",e.planLists[0].features&&e.planLists[0].features[t.heading]&&e.planLists[0].features[t.heading][t.column]&&"yes"!==e.planLists[0].features[t.heading][t.column]&&"no"!==e.planLists[0].features[t.heading][t.column])}}function lq(t,e){1&t&&o._UZ(0,"div",76)}function dq(t,e){if(1&t&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(5);o.xp6(1),o.hij(" ",e.planLists[1].features[t.heading][t.column]," ")}}function uq(t,e){if(1&t&&(o.TgZ(0,"td",74),o.YNc(1,lq,1,0,"div",75),o.YNc(2,dq,2,1,"div",1),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",e.planLists[1].features&&e.planLists[1].features[t.heading]&&e.planLists[1].features[t.heading][t.column]&&"yes"===e.planLists[1].features[t.heading][t.column]),o.xp6(1),o.Q6J("ngIf",e.planLists[1].features&&e.planLists[1].features[t.heading]&&e.planLists[1].features[t.heading][t.column]&&"yes"!==e.planLists[1].features[t.heading][t.column]&&"no"!==e.planLists[1].features[t.heading][t.column])}}function pq(t,e){1&t&&o._UZ(0,"div",76)}function hq(t,e){if(1&t&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(5);o.xp6(1),o.hij(" ",e.planLists[2].features[t.heading][t.column]," ")}}function gq(t,e){if(1&t&&(o.TgZ(0,"div"),o._uU(1),o.ALo(2,"number"),o.qZA()),2&t){const t=o.oxw(7);o.xp6(1),o.AsE(" ",t.scopeCurrencySign,"",o.xi3(2,2,t.planInfo[2].monthlyPrice,"1.0-2")," ")}}function fq(t,e){if(1&t&&(o.TgZ(0,"td",74),o.YNc(1,pq,1,0,"div",75),o.YNc(2,hq,2,1,"div",1),o.YNc(3,gq,3,5,"div",1),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",e.planLists[2].features&&e.planLists[2].features[t.heading]&&e.planLists[2].features[t.heading][t.column]&&"yes"===e.planLists[2].features[t.heading][t.column]),o.xp6(1),o.Q6J("ngIf","yes"!==e.planLists[2].features[t.heading][t.column]&&"no"!==e.planLists[2].features[t.heading][t.column]&&"Price_Per_Active_User"!==t.column),o.xp6(1),o.Q6J("ngIf",!(e.planLists[2].features&&e.planLists[2].features[t.heading]&&"yes"===e.planLists[2].features[t.heading][t.column]||"Price_Per_Active_User"!==t.column))}}function mq(t,e){1&t&&o._UZ(0,"div",76)}function vq(t,e){if(1&t&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(5);o.xp6(1),o.hij(" ",e.planLists[3].features[t.heading][t.column]," ")}}function bq(t,e){if(1&t&&(o.TgZ(0,"td",74),o.YNc(1,mq,1,0,"div",75),o.YNc(2,vq,2,1,"div",1),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",e.planLists[3].features&&e.planLists[3].features[t.heading]&&e.planLists[3].features[t.heading][t.column]&&"yes"===e.planLists[3].features[t.heading][t.column]),o.xp6(1),o.Q6J("ngIf","yes"!==e.planLists[3].features[t.heading][t.column]&&"no"!==e.planLists[3].features[t.heading][t.column])}}
1function xq(t,e){if(1&t&&(o.TgZ(0,"tr",65),o.YNc(1,tq,2,1,"th",1),o.YNc(2,eq,2,0,"th",1),o.YNc(3,nq,2,0,"th",1),o.YNc(4,iq,2,0,"th",1),o.YNc(5,oq,2,0,"th",1),o.YNc(6,rq,2,1,"td",1),o.YNc(7,cq,3,2,"td",73),o.YNc(8,uq,3,2,"td",73),o.YNc(9,fq,4,3,"td",73),o.YNc(10,bq,3,2,"td",73),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.Q6J("ngIf",t.title),o.xp6(1),o.Q6J("ngIf",t.title),o.xp6(1),o.Q6J("ngIf",t.title),o.xp6(1),o.Q6J("ngIf",t.title),o.xp6(1),o.Q6J("ngIf",t.title),o.xp6(1),o.Q6J("ngIf",t.column),o.xp6(1),o.Q6J("ngIf",t.column),o.xp6(1),o.Q6J("ngIf",t.column),o.xp6(1),o.Q6J("ngIf",t.column),o.xp6(1),o.Q6J("ngIf",t.column)}}function _q(t,e){1&t&&(o.ynx(0),o.TgZ(1,"div",79),o.TgZ(2,"p"),o._uU(3," Not able to find which plan is best for you? "),o.qZA(),o.TgZ(4,"a",80),o._uU(5," Help me pick a plan "),o.qZA(),o.qZA(),o.BQk())}function Cq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",83),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(5).tryPlan(e)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(7);o.xp6(1),o.hij(" ",t.translation.TRY_PLAN," ")}}function wq(t,e){if(1&t&&(o.TgZ(0,"div",46),o.TgZ(1,"div",81),o.YNc(2,Cq,2,1,"a",82),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(2),o.Q6J("ngIf",t.sortorder<=e.currentUser.plan_details[0].sortorder&&"yearly"!==e.currentUser.planPeriod&&"Enterprise"!==t.planName&&"yearly"===e.planLists.planPeriodButton||t.sortorder<e.currentUser.plan_details[0].sortorder&&"Enterprise"!=t.planName)}}function yq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",86),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(5).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(8);o.xp6(1),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function Aq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",87),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(5).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(8);o.xp6(1),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function Zq(t,e){if(1&t&&(o.TgZ(0,"div",46),o.YNc(1,yq,2,1,"a",84),o.YNc(2,Aq,2,1,"a",85),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName&&"Professional"!==t.planName),o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName&&"Professional"===t.planName)}}function kq(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Zq,3,2,"div",45),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",("canceled"===e.currentUser.isSubscriptionTrial||"yes"===e.currentUser.isSubscriptionTrial)&&"Free Plan"===e.currentUser.plan_details[0].planName&&"Free Plan"!==t.planName)}}function Tq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",87),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(5).upgradePlan(n,i)}),o._uU(1," Upgrade Plan "),o.qZA()}}function Oq(t,e){if(1&t&&(o.TgZ(0,"div",46),o.YNc(1,Tq,2,0,"a",85),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName)}}function Mq(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Oq,2,1,"div",45),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",("canceled"===e.currentUser.isSubscriptionTrial||"yes"===e.currentUser.isSubscriptionTrial)&&"trialWithoutCC"===e.currentUser.payment_status&&"Free Plan"!==t.planName&&!e.isTrialExpired())}}function Iq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",86),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3),n=e.$implicit,i=e.index;return o.oxw(5).upgradePlan(n,i)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(8);o.xp6(1),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function Sq(t,e){if(1&t&&(o.TgZ(0,"div",46),o.YNc(1,Iq,2,1,"a",84),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName)}}function Pq(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Sq,2,1,"div",45),o.BQk()),2&t){const t=o.oxw(6);o.xp6(1),o.Q6J("ngIf","Free Plan"!==t.currentUser.plan_details[0].planName||t.isTrialExpired())}}function Nq(t,e){if(1&t&&o._UZ(0,"a",90),2&t){const t=o.oxw(7);o.Q6J("innerHTML",t.translation.CONTACT_US,o.oJD)}}function qq(t,e){if(1&t&&(o.TgZ(0,"div",88),o.YNc(1,Nq,1,1,"a",89),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngIf",!t.customerId&&"Enterprise"===t.planName)}}
1function Uq(t,e){if(1&t&&(o.TgZ(0,"span",52),o.O4$(),o.TgZ(1,"svg",53),o._UZ(2,"path",54),o._UZ(3,"path",55),o.qZA(),o._uU(4),o.qZA()),2&t){const t=o.oxw(7);o.xp6(4),o.hij(" ",t.ongoingStatus," ")}}function Eq(t,e){if(1&t&&(o.TgZ(0,"p"),o._uU(1),o.ALo(2,"date"),o.qZA()),2&t){const t=o.oxw(7);o.xp6(1),o.hij(" till ",o.xi3(2,1,t.subscriptionDueDate,"dd MMM yyyy")," ")}}function Fq(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Uq,5,1,"span",91),o.YNc(2,Eq,3,4,"p",1),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf","Enterprise"===t.planName),o.xp6(1),o.Q6J("ngIf",e.subscriptionDueDate&&"Enterprise"==t.planName)}}function Dq(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",93),o.TgZ(1,"a",86),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2),n=e.$implicit,i=e.index;return o.oxw(5).upgradePlan(n,i)}),o._uU(2),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(7);o.xp6(2),o.hij(" ",t.translation.UPGRADE_PLAN," ")}}function Lq(t,e){if(1&t&&(o.TgZ(0,"span",52),o.O4$(),o.TgZ(1,"svg",53),o._UZ(2,"path",54),o._UZ(3,"path",55),o.qZA(),o._uU(4),o.qZA()),2&t){const t=o.oxw(7);o.xp6(4),o.hij(" ",t.ongoingStatus," ")}}function Jq(t,e){if(1&t&&(o.TgZ(0,"p"),o._uU(1),o.ALo(2,"date"),o.qZA()),2&t){const t=o.oxw(7);o.xp6(1),o.hij(" till ",o.xi3(2,1,t.subscriptionDueDate,"dd MMM yyyy")," ")}}function jq(t,e){if(1&t&&(o.ynx(0),o.YNc(1,Dq,3,1,"div",92),o.YNc(2,Lq,5,1,"span",91),o.YNc(3,Jq,3,4,"p",1),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngIf",!("canceled"!==e.currentUser.isSubscriptionTrial&&"yes"!==e.currentUser.isSubscriptionTrial||"trialWithoutCC"!==e.currentUser.payment_status&&"trial"!==e.currentUser.payment_status||"Free Plan"===t.planName)),o.xp6(1),o.Q6J("ngIf","Enterprise"!==t.planName),o.xp6(1),o.Q6J("ngIf",e.subscriptionDueDate&&"Enterprise"!==t.planName)}}function Rq(t,e){if(1&t&&(o.TgZ(0,"th",77),o.YNc(1,_q,6,0,"ng-container",1),o.YNc(2,wq,3,1,"div",45),o.YNc(3,kq,2,1,"ng-container",1),o.YNc(4,Mq,2,1,"ng-container",1),o.YNc(5,Pq,2,1,"ng-container",1),o.ynx(6),o.YNc(7,qq,2,1,"div",78),o.BQk(),o.YNc(8,Fq,3,2,"ng-container",1),o.YNc(9,jq,4,3,"ng-container",1),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(5);o.xp6(1),o.Q6J("ngIf",0==n),o.xp6(1),o.Q6J("ngIf",!i.currentUser.isSubscriptionTrial&&"Free Plan"===i.currentUser.plan_details[0].planName&&"Enterprise"!==t.planName&&i.currentUser.plan_details[0].planName!==t.planName),o.xp6(1),o.Q6J("ngIf",t.sortorder<i.currentUser.plan_details[0].sortorder),o.xp6(1),o.Q6J("ngIf",t.sortorder===i.currentUser.plan_details[0].sortorder),o.xp6(1),o.Q6J("ngIf",0!==n&&"canceled"!==i.currentUser.payment_status&&(t.sortorder<i.currentUser.plan_details[0].sortorder||i.isTrialExpired())),o.xp6(2),o.Q6J("ngIf",!t.customerId&&"Enterprise"===t.planName),o.xp6(1),o.Q6J("ngIf",t.planName===i.currentUser.plan_details[0].planName),o.xp6(1),o.Q6J("ngIf",t.planName===i.currentUser.plan_details[0].planName&&t.sortorder===i.currentUser.plan_details[0].sortorder)}}function $q(t,e){if(1&t&&(o.TgZ(0,"div",59),o.TgZ(1,"div",60),o.TgZ(2,"div",61),o.TgZ(3,"table",62),o.TgZ(4,"thead"),o.TgZ(5,"tr"),o.YNc(6,QN,1,1,"th",63),o.qZA(),o.qZA(),o.TgZ(7,"tbody"),o.TgZ(8,"tr"),o.YNc(9,YN,1,2,"td",64),o.qZA(),o.TgZ(10,"tr",65),o.YNc(11,zN,1,2,"th",64),o.qZA(),o.TgZ(12,"tr"),o.YNc(13,VN,1,2,"td",64),o.qZA(),o.TgZ(14,"tr"),o.YNc(15,GN,1,2,"td",64),o.qZA(),o.TgZ(16,"tr"),o.YNc(17,WN,2,2,"td",66),o.qZA(),o.TgZ(18,"tr"),o.YNc(19,KN,1,2,"td",64),o.qZA(),o.TgZ(20,"tr"),o.YNc(21,XN,2,2,"td",66),o.qZA(),o.YNc(22,xq,11,10,"tr",67),o.TgZ(23,"tr",68),o.YNc(24,Rq,10,8,"th",69),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(6),o.Q6J("ngForOf",t.tabularData),o.xp6(3),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(2),o.Q6J("ngForOf",t.tabularData),o.xp6(1),o.Q6J("ngForOf",t.allFields),o.xp6(2),o.Q6J("ngForOf",t.tabularData)}}function Bq(t,e){if(1&t&&(o.TgZ(0,"div",6),o.TgZ(1,"div",7),o.TgZ(2,"div",8),o.TgZ(3,"div",9),o.TgZ(4,"div",10),o.TgZ(5,"h3"),o._uU(6,"Choose the plan that's right for you"),o.qZA(),o.TgZ(7,"ul",11),o.TgZ(8,"li"),o._uU(9,"All Plans include:"),o.qZA(),o.TgZ(10,"li"),o._uU(11,"Data Security"),o.qZA(),o.TgZ(12,"li"),o._uU(13,"Email & Live Support"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"div",12),o.TgZ(15,"div",13),o.YNc(16,HN,20,21,"div",14),o.qZA(),o.qZA(),o.TgZ(17,"div",8),o.YNc(18,$q,25,10,"div",15),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(14),o.Udp("display","block"),o.xp6(2),o.Q6J("ngForOf",t.UIPlanList),o.xp6(2),o.Q6J("ngIf",t.UIPlanList.length>0)}}
1function Hq(t,e){if(1&t&&(o.TgZ(0,"section",4),o.YNc(1,Bq,19,4,"div",5),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",!t.testloader)}}const Qq=function(){return{WidthContainer:!1}};function Yq(t,e){if(1&t&&(o.TgZ(0,"main",2),o.YNc(1,Hq,2,1,"section",3),o.qZA()),2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.Q6J("ngClass",o.DdM(4,Qq)),o.xp6(1),o.Q6J("ngIf",t.translation)}}function zq(t,e){1&t&&o._UZ(0,"app-loader")}let Vq=(()=>{class t{constructor(t,e,n,i,o,r,s,a,c,l){this.translatorService=t,this.customerService=e,this.planService=n,this.logService=i,this.dataService=o,this.commonService=r,this.router=s,this.modalService=a,this.planChangeService=c,this.cookieService=l,this.tabularData=[],this.isMenuBarActive=!0,this.UIPlanList=[],this.appyConfig=go.N,this.useStripeBilling=!1,this.euroCountries=["AT","BE","HR","CY","EE","FI","FR","DE","GR","IE","IT","LV","LT","LU","MT","NL","PT","SK","SI","ES","AD","XK","MC","ME","SM","VA"],this.subscriptionPaymentLog=[],this.planChangeModalRef=null,this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.currentUser=this.customerService.GetCurrent(),this.customerInfo=this.currentUser}ngOnInit(){this.testloader=!0,this.plansAction(),this.handleUpgradePlanForShopify(),this.fetchSubscriptionPaymentLog(),this.checkOngoingStatus()}handleUpgradePlanForShopify(){if("jnpl1uik645c878la4sp"===localStorage.getItem("Upgrade")){const t={_id:"5e1856df014659974a8e4b56",planId:"4xm1qx0lhbw0vk",identifire:"business2",featureInclude:"Everything in Professional Plan +",planName:"Business"};localStorage.removeItem("Upgrade"),this.upgradePlan(t,3)}}fetchSubscriptionPaymentLog(){this.planService.getPaymentLog({customerId:this.currentUser.customerId,paymentType:"Subscription"}).subscribe(t=>{this.subscriptionPaymentLog=t,this.handleSubscriptionPaymentLog()})}handleSubscriptionPaymentLog(){var t,e;if(this.subscriptionPaymentLog&&this.subscriptionPaymentLog.length>0&&"Cancelled"!==this.subscriptionPaymentLog[0].status){const t=this.subscriptionPaymentLog[0].status||!1,e=new Date(this.subscriptionPaymentLog[0]._created_at);this.subscriptionDueDate="yearly"===this.subscriptionPaymentLog[0].planPeriod?"trialing"===t?new Date(e.setDate(e.getDate()+7)):new Date(e.setFullYear(e.getFullYear()+1)):"trialing"===t?new Date(e.setDate(e.getDate()+7)):new Date(e.setMonth(e.getMonth()+1))}else(!this.subscriptionPaymentLog||0===(null===(t=this.subscriptionPaymentLog)||void 0===t?void 0:t.length))&&"complete"===(null===(e=this.currentUser.payment_status)||void 0===e?void 0:e.toLowerCase())&&(this.subscriptionDueDate=this.currentUser.nextBillingDate)}checkOngoingStatus(){const t=Date.now()/1e3,e=this.currentUser.isSubscriptionTrial&&"Free Plan"!==this.currentUser.plan_details[0].planName&&t<this.currentUser.trialEnd;this.ongoingStatus="converted"===this.currentUser.isSubscriptionTrial?"Current Plan":"trialWithoutCC"!==this.currentUser.payment_status&&"trial"!==this.currentUser.payment_status||this.isTrialExpired()?"trialWithoutCC"!==this.currentUser.payment_status&&"trial"!==this.currentUser.payment_status||!this.isTrialExpired()?e?"Current Trial":"Current Plan":"":"Current Trial"}isTrialExpired(){var t;if(!(null===(t=this.currentUser)||void 0===t?void 0:t.nextBillingDate))return!1;const e=new Date;return e.setHours(0,0,0,0),new Date(this.currentUser.nextBillingDate)<e}fetchCountryCode(){return(0,Jo.mG)(this,void 0,void 0,function*(){return{countryCode:this.currentUser&&this.currentUser.plan_country?this.currentUser.plan_country:"US",ipAddress:"",status:1}})}plansAction(){this.planInfo=[],this.allFields=[];let t={status:1};this.fetchCountryCode().then(e=>{e.countryCode&&1===e.status?(t.country=e.countryCode,t.clientIp=e.ipAddress,t.plan_country=this.euroCountries.includes(e.countryCode)?"EU":e.countryCode):t.plan_country="US",this.planService.getPlansList(t).subscribe(t=>{this.useStripeBilling=!0===t.useStripeBilling;const e=t.planLists;this.scopeCurrencySign=e[1].currencySign,("BR"===e[1].countryCode||"CO"===e[1].countryCode||"MX"===e[1].countryCode||"AR"===e[1].countryCode)&&(this.currentUser.isSubscriptionTrial="canceled");let n=[];const i=(t,e,i)=>{var o,r,s;const a=t.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId,c=a?(null===(o=t.custom_plans[this.currentUser.custom_planId])||void 0===o?void 0:o.tasks)/1e3:"",l=a?t.custom_plans[this.currentUser.custom_planId]:"enterprise"===t.identifire?{}:t.custom_plans[e],d=(null==l?void 0:l.tasks)||t.tasks;let u="";u=a?`per month, billed annually or ${t.currencySign} ${l.month_price} month-to-month`:"enterprise"===t.identifire?`per month, billed annually or ${t.currencySign} ${t.monthlyPrice} month-to-month`:`per month, billed annually or ${t.currencySign} ${null===(r=t.custom_plans[e])||void 0===r?void 0:r.month_price} month-to-month`,this.planInfo[i]={plan_id:a?this.currentUser.custom_planId:"enterprise"===t.identifire?"":null===(s=t.custom_plans[e])||void 0===s?void 0:s.plan_id,annualPrice:(null==l?void 0:l.year_price)||t.annualPrice,monthlyPrice:(null==l?void 0:l.month_price)||t.monthlyPrice,selected_tasks:`${d} Tasks /mo`,billingTitle:u,upgradebtn:"no",tasks:d,planKName:c?`${c}K`:"",current_tasks:d},n[i]=t};e.forEach(t=>{if(t.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId){const e=t.custom_plans||{},n={};let i=!1;Object.keys(e).length>0&&(Object.keys(e).forEach(t=>{t===this.currentUser.custom_planId&&!1===i&&(i=!0),i&&(n[t]=e[t])}),t.custom_plans=n)}switch(t.planName){case"Free Plan":this.planInfo[0]={annualPrice:t.annualPrice,monthlyPrice:t.monthlyPrice,selected_tasks:`${t.tasks} Tasks /mo`,billingTitle:"Free forever",upgradebtn:"no",tasks:t.tasks,planKName:"",current_tasks:0},n[0]=t;break;case"Standard":i(t,"cusST001",1);break;case"Professional":i(t,"cusPR001",2);break;case"Business":i(t,"cusBS001",3);break;case"Enterprise":if(Object.keys(t.features).length>0)for(const e in t.features){this.allFields.push({title:e,value:e.replace(/_/g," ")});const n=t.features[e]||{};if(Object.keys(n).length>0)for(const t in n)this.allFields.push({column:t,heading:e,value:t.replace(/_/g," ")})}i(t,"cusEP001",4)}}),this.planLists=n.filter(t=>"jc0fgwefcky2"!==t.planId),this.planInfo.splice(0,1),this.UIPlanList=[...this.planLists],this.planLists.planPeriodButton="yearly",this.tabularData=[],this.tabularData.push({monthlyPrice:"Price/month (Billed Monthly)",annualPrice:"Price/month (Billed Annually)",connects:"Connects",automation_aeh:"Automation Volume",runInterval:"Run Time Interval (minutes)",tasks:"Tasks Per Month",extraTaskPrice:"Extra Task Price per Task",mindbodyFreeAPICalls:"Mindbody Tasks",mindbodyOverageCost:"Pricing for each Mindbody API",apps_aeh:"Apps Available",generic:"Standard Apps",premium:"Premium Apps",business:"Business Apps",enterprise:"Enterprise Apps",multiUserFunctionality_aeh:"Multi User Functionality",multiUserAccount:"Multi User Account",systemsupport_aeh:"Support System",emailsupp
1ort:"Email Support",livesupport:"Live Support",premiumsupport:"Premium Support",phonesupport:"VIP Phone Support",dedicated:"Dedicated Account Manager",security_aeh:"Data Security",sock:"SOC2 Complaint",hippa:"Regulatory Complaint<br/>(HIPPA/HITECH-eligible)",dpr:"GDPR Complaint",pcid:"PCI DSS Complaint",dpo:"Data Protection Officer",sso:"Active Directory or Single Sign On<br/>(SSO)",planId:null,planName:"Features You can use"}),e.forEach(t=>{var e;let n=!1,i=!1,o=!1,r=!1,s=!1,a=!1,c=!1,l="Data Protection Officer",d="Regulatory Complaint<br/>(HIPPA/HITECH-eligible)",u="Active Directory or Single Sign On<br/>(SSO)",p=t.currencySign+t.monthlyPrice;null===(e=null==t?void 0:t.apps)||void 0===e||e.forEach(t=>{"Generic"===t&&(n=!0),["Premium","Business","Enterprise"].includes(t)&&(i=!0,u=!0),["Business","Enterprise"].includes(t)&&(s=!0,c=!0),"Enterprise"===t&&(a=!0,l=!0,d=!0,p="Usage-based")}),"Premium"===t.supportType?o=!0:"VIP"===t.supportType&&(r=!0),["Enterprise","Business"].includes(t.planName)&&(o="PRIORITY");const h={"Free Plan":1,Standard:2,Professional:3,Business:4,Enterprise:5}[t.planName]||null;h&&(this.tabularData[h]={plan:"plan",currency:t.currencySign,currencyCode:t.currencyCode,countryCode:t.countryCode,currencySign:t.currencySign,paymentType:t.paymentType||"Subscription",monthlyPrice:t.monthlyPrice,annualPrice:t.annualPrice,connects:t.connects,automation_aeh:null,runInterval:t.runInterval,tasks:t.tasks,mindbodyFreeAPICalls:t.mindbodyFreeAPICalls,extraTaskPrice:t.extraTaskPrice,mindbodyOverageCost:t.mindbodyOverageCost,apps_aeh:null,generic:n,premium:i,business:s,enterprise:a,multiUserFunctionality_aeh:null,multiUserAccount:t.multiUserFunctionality,systemsupport_aeh:null,emailsupport:!0,livesupport:t.emailAndLiveSupport,premiumsupport:o,phonesupport:r,dedicated:t.dedicatedAccountManager,security_aeh:null,sock:!0,hippa:d,dpr:!0,pcid:c,dpo:l,sso:u,planId:t.planId,planName:t.planName,sortorder:t.sortorder,customerId:t.customerId||""})}),this.tabularData.splice(1,1),this.testloader=!1})}).catch(t=>console.error("Error in plansAction:",t))}tryPlan(t){this.confirmPlanChange(t,()=>this._executeTryPlan(t))}getPlanChangeDecision(t){return this.planChangeService.getDecision(this.currentUser,t,this.planLists&&"monthly"===this.planLists.planPeriodButton?"monthly":"yearly")}confirmPlanChange(t,e){const n=this.getPlanChangeDecision(t);if(!n)return void e();if("same"===n.kind)return;const i=this.modalService.show(wN,{initialState:{modelTitle:n.title,modelContent:n.message,primaryLabel:n.primaryLabel,secondaryLabel:n.secondaryLabel,variant:n.kind},class:"plan-change-modal modal-dialog-centered"});this.planChangeModalRef=i,i.content.onPrimary.subscribe(()=>{"block"===n.kind?this.openContactPage():e()}),i.content.onSecondary.subscribe(()=>{this.router.navigateByUrl("/plans")})}_executeTryPlan(t){const{planId:e,currencyCode:n,countryCode:i,paymentType:o}=t;if(this.useStripeBilling)return void this.startStripeCheckout(e,n);Object.assign(this.customerInfo,{trial_plan_id:e,currencyCode:n,countryCode:i});const r=JSON.stringify({planId:e,currencyCode:n,countryCode:i,paymentType:o}),s=btoa(encodeURIComponent(r));this.cookieService.set("custPlan",s,1,"/");const a=localStorage.getItem("mode");"jnpl1uik645c878la4sp"===a?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=a,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):(this.customerInfo.cancelUrl=`${this.appyConfig.baseUrl}/plans`,this.planService.tryCommonPayment(this.customerInfo).subscribe(t=>{var e,n;(null===(n=null===(e=this.currentUser)||void 0===e?void 0:e.email)||void 0===n?void 0:n.includes("yopmail"))&&this.customerService.resetTrailMailTrack().subscribe(),t&&t.confirmation_url?window.location.href=t.confirmation_url:this.createAndSubmitForm(t.message)}))}openContactPage(){window.open("https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","_blank")}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}upgradePlan(t,e){this.confirmPlanChange(t,()=>this._executeUpgradePlan(t,e))}_executeUpgradePlan(t,e){const{planId:n,currencyCode:i,countryCode:o,paymentType:r}=t;if(this.useStripeBilling)return void this.startStripeCheckout(n,i);Object.assign(this.customerInfo,{upgrade_plan_id:n,currencyCode:i,countryCode:o}),localStorage.setItem("planId",n);const s=JSON.stringify({planId:n,currencyCode:i,countryCode:o,paymentType:r}),a=btoa(encodeURIComponent(s));this.cookieService.set("custPlan",a,1,"/");const c=localStorage.getItem("mode");"jnpl1uik645c878la4sp"===c?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=c,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{t&&t.confirmation_url?window.location.href=t.confirmation_url:this.createAndSubmitForm(t.message)})}startStripeCheckout(t,e){this.planService.createStripeCheckoutSession({planId:t,planPeriod:this.planLists&&"monthly"===this.planLists.planPeriodButton?"monthly":"yearly",currency:e}).subscribe(t=>{t&&t.success&&t.url?(t.notice&&alert(t.notice),window.location.href=t.url):(this.stopPlanChangeSpinner(),console.error("Stripe checkout could not be started:",t&&t.msg),alert(t&&t.msg||"Could not start checkout. Please try again."))},t=>{this.stopPlanChangeSpinner(),console.error("Stripe checkout request failed:",t),alert("Could not start checkout. Please try again.")})}stopPlanChangeSpinner(){this.planChangeModalRef&&this.planChangeModalRef.content&&(this.planChangeModalRef.content.loading=!1)}createAndSubmitForm(t){const e=document.createElement("form");e.name="checkout",e.id="checkout",e.method="POST",e.action=`${this.appyConfig.commonPaymentUrl}/index/pay`;const n=document.createElement("input");n.type="hidden",n.name="request",n.value=t,e.appendChild(n),document.body.appendChild(e),e.submit()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(yo),o.Y36(Zr),o.Y36(yN),o.Y36(DA),o.Y36(wo.v),o.Y36(ui.F0),o.Y36(mo.tT),o.Y36(AN),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-connect-plans"]],decls:2,vars:2,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],[4,"ngIf"],["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],["class","dashboard-middle clearfix pt-0 px-lg-4","id","Planpage",4,"ngIf"],["id","Planpage",1,"dashboard-middle","clearfix","pt-0","px-lg-4"],["class","block content pricing-plan  bg-white pt-4 rounded-4 planwithk",4,"ngIf"],[1,"block","content","pricing-plan","bg-white","pt-4","rounded-4","planwithk"],[1,"container"],[1,"row"],[1,"col-sm-12"],[1,"text-center","pricing-plan","mb-4","mb-md-5"],[1,"d-flex","justify-content-center","align-items-center","flex-wrap","gap-3","allplans-list"],["id","YearlyContent"],[1,"row","gy-4"],["class","col-md-6 col-lg-3",4,"ngFor","ngForOf"],["class","col-md-12 col-lg-12 col-xl-12",4,"ngIf"],[1,"col-md-6","col-lg-3"],[1,"card","card-plans","rounded-4","border-2","h-100",3,"ngClass"],["class","plans-hero enterprise-hero text-center text-black mb-0 fw-normal",4,"ngIf"],["class","plans-hero text-center text-white mb-0 fw-normal",4,"ngIf"],[1,"bg-white","border-0","card-header","rounded-4","rounded-bottom-0","text-center"],[1,"fs-5"],[1,"small","mb-0"],["class","my-2 fw-semibold",4,"ngIf"],[1,"card-body",3,"ngClass"],["class","d-flex flex-column gap-2 text-center justify-content-center align-items-center mt-3",4,"ngIf"],[1,"plans-hero","enterprise-hero","text-center","text-black","mb-0","fw-normal"],[1,"plans-hero","text-center","text-white","mb-0","fw-normal"],[1,"my-2","fw-semibold"],[1,"svgicon"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M11.25 1.5H6.75C6.33579 1.5 6 1.83579 6 2.25V3.75C6 4.16421 6.33579 4.5 6.75 4.5H11.25C11.6642 4.5 12 4.16421 12 3.75V2.25C12 1.83579 11.6642 1.5 11.25 1.5Z","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12 3H13.5C13.8978 3 14.2794 3.15803 14.5607 3.43934C14.842 3.72064 15 4.10217 15 4.5V15C15 15.3978 14.842 15.7794 14.5607 16.0607C14.2794 16.342 13.8978 16.5 13.5 16.5H4.5C4.10218 16.5 3.72064 16.342 3.43934 16.0607C3.15804 15.7794 3 15.3978 3 15V4.5C3 4.10217 3.15804 3.72064 3.43934 3.43934C3.72064 3.15803 4.10218 3 4.5 3H6","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 8.25H12","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 12H12","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6 8.25H6.01","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6 12H6.01","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6.75 12.75H5.25C4.25544 12.75 3.30161 12.3549 2.59835 11.6516C1.89509 10.9484 1.5 9.99456 1.5 9C1.5 8.00544 1.89509 7.05161 2.59835 6.34835C3.3
10161 5.64509 4.25544 5.25 5.25 5.25H6.75","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M11.25 5.25H12.75C13.7446 5.25 14.6984 5.64509 15.4017 6.34835C16.1049 7.05161 16.5 8.00544 16.5 9C16.5 9.99456 16.1049 10.9484 15.4017 11.6516C14.6984 12.3549 13.7446 12.75 12.75 12.75H11.25","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6 9H12","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M7.5 1.5H10.5","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 10.5L11.25 8.25","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 16.5C12.3137 16.5 15 13.8137 15 10.5C15 7.18629 12.3137 4.5 9 4.5C5.68629 4.5 3 7.18629 3 10.5C3 13.8137 5.68629 16.5 9 16.5Z","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","btn upgrd-contact rounded-pill w-100 mt-1 text-uppercase btn-buyit","style","border: 0 !important;",3,"click",4,"ngIf"],[1,"btn","upgrd-contact","rounded-pill","w-100","mt-1","text-uppercase","btn-buyit",2,"border","0 !important",3,"click"],["class","pricingtop-detail",4,"ngIf"],[1,"pricingtop-detail"],["class","btn btn-outline-primary rounded-pill w-100 mt-3 text-uppercase btn-try",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary","rounded-pill","w-100","mt-3","text-uppercase","btn-try",3,"click"],[1,"upgrd-btn","btn","upgrdplanbtn",3,"innerHTML","click"],[1,"btn","btn-outline-primary","rounded-pill","w-100","text-uppercase","btn-try","mt-auto","mb-0",3,"click"],[1,"d-flex","flex-column","gap-2","text-center","justify-content-center","align-items-center","mt-3"],[1,"ongoing-plan"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 18 18","fill","none"],["d","M8.99999 16.1379C12.9422 16.1379 16.1379 12.9422 16.1379 8.99999C16.1379 5.05782 12.9422 1.86206 8.99999 1.86206C5.05782 1.86206 1.86206 5.05782 1.86206 8.99999C1.86206 12.9422 5.05782 16.1379 8.99999 16.1379Z","fill","#52AA6E"],["d","M5.58621 9.31033L7.86207 11.7931L12.4138 6.82758","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","d-block text-center","style","font-size:14px; line-height:1.4; color:#8a8f99;",4,"ngIf"],[1,"d-block","text-center",2,"font-size","14px","line-height","1.4","color","#8a8f99"],[2,"color","#374151","font-weight","500"],[1,"col-md-12","col-lg-12","col-xl-12"],[1,"tableWrapper"],[1,"chtm-tbl","table-responsive","mt-35","mb-40","tableCustomplans_"],[1,"table"],["scope","col","class","text-center",3,"innerHTML",4,"ngFor","ngForOf"],[3,"ngClass","innerHTML",4,"ngFor","ngForOf"],[1,"thempty"],[3,"ngClass",4,"ngFor","ngForOf"],["class","thempty",4,"ngFor","ngForOf"],[1,"planemptybtns"],["class","text-center text-uppercase",4,"ngFor","ngForOf"],["scope","col",1,"text-center",3,"innerHTML"],[3,"ngClass","innerHTML"],[3,"ngClass"],["class","text-center",4,"ngIf"],[1,"text-center"],["class","checkmarknew",4,"ngIf"],[1,"checkmarknew"],[1,"text-center","text-uppercase"],["class","btn-view enterpricew",4,"ngIf"],[1,"planstxt"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank"],[1,"pricingbottom-detail"],["class","myplansbtn upgrd-contact btn trialWithoutCCButton",3,"click",4,"ngIf"],[1,"myplansbtn","upgrd-contact","btn","trialWithoutCCButton",3,"click"],["class","upgrd-contact btn",3,"click",4,"ngIf"],["class","upgrd-contact btn trialWithoutCCButton",3,"click",4,"ngIf"],[1,"upgrd-contact","btn",3,"click"],[1,"upgrd-contact","btn","trialWithoutCCButton",3,"click"],[1,"btn-view","enterpricew"],["class","typeform-share button upgrd-contact btn","href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank",3,"innerHTML",4,"ngIf"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank",1,"typeform-share","button","upgrd-contact","btn",3,"innerHTML"],["class","ongoing-plan",4,"ngIf"],["class","pricingtop-detail mb-2",4,"ngIf"],[1,"pricingtop-detail","mb-2"]],template:function(t,e){1&t&&(o.YNc(0,Yq,2,5,"main",0),o.YNc(1,zq,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf",e.translation),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[to.O5,to.mk,to.sg,po],pipes:[to.JJ,to.uU],styles:['ul[_ngcontent-%COMP%], ol[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{padding-left:30px;font-size:12px;position:relative;font-weight:600;color:#1d1d1d}.card-plans[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#1d1d1d;font-size:12px;min-height:40px}.card-plans[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]:first-child{color:#6e6e6e}.card-plans[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:10px;gap:10px;font-size:12px;margin:.3rem 0;width:100%}.btn-try[_ngcontent-%COMP%]{font-size:12px;font-weight:600;padding:.65rem 1rem}.plans-info[_ngcontent-%COMP%]{color:#6d6d6d;font-size:12px}.plans-info[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:first-child{color:#1d1d1d}.plans-hero[_ngcontent-%COMP%]{background:#0d6efd;font-size:12px;border-radius:14px 14px 0 0;line-height:35px;position:absolute;top:0;left:0;width:100%}.enterprise-hero[_ngcontent-%COMP%]{background:#ffc107}.card-plans[_ngcontent-%COMP%]{padding-top:35px}.helpbtn[_ngcontent-%COMP%]{font-size:14px}.modal-dialog-centered[_ngcontent-%COMP%]{min-height:calc(100% - var(--bs-modal-margin)* 2)!important}
1.modal-dialog-scrollable[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{overflow-y:auto;height:calc(100vh - 25vh);scroll-behavior:smooth;scrollbar-width:none}@media (min-width: 992px){.modal-xxl[_ngcontent-%COMP%]{max-width:800px!important}}@media (min-width: 1200px){.modal-xxl[_ngcontent-%COMP%]{max-width:1140px!important}}@media (min-width: 1400px){.modal-xxl[_ngcontent-%COMP%]{max-width:1340px!important}}.allview-btn[_ngcontent-%COMP%]:after{border-bottom-style:solid;border-bottom-width:2px;border-right-style:solid;border-right-width:2px;content:"";display:inline-block;height:8px;right:7px;position:absolute;top:7px;width:8px;transform:rotate(45deg);border-color:#000}.allview-btn[_ngcontent-%COMP%]{position:relative;font-size:12px;text-align:center;margin:auto}.rounded-4[_ngcontent-%COMP%]{border-radius:1rem!important}.btn-outline-primary[_ngcontent-%COMP%]{border:1px solid #0d6efd;color:#0d6efd;font-weight:600}.card-plans[_ngcontent-%COMP%]   .btn-primary[_ngcontent-%COMP%]{background:#0d6efd}.card-plans[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:#000}.helpbtn[_ngcontent-%COMP%]{background:#0d6efd}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{padding-left:30px;font-size:12px;font-weight:400;position:relative;color:#1d1d1d}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:first-child{padding-left:0;color:#6e6e6e}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:first-child:before, .allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:first-child:after{display:none}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:before, .allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:after{content:""}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:before{width:20px;height:20px;display:block;background:rgba(243,248,255,1);position:absolute;left:0;top:0;border-radius:100px}.allplans-list[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:after{border-bottom-style:solid;border-bottom-width:2px;border-right-style:solid;border-right-width:2px;content:"";display:inline-block;height:10px;left:8px;position:absolute;top:4px;width:5px;border-color:#5371ff;transform:rotate(45deg)}.pricing-plan[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#1d1d1d;font-family:"Poppins",sans-serif;font-size:34px;margin-bottom:1rem;font-weight:700}.pricing-plan[_ngcontent-%COMP%]   h3.fw-semibold[_ngcontent-%COMP%]{font-size:25px}.switches-container[_ngcontent-%COMP%]{width:16rem;display:flex;padding:0;position:relative;background:rgba(243,248,255,1);line-height:2.5rem;border-radius:3rem;margin-left:auto;margin-right:auto;font-size:12px}.switches-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{visibility:hidden;position:absolute;top:0}.switches-container[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{width:50%;padding:0;margin:0;text-align:center;cursor:pointer;color:#5371ff;font-size:12px;font-weight:400}.switch-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:50%;padding:.15rem;z-index:3;transition:transform .5s cubic-bezier(.77,0,.175,1)}.switch-info[_ngcontent-%COMP%]{border-radius:3rem;background:rgba(83,113,255,1);height:100%}.switch-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;text-align:center;opacity:0;display:block;color:#f3f8ff;transition:opacity .2s cubic-bezier(.77,0,.175,1) .125s;will-change:opacity;position:absolute;top:0;left:0}.switches-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:nth-of-type(1):checked ~ .switch-wrapper[_ngcontent-%COMP%]{transform:translate(0)}.switches-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:nth-of-type(2):checked ~ .switch-wrapper[_ngcontent-%COMP%]{transform:translate(100%)}.switches-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:nth-of-type(1):checked ~ .switch-wrapper[_ngcontent-%COMP%]   .switch-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-of-type(1){opacity:1}.switches-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:nth-of-type(2):checked ~ .switch-wrapper[_ngcontent-%COMP%]   .switch-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-of-type(2){opacity:1}.ongoing-plan[_ngcontent-%COMP%]{color:#52aa6e;font-size:15px;
1display:inline-flex;align-items:center;grid-gap:6px;gap:6px;font-weight:600;white-space:nowrap;text-transform:capitalize}.btn-try[_ngcontent-%COMP%]:hover, .btn-try[_ngcontent-%COMP%]:focus{color:#fff;background-color:#5371ff}button.btn-buyit[_ngcontent-%COMP%]{border:0;background:none;color:#5371ff;font-size:12px;font-weight:600}button.btn-buyit[_ngcontent-%COMP%]:hover, button.btn-buyit[_ngcontent-%COMP%]:focus{text-decoration:underline;background:none!important;color:#1d1d1d!important}.upgrd-contact[_ngcontent-%COMP%]:hover{background-color:#0d6efd;color:#fff}.pricingtop-detail[_ngcontent-%COMP%]{margin-bottom:0}.upgrd-contact[_ngcontent-%COMP%]{color:#0d6efd;background-color:#fff;width:170px;margin:auto}.table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-bottom:0;color:#aaa;font-size:12px;font-weight:400;text-transform:lowercase}a.upgrd-btn.btn.upgrdplanbtn[_ngcontent-%COMP%]{display:none}.card.border-primary[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]{background:#5371FF;color:#fff}.card.border-primary[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]:hover, .card.border-primary[_ngcontent-%COMP%]   .btn-outline-primary[_ngcontent-%COMP%]:focus{background:#fff;color:#5371ff}.typeform-share.button.upgrd-contact.btn[_ngcontent-%COMP%]{background:#fff;color:#5371ff}.typeform-share.button.upgrd-contact.btn[_ngcontent-%COMP%]:hover, .typeform-share.button.upgrd-contact.btn[_ngcontent-%COMP%]:focus{background-color:#5371ff;color:#fff}.trialWithoutCCButton[_ngcontent-%COMP%]{background-color:#5371ff;color:#fff}.trialWithoutCCButton[_ngcontent-%COMP%]:hover, .trialWithoutCCButton[_ngcontent-%COMP%]:focus{background:#fff;color:#5371ff}@media (max-width:1399px){.pricing-plan[_ngcontent-%COMP%]   h3.fw-semibold[_ngcontent-%COMP%]{font-size:20px}}@media (max-width: 767px){.modal-title[_ngcontent-%COMP%]{font-size:1.15rem!important}.helpbtn[_ngcontent-%COMP%]{font-size:14px;width:100%}.ongoing-plan[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px}.card-plans[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{min-height:unset}.pricing-plan[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:24px!important}.upgrd-contact[_ngcontent-%COMP%]{position:inherit!important;padding:.5rem 1rem;white-space:nowrap}}.card-plans[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.standard-card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]   .pricingtop-detail[_ngcontent-%COMP%]{order:1}.tableWrapper[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   .ongoing-plan[_ngcontent-%COMP%]{margin-top:10px}']}),t})();function Gq(t,e){if(1&t&&(o.TgZ(0,"span",38),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.ekj("trial","trial"===t.acct.billing)("free","free"===t.acct.billing),o.xp6(1),o.Oqu(t.planLabel)}}function Wq(t,e){1&t&&(o.ynx(0),o.TgZ(1,"b"),o._uU(2,"Free Trial"),o.qZA(),o.BQk())}function Kq(t,e){1&t&&(o.ynx(0),o.TgZ(1,"b"),o._uU(2,"Free"),o.qZA(),o.BQk())}function Xq(t,e){1&t&&(o.ynx(0),o._uU(1,"Billed "),o.TgZ(2,"b"),o._uU(3,"annually"),o.qZA(),o.BQk())}function tU(t,e){1&t&&(o.ynx(0),o._uU(1,"Billed "),o.TgZ(2,"b"),o._uU(3,"monthly"),o.qZA(),o.BQk())}function eU(t,e){if(1&t&&(o.TgZ(0,"div",39),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.acct.resetText)}}function nU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",40),o._uU(1),o.TgZ(2,"button",41),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2);return e.stopPropagation(),n.run("billing")}),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.acct.tasks.over," "),o.xp6(1),o.Q6J("title",t.acct.tasks.overTip),o.xp6(1),o.hij("(Metered) ",t.acct.tasks.overCost,"")}}function iU(t,e){if(1&t&&(o.TgZ(0,"div",25),o._uU(1),o.ALo(2,"number"),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.acct?o.lcZ(2,1,t.acct.tasksLeft):"\u2014")}}function oU(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"(Free Trial)"),o.qZA())}function rU(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.acct.tasks.pct,"")}}function sU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",42),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2);return e.stopPropagation(),n.run("unlockTrial")}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.acct.unlockText)}}function aU(t,e){1&t&&(o.TgZ(0,"span",43),o._uU(1,"Unlimited on this plan"),o.qZA())}
1function cU(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"div",20),o._UZ(2,"i"),o.qZA(),o.TgZ(3,"div",21),o._uU(4),o.ALo(5,"number"),o.qZA(),o.BQk()),2&t){const t=o.oxw(2);o.xp6(2),o.Udp("width",t.connectsPct,"%"),o.xp6(2),o.hij("of ",o.lcZ(5,3,t.acct.connectsLimit)," included")}}function lU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",41),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3);return e.stopPropagation(),n.run("billing")}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("title",t.acct.mindbody.overTip),o.xp6(1),o.AsE("",t.acct.mindbody.over," (Metered) ",t.acct.mindbody.overCost,"")}}function dU(t,e){if(1&t&&(o.TgZ(0,"b"),o._uU(1),o.TgZ(2,"span",47),o._uU(3),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("",t.acct.mindbody.value||"\u2014"," used "),o.xp6(2),o.Oqu(t.acct.mindbody.pct)}}function uU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",24),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).go("/history")})("keydown.enter",function(){return o.CHM(t),o.oxw(2).go("/history")}),o.TgZ(1,"h3"),o._uU(2,"Mindbody API usage"),o.qZA(),o.TgZ(3,"div",44),o.TgZ(4,"span"),o._uU(5,"Mindbody tasks this month"),o.qZA(),o.YNc(6,lU,2,3,"button",45),o.YNc(7,dU,4,2,"b",22),o.qZA(),o.TgZ(8,"div",20),o._UZ(9,"i"),o.qZA(),o.TgZ(10,"div",46),o._uU(11),o.ALo(12,"number"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("ngIf",t.acct.mindbody.over),o.xp6(1),o.Q6J("ngIf",!t.acct.mindbody.over),o.xp6(1),o.ekj("over","over"===t.acct.mindbody.tone),o.xp6(1),o.Udp("width",t.clamp(t.acct.mindbody.bar),"%"),o.xp6(2),o.Oqu(t.acct.mindbody.over?"Over the included tasks, billed per task":o.lcZ(12,7,t.acct.mindbodyLeft)+" tasks left this month")}}function pU(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij(" ",t.acct.currencyCode,"")}}function hU(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.ALo(2,"number"),o.YNc(3,pU,2,1,"ng-container",22),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.AsE("",t.acct.balanceSign," ",o.xi3(2,3,t.acct.balance,"1.2-3"),""),o.xp6(2),o.Q6J("ngIf",t.acct.currencyCode)}}function gU(t,e){1&t&&o._uU(0,"Fetching\u2026")}function fU(t,e){1&t&&(o.TgZ(0,"div",48),o._uU(1,"Subscribe now to access your wallet"),o.qZA())}function mU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",53),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).run("autoRechargeEdit")}),o._uU(1,"Edit"),o.qZA()}}function vU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",49),o.TgZ(1,"span"),o._uU(2,"Auto recharge"),o.qZA(),o.TgZ(3,"span",50),o.YNc(4,mU,2,0,"button",51),o.TgZ(5,"button",52),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).run("autoRechargeToggle")}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(4),o.Q6J("ngIf",t.acct.autoRecharge),o.xp6(1),o.ekj("on",t.acct.autoRecharge),o.uIk("aria-checked",t.acct.autoRecharge)}}function bU(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"Start your plan now and keep every loop running without waiting for the trial to end."),o.qZA())}function xU(t,e){1&t&&(o.TgZ(0,"p"),o._uU(1,"Upgrade for more tasks, faster run-time intervals and more connects."),o.qZA())}function _U(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).run("unlockTrial")}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("disabled",t.acct.unlockLoading),o.xp6(1),o.Oqu(t.acct.unlockLoading?"Redirecting\u2026":"Unlock now")}}function CU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",60),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).setTab("plans")}),o._uU(1,"+ Upgrade plan"),o.qZA()}}function wU(t,e){if(1&t&&(o.TgZ(0,"div",54),o.TgZ(1,"div",17),o._uU(2),o.qZA(),o.TgZ(3,"h4"),o._uU(4),o.qZA(),o.YNc(5,bU,2,0,"p",22),o.YNc(6,xU,2,0,"p",22),o.TgZ(7,"div",55),o.YNc(8,_U,2,2,"button",56),o.YNc(9,CU,2,0,"button",57),o.TgZ(10,"span",58),o._uU(11),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(2),o.Oqu(null!=t.acct&&t.acct.unlockText?"Your free trial":"More tasks"),o.xp6(2),o.Oqu((null==t.acct?null:t.acct.unlockText)||"Need more tasks for your loops?"),o.xp6(1),o.Q6J("ngIf",null==t.acct?null:t.acct.unlockText),o.xp6(1),o.Q6J("ngIf",!(null!=t.acct&&t.acct.unlockText)),o.xp6(2),o.Q6J("ngIf",null==t.acct?null:t.acct.unlockText),o.xp6(1),o.Q6J("ngIf",!(null!=t.acct&&t.acct.unlockText)),o.xp6(2),o.Oqu(null!=t.acct&&t.acct.unlockText?"Same checkout as today":"Opens the Plans tab")}}function yU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"section",6),o.TgZ(1,"div",7),o.TgZ(2,"div",8),o.TgZ(3,"div",9),o.YNc(4,Gq,2,5,"span",10),o.TgZ(5,"span",11),o.YNc(6,Wq,3,0,"ng-container",12),o.YNc(7,Kq,3,0,"ng-container",12),o.YNc(8,Xq,4,0,"ng-container",12),o.YNc(9,tU,4,0,"ng-container",12),o.qZA(),o.qZA(),o.YNc(10,eU,2,1,"div",13),o.qZA(),o.TgZ(11,"button",14),o.NdJ("click",function(){return o.CHM(t),o.oxw().run("billing")}),o._uU(12,"Manage billing"),o.qZA(),o.qZA(),o.TgZ(13,"div",15),o.TgZ(14,"div",16),o.NdJ("click",function(){return o.CHM(t),o.oxw().go("/history")})("keydown.enter",function(){return o.CHM(t),o.oxw().go("/history")}),o.TgZ(15,"div",17),o._uU(16),o.qZA(),o.YNc(17,nU,4,3,"div",18),o.YNc(18,iU,3,3,"div",19),o.TgZ(19,"div",20),o._UZ(20,"i"),o.qZA(),o.TgZ(21,"div",21),o.TgZ(22,"b"),o._uU(23),o.ALo(24,"number"),o.ALo(25,"number"),o.qZA(),o._uU(26," used this month "),o.YNc(27,oU,2,0,"span",22),o.YNc(28,rU,2,1,"span",22),o.qZA(),o.YNc(29,sU,2,1,"button",23),o.qZA(),o.TgZ(30,"div",24),o.NdJ("click",function(){return o.CHM(t),o.oxw().go("/connects")})("keydown.enter",function(){return o.CHM(t),o.oxw().go("/connects")}),o.TgZ(31,"div",17),o._uU(32,"Connects"),o.qZA(),o.TgZ(33,"div",25),o._uU(34),o.qZA(),o.YNc(35,aU,2,0,"span",26),o.YNc(36,cU,6,5,"ng-container",22),o.qZA(),o.TgZ(37,"div",24),o.NdJ("click",function(){return o.CHM(t),o.oxw().go("/mcp")}
1)("keydown.enter",function(){return o.CHM(t),o.oxw().go("/mcp")}),o.TgZ(38,"div",17),o._uU(39,"MCP servers"),o.qZA(),o.TgZ(40,"div",25),o._uU(41),o.qZA(),o.TgZ(42,"div",20),o._UZ(43,"i"),o.qZA(),o.TgZ(44,"div",21),o._uU(45,"of 100 included"),o.qZA(),o.qZA(),o.YNc(46,uU,13,9,"div",27),o.TgZ(47,"div",28),o.TgZ(48,"h3"),o._uU(49,"Wallet"),o.qZA(),o.TgZ(50,"div",29),o.TgZ(51,"span",30),o._uU(52,"Wallet balance"),o.qZA(),o.TgZ(53,"span",31),o.YNc(54,hU,4,6,"ng-container",32),o.YNc(55,gU,1,0,"ng-template",null,33,o.W1O),o.qZA(),o.TgZ(57,"button",34),o.NdJ("click",function(){return o.CHM(t),o.oxw().run("addFund")}),o._uU(58,"Add funds"),o.qZA(),o.qZA(),o.YNc(59,fU,2,0,"div",35),o.YNc(60,vU,6,4,"div",36),o.qZA(),o.YNc(61,wU,12,7,"div",37),o.qZA(),o.qZA()}if(2&t){const t=o.MAs(56),e=o.oxw();o.xp6(4),o.Q6J("ngIf",null==e.acct?null:e.acct.planName),o.xp6(1),o.Q6J("ngSwitch",null==e.acct?null:e.acct.billing),o.xp6(1),o.Q6J("ngSwitchCase","trial"),o.xp6(1),o.Q6J("ngSwitchCase","free"),o.xp6(1),o.Q6J("ngSwitchCase","yearly"),o.xp6(1),o.Q6J("ngSwitchCase","monthly"),o.xp6(1),o.Q6J("ngIf",null==e.acct?null:e.acct.resetText),o.xp6(6),o.hij("Tasks ",null!=e.acct&&e.acct.tasks.over?"over limit":"left",""),o.xp6(1),o.Q6J("ngIf",null==e.acct?null:e.acct.tasks.over),o.xp6(1),o.Q6J("ngIf",!(null!=e.acct&&e.acct.tasks.over)),o.xp6(1),o.ekj("over","over"===(null==e.acct?null:e.acct.tasks.tone)),o.xp6(1),o.Udp("width",e.clamp(null==e.acct?null:e.acct.tasks.bar),"%"),o.xp6(3),o.Oqu(null!=e.acct&&e.acct.tasks.over?o.lcZ(24,36,e.acct.tasksUsed)+" / "+o.lcZ(25,38,e.acct.tasksTotal):(null==e.acct?null:e.acct.tasks.value)||"\u2014"),o.xp6(4),o.Q6J("ngIf",null==e.acct?null:e.acct.freeTrial),o.xp6(1),o.Q6J("ngIf",null==e.acct?null:e.acct.tasks.pct),o.xp6(1),o.Q6J("ngIf",(null==e.acct?null:e.acct.unlockText)&&e.isSubUser),o.xp6(5),o.Oqu(e.acct?e.acct.connectsUsed:"\u2014"),o.xp6(1),o.Q6J("ngIf",e.acct&&null===e.acct.connectsLimit),o.xp6(1),o.Q6J("ngIf",e.acct&&null!==e.acct.connectsLimit),o.xp6(5),o.Oqu(e.acct?e.acct.mcp.bar:"\u2014"),o.xp6(1),o.ekj("warn","warn"===(null==e.acct?null:e.acct.mcp.tone))("danger","danger"===(null==e.acct?null:e.acct.mcp.tone)),o.xp6(1),o.Udp("width",e.clamp(null==e.acct?null:e.acct.mcp.bar),"%"),o.xp6(3),o.Q6J("ngIf",null==e.acct?null:e.acct.mindbody),o.xp6(8),o.Q6J("ngIf",e.acct&&null!==e.acct.balance)("ngIfElse",t),o.xp6(3),o.Q6J("disabled",null==e.acct?null:e.acct.walletLocked)("title",null!=e.acct&&e.acct.walletLocked?"Subscribe now to access your wallet":"Click to add funds to your wallet"),o.xp6(2),o.Q6J("ngIf",null==e.acct?null:e.acct.walletLocked),o.xp6(1),o.Q6J("ngIf",(null==e.acct?null:e.acct.showAutoRecharge)&&!(null!=e.acct&&e.acct.walletLocked)),o.xp6(1),o.Q6J("ngIf",!e.isSubUser)}}function AU(t,e){1&t&&(o.TgZ(0,"section",61),o._UZ(1,"app-connect-plans"),o.qZA())}let ZU=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.customerService=n,this.shellEvents=i,this.tab="usage",this.acct=null,this.isSubUser=!1,this.subs=new pi.w}ngOnInit(){this.isSubUser=!!(this.customerService.GetCurrent()||{}).isSubUser,this.subs.add(this.route.queryParamMap.subscribe(t=>{this.tab="plans"===t.get("tab")?"plans":"usage"})),this.subs.add(this.shellEvents.account$.subscribe(t=>{this.acct=t,t&&(this.isSubUser=t.isSubUser)})),this.shellEvents.run("refreshAccount")}ngOnDestroy(){this.subs.unsubscribe()}setTab(t){this.router.navigate([],{relativeTo:this.route,queryParams:{tab:"plans"===t?"plans":null},replaceUrl:!0})}run(t){this.shellEvents.run(t)}go(t){this.router.navigateByUrl(t)}get planLabel(){const t=this.acct&&this.acct.planName||"";return/plan/i.test(t)?t:t+" Plan"}get connectsPct(){return this.acct&&this.acct.connectsLimit?this.clamp(this.acct.connectsUsed/this.acct.connectsLimit*100):0}clamp(t){return Math.max(0,Math.min(100,t||0))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.gz),o.Y36(ui.F0),o.Y36(yo),o.Y36(JA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-plans-usage"]],decls:11,vars:8,consts:[["id","main-container_",1,"main-container","ns-page"],[1,"pu-head"],["role","tablist","aria-label","Plans and usage",1,"pu-tabs"],["type","button","role","tab",1,"pu-tab",3,"click"],["class","pu-usage","role","tabpanel",4,"ngIf"],["class","pu-plans","role","tabpanel",4,"ngIf"],["role","tabpanel",1,"pu-usage"],[1,"uu-plan"],[1,"uu-plan-l"],[1,"uu-plan-top"],["class","uu-pill",3,"trial","free",4,"ngIf"],[1,"uu-period",3,"ngSwitch"],[4,"ngSwitchCase"],["class","uu-renew",4,"ngIf"],["type","button",1,"uu-btn",3,"click"],[1,"uu-grid"],["role","link","tabindex","0",1,"uu-card","hi",3,"click","keydown.enter"],[1,"uu-lab"],["class","uu-big over",4,"ngIf"],["class","uu-big",4,"ngIf"],[1,"uu-bar"],[1,"uu-sub"],[4,"ngIf"],["type","button","class","uu-unlock-link",3,"click",4,"ngIf"],["role","link","tabindex","0",1,"uu-card",3,"click","keydown.enter"],[1,"uu-big"],["class","uu-okpill",4,"ngIf"],["class","uu-card","role","link","tabindex","0",3,"click","keydown.enter",4,"ngIf"],[1,"uu-card","uu-static"],[1,"uu-wrow"],[1,"uu-wl"],[1,"uu-amt"],[4,"ngIf","ngIfElse"],["fetching",""],["type","button",1,"uu-btn","sm",3,"disabled","title","click"],["class","uu-note uu-foot",4,"ngIf"],["class","uu-ar uu-foot",4,"ngIf"],["class","uu-card uu-promo",4,"ngIf"],[1,"uu-pill"],[1,"uu-renew"],[1,"uu-big","over"],["type","button",1,"uu-metered",3,"title","click"],["type","button",1,"uu-unlock-link",3,"click"],[1,"uu-okpill"],[1,"uu-kv"],["type","button","class","uu-metered",3,"title","click",4,"ngIf"],[1,"uu-note"],[1,"uu-dim"],[1,"uu-note","uu-foot"],[1,"uu-ar","uu-foot"],[1,"uu-ar-r"],["type","button","class","uu-btn sm",3,"click",4,"ngIf"],["type","button","role","switch","aria-label","Auto re
1charge",1,"uu-toggle",3,"click"],["type","button",1,"uu-btn","sm",3,"click"],[1,"uu-card","uu-promo"],[1,"uu-promo-acts"],["type","button","class","uu-wbtn",3,"disabled","click",4,"ngIf"],["type","button","class","uu-wbtn",3,"click",4,"ngIf"],[1,"uu-hint"],["type","button",1,"uu-wbtn",3,"disabled","click"],["type","button",1,"uu-wbtn",3,"click"],["role","tabpanel",1,"pu-plans"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"h1"),o._uU(3,"Plans & usage"),o.qZA(),o.TgZ(4,"div",2),o.TgZ(5,"button",3),o.NdJ("click",function(){return e.setTab("usage")}),o._uU(6,"Usage"),o.qZA(),o.TgZ(7,"button",3),o.NdJ("click",function(){return e.setTab("plans")}),o._uU(8,"Plans"),o.qZA(),o.qZA(),o.qZA(),o.YNc(9,yU,62,40,"section",4),o.YNc(10,AU,2,0,"section",5),o.qZA()),2&t&&(o.xp6(5),o.ekj("on","usage"===e.tab),o.uIk("aria-selected","usage"===e.tab),o.xp6(2),o.ekj("on","plans"===e.tab),o.uIk("aria-selected","plans"===e.tab),o.xp6(2),o.Q6J("ngIf","usage"===e.tab),o.xp6(1),o.Q6J("ngIf","plans"===e.tab))},directives:[to.O5,to.RF,to.n9,Vq],pipes:[to.JJ],styles:['.ns-page[_ngcontent-%COMP%]{background:var(--ns-paper)!important;color:var(--ns-ink);font-family:var(--ns-sans);font-size:14px;line-height:1.45;min-height:calc(100vh - 70px)}.pu-head[_ngcontent-%COMP%]{padding:8px 28px 0}.pu-head[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-family:var(--ns-serif);font-size:30px;font-weight:600;line-height:1.15;letter-spacing:-.01em;color:var(--ns-ink);margin:0}.pu-tabs[_ngcontent-%COMP%]{display:flex;grid-gap:4px;gap:4px;margin-top:18px;border-bottom:1px solid var(--ns-line)}.pu-tab[_ngcontent-%COMP%]{margin-bottom:-1px;padding:9px 15px 10px;border:0;border-bottom:3px solid transparent;border-radius:9px 9px 0 0;background:none;color:var(--ns-muted);font-family:var(--ns-sans);font-size:15px;font-weight:500;cursor:pointer;transition:background .12s,color .12s}.pu-tab[_ngcontent-%COMP%]:hover{color:var(--ns-ink)}.pu-tab.on[_ngcontent-%COMP%]{background:var(--ns-accent-soft);color:var(--ns-accent-ink);border-bottom-color:var(--ns-accent)}.pu-tab[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ns-accent);outline-offset:2px}.pu-usage[_ngcontent-%COMP%]{min-height:240px}.pu-plans[_ngcontent-%COMP%]{padding-top:8px}[_nghost-%COMP%]{--uu-ok-soft: #e3f4ea;--uu-ok-line: #b9e2c9;--uu-orange: #f28322;--uu-orange-soft: #fff1e5;--uu-orange-line: #f3c99c;--uu-wash: #f6f6fe;--uu-hi-line: #c9c8f4;--uu-dark: #18181b}.theme-dark[_nghost-%COMP%], .theme-dark   [_nghost-%COMP%]{--uu-ok-soft: #12291d;--uu-ok-line: #1f4a33;--uu-orange: #f59e4a;--uu-orange-soft: #33220f;--uu-orange-line: #5a3a17;--uu-wash: #1b1b2a;--uu-hi-line: #3a3a6a;--uu-dark: #000}.pu-usage[_ngcontent-%COMP%]{padding:22px 28px 60px}.uu-plan[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;grid-gap:16px;gap:16px;flex-wrap:wrap;margin-bottom:16px}.uu-plan-l[_ngcontent-%COMP%]{display:grid;grid-gap:6px;gap:6px}.uu-plan-top[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;flex-wrap:wrap}.uu-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:28px;padding:0 13px;border-radius:99px;border:1px solid var(--uu-ok-line);background:var(--uu-ok-soft);color:var(--ns-ok);font-size:13.5px;font-weight:700}.uu-pill.trial[_ngcontent-%COMP%]{border-color:var(--uu-orange-line);background:var(--uu-orange-soft);color:var(--uu-orange)}.uu-pill.free[_ngcontent-%COMP%]{border-color:var(--ns-line-strong);background:var(--ns-panel-2);color:var(--ns-muted)}.uu-period[_ngcontent-%COMP%]{font-size:14.5px;color:var(--ns-muted)}.uu-period[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{color:var(--ns-ink);font-weight:600}.uu-renew[_ngcontent-%COMP%]{padding-left:2px;font:12.5px var(--ns-mono);color:var(--ns-faint)}.uu-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;grid-gap:6px;gap:6px;height:38px;padding:0 16px;border:1px solid var(--ns-line-strong);border-radius:10px;background:var(--ns-panel);color:var(--ns-ink);font-family:var(--ns-sans);font-size:13.5px;font-weight:600;white-space:nowrap;cursor:pointer}.uu-btn[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2)}.uu-btn.sm[_ngcontent-%COMP%]{height:34px;padding:0 13px;font-size:13px}.uu-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.uu-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:14px;gap:14px}.uu-card[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;grid-gap:9px;gap:9px;min-height:150px;padding:18px 20px;border:1px solid var(--ns-line);border-radius:15px;background:var(--ns-panel);color:var(--ns-ink);cursor:pointer;transition:border-color .15s,box-shadow .15s}.uu-card[_ngcontent-%COMP%]:hover{border-color:var(--ns-line-strong);box-shadow:var(--ns-shadow)}.uu-card[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ns-accent);outline-offset:2px}.uu-card.uu-static[_ngcontent-%COMP%]{cursor:default}.uu-card.uu-static[_ngcontent-%COMP%]:hover{border-color:var(--ns-line);box-shadow:none}.uu-card.hi[_ngcontent-%COMP%]{background:var(--uu-wash);border-color:var(--uu-hi-line)}.uu-card[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-family:var(--ns-sans);font-size:16.5px;font-weight:600;color:var(--ns-ink);margin:0}.uu-lab[_ngcontent-%COMP%]{font:500 12px var(--ns-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--ns-muted)}
1.uu-big[_ngcontent-%COMP%]{display:flex;align-items:baseline;grid-gap:8px;gap:8px;flex-wrap:wrap;font-size:36px;font-weight:600;line-height:1;letter-spacing:-.03em;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.uu-card.hi[_ngcontent-%COMP%]   .uu-big[_ngcontent-%COMP%]{color:var(--ns-accent-ink)}.uu-card.hi[_ngcontent-%COMP%]   .uu-big.over[_ngcontent-%COMP%]{color:var(--uu-orange)}.uu-metered[_ngcontent-%COMP%]{padding:0;border:0;background:none;color:var(--uu-orange);font-family:var(--ns-sans);font-size:14px;font-weight:600;letter-spacing:0;white-space:nowrap;cursor:pointer}.uu-metered[_ngcontent-%COMP%]:hover{text-decoration:underline}.uu-bar[_ngcontent-%COMP%]{height:6px;border-radius:99px;background:var(--ns-panel-2);overflow:hidden}.uu-bar[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{display:block;height:100%;border-radius:99px;background:var(--ns-accent);transition:width .4s ease}.uu-bar.over[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{background:var(--uu-orange)}.uu-bar.warn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{background:#f59e0b}.uu-bar.danger[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{background:#dc2626}.uu-sub[_ngcontent-%COMP%]{font-size:13.5px;color:var(--ns-muted);font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.uu-sub[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{color:var(--ns-ink);font-weight:600}.uu-unlock-link[_ngcontent-%COMP%]{align-self:flex-start;padding:0;border:0;background:none;color:var(--ns-accent-ink);font-family:var(--ns-sans);font-size:13px;font-weight:600;cursor:pointer}.uu-okpill[_ngcontent-%COMP%]{align-self:flex-start;display:inline-flex;align-items:center;height:28px;padding:0 11px;border-radius:99px;background:var(--uu-ok-soft);color:var(--ns-ok);font-size:13.5px;font-weight:600}.uu-kv[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;grid-gap:12px;gap:12px;flex-wrap:wrap;font-size:14.5px}.uu-kv[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.uu-dim[_ngcontent-%COMP%]{color:var(--ns-muted)}.uu-note[_ngcontent-%COMP%]{font-size:13.5px;color:var(--ns-faint)}.uu-wrow[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;flex-wrap:wrap}.uu-wl[_ngcontent-%COMP%]{font-size:14.5px}.uu-amt[_ngcontent-%COMP%]{margin-left:auto;font-size:15.5px;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.uu-foot[_ngcontent-%COMP%]{margin-top:auto}.uu-ar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:10px;gap:10px;padding-top:11px;border-top:1px solid var(--ns-line);font-size:13px;color:var(--ns-muted)}.uu-ar-r[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:10px;gap:10px}.uu-toggle[_ngcontent-%COMP%]{position:relative;width:38px;height:22px;flex:none;padding:0;border:0;border-radius:99px;background:var(--ns-line-strong);cursor:pointer;transition:background .15s}.uu-toggle[_ngcontent-%COMP%]:after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s}.uu-toggle.on[_ngcontent-%COMP%]{background:var(--ns-accent)}.uu-toggle.on[_ngcontent-%COMP%]:after{left:18px}.uu-promo[_ngcontent-%COMP%]{background:var(--uu-dark);border-color:var(--uu-dark);color:#fafafa;cursor:default}.uu-promo[_ngcontent-%COMP%]:hover{border-color:var(--uu-dark);box-shadow:none}.uu-promo[_ngcontent-%COMP%]   .uu-lab[_ngcontent-%COMP%]{color:#a1a1aa}.uu-promo[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-family:var(--ns-serif);font-size:19px;font-weight:600;line-height:1.25;margin:0;color:#fafafa}.uu-promo[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:13.5px;line-height:1.5;color:#d4d4d8;margin:0}.uu-promo-acts[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:12px;gap:12px;flex-wrap:wrap;margin-top:auto}.uu-wbtn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:8px;gap:8px;height:40px;padding:0 18px;border:0;border-radius:11px;background:#fff;color:#18181b;font-family:var(--ns-sans);font-size:14.5px;font-weight:600;cursor:pointer;box-shadow:0 4px 14px #00000040}.uu-wbtn[_ngcontent-%COMP%]:hover{filter:brightness(.96)}.uu-wbtn[_ngcontent-%COMP%]:disabled{opacity:.7;cursor:default}.uu-hint[_ngcontent-%COMP%]{font-size:13px;color:#a1a1aa}@media (max-width: 1100px){.uu-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 600px){.pu-usage[_ngcontent-%COMP%]{padding:14px 14px 48px}.uu-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}
1.uu-big[_ngcontent-%COMP%]{font-size:30px}}']}),t})();function kU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",11),o.NdJ("click",function(){return o.CHM(t),o.oxw().connectApp()}),o._uU(1,"+ Connect an app"),o.qZA()}}function TU(t,e){1&t&&(o.TgZ(0,"span",26),o._UZ(1,"span",27),o._uU(2,"Re-authenticate needed"),o.qZA())}function OU(t,e){if(1&t&&(o.TgZ(0,"span",28),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.used?"Used by "+t.used+(1===t.used?" connect":" connects"):"Not used by a connect yet")}}function MU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",16),o.TgZ(1,"div",17),o._UZ(2,"img",18),o.TgZ(3,"div",19),o.TgZ(4,"div",20),o._uU(5),o.qZA(),o.YNc(6,TU,3,0,"span",21),o.YNc(7,OU,2,1,"span",22),o.qZA(),o.qZA(),o.TgZ(8,"div",23),o.TgZ(9,"span",24),o._uU(10),o.qZA(),o.TgZ(11,"button",25),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).manage(e)}),o._uU(12,"Manage"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.ekj("is-bad",t.failed),o.xp6(2),o.Q6J("src",n.imageUrl(t.image),o.LSH),o.xp6(2),o.Q6J("title",t.app),o.xp6(1),o.Oqu(t.app),o.xp6(1),o.Q6J("ngIf",t.failed),o.xp6(1),o.Q6J("ngIf",!t.failed),o.xp6(3),o.AsE("",t.rows.length," ",1===t.rows.length?"account":"accounts","")}}function IU(t,e){if(1&t&&(o.TgZ(0,"ul",14),o.YNc(1,MU,13,9,"li",15),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.filteredGroups)("ngForTrackBy",t.trackByApp)}}function SU(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("No connected app matches \u201c",t.query,"\u201d.")}}function PU(t,e){if(1&t){const t=o.EpF();o.ynx(0),o._uU(1,"No connected apps yet. "),o.TgZ(2,"button",30),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).connectApp()}),o._uU(3,"Connect an app"),o.qZA(),o.BQk()}}function NU(t,e){if(1&t&&(o.TgZ(0,"div",29),o.YNc(1,SU,2,1,"ng-container",9),o.YNc(2,PU,4,0,"ng-container",9),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.query),o.xp6(1),o.Q6J("ngIf",!t.query)}}function qU(t,e){if(1&t&&(o.ynx(0),o.YNc(1,IU,2,2,"ul",12),o.YNc(2,NU,3,2,"div",13),o.BQk()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.filteredGroups.length),o.xp6(1),o.Q6J("ngIf",!t.testloader&&!t.filteredGroups.length)}}function UU(t,e){1&t&&(o.TgZ(0,"div",29),o._uU(1,"Loading apps\u2026"),o.qZA())}function EU(t,e){1&t&&(o.TgZ(0,"span",33),o._uU(1,"Built in. No account needed"),o.qZA())}function FU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",23),o.TgZ(1,"span",24),o._uU(2),o.qZA(),o.TgZ(3,"button",36),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(3).connectApp(e.displayName)}),o._uU(4,"Add another"),o.qZA(),o.qZA()}if(2&t){const t=e.ngIf;o.xp6(2),o.AsE("",t.rows.length," ",1===t.rows.length?"account":"accounts","")}}function DU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",37),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(3).connectApp(e.displayName)}),o._uU(1,"Connect"),o.qZA()}}function LU(t,e){if(1&t&&(o.ynx(0),o.YNc(1,FU,5,2,"div",34),o.YNc(2,DU,2,0,"ng-template",null,35,o.W1O),o.BQk()),2&t){const t=o.MAs(3),e=o.oxw().$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngIf",n.groupFor(e.displayName))("ngIfElse",t)}}function JU(t,e){if(1&t&&(o.TgZ(0,"li",16),o.TgZ(1,"div",17),o._UZ(2,"img",18),o.TgZ(3,"div",19),o.TgZ(4,"div",20),o._uU(5),o.qZA(),o.qZA(),o.qZA(),o.YNc(6,EU,2,0,"span",32),o.YNc(7,LU,4,2,"ng-container",9),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(2),o.Q6J("src",n.imageUrl(t.image),o.LSH),o.xp6(2),o.Q6J("title",t.displayName),o.xp6(1),o.Oqu(t.displayName),o.xp6(1),o.Q6J("ngIf",n.isBuiltin(t)),o.xp6(1),o.Q6J("ngIf",!n.isBuiltin(t))}}function jU(t,e){if(1&t&&(o.TgZ(0,"ul",14),o.YNc(1,JU,8,5,"li",31),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.filteredCatalog)("ngForTrackBy",t.trackById)}}function RU(t,e){if(1&t&&(o.TgZ(0,"div",29),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("No app matches \u201c",t.query,"\u201d.")}}function $U(t,e){if(1&t&&(o.ynx(0),o.YNc(1,UU,2,0,"div",13),o.YNc(2,jU,2,2,"ul",12),o.YNc(3,RU,2,1,"div",13),o.BQk()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",!t.catalogLoaded),o.xp6(1),o.Q6J("ngIf",t.catalogLoaded),o.xp6(1),o.Q6J("ngIf",t.catalogLoaded&&!t.filteredCatalog.length)}}function BU(t,e){1&t&&(o.TgZ(0,"span",73),o._uU(1,"Testing\u2026"),o.qZA())}function HU(t,e){1&t&&(o.TgZ(0,"span",74),o._UZ(1,"span",27),o._uU(2,"Re-authenticate needed"),o.qZA())}function QU(t,e){1&t&&(o.TgZ(0,"span",75),o._UZ(1,"span",27),o._uU(2,"Test passed"),o.qZA())}function YU(t,e){1&t&&(o.TgZ(0,"span",75),o._UZ(1,"span",27),o._uU(2,"
1Linked"),o.qZA())}function zU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",30),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).openConnect(e)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.Oqu(t.connectTitle||t.connectId)}}function VU(t,e){if(1&t&&(o.ynx(0),o.YNc(1,zU,2,1,"button",76),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",e.usedBy[t._id])}}function GU(t,e){1&t&&(o.TgZ(0,"span",28),o._uU(1,"Not used by a connect yet"),o.qZA())}function WU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",51),o.TgZ(1,"div",52),o.TgZ(2,"div",53),o.TgZ(3,"div",54),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.TgZ(6,"button",55),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).editAccountNckName(e,n._id,n.accountNickName,n.appId)}),o.O4$(),o.TgZ(7,"svg",56),o._UZ(8,"path",57),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",58),o._uU(10),o.ALo(11,"date"),o.qZA(),o.qZA(),o.YNc(12,BU,2,0,"span",59),o.YNc(13,HU,3,0,"span",60),o.YNc(14,QU,3,0,"span",61),o.YNc(15,YU,3,0,"span",61),o.qZA(),o.TgZ(16,"div",62),o.TgZ(17,"div",63),o.TgZ(18,"span",64),o._uU(19,"Used by"),o.qZA(),o.YNc(20,VU,2,1,"ng-container",65),o.YNc(21,GU,2,0,"ng-template",null,66,o.W1O),o.qZA(),o.TgZ(23,"div",67),o.TgZ(24,"button",68),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).testAccountConnection(e.appId,e._id,e)}),o.O4$(),o.TgZ(25,"svg",56),o._UZ(26,"path",69),o.qZA(),o._uU(27,"Test "),o.qZA(),o.kcU(),o.TgZ(28,"button",70),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).reconnect(e.appId,e._id,e.auth)}),o.O4$(),o.TgZ(29,"svg",56),o._UZ(30,"path",71),o.qZA(),o._uU(31,"Re-authenticate "),o.qZA(),o.kcU(),o.TgZ(32,"button",72),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(2);return n.openConfirm(e._id,n.accountIndex(e))}),o._uU(33,"Disconnect"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.MAs(22),i=o.oxw(2);o.ekj("is-bad","failed"===i.testingState[t._id]),o.xp6(5),o.Oqu(t.accountName),o.xp6(5),o.AsE("",t.accountNickName||"No nickname"," \xb7 updated ",o.xi3(11,12,t._updated_at,"yyyy-MM-dd"),""),o.xp6(2),o.Q6J("ngIf","testing"===i.testingState[t._id]),o.xp6(1),o.Q6J("ngIf","failed"===i.testingState[t._id]),o.xp6(1),o.Q6J("ngIf","success"===i.testingState[t._id]),o.xp6(1),o.Q6J("ngIf",!i.testingState[t._id]),o.xp6(5),o.Q6J("ngIf",null==i.usedBy[t._id]?null:i.usedBy[t._id].length)("ngIfElse",n),o.xp6(4),o.Q6J("disabled","testing"===i.testingState[t._id])}}function KU(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",38),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDialog()}),o.TgZ(1,"div",39),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",40),o._UZ(3,"img",41),o.TgZ(4,"div",42),o.TgZ(5,"h2"),o._uU(6),o.qZA(),o.TgZ(7,"div",43),o._uU(8),o.qZA(),o.qZA(),o.TgZ(9,"button",44),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDialog()}),o._uU(10,"\xd7"),o.qZA(),o.qZA(),o.TgZ(11,"div",45),o.YNc(12,WU,34,15,"div",46),o.qZA(),o.TgZ(13,"div",47),o.TgZ(14,"div",48),o.TgZ(15,"button",49),o.NdJ("click",function(){const e=o.CHM(t).ngIf;return o.oxw().connectApp(e.app)}),o._uU(16),o.qZA(),o.TgZ(17,"span",28),o._uU(18,"Connects that don\u2019t name an account will ask which one to use."),o.qZA(),o.qZA(),o.TgZ(19,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDialog()}),o._uU(20,"Done"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.ngIf,n=o.oxw();o.xp6(3),o.Q6J("src",n.imageUrl(t.image),o.LSH),o.xp6(3),o.hij("",t.app," accounts"),o.xp6(2),o.HOy("",t.rows.length," ",1===t.rows.length?"account":"accounts"," \xb7 used by ",t.used," ",1===t.used?"connect":"connects",""),o.xp6(4),o.Q6J("ngForOf",t.rows)("ngForTrackBy",n.trackById),o.xp6(4),o.hij("+ Add another ",t.app," account")}}function XU(t,e){1&t&&o._UZ(0,"app-loader")}let tE=(()=>{class t extends yr{constructor(t,e,n,i,o,r){super(t,e,n,i,o,r),this.tab="connected",this.query="",this.openApp=null,this.catalog=[],this.catalogLoaded=!1,this.usedBy={},this.builtinCategoryId="66ffa4b8edf853c2680514cd",this.cxRouter=t,this.cxCommon=i,this.cxConnects=n}getConnectedAccounts(){this.testloader=!0,this.cxConnects.getUserConnectedAccounts().subscribe(t=>{const e=((null==t?void 0:t.userConnectedAccount)||[]).sort((t,e)=>new Date(e._updated_at).getTime()-new Date(t._updated_at).getTime());e.forEach(t=>{t._updated_at=new Date(t._updated_at).getTime()}),this.connectedAccounts=e,[...new Set(e.filter(t=>
1!t.appImage||!t.appUrlName).map(t=>t.appId))].forEach(t=>{this.cxCommon.getApp(t).subscribe(e=>{(null==e?void 0:e.app_detail)&&(this.connectedAccounts.filter(e=>e.appId===t).forEach(t=>{var n;t.appImage||(t.appImage=e.app_detail.image),t.appUrlName||(t.appUrlName=null===(n=e.app_detail.credential)||void 0===n?void 0:n.urlName)}),this.connectedAccounts=[...this.connectedAccounts])})});const n=e.map(t=>t._id);n.length&&this.cxConnects.getUserConnectedAccountsCountList(n).subscribe(t=>{((null==t?void 0:t.userConnectedAccount)||[]).forEach(t=>{const e=this.connectedAccounts.find(e=>e._id===t._id);e&&(e.connect_count=(t.uniqueConnectIds||[]).length);const n=new Set;this.usedBy[t._id]=(t.connects||[]).filter(t=>!(!t.connectId||n.has(t.connectId)||(n.add(t.connectId),0)))})}),this.testloader=!1})}ngOnInit(){super.ngOnInit(),this.loadCatalog()}get groups(){const t={};for(const e of this.connectedAccounts||[]){const n=e.appName||e.appUrlName||e.appId||"Unknown app",i=t[n]||(t[n]={app:n,appId:e.appId,image:e.appImage,rows:[],used:0,failed:!1});i.rows.push(e),i.used+=e.connect_count||0,!i.image&&e.appImage&&(i.image=e.appImage)}return Object.values(t).map(t=>(t.failed=t.rows.some(t=>"failed"===this.testingState[t._id]),t))}get filteredGroups(){const t=this.query.trim().toLowerCase();return this.groups.filter(e=>!t||(e.app||"").toLowerCase().includes(t)||e.rows.some(e=>(e.accountName||"").toLowerCase().includes(t)||(e.accountNickName||"").toLowerCase().includes(t)))}get filteredCatalog(){const t=this.query.trim().toLowerCase();return this.catalog.filter(e=>!t||(e.displayName||"").toLowerCase().includes(t))}get openGroup(){return this.openApp&&this.groups.find(t=>t.app===this.openApp)||null}groupFor(t){return this.groups.find(e=>e.app===t)}isBuiltin(t){return Array.isArray(t.categoryId)?t.categoryId.includes(this.builtinCategoryId):t.categoryId===this.builtinCategoryId}imageUrl(t){return this.appyConfig.cdnMediaPath+(t||"connect.png")}accountIndex(t){return this.connectedAccounts.indexOf(t)}onSearch(t){this.query=t.target.value||""}setTab(t){this.tab=t,this.catalogLoaded||this.loadCatalog()}loadCatalog(){this.cxCommon.getAppsCustom("trigger").subscribe(t=>{this.catalog=((null==t?void 0:t.apps_list)||[]).slice().sort((t,e)=>(t.displayName||"").localeCompare(e.displayName||"")),this.catalogLoaded=!0})}manage(t){this.openApp=t.app}closeDialog(){this.openApp=null}onEscape(){this.closeDialog()}connectApp(t){if(this.appAccountPop(),!t)return;let e=0;const n=()=>{var i;const o=null===(i=this.bsModalRef)||void 0===i?void 0:i.content;o&&o.appsList&&o.appsList.length?(o.searchText=t,"function"==typeof o.filterApps&&o.filterApps()):e++<30&&setTimeout(n,100)};setTimeout(n,150)}openConnect(t){this.closeDialog(),this.cxRouter.navigateByUrl(`/customeditor/${t.nodeId}/overview/${t.connectId}`)}trackByApp(t,e){return e.app}trackById(t,e){return e._id||e.appId}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.F0),o.Y36(Eo),o.Y36(Fo),o.Y36(wo.v),o.Y36(yo),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-connections"]],hostBindings:function(t,e){1&t&&o.NdJ("keydown.escape",function(){return e.onEscape()},!1,o.evT)},features:[o.qOj],decls:23,vars:15,consts:[["id","main-container_",1,"main-container","ns-page"],[1,"cx-page"],[1,"cx-sub"],["role","tablist",1,"cx-tabs"],["type","button","role","tab",1,"cx-tab",3,"click"],[1,"cx-tab-count"],[1,"cx-toolbar"],["type","text","aria-label","Search connections",1,"cx-search",3,"value","placeholder","input"],["type","button","class","cx-btn cx-toolbar-btn",3,"click",4,"ngIf"],[4,"ngIf"],["class","cx-overlay",3,"click",4,"ngIf"],["type","button",1,"cx-btn","cx-toolbar-btn",3,"click"],["class","cx-grid",4,"ngIf"],["class","cx-empty",4,"ngIf"],[1,"cx-grid"],["class","cx-card",3,"is-bad",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cx-card"],[1,"cx-card-head"],["alt","",1,"cx-icon",3,"src"],[1,"cx-card-titles"],[1,"cx-card-name",3,"title"],["class","cx-flag is-bad",4,"ngIf"],["class","cx-muted",4,"ngIf"],[1,"cx-card-foot"],[1,"cx-count"],["type","button",1,"cx-btn","cx-btn-small",3,"click"],[1,"cx-flag","is-bad"],[1,"cx-dot"],[1,"cx-muted"],[1,"cx-empty"],["type","button",1,"cx-link",3,"click"],["class","cx-card",4,"ngFor","ngForOf","ngForTrackBy"],["class","cx-card-builtin",4,"ngIf"],[1,"cx-card-builtin"],["class","cx-card-foot",4,"ngIf","ngIfElse"],["connectBtn",""],["type","button",1,"cx-btn",3,"click"],["type","button",1,"cx-btn","cx-card-cta",3,"click"],[1,"cx-overlay",3,"click"],["role","dialog","aria-modal","true",1,"cx-dialog",3,"click"],[1,"cx-dialog-head"],["alt","",1,"cx-icon","cx-icon-lg",3,"src"],[1,"cx-dialog-titles"],[1,"cx-dialog-sub"],["type","button","aria-label","Close",1,"cx-dialog-close",3,"click"],[1,"cx-dialog-body"],["class","cx-acct",3,"is-bad",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cx-dialog-foot"],[1,"cx-dialog-foot-main"],["type","button",1,"cx-text-btn","is-add",3,"click"],["type","button",1,"cx-btn","cx-done",3,"click"],[1,"cx-acct"],[1,"cx-acct-top"],[1,"cx-acct-id"],[1,"cx-acct-name"],["type","button","title","Edit nickname",1,"cx-pen",3,"click"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"],[1,"cx-acct-meta"],["class","cx-chip is-busy",4,"ngIf"],["class","cx-chip is-dead",4,"ngIf"],["class","cx-chip is-ok",4,"ngIf"],[1,"cx-acct-use"],[1,"cx-acct-users"],[1,"cx-eyebrow"],[4,"ngIf","ngIfElse"],["notUsed",""],[1,"cx-acts"],["type","button",1,"cx-text-btn",3,"disabled","click"],["d","M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8M21 3v5h-5"],["type","button",1,"cx-text-btn",3,"click"],["d","M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16M3 21v-5h5M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8M21 3v5h-5"],["type","button",1,"cx-text-btn","is-danger",3,"click"],[1,"cx-chip","is-busy"],[1,"cx-chip","is-dead"],[1,"cx-chip","is-ok"],["type","button","class","cx-link",3,"click",4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"div"),o.TgZ(3,"h1"),o._uU(4,"Connections"),o.qZA(),o.TgZ(5,"p",2),o._uU(6,"Connect an account once. Every agent you build can use it."),o.qZA(),o.qZA(),o.TgZ(7,"div",3),o.TgZ(8,"button",4),o.NdJ("click",function(){return e.setTab("all")}),o._uU(9," All "),o.TgZ(10,"span",5),o._uU(11),o.qZA(),o.qZA(),o.TgZ(12,"button",4),o.NdJ("click",function(){return e.setTab("connected")}
1),o._uU(13," Connected "),o.TgZ(14,"span",5),o._uU(15),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"div",6),o.TgZ(17,"input",7),o.NdJ("input",function(t){return e.onSearch(t)}),o.qZA(),o.YNc(18,kU,2,0,"button",8),o.qZA(),o.YNc(19,qU,3,2,"ng-container",9),o.YNc(20,$U,4,3,"ng-container",9),o.qZA(),o.YNc(21,KU,21,9,"div",10),o.qZA(),o.YNc(22,XU,1,0,"app-loader",9)),2&t&&(o.xp6(8),o.ekj("is-on","all"===e.tab),o.uIk("aria-selected","all"===e.tab),o.xp6(3),o.Oqu(e.catalogLoaded?e.catalog.length:"\u2026"),o.xp6(1),o.ekj("is-on","connected"===e.tab),o.uIk("aria-selected","connected"===e.tab),o.xp6(3),o.Oqu(e.groups.length),o.xp6(2),o.Q6J("value",e.query)("placeholder","all"===e.tab?"Search "+(e.catalogLoaded?e.catalog.length+" ":"")+"apps (Gmail, Slack, Stripe\u2026)":"Search your "+e.groups.length+" connected apps"),o.xp6(1),o.Q6J("ngIf","connected"===e.tab),o.xp6(1),o.Q6J("ngIf","connected"===e.tab),o.xp6(1),o.Q6J("ngIf","all"===e.tab),o.xp6(1),o.Q6J("ngIf",e.openGroup),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[to.O5,to.sg,po],pipes:[to.uU],styles:["[_nghost-%COMP%]{--cx-ok-tint: #e3f4ea;--cx-err: #c2410c;--cx-err-tint: #fdeae3}.theme-dark[_nghost-%COMP%], .theme-dark   [_nghost-%COMP%]{--cx-ok-tint: #12291d;--cx-err: #f08a5d;--cx-err-tint: #3a1f14}.ns-page[_ngcontent-%COMP%]{background:var(--ns-paper)!important;color:var(--ns-ink);font-family:var(--ns-sans);font-size:14px;line-height:1.45;min-height:calc(100vh - 70px)}.cx-page[_ngcontent-%COMP%]{max-width:1180px;margin:0 auto;padding:34px 20px 60px;display:grid;grid-gap:16px;gap:16px;align-content:start}.cx-page[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-family:var(--ns-serif);font-size:23px;font-weight:600;color:var(--ns-ink);margin:0}.cx-sub[_ngcontent-%COMP%]{color:var(--ns-muted);font-size:13.5px;margin:4px 0 0}.cx-tabs[_ngcontent-%COMP%]{display:flex;grid-gap:28px;gap:28px;border-bottom:1px solid var(--ns-line)}.cx-tab[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:8px;gap:8px;padding:0 0 11px;margin-bottom:-1px;border:0;border-bottom:2px solid transparent;background:none;color:var(--ns-muted);font:500 15px var(--ns-sans);cursor:pointer}.cx-tab[_ngcontent-%COMP%]:hover{color:var(--ns-ink)}.cx-tab.is-on[_ngcontent-%COMP%]{color:var(--ns-ink);font-weight:600;border-bottom-color:var(--ns-accent)}.cx-tab-count[_ngcontent-%COMP%]{font:500 12px var(--ns-mono);padding:1px 7px;border-radius:999px;background:var(--ns-panel-2);color:var(--ns-muted)}.cx-tab.is-on[_ngcontent-%COMP%]   .cx-tab-count[_ngcontent-%COMP%]{background:var(--ns-accent-soft);color:var(--ns-accent-ink)}.cx-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:14px;gap:14px}.cx-search[_ngcontent-%COMP%]{flex:1;height:42px;padding:0 14px;border:1px solid var(--ns-line-strong);border-radius:10px;background:var(--ns-panel);color:var(--ns-ink);font:14px var(--ns-sans);outline:0}.cx-search[_ngcontent-%COMP%]:focus{outline:2px solid var(--ns-accent);outline-offset:1px}.cx-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;grid-gap:6px;gap:6px;padding:7px 14px;border:1px solid var(--ns-line-strong);border-radius:8px;background:var(--ns-panel);color:var(--ns-ink);font:600 14px var(--ns-sans);line-height:1.45;white-space:nowrap;cursor:pointer}.cx-btn[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2)}.cx-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.cx-btn-small[_ngcontent-%COMP%]{padding:4px 11px;font-size:12.5px;border-radius:7px}.cx-toolbar-btn[_ngcontent-%COMP%]{flex:none;height:42px}.cx-done[_ngcontent-%COMP%]{background:var(--ns-ink);border-color:var(--ns-ink);color:var(--ns-panel)}.cx-done[_ngcontent-%COMP%]:hover{background:var(--ns-ink);filter:brightness(1.15)}.cx-grid[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-gap:12px;gap:12px}.cx-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:14px;gap:14px;min-width:0;padding:14px 16px;border:1px solid var(--ns-line);border-radius:12px;background:var(--ns-panel)}.cx-card.is-bad[_ngcontent-%COMP%]{border-color:var(--cx-err)}.cx-card-head[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;min-width:0}.cx-icon[_ngcontent-%COMP%]{width:40px;height:40px;flex:none;border-radius:10px;background:var(--ns-panel);-o-object-fit:contain;object-fit:contain}.cx-icon-lg[_ngcontent-%COMP%]{width:44px;height:44px}.cx-card-titles[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:3px;gap:3px;min-width:0}
1.cx-card-name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cx-muted[_ngcontent-%COMP%]{color:var(--ns-muted);font-size:12.5px}.cx-flag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;font-size:12.5px;font-weight:600}.cx-flag.is-bad[_ngcontent-%COMP%]{color:var(--cx-err)}.cx-dot[_ngcontent-%COMP%]{width:7px;height:7px;flex:none;border-radius:50%;background:currentColor}.cx-card-foot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:8px;gap:8px;margin-top:auto}.cx-count[_ngcontent-%COMP%]{color:var(--ns-ok);font-size:13px;font-weight:600;white-space:nowrap}.cx-card-cta[_ngcontent-%COMP%]{width:100%;margin-top:auto;padding:9px 14px}.cx-card-builtin[_ngcontent-%COMP%]{margin-top:auto;padding:8px 0 2px;font-size:13px;color:var(--ns-muted)}.cx-empty[_ngcontent-%COMP%]{padding:28px 0;color:var(--ns-muted);font-size:14px}.cx-link[_ngcontent-%COMP%]{padding:0;border:0;background:none;color:var(--ns-accent-ink);font:500 13px var(--ns-sans);text-align:left;cursor:pointer}.cx-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.cx-text-btn[_ngcontent-%COMP%]{border:0;background:transparent;padding:6px 2px;font:600 13px var(--ns-sans);color:var(--ns-accent-ink);cursor:pointer;flex:none;display:inline-flex;align-items:center;grid-gap:5px;gap:5px}.cx-text-btn.is-danger[_ngcontent-%COMP%]{color:var(--cx-err)}.cx-text-btn.is-add[_ngcontent-%COMP%]{font-size:14px;padding:4px 0;text-align:left}.cx-text-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.cx-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1040;display:flex;align-items:flex-start;justify-content:center;padding:24px 16px;background:rgba(0,0,0,.5);overflow:auto}.cx-dialog[_ngcontent-%COMP%]{width:min(560px,100%);max-height:calc(100vh - 48px);display:flex;flex-direction:column;background:var(--ns-panel);border:1px solid var(--ns-line);border-radius:16px;box-shadow:var(--ns-shadow);overflow:hidden;color:var(--ns-ink)}.cx-dialog-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;grid-gap:14px;gap:14px;padding:22px 22px 16px;border-bottom:1px solid var(--ns-line)}.cx-dialog-titles[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:4px;gap:4px;flex:1;min-width:0}.cx-dialog-titles[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-family:var(--ns-serif);font-size:24px;font-weight:500;line-height:1.15;color:var(--ns-ink)}.cx-dialog-sub[_ngcontent-%COMP%]{color:var(--ns-muted);font-size:13px}.cx-dialog-close[_ngcontent-%COMP%]{width:34px;height:34px;flex:none;border:1px solid var(--ns-line);border-radius:9px;background:var(--ns-panel);color:var(--ns-muted);font-size:20px;line-height:1;cursor:pointer}.cx-dialog-close[_ngcontent-%COMP%]:hover{color:var(--ns-ink);border-color:var(--ns-line-strong)}.cx-dialog-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:14px;gap:14px;padding:18px 22px;overflow-y:auto}.cx-acct[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:12px;gap:12px;padding:14px 16px;border:1px solid var(--ns-line);border-radius:12px}.cx-acct.is-bad[_ngcontent-%COMP%]{border-color:var(--cx-err)}.cx-acct-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;grid-gap:12px;gap:12px}.cx-acct-id[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:3px;gap:3px;min-width:0}
1.cx-acct-name[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;font-size:15px;font-weight:600;overflow-wrap:anywhere}.cx-pen[_ngcontent-%COMP%]{width:22px;height:22px;border:0;border-radius:6px;background:none;color:var(--ns-faint);display:inline-grid;place-items:center;cursor:pointer}.cx-pen[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink)}.cx-acct-meta[_ngcontent-%COMP%]{font:12px var(--ns-mono);color:var(--ns-muted);overflow-wrap:anywhere}.cx-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;flex:none;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--ns-panel-2);color:var(--ns-muted)}.cx-chip.is-ok[_ngcontent-%COMP%]{background:var(--cx-ok-tint);color:var(--ns-ok)}.cx-chip.is-dead[_ngcontent-%COMP%]{background:var(--cx-err-tint);color:var(--cx-err)}.cx-chip.is-busy[_ngcontent-%COMP%]{background:var(--ns-accent-soft);color:var(--ns-accent-ink)}.cx-acct-use[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-between;grid-gap:12px;gap:12px;flex-wrap:wrap}.cx-acct-users[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:4px;gap:4px;min-width:0;font-size:13px}.cx-eyebrow[_ngcontent-%COMP%]{font:11px var(--ns-mono);letter-spacing:.07em;text-transform:uppercase;color:var(--ns-faint)}.cx-acts[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px;flex-shrink:0}.cx-dialog-foot[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px;padding:14px 22px 18px;border-top:1px solid var(--ns-line)}.cx-dialog-foot-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:3px;gap:3px;flex:1;min-width:0}@media (max-width: 1400px){.cx-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (max-width: 1100px){.cx-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 640px){.cx-page[_ngcontent-%COMP%]{padding:8px 14px 48px}.cx-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]}),t})(),eE=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-account-disabled"]],decls:11,vars:0,consts:[["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container","menubaractive"],[1,"dashboard-middle","clearfix","pt-0","px-lg-4","mt-4"],[1,"block","content","bg-white","rounded-4","p-3","p-lg-5","text-center"],["id","ConnectAccountpage",1,"clearfix","d-flex","justify-content-center","align-items-center","gap-4","flex-column"],[1,"h3","animated","fadeIn"],[1,"acont-deactive"],["onclick","location.href='https://commonlogin.appypie.com/privacy/delete'","type","button",1,"btn","btn-md","btn-primary","mar-30-t","theme-btn","rounded-pill"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o.TgZ(4,"h1",4),o._uU(5,"Account Deactivated"),o.qZA(),o.TgZ(6,"div",5),o.TgZ(7,"h2"),o._uU(8,"Your account is deactivated. Do you want to reactivate your account ?"),o.qZA(),o.TgZ(9,"button",6),o._uU(10,"Yes"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA())},styles:[""]}),t})();const nE=function(){return["MX","CO","AR","BR"]};function iE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",17),o.TgZ(1,"p",18),o._uU(2,"A Comprehensive Solution For Seamless App Integration "),o.TgZ(3,"span",19),o._uU(4,"Set up your business automation to grow faster"),o.qZA(),o.qZA(),o.TgZ(5,"button",20),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.tryPlan(e.standardPlan)}),o._uU(6),o.qZA(),o.TgZ(7,"p",21),o.TgZ(8,"strong"),o._uU(9),o.qZA(),o.qZA(),o.TgZ(10,"p",22),o._uU(11),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.hij("",o.DdM(3,nE).includes(t.standardPlan.countryCode)||t.currentUser.trialEnd?"Buy Now":"TRY IT FREE"," "),o.xp6(3),o.hij("",o.DdM(4,nE).includes(t.standardPlan.countryCode)||t.currentUser.trialEnd?"Buy Now at lowest cost, "+t.getyearlyPlanCurrencySign(t.standardPlan)+t.getyearlyPlanPrice(t.standardPlan)+"/ Monthly":"Begin with a 7-day Free trial, then it's just "+t.getyearlyPlanCurrencySign(t.standardPlan)+t.getyearlyPlanPrice(t.standardPlan)+"/month"," "),o.xp6(2),o.hij(" ",o.DdM(5,nE).includes(t.standardPlan.countryCode)||t.currentUser.trialEnd?"No obligation, cancel anytime":"Expect a reminder 1 day before your trial ends. Cancel anytime"," ")}}function oE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"main",1),o.TgZ(1,"div",2),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o._UZ(4,"img",5),o._UZ(5,"img",6),o.qZA(),o.TgZ(6,"button",7),o.NdJ("click",function(){return o.CHM(t),o.oxw().logout()}),o.O4$(),o.TgZ(7,"svg",8),o._UZ(8,"path",9),o._UZ(9,"polyline",10),o._UZ(10,"line",11),o.qZA(),o._uU(11," Logout "),o.qZA(),o.kcU(),o.TgZ(12,"div",12),o.YNc(13,iE,12,6,"div",13),o.TgZ(14,"div",14),o.TgZ(15,"p",15),o._uU(16," Join 10 million+ other businesses: "),o.qZA(),o._UZ(17,"img",16),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(13),o.Q6J("ngIf",t.standardPlan.countryCode)}}let rE=(()=>{class t{constructor(t,e,n,i,o,r,s,a){this.translatorService=t,this.commonService=e,this.customerService=n,this.planService=i,this.dataService=o,this.authService=r,this.router=s,this.cookieService=a,this.EU=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"],this.appyConfig=go.N,this.useStripeBilling=!1,this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t})}ngOnInit(){var t;this.currentUser=this.customerService.GetCurrent(),(null===(t=this.currentUser)||void 0===t?void 0:t.planId)!==Ar.PLANID_MAP.FREE_PLAN?this.router.navigateByUrl("/plans"):(this.customerInfo=this.currentUser,this.plansAction(),this.cookieService.set("fromPurchasePage","true",7,"/","",!0,"Strict"))}tryPlan(t){if(this.cookieService.delete("fromPurchasePage","/"),this.currentUser.plan_details[0].planId!==Ar.PLANID_MAP.FREE_PLAN)return this.router.navigateByUrl("/plans"),!1;{if(this.useStripeBilling)return this.planService.createStripeCheckoutSession({planId:t.planId,planPeriod:this.planLists&&"monthly"===this.planLists.planPeriodButton?"monthly":"yearly",currency:t.currencyCode}).subscribe(t=>{t&&t.success&&t.url?window.location.href=t.url:(console.error("Stripe checkout could not be started:",t&&t.msg),alert(t&&t.msg||"Could not start checkout. Please try again."))},t=>{console.error("Stripe checkout request failed:",t),alert("Could not start checkout. Please try again.")}),!1;this.customerInfo.trial_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.successUrl=`${this.appyConfig.baseUrl}/appointment`,this.customerInfo.cancelUrl=`${this.appyConfig.baseUrl}/app/cancel`,this.customerInfo.resetUrl=`${this.appyConfig.baseUrl}/purchase`,this.currentUser.trialEnd&&(this.customerInfo.buyNow=!0),localStorage.setItem("planId",t.planId);const e=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),n=btoa(encodeURIComponent(e));this.cookieService.set("custPlan",n,1,"/"),this.planService.tryCommonPayment(this.customerInfo).subscribe(t=>{const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}}updateUserLastTouchedApp(t){this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[0]}).subscribe(e=>{t[1]&&this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[1]}).subscribe(e=>{t[2]&&this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[2]}).subscribe(t=>{})})})}plansAction(){let t,e;this.planInfo=[],this.allFields=[],t={},t.status=1,(0,Tr.of)({countryCode:this.currentUser.plan_country||"US",ipAddress:"",status:1}).subscribe(n=>{n.countryCode&&1===n.status&&(t.country=n.countryCode,t.clientIp=n.ipAddress),this.currentUser.plan_country?t.plan_country=this.currentUser.plan_country:this.currentUser.planId&&this.currentUser.planId!==Ar.PLANID_MAP.FREE_PLAN&&"USD"===this.currentUser.customerCurrencyCode&&(t.plan_country="US"),this.planService.getPlansList(t).subscribe(t=>{var n,i;this.useStripeBilling=!0===(null==t?void 0:t.useStripeBilling);const o=[];this.scopeCurrencySign=null===(n=(null==t?void 0:t.planLists)[0])||void 0===n?void 0:n.currencySign,null===(i=null==t?void 0:t.planLists)||void 0===i||i.forEac
1h((t,n)=>{const i=t;if(void 0!==this.currentUser.plan_details&&i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId){const t=i.custom_plans?i.custom_plans:{},e={};let n=!1;Object.keys(t).length>0&&(Object.keys(t).forEach(i=>{i===this.currentUser.custom_planId&&!1===n&&(n=!0),n&&(e[i]=t[i])}),i.custom_plans=e)}let r;if(r={},i.custom_plans&&Object.keys(i.custom_plans).length>0){let t=0;Object.keys(i.custom_plans).forEach(e=>{i.custom_plans[e].tasks>t&&(t=i.custom_plans[e].tasks),r[i.custom_plans[e].tasks]=i.custom_plans[e]}),i.maxTasks=t,i.sliderPlans=r}"Free Plan"===i.planName?(this.planInfo[0]={annualPrice:i.annualPrice,monthlyPrice:i.monthlyPrice,selected_tasks:i.tasks+" Tasks /mo",billingTitle:"Free forever",upgradebtn:"no",tasks:i.tasks,planKName:"",current_tasks:0},o[0]=i):"Standard"===i.planName?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[1]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[1]={plan_id:i.custom_plans.cusST001.plan_id,annualPrice:i.custom_plans.cusST001.year_price,monthlyPrice:i.custom_plans.cusST001.month_price,selected_tasks:i.custom_plans.cusST001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusST001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusST001.tasks,planKName:"",current_tasks:0},o[1]=i):"Professional"===i.planName?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[2]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[2]={plan_id:i.custom_plans.cusPR001.plan_id,annualPrice:i.custom_plans.cusPR001.year_price,monthlyPrice:i.custom_plans.cusPR001.month_price,selected_tasks:i.custom_plans.cusPR001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusPR001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusPR001.tasks,planKName:"",current_tasks:0},o[2]=i):"Business"===i.planName&&"business2"===i.identifire?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[3]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[3]={plan_id:i.custom_plans.cusBS001.plan_id,annualPrice:i.custom_plans.cusBS001.year_price,monthlyPrice:i.custom_plans.cusBS001.month_price,selected_tasks:i.custom_plans.cusBS001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusBS001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusBS001.tasks,planKName:"",current_tasks:0},o[3]=i):"Enterprise"===i.planName&&(Object.keys(i.features).length>
10&&Object.keys(i.features).forEach(t=>{this.allFields.push({title:t,value:t.replace(/_/g," ")});const e=i.features[t]?i.features[t]:{};Object.keys(e).length>0&&Object.keys(e).forEach(e=>{this.allFields.push({column:e,heading:t,value:e.replace(/_/g," ")})})}),i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[4]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[4]=i.customerId?{plan_id:i.custom_plans.cusEP001.plan_id,annualPrice:i.custom_plans.cusEP001.year_price,monthlyPrice:i.custom_plans.cusEP001.month_price,selected_tasks:i.custom_plans.cusEP001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusEP001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusEP001.tasks,planKName:"",current_tasks:0}:{annualPrice:i.annualPrice,monthlyPrice:i.monthlyPrice,selected_tasks:i.tasks,billingTitle:"per month, billed annually or "+i.currencySign+" "+i.monthlyPrice+" month-to-month",upgradebtn:"no",tasks:i.tasks,planKName:"",current_tasks:0},o[4]=i)}),this.planLists=o,this.planLists.planPeriodButton="yearly";const r=decodeURIComponent(localStorage.getItem("originUrl"));let s="Professional";if(r&&r.includes("build-your-connect/")){const t=r.split("build-your-connect/")[1];if(this[t.split("__for__")[0]]=t.split("__for__")[1],this.apps){const t=this.apps.split("_");this.updateUserLastTouchedApp(t),t.indexOf(this.appyConfig.mindbodyId)>-1&&(s="Professional"),this.standardPlan=this.planLists.find(t=>t.planName===s)}else if(this.template)this.commonService.GetPopularMatchDetails(this.template).subscribe(t=>{let e=[];t&&(e=[t.details.triggerAppId],t.details.multiStepConnect?t.details.actionArray.forEach(t=>{-1==e.indexOf(t.actionAppId)&&e.push(t.actionAppId)}):e.push(t.details.actionAppId)),s=e.indexOf(this.appyConfig.mindbodyId)>-1?"Professional":"Standard",this.updateUserLastTouchedApp(e),this.standardPlan=this.planLists.find(t=>t.planName===s)});else if(this.pid){const t=this.planLists.find(t=>t.planId===this.pid);this.standardPlan=t||this.planLists.find(t=>t.planName===s),localStorage.removeItem("originUrl")}}else this.standardPlan=this.planLists.find(t=>t.planName===s)})})}getyearlyPlanPrice(t){return t.country[t.countryCode]?t.country[t.countryCode].year_price:this.EU.includes(t.countryCode)?t.country.EU.year_price:t.annualPrice}getyearlyPlanCurrencySign(t){return t.country[t.countryCode]?t.country[t.countryCode].currencySign:this.EU.includes(t.countryCode)?t.country.EU.currencySign:t.currencySign}logout(){this.authService.logout({originUrl:this.router.url}).subscribe(t=>{this.clearCookies(["loop.flozic.ai",".flozic.ai","connectcloud.appypie.com",".appypie.com"]),t.redirectUrl&&(window.location.href=t.redirectUrl)})}clearCookies(t){document.cookie.split(";").forEach(e=>{const n=`${e.split("=")[0].trim()}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;t.forEach(t=>{document.cookie=`${n}; domain=${t}`}),document.cookie=`${n}`})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(wo.v),o.Y36(yo),o.Y36(Zr),o.Y36(DA),o.Y36(uo),o.Y36(ui.F0),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-purchase"]],decls:1,vars:1,consts:[["id","main-container-landing","class","connect-dash clearfix pt-0 position-relative purchasepage","ui-view","content",4,"ngIf"],["id","main-container-landing","ui-view","content",1,"connect-dash","clearfix","pt-0","position-relative","purchasepage"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100","secpurchasepage"],[1,"pt-4","purchase-wrap","text-center"],[1,"d-inline-block","mb-4","mt-0","mx-0","navbar-brand","pt-0"],["src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-light-2048.png","alt","Appy Pie Automate","width","410","height","52",1,"logoColor","light-logo"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-dark-2048.png","width","380","height","70",1,"appypie_logo","dark-logo"],[1,"btn","logout_btn",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","36","width","36","xmlns","http://www.w3.org/2000/svg"],["d","M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"],["points","16 17 21 12 16 7"],["x1","21","y1","12","x2","9","y2","12"],[1,"d-table","w-100","h-100","secpurchasepage"],["class","purchaseinfo",4,"ngIf"],[1,"purchase-logos","pt-1","pt-md-5"],[1,"fs-6"],["src","/assets/images/purchaselogo.png","alt","Purchase","width","905","height","125",1,"img-fluid"],[1,"purchaseinfo"],[1,"fs-5","text-black","mb-0"],[1,"d-block"],["type","button",1,"btn","my-5","my-xxl-5","tryitfree-btn",3,"click"],[1,"text-black","fs-5","mb-1"],[1,"fs-5","text-black"]],template:function(t,e){1&t&&o.YNc(0,oE,18,1,"main",0),2&t&&o.Q6J("ngIf",e.standardPlan)},directives:[to.O5],styles:['.stick_popup.trail-modal[_ngcontent-%COMP%]{width:80%!important;height:auto!important;margin:0!important;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);max-width:900px;animation:none}.stick_popup.trail-modal[_ngcontent-%COMP%]   .stick_content[_ngcontent-%COMP%]{padding:0}.trail-wrap[_ngcontent-%COMP%]{padding:90px 20px 50px;position:relative;z-index:1;border-top:5px solid #3275dd}.trail-wrap[_ngcontent-%COMP%]:before{content:"";position:absolute;
1left:0px;bottom:0px;background:#F9FAFD;width:100%;height:28%;z-index:-1}.trail-modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{padding:0}.trail-modal.fade[_ngcontent-%COMP%]{background:rgb(0 0 0 / 72%)}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block;font-size:12px;margin-top:4px;opacity:.57}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:33px;margin-right:10px;position:relative;top:-4px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:33px;font-weight:700;margin-bottom:9px;color:#3a4156}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn-wrap[_ngcontent-%COMP%]{margin-top:40px;margin-bottom:30px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]{font-size:18px;background:#3275DD;border-color:#3275dd;border-radius:10px;height:auto;line-height:1;padding:17px 27px;box-shadow:0 4px 8px #bababa99,0 4px 8px #ffffff4d inset;margin-top:20px;transition:.3s;position:relative;z-index:1;overflow:hidden}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0px;right:0px;width:72px;background:transparent;background-color:transparent;height:72px;top:calc(50% - 35px);margin:auto;z-index:-1;border-radius:50px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]:hover, .trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]:focus{background:#2265cc;transform:translateY(-5px)}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]:focus:after{animation:ripple .6s linear both;background-color:#fff3}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .sub-heading[_ngcontent-%COMP%]{font-size:16px;color:#3a4156}.stick_close[_ngcontent-%COMP%]{z-index:99}.purchase-wrap[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle;max-width:1200px;width:100%;padding:1rem;background:#fff}.purchasepage[_ngcontent-%COMP%]{height:calc(100% - 0%);background-color:#fff}@media (min-width:1500px){.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]{max-width:800px}.stick_popup.trail-modal[_ngcontent-%COMP%]{transform:translate(-50%,-50%)}.trail-wrap[_ngcontent-%COMP%]:before{height:40%}.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]   .trail-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:38px}.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]   .trail-wrap[_ngcontent-%COMP%]   .sub-heading[_ngcontent-%COMP%]{font-size:18px}.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]   .trail-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:17px}.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]   .trail-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]{font-size:25px}.stick_popup.trail-modal.large-modal[_ngcontent-%COMP%]   .trail-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:15px}}@media (max-width:991px){.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:26px}.purchasepage[_ngcontent-%COMP%]{margin-top:0}.day_free_trialClass[_ngcontent-%COMP%]   .purchasepage[_ngcontent-%COMP%]{margin-top:80px!important}}@media (max-width:580px){.stick_popup.trail-modal[_ngcontent-%COMP%]{width:88%!important}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{display:block;text-align:center;margin:0 auto 5px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:22px;text-align:center}.trail-wrap[_ngcontent-%COMP%]{padding:45px 20px 10px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .sub-heading[_ngcontent-%COMP%]{font-size:14px}.stick_content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:13px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn-wrap[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:10px}.trail-wrap[_ngcontent-%COMP%]   .content-wrap[_ngcontent-%COMP%]   .btn.btn-success[_ngcontent-%COMP%]{white-space:normal;line-height:1.2;padding:10px;font-size:13px;width:auto;display:block}}.blur[_ngcontent-%COMP%]{filter:blur(10px)}span.ripple[_ngcontent-%COMP%]{position:absolute;border-radius:50%;transform:scale(0);animation:ripple .6s linear;background-color:#ffffffb3}@keyframes ripple{to{transform:scale(6);opacity:0}
1}.couponheading[_ngcontent-%COMP%]{color:#000;font-size:17px;font-weight:400;margin:10px 0;display:inline-block;text-align:center;font-family:"Poppins",sans-serif;border:2px dashed #000;padding:5px 13px 12px;letter-spacing:2px}.couponheading[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:700;color:#da1f28;border-top:0 solid #7A97D8;border-bottom:0 solid #7A97D8;margin-top:10px;display:inline-block}.blck-fridy-wrap[_ngcontent-%COMP%]{margin:30px 0}.stick_content[_ngcontent-%COMP%]   .blck-fridy-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:600;font-size:27px!important}.stick_block_layer[_ngcontent-%COMP%]{background:#000;opacity:.7;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);width:100%;height:100%;position:fixed;top:0;left:0}.stick_popup[_ngcontent-%COMP%]{height:200px;width:80%;box-shadow:0 0 7px #4a4a4a;-moz-box-shadow:0px 0px 7px #4a4a4a;-webkit-box-shadow:0px 0px 7px #4a4a4a;background:#fff;animation:zoomin .7s;box-sizing:border-box;border-radius:4px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);height:auto!important;z-index:999}.stick_content[_ngcontent-%COMP%]{padding:20px}.stick_close[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:-18px;right:-18px;font-size:16px;background:#fff;width:38px;line-height:41px;height:38px;text-align:center;border-radius:100%;box-shadow:0 0 4px #7e7e7e;transition:all .5s ease-in-out}.stick_close[_ngcontent-%COMP%]:hover{color:#00000080;transition:all .5s ease-in-out}@keyframes zoomin{0%{transform:scale(0);opacity:0}50%{transform:scale(1.04);opacity:1}to{transform:scale(1);opacity:1}}.stick_content[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:27px;line-height:35px;font-family:"Poppins",sans-serif;color:#333;margin:16px 0}.stick_content[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#6187da;font-weight:bold;font-size:45px;position:relative;top:6px}.nfooter[_ngcontent-%COMP%]{border-top:1px solid #f2f2f2;padding-top:17px;position:absolute;width:100%;left:0;bottom:20px}.nfooter[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;font-size:11px;font-weight:normal;color:#f0f0f0;transition:all .5s ease-in-out}.nfooter[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{position:relative;top:1px;left:3px}.nfooter[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{background:#95b10c;color:#fff;font-size:15px;margin:0 10px;border:2px solid #95b10c;border-radius:0;min-width:150px;font-weight:bold;transition:all .5s ease-in-out;font-family:"Poppins",sans-serif}.nfooter[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{background:#fff;border:2px solid #95b10c;color:#333;transition:all .5s ease-in-out}.nfooter[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover   span[_ngcontent-%COMP%]{color:#6b6b6b;transition:all .5s ease-in-out}
1.nfooter[_ngcontent-%COMP%]   .btn.cancel[_ngcontent-%COMP%]{background:#fff;color:#595959;border-color:#adadad;transition:all .5s ease-in-out}.nfooter[_ngcontent-%COMP%]   .btn.cancel[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#333}.nfooter[_ngcontent-%COMP%]   .btn.cancel[_ngcontent-%COMP%]:hover{background:#474747;border:2px solid #474747;color:#fff}.nfooter[_ngcontent-%COMP%]   .btn.cancel[_ngcontent-%COMP%]:hover   span[_ngcontent-%COMP%]{color:#fff}.couponCode[_ngcontent-%COMP%]{padding:5px;margin:35px auto 0;border:1px dashed #b6b6b6;border-radius:2px;position:relative;display:table;text-align:center}.couponCode[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:#edffff;display:inline-block;padding:5px;font-size:18px;font-family:"Poppins",sans-serif;width:180px;font-weight:bold;text-shadow:0 2px 2px #bdbdbd}.couponCode[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{background:#6187da;border-radius:0;font-size:15px;color:#fff;line-height:25px;padding:5px 20px;position:relative;top:-1px;font-family:"Poppins",sans-serif}.stick_content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-family:"Poppins",sans-serif;font-size:15px}html[lang=fr][_ngcontent-%COMP%]   .stick_content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:13px}.copyTooltip[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:none}.copyTooltip[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:after{border-color:transparent #000 transparent transparent;border-style:solid;border-width:8px;content:"";height:0;left:-14px;pointer-events:none;position:absolute;top:50%;width:0;margin-top:-7px}.copyTooltip[_ngcontent-%COMP%]:hover   span[_ngcontent-%COMP%]{position:absolute;display:block;width:150px;background:#000;color:#fff;bottom:13px;right:-91%;font-size:12px;padding:10px;border-radius:5px;text-align:center;left:inherit!important;z-index:99}.freeplanBtn[_ngcontent-%COMP%]{min-width:250px;height:54px;display:block;font-size:17px;font-weight:300;line-height:25px;text-transform:capitalize;border-radius:30px;background-color:#8e56d8!important;color:#fff!important;border:1px solid #8e56d8;box-shadow:none;margin:25px auto;padding:0 25px}.freeplanBtn[_ngcontent-%COMP%]:hover{background-color:#8343d7!important;border:1px solid #8343d7}@media screen and (max-width:767px){.stick_block_layer[_ngcontent-%COMP%]{display:none!important}.purchaseinfo[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:1rem!important}.purchasepage[_ngcontent-%COMP%]{margin-top:0;padding-top:0!important;height:calc(100% - 0%)}.purchase-wrap[_ngcontent-%COMP%]   .navbar-brand[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-width:250px}}.tryitfree-btn[_ngcontent-%COMP%]{border-radius:10px;background-color:#165ed4;color:#fff;padding:1rem 2.5rem}.tryitfree-btn[_ngcontent-%COMP%]:hover{background-color:#254aff}.purchase-logos[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#b1b1b1}@media screen and (max-width: 1599px){.freetrial_page[_ngcontent-%COMP%]{margin-top:0!important}}.logout_btn[_ngcontent-%COMP%]{color:#165ed4;font-size:14px;font-weight:500;position:absolute;right:15px;top:20px;z-index:20}.logout_btn[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{width:19px;height:19px}.logout_btn[_ngcontent-%COMP%]:hover, .logout_btn[_ngcontent-%COMP%]:focus{color:#fff;background:#165ED4}']}),t})();function sE(t,e){1&t&&(o.TgZ(0,"div",5),o._UZ(1,"div",6),o.TgZ(2,"span"),o._uU(3,"Loading profile\u2026"),o.qZA(),o.qZA())}function aE(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",75),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.saveMessage)}}function cE(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.saveError)}}function lE(t,e){if(1&t&&(o.TgZ(0,"span",77),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.planName)}}function dE(t,e){1&t&&(o.TgZ(0,"span",78),o._uU(1,"verified"),o.qZA())}function uE(t,e){1&t&&(o.TgZ(0,"span",79),o._uU(1,"unverified"),o.qZA())}function pE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",80),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openEmailModal()}),o._uU(1,"Change"),o.qZA()}}function hE(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Save Changes"),o.qZA())}function gE(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Saving\u2026"),o.qZA())}function fE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"div",7),o.TgZ(2,"div"),o.TgZ(3,"h1"),o._uU(4,"Profile Settings"),o.qZA(),o.TgZ(5,"p",8),o._uU(6,"Manage your account information and notification preferences"),o.qZA(),o.qZA(),o.TgZ(7,"button",9),o.NdJ("click",function(){return o.CHM(t),o.oxw().cancel()}),o.O4$(),o.TgZ(8,"svg",10),o._UZ(9,"path",11),o.qZA(),o._uU(10," Back to Connects "),o.qZA(),o.qZA(),o.YNc(11,aE,2,1,"div",12),o.YNc(12,cE,2,1,"div",13),o.kcU(),o.TgZ(13,"div",14),o.TgZ(14,"aside",15),o.TgZ(15,"div",16),o.TgZ(16,"div",17),o.NdJ("click",function(){return o.CHM(t),o.oxw().openPictureModal()}),o._UZ(17,"img",18),o.TgZ(18,"div",19),o.O4$(),o.TgZ(19,"svg",20),o._UZ(20,"path",21),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(21,"h3"),o._uU(22),o.qZA(),o.TgZ(23,"p",22),o._uU(24),o.qZA(),o.YNc(25,lE,2,1,"span",23),o.TgZ(26,"button",24),o.NdJ("click",function(){return o.CHM(t),o.oxw().openPictureModal()}),o._uU(27,"Change Photo"),o.qZA(),o.qZA(),o.TgZ(28,"div",25),o.TgZ(29,"h4"),o._uU(30,"Account Security"),o.qZA(),o.TgZ(31,"p",26),o._uU(32," Your password is managed by your sign-in provider. Use the secure reset flow to change it. "),o.qZA(),o.TgZ(33,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().changePassword()}),o.O4$(),o.TgZ(34,"svg",10),o._UZ(35,"path",28),o.qZA(),o._uU(36," Change Password "),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(37,"main",29),o.TgZ(38,"form",30,31),o.NdJ("ngSubmit",function(){return o.CHM(t),o.oxw().saveProfile()}),o.TgZ(40,"header",32),o.TgZ(41,"h4"),o._uU(42,"Personal Information"),o.qZA(),o.TgZ(43,"p",26),o._uU(44,"Your name and contact details \u2014 stored securely in your sign-in directory"),o.qZA(),o.qZA(),o.TgZ(45,"div",33),o.TgZ(46,"div",34),o.TgZ(47,"label"),o._uU(48,"First Name"),o.qZA(),o.TgZ(49,"input",35),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.firstName=e}),o.qZA(),o.qZA(),o.TgZ(50,"div",34),o.TgZ(51,"label"),o._uU(52,"Last Name"),o.qZA(),o.TgZ(53,"input",36),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.lastName=e}),o.qZA(),o.qZA(),o.TgZ(54,"div",37),o.TgZ(55,"label"),o._uU(56,"Email "),o.YNc(57,dE,2,0,"span",38),o.YNc(58,uE,2,0,"span",39),o.qZA(),o.TgZ(59,"div",40),o._UZ(60,"input",41),o.YNc(61,pE,2,0,"button",42),o.qZA(),o.TgZ(62,"small",43),o._uU(63,"A verification code will be sent to the new address before it takes effect."),o.qZA(),o.qZA(),o.TgZ(64,"div",44),o.TgZ(65,"label"),o._uU(66,"Country Code"),o.qZA(),o.TgZ(67,"input",45),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.countryCode=e}),o.qZA(),o.qZA(),o.TgZ(68,"div",46),o.TgZ(69,"label"),o._uU(70,"Phone Number"),o.qZA(),o.TgZ(71,"input",47),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.phone=e}),o.qZA(),o.qZA(),o.TgZ(72,"div",37),o.TgZ(73,"label"),o._uU(74,"Company"),o.qZA(),o.TgZ(75,"input",48),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.companyName=e}),o.qZA(),o.qZA(),o.qZA(),o.TgZ(76,"header",49),o.TgZ(77,"h4"),o._uU(78,"Address"),o.qZA(),o.TgZ(79,"p",26),o._uU(80,"Used for invoices and billing"),o.qZA(),o.qZA(),o.TgZ(81,"div",33),o.TgZ(82,"div",37),o.TgZ(83,"label"),o._uU(84,"Street Address"),o.qZA(),o.TgZ(85,"input",50),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.address.street=e}),o.qZA(),o.qZA(),o.TgZ(86,"div",34),o.TgZ(87,"label"),o._uU(88,"City"),o.qZA(),o.TgZ(89,"input",51),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.address.city=e}),o.qZA(),o.qZA(),o.TgZ(90,"div",34),o.TgZ(91,"label"),o._uU(92,"State / Region"),o.qZA(),o.TgZ(93,"input",52),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.address.state=e}),o.qZA(),o.qZA(),o.TgZ(94,"div",34),o.TgZ(95,"label"),o._uU(96,"Country"),o.qZA(),o.TgZ(97,"input",53),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.address.country=e}),o.qZA(),o.qZA(),o.TgZ(98,"div",34),o.TgZ(99,"label"),o._uU(100,"Zip / Postal Code"),o.qZA(),o.TgZ(101,"input",54),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().form.address.zip=e}),o.qZA(),o.qZA(),o.qZA(),o.TgZ(102,"footer",55),o.TgZ(103,"button",56),o.NdJ("click",function(){return o.CHM(t),o.oxw().cancel()}),o._uU(104,"Cancel"),o.qZA(),o.TgZ(105,"button",57),o.YNc(106,hE,2,0,"span",3),o.YNc(107,gE,2,0,"span",3),o.qZA(),o.qZA(),o.qZA(),o.TgZ(108,"form",30,58),o.NdJ("ngSubmit",function(){return o.CHM(t),o.oxw().saveNotifications()}),o.TgZ(110,"header",32),o.TgZ(111,"h4"),o._uU(112,"Notification Preferences"),o.qZA(),o.TgZ(113,"p",26),o._uU(114,"Choose how often we email you"),o.qZA(),o.qZA(),o.TgZ(115,"div",33),o.TgZ(116,"div",34),o.TgZ(117,"label"),o._uU(118,"Activity Summary"),o.qZA(),o.TgZ(119,"select",59),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().notifications.activity_summary=e}),o.TgZ(120,"option",60),o._uU(121,"Daily"),o.qZA(),o.TgZ(122,"option",61),o._uU(123,"Weekly"),o.qZA(),o.TgZ(124,"option",62),o._uU(125,"Monthly"),o.qZA(),o.TgZ(126,"option",63),o._uU(127,"Never"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(128,"div",34),o.TgZ(129,"label"),o._uU(130,"Send Alerts"),o.qZA(),o.TgZ(131,"select",64),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().notifications.send_alerts=e}),o.TgZ(132,"option",65),o._uU(133,"Every time"),o.qZA(),o.TgZ(134,"option",60),o._uU(135,"Daily"),o.qZA(),o.TgZ(136,"option",63),o._uU(137,"Never"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(138,"div",34),o.TgZ(139,"label"),o._uU(140,"App Updates"),o.qZA(),o.TgZ(141,"select",66),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().notifications.app_updates=e}),o.TgZ(142,"option",65),o._uU(143,"Every time"),o.qZA(),o.TgZ(144,"option",61),o._uU(145,"Weekly"),o.qZA(),o.TgZ(146,"option",63),o._uU(147,"Never"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(148,"div",34),o.TgZ(149,"label"),o._uU(150,"Product Updates"),o.qZA(),o.TgZ(151,"select",67),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().notifications.connect_product_updates=e}),o.TgZ(152,"option",65),o._uU(153,"Every time"),o.qZA(),o.TgZ(154,"option",61),o._uU(155,"Weekly"),o.qZA(),o.TgZ(156,"option",63),o._uU(157,"Never"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(158,"footer",55),o.TgZ(159,"button",68),o._uU(160,"Save Notifications"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(161,"div",69),o.TgZ(162,"header",32),o.TgZ(163,"h4",70),o._uU(164,"Danger Zone"),o.qZA(),o.TgZ(165,"p",26),o._uU(166,"Permanent actions that cannot be undone"),o.qZA(),o.qZA(),o.TgZ(167,"div",71),o.TgZ(168,"div",72),o.TgZ(169,"strong"),o._uU(170,"Delete Account"),o.qZA(),o.TgZ(171,"p",73),o._uU(172," This permanently deletes your sign-in account and 
1your AppyConnect customer record. Your connects, payment logs, and other historical data are retained per our retention policy but you'll lose access immediately. "),o.qZA(),o.qZA(),o.TgZ(173,"button",74),o.NdJ("click",function(){return o.CHM(t),o.oxw().openDeleteModal()}),o._uU(174,"Delete Account"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(11),o.Q6J("ngIf",t.saveMessage),o.xp6(1),o.Q6J("ngIf",t.saveError),o.xp6(5),o.Q6J("src",t.profileImageUrl,o.LSH),o.xp6(5),o.AsE("",t.form.firstName," ",t.form.lastName,""),o.xp6(2),o.Oqu(t.email),o.xp6(1),o.Q6J("ngIf",t.planName),o.xp6(24),o.Q6J("ngModel",t.form.firstName),o.xp6(4),o.Q6J("ngModel",t.form.lastName),o.xp6(4),o.Q6J("ngIf",t.emailVerified),o.xp6(1),o.Q6J("ngIf",!t.emailVerified),o.xp6(2),o.Q6J("value",t.email),o.xp6(1),o.Q6J("ngIf","cognito"===t.source),o.xp6(6),o.Q6J("ngModel",t.form.countryCode),o.xp6(4),o.Q6J("ngModel",t.form.phone),o.xp6(4),o.Q6J("ngModel",t.form.companyName),o.xp6(10),o.Q6J("ngModel",t.form.address.street),o.xp6(4),o.Q6J("ngModel",t.form.address.city),o.xp6(4),o.Q6J("ngModel",t.form.address.state),o.xp6(4),o.Q6J("ngModel",t.form.address.country),o.xp6(4),o.Q6J("ngModel",t.form.address.zip),o.xp6(4),o.Q6J("disabled",t.saving),o.xp6(1),o.Q6J("ngIf",!t.saving),o.xp6(1),o.Q6J("ngIf",t.saving),o.xp6(12),o.Q6J("ngModel",t.notifications.activity_summary),o.xp6(12),o.Q6J("ngModel",t.notifications.send_alerts),o.xp6(10),o.Q6J("ngModel",t.notifications.app_updates),o.xp6(10),o.Q6J("ngModel",t.notifications.connect_product_updates)}}function mE(t,e){if(1&t&&(o.TgZ(0,"div",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.emailModalError)}}function vE(t,e){if(1&t&&(o.TgZ(0,"div",75),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.emailModalMsg)}}function bE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"p",26),o._uU(2,"Enter your new email address. We'll send a verification code to confirm you own it."),o.qZA(),o.TgZ(3,"div",37),o.TgZ(4,"label"),o._uU(5,"Current Email"),o.qZA(),o._UZ(6,"input",41),o.qZA(),o.TgZ(7,"div",37),o.TgZ(8,"label"),o._uU(9,"New Email"),o.qZA(),o.TgZ(10,"input",89),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).newEmail=e}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("value",t.email),o.xp6(4),o.Q6J("ngModel",t.newEmail)("disabled",t.emailBusy)}}function xE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div"),o.TgZ(1,"p",26),o._uU(2,"We sent a verification code to "),o.TgZ(3,"strong"),o._uU(4),o.qZA(),o._uU(5,". Enter it below to confirm the change."),o.qZA(),o.TgZ(6,"div",37),o.TgZ(7,"label"),o._uU(8,"Verification Code"),o.qZA(),o.TgZ(9,"input",90),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).emailCode=e}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(4),o.Oqu(t.newEmail),o.xp6(5),o.Q6J("ngModel",t.emailCode)("disabled",t.emailBusy)}}function _E(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).sendEmailCode()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",t.emailBusy),o.xp6(1),o.hij(" ",t.emailBusy?"Sending\u2026":"Send Verification Code"," ")}}function CE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).confirmEmailCode()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",t.emailBusy),o.xp6(1),o.hij(" ",t.emailBusy?"Verifying\u2026":"Verify & Update"," ")}}function wE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeEmailModal()}),o.TgZ(1,"div",82),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"header",83),o.TgZ(3,"h3"),o._uU(4,"Change Email"),o.qZA(),o.TgZ(5,"button",84),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeEmailModal()}),o._uU(6,"\xd7"),o.qZA(),o.qZA(),o.TgZ(7,"div",85),o.YNc(8,mE,2,1,"div",13),o.YNc(9,vE,2,1,"div",12),o.YNc(10,bE,11,3,"div",3),o.YNc(11,xE,10,3,"div",3),o.qZA(),o.TgZ(12,"footer",86),o.TgZ(13,"button",87),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeEmailModal()}),o._uU(14,"Cancel"),o.qZA(),o.YNc(15,_E,2,2,"button",88),o.YNc(16,CE,2,2,"button",88),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(8),o.Q6J("ngIf",t.emailModalError),o.xp6(1),o.Q6J("ngIf",t.emailModalMsg),o.xp6(1),o.Q6J("ngIf","enter"===t.emailStep),o.xp6(1),o.Q6J("ngIf","verify"===t.emailStep),o.xp6(2),o.Q6J("disabled",t.emailBusy),o.xp6(2),o.Q6J("ngIf","enter"===t.emailStep),o.xp6(1),o.Q6J("ngIf","verify"===t.emailStep)}}function yE(t,e){1&t&&(o.TgZ(0,"div",85),o.TgZ(1,"div",94),o._UZ(2,"div",6),o.TgZ(3,"span"),o._uU(4,"Checking subscription status\u2026"),o.qZA(),o.qZA(),o.qZA())}
1function AE(t,e){if(1&t&&(o.TgZ(0,"div",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Oqu(t.deleteModalError)}}function ZE(t,e){1&t&&(o.TgZ(0,"div"),o.TgZ(1,"span",98),o._uU(2,"Auto-cancel:"),o.qZA(),o._uU(3," at period end "),o.qZA())}function kE(t,e){if(1&t&&(o.TgZ(0,"div"),o.TgZ(1,"span",98),o._uU(2,"Period ends:"),o.qZA(),o._uU(3),o.ALo(4,"date"),o.qZA()),2&t){const t=o.oxw(4);o.xp6(3),o.hij(" ",o.xi3(4,1,1e3*t.deleteSubscription.current_period_end,"mediumDate")," ")}}function TE(t,e){if(1&t&&(o.TgZ(0,"div",97),o.TgZ(1,"div"),o.TgZ(2,"span",98),o._uU(3,"Status:"),o.qZA(),o.TgZ(4,"strong"),o._uU(5),o.qZA(),o.qZA(),o.YNc(6,ZE,4,0,"div",3),o.YNc(7,kE,5,4,"div",3),o.qZA()),2&t){const t=o.oxw(3);o.xp6(5),o.Oqu(t.deleteSubscription.status),o.xp6(1),o.Q6J("ngIf",t.deleteSubscription.cancel_at_period_end),o.xp6(1),o.Q6J("ngIf",t.deleteSubscription.current_period_end)}}function OE(t,e){if(1&t&&(o.TgZ(0,"div",85),o.YNc(1,AE,2,1,"div",13),o.TgZ(2,"div",95),o.TgZ(3,"strong"),o._uU(4,"You have an active subscription."),o.qZA(),o._uU(5," Before you can delete your account, please cancel your subscription from the billing portal. Cancellation takes effect at the end of your current billing period. "),o.qZA(),o.YNc(6,TE,8,3,"div",96),o.TgZ(7,"p",26),o._uU(8,"Click below to open the Stripe billing portal where you can cancel your subscription. Once it ends, return here to delete your account."),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.deleteModalError),o.xp6(5),o.Q6J("ngIf",t.deleteSubscription)}}function ME(t,e){if(1&t&&(o.TgZ(0,"div",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Oqu(t.deleteModalError)}}function IE(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1," Your sign-in account will be deleted from your identity provider and your Connect record will be removed. "),o.TgZ(2,"strong"),o._uU(3,"You will lose access to Flozic Agent as well."),o.qZA(),o._uU(4," You will be signed out immediately and will not be able to sign back in with this email. "),o.qZA())}function SE(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1," Your Connect account and automations will be removed and you will be signed out of Connect immediately. "),o.TgZ(2,"strong"),o._uU(3,"Your Flozic sign-in and Flozic Agent access are not affected."),o.qZA(),o.qZA())}function PE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",85),o.YNc(1,ME,2,1,"div",13),o.TgZ(2,"p",99),o.TgZ(3,"strong"),o._uU(4,"What would you like to delete?"),o.qZA(),o.qZA(),o.TgZ(5,"div",100),o.TgZ(6,"label",101),o.TgZ(7,"input",102),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).deleteScope=e}),o.qZA(),o.TgZ(8,"span",103),o.TgZ(9,"span",104),o._uU(10,"Loop Flozic (Connect) account only"),o.qZA(),o.TgZ(11,"span",105),o._uU(12," Deletes your Connect account and its automations. "),o.TgZ(13,"strong"),o._uU(14,"Your Flozic sign-in stays active"),o.qZA(),o._uU(15," \u2014 you can still use Flozic Agent with this email. "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"label",106),o.TgZ(17,"input",107),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).deleteScope=e}),o.qZA(),o.TgZ(18,"span",103),o.TgZ(19,"span",104),o._uU(20,"My entire Flozic account"),o.qZA(),o.TgZ(21,"span",105),o._uU(22," Deletes your Flozic sign-in itself \u2014 so this "),o.TgZ(23,"strong"),o._uU(24,"also removes your access to Flozic Agent and every other Flozic product"),o.qZA(),o._uU(25,", not just Connect. "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"div",95),o.TgZ(27,"strong"),o._uU(28,"This action is permanent."),o.qZA(),o.YNc(29,IE,5,0,"span",3),o.YNc(30,SE,4,0,"span",3),o.qZA(),o.TgZ(31,"p",26),o._uU(32,"To confirm, type your email exactly: "),o.TgZ(33,"strong"),o._uU(34),o.qZA(),o.qZA(),o.TgZ(35,"div",37),o.TgZ(36,"label"),o._uU(37,"Confirm email"),o.qZA(),o.TgZ(38,"input",108),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).deleteConfirmEmail=e}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.deleteModalError),o.xp6(5),o.ekj("selected","connect"===t.deleteScope),o.xp6(1),o.Q6J("ngModel",t.deleteScope)("disabled",t.deleteBusy),o.xp6(9),o.ekj("selected","flozic"===t.deleteScope),o.xp6(1),o.Q6J("ngModel",t.deleteScope)("disabled",t.deleteBusy),o.xp6(12),o.Q6J("ngIf","flozic"===t.deleteScope),o.xp6(1),o.Q6J("ngIf","connect"===t.deleteScope),o.xp6(4),o.Oqu(t.email),o.xp6(4),o.Q6J("ngModel",t.deleteConfirmEmail)("disabled",t.deleteBusy)}}function NE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openBillingPortalFromDelete()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",t.deleteBusy),o.xp6(1),o.hij(" ",t.deleteBusy?"Opening\u2026":"Open Billing Portal"," ")}}function qE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",109),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).confirmDeleteAccount()}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",t.deleteBusy),o.xp6(1),o.hij(" ",t.deleteBusy?"Deleting\u2026":"flozic"===t.deleteScope?"Delete Entire Flozic Account":"Delete Connect Account"," ")}}function UE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDeleteModal()}),o.TgZ(1,"div",82),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"header",83),o.TgZ(3,"h3",70),o._uU(4,"Delete Account"),o.qZA(),o.TgZ(5,"button",84),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDeleteModal()}),o._uU(6,"\xd7"),o.qZA(),o.qZA(),o.YNc(7,yE,5,0,"div",92),o.YNc(8,OE,9,2,"div",92),o.YNc(9,PE,39,14,"div",92),o.TgZ(10,"footer",86),o.TgZ(11,"button",87),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDeleteModal()}),o._uU(12,"Cancel"),o.qZA(),o.YNc(13,NE,2,2,"button",88),o.YNc(14,qE,2,2,"button",93),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(7),o.Q6J("ngIf","checking"===t.deleteStep),o.xp6(1),o.Q6J("ngIf","has-subscription"===t.deleteStep),o.xp6(1),o.Q6J("ngIf","confirm"===t.deleteStep),o.xp6(2),o.Q6J("disabled",t.deleteBusy),o.xp6(2),o.Q6J("ngIf","has-subscription"===t.deleteStep),o.xp6(1),o.Q6J("ngIf","confirm"===t.deleteStep)}}
1function EE(t,e){if(1&t&&(o.TgZ(0,"div",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.pictureModalError)}}function FE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",114),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).removePicture()}),o._uU(1," Remove "),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",t.pictureBusy)}}function DE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw().closePictureModal()}),o.TgZ(1,"div",82),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"header",83),o.TgZ(3,"h3"),o._uU(4,"Change Profile Picture"),o.qZA(),o.TgZ(5,"button",84),o.NdJ("click",function(){return o.CHM(t),o.oxw().closePictureModal()}),o._uU(6,"\xd7"),o.qZA(),o.qZA(),o.TgZ(7,"div",85),o.YNc(8,EE,2,1,"div",13),o.TgZ(9,"p",26),o._uU(10," Paste a URL to an image (JPG, PNG, GIF, or WebP). You can use Gravatar, your personal site, or any public image URL. Leave blank and click Save to remove your picture. "),o.qZA(),o.TgZ(11,"div",110),o._UZ(12,"img",111),o.qZA(),o.TgZ(13,"div",37),o.TgZ(14,"label"),o._uU(15,"Image URL"),o.qZA(),o.TgZ(16,"input",112),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().newPictureUrl=e}),o.qZA(),o.qZA(),o.qZA(),o.TgZ(17,"footer",86),o.TgZ(18,"button",87),o.NdJ("click",function(){return o.CHM(t),o.oxw().closePictureModal()}),o._uU(19,"Cancel"),o.qZA(),o.YNc(20,FE,2,1,"button",113),o.TgZ(21,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw().savePicture()}),o._uU(22),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(8),o.Q6J("ngIf",t.pictureModalError),o.xp6(4),o.Q6J("src",t.newPictureUrl||"https://d23i99usg1q4tk.cloudfront.net/accounts/images/profile.png",o.LSH),o.xp6(4),o.Q6J("ngModel",t.newPictureUrl)("disabled",t.pictureBusy),o.xp6(2),o.Q6J("disabled",t.pictureBusy),o.xp6(2),o.Q6J("ngIf",t.profileImageUrl&&!t.profileImageUrl.includes("accounts/images/profile.png")),o.xp6(1),o.Q6J("disabled",t.pictureBusy),o.xp6(1),o.hij(" ",t.pictureBusy?"Saving\u2026":"Save"," ")}}let LE=(()=>{class t{constructor(t,e,n,i,o){this.cusService=t,this.planService=e,this.commonService=n,this.authService=i,this.router=o,this.isMenuBarActive=!0,this.loading=!0,this.saving=!1,this.saveMessage="",this.saveError="",this.source="cognito",this.emailVerified=!0,this.email="",this.planName="",this.profileImageUrl="",this.form={firstName:"",lastName:"",companyName:"",countryCode:"",phone:"",address:{street:"",city:"",state:"",zip:"",country:""}},this.notifications={activity_summary:"weekly",send_alerts:"every_time",app_updates:"every_time",new_apps:"every_time",new_app_integration:"every_time",connect_blog:"every_time",connect_product_updates:"every_time"},this.emailModalOpen=!1,this.emailStep="enter",this.newEmail="",this.emailCode="",this.emailBusy=!1,this.emailModalMsg="",this.emailModalError="",this.pictureModalOpen=!1,this.newPictureUrl="",this.pictureBusy=!1,this.pictureModalError="",this.deleteModalOpen=!1,this.deleteStep="checking",this.deleteSubscription=null,this.deletePortalType=null,this.deleteConfirmEmail="",this.deleteBusy=!1,this.deleteModalError="",this.deleteScope="connect"}ngOnInit(){this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.loadProfile()}loadProfile(){this.loading=!0,this.cusService.getMyProfile().subscribe(t=>{if(this.loading=!1,!t||!t.success)return void(this.saveError=t&&t.msg||"Could not load profile.");const e=t.profile||{};this.source=t.source||"local",this.email=e.email||"",this.emailVerified=!!e.emailVerified,this.planName=e.planName||"",this.profileImageUrl=e.picture||"https://d23i99usg1q4tk.cloudfront.net/accounts/images/profile.png",this.form.firstName=e.firstName||"",this.form.lastName=e.lastName||"",this.form.companyName=e.companyName||"",this.form.countryCode=e.countryCode||"",this.form.phone=e.phone||"",this.form.address=Object.assign({street:"",city:"",state:"",zip:"",country:""},e.address||{}),e.notifications&&Object.assign(this.notifications,e.notifications)},t=>{this.loading=!1,this.saveError="Could not load profile.",console.error(t)})}saveProfile(){this.saving=!0,this.saveError="",this.saveMessage="",this.cusService.updateMyProfile({firstName:this.form.firstName,lastName:this.form.lastName,companyName:this.form.companyName,countryCode:this.form.countryCode,phone:this.form.phone,address:this.form.address}).subscribe(t=>{this.saving=!1,t&&t.success?(this.saveMessage="Profile saved successfully.",setTimeout(()=>this.saveMessage="",4e3)):(this.saveError=t&&t.msg||"Could not save profile.",setTimeout(()=>this.saveError="",6e3))},()=>{this.saving=!1,this.saveError="Could not save profile. Please try again.",setTimeout(()=>this.saveError="",6e3)})}saveNotifications(){this.cusService.updateMyNotifications(this.notifications).subscribe(t=>{t&&t.success?(this.saveMessage="Notification preferences saved.",setTimeout(()=>this.saveMessage="",4e3)):(this.saveError=t&&t.msg||"Could not save notifications.",setTimeout(()=>this.saveError="",6e3))})}openEmailModal(){this.emailModalOpen=!0,this.emailStep="enter",this.newEmail
1="",this.emailCode="",this.emailModalMsg="",this.emailModalError=""}closeEmailModal(){this.emailModalOpen=!1,this.emailBusy=!1}sendEmailCode(){if(!this.emailBusy){if(this.emailModalError="",this.emailModalMsg="",!/^\S+@\S+\.\S+$/.test(this.newEmail))return void(this.emailModalError="Please enter a valid email address.");this.emailBusy=!0,this.cusService.initiateEmailChange(this.newEmail.toLowerCase().trim()).subscribe(t=>{this.emailBusy=!1,t&&t.success?(this.emailModalMsg=t.msg||"Verification code sent.",this.emailStep="verify"):this.emailModalError=t&&t.msg||"Could not send verification code."},()=>{this.emailBusy=!1,this.emailModalError="Network error. Please try again."})}}confirmEmailCode(){if(!this.emailBusy){if(this.emailModalError="",this.emailModalMsg="",!this.emailCode||this.emailCode.trim().length<4)return void(this.emailModalError="Please enter the verification code from your email.");this.emailBusy=!0,this.cusService.verifyEmailChange(this.emailCode.trim()).subscribe(t=>{this.emailBusy=!1,t&&t.success?(this.email=t.email||this.newEmail,this.emailModalMsg="Email updated successfully.",setTimeout(()=>{this.closeEmailModal(),this.loadProfile()},1200)):this.emailModalError=t&&t.msg||"Could not verify code."},()=>{this.emailBusy=!1,this.emailModalError="Network error. Please try again."})}}openPictureModal(){this.pictureModalOpen=!0,this.newPictureUrl=this.profileImageUrl||"",this.pictureModalError=""}closePictureModal(){this.pictureModalOpen=!1,this.pictureBusy=!1}savePicture(){this.pictureModalError="";const t=(this.newPictureUrl||"").trim();!t||/^https?:\/\/.+/i.test(t)?(this.pictureBusy=!0,this.cusService.updateMyProfile({picture:t}).subscribe(e=>{this.pictureBusy=!1,e&&e.success?(this.profileImageUrl=t||"https://d23i99usg1q4tk.cloudfront.net/accounts/images/profile.png",this.saveMessage="Profile picture updated.",setTimeout(()=>this.saveMessage="",4e3),this.closePictureModal()):this.pictureModalError=e&&e.msg||"Could not update picture."},()=>{this.pictureBusy=!1,this.pictureModalError="Network error. Please try again."})):this.pictureModalError="Please enter a valid image URL (starting with http:// or https://)"}removePicture(){this.newPictureUrl="",this.savePicture()}openDeleteModal(){this.deleteModalOpen=!0,this.deleteStep="checking",this.deleteSubscription=null,this.deleteConfirmEmail="",this.deleteModalError="",this.deleteScope="connect",this.cusService.checkDeleteAccount().subscribe(t=>{if(!t||!t.success)return this.deleteModalError=t&&t.msg||"Could not check subscription status.",void(this.deleteStep="confirm");t.hasActiveSubscription?(this.deleteSubscription=t.subscription,this.deletePortalType=t.portalType||null,this.deleteStep="has-subscription"):this.deleteStep="confirm"},()=>{this.deleteModalError="Network error. Please try again.",this.deleteStep="confirm"})}closeDeleteModal(){this.deleteModalOpen=!1,this.deleteBusy=!1}openBillingPortalFromDelete(){this.deleteBusy=!0,"stripe"===this.deletePortalType?this.planService.createStripePortalSession({}).subscribe(t=>{this.deleteBusy=!1,t&&t.success&&t.url?window.location.href=t.url:this.deleteModalError=t&&t.msg||"Could not open the billing portal."},()=>{this.deleteBusy=!1,this.deleteModalError="Could not open the billing portal."}):this.planService.billingOverview({}).subscribe(t=>{if(this.deleteBusy=!1,!t||!t.message)return void(this.deleteModalError="Could not open the billing dashboard.");const e=document.createElement("form");e.method="POST",e.target="_blank",e.action=`${go.N.commonPaymentUrl||"https://checkout.appypie.com"}/billing/dashboard`;const n=document.createElement("input");n.type="hidden",n.name="request",n.value=t.message,e.appendChild(n),document.body.appendChild(e),e.submit()},()=>{this.deleteBusy=!1,this.deleteModalError="Could not open the billing dashboard."})}confirmDeleteAccount(){this.deleteModalError="";const t=(this.deleteConfirmEmail||"").toLowerCase().trim();t===(this.email||"").toLowerCase()?(this.deleteBusy=!0,this.cusService.deleteMyAccount(t,this.deleteScope).subscribe(t=>{this.deleteBusy=!1,t&&t.success?this.authService.logout({originUrl:"/"}).subscribe(t=>{window.location.href=t&&t.redirectUrl?t.redirectUrl:"/"},()=>{window.location.href="/"}):t&&"ACTIVE_SUBSCRIPTION"===t.code?(this.deleteSubscription=t.subscription,this.deleteStep="has-subscription"):this.deleteModalError=t&&t.msg||"Could not delete account."},t=>{this.deleteBusy=!1,this.deleteModalError="Network error. Please try again.",console.error(t)}
1)):this.deleteModalError="The email you typed does not match your account email."}changePassword(){const t=encodeURIComponent(window.location.origin+"/auth/cognito/callback");window.open(`https://accounts.flozic.ai/forgotPassword?client_id=58b8gtnccnaio60rilfsffetrk&response_type=code&scope=openid+email+profile&redirect_uri=${t}`,"_blank")}cancel(){this.router.navigateByUrl("/connects")}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(Zr),o.Y36(wo.v),o.Y36(uo),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-profile"]],decls:7,vars:7,consts:[["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container"],[1,"profile-page"],["class","loading-state",4,"ngIf"],[4,"ngIf"],["class","modal-backdrop",3,"click",4,"ngIf"],[1,"loading-state"],[1,"spinner"],[1,"page-header"],[1,"subtitle"],[1,"btn-back",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M10 12L6 8L10 4","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","banner banner-success",4,"ngIf"],["class","banner banner-error",4,"ngIf"],[1,"profile-grid"],[1,"profile-sidebar"],[1,"panel","panel-avatar"],["role","button","title","Change profile picture",1,"avatar-ring",3,"click"],["alt","Profile picture",3,"src"],[1,"avatar-overlay"],["width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M14.1666 2.5L17.5 5.83333M11.6666 4.16667L15.8333 8.33333M3.33337 16.6667L7.50004 15.8333L17.0834 6.25C17.5 5.83333 17.5 5.41667 17.0834 5L15 2.91667C14.5834 2.5 14.1666 2.5 13.75 2.91667L4.16671 12.5L3.33337 16.6667Z","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"email"],["class","plan-pill",4,"ngIf"],[1,"btn-change-photo",3,"click"],[1,"panel","panel-account"],[1,"muted"],[1,"btn","btn-outline",3,"click"],["d","M4 7V5a4 4 0 0 1 8 0v2M3 7h10v6H3V7z","stroke","currentColor","stroke-width","1.4","stroke-linejoin","round"],[1,"profile-main"],[1,"panel",3,"ngSubmit"],["pf","ngForm"],[1,"panel-header"],[1,"field-grid"],[1,"field"],["type","text","name","firstName","maxlength","50",3,"ngModel","ngModelChange"],["type","text","name","lastName","maxlength","50",3,"ngModel","ngModelChange"],[1,"field","field-full"],["class","badge-verified",4,"ngIf"],["class","badge-unverified",4,"ngIf"],[1,"email-row"],["type","email","disabled","",3,"value"],["type","button","class","btn btn-outline btn-sm",3,"click",4,"ngIf"],[1,"hint"],[1,"field","field-narrow"],["type","text","name","countryCode","placeholder","+1","maxlength","6",3,"ngModel","ngModelChange"],[1,"field","field-wide"],["type","tel","name","phone","maxlength","20","placeholder","555 123 4567",3,"ngModel","ngModelChange"],["type","text","name","companyName","maxlength","100",3,"ngModel","ngModelChange"],[1,"panel-header","divider"],["type","text","name","addrStreet","maxlength","200",3,"ngModel","ngModelChange"],["type","text","name","addrCity","maxlength","80",3,"ngModel","ngModelChange"],["type","text","name","addrState","maxlength","80",3,"ngModel","ngModelChange"],["type","text","name","addrCountry","maxlength","80",3,"ngModel","ngModelChange"],["type","text","name","addrZip","maxlength","20",3,"ngModel","ngModelChange"],[1,"panel-actions"],["type","button",1,"btn","btn-ghost",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],["nf","ngForm"],["name","activity_summary",3,"ngModel","ngModelChange"],["value","daily"],["value","weekly"],["value","monthly"],["value","never"],["name","send_alerts",3,"ngModel","ngModelChange"],["value","every_time"],["name","app_updates",3,"ngModel","ngModelChange"],["name","connect_product_updates",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary"],[1,"panel","panel-danger"],[1,"text-danger"],[1,"danger-row",2,"display","flex","align-items","center","justify-content","space-between","gap","16px","flex-wrap","nowrap"],[2,"flex","1 1 auto","min-width","0"],[1,"muted","small"],[1,"btn","btn-danger",2,"flex-shrink","0","white-space","nowrap",3,"click"],[1,"banner","banner-success"],[1,"banner","banner-error"],[1,"plan-pill"],[1,"badge-verified"],[1,"badge-unverified"],["type","button",1,"btn","btn-outline","btn-sm",3,"click"],[1,"modal-backdrop",3,"click"],[1,"modal-card",3,"click"],[1,"modal-header"],["aria-label","Close",1,"modal-close",3,"click"],[1,"modal-body"],[1,"modal-footer"],[1,"btn","btn-ghost",3,"disabled","click"],["class","btn btn-primary",3,"disabled","click",4,"ngIf"],["type","email","placeholder","[email protected]","autofocus","",3,"ngModel","disabled","ngModelChange"],["type","text","placeholder","123456","inputmode","numeric","maxlength","10","autofocus","",3,"ngModel","disabled","ngModelChange"],[1,"btn","btn-primary",3,"disabled","click"],["class","modal-body",4,"ngIf"],["class","btn btn-danger",3,"disabled","click",4,"ngIf"],[1,"loading-state",2,"padding","24px 0"],[1,"banner","banner-warning"],["class","subscription-summary",4,"ngIf"],[1,"subscription-summary"],[1,"lbl"],[1,"delete-scope-question"],[1,"delete-scope-options"],[1,"delete-scope-option"],["type","radio","name","deleteScope","value","connect",3,"ngModel","disabled","ngModelChange"],[1,"scope-text"],[1,"scope-title"],[1,"scope-desc"],[1,"delete-scope-option","scope-danger"],["type","radio","name","deleteScope","value","flozic",3,"ngModel","disabled","ngModelChange"],["type","email","placeholder","Type your email to confirm","autofocus","",3,"ngModel","disabled","ngModelChange"],[1,"btn","btn-danger",3,"disabled","click"],[1,"picture-preview"],["alt","Preview","onerror","this.src='https://d23i99usg1q4tk.cloudfront.net/accounts/images/profile.png'",3,"src"],["type","url","placeholder","https://example.com/avatar.jpg",3,"ngModel","disabled","ngModelChange"],["class","btn btn-outline",3,"disabled","click",4,"ngIf"],[1,"btn","btn-outline",3,"disabled","click"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.YNc(2,sE,4,0,"div",2),o.YNc(3,fE,175,28,"div",3),o.YNc(4,wE,17,7,"div",4),o.YNc(5,UE,15,6,"div",4),o.YNc(6,DE,23,8,"div",4),o.qZA(),o.qZA()),2&t&&(o.ekj("menubaractive",e.isMenuBarActive),o.xp6(2),o.Q6J("ngIf",e.loading),o.xp6(1),o.Q6J("ngIf",!e.loading),o.xp6(1),o.Q6J("ngIf",e.emailModalOpen),o.xp6(1),o.Q6J("ngIf",e.deleteModalOpen),o.xp6(1),o.Q6J("ngIf",e.pictureModalOpen))},directives:[to.O5,Xi._Y,Xi.JL,Xi.F,Xi.Fj,Xi.nD,Xi.JJ,Xi.On,Xi.EJ,Xi.YN,Xi.Kr,Xi._],pipes:[to.uU],styles:[".profile-page[_ngcontent-%COMP%]{padding:24px 32px;max-width:1200px;margin:0 auto}.profile-page[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;grid-gap:12px;gap:12px;padding:80px 0;color:#6b7280}.profile-page[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]   .spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:2px solid #e5e7eb;border-top-color:#4f46e5;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.profile-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.profile-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:24px;font-weight:600;margin:0;color:#111827}.profile-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;margin:4px 0 0}.profile-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;background:transparent;border:1px solid #e5e7eb;color:#4b5563;padding:8px 14px;border-radius:6px;font-size:13px;
1cursor:pointer}.profile-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]:hover{background:#f9fafb;color:#111827}.profile-page[_ngcontent-%COMP%]   .banner[_ngcontent-%COMP%]{padding:10px 16px;border-radius:6px;font-size:14px;margin-bottom:16px}.profile-page[_ngcontent-%COMP%]   .banner.banner-success[_ngcontent-%COMP%]{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}.profile-page[_ngcontent-%COMP%]   .banner.banner-error[_ngcontent-%COMP%]{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.profile-page[_ngcontent-%COMP%]   .banner.banner-warning[_ngcontent-%COMP%]{background:#fffbeb;color:#92400e;border:1px solid #fde68a}.profile-page[_ngcontent-%COMP%]   .text-danger[_ngcontent-%COMP%]{color:#dc2626}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]{border-color:#fecaca}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]   .danger-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;grid-gap:16px;gap:16px;flex-wrap:nowrap}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]   .danger-row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]   .danger-row[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{flex-shrink:0;white-space:nowrap}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]   .danger-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#111827;font-size:14px}.profile-page[_ngcontent-%COMP%]   .panel-danger[_ngcontent-%COMP%]   .danger-row[_ngcontent-%COMP%]   .small[_ngcontent-%COMP%]{font-size:12px;margin:4px 0 0}.profile-page[_ngcontent-%COMP%]   .btn.btn-danger[_ngcontent-%COMP%]{background:#dc2626;color:#fff}.profile-page[_ngcontent-%COMP%]   .btn.btn-danger[_ngcontent-%COMP%]:hover:not([disabled]){background:#b91c1c}.profile-page[_ngcontent-%COMP%]   .subscription-summary[_ngcontent-%COMP%]{background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;padding:12px 14px;margin:12px 0 8px;font-size:13px;display:flex;flex-direction:column;grid-gap:4px;gap:4px}.profile-page[_ngcontent-%COMP%]   .subscription-summary[_ngcontent-%COMP%]   .lbl[_ngcontent-%COMP%]{color:#6b7280;display:inline-block;min-width:110px}.profile-page[_ngcontent-%COMP%]   .profile-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:320px 1fr;grid-gap:24px;gap:24px}@media (max-width: 992px){.profile-page[_ngcontent-%COMP%]   .profile-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.profile-page[_ngcontent-%COMP%]   .profile-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:16px;gap:16px}.profile-page[_ngcontent-%COMP%]   .panel[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:24px;box-shadow:0 1px 2px #0000000a}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]{text-align:center}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .avatar-ring[_ngcontent-%COMP%]{position:relative;width:88px;height:88px;margin:0 auto 12px;border-radius:50%;overflow:hidden;background:#f3f4f6;border:3px solid #fff;box-shadow:0 2px 8px #00000014;cursor:pointer}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .avatar-ring[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .avatar-ring[_ngcontent-%COMP%]   .avatar-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .avatar-ring[_ngcontent-%COMP%]:hover   .avatar-overlay[_ngcontent-%COMP%]{opacity:1}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:17px;font-weight:600;margin:0;color:#111827}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;margin:4px 0 12px;word-break:break-all}
1.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .plan-pill[_ngcontent-%COMP%]{display:inline-block;background:linear-gradient(90deg,#4f46e5,#7c3aed);color:#fff;font-size:11px;font-weight:600;padding:4px 10px;border-radius:12px;letter-spacing:.5px}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .btn-change-photo[_ngcontent-%COMP%]{display:block;margin:14px auto 0;padding:6px 14px;background:transparent;border:1px solid #d1d5db;border-radius:6px;color:#4b5563;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s}.profile-page[_ngcontent-%COMP%]   .panel-avatar[_ngcontent-%COMP%]   .btn-change-photo[_ngcontent-%COMP%]:hover{background:#f9fafb;color:#4f46e5;border-color:#c7d2fe}.profile-page[_ngcontent-%COMP%]   .picture-preview[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:16px 0}.profile-page[_ngcontent-%COMP%]   .picture-preview[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:96px;height:96px;border-radius:50%;-o-object-fit:cover;object-fit:cover;border:2px solid #e5e7eb;background:#f3f4f6}.profile-page[_ngcontent-%COMP%]   .modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(17,24,39,.5);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}.profile-page[_ngcontent-%COMP%]   .modal-card[_ngcontent-%COMP%]{background:#fff;border-radius:12px;width:100%;max-width:460px;max-height:90vh;overflow:auto;box-shadow:0 20px 50px #00000040}.profile-page[_ngcontent-%COMP%]   .modal-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #f3f4f6}.profile-page[_ngcontent-%COMP%]   .modal-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:17px;font-weight:600;margin:0;color:#111827}.profile-page[_ngcontent-%COMP%]   .modal-header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]{background:transparent;border:none;font-size:24px;line-height:1;color:#9ca3af;cursor:pointer;padding:0 4px}.profile-page[_ngcontent-%COMP%]   .modal-header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]:hover{color:#111827}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{padding:18px 22px}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .muted[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;line-height:1.5;margin:0 0 14px}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-question[_ngcontent-%COMP%]{font-size:14px;color:#111827;margin:0 0 10px}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:10px;gap:10px;margin-bottom:16px}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;grid-gap:10px;gap:10px;padding:12px 14px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]:hover{border-color:#d1d5db;background:#fafafa}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin-top:3px;flex:0 0 auto;cursor:pointer}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]   .scope-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:3px;gap:3px}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]   .scope-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option[_ngcontent-%COMP%]   .scope-desc[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;line-height:1.5}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option.selected[_ngcontent-%COMP%]{border-color:#6366f1;background:#eef2ff}
1.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option.scope-danger.selected[_ngcontent-%COMP%]{border-color:#dc2626;background:#fef2f2}.profile-page[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]   .delete-scope-option.scope-danger.selected[_ngcontent-%COMP%]   .scope-title[_ngcontent-%COMP%]{color:#991b1b}.profile-page[_ngcontent-%COMP%]   .modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-gap:8px;gap:8px;padding:14px 22px;border-top:1px solid #f3f4f6}.profile-page[_ngcontent-%COMP%]   .btn.btn-sm[_ngcontent-%COMP%]{padding:6px 12px;font-size:12px}.profile-page[_ngcontent-%COMP%]   .badge-verified[_ngcontent-%COMP%], .profile-page[_ngcontent-%COMP%]   .badge-unverified[_ngcontent-%COMP%]{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin-left:6px}.profile-page[_ngcontent-%COMP%]   .badge-verified[_ngcontent-%COMP%]{background:#d1fae5;color:#065f46}.profile-page[_ngcontent-%COMP%]   .badge-unverified[_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.profile-page[_ngcontent-%COMP%]   .email-row[_ngcontent-%COMP%]{display:flex;grid-gap:8px;gap:8px;align-items:center}.profile-page[_ngcontent-%COMP%]   .email-row[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{flex:1}.profile-page[_ngcontent-%COMP%]   .panel-account[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:14px;font-weight:600;margin:0 0 8px;color:#111827}.profile-page[_ngcontent-%COMP%]   .panel-account[_ngcontent-%COMP%]   .muted[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;line-height:1.5;margin-bottom:14px}.profile-page[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]{margin-bottom:16px}.profile-page[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:16px;font-weight:600;margin:0;color:#111827}.profile-page[_ngcontent-%COMP%]   .panel-header[_ngcontent-%COMP%]   .muted[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;margin:2px 0 0}.profile-page[_ngcontent-%COMP%]   .panel-header.divider[_ngcontent-%COMP%]{padding-top:24px;margin-top:24px;border-top:1px solid #f3f4f6}.profile-page[_ngcontent-%COMP%]   .field-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:14px 16px;gap:14px 16px}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]{display:flex;flex-direction:column}.profile-page[_ngcontent-%COMP%]   .field.field-full[_ngcontent-%COMP%]{grid-column:1/-1}.profile-page[_ngcontent-%COMP%]   .field.field-narrow[_ngcontent-%COMP%]{grid-column:span 1}.profile-page[_ngcontent-%COMP%]   .field.field-wide[_ngcontent-%COMP%]{grid-column:span 1}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#4b5563;margin-bottom:6px;text-transform:none}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{width:100%;padding:9px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;color:#111827;background:#fff;transition:border-color .15s,box-shadow .15s}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px #4f46e51f}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:disabled, .profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]:disabled{background:#f9fafb;color:#6b7280;cursor:not-allowed}.profile-page[_ngcontent-%COMP%]   .field[_ngcontent-%COMP%]   .hint[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;margin-top:4px}@media (min-width: 600px){.profile-page[_ngcontent-%COMP%]   .field-grid[_ngcontent-%COMP%]   .field.field-narrow[_ngcontent-%COMP%]{grid-column:span 1;max-width:140px}.profile-page[_ngcontent-%COMP%]   .field-grid[_ngcontent-%COMP%]   .field.field-wide[_ngcontent-%COMP%]{grid-column:span 1}}.profile-page[_ngcontent-%COMP%]   .panel-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-gap:10px;gap:10px;margin-top:22px;padding-top:18px;border-top:1px solid #f3f4f6}.profile-page[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;padding:9px 18px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .15s}.profile-page[_ngcontent-%COMP%]   .btn[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.profile-page[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]{background:#4f46e5;color:#fff}.profile-page[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]:hover:not([disabled]){background:#4338ca}.profile-page[_ngcontent-%COMP%]   .btn.btn-outline[_ngcontent-%COMP%]{background:#fff;color:#4f46e5;border-color:#c7d2fe}.profile-page[_ngcontent-%COMP%]   .btn.btn-outline[_ngcontent-%COMP%]:hover{background:#eef2ff;border-color:#a5b4fc}.profile-page[_ngcontent-%COMP%]   .btn.btn-ghost[_ngcontent-%COMP%]{background:transparent;color:#6b7280}.profile-page[_ngcontent-%COMP%]   .btn.btn-ghost[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#111827}"]}),t})(),JE=(()=>{class t{constructor(t){this.apiService=t}searchCustomers(t,e=20){return this.apiService.request("get",`admin/customers/search?q=${encodeURIComponent(t)}&limit=${e}`,{})}startImpersonation(t){return this.apiService.request("post","admin/impersonate/start",{customerId:t})}stopImpersonation(){return this.apiService.request("post","admin/impersonate/stop",{})}restoreConnect(t){return this.apiService.request("post","admin/restore-connect",t)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(co.s))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();
1function jE(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",19),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.error)}}function RE(t,e){1&t&&(o.TgZ(0,"span",20),o._uU(1,"Searching\u2026"),o.qZA())}function $E(t,e){if(1&t&&(o.TgZ(0,"div",21),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.AsE(" ",t.results.length," result",1!==t.results.length?"s":""," found ")}}function BE(t,e){1&t&&(o.TgZ(0,"span",38),o._uU(1,"sub-user"),o.qZA())}function HE(t,e){1&t&&(o.TgZ(0,"span",31),o._uU(1,"\xb7"),o.qZA())}function QE(t,e){1&t&&(o.TgZ(0,"span",39),o._uU(1,"Cognito"),o.qZA())}function YE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",40),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(2).restoreConnect(e)}),o._uU(1),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.Q6J("disabled",e.restoring===t.customerId),o.xp6(1),o.hij(" ",e.restoring===t.customerId?"Restoring\u2026":"Restore"," ")}}function zE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",24),o.TgZ(1,"div",25),o.TgZ(2,"div",26),o.TgZ(3,"span",27),o._uU(4),o.qZA(),o.YNc(5,BE,2,0,"span",28),o.qZA(),o.TgZ(6,"div",29),o.TgZ(7,"span",30),o._uU(8),o.qZA(),o.TgZ(9,"span",31),o._uU(10,"\xb7"),o.qZA(),o.TgZ(11,"span",32),o._uU(12),o.qZA(),o.YNc(13,HE,2,0,"span",33),o.YNc(14,QE,2,0,"span",34),o.qZA(),o.qZA(),o.TgZ(15,"div",35),o.YNc(16,YE,2,2,"button",36),o.TgZ(17,"button",37),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).loginAs(e)}),o._uU(18),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(3),o.s9C("title",t.email),o.xp6(1),o.Oqu(t.email),o.xp6(1),o.Q6J("ngIf",t.isSubUser),o.xp6(3),o.AsE("",t.firstName," ",t.lastName,""),o.xp6(3),o.s9C("title",t.customerId),o.xp6(1),o.Oqu(t.customerId),o.xp6(1),o.Q6J("ngIf",t.cognitoSub),o.xp6(1),o.Q6J("ngIf",t.cognitoSub),o.xp6(2),o.Q6J("ngIf",n.canRestore(t)),o.xp6(1),o.Q6J("disabled",n.starting===t.customerId),o.xp6(1),o.hij(" ",n.starting===t.customerId?"Starting\u2026":"Login as"," ")}}function VE(t,e){if(1&t&&(o.TgZ(0,"div",22),o.YNc(1,zE,19,12,"div",23),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.results)}}function GE(t,e){if(1&t&&(o.TgZ(0,"div",41),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.hij(' No customers match "',t.query,'". ')}}function WE(t,e){1&t&&(o.TgZ(0,"div",42),o._uU(1," Start typing to search across email, name, and customerId. "),o.qZA())}function KE(t,e){if(1&t&&(o.TgZ(0,"div",52),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.restoreError)}}function XE(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",43),o.NdJ("click",function(){return o.CHM(t),o.oxw().cancelRestore()}),o.TgZ(1,"div",44),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"h2",45),o._uU(3,"Restore Connect"),o.qZA(),o.TgZ(4,"p",46),o._uU(5,"Restore Connect for "),o.TgZ(6,"strong"),o._uU(7),o.qZA(),o._uU(8,"?"),o.qZA(),o.TgZ(9,"p",47),o._uU(10,"This "),o.TgZ(11,"strong"),o._uU(12,"reactivates"),o.qZA(),o._uU(13," the account and lifts the deletion block \u2014 the email and sign-in are restored, and the user can sign in again. This action is logged in the audit trail."),o.qZA(),o.YNc(14,KE,2,1,"div",48),o.TgZ(15,"div",49),o.TgZ(16,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw().cancelRestore()}),o._uU(17,"Cancel"),o.qZA(),o.TgZ(18,"button",51),o.NdJ("click",function(){return o.CHM(t),o.oxw().doRestore()}),o._uU(19),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(7),o.Oqu(t.confirmTargetEmail),o.xp6(7),o.Q6J("ngIf",t.restoreError),o.xp6(2),o.Q6J("disabled",t.restoring),o.xp6(2),o.Q6J("disabled",t.restoring),o.xp6(1),o.hij(" ",t.restoring?"Restoring\u2026":"Restore Connect"," ")}}function tF(t,e){if(1&t&&(o.TgZ(0,"div",53),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.toast)}}let eF=(()=>{class t{constructor(t,e,n){this.adminService=t,this.cusService=e,this.router=n,this.query="",this.loading=!1,this.results=[],this.error="",this.starting="",this.restoring="",this.confirmTarget=null,this.restoreError="",this.toast="",this.search$=new fo.xQ}ngOnInit(){this.cusService.getCurrentUser({}).subscribe(t=>{(!t||!t.isAdmin)&&this.router.navigateByUrl("/connects")}),this.search$.pipe(ad(300),Wr()).subscribe(t=>this.runSearch(t))}onInput(){this.search$.next(this.query)}runSearch(t){!t||t.trim().length<2?this.results=[]:(this.loading=!0,this.error="",this.adminService.searchCustomers(t.trim()).subscribe(t=>{this.loading=!1,t&&t.success?this.results=t.results||[]:this.error=t&&t.msg||"Search failed"},t=>{this.loading=!1,this.error="Search request failed",console.error(t)}))}loginAs(t){this.starting||!confirm(`Login as ${t.email}?\n\nAll activity from this point will be logged in audit trail.`)||(this.starting=t.customerId,this.adminService.startImpersonation(t.customerId).subscribe(t=>{this.starting="",t&&t.success?window.location.href="/connects":this.error=t&&t.msg||"Could not start impersonation"},()=>{this.starting="",this.error="Network error starting impersonation"}))}canRestore(t){return!(!t||"connect"!==t.deleted_scope)}restoreConnect(t){this.restoring||this.starting||(this.restoreError="",this.confirmTarget=t)}get confirmTargetEmail(){return this.confirmTarget?(this.confirmTarget.email||"").replace(/_deleted$/i,""):""}cancelRestore(){this.restoring||(this.confirmTarget=null,this.restoreError="")}doRestore(){if(!this.confirmTarget||this.restoring)return;const t=this.confirmTarget,e=(t.email||"").replace(/_deleted$/i,"");this.restoring=t.customerId,this.restoreError="",this.adminService.restoreConnect({customerId:t.customerId}).subscribe(t=>
1{if(this.restoring="",t&&t.success){this.confirmTarget=null;const n=t.restoredCount;this.showToast(`Reactivated ${e} (${n} record${1===n?"":"s"}).`+(t.cognitoIdentityWasDeleted?" Its Flozic sign-in was deleted \u2014 the user must sign up again with this email.":" The account is reactivated; the user can sign in again.")),this.runSearch(this.query)}else this.restoreError=t&&t.msg||"Could not restore Connect"},()=>{this.restoring="",this.restoreError="Network error restoring Connect"})}showToast(t){this.toast=t,setTimeout(()=>{this.toast=""},6e3)}cancel(){this.router.navigateByUrl("/connects")}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(JE),o.Y36(yo),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-admin-customers"]],decls:24,vars:9,consts:[["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container"],[1,"admin-page"],[1,"page-header"],[1,"subtitle"],[1,"btn-back",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M10 12L6 8L10 4","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","banner banner-error",4,"ngIf"],[1,"search-box"],["width","18","height","18","viewBox","0 0 20 20","fill","none",1,"icon"],["d","M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16zM15 15l4 4","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","text","placeholder","Search by email, name, or customerId (min 2 chars)","autofocus","",3,"ngModel","ngModelChange","input"],["class","hint",4,"ngIf"],["class","results-count",4,"ngIf"],["class","results",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","empty-state muted",4,"ngIf"],["class","admin-modal-backdrop",3,"click",4,"ngIf"],["class","admin-toast",4,"ngIf"],[1,"banner","banner-error"],[1,"hint"],[1,"results-count"],[1,"results"],["class","result-row",4,"ngFor","ngForOf"],[1,"result-row"],[1,"info"],[1,"email"],[1,"email-text",3,"title"],["class","sub-badge",4,"ngIf"],[1,"meta"],[1,"name-text"],[1,"dot"],[1,"customer-id",3,"title"],["class","dot",4,"ngIf"],["class","cog-badge",4,"ngIf"],[1,"row-actions"],["class","btn btn-restore",3,"disabled","click",4,"ngIf"],[1,"btn","btn-primary",3,"disabled","click"],[1,"sub-badge"],[1,"cog-badge"],[1,"btn","btn-restore",3,"disabled","click"],[1,"empty-state"],[1,"empty-state","muted"],[1,"admin-modal-backdrop",3,"click"],["role","dialog","aria-modal","true",1,"admin-modal",3,"click"],[1,"admin-modal-title"],[1,"admin-modal-text"],[1,"admin-modal-text","muted"],["class","admin-modal-error",4,"ngIf"],[1,"admin-modal-actions"],[1,"btn","admin-btn-ghost",3,"disabled","click"],[1,"btn","admin-btn-confirm",3,"disabled","click"],[1,"admin-modal-error"],[1,"admin-toast"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div"),o.TgZ(4,"h1"),o._uU(5,"Admin \xb7 Customer Login"),o.qZA(),o.TgZ(6,"p",3),o._uU(7,"Search and sign in as any customer for support purposes. All activity is logged."),o.qZA(),o.qZA(),o.TgZ(8,"button",4),o.NdJ("click",function(){return e.cancel()}),o.O4$(),o.TgZ(9,"svg",5),o._UZ(10,"path",6),o.qZA(),o._uU(11," Back "),o.qZA(),o.qZA(),o.YNc(12,jE,2,1,"div",7),o.kcU(),o.TgZ(13,"div",8),o.O4$(),o.TgZ(14,"svg",9),o._UZ(15,"path",10),o.qZA(),o.kcU(),o.TgZ(16,"input",11),o.NdJ("ngModelChange",function(t){return e.query=t})("input",function(){return e.onInput()}),o.qZA(),o.YNc(17,RE,2,0,"span",12),o.qZA(),o.YNc(18,$E,2,2,"div",13),o.YNc(19,VE,2,1,"div",14),o.YNc(20,GE,2,1,"div",15),o.YNc(21,WE,2,0,"div",16),o.YNc(22,XE,20,5,"div",17),o.YNc(23,tF,2,1,"div",18),o.qZA(),o.qZA()),2&t&&(o.xp6(12),o.Q6J("ngIf",e.error),o.xp6(4),o.Q6J("ngModel",e.query),o.xp6(1),o.Q6J("ngIf",e.loading),o.xp6(1),o.Q6J("ngIf",e.results.length>0),o.xp6(1),o.Q6J("ngIf",e.results.length>0),o.xp6(1),o.Q6J("ngIf",!e.loading&&e.query.length>=2&&0===e.results.length&&!e.error),o.xp6(1),o.Q6J("ngIf",!e.query),o.xp6(1),o.Q6J("ngIf",e.confirmTarget),o.xp6(1),o.Q6J("ngIf",e.toast))},directives:[to.O5,Xi.Fj,Xi.JJ,Xi.On,to.sg],styles:[".admin-page[_ngcontent-%COMP%]{padding:24px 32px;max-width:900px;margin:0 auto;min-height:calc(100vh - 80px);box-sizing:border-box}@media (max-width: 768px){.admin-page[_ngcontent-%COMP%]{padding:16px}}
1.admin-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:24px;grid-gap:16px;gap:16px;flex-wrap:wrap}.admin-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:22px;font-weight:600;margin:0;color:#111827}.admin-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:#6b7280;font-size:14px;margin:4px 0 0}.admin-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;flex-shrink:0;background:transparent;border:1px solid #e5e7eb;color:#4b5563;padding:8px 14px;border-radius:6px;font-size:13px;cursor:pointer;white-space:nowrap}.admin-page[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .btn-back[_ngcontent-%COMP%]:hover{background:#f9fafb;color:#111827}.admin-page[_ngcontent-%COMP%]   .banner[_ngcontent-%COMP%]{padding:10px 16px;border-radius:6px;font-size:14px;margin-bottom:16px;word-break:break-word}
1.admin-page[_ngcontent-%COMP%]   .banner.banner-error[_ngcontent-%COMP%]{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;background:#fff;border:1px solid #d1d5db;border-radius:8px;padding:10px 14px;margin-bottom:12px}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{color:#6b7280;flex-shrink:0}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;min-width:0;font-size:15px;color:#111827;background:transparent}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::-moz-placeholder{color:#9ca3af}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.admin-page[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]   .hint[_ngcontent-%COMP%]{color:#6b7280;font-size:12px;white-space:nowrap;flex-shrink:0}
1.admin-page[_ngcontent-%COMP%]   .results-count[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;margin-bottom:8px;padding:0 2px}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;max-height:calc(100vh - 260px);overflow-y:auto}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #f3f4f6;grid-gap:12px;gap:12px}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]:hover{background:#f9fafb}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{flex:1;min-width:0}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#111827;display:flex;align-items:center;grid-gap:6px;gap:6px;flex-wrap:nowrap;min-width:0}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]   .email-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]{font-size:12px;color:#6b7280;margin-top:3px;display:flex;align-items:center;grid-gap:4px;gap:4px;flex-wrap:wrap}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{color:#d1d5db;flex-shrink:0}
1.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]   .name-text[_ngcontent-%COMP%]{white-space:nowrap}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]   .customer-id[_ngcontent-%COMP%]{font-family:ui-monospace,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px;display:inline-block}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .sub-badge[_ngcontent-%COMP%], .admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .cog-badge[_ngcontent-%COMP%]{font-size:10px;font-weight:600;flex-shrink:0;padding:2px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .sub-badge[_ngcontent-%COMP%]{background:#fef3c7;color:#92400e}.admin-page[_ngcontent-%COMP%]   .results[_ngcontent-%COMP%]   .result-row[_ngcontent-%COMP%]   .cog-badge[_ngcontent-%COMP%]{background:#dbeafe;color:#1e40af}.admin-page[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%]{text-align:center;color:#6b7280;font-size:14px;padding:32px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:8px}.admin-page[_ngcontent-%COMP%]   .empty-state.muted[_ngcontent-%COMP%]{background:transparent;border:1px dashed #e5e7eb}.admin-page[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]{background:#4f46e5;color:#fff;border:1px solid transparent;padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;flex-shrink:0}
1.admin-page[_ngcontent-%COMP%]   .btn.btn-primary[_ngcontent-%COMP%]:hover:not([disabled]){background:#4338ca}.admin-page[_ngcontent-%COMP%]   .btn.btn-primary[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.admin-page[_ngcontent-%COMP%]   .row-actions[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;flex-shrink:0}.admin-page[_ngcontent-%COMP%]   .btn.btn-restore[_ngcontent-%COMP%]{background:#fff;color:#b45309;border:1px solid #fcd34d;padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;flex-shrink:0}.admin-page[_ngcontent-%COMP%]   .btn.btn-restore[_ngcontent-%COMP%]:hover:not([disabled]){background:#fffbeb}.admin-page[_ngcontent-%COMP%]   .btn.btn-restore[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.admin-page[_ngcontent-%COMP%]   .admin-modal-backdrop[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:rgba(17,24,39,.55);display:flex;align-items:center;justify-content:center;padding:24px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]{background:#fff;border-radius:12px;width:100%;max-width:460px;padding:24px 24px 20px;box-shadow:0 20px 40px #0003}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-modal-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#111827;margin:0 0 12px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-modal-text[_ngcontent-%COMP%]{font-size:14px;line-height:1.6;color:#374151;margin:0 0 12px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-modal-text.muted[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-modal-error[_ngcontent-%COMP%]{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;border-radius:8px;padding:10px 12px;font-size:13px;margin:4px 0 12px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-gap:10px;gap:10px;margin-top:18px}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-ghost[_ngcontent-%COMP%]{background:#fff;color:#374151;border:1px solid #e5e7eb;padding:8px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-ghost[_ngcontent-%COMP%]:hover:not([disabled]){background:#f9fafb}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-ghost[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-confirm[_ngcontent-%COMP%]{background:#b45309;color:#fff;border:1px solid transparent;padding:8px 16px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-confirm[_ngcontent-%COMP%]:hover:not([disabled]){background:#92400e}.admin-page[_ngcontent-%COMP%]   .admin-modal[_ngcontent-%COMP%]   .admin-btn-confirm[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.admin-page[_ngcontent-%COMP%]   .admin-toast[_ngcontent-%COMP%]{position:fixed;left:50%;bottom:28px;transform:translate(-50%);z-index:1100;max-width:90vw;background:#065f46;color:#fff;padding:12px 18px;border-radius:8px;font-size:13px;line-height:1.5;box-shadow:0 8px 24px #00000040}"]}),t})();function nF(t,e){1&t&&(o.TgZ(0,"div",16),o._UZ(1,"img",17),o.qZA())}function iF(t,e){1&t&&(o.TgZ(0,"div",18),o._UZ(1,"img",19),o.qZA())}function oF(t,e){if(1&t&&(o.TgZ(0,"h3",27),o._uU(1," We\u2019re setting up your Integration Dashboard!"),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("innerText",t.isNoop?"This is already your current plan":"successtrial"==t.successtrial?t.translation.TRIAL_PAYMENT_SUCCESS_HEADING:t.translation.UPGRADE_PAYMENT_SUCCESS_HEADING)}}function rF(t,e){1&t&&(o.TgZ(0,"h6",28),o._uU(1,"No changes were made \u2014 you\u2019re already subscribed to this plan."),o.qZA())}function sF(t,e){if(1&t&&(o.TgZ(0,"h3",27),o._uU(1,"We\u2019re setting up your Integration Dashboard!"),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("innerText",t.translation.PAYMENT_FAILED_HEADING)}}function aF(t,e){1&t&&(o.TgZ(0,"h6",28),o._uU(1,"You\u2019ll be ready to start automating shortly."),o.qZA())}function cF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",29),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).tryPlan()}),o._uU(1,"Try Again"),o.qZA()}}function lF(t,e){1&t&&(o.TgZ(0,"p",35),o._uU(1," Please don\u2019t close this window while we finish setting things up. "),o.qZA())}
1function dF(t,e){if(1&t&&(o.TgZ(0,"p",28),o._uU(1," Need help? Reach us at "),o.TgZ(2,"strong"),o._uU(3),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(3),o.Oqu(t.appyConfig.supportEmail)}}function uF(t,e){if(1&t&&(o.TgZ(0,"p",28),o._uU(1," Need help? Reach us at "),o.TgZ(2,"strong"),o._uU(3),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(3),o.Oqu(t.appyConfig.supportEmail)}}function pF(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"div",30),o.TgZ(2,"div",31),o.TgZ(3,"div",32),o._UZ(4,"div",33),o.qZA(),o.qZA(),o.qZA(),o.YNc(5,lF,2,0,"p",34),o.YNc(6,dF,4,1,"p",22),o.YNc(7,uF,4,1,"p",22),o.BQk()),2&t){const t=o.oxw(2);o.xp6(5),o.Q6J("ngIf",!t.isNoop),o.xp6(1),o.Q6J("ngIf","cancel"!=t.successtrial),o.xp6(1),o.Q6J("ngIf","cancel"==t.successtrial)}}function hF(t,e){if(1&t&&(o.TgZ(0,"div",20),o.YNc(1,oF,2,1,"h3",21),o.YNc(2,rF,2,0,"h6",22),o.YNc(3,sF,2,1,"h3",21),o.YNc(4,aF,2,0,"h6",22),o._UZ(5,"h6",23),o.TgZ(6,"div",24),o.YNc(7,cF,2,0,"button",25),o.YNc(8,pF,8,3,"ng-container",26),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf","cancel"!=t.successtrial),o.xp6(1),o.Q6J("ngIf",t.isNoop),o.xp6(1),o.Q6J("ngIf","cancel"==t.successtrial),o.xp6(1),o.Q6J("ngIf","successtrial"==t.successtrial),o.xp6(3),o.Q6J("ngIf","cancel"==t.successtrial&&t.planId&&t.custPlan),o.xp6(1),o.Q6J("ngIf","successtrial"==t.successtrial||"success"==t.successtrial)}}let gF=(()=>{class t{constructor(t,e,n,i,o,r,s,a,c,l){this.cusService=t,this.actRoute=e,this.router=n,this.customerService=i,this.translatorService=o,this.planService=r,this.renderer=s,this.el=a,this.cookieService=c,this.modalService=l,this.appyConfig=go.N,this.planId=void 0,this.isNoop=!1,this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.actRoute.params.subscribe(t=>{this.successtrial=t.successtrial}),"success"!==this.successtrial&&"successtrial"!==this.successtrial&&"cancel"!==this.successtrial&&this.router.navigateByUrl("dashboard")}ngOnInit(){this.actRoute.queryParamMap.subscribe(t=>{const e=t.get("showModal");this.isNoop="noop"===t.get("upgrade"),"true"===e&&this.modalService.show(nv,{backdrop:"static",initialState:{},class:"modal-lg"}),this.currentUser=this.cusService.GetCurrent(),this.refreshCurrentUserFromServer(),"dashboard"!==this.successtrial&&"true"!==e&&this.successRedirect()}),this.planId=localStorage.getItem("planId"),this.custPlan=this.cookieService.get("custPlan"),this.cookieService.delete("fromPurchasePage","/"),this.cookieService.delete("triggerAppObject","/"),this.cookieService.delete("actionAppObject","/")}refreshCurrentUserFromServer(){this.customerService.getCurrentUser({}).subscribe(t=>{t&&(this.customerService.setCurrent(t),this.currentUser=t)},()=>{})}successRedirect(){localStorage.getItem("originUrl")?(this.redirectUrlonSuccess=localStorage.getItem("originUrl"),setTimeout(()=>{const t=`${localStorage.getItem("originUrl")}`;localStorage.removeItem("originUrl");const e=`${t}`.indexOf("portal-payment-handler")>-1;"cancel"!==this.successtrial&&(e?window.location.href="/connects":this.successRedirectForVisitorChat("trial","https://chatwidget.software/widget/buildone.js?cid=159523784363947423-159523784481563446",t))},2e3)):"cancel"===this.successtrial||setTimeout(()=>{try{this.docData=document.getElementById("appyWidget").getAttribute("src")}catch(e){this.docData="https://chatwidget.software/widget/buildone.js?cid=159523784363947423-159523784481563446"}let t;if("success"===this.successtrial)t="paid",this.successRedirectForVisitorChat(t,this.docData);else if("successtrial"===this.successtrial){try{let t=this.renderer.createElement("script");t.src="https://script.tapfiliate.com/tapfiliate.js",t.async=!0,t.type="text/javascript",this.renderer.appendChild(this.el.nativeElement,t),t.onload=()=>{let t=this.renderer.createElement("script");t.text=`\n                (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){ (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');\n                tap('create', '15251-b7e7fd', { integration: "javascript" });\n                tap('conversion',"${this.currentUser.customerId}");\n              `,this.renderer.appendChild(this.el.nativeElement,t)}}catch(e){}t="trial",this.successRedirectForVisitorChat(t,this.docData)}},2e3)}successRedirectForVisitorChat(t,e,n=null){let i={planId:localStorage.getItem("planId")};
1if(this.custPlan=this.cookieService.get("custPlan")?this.cookieService.get("custPlan"):"",this.custPlan){const t=decodeURIComponent(atob(this.custPlan)),e=JSON.parse(t);(null==i.planId||null==i.planId||""==i.planId)&&(i.planId=e.planId)}if(!i.planId||"jc0fgwefcky2"==i.planId)return window.location.href="/connects",!1;this.getPlanData(i,t,e,n)}getPlanData(t,e,n,i=null){console.log("setOriginUrl: >>>>>>>>>>>>.",i),this.planService.getPlanDetail(t).subscribe(o=>{let r=0;var s="159523784363947423";console.log("companyId: ",s);var a="159523784481563446";console.log("botId: ",a);var c="",l="ClIENTID_"+a+"=";console.log("variableName: ",l);for(var d=document.cookie.split(";"),u=0;u<d.length;u++){for(var p=d[u];" "==p.charAt(0);)p=p.substring(1);let g;if(g="Stripe",this.customerService.updatePaymentMethod({customerId:this.currentUser.customerId,defaultPaymentMethod:g}).subscribe(t=>{}),n){var h=n.split("cid=")[1];if((h=h.split("-")).length>0){for(s=h[0],c="",l="ClIENTID_"+(a=h[1])+"=",d=document.cookie.split(";"),u=0;u<d.length;u++){for(p=d[u];" "==p.charAt(0);)p=p.substring(1);0===p.indexOf(l)&&(c=p.substring(l.length,p.length))}if(c||(c="CLIENT"+Math.floor(Date.now())),s&&c){console.log("visitorId: ",c),console.log("companyId: ",s),console.log("companyId && visitorId: >>>>>>>>>>>>>>>>",s&&c),"NA"==this.currentUser.lastName&&(this.currentUser.lastName="");let n=(this.currentUser.firstName?this.currentUser.firstName:"")+" "+(this.currentUser.lastName?this.currentUser.lastName:"")||this.currentUser.email,a=o.planName+" Plan",l=t.planId,d={companyId:s,visitorId:c,name:n,email:this.currentUser.email,phone:this.currentUser.mobile,client_query:`${n} has subscribed ${a}. Below are the plan details- Plan name:${a}, Plan id:${l}`,planName:a,appId:l,isTrial:"trial"==e?"yes":"no"};0==r?(r=1,console.log("apiData: ",d),fetch("https://us-central1-livechat-production.cloudfunctions.net/autoStartVisitorChat",{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json"}}).then(t=>(console.log("resp: ",t),localStorage.removeItem("planId"),i?(console.log("setOriginUrl: 1",i),this.redirectToBuildPage(i)):this.redirectToBuildPage(i),!1)).catch(t=>{console.log("error: ",t),i?(console.log("setOriginUrl: 2",i),window.location.href=decodeURIComponent(i)):this.redirectToConnectPage()})):i?(console.log("setOriginUrl: 3",i),window.location.href=decodeURIComponent(i)):this.redirectToConnectPage()}else i?(console.log("setOriginUrl: 4",i),window.location.href=decodeURIComponent(i)):this.redirectToConnectPage()}else i?(console.log("setOriginUrl: 5",i),window.location.href=decodeURIComponent(i)):this.redirectToConnectPage();0===p.indexOf(l)&&(c=p.substring(l.length,p.length))}else i&&(console.log("setOriginUrl: 6",i),window.location.href=decodeURIComponent(i)),this.redirectToConnectPage()}},t=>{i?(console.log("setOriginUrl: 7",i),window.location.href=decodeURIComponent(i)):this.redirectToConnectPage()})}tryPlan(){if(this.planId&&this.custPlan){const t=decodeURIComponent(atob(this.custPlan)),e=JSON.parse(t);this.currentUser.trial_plan_id=e.planId,this.currentUser.currencyCode=e.customerCurrencyCode,this.currentUser.countryCode=e.countryCode,e.paymentType&&(this.currentUser.paymentType=e.paymentType,this.currentUser.planPeriod=e.paymentType),this.planService.tryCommonPayment(this.currentUser).subscribe(t=>{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}}redirectToConnectPage(){window.location.href=this.appyConfig.baseUrl+"/connects"}redirectToBuildPage(t){window.location.href=decodeURIComponent(t)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(ui.gz),o.Y36(ui.F0),o.Y36(yo),o.Y36(Eo),o.Y36(Zr),o.Y36(o.Qsj),o.Y36(o.SBq),o.Y36(lo.N),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-successtrial"]],decls:16,vars:3,consts:[[1,"row-","mt-5","pt-5","justify-content-center","d-none"],[1,"col-md-12","col-sm-12","col-xs-12"],[1,"text-center","connection_head"],["ng-bind-html","translation.TRIAL_PAYMENT_SUCCESS_HEADING",1,"h3","animated","fadeIn"],[1,"align-items-center","bg-white","block","content","d-flex","h-100","justify-content-center","mb-0","payment-success-page","position-relative","shadow-none","w-100","mt-6"],[1,"block","mb-0","w-100"],[1,"row","justify-content-center"],[1,"col-lg-6","col-lg-","pt-5","mt-5",2,"max-width","700px"],[1,"block","block-s
1hadow","bg-white","block-rounded","shadow-none","mb-0"],[1,"row","block-header"],[1,"col-xs-12","text-center"],[1,"block","payment-success","remove-margin-b","mt-5"],[1,"block-content","block-content-full","text-center","py-5"],["class","push-30 connect-success-header",4,"ngIf"],["class","text-center py-3",4,"ngIf"],["class","push-10 payment-content",4,"ngIf"],[1,"push-30","connect-success-header"],["src","../../assets/images/successtrial.png","alt","","width","150","height","150"],[1,"text-center","py-3"],["src","../../assets/images/errors.png","alt","","width","120","height","120"],[1,"push-10","payment-content"],["class","push-20-t payment-sucs-head text-black",3,"innerText",4,"ngIf"],["class","push-20-t f-14 fs-md-6 text-center",4,"ngIf"],[1,"push-20-t","push-50"],[1,"push-10","connect-success-btn","border3","border-top","connect-success-btn","d-flex","align-items-center","flex-column","justify-content-center","pt-2","push-10"],["class","btn btn-dark btn-minw push-5 new-connct mt-4",3,"click",4,"ngIf"],[4,"ngIf"],[1,"push-20-t","payment-sucs-head","text-black",3,"innerText"],[1,"push-20-t","f-14","fs-md-6","text-center"],[1,"btn","btn-dark","btn-minw","push-5","new-connct","mt-4",3,"click"],[1,"btn","mt-3"],["data-title",".dot-flashing",1,"snippet"],[1,"d-flex","justify-content-center"],[1,"dot-flashing"],["style","color: #FC491E;",4,"ngIf"],[2,"color","#FC491E"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o._UZ(3,"h1",3),o.qZA(),o.qZA(),o.qZA(),o.TgZ(4,"div",4),o.TgZ(5,"div",5),o.TgZ(6,"div",6),o.TgZ(7,"div",7),o.TgZ(8,"div",8),o.TgZ(9,"div",9),o.TgZ(10,"div",10),o.TgZ(11,"div",11),o.TgZ(12,"div",12),o.YNc(13,nF,2,0,"div",13),o.YNc(14,iF,2,0,"div",14),o.YNc(15,hF,9,6,"div",15),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(13),o.Q6J("ngIf","cancel"!=e.successtrial),o.xp6(1),o.Q6J("ngIf","cancel"==e.successtrial),o.xp6(1),o.Q6J("ngIf",e.translation))},directives:[to.O5],styles:['.dot-flashing[_ngcontent-%COMP%]{position:relative;width:10px;height:10px;border-radius:5px;background-color:#9fa2bc;color:#9fa2bc;animation:dotFlashing 1s infinite linear alternate;animation-delay:.5s}.dot-flashing[_ngcontent-%COMP%]:before, .dot-flashing[_ngcontent-%COMP%]:after{content:"";display:inline-block;position:absolute;top:0}.dot-flashing[_ngcontent-%COMP%]:before{left:-15px;width:10px;height:10px;border-radius:5px;background-color:#9fa2bc;color:#9fa2bc;animation:dotFlashing 1s infinite alternate;animation-delay:0s}.dot-flashing[_ngcontent-%COMP%]:after{left:15px;width:10px;height:10px;border-radius:5px;background-color:#9fa2bc;color:#9fa2bc;animation:dotFlashing 1s infinite alternate;animation-delay:1s}
1@keyframes dotFlashing{0%{background-color:#9fa2bc}50%,to{background-color:#dedede}}@media (max-width: 767px){.payment-sucs-head[_ngcontent-%COMP%]{font-size:20px}.connect-success-header[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:110px}}']}),t})(),fF=(()=>{class t{constructor(t,e,n,i,o,r,s){this.actRoute=t,this.router=e,this.customerService=n,this.dataService=i,this.cookieService=o,this.customerConnectService=r,this.commonService=s,this.appyConfig=go.N,this.isPopupopend=!1,this.triggerNodeId="",this.connectId="",this.actRoute.params.subscribe(t=>{if(null==t?void 0:t.appsParameters){const e=null==t?void 0:t.appsParameters;if(e.includes("_cb-")){const t=e.split("_params_"),n=t[0],i=t[1]?atob(t[1]):"";"_cb-thinkific"===n&&i.split("subdomain=")[1]&&i.split("subdomain=")[1].split("&")[0]?window.location.href="/install?subdomain="+i.split("subdomain=")[1].split("&")[0]:this.commonService.getAppDetailBycallBackUrl({_cb:n}).subscribe(t=>{if(t.app_detail&&t.app_detail.appId){localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),localStorage.setItem("connectAppId",t.app_detail.appId);const e=window.open(`${this.appyConfig.apiEndPoint}app/auth/${t.app_detail.credential.urlName}?id=${t.app_detail.appId}`,"_authWindowPop","width=1050,height=700");this.isPopupopend=!0,this.checkChild(e,t.app_detail.appId)}else window.location.href="/connects"})}else if(this.apps=e.split("__for__")[1],this.apps){let t=this.apps.split("_");"jnpl1uik645c878la4sp"==t[0]||"kxqxvkfn0o4u718999147sal"==t[0]||"k3pplzjk0c7s11f3ce9la56o"==t[0]?setTimeout(()=>{this.actRoute.queryParams.subscribe(t=>{this.registerParser(this.apps,t)})},2e3):setTimeout(()=>{this.registerParser(this.apps)},2e3)}}})}ngOnInit(){this.currentUser=this.customerService.GetCurrent(),this.actRoute.queryParams.subscribe(t=>{(null==t?void 0:t.appsParameters)?(this.apps=null==t?void 0:t.appsParameters,this.registerParser(this.apps)):t.pid&&this.router.navigateByUrl("/plans"),this.showTutorial=!!t.tutorial,setTimeout(()=>{!this.apps&&!this.isPopupopend&&this.router.navigateByUrl(this.showTutorial?"/customeditor/fresh/tutorial/newNode":"/customeditor/fresh/app/newNode")},2e3)})}checkChild(t,e){const n=setTimeout(()=>{t.closed?(clearInterval(n),this.registerParser(e)):this.checkChild(t,e)},1e3)}registerParser(t,e){var n,i,o;if(this.currentUser.connect_data/2>=this.currentUser.plan_details[0].connects&&"jc0fgwefcky2"!==(null===(n=this.currentUser)||void 0===n?void 0:n.planId))return void this.router.navigate(["/plans"]);let r="",s=[];t.includes("temp__")&&(r=t.split("__")[1]),r||(s=t.split("_"));let a={trigger:"",action:""};const c=(n,i)=>{this.commonService.GetMultiAppDetails(n).subscribe(o=>{let r={},s={},a={};if(o.app_detail&&o.app_detail.length){o.app_detail.forEach(t=>{r[t.appId]=t.status,s[t.appId]=t.image,a[t.appId]=t.displayName});const t=this.dataService.createConnectId();if("jnpl1uik645c878la4sp"===n[0]&&(null==e?void 0:e.host)){const i=`https://loop.flozic.ai/app/_cb-shopify?code=${e.code}&hmac=${e.hmac}&host=${e.host}&shop=${e.shop}&state=${e.state}&timestamp=${e.timestamp}`,o=1===r[n[0]]?n[0]:null;return localStorage.setItem("userConnectId",t),localStorage.setItem("connectAppId",o),void setTimeout(()=>{const t=window.open(i,"_authWindowPop");localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),this.checkChild(t,"_authWindowPop")},200)}if("kxqxvkfn0o4u718999147sal"===n[0]&&(null==e?void 0:e.code)){const i=`https://loop.flozic.ai/app/_cb-wixrestaurants?code=${e.code}&state=${e.state}`;return localStorage.setItem("userConnectId",t),localStorage.setItem("connectAppId",1===r[n[0]]?n[0]:null),void setTimeout(()=>{const t=window.open(i,"_authWindowPop","width=1050,height=700");localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),this.checkChild(t,"_authWindowPop")},200)}if("k3pplzjk0c7s11f3ce9la56o"===n[0]&&(null==e?void 0:e.code)){const i=`https://loop.flozic.ai/app/_cb-zoom?code=${e.code}&state=${encodeURIComponent("eyJhcHB5cGllLWhvc3QiOiJodHRwczovL2xvb3AuZmxvemljLmFpIn0=")}`,o=1===r[n[0]]?n[0]:null;return localStorage.setItem("userConnectId",t),localStorage.setItem("connectAppId",o),void setTimeout(()=>{const t=window.open(i,"_authWindowPop","width=1050,height=700");localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),this.checkChild(t,"_authWindowPop")},200)}if("lyr85eyh0dow7189994ua2nc"===n[0]){const e=`${this.appyConfig.apiEndPoint}app/auth/klaviyov2?id=lyr85eyh0dow7189994ua2nc`,i=1===r[n[0]]?n[0]:null;localStorage.setItem("userConnectId",t),localStorage.setItem("connectAppId",i);const o=window.open(e,"_authWindowPop","width=1050,height=700");localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),this.checkChild(o,"_authWindowPop")}let c={customerId:this.currentUser.customerId,connectId:t,connectTitle:"",appId:1===r[n[0]]?n[0]:null,actionName:{title:i.trigger,desc:"",display_title:""},image:s[n[0]],displayName:a[n[0]],index:0,status:0,connectStatus:"Draft",nodeType:"trigger",nodeStatus:1===r[n[0]]?"app_selected":null,customConnect:!0,templateId:"",params:e,parentIndex:null,childIndex:[1],graphData:[{id:"0",parentId:null,displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:i.trigger,headerName:""},{id:"1",parentId:"0",displayName:a[n[1]]||"",imageFinal:s[n[1]]||"",eventFinal:i.action,headerName:""}],nodesData:[{connectorId:"0",displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:i.trigger,position:{x:175,y:67.5}},{connectorId:"1",displayName:a[n[1]]||"",imageFinal:s[n[1]]||"",eventFinal:i.action,position:{x:175,y:252.5}}]};"lyr85eyh0dow7189994ua2nc"===n[0]&&(c.actionName={title:"New Member",desc:"Triggers on a new member for any metric",display_title:"New Member"},c.nodeStatus="app_selected",c.editOptions={},c.fields_error="",c.sample_data=[],c.triggerType="polling",c.webhook_functions="NA");let l="";this.customerConnectService.addUserConnect(c).subscribe(e=>{l=e.insertedId||"",n[1]?this.customerConnectService.addUserConnect({customerId:this.currentUser.customerId,connectId:t,connectTitle:"",appId:1===r[n[1]]?n[1]:null,actionName:{title:"",desc:"",display_title:""},image:s[n[1]],displayName:a[n[1]],index:1,status:0,connectStatus:"Draft",nodeType:"actions",nodeStatus:1===r[n[1]]?"app_selected":null,customConnect:!0,templateId:"",parentIndex:0,childIndex:[null],graphData:[{id:"0",parentId:null,displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:"",headerName:""},{id:"1",parentId:"0",displayName:a[n[1]]||"",imageFinal:s[n[1]]||"",eventFinal:"",headerName:""}],nodesData:[{connectorId:"0",displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:"",position:{x:175,y:67.5}},{connectorId:"1",displayName:a[n[1]]||"",imageFinal:s[n[1]]||"",eventFinal:"",position:{x:175,y:252.5}}]}).subscribe(()=>{if(this.triggerNodeId=l,this.connectId=t,this.showTutorial)this.router.navigateByUrl(`/customeditor/${l}/tutorial/${t}`);else{const e=this.cookieService.get("triggerAppObject"),n=this.cookieService.get("actionAppObject");(!e||!n)&&this.router.navigateByUrl(`/customeditor/${l}/account/${t}`)}}):this.customerConnectService.addUserConnect({actionName:{title:"",desc:""},desc:"",title:"",appId:"",auth:{},connectId:t,connectStatus:"Draft",connectTitle:"",customConnect:!0,index:1,nodeStatus:"new",nodeType:"actions",status:0,image:"",parentIndex:0,childIndex:[null],graphData:[{id:"0",parentId:null,displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:"",headerName:""},{id:"1",parentId:"0",displayName:"",imageFinal:"",eventFinal:"",headerName:""}],nodesData:[{connectorId:"0",displayName:a[n[0]]||"",imageFinal:s[n[0]]||"",eventFinal:"",position:{x:175,y:67.5}},{connectorId:"1",displayName:"",imageFinal:"",eventFinal:"",position:{x:175,y:252.5}}]}).subscribe(()=>{this.triggerNodeId=l,this.connectId=t,this.router.navigateByUrl(this.showTutorial?`/customeditor/${l}/tutorial/${t}`:`/customeditor/${l}/account/${t}`)})})}else if("_authWindowPop"!==t)this.router.navigateByUrl(this.showTutorial?"/customeditor/fresh/tutorial/newNode":"/customeditor/fresh/account/newNode");else if("_authWindowPop"===t){const t=this.triggerNodeId||localStorage.getItem("shopifyReturnTriggerNodeId"),e=this.connectId||localStorage.getItem("shopifyReturnConnectId");localStorage.removeItem("shopifyReturnTriggerNodeId"),localStorage.removeItem("shopifyReturnConnectId"),t&&e?window.location.href=`/customeditor/${t}/account/${e}
1`:this.router.navigateByUrl("/authorizations")}})};if(r)this.customerConnectService.getDetailsByTemplateId({templateId:r}).subscribe(t=>{var e,n,i,o;try{a={trigger:null!==(e=t.triggerTitle)&&void 0!==e?e:"",action:null!==(n=t.actionTitle)&&void 0!==n?n:""},s[0]=null!==(i=t.triggerAppId)&&void 0!==i?i:s[0],s[1]=null!==(o=t.actionAppId)&&void 0!==o?o:s[1]}catch(r){a={trigger:"",action:""}}c(s,a)});else{try{a={trigger:null!==(i=s[2])&&void 0!==i?i:"",action:null!==(o=s[3])&&void 0!==o?o:""}}catch(l){a={trigger:"",action:""}}c(s,a)}}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.gz),o.Y36(ui.F0),o.Y36(yo),o.Y36(DA),o.Y36(lo.N),o.Y36(Fo),o.Y36(wo.v))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-register"]],decls:1,vars:0,template:function(t,e){1&t&&o._UZ(0,"app-loader")},directives:[po],styles:[""]}),t})();function mF(t,e){1&t&&o._UZ(0,"app-loader")}let vF=(()=>{class t{constructor(t,e,n,i,o,r,s,a,c){this.cdr=t,this.actRoute=e,this.router=n,this.planService=i,this.dataService=o,this.customerService=r,this.modalService=s,this.planChangeService=a,this.cookieService=c,this.$getCcSubs=new fo.xQ,this.$getPlansSubs=new fo.xQ,this.$upgradeCommPaySubs=new fo.xQ,this.popupOpen=!1,this.actRoute.params.subscribe(t=>{this.PARAMS={planId:t.planId||"",cpId:t.cpId||"",planPeriod:t.planPeriod||"",couponCode:t.couponCode||void 0}}),this.currentUser=this.customerService.GetCurrent(),this.customerInfo=JSON.parse(JSON.stringify(this.currentUser))}ngOnInit(){return(0,Jo.mG)(this,void 0,void 0,function*(){let t={status:1,plan_country:this.currentUser.plan_country?this.currentUser.plan_country:"US"};this.customerInfo.countryCode=this.currentUser.plan_country?this.currentUser.plan_country:"US",t.country=this.customerInfo.countryCode,this.cdr.markForCheck(),yield(()=>new Promise((e,n)=>{this.planService.getPlansList(t).pipe(Qr(this.$getPlansSubs)).subscribe(t=>{var n,i;if(null===(n=null==t?void 0:t.planLists)||void 0===n?void 0:n.length){const e=["Free Plan","Standard",,"Professional","Business","Enterprise"].map(t=>t.toUpperCase().replace(" ","_")),n=t.planLists.sort((t,n)=>e.indexOf(t.planName.toUpperCase().replace(" ","_"))-e.indexOf(n.planName.toUpperCase().replace(" ","_")));this.requestPlanInfo=n.filter(t=>t.planId===this.PARAMS.planId)[0],this.customerInfo.planPeriodType="fixed",this.customerInfo.planPeriod=this.PARAMS.planPeriod,this.customerInfo.currencyCode=this.requestPlanInfo.currencyCode||(null===(i=this.requestPlanInfo.country[this.customerInfo.countryCode])||void 0===i?void 0:i.currencyCode),localStorage.setItem("planId",this.requestPlanInfo.planId),localStorage.setItem("marketingPlanPeriod",this.PARAMS.planPeriod);const o=JSON.stringify({planId:this.PARAMS.planId,currencyCode:this.customerInfo.currencyCode,countryCode:this.customerInfo.countryCode,paymentType:"Subscription"}),r=btoa(encodeURIComponent(o));this.cookieService.set("custPlan",r,1,"/","",!0,"Strict")}e("")},t=>{e("")},()=>{this.cdr.markForCheck()})}))(),yield(()=>new Promise((t,e)=>(0,Jo.mG)(this,void 0,void 0,function*(){var e,n,i,o,r,s,a,c,l,d,u,p,h,g,f,m;-1!==(null===(r=null===(o=null===(i=null===(n=null===(e=this.currentUser)||void 0===e?void 0:e.plan_details)||void 0===n?void 0:n[0])||void 0===i?void 0:i.planName)||void 0===o?void 0:o.toUpperCase())||void 0===r?void 0:r.indexOf("FREE"))||this.PARAMS.couponCode?-1===(null===(d=null===(l=null===(c=null===(a=null===(s=this.currentUser)||void 0===s?void 0:s.plan_details)||void 0===a?void 0:a[0])||void 0===c?void 0:c.planName)||void 0===l?void 0:l.toUpperCase())||void 0===d?void 0:d.indexOf("FREE"))&&this.PARAMS.couponCode||-1!==(null===(f=null===(g=null===(h=null===(p=null===(u=this.currentUser)||void 0===u?void 0:u.plan_details)||void 0===p?void 0:p[0])||void 0===h?void 0:h.planName)||void 0===g?void 0:g.toUpperCase())||void 0===f?void 0:f.indexOf("FREE"))&&void 0!==this.PARAMS.couponCode?(this.customerInfo.upgrade_plan_id=this.requestPlanInfo.planId,yield this.confirmThenUpgrade(!0)):void 0!==(null===(m=this.currentUser)||void 0===m?void 0:m.trialStart)?(this.customerInfo.upgrade_plan_id=this.requestPlanInfo.planId,yield this.confirmThe
1nUpgrade()):(this.customerInfo.trial_plan_id=this.requestPlanInfo.planId,yield this.buyOrTry("tryCommonPayment")):(this.customerInfo.upgrade_plan_id=this.requestPlanInfo.planId,yield this.confirmThenUpgrade()),t("")})))()})}buyOrTry(t,e){return(0,Jo.mG)(this,void 0,void 0,function*(){return this.$upgradeCommPaySubs.next(),new Promise((n,i)=>{const o=JSON.parse(JSON.stringify(this.customerInfo));void 0!==o.trialStart&&void 0!==o.isSubscriptionTrial&&(o.planId="",o.useStripeBilling||(o.planPeriod="")),o.cancelUrl=`${window.location.origin}/app/cancel`,!0===e&&(t="upgradeCommonPayment",o.couponCode=this.PARAMS.couponCode),"upgradeCommonPayment"===t?this.planService[t](o).pipe(Qr(this.$upgradeCommPaySubs)).subscribe(t=>{if(t&&t.confirmation_url)return t.notice&&alert(t.notice),window.location.href=t.confirmation_url,void n("");if(t&&!1===t.success)return console.error("Checkout could not be started:",t.msg),void n("");const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${go.N.commonPaymentUrl}/index/pay`);let i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","request"),i.setAttribute("value",t.message),e.appendChild(i),document.getElementsByTagName("body")[0].appendChild(e),e.submit(),n("")},t=>{n("")},()=>{this.cdr.markForCheck()}):this.router.navigateByUrl("/setup-editor")})})}confirmThenUpgrade(t=!1){return new Promise(e=>{const n=this.planChangeService.getDecision(this.currentUser,this.requestPlanInfo,"monthly"===this.PARAMS.planPeriod?"monthly":"yearly");if(!n||"same"===n.kind||t)return void this.buyOrTry("upgradeCommonPayment",t).then(()=>e());this.popupOpen=!0,this.cdr.markForCheck();const i=this.modalService.show(wN,{initialState:{modelTitle:n.title,modelContent:n.message,primaryLabel:n.primaryLabel,secondaryLabel:n.secondaryLabel,variant:n.kind},class:"plan-change-modal modal-dialog-centered",ignoreBackdropClick:!0});i.content.onPrimary.subscribe(()=>{"block"===n.kind?(this.openContactPage(),this.router.navigateByUrl("/plans"),e()):this.buyOrTry("upgradeCommonPayment",t).then(()=>e())}),i.content.onSecondary.subscribe(()=>{this.router.navigateByUrl("/plans"),e()})})}openContactPage(){window.open("https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","_blank")}ngOnDestroy(){this.$getCcSubs.next(),this.$getCcSubs.complete(),this.$getPlansSubs.next(),this.$getPlansSubs.complete(),this.$upgradeCommPaySubs.next(),this.$upgradeCommPaySubs.complete()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(ui.gz),o.Y36(ui.F0),o.Y36(Zr),o.Y36(DA),o.Y36(yo),o.Y36(mo.tT),o.Y36(AN),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-portal-payment-handler"]],decls:1,vars:1,consts:[[4,"ngIf"]],template:function(t,e){1&t&&o.YNc(0,mF,1,0,"app-loader",0),2&t&&o.Q6J("ngIf",!e.popupOpen)},directives:[to.O5,po],styles:[""],changeDetection:0}),t})();function bF(t,e){if(1&t&&(o.TgZ(0,"p"),o._uU(1),o.TgZ(2,"a",17),o._uU(3,"approved apps."),o.qZA(),o._uU(4," Unfortunately, the app you are using is no longer Support. You'll need to edit your Connect to turn it back on."),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.hij("your ",t.OnFinishMultiple.current.app," data can only be sent to "),o.xp6(1),o.s9C("href",t.OnFinishMultiple.current.approvedApps_page,o.LSH)}}function xF(t,e){if(1&t&&(o.TgZ(0,"p"),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.AsE("Your permission is required to connect ",t.OnFinishMultiple.current.app," to ",t.OnFinishMultiple.next.app,".")}}function _F(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",18),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.goToOptions(e.OnFinishMultiple.connectId,e.OnFinishMultiple.next.nodeId)}),o._uU(1,"Edit your Connect"),o.qZA()}}function CF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",19),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.goToOptions(e.OnFinishMultiple.connectId,e.OnFinishMultiple.next.nodeId)}),o._uU(1,"Learn More "),o._UZ(2,"i",20),o.qZA()}}function wF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().reconnectApprovedApps()}),o._uU(1,"Reconnect "),o.qZA()}}function yF(t,e){1&t&&(o.TgZ(0,"button",22),o._uU(1,"Success "),o.qZA())}function AF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",23),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.updateUserConnectStatus(0,e.OnFinishMultiple.connectId)}),o._uU(1,"Now Turn It On! "),o.qZA()}}let ZF=(()=>{class t{constructor(t,e,n,i,o){this.bsModalRef=t,this.customerService=e,this.commonService=n,this.dataService=i,this.customerConnectService=o,this.appyConfig=go.N}ngOnInit(){this.onClose=new fo.xQ}
1goToOptions(t,e){this.onClose.next({goTo:{connectId:t,nodeId:e}}),this.bsModalRef.hide()}reconnectApprovedApps(){let t="";const e=this.OnFinishMultiple.current.nodeId;this.commonService.getApprovedWithReconnectApp({sourceAppId:this.OnFinishMultiple.current.appId,destinationAppId:this.OnFinishMultiple.next.appId}).subscribe(n=>{if(n.app_detail){t=n.app_detail.appId;const i=n.app_detail.credential.urlName;localStorage.setItem("userConnectId",e),localStorage.setItem("connectAppId",t),this.OnFinishMultiple.approveByReconnect.childAuth=n.app_detail.appId;let o={connectedAccount:this.OnFinishMultiple.approveByReconnect,source:n.app_detail.source,destination:n.app_detail.destination,appNameUrl:i};o=JSON.stringify(o),document.cookie=`accountMetaData=${o}`,document.cookie=`connectAppId=${t}`,document.cookie=`userConnectId=${e}`;const r=window.open(this.appyConfig.apiEndPoint+"app/auth/"+i+"?id="+t,"_authWindowPop","width=1050,height=700");localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false"),this.checkChild(r,"_authWindowPop")}else console.error("No app found with app id"+t)})}checkChild(t,e){const n=setTimeout(()=>{t.closed?(clearInterval(n),this.triggerAuth={},this.OnFinishMultiple.reconnectApprovedAccount=localStorage.getItem("reconnectApprovedAccount"),document.cookie="userConnectId=;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="reconnectApprovedAccount=;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="userConnectId=;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="connectAppId=;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="accountMetaData=;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="window_name=;expires=Thu, 01 Jan 1970 00:00:00 GMT",localStorage.removeItem("reconnectApprovedAccount"),localStorage.removeItem("userConnectId"),localStorage.removeItem("connectAppId"),localStorage.removeItem("window_name"),localStorage.removeItem("closepopup")):this.checkChild(t,e)},200)}updateUserConnectStatus(t,e){this.onClose.next({update:{connectId:e,status:t}}),this.customerConnectService.updateConnectStatusByConnectId(e,{status:t}).subscribe(t=>{let e={};e=this.customerService.GetCurrent(),e.connect_data=e.connect_data+1,this.customerService.setCurrent(e),this.bsModalRef.hide()})}close(){this.onClose.next({close:!0}),this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo),o.Y36(wo.v),o.Y36(DA),o.Y36(Fo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-globalmail-pop-up"]],decls:29,vars:11,consts:[[1,"modal-content","popUP","minimal-popUp"],[1,"testfetch-main"],[1,"block-header","testfetch-header"],[1,"block-options"],["type","button","data-dismiss","modal","id","closebtnshow",1,"closebtnshow",3,"click"],[1,"si","si-close"],[1,"block-content","text-center","showTryblock","globalmailbody"],[1,"cricleIconimg"],["alt","",3,"src"],[4,"ngIf"],["class","btn btn-default btn-default-pad buyitbtn showTryblock",3,"click",4,"ngIf"],[1,"globalmailfooter"],["ng-bind-html","OnFinishMultiple.desc"],["class","learnmorelink","target","_blank",3,"click",4,"ngIf"],["class","reconnectbtn",3,"click",4,"ngIf"],["class","btn btn-success btnsucc",4,"ngIf"],["class","nowturnbtn","id","closebtnshow",3,"click",4,"ngIf"],["target","_blank",3,"href"],[1,"btn","btn-default","btn-default-pad","buyitbtn","showTryblock",3,"click"],["target","_blank",1,"learnmorelink",3,"click"],["aria-hidden","true",1,"fa","fa-long-arrow-right"],[1,"reconnectbtn",3,"click"],[1,"btn","btn-success","btnsucc"],["id","closebtnshow",1,"nowturnbtn",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"ul",3),o.TgZ(4,"li"),o.TgZ(5,"button",4),o.NdJ("click",function(){return e.close()}),o._UZ(6,"i",5),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"div",6),o.TgZ(8,"div",7),o._UZ(9,"img",8),o.qZA(),o.TgZ(10,"h3"),o._uU(11),o.qZA(),o.YNc(12,bF,5,2,"p",9),o.YNc(13,xF,2,2,"p",9),o.YNc(14,_F,2,0,"a",10),o.TgZ(15,"div",11),o.TgZ(16,"ul"),o.TgZ(17,"li"),o.TgZ(18,"a"),o._UZ(19,"img",8),o.qZA(),o.qZA(),o.TgZ(20,"li"),o.TgZ(21,"a"),o._UZ(22,"img",8),o.qZA(),o.qZA(),o.TgZ(23,"li"),o._UZ(24,"span",12),o.qZA(),o.qZA(),o.YNc(25,CF,3,0,"a",13),o.YNc(26,wF,2,0,"button",14),o.YNc(27,yF,2,0,"button",15),o.qZA(),o.YNc(28,AF,2,0,"button",16),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(9),o.MGl("src","https://media.appypieautomate.ai/media/icons/128x128/",e.OnFinishMultiple.current.image,"",o.LSH),o.xp6(2),o.hij("",e.OnFinishMultiple.current.app," has some additional requirements"),o.xp6(1),o.Q6J("ngIf",!e.OnFinishMultiple.approvedWithReconnect),o.xp6(1),o.Q6J("ngIf",e.OnFinishMultiple.approvedWithReconnect),o.xp6(1),o.Q6J("ngIf",!e.OnFinishMultiple.approvedWithReconnect),o.xp6(5),o.MGl("src","https://media.appypieautomate.ai/media/icons/128x128/",e.OnFinishMultiple.current.image,"",o.LSH),o.xp6(3),o.MGl("src","https://media.appypieautomate.ai/media/icons/128x128/",e.OnFinishMultiple.next.image,"",o.LSH),o.xp6(3),o.Q6J("ngIf",!e.OnFinishMultiple.approvedWithReconnect),o.xp6(1),o.Q6J("ngIf",e.OnFinishMultiple.approvedWithReconnect&&!e.OnFinishMultiple.re
1connectApprovedAccount),o.xp6(1),o.Q6J("ngIf",e.OnFinishMultiple.approvedWithReconnect&&e.OnFinishMultiple.reconnectApprovedAccount),o.xp6(1),o.Q6J("ngIf",e.OnFinishMultiple.approvedWithReconnect&&e.OnFinishMultiple.reconnectApprovedAccount))},directives:[to.O5],styles:[""]}),t})();function kF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",8),o.TgZ(1,"h4"),o._uU(2,"Testing the Automation"),o.qZA(),o.TgZ(3,"button",9),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleDisplay()}),o._UZ(4,"i",10),o.qZA(),o.qZA()}}function TF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"aside",11),o.TgZ(1,"div",12),o.TgZ(2,"span",13),o._uU(3,"GUIDE"),o.qZA(),o.TgZ(4,"button",14),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleDisplay()}),o._UZ(5,"i",15),o.qZA(),o.qZA(),o.TgZ(6,"div",16),o.TgZ(7,"div",17),o.TgZ(8,"h3"),o._uU(9,"Test trigger"),o.qZA(),o.TgZ(10,"div",18),o.TgZ(11,"ul"),o.TgZ(12,"li"),o._uU(13,"Select Test Trigger, for your assurance. Appypie provides recent items to find your app. "),o.qZA(),o.TgZ(14,"li"),o._uU(15,"Additionally, you can re-edit the apps and trigger option from the test data in Appypie trigger. "),o.qZA(),o.TgZ(16,"li"),o._uU(17,"If Appypie is finding technical issues then add a new event in your trigger event. "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}function OF(t,e){1&t&&(o.TgZ(0,"div",26),o.TgZ(1,"h2"),o._uU(2,"Amazing!"),o.qZA(),o.TgZ(3,"h3"),o._uU(4,"You have Successfully Run the Test"),o.qZA(),o.qZA())}function MF(t,e){1&t&&(o.TgZ(0,"div",26),o.TgZ(1,"h2"),o._uU(2,"Success!"),o.qZA(),o.TgZ(3,"h3"),o._uU(4,"Connect created without run test"),o.qZA(),o.qZA())}const IF=function(t){return{show:t}};function SF(t,e){if(1&t&&(o.TgZ(0,"div",22),o.TgZ(1,"div",23),o._UZ(2,"img",24),o.qZA(),o.YNc(3,OF,5,0,"div",25),o.YNc(4,MF,5,0,"div",25),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("@fadeInOut",t.showSuccess?"in":"out")("ngClass",o.VKq(4,IF,t.showSuccess)),o.xp6(3),o.Q6J("ngIf",!t.isSkipRunTest),o.xp6(1),o.Q6J("ngIf",t.isSkipRunTest)}}function PF(t,e){if(1&t&&(o.TgZ(0,"li",55),o._UZ(1,"img",56),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("src",e.appyConfig.cdnMediaPath+t.image,o.LSH)}}function NF(t,e){1&t&&(o.TgZ(0,"li",57),o.O4$(),o.TgZ(1,"svg",58),o._UZ(2,"path",59),o.qZA(),o.qZA())}function qF(t,e){if(1&t&&(o.TgZ(0,"li",55),o._UZ(1,"img",56),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("src",e.appyConfig.cdnMediaPath+t.image,o.LSH)}}function UF(t,e){if(1&t&&(o.ynx(0),o.YNc(1,PF,2,1,"li",53),o.YNc(2,NF,3,0,"li",54),o.YNc(3,qF,2,1,"li",53),o.BQk()),2&t){const t=e.first;o.xp6(1),o.Q6J("ngIf",t),o.xp6(1),o.Q6J("ngIf",!t),o.xp6(1),o.Q6J("ngIf",!t)}}function EF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",27),o.TgZ(1,"div",28),o.TgZ(2,"div",29),o.TgZ(3,"h3",30),o._uU(4,"Connected Apps"),o.qZA(),o.TgZ(5,"ul",31),o.YNc(6,UF,4,3,"ng-container",32),o.qZA(),o.TgZ(7,"div",33),o.TgZ(8,"p",34),o._uU(9," Set your task frequency to auto-update your data at your preferred intervals"),o.qZA(),o.TgZ(10,"div",35),o.TgZ(11,"div",36),o.TgZ(12,"p",37),o._uU(13),o._UZ(14,"span",38),o.qZA(),o.qZA(),o.TgZ(15,"button",39),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.EditTaskFrequency(e.connectId)}),o.O4$(),o.TgZ(16,"svg",40),o._UZ(17,"path",41),o.qZA(),o._uU(18," Edit "),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(19,"div",42),o.TgZ(20,"p",43),o._uU(21,"Connect Status"),o.qZA(),o.TgZ(22,"ul",44),o.TgZ(23,"li",45),o.TgZ(24,"input",46),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.updateUserConnectStatus(e.connectList[0].connectTitle,0,"Completed")}),o.qZA(),o.TgZ(25,"label",47),o._uU(26,"OFF"),o.qZA(),o.qZA(),o.TgZ(27,"li",45),o.TgZ(28,"input",48),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.updateUserConnectStatus(e.connectList[0].connectTitle,1,"Completed")}),o.qZA(),o.TgZ(29,"label",49),o._uU(30,"ON"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(31,"div",50),o.TgZ(32,"a",51),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.goToConnectApp.emit(e.connectList.length-1)}),o._uU(33,"Edit"),o.qZA(),o.TgZ(34,"a",52),o._uU(35,"Dashboard"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("@fadeInOut",t.showConnectedApp?"in":"out")("ngClass",o.VKq(6,IF,t.showConnectedApp)),o.xp6(6),o.Q6J("ngForOf",t.connectList),o.xp6(7),o.hij("",t.displayFrequencyValue," "),o.xp6(11),o.Q6J("checked",1!=t.connectList[t.connectList.length-1].status),o.xp6(4),o.Q6J("checked",1==t.connectList[t.connectList.length-1].status)}}
1function FF(t,e){if(1&t&&(o.TgZ(0,"div",19),o.YNc(1,SF,5,6,"div",20),o.YNc(2,EF,36,8,"div",21),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.showSuccess),o.xp6(1),o.Q6J("ngIf",t.showConnectedApp)}}function DF(t,e){1&t&&(o.TgZ(0,"div",70),o.TgZ(1,"span",71),o._UZ(2,"span"),o._UZ(3,"span"),o._UZ(4,"span"),o._UZ(5,"span"),o._UZ(6,"span"),o.qZA(),o.qZA())}const LF=function(t){return{"complete-conctactive":t}};function JF(t,e){if(1&t&&(o.TgZ(0,"div",63),o.TgZ(1,"div",64),o.TgZ(2,"div",65),o.TgZ(3,"div",66),o._UZ(4,"i",67),o.qZA(),o._UZ(5,"img",68),o.qZA(),o.TgZ(6,"figcaption"),o._uU(7),o.qZA(),o.qZA(),o.YNc(8,DF,7,0,"div",69),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2);o.xp6(2),o.Q6J("ngClass",o.VKq(4,LF,n<i.recheckFrom)),o.xp6(3),o.Q6J("src",i.appyConfig.cdnMediaPath+t.image,o.LSH),o.xp6(2),o.Oqu(t.actionNameTitle),o.xp6(1),o.Q6J("ngIf",n!==i.connectList.length-1)}}function jF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",72),o.TgZ(1,"p"),o.TgZ(2,"span"),o._uU(3),o.qZA(),o.TgZ(4,"a",73),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).doCorrectOption(e)}),o._uU(5),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(3),o.hij("",n.translation.CUSTOM_STEP_NEEDS_ATTENTION.replace("__STEP_NO_",t.index+1)," "),o.xp6(2),o.Oqu(n.translation.CUSTOM_EDIT_HERE)}}function RF(t,e){if(1&t&&(o.TgZ(0,"div",60),o.YNc(1,JF,9,6,"div",61),o.YNc(2,jF,6,2,"div",62),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.connectList),o.xp6(1),o.Q6J("ngForOf",t.messageHTML)}}function $F(t,e){1&t&&(o.TgZ(0,"div",70),o.TgZ(1,"span",71),o._UZ(2,"span"),o._UZ(3,"span"),o._UZ(4,"span"),o._UZ(5,"span"),o._UZ(6,"span"),o.qZA(),o.qZA())}function BF(t,e){if(1&t&&(o.TgZ(0,"div",63),o.TgZ(1,"div",64),o.TgZ(2,"div",65),o.TgZ(3,"div",66),o._UZ(4,"i",67),o.qZA(),o._UZ(5,"img",68),o.qZA(),o.TgZ(6,"figcaption"),o._uU(7),o.qZA(),o.qZA(),o.YNc(8,$F,7,0,"div",69),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2);o.xp6(2),o.Q6J("ngClass",o.VKq(4,LF,n<i.testFailedAt)),o.xp6(3),o.Q6J("src",i.appyConfig.cdnMediaPath+t.image,o.LSH),o.xp6(2),o.Oqu(t.actionNameTitle),o.xp6(1),o.Q6J("ngIf",n<i.testFailedAt)}}function HF(t,e){1&t&&(o.O4$(),o.kcU(),o.ynx(0),o._uU(1," Something went wrong, Please check "),o.BQk())}function QF(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("Step ",t.testFailedAt+1," needs attention")}}function YF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",73),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).lastStepNeedAttention()}),o.TgZ(1,"span",75),o.O4$(),o.TgZ(2,"svg",83),o.TgZ(3,"g",84),o._UZ(4,"path",85),o._UZ(5,"path",86),o.qZA(),o.TgZ(6,"defs"),o.TgZ(7,"clipPath",87),o._UZ(8,"rect",88),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o._uU(9," Edit Here"),o.qZA()}}function zF(t,e){if(1&t&&(o.TgZ(0,"div",60),o.YNc(1,BF,9,6,"div",61),o.TgZ(2,"div",72),o.TgZ(3,"h3",74),o.TgZ(4,"span",75),o.O4$(),o.TgZ(5,"svg",76),o._UZ(6,"path",77),o._UZ(7,"path",78),o._UZ(8,"path",79),o.qZA(),o.qZA(),o.YNc(9,HF,2,0,"ng-container",80),o.YNc(10,QF,2,1,"ng-template",null,81,o.W1O),o.qZA(),o.kcU(),o.TgZ(12,"p"),o.TgZ(13,"span"),o._uU(14),o.qZA(),o.YNc(15,YF,10,0,"a",82),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.MAs(11),e=o.oxw();o.xp6(1),o.Q6J("ngForOf",e.connectList),o.xp6(8),o.Q6J("ngIf",1===e.stepMissingMessage)("ngIfElse",t),o.xp6(5),o.hij("",e.triggerTestFailMessage," "),o.xp6(1),o.Q6J("ngIf",e.errorCount<2)}}function VF(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",89),o.TgZ(1,"p",90),o._uU(2,"Need Help? It seems like the flow isn\u2019t working as expected. Our experts can "),o._UZ(3,"br",91),o._uU(4," help you resolve this"),o.qZA(),o.TgZ(5,"div",92),o.TgZ(6,"a",93),o.TgZ(7,"button",94),o._uU(8," Book Expert Assistance "),o.qZA(),o.qZA(),o.TgZ(9,"a",95),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeAppointmentPopUp()}),o._uU(10,"I\u2019ll manage myself"),o.qZA(),o.qZA(),o.qZA()}}function GF(t,e){1&t&&o._UZ(0,"app-loader")}function WF(t,e){1&t&&(o.TgZ(0,"div",96),o.TgZ(1,"div",97),o.TgZ(2,"div",98),o.TgZ(3,"div",99),o._UZ(4,"button",100),o.qZA(),o.TgZ(5,"div",101),o._UZ(6,"img",102),o.TgZ(7,"h2",103),o._uU(8,"It's time to Upgrade."),o.qZA(),o.TgZ(9,"p"),o._uU(10,"You have reached the limit of your current plan."),o._UZ(11,"br"),o._uU(12," To start syncing your tasks, You need to choose a plan."),o.qZA(),o.TgZ(13,"button",104),o._uU(14,"Upgrade"),o.qZA(),o.qZA(),o.TgZ(15,"div",105),o.TgZ(16,"div",106),o.TgZ(17,"p"),o._uU(18,"Your Connect is Ready!"),o.qZA(),o.TgZ(19,"div",107),o._UZ(20,"input",108),o._UZ(21,"div",109),o._UZ(22,"div",110),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function KF(t,e){1&t&&o._UZ(0,"div",111)}
1let XF=(()=>{class t{constructor(t,e,n,i,r,s){this.commonService=t,this.customerConnectService=e,this.customerService=n,this.modalService=i,this.router=r,this.cookieService=s,this.appsList=[],this.selectedApp=new o.vpe,this.updateConnectName=new o.vpe,this.goToConnectApp=new o.vpe,this.updateShowAppListing=new o.vpe,this.testloader=!0,this.appyConfig=go.N,this.triggerTestFail=!1,this.testFailed=new o.vpe,this.isShow=!0,this.showSuccess=!1,this.showConnectedApp=!1,this.showSuccessfully=!1,this.hide=!1,this.isOpen=!1,this.tempIndex=0,this.frequencyId=-1,this.displayFrequencyValue="",this.closeAppointmentPopUpTag=!1,this.errorCount=0,this.connectErrorCounts={}}ngAfterContentInit(){let t,e;if(setTimeout(()=>{const t=this.cookieService.get("connectErrorCounts");t?(this.connectErrorCounts=JSON.parse(t),this.errorCount=this.connectErrorCounts[this.connectId],void 0===this.errorCount&&(this.errorCount=0),this.isSkipRunTest&&(this.errorCount=0),this.testFailed.emit({errorCount:this.errorCount})):(this.connectErrorCounts={},this.errorCount=0),this.connectErrorCounts[this.connectId]||(this.connectErrorCounts[this.connectId]=0)}),t=this.customerService.GetCurrent(),this.customerService.getCurrentTaskFrequencyForConnect(this.connectId).subscribe(n=>{var i,o,r,s,a,c,l,d;if(this.testloader=!1,n||(n.frequencyId=-1),e="enterprise"==(null===(o=null===(i=null==t?void 0:t.plan_details)||void 0===i?void 0:i[0])||void 0===o?void 0:o.identifire)||"business2"==(null===(s=null===(r=null==t?void 0:t.plan_details)||void 0===r?void 0:r[0])||void 0===s?void 0:s.identifire)?"Every 1 min (Default)":"professional"==(null===(c=null===(a=null==t?void 0:t.plan_details)||void 0===a?void 0:a[0])||void 0===c?void 0:c.identifire)?"Every 2 min (Default)":"standard"==(null===(d=null===(l=null==t?void 0:t.plan_details)||void 0===l?void 0:l[0])||void 0===d?void 0:d.identifire)?"Every 5 min (Default)":"Every 15 min (Default)",this.displayFrequencyValue=e,5===n.frequencyId){let t="";const e=Math.floor(n.frequency/86400),i=n.frequency%86400,o=Math.floor(i/3600),r=Math.floor(i%3600/60);e>0&&(t+=`${e} days `),o>0&&(t+=`${o} hour `),r>0&&(t+=`${r} minutes `),this.displayFrequencyValue=t.trim()}else 1===n.frequencyId?this.displayFrequencyValue="Every 1 hour":2===n.frequencyId?this.displayFrequencyValue="Every 6 hour":3===n.frequencyId?this.displayFrequencyValue="Every 12 hour":4===n.frequencyId&&(this.displayFrequencyValue="Every 24 hour")}),localStorage.removeItem("activeTab"),this.isActionFailed&&this.actionFailedIndex&&this.actionFailedData)return this.testFailedAt=this.actionFailedIndex,this.triggerTestFailMessage=this.actionFailedData,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData=this.actionData,this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,void localStorage.setItem("activeTab","draft");let n=!0;this.connectList.forEach(t=>{n&&!this.isSkipRunTest&&(n=this.processOptions(t))}),n&&this.customerService.getCurrentUser({}).subscribe(t=>{var e,n,i;let o;switch(this.customerService.setCurrent(t),this.customer=t,null===(i=null===(n=null===(e=this.customer)||void 0===e?void 0:e.plan_details)||void 0===n?void 0:n[0])||void 0===i?void 0:i.identifire){case"enterprise":case"business2":o="Every 1 min (Default)";break;case"professional":o="Every 2 min (Default)";break;case"standard":o="Every 5 min (Default)";break;default:o="Every 15 min (Default)"}if(this.options=[{displayValue:o,selected:!0,value:-1},{displayValue:"Every 1 hour",selected:!1,value:1},{displayValue:"Every 6 hour",selected:!1,value:2},{displayValue:"Every 12 hour",selected:!1,value:3},{displayValue:"Every 24 hour",selected:!1,value:4}],this.getTaskFrequency(),this.isSkipRunTest){this.connectList&&this.connectList.length>0&&(this.connectList[0].connectTitle=this.connectList[0].connectTitle?this.connectList[0].connectTitle:this.connectList[0].displayName+" to "+this.connectList[this.connectList.length-1].displayName,this.responceData={message:"success",returnData:[]},this.updateUserConnectStatus(this.connectList[0].connectTitle,1,"Completed"));
1const t=this.cookieService.get("connectErrorCounts");t&&(this.connectErrorCounts=JSON.parse(t),this.errorCount=this.connectErrorCounts[this.connectId],this.errorCount>0&&(delete this.connectErrorCounts[this.connectId],this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts)))),this.testloader=!1}else this.connectRunTest(0)})}EditTaskFrequency(t){let e,n;e=this.customerService.GetCurrent(),this.testloader=!0,this.customerService.getCurrentTaskFrequencyForConnect(t).subscribe(i=>{var o,r,s,a,c,l,d,u;this.testloader=!1,i||(i.frequencyId=-1),n="enterprise"==(null===(r=null===(o=null==e?void 0:e.plan_details)||void 0===o?void 0:o[0])||void 0===r?void 0:r.identifire)||"business2"==(null===(a=null===(s=null==e?void 0:e.plan_details)||void 0===s?void 0:s[0])||void 0===a?void 0:a.identifire)?"Every 1 min (Default)":"professional"==(null===(l=null===(c=null==e?void 0:e.plan_details)||void 0===c?void 0:c[0])||void 0===l?void 0:l.identifire)?"Every 2 min (Default)":"standard"==(null===(u=null===(d=null==e?void 0:e.plan_details)||void 0===d?void 0:d[0])||void 0===u?void 0:u.identifire)?"Every 5 min (Default)":"Every 15 min (Default)",this.bsModalRef=this.modalService.show(gM,{initialState:{modelTitle:"Set Task Frequency",modelContent:"Customize the frequency of your task to auto-update your data at chosen intervals. ",modelConnectId:t,translation:this.translation,frequencyId:i.frequencyId,frequency:null==i?void 0:i.frequency,defaultFrequencyDisplay:n}}),this.bsModalRef.content.onClose.subscribe(n=>{var i,o,r,s,a,c,l,d;if(null==n?void 0:n.confirm){if(this.displayFrequencyValue=n.frequencyId,-1===n.frequencyId&&(this.displayFrequencyValue="enterprise"==(null===(o=null===(i=null==e?void 0:e.plan_details)||void 0===i?void 0:i[0])||void 0===o?void 0:o.identifire)||"business2"==(null===(s=null===(r=null==e?void 0:e.plan_details)||void 0===r?void 0:r[0])||void 0===s?void 0:s.identifire)?"Every 1 min (Default)":"professional"==(null===(c=null===(a=null==e?void 0:e.plan_details)||void 0===a?void 0:a[0])||void 0===c?void 0:c.identifire)?"Every 2 min (Default)":"standard"==(null===(d=null===(l=null==e?void 0:e.plan_details)||void 0===l?void 0:l[0])||void 0===d?void 0:d.identifire)?"Every 5 min (Default)":"Every 15 min (Default)"),5===n.frequencyId){let t="";const e=Math.floor(n.cronData/86400),i=n.cronData%86400,o=Math.floor(i/3600),r=Math.floor(i%3600/60);e>0&&(t+=`${e} days `),o>0&&(t+=`${o} hours `),r>0&&(t+=`${r} minutes `),this.displayFrequencyValue=t.trim()}else 1===n.frequencyId?this.displayFrequencyValue="Every 1 hour":2===n.frequencyId?this.displayFrequencyValue="Every 6 hour":3===n.frequencyId?this.displayFrequencyValue="Every 12 hour":4===n.frequencyId&&(this.displayFrequencyValue="Every 24 hour");this.testloader=!0,this.customerConnectService.setTaskFrequencyForConnect(n).subscribe(e=>{if(!e.success){var n=e.message.match(/"([^"]+)"/);n&&n.length>1&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Unable to set task frequency",modelContent:n[1],modelConnectId:t,translation:this.translation}})},500)}"success"==e.message&&setTimeout(()=>{this.modalService.show(fM,{initialState:{modelTitle:"Task Frequency Updated",modelContent:"Task Frequency of your connect has been updated.",modelConnectId:t,translation:this.translation}})},500),this.testloader=!1})}})})}checkIfConnectCompleted(){this.customerConnectService.getNodeSampleData({indexVal:this.currentApp.index,connectId:this.currentApp.triggerId,customerId:this.customer.customerId,type:"sample"}).subscribe(t=>{t.length>0&&"nodata"!==t?(this.messageHTML=t,this.recheckFrom=t[0].index,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,localStorage.setItem("activeTab","draft")):this.connectRunTest(0)})}connectRunTest(t){if(t!==this.connectList.length)this.testloader=!0,0===t?this.connectTestTrigger(t,e=>{e?this.connectRunTest(t+1):this.updateUserConnectStatus(this.connectList[0].connectTitle,0,"Draft")}):this.connectTestMultiAction(t,e=>{e?this.connectRunTest(t+1):this.updateUserConnectStatus(this.connectList[0].connectTitle,0,"Draft")});
1else{const t=this.cookieService.get("connectErrorCounts");t&&(this.connectErrorCounts=JSON.parse(t),this.errorCount=this.connectErrorCounts[this.connectId],this.errorCount>0&&(delete this.connectErrorCounts[this.connectId],this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts)))),this.testloader=!1,this.connectList[0].connectTitle=this.connectList[0].connectTitle?this.connectList[0].connectTitle:`${this.connectList[0].displayName} to ${this.connectList[this.connectList.length-1].displayName}`,this.updateUserConnectStatus(this.connectList[0].connectTitle,1,"Completed"),localStorage.getItem("WIX_REVIEW")&&this.connectList.forEach(t=>{"kxqxvkfn0o4u718999147sal"===t.appId&&localStorage.getItem("WIX_REVIEW")&&setTimeout(()=>{window.open(localStorage.getItem("WIX_REVIEW"),"_Wix_Review","width=1050,height=700"),localStorage.removeItem("WIX_REVIEW")},1e3)})}}connectTestTrigger(t,e){let n;n=this.connectList[t].editOptions?this.connectList[t].editOptions:{};const i=(this.connectList[t].name+this.connectList[t].actionNameTitle).replace(/ /g,"").replace(/-/g,"").replace("/","").replace("{","").replace("}","").replace("(","").replace(")","");this.testloader=!0;let o={connectid:this.connectList[t].triggerId,appId:this.connectList[t].appId,connectId:this.connectList[t].triggerId,nodeId:this.connectList[t].nodeId};this.connectList[t].auth&&this.connectList[t].auth.authId&&(o.authId=this.connectList[t].auth.authId),this.commonService.triggerTestAction(this.connectList[t].credentialUrlName?this.connectList[t].credentialUrlName:this.connectList[t].name.split(" ").join("").toLowerCase(),i,n,this.currentApp.filterEditOptions,o).subscribe(n=>{if(1===n.status)if(this.triggerTestStatus=n.status,this.message=n.message,this.testloader=!1,n.returnData){let i=[];if(void 0!==n.returnData.format){const t=n.returnData.data.map(t=>(!0===t.value&&"boolean"==typeof t.value?t.value="true":!1===t.value&&"boolean"==typeof t.value?t.value="false":null==t.value?t.value="":"number"==typeof t.value&&(t.value=t.value.toString()),t));i.push({format:!0,date:Date.now(),data:t})}else i.push({format:!1,date:Date.now(),data:n.returnData});this.updateEditOptions(i[0].data,t,n=>{i[0].data=n,this.customerConnectService.updateUserConnectBy_Id(this.connectList[t].nodeId,{nodeStatus:"complete",sample_data:i}).subscribe(n=>{this.connectList[t].sample_data=i,e(!0)})})}else e(!1);else e(!1),this.testloader=!1,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.updateShowAppListing.emit({showAppListing:!0}),this.triggerTestFailMessage=n.message,this.testFailedAt=t,this.responceData=n,localStorage.setItem("activeTab","draft")})}connectTestMultiAction(t,e){var n,i;this.triggerTestFail=!1,this.updateShowAppListing.emit({showAppListing:!1}),this.commonService.connectTestMultiAction({connectId:this.connectList[t].triggerId,current_Id:this.connectList[t].nodeId,nodeId:this.connectList[t].nodeId,authId:null===(i=null===(n=this.connectList[t])||void 0===n?void 0:n.auth)||void 0===i?void 0:i.authId}).subscribe(n=>{if(this.responceData=n,this.testloader=!1,n.data||n.error)this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.updateShowAppListing.emit({showAppListing:!0}),this.triggerTestFailMessage=n.data?n.data:"object"==typeof n.error?JSON.stringify(n.error):n.error,this.testFailedAt=t,localStorage.setItem("activeTab","draft"),e(!1);else if("success"===n.message)e(!0);else{const i=n.returnData||{format:!0,data:[]};let o=[{format:i.format||!0,date:Date.now(),data:i.data}];this.updateEditOptions(o[0].data,t,n=>{o[0].data=n,this.customerConnectService.updateUserConnectBy_Id(this.connectList[t].nodeId,{nodeStatus:"complete",sample_data:o}).subscribe(n=>{this.connectList[t].sample_data=o,e(!0)})})}})}parseJSON(t){if("string"!=typeof t)return t;try{return JSON.parse(t)}catch(e){return t}}updateEditOptions(t,e,n){this.connectList.forEach(n=>{let i={},o=!1;n.index>e&&n.editOptions&&Object.keys(n.editOptions).length>
10&&Object.keys(n.editOptions).forEach(r=>{let s=n.editOptions[r];"string"==typeof s&&(s=JSON.parse(s)),s[0]&&s[0].custom?("string"==typeof s[0].value&&(s[0].value=JSON.parse(s[0].value)),s[0].value.forEach((n,i)=>{if("label"===n.type&&n.nodeIndex===e){o=!0;const r=[...t].filter(t=>t.key===n.key);if(r&&r[0])s[0].value[i].value=r[0].value;else{const i=this.connectList[e].sample_data[0].data.filter(t=>null!=t&&t.key===n.key).find(t=>t.key===n.key);i&&t.push(i)}}})):s[0]&&s.forEach((n,i)=>{if("label"===n.type&&n.nodeIndex===e){o=!0;const r=[...t].filter(t=>t.key===n.key);if(r&&r[0])s[i].value=r[0].value;else{const i=this.connectList[e].sample_data[0].data.filter(t=>null!=t&&t.key===n.key).find(t=>t.key===n.key);i&&t.push(i)}}}),i[r]=s}),o&&(Object.keys(i).forEach(t=>{i[t][0]&&i[t][0].custom&&(i[t][0].value=JSON.stringify(i[t][0].value)),i[t]=JSON.stringify(i[t])}),this.customerConnectService.updateUserConnect(n.nodeId,{editOptions:i}).subscribe(t=>{}))}),n(t)}updateUserConnectStatus(t,e,n){if(this.customer.connect_data/2>=this.customer.plan_details[0].connects&&"jc0fgwefcky2"!==this.customer.planId)this.router.navigateByUrl("/plans");else{let i=!1;for(const t of this.connectList)-1===this.customer.plan_details[0].apps.indexOf(t.app_type)&&(i=!0);const o="Enterprise"!=this.customer.plan_details[0].planName,r=this.connectList.filter(t=>"Enterprise"===t.app_type),s=r.length>0;if(o&&s&&1!==this.customer.testingAccount){this.goToConnectApp.emit(this.connectList.length-1);const t=r.map(t=>t.displayName).join(", ");let e=this.modalService.show(Yl,{initialState:{appNames:t}});this.testloader=!1,e.hide()}else!i&&"jc0fgwefcky2"!==this.customer.planId||1==this.customer.testingAccount?this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{connectTitle:t,connectStatus:n}).subscribe(t=>{if(1===e){let t=this.connectList.map(t=>t.nodeId);this.updateUserConnectOnFinishMultiple(t,t=>{"success"==t.result&&this.responceData&&("success"===this.responceData.message||this.responceData.returnData)&&this.showRunTestPage()})}else this.connectList[this.connectList.length-1].status!==e&&this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{status:e}).subscribe(t=>{this.customerConnectService.deleteUserConnectCron(this.currentApp.triggerId).subscribe(t=>{if(1===this.connectList[this.connectList.length-1].status){const t=this.customerService.GetCurrent();t.connect_data=t.connect_data-1,this.customerService.setCurrent(t),this.connectList[this.connectList.length-1].status=e}})})}):this.customerConnectService.updateConnectByConnectId(this.currentApp.triggerId,{status:0,connectTitle:t,connectStatus:n}).subscribe(t=>{this.customerConnectService.deleteUserConnectCron(this.currentApp.triggerId).subscribe(t=>{this.connectList[this.connectList.length-1].status=0,$("#off").prop("checked",!0),$("#on").prop("checked",!1),1===e&&"jc0fgwefcky2"!==this.customer.planId?this.modalService.show(Vl):"jc0fgwefcky2"===this.customer.planId&&(this.modalService.show(zl,{initialState:{customerId:this.customer.customerId}}),this.goToConnectApp.emit(this.connectList.length-1))})})}}lastStepNeedAttention(){this.currentApp=this.connectList[this.testFailedAt],this.currentApp?(this.currentApp.currentAction="options",this.selectedApp.emit({currentApp:this.currentApp})):this.goToConnectApp.emit(this.connectList.length-1)}doCorrectOption(t){if(t){switch(t.nodeStatus){case"new":this.currentApp=this.connectList[t.index],this.currentApp.currentAction="app";break;case"app_selected":this.currentApp=this.connectList[t.index],this.currentApp.currentAction="action";break;case"ta_selected":["k2P4o69wb5f473388E6g","jlp5059wb5f473388e6f","k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733syncdata","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","k2P4p45df5f222345E0a","janrjh1l08ex59386f67g7nh","janrjh1l08ex59386f8cx5lp","lna8nwtk00qb7189999ylsri"].includes(t.appId)?(this.currentApp=this.connectList[t.index],this.currentApp.currentAction="options"):(this.currentApp=this.connectList[t.index],this.currentApp.currentAction="account");break;default:this.currentApp=this.connectList[t.index],this.currentApp.currentAction="options"}this.selectedApp.emit({currentApp:this.currentApp})}}updateUserConnectOnFinishMultiple(t,e=null){return this.customerConnectService.updateUserConnectOnFinishMultiple(t,{status:1,connectStatus:"Completed",userConnectId:this.connectId}).subscribe(t=>
1{if(t.desc=t.desc||[],this.OnFinishMultiple=t,delete this.OnFinishMultiple.reconnectApprovedAccount,t&&t.desc&&t.desc.length)this.connectList[this.connectList.length-1].status=0,$("#off").prop("checked",!0),$("#on").prop("checked",!1),t.desc="* "+t.desc.join("</br> * "),this.bsModalRef=this.modalService.show(ZF,{initialState:{OnFinishMultiple:t,translation:this.translation}}),this.bsModalRef.content.onClose.subscribe(t=>{t.goTo?this.doCorrectOption(t.goTo.nodeId):t.close?(this.connectList[this.connectList.length-1].status=0,$("#off").prop("checked",!0),$("#on").prop("checked",!1)):t.update&&(this.testloader=!1,$("#off").prop("checked",!1),$("#on").prop("checked",!0),this.testloader=!1,this.connectList[this.connectList.length-1].status=1)});else if("error"===t.result)this.testFailedAt=t.index,this.triggerTestFailMessage=t.msg||t.message||"Step is not completed",this.stepMissingMessage=this.triggerTestFailMessage.includes("NA")?1:0,this.isSkipRunTest?this.connectRunTest(0):(this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData=t.result,this.updateShowAppListing.emit({showAppListing:!0}),localStorage.setItem("activeTab","draft"));else if("success"===t.result){let t={};t=this.customerService.GetCurrent(),t.connect_data=t.connect_data+1,this.customerService.setCurrent(t),this.connectList[this.connectList.length-1].status=1}else this.doCorrectOption({index:0,nodeStatus:"ta_selected"});return e&&e(t),t})}toggleDisplay(){this.isShow=!this.isShow}setTaskFrequency(t){this.options.forEach(e=>{e.selected=e.value===t.value}),this.testloader=!0,this.customerConnectService.setTaskFrequencyForConnect({confirm:!0,connectId:this.connectId,frequencyId:t.value}).subscribe(t=>{t.success||t.message.match(/"([^"]+)"/),this.testloader=!1})}toggleDropdown(){this.isOpen=!this.isOpen}get selectedOption(){const t=this.options.find(t=>t.selected);return t?t.displayValue:null}showRunTestPage(){this.showSuccess||(this.updateShowAppListing.emit({showAppListing:!1}),this.showSuccess=!0,setTimeout(()=>{const t=document.getElementById("Successfully_Msg");t&&t.classList.add("additionalClass")},500),this.showConnectedApp=!0,setTimeout(()=>{const t=document.getElementById("ConnectedApp_Info");t&&t.classList.add("connectedappinfoClass")},4e3),setTimeout(()=>{this.showSuccessfully=!this.showSuccessfully},750),window.innerWidth<991&&setTimeout(()=>{const t=document.getElementById("Successfully_Msg");t&&t.classList.add("mobile-additionalClass")},1500))}getTaskFrequency(){this.customerService.getCurrentTaskFrequencyForConnect(this.connectId).subscribe(t=>{t||(t={frequencyId:-1}),this.frequencyId=t.frequencyId,this.options.forEach(t=>{t.selected=t.value===this.frequencyId})})}processOptions(t){var e,n;const i=t.triggerEditOptions,o=t.additionalTriggerEditOptions;for(let r=0;r<i.length;r++){const s=i[r];if("true"===s.required){const i=t.appId;if("k2P4o45df5f473111E0g"===i||"k2P4o45df5f473111E0f"===i){const n=[];for(const i in t.editOptions)if(i.endsWith("_keyData")){const o=this.parseJSON(t.editOptions[i]);let r=Array.isArray(o)?o:[o];o.forEach(t=>{t.key&&n.push(t.key),t.value&&n.push(t.value)});const s=null===(e=this.connectList[o[0].nodeIndex])||void 0===e?void 0:e.sample_data;if(s&&s.length>0&&0===r.filter(t=>s.some(e=>e.data&&e.data.some(e=>e.key===t.key))).length){const e=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=e,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:e},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}}}else{let e=!1;const n=[];for(const i in t.editOptions)if(i.endsWith("_data_value")||i.endsWith("lookupKeyName")){const o=this.parseJSON(t.editOptions[i]);let r=Array.isArray(o)?o:[o];o.forEach(i=>
1{var s;i.key&&n.push(i.key),i.value&&n.push(i.value);const a=null===(s=this.connectList[o[0].nodeIndex])||void 0===s?void 0:s.sample_data;if(a&&a.length>0&&0===r.filter(t=>a.some(e=>e.data&&e.data.some(e=>e.key===t.key))).length){const n=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=n,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:n},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,e=!0,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}})}if(e)return!1}if(o&&o.length>0)for(let e=0;e<o.length;e++){const i=o[e];if("true"===i.required){let e=t.editOptions[i.name];if("false"===e&&(e="FALSE"),e){const i=this.parseJSON(e);let o,r=Array.isArray(i)?i:[i];if(o=Array.isArray(i)?i[0]:i,!o){const e=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=e,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:e},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}{const e=null===(n=this.connectList[o.nodeIndex])||void 0===n?void 0:n.sample_data;if(e&&e.length>0&&0===r.filter(t=>e.some(e=>e.data&&e.data.some(e=>e.key===t.key))).length){const e=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=e,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:e},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}}}}}let r=t.editOptions[s.name];if("false"===r&&(r="FALSE"),r){const e=this.parseJSON(r);let n,i=Array.isArray(e)?e:[e];if(n=Array.isArray(e)?e[0]:e,!n){const e=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=e,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:e},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}{let e=[];
1if(i.forEach(t=>{var n;const i=null===(n=this.connectList[t.nodeIndex])||void 0===n?void 0:n.sample_data;i&&(e=e.concat(i))}),e&&e.length>0&&0===i.filter(t=>e.some(e=>e.data&&e.data.some(e=>e.key===t.key))||""===t.key&&t.value).length){const e=`Step no. ${t.index+1} is not completed. Required fields are missing.`;return this.testFailedAt=t.index,this.triggerTestFailMessage=e,this.triggerTestFail=!0,this.connectErrorCounts[this.connectId]++,this.cookieService.set("connectErrorCounts",JSON.stringify(this.connectErrorCounts),7),this.connectErrorCounts[this.connectId]>2&&this.testFailed.emit({triggerTestFail:!0}),this.responceData={data:e},this.updateShowAppListing.emit({showAppListing:!0}),this.testloader=!1,this.updateConnectStatus(this.currentApp.nodeStatus,"Draft"),!1}}}}}return!0}updateConnectStatus(t,e){this.connectList=this.connectList.map(n=>{let i={nodeStatus:null,connectStatus:e};return this.currentApp.index==n.index?(n.nodeStatus=t,this.currentApp.nodeStatus=t,this.currentApp.connectStatus=e,i.nodeStatus=t):delete i.nodeStatus,this.customerConnectService.updateUserConnectBy_Id(n.nodeId,i).subscribe(()=>{this.currentApp.index==n.index&&(n.connectStatus=e)}),n}),localStorage.setItem("activeTab","draft"),this.currentApp.connectStatus="Draft"}closeAppointmentPopUp(){this.lastStepNeedAttention()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wo.v),o.Y36(Fo),o.Y36(yo),o.Y36(mo.tT),o.Y36(ui.F0),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-success-run-test"]],inputs:{appsList:"appsList",currentApp:"currentApp",isTemplate:"isTemplate",isSkipRunTest:"isSkipRunTest",singleClickTemplate:"singleClickTemplate",translation:"translation",nodeType:"nodeType",connectId:"connectId",connectList:"connectList",warningInfo:"warningInfo",isActionFailed:"isActionFailed",actionFailedIndex:"actionFailedIndex",actionFailedData:"actionFailedData",actionData:"actionData"},outputs:{selectedApp:"selectedApp",updateConnectName:"updateConnectName",goToConnectApp:"goToConnectApp",updateShowAppListing:"updateShowAppListing",testFailed:"testFailed"},decls:9,vars:9,consts:[["class","guide-flex mar-20-t mar-20-b p-3 bg-white rounded",4,"ngIf"],["id","aside_step_guide","class","aside-step-guide",4,"ngIf"],["class","runtest-Sec justifycontent-center overflow-hidden",4,"ngIf"],["class","chooseapps runtest-main",4,"ngIf"],["class","d-flex align-items-center gap-3 flex-lg-row flex-column p-3 book-alert-wrap justify-content-between",4,"ngIf"],[4,"ngIf"],["class","modal fade show","id","upgradeplaneapp","data-bs-backdrop","static","data-bs-keyboard","false","tabindex","-1","aria-labelledby","staticBackdropLabel","aria-hidden","true",4,"ngIf"],["class","modal-backdrop fade show",4,"ngIf"],[1,"guide-flex","mar-20-t","mar-20-b","p-3","bg-white","rounded"],["type","button","id","step_guide_Btn","tooltip","Guide","placement","top",1,"btn","step_guide",3,"click"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],["id","aside_step_guide",1,"aside-step-guide"],[1,"guide-menu"],[1,"mar-0-l"],["type","button","title","Close Guide",1,"btn","closebtn-guide",3,"click"],["aria-hidden","true",1,"fa","fa-times-circle-o","fa-fw","fa-lg"],[1,"scroll-guide"],[1,"guide-data"],[1,"step-listing","mar-15-t"],[1,"runtest-Sec","justifycontent-center","overflow-hidden"],["class","h-100 success-wrap text-center d-flex flex-column justify-content-center align-items-center ","id","Successfully_Msg",3,"ngClass",4,"ngIf"],["class","connectapps-wrap","id","ConnectedApp_Info",3,"ngClass",4,"ngIf"],["id","Successfully_Msg",1,"h-100","success-wrap","text-center","d-flex","flex-column","justify-content-center","align-items-center",3,"ngClass"],[1,"success-img"],["src","/assets/images/tick_single.gif","alt","","width","205","height","205"],["class","success-content",4,"ngIf"],[1,"success-content"],["id","ConnectedApp_Info",1,"connectapps-wrap",3,"ngClass"],[1,"card-apps"],[1,"card-body-apps"],[1,"title-app"],[1,"iconapp-wrap","d-flex","align-items-center","justify-content-center","gap-2","mb-4","flex-wrap"],[4,"ngFor","ngForOf"],[1,"connectapps-info"],[1,"font-w400","text-muted"],[1,"border","d-flex","align-items-center","justify-content-between","rounded-4","p-3"],[1,"d-flex"],[1,"mb-0","text-black","font-w600"],[1,"text-muted"],["type","button",1,"btn","p-0","edit_pop",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","12","height","13","viewBox","0 0 12 13","fill","none"],["d","M7.37162 4.23355L7.98496 4.84688L1.94496 10.8869H1.33162V10.2735L7.37162 4.23355ZM9.77162 0.220215C9.60496 0.220215 9.43162 0.286881 9.30496 0.413548L8.08496 1.63355L10.585 4.13355L11.805 2.91355C12.065 2.65355 12.065 2.23355 11.805 1.97355L10.245 0.413548C10.1116 0.280215 9.94496 0.220215 9.77162 0.220215ZM7.37162 2.34688L-0.00170898 9.72021V12.2202H2.49829L9.87162 4.84688L7.37162 2.34688Z","fill","#5371FF"],[1,"my-4","d-flex","justify-content-between","gap-3","flex-wrap","align-items-center"],[1,"mb-0"],[1,"d-flex","align-items-center","gap-2","toggleradio-btn"],[1,"form-check","form-check-inline","m-0"],["type","radio","id","off","value","off",1,"form-check-input",3,"checked","click"],["for","off",1,"form-check-label"],["type","radio","id","on","value","on",1,"form-check-input",3,"checked","click"],["for","on",1,"form-check-label"],[1,"connects-buttons","text-center","py-3","d-flex","justify-content-center","gap-3","align-items-center"],[1,"btn","editbtn","rounded-pill",3,"click"],["type","link","routerLink","/connects",1,"btn","btn-primary","dashboard-btn","rounded-pill"],["class","run-iconapp d-flex align-items-center justify-content-center",4,"ngIf"],["class","run-iconapp-plus d-flex align-items-center justify-content-center",4,"ngIf"],[1,"run-iconapp","d-flex","align-items-center","justify-content-center"],["alt","","width","120","height","120",3,"src"],[1,"run-iconapp-plus","d-flex","align-items-center","justify-content-center"],["width","13","height","13","viewBox","0 0 13 13","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.92163 5.45707H12.4928V8.04125H7.92163V12.5842H5.33484V8.04125H0.763672V5.45707H5.33484V0.855103H7.92163V5.45707Z","fill","black"],[1,"choosea
1pps","runtest-main"],["class","runtest",4,"ngFor","ngForOf"],["class","alert alert-danger text-center error_alert",4,"ngFor","ngForOf"],[1,"runtest"],[1,"runtest-appimg"],[1,"appimg",3,"ngClass"],[1,"complete-appcheck"],[1,"fa","fa-check-circle"],["alt","gmail","width","128","height","128",3,"src"],["class","loading-dots",4,"ngIf"],[1,"loading-dots"],[1,"ellipsis-anim"],[1,"alert","alert-danger","text-center","error_alert"],[3,"click"],[1,"push-15","ng-binding","d-inline-flex","align-items-center","gap-2","justify-content-center"],[1,"svgicon"],["width","25","height","26","viewBox","0 0 25 26","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M22.6354 19.25L14.3021 4.66667C14.1204 4.34605 13.8569 4.07936 13.5385 3.89382C13.22 3.70828 12.8581 3.61053 12.4896 3.61053C12.1211 3.61053 11.7591 3.70828 11.4407 3.89382C11.1223 4.07936 10.8588 4.34605 10.6771 4.66667L2.34375 19.25C2.16009 19.5681 2.06378 19.9291 2.0646 20.2964C2.06541 20.6637 2.16331 21.0242 2.34838 21.3415C2.53346 21.6588 2.79912 21.9214 3.11844 22.1029C3.43776 22.2845 3.79939 22.3783 4.16667 22.375H20.8333C21.1989 22.3746 21.5578 22.2781 21.8743 22.0951C22.1907 21.9121 22.4534 21.6491 22.636 21.3324C22.8186 21.0158 22.9146 20.6567 22.9145 20.2911C22.9144 19.9256 22.8182 19.5666 22.6354 19.25Z","stroke","#EB3A2E","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 9.875V14.0417","stroke","#EB3A2E","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 18.2083H12.5106","stroke","#EB3A2E","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[4,"ngIf","ngIfElse"],["naMessage",""],[3,"click",4,"ngIf"],["width","17","height","17","viewBox","0 0 17 17","fill","none","xmlns","http://www.w3.org/2000/svg"],["clip-path","url(#clip0_1_130)"],["d","M12.0417 2.125C12.2221 1.91181 12.4452 1.73829 12.6969 1.61548C12.9486 1.49267 13.2232 1.42328 13.5034 1.41172C13.7836 1.40016 14.0631 1.44668 14.3242 1.54833C14.5853 1.64999 14.8221 1.80453 15.0197 2.00212C15.2173 2.1997 15.3713 2.436 15.4718 2.69594C15.5723 2.95589 15.6172 3.23378 15.6036 3.5119C15.59 3.79002 15.5182 4.06228 15.3927 4.31132C15.2673 4.56035 15.091 4.78071 14.875 4.95833L5.3125 14.5208L1.41667 15.5833L2.47917 11.6875L12.0417 2.125Z","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["d","M10.625 3.54167L13.4583 6.37501","stroke","white","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_1_130"],["width","17","height","17","fill","white"],[1,"d-flex","align-items-center","gap-3","flex-lg-row","flex-column","p-3","book-alert-wrap","justify-content-between"],[1,"mb-0","text-center","text-lg-start"],[1,"d-none","d-lg-inline"],[1,"d-flex","flex-column","flex-lg-row","gap-3","align-items-center"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank"],["type","button",1,"btn","rounded-pill"],["aria-label","","target","_blank",1,"d-inline-flex",3,"click"],["id","upgradeplaneapp","data-bs-backdrop","static","data-bs-keyboard","false","tabindex","-1","aria-labelledby","staticBackdropLabel","aria-hidden","true",1,"modal","fade","show"],[1,"modal-dialog","modal
1-dialog-centered","modal-lg"],[1,"modal-content","text-center"],[1,"modal-header","border-0","pb-0"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body","text-black"],["src","assets/images/smileface.png","alt","smileface","width","70","height","70"],[1,"my-3"],["type","button",1,"btn","btn-dark","btn-md","px-5","py-2"],[1,"modal-footer","justify-content-center"],[1,"nowturn-iton","mb-3"],[1,"togglebutton"],["type","checkbox","id","switch-turnon","disabled","",1,"checkbox"],[1,"knobs"],[1,"layer"],[1,"modal-backdrop","fade","show"]],template:function(t,e){1&t&&(o.YNc(0,kF,5,0,"div",0),o.YNc(1,TF,18,0,"aside",1),o.YNc(2,FF,3,2,"div",2),o.YNc(3,RF,3,2,"div",3),o.YNc(4,zF,16,5,"div",3),o.YNc(5,VF,11,0,"div",4),o.YNc(6,GF,1,0,"app-loader",5),o.YNc(7,WF,23,0,"div",6),o.YNc(8,KF,1,0,"div",7)),2&t&&(o.Q6J("ngIf",e.triggerTestFail),o.xp6(1),o.Q6J("ngIf",!e.isShow),o.xp6(1),o.Q6J("ngIf",e.showSuccess||e.showConnectedApp),o.xp6(1),o.Q6J("ngIf",e.messageHTML&&e.triggerTestFail),o.xp6(1),o.Q6J("ngIf",e.responceData&&e.triggerTestFail),o.xp6(1),o.Q6J("ngIf",e.triggerTestFail&&!e.closeAppointmentPopUpTag&&e.errorCount>=2),o.xp6(1),o.Q6J("ngIf",e.testloader),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1))},directives:[to.O5,tr,to.mk,to.sg,ui.yS,po],styles:['.runtest-Sec[_ngcontent-%COMP%]{position:absolute;z-index:1;display:flex;width:100%;height:auto;min-height:calc(100vh - 0vh);background:#fff;margin-top:0}.success-content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#817777;font-weight:600;font-size:26px;letter-spacing:1px}.success-content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#2f4253;margin-top:.5rem}.title-app[_ngcontent-%COMP%]{font-size:18px;font-weight:700;line-height:25px;letter-spacing:.02em;color:#2f4253;text-align:center;margin-bottom:1rem}.run-iconapp[_ngcontent-%COMP%]{width:61px;height:61px;overflow:hidden;padding:.5rem;background:#F3F8FF;border-radius:100%}.run-iconapp-plus[_ngcontent-%COMP%]{width:22px;height:22px;background:#F3F8FF;border-radius:100%}.run-iconapp[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:40px;height:40px;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.connectapps-wrap[_ngcontent-%COMP%]{background-color:#f1f5ff;min-height:95vh;display:flex;align-items:center;justify-content:center;transition-duration:1.5s!important}.success-wrap[_ngcontent-%COMP%]{min-height:95vh}.card-apps[_ngcontent-%COMP%]{max-width:600px;flex:0 0 auto;width:100%;background-color:#fff;padding:1.5rem;border-radius:30px;transition:all .4s ease-in;transition-duration:1.75s}.connectapps-wrap[_ngcontent-%COMP%], .success-wrap[_ngcontent-%COMP%]{flex:0 0 auto;width:50%;padding:1rem;transition:all .4s ease;visibility:hidden;opacity:0}.connectapps-info[_ngcontent-%COMP%]{color:#2f4253;font-weight:500}.connects-buttons[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{width:130px}.editbtn[_ngcontent-%COMP%]{color:#3d70f3;border:1px solid #3D70F3}.editbtn[_ngcontent-%COMP%]:hover, .editbtn[_ngcontent-%COMP%]:focus{background-color:#3d70f3;color:#fff}.dashboard-btn[_ngcontent-%COMP%], .run-Btn[_ngcontent-%COMP%]{background-color:#3d70f3;color:#fff}.dashboard-btn[_ngcontent-%COMP%]:hover, .dashboard-btn[_ngcontent-%COMP%]:focus, .run-Btn[_ngcontent-%COMP%]:hover, .run-Btn[_ngcontent-%COMP%]:focus{background-color:#fff;color:#3d70f3;border:1px solid #3D70F3}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{position:absolute;left:-9999px;pointer-events:none;opacity:0;text-indent:-9999px}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#d4d4d4;font-weight:400;font-size:17px;margin:0;position:relative;padding-left:25px}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{content:"";position:absolute;left:0;top:4px;bottom:auto;width:17px;height:17px;border:1px solid #D4D4D4;border-radius:100%;background:#fff}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:after{content:"";width:9px;height:9px;background:#28B446;position:absolute;top:8px;bottom:auto;left:4px;border-radius:100%;transition:all .3s ease-in-out}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%]   [type=radio][_ngcontent-%COMP%]:not(:checked) + label[_ngcontent-%COMP%]:after{opacity:0;transform:scale(0)}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%]   [type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%]   [type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:before{border:1px solid #28B446}.toggleradio-btn[_ngcontent-%COMP%]   .form-check[_ngcontent-%COMP%]   [type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{color:#2f4253}.connectapps-wrap[_ngcontent-%COMP%]   .card-apps[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:all .4s ease-in}.success-wrap[_ngcontent-%COMP%]   .success-content[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:all .3s ease-in;transition-duration:1s;transition-delay:1s}.connectapps-wrap.ng-trigger-fadeInOut[_ngcontent-%COMP%]   .card-apps[_ngcontent-%COMP%], .success-wrap.additionalClass[_ngcontent-%COMP%]   .success-content[_ngcontent-%COMP%]{opacity:1;visibility:visible}.success-wrap[_ngcontent-%COMP%]{width:100%;transition-delay:1s;transition-duration:1s}.success-wrap.additionalClass[_ngcontent-%COMP%]{width:50%;transition-delay:3s;transition-duration:3s}.connectapps-wrap[_ngcontent-%COMP%]{transform:translate(100%)}.additionalClass[_ngcontent-%COMP%] + .connectapps-wrap[_ngcontent-%COMP%]{transition-duration:4s!important;transition-delay:2s}.additionalClass[_ngcontent-%COMP%] + .connectapps-wrap[_ngcontent-%COMP%]   .card-apps[_ngcontent-%COMP%]{transition-duration:4.5s!important;transition-delay:2s}.connectapps-info[_ngcontent-%COMP%]   .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block;margin-left:0;vertical-align:0;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;border:solid #2f4253;border-width:0 2px 2px 0;padding:4px;transform:rotate(45deg);right:14px;top:13px;position:absolute;transition:all .3s ease}.connectapps-info[_ngcontent-%COMP%]   .dropdown-toggle[aria-expanded=true][_ngcontent-%COMP%]:after{transform:rotate(-135deg)}.additionalClass[_ngcontent-%COMP%]   .success-img[_ngcontent-%COMP%]{opacity:.4;transition-property:opacity;transition-duration:4s;transition-delay:3s}.edit_pop[_ngcontent-%COMP%]{color:#3d70f3}.book-alert-wrap[_ngcontent-%COMP%]{border-radius:10px;border:1.5px solid #5371FF;background:#F8F9FF;box-shadow:0 4px 6px #00000014}.book-alert-wrap[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{background:#5371FF;color:#fff;font-weight:500;letter-spacing:.32px;font-size:14px;padding:10px 20px}.book-alert-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#74748a;font-size:14px;font-weight:500}.book-alert-wrap[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#5371ff;text-align:center;font-size:14px;font-weight:500;letter-spacing:.32px}@media (max-width: 992px){.runtest-Sec[_ngcontent-%COMP%]{flex-wrap:wrap;min-height:auto;margin-top:3px}.success-wrap[_ngcontent-%COMP%]{min-height:95vh;
1transition:min-height 4s ease}.connectapps-wrap[_ngcontent-%COMP%]{min-height:auto}.mobile-additionalClass[_ngcontent-%COMP%]{min-height:25vh}.connectapps-wrap[_ngcontent-%COMP%], .success-wrap[_ngcontent-%COMP%], .success-wrap.ng-trigger-fadeInOut[_ngcontent-%COMP%]{width:100%;padding:2rem 1rem}.connectapps-wrap[_ngcontent-%COMP%]{padding:1rem}.card-apps[_ngcontent-%COMP%]{padding:1.5rem 1rem}.success-img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100px}.connectapps-wrap[_ngcontent-%COMP%]{transform:translateY(100%)!important}.additionalClass[_ngcontent-%COMP%] + .connectapps-wrap[_ngcontent-%COMP%]{transform:translateY(0)!important}.success-content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:22px}.success-content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:18px}.success-wrap[_ngcontent-%COMP%]{padding:1rem 1rem 2rem}.run-iconapp[_ngcontent-%COMP%]{width:45px;height:45px}.run-iconapp[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:25px;height:25px}h4[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%]{font-size:1rem}}'],data:{animation:[tc("fadeInOut",[oc("in",ic({opacity:"1",visibility:"visible",transform:"translateX(0%)"})),rc("void => *",[ic({opacity:"0",visibility:"visible"}),ec("500ms ease-in-out")]),rc("* => void",[ec("500ms ease-in-out",ic({opacity:"0"}))])])]}}),t})(),tD=(()=>{class t{constructor(t,e,n,i){this.bsModalRef=t,this.cusService=e,this.commonService=n,this.fb=i,this.captchaToken="",this.handleSuccessValue=0,this.onClose=new fo.xQ,this.captchaError=!0,this.siteKey="6Lfee0gtAAAAAGT8yXRb1JHN5ozYunZzuxv1HuML",this.customerInfo=this.cusService.GetCurrent()}ngOnInit(){this.feedback=this.fb.group({appsname:["",[Xi.kI.required]],triggername:[""],company:[""],companysize:[""],message:[""]}),this.aFormGroup=this.fb.group({recaptcha:["",Xi.kI.required]})}closePopUp(){this.bsModalRef.hide()}handleSuccess(t){this.captchaToken=t,this.handleSuccessValue=1}sendFeedback(){if(1!==this.handleSuccessValue)return void(this.captchaError=!1);if(this.captchaError=!0,this.feedback.invalid)return;this.bsModalRef.hide();const t=this.buildFormData();this.commonService.sendFeedback(t).subscribe(t=>{this.onClose.next(!0)})}buildFormData(){return{customerId:this.customerInfo.customerId,email:this.customerInfo.email,nodeType:this.nodeType,appName:this.sanitizeInput(this.feedback.value.appsname),triggername:this.sanitizeInput(this.feedback.value.triggername||""),appId:this.appId||"",feedback_taname:this.sanitizeInput(this.feedback.value.triggername||""),customerName:this.sanitizeInput(`${this.customerInfo.firstName} ${this.customerInfo.lastName}`),company:this.sanitizeInput(this.feedback.value.company||""),companysize:this.sanitizeInput(this.feedback.value.companysize||""),message:this.sanitizeInput(this.feedback.value.message||""),captchaToken:this.captchaToken}}sanitizeInput(t){return t.replace(/\b(https?:\/\/|www\.|[\w\-]+(\.[\w\-]+)+[\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])\b/g,"URL_REMOVED").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"SCRIPT_REMOVED")}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo),o.Y36(wo.v),o.Y36(Xi.qu))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-add-my-app-request-pop"]],inputs:{nodeType:"nodeType",appName:"appName",appId:"appId"},decls:29,vars:4,consts:[[1,"modal-header","testfetch-header","pt-4","pb-0","px-4"],[1,"modal-title","testfetch-title","text-primary-color","fw-semibold"],["type","button",1,"btn","p-1","bg-transparent",3,"click"],["src","/assets/images/closeIcon.svg","alt","","width","25","height","25"],[1,"modal-body","py-0","px-4"],[1,"text-start"],[1,"f-14","mt-2","mb-4","font-w400"],[1,"container-fluid","px-0"],[1,"row","gy-4",3,"formGroup"],[1,"col-md-12"],["for","appsname",1,"f-14","mb-1","font-w400","text-black"],[1,"text-danger","f18","lh-1"],["type","text","id","appsname","formControlName","appsname",1,"form-control"],["for","message",1,"f-14","mb-1","font-w400","text-black"],["id","message","formControlName","message","rows","3",1,"form-control"],[1,"col-md-12",3,"formGroup"],["formControlName","recaptcha",3,"siteKey","success"],["captchaElem",""],[1,"text-danger","mt-1",3,"hidden"],[1,"modal-footer","text-center","justify-content-start","border-0","gap-2","px-4","py-3","pb-4"],["type","submit",1,"btn","btn-default","px-md-4","btn_confirm","mx-0","rounded-pill",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2,"Add My App request"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return e.closePopUp()}),o._UZ(4,"img",3),o.qZA(),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.TgZ(7,"h4",6),o._uU(8,"Request to add an app in Appy Pie Automate"),o.qZA(),o.TgZ(9,"div",7),o.TgZ(10,"form",8),o.TgZ(11,"div",9),o.TgZ(12,"label",10),o._uU(13,"Name of the app you want to request to be added for Automation "),o.TgZ(14,"sub",11),o._uU(15,"*"),o.qZA(),o.qZA(),o._UZ(16,"input",12),o.qZA(),o.TgZ(17,"div",9),o.TgZ(18,"label",13),o._uU(19,"Please tell us more about the use case you are looking to solve using this app"),o.qZA(),o._UZ(20,"textarea",14),o.qZA(),o.TgZ(21,"div",15),o.TgZ(22,"ngx-recaptcha2",16,17),o.NdJ("success",function(t){return e.handleSuccess(t)}),o.qZA(),o.TgZ(24,"span",18),o._uU(25,"Please verify the captcha first."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"div",19),o.TgZ(27,"button",20),o.NdJ("click",function(){return e.sendFeedback()}),o._uU(28,"Send Email"),o.qZA(),o.qZA()),2&t&&(o.xp6(10),o.Q6J("formGroup",e.feedback),o.xp6(11),o.Q6J("formGroup",e.aFormGroup),o.xp6(1),o.Q6J("siteKey",e.siteKey),o.xp6(2),o.Q6J("hidden",e.captchaError))},directives:[Xi._Y,Xi.JL,Xi.sg,Xi.Fj,Xi.JJ,Xi.u,ro],styles:[""]}),t})();function eD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",18),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).selectOption(1,e.value)}),o.TgZ(1,"span",19),o._uU(2),o.qZA(),o.TgZ(3,"span",20),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("selected",n.isOptionSelected(1,t.value)),o.xp6(2),o.Oqu(t.id),o.xp6(2),o.Oqu(t.label)}}function nD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",5),o.TgZ(1,"div",6),o.TgZ(2,"span",7),o._uU(3,"1 "),o.O4$(),o.TgZ(4,"svg",8),o._UZ(5,"path",9),o._UZ(6,"path",10),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"h2",11),o._uU(8," What is the size of your company?"),o.TgZ(9,"span",12),o._uU(10,"*"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",13),o.YNc(12,eD,5,4,"button",14),o.qZA(),o.TgZ(13,"div",15),o.TgZ(14,"button",16),o.NdJ("click",function(){return o.CHM(t),o.oxw().previousStep()}),o._uU(15," PREVIOUS "),o.qZA(),o.TgZ(16,"button",17),o.NdJ("click",function(){return o.CHM(t),o.oxw().nextStep()}),o._uU(17," OK "),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(11),o.Q6J("@optionsListTransition",t.currentStep)("@listAnimation",t.currentStep),o.xp6(1),o.Q6J("ngForOf",t.companySizeOptions),o.xp6(2),o.Udp("visibility",1===t.currentStep?"hidden":"visible"),o.Q6J("disabled",1===t.currentStep),o.xp6(2),o.Q6J("disabled",!t.canProceed())}}function iD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",18),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).selectOption(2,e.value)}),o.TgZ(1,"span",19),o._uU(2),o.qZA(),o.TgZ(3,"span",20),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("selected",n.isOptionSelected(2,t.value)),o.xp6(2),o.Oqu(t.id),o.xp6(2),o.Oqu(t.label)}}function oD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",5),o.TgZ(1,"div",6),o.TgZ(2,"span",7),o._uU(3,"2 "),o.O4$(),o.TgZ(4,"svg",8),o._UZ(5,"path",9),o._UZ(6,"path",10),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"h2",11),o._uU(8," What team are you on?"),o.TgZ(9,"span",12),o._uU(10,"*"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",13),o.YNc(12,iD,5,4,"button",14),o.qZA(),o.TgZ(13,"div",15),o.TgZ(14,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().previousStep()}),o._uU(15," PREVIOUS "),o.qZA(),o.TgZ(16,"button",17),o.NdJ("click",function(){return o.CHM(t),o.oxw().nextStep()}),o._uU(17," OK "),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(11),o.Q6J("@optionsListTransition",t.currentStep)("@listAnimation",t.currentStep),o.xp6(1),o.Q6J("ngForOf",t.teamOptions),o.xp6(4),o.Q6J("disabled",!t.canProceed())}}function rD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",18),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).selectOption(3,e.value)}),o.TgZ(1,"span",19),o._uU(2),o.qZA(),o.TgZ(3,"span",20),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("selected",n.isOptionSelected(3,t.value)),o.xp6(2),o.Oqu(t.id),o.xp6(2),o.Oqu(t.label)}}function sD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",5),o.TgZ(1,"div",6),o.TgZ(2,"span",7),o._uU(3),o.O4$(),o.TgZ(4,"svg",8),o._UZ(5,"path",9),o._UZ(6,"path",10),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"h2",11),o._uU(8," From where did you hear about us?"),o.TgZ(9,"span",12),o._uU(10,"*"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",13),o.YNc(12,rD,5,4,"button",14),o.qZA(),o.TgZ(13,"div",15),o.TgZ(14,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().previousStep()}),o._uU(15," PREVIOUS "),o.qZA(),o.TgZ(16,"button",17),o.NdJ("click",function(){return o.CHM(t),o.oxw().c
1ompleteOnboarding()}),o._uU(17," COMPLETE "),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(3),o.hij("",t.getDisplayStepNumber()," "),o.xp6(8),o.Q6J("@optionsListTransition",t.currentStep)("@listAnimation",t.currentStep),o.xp6(1),o.Q6J("ngForOf",t.referralOptions),o.xp6(4),o.Q6J("disabled",!t.canProceed())}}let aD=(()=>{class t{constructor(t,e,n,i){this.router=t,this.cookieService=e,this.customerService=n,this.planService=i,this.onComplete=new o.vpe,this.currentStep=1,this.totalSteps=3,this.animationState="step1",this.companySizeOptions=[{id:"A",label:"Only me",value:"only_me"},{id:"B",label:"2\u201320",value:"2_20"},{id:"C",label:"20-99",value:"20_99"},{id:"D",label:"100-499",value:"100_499"},{id:"E",label:"500-999",value:"500_999"},{id:"F",label:"1000+",value:"1000_plus"},{id:"G",label:"I'm not using Flozic for work",value:"not_for_work"}],this.selectedCompanySize="",this.teamOptions=[{id:"A",label:"Engineering",value:"engineering"},{id:"B",label:"Support",value:"support"},{id:"C",label:"Sales",value:"sales"},{id:"D",label:"Marketing",value:"marketing"},{id:"E",label:"Product & Design",value:"product_design"},{id:"F",label:"IT",value:"it"},{id:"G",label:"Executive/Owner",value:"executive_owner"},{id:"H",label:"Other",value:"other"}],this.selectedTeam="",this.referralOptions=[{id:"A",label:"Social Media",value:"social_media"},{id:"B",label:"Search Engine",value:"search_engine"},{id:"C",label:"Referral / Friend / Colleague",value:"referral"},{id:"D",label:"Advertisement (Online / Offline)",value:"advertisement"},{id:"E",label:"Event / Webinar / Workshop",value:"event"},{id:"F",label:"News Article / Blog",value:"news_blog"},{id:"G",label:"Other",value:"other"}],this.selectedReferral=""}ngOnInit(){this.currentUser=this.customerService.GetCurrent(),this.loadProgress()}loadProgress(){const t=this.cookieService.get("onboarding_step");t?(this.currentStep=parseInt(t,10),this.animationState=`step${this.currentStep}`):this.animationState="step1";const e=this.cookieService.get("onboarding_company_size");this.selectedCompanySize=e||"";const n=this.cookieService.get("onboarding_team");this.selectedTeam=n||"";const i=this.cookieService.get("onboarding_referral");this.selectedReferral=i||""}selectOption(t,e){1===t?(this.selectedCompanySize=e,this.cookieService.set("onboarding_company_size",e,7,"/","",!0,"Strict")):2===t?(this.selectedTeam=e,this.cookieService.set("onboarding_team",e,7,"/","",!0,"Strict")):3===t&&(this.selectedReferral=e,this.cookieService.set("onboarding_referral",e,7,"/","",!0,"Strict"))}getProgressPercentage(){return this.currentStep/this.totalSteps*100}nextStep(){if((1!==this.currentStep||this.selectedCompanySize)&&(2!==this.currentStep||this.selectedTeam)&&(3!==this.currentStep||this.selectedReferral)){if(1===this.currentStep&&"only_me"===this.selectedCompanySize)return this.currentStep=3,this.animationState=`step${this.currentStep}`,this.cookieService.set("onboarding_step",this.currentStep.toString(),7,"/","",!0,"Strict"),this.selectedTeam="other",void this.cookieService.set("onboarding_team","other",7,"/","",!0,"Strict");this.currentStep<this.totalSteps&&(this.currentStep++,this.animationState=`step${this.currentStep}`,this.cookieService.set("onboarding_step",this.currentStep.toString(),7,"/","",!0,"Strict"))}}previousStep(){this.currentStep>1&&(3===this.currentStep&&"only_me"===this.selectedCompanySize?this.currentStep=1:this.currentStep--,this.animationState=`step${this.currentStep}`,this.cookieService.set("onboarding_step",this.currentStep.toString(),7,"/","",!0,"Strict"))}getDisplayStepNumber(){return 3===this.currentStep&&"only_me"===this.selectedCompanySize?2:this.currentStep}completeOnboarding(){if(!this.selectedReferral)return;const t={companySize:this.selectedCompanySize,team:this.selectedTeam,referral:this.selectedReferral,completeStep:"1",completedAt:(new Date).toISOString()};this.cookieService.set("onboarding_completed","true",365,"/","",!0,"Strict"),this.cookieService.set("onboarding_data",JSON.stringify(t),365,"/","",!0,"Strict"),this.saveOnboardingData(t);const e=this.cookieService.get("planId"),n=decodeURIComponent(localStorage.getItem("originUrl")||"");let i="yearly";if(n&&n.includes("handler/")){const t=n.match(/handler\/([^\/]+)\/([^\/]+)\/([^\/]+)/);t&&t[3]&&(i=t[3])}this.planService.createTrialProduct({method:"addOnboardingLog",appId:this.currentUser.customerId,userId:this.currentUser.customerId,userEmail:this.currentUser.email,appType:"connect",data:{usageType:this.selectedTeam,appGoals:[],teamSize:this.selectedCompanySize,heardFrom:[this.selectedReferral]},country:this.currentUser.country,planId:e||Ar.PLANID_MAP.PROFESSIONAL_PLAN,planPeriod:i}
1).subscribe(t=>{},t=>{console.error("Error creating trial product:",t)}),this.onComplete.emit()}saveOnboardingData(t){const e=this.customerService.GetCurrent();(null==e?void 0:e.customerId)?this.customerService.saveOnboardingData(t).subscribe(t=>{},t=>{console.error("Error saving onboarding data",t)}):console.error("Customer ID not found. Cannot save onboarding data.")}isOptionSelected(t,e){return 1===t?this.selectedCompanySize===e:2===t?this.selectedTeam===e:3===t&&this.selectedReferral===e}canProceed(){return 1===this.currentStep?!!this.selectedCompanySize:2===this.currentStep?!!this.selectedTeam:3===this.currentStep&&!!this.selectedReferral}onStepAnimationDone(){}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.F0),o.Y36(lo.N),o.Y36(yo),o.Y36(Zr))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-onboarding"]],outputs:{onComplete:"onComplete"},decls:11,vars:4,consts:[[1,"onboarding-overlay","flex-column"],[1,"onboarding-header","text-center"],[1,"onboarding-modal"],[1,"step-container"],["class","onboarding-step",4,"ngIf"],[1,"onboarding-step"],[1,"step-header","d-flex","align-items-center","justify-content-center"],[1,"step-number"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["fill","none","d","M0 0h24v24H0z"],["d","M16.01 11H4v2h12.01v3L20 12l-3.99-4z"],[1,"step-title"],[1,"required"],[1,"options-list"],["class","option-button",3,"selected","click",4,"ngFor","ngForOf"],[1,"action-buttons"],[1,"btn","btn-secondary",3,"disabled","click"],[1,"btn","btn-primary",3,"disabled","click"],[1,"option-button",3,"click"],[1,"option-letter"],[1,"option-label"],[1,"btn","btn-secondary",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"h2"),o._uU(3,"Welcome to Flozic Loop!"),o.qZA(),o.TgZ(4,"h3"),o._uU(5,"Answer a few quick questions to personalize your experience. "),o.qZA(),o.qZA(),o.TgZ(6,"div",2),o.TgZ(7,"div",3),o.YNc(8,nD,18,7,"div",4),o.YNc(9,oD,18,4,"div",4),o.YNc(10,sD,18,5,"div",4),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(6),o.Q6J("@fadeIn",void 0),o.xp6(2),o.Q6J("ngIf",1===e.currentStep),o.xp6(1),o.Q6J("ngIf",2===e.currentStep),o.xp6(1),o.Q6J("ngIf",3===e.currentStep))},directives:[to.O5,to.sg],styles:['.onboarding-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(to bottom,#F4F7FE,#FFFFFF,#F4F7FE);display:flex;align-items:center;justify-content:center;z-index:9;animation:fadeInOverlay .3s ease-in;backface-visibility:hidden;-webkit-backface-visibility:hidden;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.onboarding-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:clamp(20px,2.5vw,32px);font-weight:600;color:#1d1d1d;margin:0 0 8px;line-height:1.4;text-align:center}.onboarding-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:clamp(12px,1.5vw,14px);font-weight:400;color:#74748a;margin:0 0 20px;line-height:1.5;text-align:center}.onboarding-modal[_ngcontent-%COMP%]{background:#FFFFFF;border-radius:16px;padding:20px;max-width:520px;width:90%;height:570px;max-height:unset;overflow:hidden;box-shadow:0 20px 60px #0000004d;position:relative;display:flex;flex-direction:column}.progress-container[_ngcontent-%COMP%]{margin-bottom:20px}.progress-bar[_ngcontent-%COMP%]{width:100%;height:4px;background-color:#e6e6e6;border-radius:2px;overflow:hidden}.progress-fill[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,#5371FF 0%,#6B8AFF 100%);border-radius:2px;transition:width .5s ease-out}.step-container[_ngcontent-%COMP%]{position:relative;height:100%;overflow:hidden;perspective:1000px;-webkit-perspective:1000px;flex:1;min-height:0}.onboarding-step[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.step-header[_ngcontent-%COMP%]{flex-shrink:0;position:relative;z-index:1}.step-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1d1d1d;margin:10px 0;line-height:1.4;text-align:left;display:block}.step-number[_ngcontent-%COMP%]{color:#5371ff;margin-right:0;display:flex;font-weight:700;width:32px;height:32px;align-items:center;justify-content:center;border-radius:5px}.required[_ngcontent-%COMP%]{color:#f44;margin-left:2px}.step-description[_ngcontent-%COMP%]{font-size:14px;color:#74748a;margin:0 0 20px;line-height:1.5;text-align:center}.options-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:4px;gap:4px;margin-bottom:20px;flex:1;overflow-y:hidden;overflow-x:hidden;min-height:0;position:relative;will-change:transform,opacity;backface-visibility:hidden;-webkit-backface-visibility:hidden;padding-top:4px}.option-button[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:14px;gap:14px;padding:8px;background:#FFFFFF;border:1.5px solid #E6E6E6;border-radius:8px;
1cursor:pointer;transition:border-color .3s ease,box-shadow .3s ease,transform .3s ease;text-align:left;width:100%;position:relative;overflow:hidden;will-change:transform,opacity;backface-visibility:hidden;-webkit-backface-visibility:hidden}.option-button[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(83,113,255,.1),transparent);transition:left .5s ease-in-out;z-index:0;pointer-events:none}.option-button[_ngcontent-%COMP%]:hover:before{left:100%}.option-button[_ngcontent-%COMP%]:hover{border-color:#5371ff;box-shadow:0 4px 12px #5371ff26}.option-button.selected[_ngcontent-%COMP%]{background:#F3F8FF;border-color:#f3f8ff;color:#5371ff;transform:translateY(-2px);border-color:#5371ff}.option-button.selected[_ngcontent-%COMP%]   .option-letter[_ngcontent-%COMP%]{background:rgb(13 110 253 / 70%);color:#fff;border-color:#0d6efdb3}.option-letter[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;background:#FFFFFF;border:1.5px solid #E6E6E6;border-radius:6px;font-size:14px;font-weight:600;color:#1d1d1d;transition:all .3s ease;position:relative;z-index:1}.option-label[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#1d1d1d;transition:color .3s ease;line-height:1.4;position:relative;z-index:1}.option-button.selected[_ngcontent-%COMP%]   .option-label[_ngcontent-%COMP%]{color:#5371ff;font-weight:600}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;grid-gap:12px;gap:12px;margin-top:auto;flex-shrink:0;position:relative;z-index:1}.btn[_ngcontent-%COMP%]{padding:10px 20px;border-radius:25px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);border:none;min-width:120px;text-transform:uppercase;letter-spacing:.5px}.btn-secondary[_ngcontent-%COMP%]{background:#FFFFFF;color:#5371ff;border:2px solid #5371FF}.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:#F7FAFF;transform:translateY(-2px)}.btn-secondary[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.btn-primary[_ngcontent-%COMP%]{background:#5371FF;color:#fff;margin-left:auto}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#4560E6;transform:translateY(-2px)}.btn-primary[_ngcontent-%COMP%]:disabled{background:#C4C4C4;cursor:not-allowed;transform:none}@keyframes fadeInOverlay{0%{opacity:0}to{opacity:1}}@media (max-width: 768px){.onboarding-modal[_ngcontent-%COMP%]{padding:24px 20px;width:95%;height:auto;max-height:none}.onboarding-overlay[_ngcontent-%COMP%]{position:relative;top:unset;left:unset;padding-top:2rem}.step-container[_ngcontent-%COMP%]{height:100%}.onboarding-step[_ngcontent-%COMP%]{height:100%}.step-title[_ngcontent-%COMP%]{font-size:20px}.step-description[_ngcontent-%COMP%]{font-size:13px}.option-button[_ngcontent-%COMP%]{padding:12px 16px}.option-label[_ngcontent-%COMP%]{font-size:15px}.option-letter[_ngcontent-%COMP%]{width:30px;height:30px;min-width:30px;font-size:13px}.btn[_ngcontent-%COMP%]{padding:10px 24px;font-size:13px;min-width:100px}}@media (max-width: 480px){.step-container[_ngcontent-%COMP%]{height:100%}.onboarding-step[_ngcontent-%COMP%]{height:100%}.step-title[_ngcontent-%COMP%]{font-size:14px}.options-list[_ngcontent-%COMP%]{grid-gap:10px;gap:10px}.option-button[_ngcontent-%COMP%]{padding:12px 14px;grid-gap:12px;gap:12px}.option-label[_ngcontent-%COMP%]{font-size:14px}.option-letter[_ngcontent-%COMP%]{width:28px;height:28px;min-width:28px;font-size:12px}}'],data:{animation:[tc("fadeIn",[rc(":enter",[ic({opacity:0}),ec("300ms ease-in",ic({opacity:1}))])]),tc("optionsListTransition",[rc("* => *",[ic({opacity:0,transform:"translateY(30px)"}),ec("500ms cubic-bezier(0.25, 0.46, 0.45, 0.94)",ic({opacity:1,transform:"translateY(0)"}))])]),tc("listAnimation",[rc("* => *",[sc(":enter",[ic({opacity:0,transform:"translateY(20px) scale(0.95)"}),ac(80,[ec("500ms cubic-bezier(0.25, 0.46, 0.45, 0.94)",ic({opacity:1,transform:"translateY(0) scale(1)"}))])],{optional:!0})])])]}}),t})();function cD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-onboarding",7),o.NdJ("onComplete",function(){return o.CHM(t),o.oxw().onOnboardingComplete()}),o.qZA()}}function lD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",41),o._UZ(1,"img",42),o.TgZ(2,"span",43),o._uU(3),o.qZA(),o.TgZ(4,"i",44),o.O4$(),o.TgZ(5,"svg",45),o._UZ(6,"path",46),o._UZ(7,"path",47),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"button",48),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearTriggerAppObject()}),o.O4$(),o.TgZ(9,"svg",49),o._UZ(10,"path",50),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("src",t.appyConfig.cdnMediaPath+t.triggerAppObject.image,o.LSH)("alt",t.triggerAppObject.displayName+" Integration"),o.xp6(2),o.Oqu(t.triggerAppObject.displayName)}}const dD=function(t){return{"border-dashed":t}};
1function uD(t,e){if(1&t&&(o.TgZ(0,"li",51),o.TgZ(1,"span",52),o.O4$(),o.TgZ(2,"svg",53),o.TgZ(3,"g",54),o._UZ(4,"path",55),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"span",43),o._uU(6,"Selected Trigger App"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(1,dD,!t.triggerAppObject))}}function pD(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"li",41),o._UZ(1,"img",42),o.TgZ(2,"span",43),o._uU(3),o.qZA(),o.TgZ(4,"i",44),o.O4$(),o.TgZ(5,"svg",45),o._UZ(6,"path",46),o._UZ(7,"path",47),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"button",56),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearActionAppObject()}),o.O4$(),o.TgZ(9,"svg",49),o._UZ(10,"path",50),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("src",t.appyConfig.cdnMediaPath+t.actionAppObject.image,o.LSH)("alt",t.actionAppObject.displayName+" Integration"),o.xp6(2),o.Oqu(t.actionAppObject.displayName)}}function hD(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"li",51),o.TgZ(1,"span",52),o.O4$(),o.TgZ(2,"svg",53),o.TgZ(3,"g",54),o._UZ(4,"path",55),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"span",43),o._uU(6,"Selected Action App"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(1,dD,!t.actionAppObject))}}function gD(t,e){if(1&t&&(o.TgZ(0,"ul",34),o.YNc(1,lD,11,3,"li",35),o.YNc(2,uD,7,3,"li",36),o.TgZ(3,"li",37),o.TgZ(4,"span"),o.O4$(),o.TgZ(5,"svg",38),o.TgZ(6,"g",39),o._UZ(7,"path",40),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(8,pD,11,3,"li",35),o.YNc(9,hD,7,3,"li",36),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.triggerAppObject),o.xp6(1),o.Q6J("ngIf",!t.triggerAppObject),o.xp6(6),o.Q6J("ngIf",t.actionAppObject),o.xp6(1),o.Q6J("ngIf",!t.actionAppObject)}}function fD(t,e){1&t&&(o.TgZ(0,"h2",57),o._uU(1,"Choose an app from the search bar to set up your Trigger"),o.qZA())}function mD(t,e){1&t&&(o.TgZ(0,"h2",57),o._uU(1,"Choose an app from the search bar to set up your Action"),o.qZA())}function vD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",58),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).clearSearchText()}),o.O4$(),o.TgZ(1,"svg",59),o._UZ(2,"path",60),o.qZA(),o.qZA()}}function bD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",64),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(3);return n.triggerAppObject?n.setActionAppObject(e):n.setTriggerAppObject(e)}),o._UZ(2,"img",42),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(2),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(1),o.hij(" ",t.displayName," ")}}function xD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",65),o._uU(1," Can\u2019t find the app you're looking for? Request it here, and we'll consider adding it. "),o.TgZ(2,"button",66),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).SubmitAppRequest()}),o._uU(3,"Submit Your App Request "),o.O4$(),o.TgZ(4,"svg",67),o._UZ(5,"path",68),o.qZA(),o.qZA(),o.qZA()}}function _D(t,e){if(1&t&&(o.TgZ(0,"ul",61),o.YNc(1,bD,4,3,"li",62),o.ALo(2,"slice"),o.YNc(3,xD,6,0,"li",63),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",o.Dn7(2,2,t.filteredAppsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.filteredAppsList.length)}}function CD(t,e){1&t&&(o.TgZ(0,"small",73),o._uU(1,"Plus"),o.qZA())}function wD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",69),o.NdJ("click",function(){const e=o.CHM(t).$implicit,n=o.oxw(2);return n.triggerAppObject?n.setActionAppObject(e):n.setTriggerAppObject(e)}),o.YNc(1,CD,2,0,"small",70),o.TgZ(2,"div",71),o._UZ(3,"img",42),o.qZA(),o.TgZ(4,"div",72),o._uU(5),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngIf","Enterprise"==t.appType),o.xp6(2),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(2),o.hij(" ",t.displayName," ")}}const yD=function(t){return{disabled:t}};function AD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",8),o.TgZ(1,"div",9),o.TgZ(2,"div",10),o.TgZ(3,"h1",11),o._uU(4,"Automate Tasks Effortlessly with Flozic Loop"),o.qZA(),o.YNc(5,gD,10,4,"ul",12),o.YNc(6,fD,2,0,"h2",13),o.YNc(7,mD,2,0,"h2",13),o.TgZ(8,"div",14),o.TgZ(9,"button",15),o.O4$(),o.TgZ(10,"svg",16),o.TgZ(11,"g",17),o._UZ(12,"path",18),o._UZ(13,"path",19),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(14,"input",20),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw().searchText=e})("input",function(){return o.CHM(t),o.oxw().filterApps()}),o.qZA(),o.YNc(15,vD,3,0,"button",21),o.YNc(16,_D,4,6,"ul",22),o.qZA(),o.TgZ(17,"div",23),o._UZ(18,"span",24),o.TgZ(19,"h3"),o._uU(20,"or"),o.qZA(),o._UZ(21,"span",25),o.qZA(),o.TgZ(22,"div",26),o.TgZ(23,"h2"),o._uU(24,"Choose from trending apps"),o.qZA(),o.TgZ(25,"p"),o._uU(26,"Explore the trending apps users choose to automate their business workflow."),o.qZA(),o.TgZ(27,"ul",27),o.YNc(28,wD,6,4,"li",28),o.qZA(),o.qZA(),o.TgZ(29,"div",29),o.TgZ(30,"button",30),o.NdJ("click",function(){return o.CHM(t),o.oxw().onStartAutomation()}),o._uU(31,"Start Automation "),o.O4$(),o.TgZ(32,"svg",31),o._UZ(33,"path",32),o._UZ(34,"path",33),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(5),o.Q6J("ngIf",t.isDilHidden),o.xp6(1),o.Q6J("ngIf",!t.triggerAppObject),o.xp6(1),o.Q6J("ngIf",t.triggerAppObject),o.xp6(7),o.Q6J("ngModel",t.searchText)("placeholder",t.triggerAppObject?"Search your action app":"Search your trigger app"),o.xp6(1),o.Q6J("ngIf",t.searchText),o.xp6(1),o.Q6J("ngIf",t.searchText),o.xp6(12),o.Q6J("ngForOf",t.fixedAppsList),o.xp6(2),o.Q6J("ngClass",o.VKq(9,yD,!t.triggerAppObject||!t.actionAppObject))}}let ZD=(()=>{class t{constructor(t,e,n,i,o){this.commonService=t,this.router=e,this.cookieService=n,this.modalService=i,this.customerService=o,this.currentView="",this.appsList=[],this.filteredAppsList=[],this.appyConfig=go.N,this.searchText="",this.fixedAppsNames=["gmail","hubspot","cliniko","net-suite","vend","salesforce","gohighlevel","wechat","clickup","mailchimp","
1slack","mindbody"],this.fixedAppsList=[],this.isDilHidden=!1,this.triggerAppObject=this.getSelectedAppFromCookie("triggerAppObject"),this.triggerAppObject&&(this.isDilHidden=!0),this.actionAppObject=this.getSelectedAppFromCookie("actionAppObject"),this.commonService.getAppsCustom("trigger").subscribe(t=>{this.appsList=t.apps_list,this.filteredAppsList=t.apps_list,this.fixedAppsList=t.apps_list.filter(t=>this.fixedAppsNames.includes(t.name.toLowerCase()))})}ngOnInit(){this.currentUser=this.customerService.GetCurrent(),this.customerService.getOnboardingData(this.currentUser.customerId).subscribe(t=>{var e;!0===t.success?"jc0fgwefcky2"===(null===(e=this.currentUser)||void 0===e?void 0:e.planId)&&(this.currentView="editor"):Ar.SHOW_ONBOARDING&&"true"!==this.cookieService.get("onboarding_completed")?this.currentView="onboarding":(this.currentView="editor",this.triggerAppObject&&this.actionAppObject&&this.router.navigateByUrl("/setup-editor-integrate"))})}onOnboardingComplete(){this.currentView="editor"}filterApps(){const t=this.searchText.toLowerCase();this.filteredAppsList=this.appsList.filter(e=>e.displayName.toLowerCase().includes(t))}setTriggerAppObject(t){this.triggerAppObject=t,this.isDilHidden=!0,this.setSelectedAppInCookie("triggerAppObject",t),this.clearSearchText(),this.saveOriginUrl()}saveOriginUrl(){var t,e;const n=null===(t=this.triggerAppObject)||void 0===t?void 0:t.appId,i=null===(e=this.actionAppObject)||void 0===e?void 0:e.appId;n&&i&&localStorage.setItem("originUrl",encodeURIComponent(`/build-your-connect/apps__for__${n}_${i}`))}setSelectedAppInCookie(t,e){const n=btoa(encodeURIComponent(JSON.stringify(e)));this.cookieService.set(t,n,7,"/","",!0,"Strict")}getSelectedAppFromCookie(t){const e=this.cookieService.get(t);if(e)try{const t=decodeURIComponent(atob(e));return JSON.parse(t)}catch(n){return console.error("Failed to parse cookie data:",n),null}return null}setActionAppObject(t){this.actionAppObject=t,this.isDilHidden=!0,this.clearSearchText(),this.setSelectedAppInCookie("actionAppObject",t),this.saveOriginUrl()}clearSearchText(){this.searchText=""}SubmitAppRequest(){this.bsModalRef=this.modalService.show(tD,{class:"requestModel modal-lg"})}emailUs(t,e=""){var n,i,o,r;let s="";"trigger"===t&&e?(e=(null===(n=this.triggerAppObject)||void 0===n?void 0:n.displayName)||"",s=(null===(i=this.triggerAppObject)||void 0===i?void 0:i.appId)||""):"action"===t&&e&&(e=(null===(o=this.actionAppObject)||void 0===o?void 0:o.displayName)||"",s=(null===(r=this.actionAppObject)||void 0===r?void 0:r.appId)||""),this.bsModalRef=this.modalService.show(Zo,{initialState:{nodeType:t,appName:e,appId:s},class:"request-modal modal-lg modal-dialog-centered modal-dialog-scrollable"})}onStartAutomation(){this.customerService.updateOnboardingData({completeStep:"2"}).subscribe(t=>{this.router.navigateByUrl("/setup-editor-integrate")},t=>{console.error("Error updating onboarding data",t),this.router.navigateByUrl("/setup-editor-integrate")})}clearTriggerAppObject(){this.triggerAppObject=null,this.cookieService.delete("triggerAppObject","/"),this.saveOriginUrl()}clearActionAppObject(){this.actionAppObject=null,this.cookieService.delete("actionAppObject","/"),this.saveOriginUrl()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wo.v),o.Y36(ui.F0),o.Y36(lo.N),o.Y36(mo.tT),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-setup-editor"]],decls:7,vars:3,consts:[[1,"py-5","bg-white","editersetup-wrapper","pb-0","d-flex","align-items-center","justify-content-center"],[1,"logo-header","position-fixed","top-0","start-0","p-3","px-3"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-light-2048.png","width","238","decoding","async","height","54",1,"appypie_logo","light-logo"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-dark-2048.png","width","238","decoding","async","height","54",1,"appypie_logo","dark-logo"],[1,"w-100",3,"ngSwitch"],[3,"onComplete",4,"ngSwitchCase"],["class","container",4,"ngSwitchCase"],[3,"onComplete"],[1,"container"],[1,"row","justify-content-center"],[1,"col-lg-12","col-xl-10","col-xxl-9","text-center"],[1,"mb-4"],["class","selected-appName",4,"ngIf"],["class","text-start text-xl-start mb-2",4,"ngIf"],[1,"group_search","mb-3","mb-xl-4"],[1,"btn","SearchBtn"],["width","22","height","22","viewBox","0 0 30 30","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","search 2"],["id","Vector","d","M13.75 23.75C19.2729 23.75 23.75 19.2729 23.75 13.75C23.75 8.22715 19.2729 3.75 13.75 3.75C8.22715 3.75 3.75 8.22715 3.75 13.75C3.75 19.2729 8.22715 23.75 13.75 23.75Z","stroke","#74748A","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M26.1538 26.1538L22.3076 22.3077","stroke","#74748A","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","text",1,"form-control",3,"ngModel","placeholder","ngModelChange","input"],["class","btn closeBtn",3,"click",4,"ngIf"],["class","dropdown-menu d-block editor-menu thinScroll",4,"ngIf"],[1,"or-line","d-flex","align-items-center","justify-content-center","gap-3","my-3"],[1,"or-line-1"],[1,"or-line-1","or-line-2"],[1,"editor-apps-wrap","text-center"],[1,"editor-listed-apps","mt-4"],[3,"click",4,"ngFor","ngForOf"],[1,"my-3","mt-xl-4","mb-0","text-center"],[1,"btn","btn-lg","automate-btn","rounded-3",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["d","M5 12h14"],["d","m12 5 7 7-7 7"],[1,"selected-appName"],["class","selected-app",4,"ngIf"],["class","selected-app",3,"ngClass",4,"ngIf"],[1,"connecticon-editor"],["width","35","height","35","viewBox","0 0 40 40","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","lucide/link"],["id","Vector","d","M16.6668 21.6667C17.3825 22.6235 18.2957 23.4153 19.3443 23.9882C20.393 24.5612 21.5526 24.9019 22.7445 24.9872C23.9364 25.0726 25.1327 24.9006 26.2523 24.483C27.3719 24.0653 28.3886 23.4118 29.2334 22.5667L34.2334 17.5667C35.7514 15.995 36.5914 13.89 36.5724 11.705C36.5534 9.52001 35.677 7.42991 34.1319 5.88484C32.5869 4.33977 30.4967 3.46336 28.3118 3.44438C26.1268 3.42539 24.0218 4.26534 22.4501 5.78333L19.5834 8.63333M23.3334 18.3333C22.6177 17.3764 21.7045 16.5847 20.6558 16.0118C19.6072 15.4388 18.4476 15.0981 17.2557 15.0128C16.0638 14.9274 14.8674 15.0994 13.7479 15.517C12.6283 15.9347 11.6116 16.5882 10.7668 17.4333L5.76676 22.4333C4.24877 24.005 3.40882 26.11 3.42781 28.295C3.44679 30.48 4.3232 32.5701 5.86827 34.1151C7.41334 35.6602 9.50344 36.5366 11.6884 36.5556C13.8734 36.5746 15.9784 35.7346 17.5501 34.2167L20.4001 31.3667","stroke","CurrentColor","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],[1,"selected-app"],["width","128","height","128",3,"src","alt"],[1,"selected-app-name"],[1,"selected-app-active"],["xmlns","http://www.w3.org/2000/svg","width","17","height","19","viewBox","0 0 17 19","fill","none"],["d","M9.00024 16.6382C12.9424 16.6382 16.1382 13.4424 16.1382 9.50024C16.1382 5.55807 12.9424 2.3623 9.00024 2.3623C5.05807 2.3623 1.8623 5.55807 1.8623 9.50024C1.8623 13.4424 5.05807 16.6382 9.00024 16.6382Z","fill","#52AA6E"],["d","M6 9.5L8 11.5L12 7.5","stroke","white","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["title","Clear Trigger App",1,"btn","btn-sm","btn-icon",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","14","height","14","viewBox","0 0 24 24","fill","none"],["d","M6 18L18 6M6 6L18 18","stroke","currentColor","stroke-width","2.5","
1stroke-linecap","round","stroke-linejoin","round"],[1,"selected-app",3,"ngClass"],[1,"selected-app-icon"],["width","35","height","35","viewBox","0 0 46 46","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","lucide/layout-grid"],["id","Vector","d","M19.9988 12.7498H5.99878M12.9988 19.7498V5.74976M38.3321 40.9998H28.7488C27.6902 40.9998 26.8321 40.1416 26.8321 39.0831V29.4998C26.8321 28.4412 27.6902 27.5831 28.7488 27.5831H38.3321C39.3907 27.5831 40.2488 28.4412 40.2488 29.4998V39.0831C40.2488 40.1416 39.3907 40.9998 38.3321 40.9998ZM17.2488 40.9998L7.66545 40.9998C6.6069 40.9998 5.74878 40.1416 5.74878 39.0831V29.4998C5.74878 28.4412 6.6069 27.5831 7.66545 27.5831L17.2488 27.5831C18.3073 27.5831 19.1654 28.4412 19.1654 29.4998V39.0831C19.1654 40.1416 18.3073 40.9998 17.2488 40.9998ZM38.3321 19.9164H28.7488C27.6902 19.9164 26.8321 19.0583 26.8321 17.9998L26.8321 8.41642C26.8321 7.35788 27.6902 6.49976 28.7488 6.49976H38.3321C39.3907 6.49976 40.2488 7.35788 40.2488 8.41642L40.2488 17.9998C40.2488 19.0583 39.3907 19.9164 38.3321 19.9164Z","stroke","#74748A","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],["title","Clear Action App",1,"btn","btn-sm","btn-icon",3,"click"],[1,"text-start","text-xl-start","mb-2"],[1,"btn","closeBtn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 30 30","fill","none"],["d","M26 4L4 26M4 4L26 26","stroke","#1D1D1D","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"dropdown-menu","d-block","editor-menu","thinScroll"],[4,"ngFor","ngForOf"],["class","px-3 d-flex align-items-center justify-content-between flex-wrap gap-2 py-2",4,"ngIf"],[1,"btn","d-flex","align-items-center","gap-2","w-100",3,"click"],[1,"px-3","d-flex","align-items-center","justify-content-between","flex-wrap","gap-2","py-2"],[1,"btn","btn-link","text-primary","bg-transparent","p-0","fw-semibold",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","currentColor"],["d","M17.5138 10.75H1V13.25H17.5138V17L23 12L17.5138 7V10.75Z"],[3,"click"],["class","badge categPlus bg-black text-white rounded-pill",4,"ngIf"],[1,"imgIcon"],[1,"img-title"],[1,"badge","categPlus","bg-black","text-white","rounded-pill"]],template:function(t,e){1&t&&(o.TgZ(0,"section",0),o.TgZ(1,"div",1),o._UZ(2,"img",2),o._UZ(3,"img",3),o.qZA(),o.TgZ(4,"div",4),o.YNc(5,cD,1,0,"app-onboarding",5),o.YNc(6,AD,35,11,"div",6),o.qZA(),o.qZA()),2&t&&(o.xp6(4),o.Q6J("ngSwitch",e.currentView),o.xp6(1),o.Q6J("ngSwitchCase","onboarding"),o.xp6(1),o.Q6J("ngSwitchCase","editor"))},directives:[to.RF,to.n9,aD,to.O5,Xi.Fj,Xi.JJ,Xi.On,to.sg,to.mk],pipes:[to.OU],styles:[".editersetup-wrapper[_ngcontent-%COMP%]{height:100%;min-height:100vh}.editersetup-wrapper[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--Primary-Color);text-align:center;font-size:clamp(17px,2vw,30px);margin-bottom:.5rem;font-weight:600}.editersetup-wrapper[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#74748a;color:var(--Text-Secondary, #74748A);text-align:center;font-size:clamp(12px,2vw,16px);font-style:normal;font-weight:400;line-height:normal}.group_search[_ngcontent-%COMP%]{position:relative}.group_search[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:1;padding:0;height:100%;width:40px;text-align:center}.group_search[_ngcontent-%COMP%] > .closeBtn[_ngcontent-%COMP%]{left:auto;right:0}.group_search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{color:#74748a;font-size:clamp(12px,2vw,14px);font-style:normal;position:relative;font-weight:400;line-height:26px;border-radius:14px;border:2.5px solid var(--Primary-Color);background:#FAFDFF;padding:10px 40px}.or-line-1[_ngcontent-%COMP%]{border-radius:4px;background:linear-gradient(90deg,rgba(116,116,138,0) 0%,#74748A 100%);display:block;width:170px;height:2px}.or-line[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#74748a;color:var(--Text-Secondary, #74748A);text-align:center;font-size:20px;font-style:normal;font-weight:400;line-height:36px}.or-line-2[_ngcontent-%COMP%]{background:linear-gradient(270deg,rgba(116,116,138,0) 0%,#74748A 100%)}.editor-apps-wrap[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:clamp(16px,2vw,22px);color:#1d1d1d;text-align:center;font-style:normal;font-weight:500;line-height:normal}.editor-apps-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:clamp(12px,2vw,16px)}.editor-listed-apps[_ngcontent-%COMP%]{display:grid;grid-gap:1rem;gap:1rem;justify-content:center;grid-template-rows:repeat(2,minmax(110px,min-content));grid-template-columns:repeat(auto-fit,minmax(130px,1fr));grid-auto-rows:110px}.editor-listed-apps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:flex-start;position:relative;flex-direction:column;flex:0 0 130px;grid-gap:.5rem;gap:.5rem;max-width:130px;padding:.5rem;text-align:center;cursor:pointer;align-items:center}.img-title[_ngcontent-%COMP%]{color:#1d1d1d;text-align:center;font-size:clamp(12px,2vw,14px);font-weight:500;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.imgIcon[_ngcontent-%COMP%]{border-radius:10px;background:#F7FAFF;width:60px;height:60px;padding:.5rem;display:flex;align-items:center;justify-content:center}.imgIcon[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:35px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.categPlus[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%)}.editor-menu[_ngcontent-%COMP%]{border-radius:10px;border-bottom:1px solid rgb(116 116 138 / 30%);border:1px solid #E6E6E6;background:rgb(252 252 255);width:100%;max-height:200px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;scrollbar-width:auto}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{border-bottom:1px solid #74748A}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child{border:0;color:#2b2b37}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{color:#0f1035;color:var(--Text-Primary, #0F1035);font-size:14px;font-style:normal;font-weight:400;border-radius:0;line-height:normal}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{background-color:#5371ff1a}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:24px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}
1.selected-appName[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;grid-gap:1rem;gap:1rem;margin:2rem 0}.selected-appName[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{border-radius:10px;border:2px dashed #0D0E10;background:#FFF;display:flex;width:60px;height:60px;padding:.25rem;justify-content:center;align-items:center;grid-gap:10px;gap:10px;position:relative}.selected-appName[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:35px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.selected-appName[_ngcontent-%COMP%]   .selected-app[_ngcontent-%COMP%]{width:100%;padding:.5rem;max-width:280px;justify-content:flex-start}i.selected-app-active[_ngcontent-%COMP%]{position:absolute;bottom:12px;left:30px}.selected-appName[_ngcontent-%COMP%]   .connecticon-editor[_ngcontent-%COMP%]{border:0;width:60px}li.selected-app[_ngcontent-%COMP%] > .selected-app-name[_ngcontent-%COMP%]{color:#26272f;font-size:14px;font-weight:400;line-height:20px}.logo-header[_ngcontent-%COMP%]{z-index:10;width:100%}.logo-header[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:180px}.automate-btn[_ngcontent-%COMP%]{display:flex;padding:12px 36px;justify-content:center;align-items:center;grid-gap:4px;gap:4px;background:var(--Primary-Color);color:#fff;text-align:center;font-size:16px;font-style:normal;font-weight:600;line-height:26px;margin:auto;border-radius:12px!important}.automate-btn[_ngcontent-%COMP%]:hover{background-color:#5371ff;box-shadow:0 .25rem 1rem #0000002d}.selected-appName[_ngcontent-%COMP%]   .btn-icon[_ngcontent-%COMP%]{position:absolute;top:-10px;right:-10px;background:#fa4444;padding:2px;color:#fff;border-radius:50px;width:21px;height:21px;display:flex;align-items:center;justify-content:center}.selected-appName[_ngcontent-%COMP%]   li.selected-app.border-dashed[_ngcontent-%COMP%]{border-color:#fc4a1d}.theme-dark[_ngcontent-%COMP%]   .btn-icon[_ngcontent-%COMP%]{background:none!important}@media (max-width: 767px){.editor-listed-apps[_ngcontent-%COMP%]{grid-template-rows:repeat(2,minmax(130px,min-content));grid-template-columns:repeat(3,1fr);grid-gap:.5rem;gap:.5rem;grid-auto-rows:130px}.imgIcon[_ngcontent-%COMP%]{padding-top:1rem}.categPlus[_ngcontent-%COMP%]{top:0}.imgIcon[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], .selected-appName[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:40px}.selected-appName[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:30px}.or-line-1[_ngcontent-%COMP%]{width:100px}.editor-listed-apps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{width:100%;max-width:100px}.editersetup-wrapper[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin-top:40px}.logo-header[_ngcontent-%COMP%]{background-color:#fff}.selected-appName[_ngcontent-%COMP%]{grid-gap:.25rem;gap:.25rem;margin:1rem 0;flex-direction:column}}"]}),t})();const kD=["tryPlanButton"];function TD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-onboarding",8),o.NdJ("onComplete",function(){return o.CHM(t),o.oxw().onOnboardingComplete()}),o.qZA()}}function OD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearSearchText()}),o.O4$(),o.TgZ(1,"svg",51),o._UZ(2,"path",52),o.qZA(),o.qZA()}}const MD=function(t){return{selected:t}};function ID(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",53),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setTriggerAppObject(e)}),o._UZ(2,"img",54),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(4,MD,n.triggerAppObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(1),o.hij(" ",t.displayName," ")}}function SD(t,e){1&t&&(o.TgZ(0,"li",55),o._uU(1," No Result "),o.qZA())}function PD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearSearchText()}),o.O4$(),o.TgZ(1,"svg",51),o._UZ(2,"path",52),o.qZA(),o.qZA()}}function ND(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li"),o.TgZ(1,"button",53),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setActionAppObject(e)}),o._UZ(2,"img",54),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(4,MD,n.actionAppObject===t)),o.xp6(1),o.Q6J("src",n.appyConfig.cdnMediaPath+t.image,o.LSH)("alt",t.displayName+" Integration"),o.xp6(1),o.hij(" ",t.displayName," ")}}function qD(t,e){1&t&&(o.TgZ(0,"li",55),o._uU(1," No Result "),o.qZA())}
1function UD(t,e){if(1&t&&(o.TgZ(0,"h2"),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.AsE("Appy Pie Automate allows you to automate multiple workflows between ",t.triggerAppObject.displayName," and ",t.actionAppObject.displayName,"")}}function ED(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",56),o.TgZ(1,"button",57),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).redirectToPurchasePage()}),o._uU(2),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.AsE("Automate ",t.triggerAppObject.displayName," + ",t.actionAppObject.displayName,"")}}const FD=function(t){return{open:t}};function DD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",13),o.TgZ(1,"h1",14),o._uU(2,"Get Started With Your Automation with one click"),o.qZA(),o.TgZ(3,"ul",15),o.TgZ(4,"li",16),o.TgZ(5,"img",17),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).appToggleMenu()}),o.qZA(),o.TgZ(6,"span",18),o._uU(7),o.qZA(),o.TgZ(8,"i",19),o.O4$(),o.TgZ(9,"svg",20),o._UZ(10,"path",21),o._UZ(11,"path",22),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"span",23),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).appToggleMenu()}),o.O4$(),o.TgZ(13,"svg",24),o._UZ(14,"path",25),o._UZ(15,"path",26),o.qZA(),o.qZA(),o.kcU(),o.TgZ(16,"div",27),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeOverlay()}),o.TgZ(17,"div",28),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).stopPropagation(e)}),o.TgZ(18,"div",29),o.TgZ(19,"h3"),o._uU(20,"Change Trigger App:"),o.qZA(),o.TgZ(21,"div",30),o.TgZ(22,"button",31),o.O4$(),o.TgZ(23,"svg",32),o.TgZ(24,"g",33),o._UZ(25,"path",34),o._UZ(26,"path",35),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(27,"input",36),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).searchText=e})("input",function(){return o.CHM(t),o.oxw(2).filterApps()}),o.qZA(),o.YNc(28,OD,3,0,"button",37),o.qZA(),o.qZA(),o.TgZ(29,"ul",38),o.YNc(30,ID,4,6,"li",39),o.ALo(31,"slice"),o.YNc(32,SD,2,0,"li",40),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"li",41),o.TgZ(34,"span"),o.O4$(),o.TgZ(35,"svg",42),o.TgZ(36,"g"),o._UZ(37,"path",43),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(38,"li",16),o.TgZ(39,"img",17),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).actionAppToggleMenu()}),o.qZA(),o.TgZ(40,"span",23),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).actionAppToggleMenu()}),o.O4$(),o.TgZ(41,"svg",24),o._UZ(42,"path",25),o._UZ(43,"path",26),o.qZA(),o.qZA(),o.kcU(),o.TgZ(44,"span",18),o._uU(45),o.qZA(),o.TgZ(46,"i",19),o.O4$(),o.TgZ(47,"svg",20),o._UZ(48,"path",21),o._UZ(49,"path",22),o.qZA(),o.qZA(),o.kcU(),o.TgZ(50,"div",27),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).actionCloseOverlay()}),o.TgZ(51,"div",28),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).stopPropagation(e)}),o.TgZ(52,"div",29),o.TgZ(53,"h3"),o._uU(54,"Change Action App:"),o.qZA(),o.TgZ(55,"div",30),o.TgZ(56,"button",31),o.O4$(),o.TgZ(57,"svg",32),o.TgZ(58,"g",33),o._UZ(59,"path",34),o._UZ(60,"path",35),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(61,"input",36),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).searchText=e})("input",function(){return o.CHM(t),o.oxw(2).filterApps()}),o.qZA(),o.YNc(62,PD,3,0,"button",37),o.qZA(),o.qZA(),o.TgZ(63,"ul",38),o.YNc(64,ND,4,6,"li",39),o.ALo(65,"slice"),o.YNc(66,qD,2,0,"li",40),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(67,UD,2,2,"h2",44),o.TgZ(68,"div",45),o.TgZ(69,"button",46),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).GetStarted()}),o._uU(70,"Start Automation"),o.qZA(),o.qZA(),o.YNc(71,ED,3,2,"div",47),o.TgZ(72,"ul",48),o.TgZ(73,"li"),o._UZ(74,"i",49),o._uU(75," 7 day free trial"),o.qZA(),o.TgZ(76,"li"),o._UZ(77,"i",49),o._uU(78," Lightning Fast Setup"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(5),o.Q6J("src",t.triggerAppObject?t.appyConfig.cdnMediaPath+t.triggerAppObject.image:"/assets/placeholder-app.png",o.LSH)("alt",((null==t.triggerAppObject?null:t.triggerAppObject.displayName)||"Select App")+" Integration"),o.xp6(2),o.Oqu((null==t.triggerAppObject?null:t.triggerAppObject.displayName)||"Select Trigger App"),o.xp6(9),o.Q6J("ngClass",o.VKq(28,FD,t.isOverlayOpen)),o.xp6(11),o.Q6J("ngModel",t.searchText)("placeholder",t.triggerAppObject?"Search your trigger app":"Search your action app"),o.xp6(1),o.Q6J("ngIf",t.searchText),o.xp6(2),o.Q6J("ngForOf",o.Dn7(31,20,t.filteredAppsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.filteredAppsList.length),o.xp6(7),o.Q6J("src",t.actionAppObject?t.appyConfig.cdnMediaPath+t.actionAppObject.image:"/assets/placeholder-app.png",o.LSH)("alt",((null==t.actionAppObject?null:t.actionAppObject.displayName)||"Select App")+" Integration"),o.xp6(6),o.Oqu((null==t.actionAppObject?null:t.actionAppObject.displayName)||"Select Action App"),o.xp6(5),o.Q6J("ngClass",o.VKq(30,FD,t.actionOverlayOpen)),o.xp6(11),o.Q6J("ngModel",t.searchText)("placeholder",t.triggerAppObject?"Search your trigger app":"Search your action app"),o.xp6(1),o.Q6J("ngIf",t.searchText),o.xp6(2),o.Q6J("ngForOf",o.Dn7(65,24,t.filteredAppsList,0,12)),o.xp6(2),o.Q6J("ngIf",0===t.filteredAppsList.length),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(4),o.Q6J("ngIf",!1)}}
1function LD(t,e){if(1&t&&(o.TgZ(0,"div",58),o.TgZ(1,"h1",59),o._uU(2,"Your Automation is on the way!"),o.qZA(),o.TgZ(3,"div",60),o.TgZ(4,"div",61),o.TgZ(5,"div",62),o.TgZ(6,"p",59),o._uU(7,"Setting Up Your "),o.TgZ(8,"strong"),o._uU(9,"Trigger"),o.qZA(),o._uU(10," App"),o.qZA(),o.TgZ(11,"div",63),o.TgZ(12,"i",19),o.O4$(),o.TgZ(13,"svg",20),o._UZ(14,"path",21),o._UZ(15,"path",22),o.qZA(),o.qZA(),o.kcU(),o._UZ(16,"img",64),o.TgZ(17,"div",65),o.TgZ(18,"span",18),o._uU(19),o.qZA(),o.TgZ(20,"p",66),o._uU(21),o.qZA(),o.qZA(),o.qZA(),o.TgZ(22,"p",59),o._uU(23,"Establishing Trigger Event : "),o.TgZ(24,"strong"),o._uU(25),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"div",61),o.TgZ(27,"div",62),o.TgZ(28,"p",59),o._uU(29,"Setting Up Your "),o.TgZ(30,"strong"),o._uU(31,"Action"),o.qZA(),o._uU(32," App"),o.qZA(),o.TgZ(33,"div",63),o.TgZ(34,"i",19),o.O4$(),o.TgZ(35,"svg",20),o._UZ(36,"path",21),o._UZ(37,"path",22),o.qZA(),o.qZA(),o.kcU(),o._UZ(38,"img",64),o.TgZ(39,"div",65),o.TgZ(40,"span",18),o._uU(41),o.qZA(),o.TgZ(42,"p",66),o._uU(43),o.qZA(),o.qZA(),o.qZA(),o.TgZ(44,"p",59),o._uU(45,"Establishing Action Event : "),o.TgZ(46,"strong"),o._uU(47),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(4),o.ekj("active",0===t.currentSlide),o.xp6(12),o.Q6J("src",t.appyConfig.cdnMediaPath+t.triggerAppObject.image,o.LSH)("alt",t.triggerAppObject.displayName+" Integration")("title",t.triggerAppObject.displayName+" Integration"),o.xp6(3),o.Oqu(t.triggerAppObject.displayName),o.xp6(2),o.Oqu(null==t.triggerAppObject||null==t.triggerAppObject.actionName?null:t.triggerAppObject.actionName.display_title),o.xp6(4),o.Oqu(null==t.triggerAppObject||null==t.triggerAppObject.actionName?null:t.triggerAppObject.actionName.display_title),o.xp6(1),o.ekj("active",1===t.currentSlide),o.xp6(12),o.Q6J("src",t.appyConfig.cdnMediaPath+t.actionAppObject.image,o.LSH)("alt",t.actionAppObject.displayName+" Integration")("title",t.actionAppObject.displayName+" Integration"),o.xp6(3),o.Oqu(t.actionAppObject.displayName),o.xp6(2),o.Oqu(null==t.actionAppObject||null==t.actionAppObject.actionName?null:t.actionAppObject.actionName.display_title),o.xp6(4),o.Oqu(null==t.actionAppObject||null==t.actionAppObject.actionName?null:t.actionAppObject.actionName.display_title)}}const JD=function(){return["MX","CO","AR","BR"]};function jD(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",67),o.TgZ(1,"div",62),o.TgZ(2,"h1",68),o._uU(3,"Your Automation is Almost Ready!"),o.qZA(),o.TgZ(4,"p",59),o._uU(5,"To view and customize your app, activate your 7 day trial"),o.qZA(),o.TgZ(6,"ul",69),o.TgZ(7,"li",16),o._UZ(8,"img",54),o.TgZ(9,"i",19),o.O4$(),o.TgZ(10,"svg",20),o._UZ(11,"path",21),o._UZ(12,"path",22),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"div",65),o.TgZ(14,"span",18),o._uU(15),o.qZA(),o.TgZ(16,"p",66),o._uU(17),o.qZA(),o.qZA(),o.qZA(),o.TgZ(18,"li",41),o.TgZ(19,"span"),o.O4$(),o.TgZ(20,"svg",42),o.TgZ(21,"g"),o._UZ(22,"path",70),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(23,"li",16),o._UZ(24,"img",54),o.TgZ(25,"i",19),o.O4$(),o.TgZ(26,"svg",20),o._UZ(27,"path",21),o._UZ(28,"path",22),o.qZA(),o.qZA(),o.kcU(),o.TgZ(29,"div",65),o.TgZ(30,"span",18),o._uU(31),o.qZA(),o.TgZ(32,"p",66),o._uU(33),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(34,"div",71),o.TgZ(35,"button",72,73),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.tryPlan(e.standardPlan)}),o._uU(37),o.qZA(),o.qZA(),o.TgZ(38,"ol",74),o.TgZ(39,"li"),o.O4$(),o.TgZ(40,"svg",75),o._UZ(41,"path",76),o._UZ(42,"path",77),o.qZA(),o._uU(43," Get access to task details, visual flow builder, and 2000+ apps"),o.qZA(),o.kcU(),o.TgZ(44,"li"),o.O4$(),o.TgZ(45,"svg",75),o._UZ(46,"path",76),o._UZ(47,"path",77),o.qZA(),o._uU(48," Trusted by 10 Million+ businesses"),o.qZA(),o.qZA(),o.kcU(),o.TgZ(49,"p",59),o._uU(50,"Do you have a specific requirement? Our experts can help you customize your automation."),o.TgZ(51,"a",78),o._uU(52," Book a session."),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(8),o.Q6J("src",t.appyConfig.cdnMediaPath+t.triggerAppObject.image,o.LSH)("alt",t.triggerAppObject.displayName+" Integration"),o.xp6(7),o.Oqu(t.triggerAppObject.displayName),o.xp6(2),o.Oqu(null==t.triggerAppObject||null==t.triggerAppObject.actionName?null:t.triggerAppObject.actionName.display_title),o.xp6(7),o.Q6J("src",t.appyConfig.cdnMediaPath+t.actionAppObject.image,o.LSH)("alt",t.actionAppObject.displayName+" Integration"),o.xp6(7),o.Oqu(t.actionAppObject.displayName),o.xp6(2),o.Oqu(null==t.actionAppObject||null==t.actionAppObject.actionName?null:t.actionAppObject.actionName.display_title),o.xp6(4),o.Oqu(t.standardPlan&&(o.DdM(9,JD).includes(t.standardPlan.countryCode)||"monthly"===t.selectedPlanPeriod)?"Buy 
1Now":"Start 7-days Free Trial")}}function RD(t,e){if(1&t&&(o.TgZ(0,"div",4),o.TgZ(1,"div",9),o.YNc(2,DD,79,32,"div",10),o.YNc(3,LD,48,16,"div",11),o.YNc(4,jD,53,10,"div",12),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(2),o.Q6J("ngIf",t.isGetStarted),o.xp6(1),o.Q6J("ngIf",!t.isGetStarted&&!t.isGetStartedReady),o.xp6(1),o.Q6J("ngIf",t.isGetStartedReady)}}let $D=(()=>{class t{constructor(t,e,n,i,o,r,s){this.commonService=t,this.cookieService=e,this.customerService=n,this.customerConnectService=i,this.planService=o,this.dataService=r,this.router=s,this.appyConfig=go.N,this.isOverlayOpen=!1,this.actionOverlayOpen=!1,this.appsList=[],this.searchText="",this.filteredAppsList=[],this.isGetStarted=!0,this.isGetStartedReady=!1,this.selectedPlanPeriod="yearly",this.currentSlide=0,this.currentView="integrate",this.triggerAppObject=this.getSelectedAppFromCookie("triggerAppObject"),this.actionAppObject=this.getSelectedAppFromCookie("actionAppObject"),this.currentUser=this.customerService.GetCurrent(),this.commonService.getAppsCustom("trigger").subscribe(t=>{this.appsList=t.apps_list,this.filteredAppsList=t.apps_list}),this.checkIfMobile()}GetStarted(){!this.triggerAppObject||!this.triggerAppObject.appId||!this.actionAppObject||!this.actionAppObject.appId||(this.commonService.getAppOptionsByAppId(this.triggerAppObject.appId,{type:"trigger"}).subscribe(t=>{var e,n,i;this.triggerAppObject=Object.assign(Object.assign({},this.triggerAppObject),{nodeStatus:"ta_selected",actionName:{title:null===(e=t.app_options[0])||void 0===e?void 0:e.trigger_action_name,desc:null===(n=t.app_options[0])||void 0===n?void 0:n.desc,display_title:null===(i=t.app_options[0])||void 0===i?void 0:i.trigger_action_displayname}}),this.customerConnectService.updateUserConnectBy_Id(this.triggerAppObject.appId,this.triggerAppObject).subscribe()}),this.commonService.getAppOptionsByAppId(this.actionAppObject.appId,{type:"action"}).subscribe(t=>{var e,n,i;this.actionAppObject=Object.assign(Object.assign({},this.actionAppObject),{nodeStatus:"ta_selected",actionName:{title:null===(e=t.app_options.action[0])||void 0===e?void 0:e.trigger_action_name,desc:null===(n=t.app_options.action[0])||void 0===n?void 0:n.desc,display_title:null===(i=t.app_options.action[0])||void 0===i?void 0:i.trigger_action_displayname}}),this.customerConnectService.updateUserConnectBy_Id(this.actionAppObject.appId,this.actionAppObject).subscribe()}),this.isGetStartedReady=!1,this.isGetStarted=!1,this.currentSlide=0,this.stopAutoSlide(),this.startAutoSlide(),setTimeout(()=>{this.stopAutoSlide(),this.isGetStartedReady=!0},6e3))}ngOnInit(){this.currentUser=this.customerService.GetCurrent(),this.customerService.getOnboardingData(this.currentUser.customerId).subscribe(t=>{var e,n,i;if(!0===t.success)"jc0fgwefcky2"===(null===(e=this.currentUser)||void 0===e?void 0:e.planId)&&(this.currentView="integrate"),this.startAutoSlide(),this.currentUser=this.customerService.GetCurrent(),this.checkAndRefreshAppData(),(null===(n=this.currentUser)||void 0===n?void 0:n.planId)!==Ar.PLANID_MAP.FREE_PLAN?this.router.navigateByUrl("/plans"):(this.customerInfo=this.currentUser,this.plansAction()),this.GetStarted();else{if(!this.triggerAppObject&&!this.actionAppObject)return void this.router.navigateByUrl("/setup-editor");const t=this.cookieService.get("onboarding_completed");this.currentView=Ar.SHOW_ONBOARDING&&"true"!==t?"onboarding":"integrate",this.startAutoSlide(),this.currentUser=this.customerService.GetCurrent(),this.checkAndRefreshAppData(),(null===(i=this.currentUser)||void 0===i?void 0:i.planId)!==Ar.PLANID_MAP.FREE_PLAN?this.router.navigateByUrl("/plans"):(this.customerInfo=this.currentUser,this.plansAction()),this.GetStarted()}})}loadAppDataFromCookies(){this.debugAllCookies(),this.triggerAppObject=this.getSelectedAppFromCookie("triggerAppObject"),this.actionAppObject=this.getSelectedAppFromCookie("actionAppObject")}debugAllCookies(){this.cookieService.getAll(),document.cookie.includes("triggerAppObject"),document.cookie.includes("actionAppObject")}checkAndRefreshAppData(){(!this.triggerAppObject||!this.actionAppObject)&&setTimeout(()=>{this.refreshAppDataFromCookies(),(!this.triggerAppObject||this.actionAppObject)&&(this.triggerAppObject||this.pollForAppData())},500)}refreshAppDataFromCookies(){const t=this.getSelectedAppFromCookie("triggerAppObject"),e=this.getSelectedAppFromCookie("actionAppObject");t&&(this.triggerAppObject=t),e&&(this.actionAppObject=e)}pollForAppData(){let t=0;const e=setInterval(()=>{t++,this.refreshAppDataFromCookies(),this.triggerAppObject&&this.actionAppObject||this.triggerAppObject?clearInterval(e):t>=8&&(console.warn("App data polling timeout. Data may not be available."),clearInterval(e))},500)}appToggleMenu(){this.actionOverlayOpen=!1,this.isOverlayOpen=!this.isOverlayOpen}actionAppToggleMenu(){this.actionOverlayOpen=!this.actionOverlayOpen,this.isOverlayOpen=!1}closeOverlay(){this.isOverlayOpen=!1,this.actionOverlayOpen=!1}actionCloseOverlay(){this.actionOverlayOpen=!1,this.isOverlayOpen=!1}stopPropagation(t){t.stopPropagation()}getSelectedAppFromCookie(t){const e=this.cookieService.get(t);if(e)try{const t=decodeURIComponent(atob(e));return JSON.parse(t)}catch(i){return console.error(`Failed to parse cookie data for '${t}':`,i),console.error("Cookie value that failed:",e),null}const n=this.getCookieFromDocument(t);if(n)try{const t=decodeURIComponent(atob(n));return JSON.parse(t)}catch(i){console.error(`Failed to parse fallback cookie data for '${t}':`,i)}return null}getCookieFromDocument(t){const e=t+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let t=n[i];for(;" "===t.charAt(0);)t=t.substring(1,t.length);if(0===t.indexOf(e))return t.substring(e.length,t.length)}return null}updateUserLastTouchedApp(t){this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[0]}).subscribe(e=>{t[1]&&this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[1]}).subscribe(e=>{t[2]&&this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t[2]}).subscribe(t=>{})})})}redirectToPurchasePage(){return(0,Jo.mG)(this,void 0,void 0,function*(){})}setActionAppObject(t){this.actionOverlayOpen=!1,this.actionAppObject=t,this.clearSearchText(),this.saveOriginUrl()}setTriggerAppObject(t){this.isOverlayOpen=!1,this.triggerAppObject=t,this.clearSearchText(),this.saveOriginUrl()}saveOriginUrl(){var t,e;const n=null===(t=this.triggerAppObject)||void 0===t?void 0:t.appId,i=null===(e=this.actionAppObject)||void 0===e?void 0:e.appId;n&&i&&localStorage.setItem("originUrl",encodeURIComponent(`/build-your-connect/apps__for__${n}_${i}`))}clearSearchText(){this.searchText="";const t=this.searchText.toLowerCase();this.filteredAppsList=this.appsList.filter(e=>e.displayName.toLowerCase().includes(t))}filterApps(){const t=this.searchText.toLowerCase();this.filteredAppsList=this.appsList.filter(e=>e.displayName.toLowerCase().includes(t))}onResize(){this.checkIfMobile()}checkIfMobile(){this.isMobileView=window.innerWidth<=768}getAnimationState(){return this.isMobileView?this.isOverlayOpen:"void"}closeMenuOnClickOutside(t){const e=t.target;(this.isOverlayOpen||this.actionOverlayOpen)&&!e.closest(".selected-appName")&&!e.closest("img")&&(this.isOverlayOpen=!1,this.actionOverlayOpen=!1)}ngOnDestroy(){this.stopAutoSlide()}startAutoSlide(){this.autoSlideInterval=setInterval(()=>{this.nextSlide()},3e3)}stopAutoSlide(){this.autoSlideInterval&&clearInterval(this.autoSlideInterval)}nextSlide(){this.currentSlide=0===this.currentSlide?1:0}prevSlide(){this.currentSlide=0===this.currentSlide?1:0}goToSlide(t){this.currentSlide=t}tryPlan(t){var e,n;if(this.cookieService.delete("fromPurchasePage","/"),this.currentUser.plan_details[0].planId!==Ar.PLANID_MAP.FREE_PLAN)return this.router.navigateByUrl("/plans"),!1;{const i=localStorage.getItem("planId");i&&(t.planId=i),this.customerInfo.trial_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.successUrl=`${this.appyConfig.baseUrl}/appointment`,this.customerInfo.cancelUrl=`${this.appyConfig.baseUrl}/app/cancel`,this.customerInfo.resetUrl=`${this.appyConfig.baseUrl}/purchase`,this.currentUser.trialEnd&&(this.customerInfo.buyNow=!0),localStorage.setItem("planId",t.planId);const o=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),r=btoa(encodeURIComponent(o));this.cookieService.set("custPlan",r,1,"/"),this.customerService.updateOnboardingData({completeStep:"3"}).subscribe(t=>{},t=>{console.error("Error updating onboarding data",t)}),(null===(n=null===(e=this.currentUser)||void 0===e?void 0:e.email)||void 0===n?void 0:n.includes("yopmail"))&&this.customerService.resetTrailMailTrack().subscribe(),this.customerInfo.planPeriod=this.selectedPlanPeriod,this.planService.tryCommonPayment(this.customerInfo).subscribe(t=>
1{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}}tryPlanForFreeTrial(t){if(this.cookieService.delete("fromPurchasePage","/"),this.currentUser.plan_details[0].planId!==Ar.PLANID_MAP.FREE_PLAN)return this.router.navigateByUrl("/plans"),!1;{const i=localStorage.getItem("planId");i&&(t.planId=i),this.customerInfo.trial_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.successUrl=`${this.appyConfig.baseUrl}/appointment`,this.customerInfo.cancelUrl=`${this.appyConfig.baseUrl}/app/cancel`,this.customerInfo.resetUrl=`${this.appyConfig.baseUrl}/purchase`,this.currentUser.trialEnd&&(this.customerInfo.buyNow=!0),localStorage.setItem("planId",t.planId);const o=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),r=btoa(encodeURIComponent(o));this.cookieService.set("custPlan",r,1,"/");var e=new Date,n=Math.round(e.getTime()/1e3);const s={planId:t.planId||Ar.PLANID_MAP.PROFESSIONAL_PLAN,planPeriod:t.planPeriod||"yearly",customerCurrencySign:t.currencySign||"$",customerCurrencyCode:t.currencyCode||"USD",customerBalance:0,usertype:1,auto_recharge_status:"Disabled",recharge_balance:50,status:1,isFirstVisit:1,custom_planId:Object.keys(t.custom_plans)[0]||"cusPR001",madeBy:"noCCtrial",payment_status:"trial",trialStart:n,trialEnd:e.setDate(e.getDate()+7),nextBillingDate:new Date(e).toISOString().split("T")[0]};this.customerService.Update(Object.assign({_id:this.currentUser._id},s)).subscribe(e=>{Object.keys(t.custom_plans)},t=>{console.error("Error saving professional plan details:",t)});const a={method:"createTrialProduct",email:this.currentUser.email,productName:"connect",currency:t.currencyCode,productId:this.currentUser.customerId,planId:t.planId,planPeriod:t.planPeriod||"yearly",subscriptionPeriod:t.planPeriod||"yearly",orderId:"CONNECT_"+(new Date).getTime(),originalCountryCode:t.countryCode,paymentType:"trialWithoutCC",subscriptionType:"subscription",notifyUrl:"https://loop.flozic.ai/payment/common-ipn-listener",trialSuccessUrl:this.appyConfig.baseUrl+"/app/successtrial",trialIpnUrl:"",appTrialDays:7};this.planService.createTrialProduct(a).subscribe(t=>{},t=>{console.error("Error creating trial product:",t)}),this.customerService.updateOnboardingData({completeStep:"3"}).subscribe(t=>{},t=>{console.error("Error updating onboarding data",t)}),this.router.navigateByUrl("/appointment")}}ngAfterViewInit(){}onOnboardingComplete(){this.currentView="integrate",this.GetStarted()}plansAction(){let t,e;this.planInfo=[],this.allFields=[],t={},t.status=1,(0,Tr.of)({countryCode:this.currentUser.plan_country||"US",ipAddress:"",status:1}).subscribe(n=>{n.countryCode&&1===n.status&&(t.country=n.countryCode,t.clientIp=n.ipAddress),this.currentUser.plan_country?t.plan_country=this.currentUser.plan_country:this.currentUser.planId&&this.currentUser.planId!==Ar.PLANID_MAP.FREE_PLAN&&"USD"===this.currentUser.customerCurrencyCode&&(t.plan_country="US"),this.planService.getPlansList(t).subscribe(t=>{var n,i;const o=[];this.scopeCurrencySign=null===(n=(null==t?void 0:t.planLists)[0])||void 0===n?void 0:n.currencySign,null===(i=null==t?void 0:t.planLists)||void 0===i||i.forEach((t,n)=>{const i=t;if(void 0!==this.currentUser.plan_details&&i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId){const t=i.custom_plans?i.custom_plans:{},e={};let n=!1;Object.keys(t).length>0&&(Object.keys(t).forEach(i=>{i===this.currentUser.custom_planId&&!1===n&&(n=!0),n&&(e[i]=t[i])}),i.custom_plans=e)}let r;if(r={},i.custom_plans&&Object.keys(i.custom_plans).length>0){let t=0;
1Object.keys(i.custom_plans).forEach(e=>{i.custom_plans[e].tasks>t&&(t=i.custom_plans[e].tasks),r[i.custom_plans[e].tasks]=i.custom_plans[e]}),i.maxTasks=t,i.sliderPlans=r}"Free Plan"===i.planName?(this.planInfo[0]={annualPrice:i.annualPrice,monthlyPrice:i.monthlyPrice,selected_tasks:i.tasks+" Tasks /mo",billingTitle:"Free forever",upgradebtn:"no",tasks:i.tasks,planKName:"",current_tasks:0},o[0]=i):"Standard"===i.planName?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[1]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[1]={plan_id:i.custom_plans.cusST001.plan_id,annualPrice:i.custom_plans.cusST001.year_price,monthlyPrice:i.custom_plans.cusST001.month_price,selected_tasks:i.custom_plans.cusST001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusST001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusST001.tasks,planKName:"",current_tasks:0},o[1]=i):"Professional"===i.planName?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[2]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[2]={plan_id:i.custom_plans.cusPR001.plan_id,annualPrice:i.custom_plans.cusPR001.year_price,monthlyPrice:i.custom_plans.cusPR001.month_price,selected_tasks:i.custom_plans.cusPR001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusPR001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusPR001.tasks,planKName:"",current_tasks:0},o[2]=i):"Business"===i.planName&&"business2"===i.identifire?(i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[3]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[3]={plan_id:i.custom_plans.cusBS001.plan_id,annualPrice:i.custom_plans.cusBS001.year_price,monthlyPrice:i.custom_plans.cusBS001.month_price,selected_tasks:i.custom_plans.cusBS001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusBS001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusBS001.tasks,planKName:"",current_tasks:0},o[3]=i):"Enterprise"===i.planName&&(Object.keys(i.features).length>0&&Object.keys(i.features).forEach(t=>{this.allFields.push({title:t,value:t.replace(/_/g," ")});const e=i.features[t]?i.features[t]:{};Object.keys(e).length>
10&&Object.keys(e).forEach(e=>{this.allFields.push({column:e,heading:t,value:e.replace(/_/g," ")})})}),i.planId===this.currentUser.plan_details[0].planId&&this.currentUser.custom_planId?(e=i.custom_plans[this.currentUser.custom_planId].tasks/1e3,this.planInfo[4]={plan_id:this.currentUser.custom_planId,annualPrice:i.custom_plans[this.currentUser.custom_planId].year_price,monthlyPrice:i.custom_plans[this.currentUser.custom_planId].month_price,selected_tasks:i.custom_plans[this.currentUser.custom_planId].tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans[this.currentUser.custom_planId].month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans[this.currentUser.custom_planId].tasks,planKName:e+"K",current_tasks:i.custom_plans[this.currentUser.custom_planId].tasks}):this.planInfo[4]=i.customerId?{plan_id:i.custom_plans.cusEP001.plan_id,annualPrice:i.custom_plans.cusEP001.year_price,monthlyPrice:i.custom_plans.cusEP001.month_price,selected_tasks:i.custom_plans.cusEP001.tasks+" Tasks /mo",billingTitle:"per month, billed annually or "+i.currencySign+" "+i.custom_plans.cusEP001.month_price+" month-to-month",upgradebtn:"no",tasks:i.custom_plans.cusEP001.tasks,planKName:"",current_tasks:0}:{annualPrice:i.annualPrice,monthlyPrice:i.monthlyPrice,selected_tasks:i.tasks,billingTitle:"per month, billed annually or "+i.currencySign+" "+i.monthlyPrice+" month-to-month",upgradebtn:"no",tasks:i.tasks,planKName:"",current_tasks:0},o[4]=i)}),this.planLists=o,this.planLists.planPeriodButton="yearly";const r=localStorage.getItem("marketingPlanPeriod");("monthly"===r||"yearly"===r)&&(this.selectedPlanPeriod=r);const s=decodeURIComponent(localStorage.getItem("originUrl"));let a="Professional";if(s&&s.includes("build-your-connect/")){const t=s.split("build-your-connect/")[1];if(this[t.split("__for__")[0]]=t.split("__for__")[1],this.apps){const t=this.apps.split("_");this.updateUserLastTouchedApp(t),t.indexOf(this.appyConfig.mindbodyId)>-1&&(a="Professional"),this.standardPlan=this.planLists.find(t=>t.planName===a)}else if(this.template)this.commonService.GetPopularMatchDetails(this.template).subscribe(t=>{let e=[];t&&(e=[t.details.triggerAppId],t.details.multiStepConnect?t.details.actionArray.forEach(t=>{-1==e.indexOf(t.actionAppId)&&e.push(t.actionAppId)}):e.push(t.details.actionAppId)),a=e.indexOf(this.appyConfig.mindbodyId)>-1?"Professional":"Standard",this.updateUserLastTouchedApp(e),this.standardPlan=this.planLists.find(t=>t.planName===a)});else if(this.pid){const t=this.planLists.find(t=>t.planId===this.pid);this.standardPlan=t||this.planLists.find(t=>t.planName===a),localStorage.removeItem("originUrl")}}else if(s&&!s.includes("build-your-connect/"))if(s.includes("handler/")){const t=s.match(/handler\/([^\/]+)\/([^\/]+)\/([^\/]+)/);if(t){const e=t[1],n=this.planLists.find(t=>t.planId===e);this.standardPlan=n||this.planLists.find(t=>t.planName===a)}else this.standardPlan=this.planLists.find(t=>t.planName===a)}else this.standardPlan=this.planLists.find(t=>t.planName===a);else this.standardPlan=this.planLists.find(t=>t.planName===a)})})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wo.v),o.Y36(lo.N),o.Y36(yo),o.Y36(Fo),o.Y36(Zr),o.Y36(DA),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-setup-editor-integrate"]],viewQuery:function(t,e){if(1&t&&o.Gf(kD,5),2&t){let t;o.iGM(t=o.CRH())&&(e.tryPlanButton=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("resize",function(){return e.onResize()},!1,o.Jf7)("click",function(t){return e.closeMenuOnClickOutside(t)},!1,o.evT)},decls:8,vars:3,consts:[[1,"py-0","py-xl-0","bg-white","editersetup-wrapper"],[1,"logo-header","position-fixed","top-0","start-0","p-3","px-3"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-light-2048.png","width","238","decoding","async","height","54",1,"appypie_logo","light-logo"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-dark-2048.png","width","238","decoding","async","height","54",1,"appypie_logo","dark-logo"],[1,"container","m-auto"],[3,"ngSwitch"],[3,"onComplete",4,"ngSwitchCase"],["class","container m-auto",4,"ngSwitchCase"],[3,"onComplete"],[1,"row","justify-content-center"],["class","col-lg-12 text-center",4,"ngIf"],["class","custom-slider-container",4,"ngIf"],["class","col-lg-12 text-center animation-sli
1de",4,"ngIf"],[1,"col-lg-12","text-center"],[1,"mt-lg-3"],[1,"selected-appName"],[1,"active"],["width","128","height","128",3,"src","alt","click"],[1,"selected-app-name"],[1,"selected-app-active"],["xmlns","http://www.w3.org/2000/svg","width","17","height","19","viewBox","0 0 17 19","fill","none"],["d","M9.00024 16.6382C12.9424 16.6382 16.1382 13.4424 16.1382 9.50024C16.1382 5.55807 12.9424 2.3623 9.00024 2.3623C5.05807 2.3623 1.8623 5.55807 1.8623 9.50024C1.8623 13.4424 5.05807 16.6382 9.00024 16.6382Z","fill","#52AA6E"],["d","M6 9.5L8 11.5L12 7.5","stroke","white","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],[1,"editApp-menu",3,"click"],["stroke","currentColor","fill","none","stroke-width","1.5","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"],["d","m15 5 4 4"],[1,"overlaymobile",3,"ngClass","click"],[1,"contentmobile",3,"click"],[1,"editSearch-wrap"],[1,"group_search"],[1,"btn","SearchBtn"],["width","22","height","22","viewBox","0 0 30 30","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","search 2"],["id","Vector","d","M13.75 23.75C19.2729 23.75 23.75 19.2729 23.75 13.75C23.75 8.22715 19.2729 3.75 13.75 3.75C8.22715 3.75 3.75 8.22715 3.75 13.75C3.75 19.2729 8.22715 23.75 13.75 23.75Z","stroke","#74748A","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M26.1538 26.1538L22.3076 22.3077","stroke","#74748A","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","text",1,"form-control",3,"ngModel","placeholder","ngModelChange","input"],["class","btn closeBtn",3,"click",4,"ngIf"],[1,"h-menu","thinScroll"],[4,"ngFor","ngForOf"],["class","px-3 text-black-50 py-2 text-start",4,"ngIf"],[1,"connecticon-editor"],["width","40","height","40","viewBox","0 0 40 40","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","Vector","d","M16.6668 21.6667C17.3825 22.6235 18.2957 23.4153 19.3443 23.9882C20.393 24.5612 21.5526 24.9019 22.7445 24.9872C23.9364 25.0726 25.1327 24.9006 26.2523 24.483C27.3719 24.0653 28.3886 23.4118 29.2334 22.5667L34.2334 17.5667C35.7514 15.995 36.5914 13.89 36.5724 11.705C36.5534 9.52001 35.677 7.42991 34.1319 5.88484C32.5869 4.33977 30.4967 3.46336 28.3118 3.44438C26.1268 3.42539 24.0218 4.26534 22.4501 5.78333L19.5834 8.63333M23.3334 18.3333C22.6177 17.3764 21.7045 16.5847 20.6558 16.0118C19.6072 15.4388 18.4476 15.0981 17.2557 15.0128C16.0638 14.9274 14.8674 15.0994 13.7479 15.517C12.6283 15.9347 11.6116 16.5882 10.7668 17.4333L5.76676 22.4333C4.24877 24.005 3.40882 26.11 3.42781 28.295C3.44679 30.48 4.3232 32.5701 5.86827 34.1151C7.41334 35.6602 9.50344 36.5366 11.6884 36.5556C13.8734 36.5746 15.9784 35.7346 17.5501 34.2167L20.4001 31.3667","stroke","CurrentColor","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],[4,"ngIf"],[1,"my-4","my-xxl-5","text-center"],[1,"btn","btn-lg","automate-btn","rounded-3",3,"click"],["class","my-4 my-xxl-5 text-center d-none",4,"ngIf"],[1,"mb-2","points","d-none"],["aria-hidden","true",1,"fa-fa-check-circle"],[1,"btn","closeBtn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 30 30","fill","none"],["d","M26 4L4 26M4 4L26 26","stroke","#1D1D1D","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"btn","d-flex","align-items-center","gap-2","w-100",3,"ngClass","click"],["width","128","height","128",3,"src","alt"],[1,"px-3","text-black-50","py-2","text-start"],[1,"my-4","my-xxl-5","text-center","d-none"],[1,"btn","btn-lg","automate-btn","rounded-pill","mb-3",3,"click"],[1,"custom-slider-container"],[1,"m-0"],[1,"slider-wrapper"],[1,"slider-slide"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-3","p-3"],[1,"selected-app-setup"],["width","128","height","128",3,"src","alt","title"],[1,"d-flex","flex-column","align-items-start","justify-content-start","text-start","gap-1"],[1,"m-0","text-truncate","w-230"],[1,"col-lg-12","text-center","animation-sli
1de"],[1,"m-0",2,"color","#000"],[1,"selected-appName","my-3"],["id","Vector","d","M16.6668 21.6667C17.3825 22.6235 18.2957 23.4153 19.3443 23.9882C20.393 24.5612 21.5526 24.9019 22.7445 24.9872C23.9364 25.0726 25.1327 24.9006 26.2523 24.483C27.3719 24.0653 28.3886 23.4118 29.2334 22.5667L34.2334 17.5667C35.7514 15.995 36.5914 13.89 36.5724 11.705C36.5534 9.52001 35.677 7.42991 34.1319 5.88484C32.5869 4.33977 30.4967 3.46336 28.3118 3.44438C26.1268 3.42539 24.0218 4.26534 22.4501 5.78333L19.5834 8.63333M23.3334 18.3333C22.6177 17.3764 21.7045 16.5847 20.6558 16.0118C19.6072 15.4388 18.4476 15.0981 17.2557 15.0128C16.0638 14.9274 14.8674 15.0994 13.7479 15.517C12.6283 15.9347 11.6116 16.5882 10.7668 17.4333L5.76676 22.4333C4.24877 24.005 3.40882 26.11 3.42781 28.295C3.44679 30.48 4.3232 32.5701 5.86827 34.1151C7.41334 35.6602 9.50344 36.5366 11.6884 36.5556C13.8734 36.5746 15.9784 35.7346 17.5501 34.2167L20.4001 31.3667","stroke","black","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],[1,"text-center"],[1,"btn","btn-lg","automate-btn","mb-3",3,"click"],["tryPlanButton",""],[1,"p-0","text-center","info-trail","mb-3","my-lg-4"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","30","width","30","xmlns","http://www.w3.org/2000/svg",1,"flex-shrink-0"],["fill","none","d","M0 0h24v24H0V0z"],["d","M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team?month=2025-08","target","_blank",1,"fw-bold","text-primary"]],template:function(t,e){1&t&&(o.TgZ(0,"section",0),o.TgZ(1,"div",1),o._UZ(2,"img",2),o._UZ(3,"img",3),o.qZA(),o.TgZ(4,"div",4),o.TgZ(5,"div",5),o.YNc(6,TD,1,0,"app-onboarding",6),o.YNc(7,RD,5,3,"div",7),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(5),o.Q6J("ngSwitch",e.currentView),o.xp6(1),o.Q6J("ngSwitchCase","onboarding"),o.xp6(1),o.Q6J("ngSwitchCase","integrate"))},directives:[to.RF,to.n9,aD,to.O5,to.mk,Xi.Fj,Xi.JJ,Xi.On,to.sg],pipes:[to.OU],styles:['.editersetup-wrapper[_ngcontent-%COMP%]{height:100%;min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column}.editersetup-wrapper[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:var(--Primary-Color);text-align:center;font-size:clamp(13px,2vw,40px);margin-bottom:.5rem;font-weight:600}.editersetup-wrapper[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{text-align:center;font-size:clamp(12px,2vw,18px);font-style:normal;font-weight:400;line-height:normal}.group_search[_ngcontent-%COMP%]{position:relative}.group_search[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:1;padding:0;height:100%;width:40px;text-align:center}.group_search[_ngcontent-%COMP%] > .closeBtn[_ngcontent-%COMP%]{left:auto;right:0}.group_search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{color:#74748a;font-size:14px;font-style:normal;position:relative;font-weight:400;line-height:26px;border-radius:14px;border:1.5px solid var(--Primary-Color);background:#FAFDFF;padding:8px 40px}.or-line-1[_ngcontent-%COMP%]{border-radius:4px;background:linear-gradient(90deg,rgba(116,116,138,0) 0%,#74748A 100%);display:block;width:170px;height:2px}.or-line[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#74748a;color:var(--Text-Secondary, #74748A);text-align:center;font-size:20px;font-style:normal;font-weight:400;line-height:36px}.or-line-2[_ngcontent-%COMP%]{background:linear-gradient(270deg,rgba(116,116,138,0) 0%,#74748A 100%)}.editor-apps-wrap[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:24px;color:#1d1d1d;text-align:center;font-style:normal;font-weight:500;line-height:normal}.editor-apps-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}.editor-listed-apps[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;grid-gap:2rem;gap:2rem;justify-content:center}.editor-listed-apps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:flex-start;position:relative;flex-direction:column;flex:0 0 130px;grid-gap:.5rem;gap:.5rem;max-width:130px;padding:.5rem;text-align:center;cursor:pointer;align-items:center}.img-title[_ngcontent-%COMP%]{color:#1d1d1d;text-align:center;font-size:clamp(12px,2vw,14px);font-weight:500;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.imgIcon[_ngcontent-%COMP%]{border-radius:10px;background:#F7FAFF;width:90px;height:90px;padding:1rem;display:flex;align-items:center;justify-content:center}.imgIcon[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:50px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.categPlus[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%)}.editor-menu[_ngcontent-%COMP%]{border-radius:10px;border:1px solid #74748A;border:1px solid var(--Text-Secondary, #74748A);background:#F6FBFF;
1background:var(--Background, #F6FBFF);width:100%;max-height:200px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;scrollbar-width:none}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{border-bottom:1px solid #74748A}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child{border:0}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{color:#0f1035;color:var(--Text-Primary, #0F1035);font-size:14px;font-style:normal;font-weight:400;border-radius:0;line-height:normal}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover{background-color:#5371ff1a}.editor-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:24px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.selected-appName[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;grid-gap:1rem;gap:1rem;margin:2rem 0;position:relative}.selected-appName[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{border-radius:10px;border:2px dashed #74748A;background:#FFF;display:flex;width:300px;height:70px;padding:.5rem;justify-content:flex-start;align-items:center;grid-gap:10px;gap:10px;position:relative;cursor:pointer}.selected-appName[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:50px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.selected-appName[_ngcontent-%COMP%]   .selected-app[_ngcontent-%COMP%]{border:2px dashed var(--Primary-Color)}i.selected-app-active[_ngcontent-%COMP%]{position:absolute;bottom:10px;left:45px}.selected-app-name[_ngcontent-%COMP%]{color:#26272f;font-size:16px;font-weight:400;line-height:20px}.selected-appName[_ngcontent-%COMP%]   .connecticon-editor[_ngcontent-%COMP%]{border:0;width:60px}ul.points[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-flow:row wrap;list-style-type:none;margin:2rem 0;padding:0;grid-gap:2rem;gap:2rem}ul.points[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-weight:400;list-style-type:none;color:#222;display:flex;align-items:center}.fa-fa-check-circle[_ngcontent-%COMP%]{display:inline-block;position:relative;width:15px;height:15px;background:#2967F6;border-radius:100px;margin-right:8px;border:1px solid #2967F6}.fa-fa-check-circle[_ngcontent-%COMP%]:before{display:block;width:5px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);-webkit-transform:rotate(45deg);top:2px;left:4px;position:absolute;content:"";border-radius:1px}.automate-btn[_ngcontent-%COMP%]{display:flex;padding:12px 36px;justify-content:center;align-items:center;grid-gap:4px;gap:4px;background:var(--Primary-Color);color:#fff;text-align:center;font-size:16px;font-style:normal;font-weight:600;line-height:26px;margin:auto;border-radius:12px!important}.automate-btn[_ngcontent-%COMP%]:hover{background-color:#5371ff;box-shadow:0 .25rem 1rem #0000002d}.banner-clientele[_ngcontent-%COMP%]{position:relative;background:#2b74fe!important;bottom:0;width:100%;text-align:center;display:flex;justify-content:center;align-items:center;padding:15px 10px}.banner-clientele[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:80%}.g2Wrap[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;margin-bottom:30px;margin-top:30px;justify-content:center;text-align:left}.g2Content[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0 0 100%;max-width:40%}.g2Content-Image[_ngcontent-%COMP%]{background:#e4e6e5;width:60px;height:60px;flex:0 0 auto;border-radius:50%;text-align:center;line-height:60px;overflow:hidden;margin-right:10px;display:flex;align-items:center;justify-content:center}.g2Content-body[_ngcontent-%COMP%]{margin-top:10px;width:calc(100% - 80px)}.g2Content-body[_ngcontent-%COMP%]   .g2ContentHeading[_ngcontent-%COMP%]{font-size:20px;color:#0a1d41;font-weight:500;margin:0 0 2px}.g2Content-body[_ngcontent-%COMP%]   .g2ContentHeading[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#b30032}.g2Content-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{line-height:26px;font-size:16px;color:#000}.g2Flex[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0 0 100%;max-width:60%;justify-content:center;flex-wrap:wrap}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{flex:0 0 100%;max-width:110px;text-align:center;display:block;width:100%;margin:0}.broken_link[_ngcontent-%COMP%], a.broken_link[_ngcontent-%COMP%]{text-decoration:line-through}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;--aspect-ratio: 2/2 }.editApp-menu[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background:rgb(0 0 0 / 50%);display:flex;align-items:center;color:#fff;justify-content:center;opacity:0;visibility:hidden;border-radius:10px;left:0;top:0}
1.selected-appName[_ngcontent-%COMP%] > li.active[_ngcontent-%COMP%]:hover > .editApp-menu[_ngcontent-%COMP%]{opacity:1;visibility:visible}.overlaymobile[_ngcontent-%COMP%]{position:absolute;top:100%;left:50%;min-width:25em;z-index:4;border:1px solid #74748A;background:#F6FBFF;border-radius:14px;width:100%;padding:0;margin-top:2rem;transform:translate(-50%);opacity:0;visibility:hidden}.contentmobile[_ngcontent-%COMP%]{border-radius:14px;overflow:hidden}.overlaymobile.open[_ngcontent-%COMP%]{opacity:1;visibility:visible}.editSearch-wrap[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:16px;color:#1d1d1d;text-align:start;margin-bottom:.5rem}.editSearch-wrap[_ngcontent-%COMP%]{position:sticky;top:0;background:#f6fbff;width:100%;padding:.75rem}.h-menu[_ngcontent-%COMP%]{max-height:130px;overflow-y:auto;scroll-behavior:smooth;overscroll-behavior:auto;margin-right:3px}.h-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:30px!important}.h-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{font-size:13px;text-align:start;border-radius:0}.h-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:hover, .selected[_ngcontent-%COMP%]{background-color:#5371ff1a}.overlaymobile[_ngcontent-%COMP%]:after, .overlaymobile[_ngcontent-%COMP%]:before{content:"";position:absolute;display:block;width:0px;left:50%;top:4px;border:15px solid transparent;border-top:0;border-bottom:15px solid #1d1d1d;transform:translate(-50%,calc(-100% - 5px))}.overlaymobile[_ngcontent-%COMP%]:before{border-bottom:15px solid #f6fbff;top:5px;z-index:1}.selected-app-setup[_ngcontent-%COMP%]{border-radius:10px;border:2px dashed #74748A;background:#FFF;display:flex;width:100%;max-width:300px;height:80px;padding:.5rem;justify-content:flex-start;align-items:center;grid-gap:10px;gap:10px;position:relative;cursor:pointer}.selected-app-setup[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:40px;height:auto}.selected-app-setup[_ngcontent-%COMP%]   .selected-app-active[_ngcontent-%COMP%]{left:35px}.w-230[_ngcontent-%COMP%]{max-width:220px}.info-trail[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0;display:flex;flex-direction:column;grid-gap:1rem;gap:1rem;justify-content:center;align-items:center}.info-trail[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:.5rem;gap:.5rem;color:#636363;text-align:center;font-size:clamp(14px,2vw,20px);font-weight:400;line-height:normal}@media (max-width: 1199px){.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:70px}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{flex:0 0 100%;max-width:90px}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%], .g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:80px;height:auto}}@media (min-width: 992px) and (max-width:1199px){.g2Content-body[_ngcontent-%COMP%]   .g2ContentHeading[_ngcontent-%COMP%]{font-size:18px}.g2Content-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}}@media (min-width: 768px) and (max-width:991px){.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%], .g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:50px;height:auto}.g2Flex[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{max-width:50px}.g2Flex[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{margin:0 5px}}@media (max-width: 991px){.editor-listed-apps[_ngcontent-%COMP%]{grid-template-rows:repeat(2,minmax(130px,min-content));grid-template-columns:repeat(3,1fr);grid-gap:.5rem;gap:.5rem;grid-auto-rows:130px}.selected-appName[_ngcontent-%COMP%]{flex-direction:column;margin:.5rem 0;grid-gap:.5rem;gap:.5rem}.imgIcon[_ngcontent-%COMP%], .selected-appName[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{width:100%;height:auto;padding:.5rem}.imgIcon[_ngcontent-%COMP%]{padding-top:1rem}.categPlus[_ngcontent-%COMP%]{top:0}.imgIcon[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], .selected-appName[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:40px}
1.selected-appName[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:30px}ul.points[_ngcontent-%COMP%]{grid-gap:1rem;gap:1rem}.selected-appName[_ngcontent-%COMP%]   .connecticon-editor[_ngcontent-%COMP%]{width:100%;height:100%;justify-content:center}i.selected-app-active[_ngcontent-%COMP%]{left:30px;bottom:7px}.g2Content[_ngcontent-%COMP%], .g2Flex[_ngcontent-%COMP%]{max-width:100%;margin-bottom:10px;justify-content:center;align-items:center;min-height:90px}.g2Content-body[_ngcontent-%COMP%]   .g2ContentHeading[_ngcontent-%COMP%]{font-size:17px}.g2Content-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{line-height:inherit;margin:0;font-size:13px}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{margin:.5rem;height:90px}.g2Flex[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:70px}.g2Content-body[_ngcontent-%COMP%]{margin-top:0;width:auto}.automate-btn[_ngcontent-%COMP%]{padding:10px 20px;font-size:14px}.g2Wrap[_ngcontent-%COMP%]{margin:15px 0}.g2Flex[_ngcontent-%COMP%]{display:none}.banner-clientele[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:55%}ul.points[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:12px}.overlaymobile[_ngcontent-%COMP%]{position:fixed;top:0;left:0;transform:translate(0);max-width:100%;height:100%;background-color:#0000007f;z-index:1031;display:flex;justify-content:flex-end;align-items:flex-end;transition:all .5s ease-in;border-radius:0;margin-top:0;opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}.overlaymobile[_ngcontent-%COMP%]:after, .overlaymobile[_ngcontent-%COMP%]:before{display:none}.overlaymobile.open[_ngcontent-%COMP%]{opacity:1;visibility:visible}.contentmobile[_ngcontent-%COMP%]{background-color:#f6fbff;width:100%;max-width:100%;padding:0 20px 20px;border-radius:10px 10px 0 0;overflow-y:auto;max-height:450px;scroll-behavior:smooth;scrollbar-width:none;position:absolute;bottom:0;left:0;transition:transform .5s ease;transform:translateY(100%)}.h-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{padding:.5rem 0}.h-menu[_ngcontent-%COMP%]{max-height:none}.editSearch-wrap[_ngcontent-%COMP%]{padding:1rem 0 .75rem}.overlaymobile.open[_ngcontent-%COMP%]   .contentmobile[_ngcontent-%COMP%]{transform:translateY(0)}.editApp-menu[_ngcontent-%COMP%]{display:none}}.custom-slider-container[_ngcontent-%COMP%]{width:100%;height:100%;min-height:400px;position:relative;overflow:hidden;text-align:center}.custom-slider-container[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin-bottom:2rem;color:var(--Primary-Color);font-size:clamp(13px,2vw,40px);font-weight:600}.slider-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.slider-slide[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:all .8s ease-in-out;transform:translateY(20px)}.slider-slide.active[_ngcontent-%COMP%]{opacity:1;visibility:visible;transform:translateY(0)}.slider-navigation[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;grid-gap:20px;gap:20px;margin-top:30px}.slider-nav-btn[_ngcontent-%COMP%]{background:rgba(255,255,255,.9);border:none;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .3s ease;color:var(--Primary-Color);box-shadow:0 2px 8px #0000001a}.slider-nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--Primary-Color);color:#fff;transform:scale(1.1)}.slider-nav-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.slider-dots[_ngcontent-%COMP%]{display:flex;grid-gap:10px;gap:10px}.slider-dot[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:50%;border:none;background:#ddd;cursor:pointer;transition:all .5s ease-in-out;opacity:.5}.slider-dot.active[_ngcontent-%COMP%]{background:var(--Primary-Color);opacity:1;transform:scale(1.2)}.slider-dot[_ngcontent-%COMP%]:hover{opacity:.8;transform:scale(1.1)}.slider-slide.active[_ngcontent-%COMP%]   .selected-app-setup[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}.slider-slide.active[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{animation:fadeInDown .6s ease-out}.slider-slide.active[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out .5s both}@keyframes fadeInUp{0%{opacity:0;transform:translateY(0)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(0)}to{opacity:1;transform:translateY(0)}}
1.animation-slide[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}.logo-header[_ngcontent-%COMP%]{z-index:10;width:100%}.logo-header[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:180px}@media (max-width: 767px){.custom-slider-container[_ngcontent-%COMP%]{min-height:300px}.logo-header[_ngcontent-%COMP%]{background-color:#fff}.slider-nav-btn[_ngcontent-%COMP%]{display:none}.slider-navigation[_ngcontent-%COMP%]{margin-top:15px}.animation-slide[_ngcontent-%COMP%]{margin-top:70px}}'],data:{animation:[tc("slideDownAnimation",[rc(":enter",[ic({transform:"translateY(100%)"}),ec("0.5s ease",ic({transform:"translateY(0)"}))]),rc(":leave",[ec("0.5s ease",ic({transform:"translateY(100%)"}))])])]}}),t})();var BD={};!function t(e,n,i,o){var r=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s="function"==typeof Path2D&&"function"==typeof DOMMatrix,a=function(){if(!e.OffscreenCanvas)return!1;try{var t=new OffscreenCanvas(1,1),n=t.getContext("2d");n.fillRect(0,0,1,1);var i=t.transferToImageBitmap();n.createPattern(i,"no-repeat")}catch(o){return!1}return!0}();function c(){}function l(t){var i=n.exports.Promise,o=void 0!==i?i:e.Promise;return"function"==typeof o?new o(t):(t(c,c),null)}var d,u,p,h=(d=a,u=new Map,{transform:function(t){if(d)return t;if(u.has(t))return u.get(t);var e=new OffscreenCanvas(t.width,t.height);return e.getContext("2d").drawImage(t,0,0),u.set(t,e),e},clear:function(){u.clear()}}),g=function(){var t,e,n=Math.floor(1e3/60),i={},o=0;return"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(t=function(t){var e=Math.random();return i[e]=requestAnimationFrame(function r(s){o===s||o+n-1<s?(o=s,delete i[e],t()):i[e]=requestAnimationFrame(r)}),e},e=function(t){i[t]&&cancelAnimationFrame(i[t])}):(t=function(t){return setTimeout(t,n)},e=function(t){return clearTimeout(t)}),{frame:t,cancel:e}}(),f=function(){var e,n,o={};return function(){if(e)return e;if(!i&&r){var s=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI && CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join("\n");try{e=new Worker(URL.createObjectURL(new Blob([s])))}catch(a){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("\ud83c\udf8a Could not load worker",a),null}!function(t){function e(e,n){t.postMessage({options:e||{},callback:n})}t.init=function(e){var n=e.transferControlToOffscreen();t.postMessage({canvas:n},[n])},t.fire=function(i,r,s){if(n)return e(i,null),n;var a=Math.random().toString(36).slice(2);return n=l(function(r){function c(e){e.data.callback===a&&(delete o[a],t.removeEventListener("message",c),n=null,h.clear(),s(),r())}t.addEventListener("message",c),e(i,a),o[a]=c.bind(null,{data:{callback:a}})})},t.reset=function(){for(var e in t.postMessage({reset:!0}),o)o[e](),delete o[e]}}(e)}return e}}(),m={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function v(t,e,n){return function(t,e){return e?e(t):t}(t&&function(t){return null!=t}(t[e])?t[e]:m[e],n)}function b(t){return t<0?0:Math.floor(t)}function x(t,e){return Math.floor(Math.random()*(e-t))+t}function _(t){return parseInt(t,16)}function C(t){return t.map(w)}function w(t){var e=String(t).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:_(e.substring(0,2)),g:_(e.substring(2,4)),b:_(e.substring(4,6))}}function y(t){t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight}function A(t){var e=t.getBoundingClientRect();t.width=e.width,t.height=e.height}function Z(t){var e=t.angle*(Math.PI/180),n=t.spread*(Math.PI/180);return{x:t.x,y:t.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*t.startVelocity+Math.random()*t.startVelocity,angle2D:-e+(.5*n-Math.random()*n),tiltAngle:(.5*Math.random()+.25)
1*Math.PI,color:t.color,shape:t.shape,tick:0,totalTicks:t.ticks,decay:t.decay,drift:t.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*t.gravity,ovalScalar:.6,scalar:t.scalar,flat:t.flat}}function k(t,n){var a,c=!t,d=!!v(n||{},"resize"),u=!1,p=v(n,"disableForReducedMotion",Boolean),m=r&&v(n||{},"useWorker")?f():null,_=c?y:A,w=!(!t||!m||!t.__confetti_initialized),k="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function T(e,n,r){for(var c=v(e,"particleCount",b),d=v(e,"angle",Number),u=v(e,"spread",Number),p=v(e,"startVelocity",Number),f=v(e,"decay",Number),m=v(e,"gravity",Number),w=v(e,"drift",Number),y=v(e,"colors",C),A=v(e,"ticks",Number),k=v(e,"shapes"),T=v(e,"scalar"),O=!!v(e,"flat"),M=function(t){var e=v(t,"origin",Object);return e.x=v(e,"x",Number),e.y=v(e,"y",Number),e}(e),I=c,S=[],P=t.width*M.x,N=t.height*M.y;I--;)S.push(Z({x:P,y:N,angle:d,spread:u,startVelocity:p,color:y[I%y.length],shape:k[x(0,k.length)],ticks:A,decay:f,gravity:m,drift:w,scalar:T,flat:O}));return a?a.addFettis(S):(a=function(t,e,n,r,a){var c,d,u=e.slice(),p=t.getContext("2d"),f=l(function(e){function l(){c=d=null,p.clearRect(0,0,r.width,r.height),h.clear(),a(),e()}c=g.frame(function e(){i&&!(r.width===o.width&&r.height===o.height)&&(r.width=t.width=o.width,r.height=t.height=o.height),!r.width&&!r.height&&(n(t),r.width=t.width,r.height=t.height),p.clearRect(0,0,r.width,r.height),(u=u.filter(function(t){return function(t,e){e.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.velocity*=e.decay,e.flat?(e.wobble=0,e.wobbleX=e.x+10*e.scalar,e.wobbleY=e.y+10*e.scalar,e.tiltSin=0,e.tiltCos=0,e.random=1):(e.wobble+=e.wobbleSpeed,e.wobbleX=e.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.y+10*e.scalar*Math.sin(e.wobble),e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2);var n=e.tick++/e.totalTicks,i=e.x+e.random*e.tiltCos,o=e.y+e.random*e.tiltSin,r=e.wobbleX+e.random*e.tiltCos,a=e.wobbleY+e.random*e.tiltSin;if(t.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-n)+")",t.beginPath(),s&&"path"===e.shape.type&&"string"==typeof e.shape.path&&Array.isArray(e.shape.matrix))t.fill(function(t,e,n,i,o,r,s){var a=new Path2D(t),c=new Path2D;c.addPath(a,new DOMMatrix(e));var l=new Path2D;return l.addPath(c,new DOMMatrix([Math.cos(s)*o,Math.sin(s)*o,-Math.sin(s)*r,Math.cos(s)*r,n,i])),l}(e.shape.path,e.shape.matrix,e.x,e.y,.1*Math.abs(r-i),.1*Math.abs(a-o),Math.PI/10*e.wobble));else if("bitmap"===e.shape.type){var c=Math.PI/10*e.wobble,l=.1*Math.abs(r-i),d=.1*Math.abs(a-o),u=e.shape.bitmap.width*e.scalar,p=e.shape.bitmap.height*e.scalar,g=new DOMMatrix([Math.cos(c)*l,Math.sin(c)*l,-Math.sin(c)*d,Math.cos(c)*d,e.x,e.y]);g.multiplySelf(new DOMMatrix(e.shape.matrix));var f=t.createPattern(h.transform(e.shape.bitmap),"no-repeat");f.setTransform(g),t.globalAlpha=1-n,t.fillStyle=f,t.fillRect(e.x-u/2,e.y-p/2,u,p),t.globalAlpha=1}else if("circle"===e.shape)t.ellipse?t.ellipse(e.x,e.y,Math.abs(r-i)*e.ovalScalar,Math.abs(a-o)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):function(t,e,n,i,o,r,s,a,c){t.save(),t.translate(e,n),t.rotate(r),t.scale(i,o),t.arc(0,0,1,0,a,void 0),t.restore()}(t,e.x,e.y,Math.abs(r-i)*e.ovalScalar,Math.abs(a-o)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI);else if("star"===e.shape)for(var m=Math.PI/2*3,v=4*e.scalar,b=8*e.scalar,x=e.x,_=e.y,C=5,w=Math.PI/C;C--;)x=e.x+Math.cos(m)*b,_=e.y+Math.sin(m)*b,t.lineTo(x,_),m+=w,x=e.x+Math.cos(m)*v,_=e.y+Math.sin(m)*v,t.lineTo(x,_),m+=w;else t.moveTo(Math.floor(e.x),Math.floor(e.y)),t.lineTo(Math.floor(e.wobbleX),Math.floor(o)),t.lineTo(Math.floor(r),Math.floor(a)),t.lineTo(Math.floor(i),Math.floor(e.wobbleY));return t.closePath(),t.fill(),e.tick<e.totalTicks}(p,t)})).length?c=g.frame(e):l()}),d=l});return{addFettis:function(t){return u=u.concat(t),f},canvas:t,promise:f,reset:function(){c&&g.cancel(c),d&&d()}}}(t,S,_,n,r),a.promise)}function O(n){var i=p||v(n,"disableForReducedMotion",Boolean),o=v(n,"zIndex",Number);if(i&&k)return l(function(t){t()});
1c&&a?t=a.canvas:c&&!t&&(t=function(t){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=t,e}(o),document.body.appendChild(t)),d&&!w&&_(t);var r={width:t.width,height:t.height};function s(){if(m){var e={getBoundingClientRect:function(){if(!c)return t.getBoundingClientRect()}};return _(e),void m.postMessage({resize:{width:e.width,height:e.height}})}r.width=r.height=null}function h(){a=null,d&&(u=!1,e.removeEventListener("resize",s)),c&&t&&(document.body.contains(t)&&document.body.removeChild(t),t=null,w=!1)}return m&&!w&&m.init(t),w=!0,m&&(t.__confetti_initialized=!0),d&&!u&&(u=!0,e.addEventListener("resize",s,!1)),m?m.fire(n,r,h):T(n,r,h)}return O.reset=function(){m&&m.reset(),a&&a.reset()},O}function T(){return p||(p=k(null,{useWorker:!0,resize:!0})),p}n.exports=function(){return T().apply(this,arguments)},n.exports.reset=function(){T().reset()},n.exports.create=k,n.exports.shapeFromPath=function(t){if(!s)throw new Error("path confetti are not supported in this browser");var e,n;"string"==typeof t?e=t:(e=t.path,n=t.matrix);var i=new Path2D(e),o=document.createElement("canvas").getContext("2d");if(!n){for(var r,a,c=1e3,l=1e3,d=0,u=0,p=0;p<1e3;p+=2)for(var h=0;h<1e3;h+=2)o.isPointInPath(i,p,h,"nonzero")&&(c=Math.min(c,p),l=Math.min(l,h),d=Math.max(d,p),u=Math.max(u,h));r=d-c,a=u-l;var g=Math.min(10/r,10/a);n=[g,0,0,g,-Math.round(r/2+c)*g,-Math.round(a/2+l)*g]}return{type:"path",path:e,matrix:n}},n.exports.shapeFromText=function(t){var e,n=1,i="#000000",o='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';"string"==typeof t?e=t:(e=t.text,n="scalar"in t?t.scalar:n,o="fontFamily"in t?t.fontFamily:o,i="color"in t?t.color:i);var r=10*n,s=r+"px "+o,a=new OffscreenCanvas(r,r),c=a.getContext("2d");c.font=s;var l=c.measureText(e),d=Math.ceil(l.actualBoundingBoxRight+l.actualBoundingBoxLeft),u=Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent),p=l.actualBoundingBoxLeft+2,h=l.actualBoundingBoxAscent+2;d+=4,u+=4,(c=(a=new OffscreenCanvas(d,u)).getContext("2d")).font=s,c.fillStyle=i,c.fillText(e,p,h);var g=1/n;return{type:"bitmap",bitmap:a.transferToImageBitmap(),matrix:[g,0,0,g,-d*g/2,-u*g/2]}}}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),BD,!1);var HD=BD.exports;let QD=(()=>{class t{constructor(t){this.customerService=t}ngOnInit(){}ngAfterViewInit(){this.triggerConfetti()}triggerConfetti(){const t=Date.now()+1e3,e={startVelocity:30,spread:360,ticks:60,zIndex:0};function n(t,e){return Math.random()*(e-t)+t}const i=setInterval(function(){const o=t-Date.now();if(o<=0)return clearInterval(i);const r=o/1e3*50;HD(Object.assign(Object.assign({},e),{particleCount:r,origin:{x:n(.1,.3),y:Math.random()-.2},shapes:["square","circle","star"]})),HD(Object.assign(Object.assign({},e),{particleCount:r,origin:{x:n(.7,.9),y:Math.random()-.2},shapes:["square","circle","star"]}))},250);setTimeout(()=>{HD({particleCount:100,spread:70,origin:{y:.6},colors:["#F2B70D","#5371FF","#FF6B6B","#4ECDC4","#FFE66D","#95E1D3"],shapes:["star","circle","square"]})},300),setTimeout(()=>{const t={origin:{y:.7}};function e(e,n){HD(Object.assign(Object.assign(Object.assign({},t),n),{particleCount:Math.floor(200*e),colors:["#F2B70D","#5371FF","#FF6B6B","#4ECDC4","#FFE66D"],shapes:["star","circle","square"]}))}e(.25,{spread:26,startVelocity:55}),e(.2,{spread:60}),e(.35,{spread:100,decay:.91,scalar:.8}),e(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),e(.1,{spread:120,startVelocity:45})},1e3),setTimeout(()=>{const t=setInterval(()=>{HD({particleCount:5,angle:n(55,125),spread:n(50,70),origin:{x:n(.2,.8),y:0},colors:["#F2B70D","#FFE66D","#FFD700","#FFA500","#FF6B6B"],shapes:["star"],scalar:n(.8,1.5),gravity:n(.5,1.5)})},100);setTimeout(()=>clearInterval(t),2e3)},1500)}ToggleAppointmentPop(){this.currentUser=this.customerService.GetCurrent(),window.location.href="trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status||void 0===this.currentUser.payment_status&&"IN"===this.currentUser.country?"/app/successtrial?showModal=true":"/app/success?showModal=true"}continueToDashboard(){this.currentUser=this.customerService.GetCurrent(),window.location.href="trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status||void 0===this.currentUser.payment_status&&"IN"===this.currentUser.country?"/app/successtrial":"/app/success",this.customerService.updateOnboardingData({completeStep:"4"}).subscribe(t=>{},t=>{console.error("Error updating onboarding data",t)})}}
vendor: 15,488 bytes, line 1
1return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-appointment-bookin"]],decls:81,vars:0,consts:[["id","appointment_booking_sec",1,"py-5","d-flex","justify-content-center","align-items-center","flex-column","min-vh-100","h-100","position-relative","automation-sec","pb-lg-0"],[1,"bg-white","d-inline-block","p-3","position-fixed","start-0","top-0","z-index3"],["src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-light-2048.png","alt","Appy Pie Automate","width","200","height","38",1,"logoColor","light-logo"],["alt","Appy Pie Automate","src","https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-dark-2048.png","width","200","height","38",1,"appypie_logo","dark-logo"],[1,"container"],[1,"row","justify-content-center"],[1,"col-xl-12","col-xxl-10"],[1,"d-flex","flex-column","gap-3","justify-content-center","align-items-center","extrawrap","text-center","mt-4","pt-5"],[1,"text-center","d-flex","align-items-center","gap-2"],["stroke","#F2B70D","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","30","width","30","xmlns","http://www.w3.org/2000/svg"],["d","M5.8 11.3 2 22l10.7-3.79"],["d","M4 3h.01"],["d","M22 8h.01"],["d","M15 2h.01"],["d","M22 20h.01"],["d","m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10"],["d","m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17"],["d","m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7"],["d","M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z"],[1,"fw-bolder","mb-0","text-black","d-flex","mb-3","mb-md-0","d-md-inline-block"],[1,"text-center","d-flex","align-items-stretch","gap-4","justify-content-center","flex-wrap","fs-6","my-3","feature-list"],[1,"feature-card"],[1,"feature-card-inner"],[1,"feature-card-bg"],[1,"feature-card-content"],[1,"d-flex","align-items-center","justify-content-center","Icons","feature-icon"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","#5371FF","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["x","3","y","3","width","7","height","7","rx","1"],["x","14","y","3","width","7","height","7","rx","1"],["x","14","y","14","width","7","height","7","rx","1"],["x","3","y","14","width","7","height","7","rx","1"],[1,"feature-title"],[1,"feature-description"],[1,"feature-shine"],["d","M13 2L3 14h9l-1 8 10-12h-9l1-8z"],["d","M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"],["d","M9 12l2 2 4-4"],[1,"d-flex","flex-column","gap-3","w-100","text-center","justify-content-center"],[1,"fw-bold"],[1,"text-primary"],[1,"mb-0","f-14","fs-md-6"],[1,"d-flex","align-items-center","gap-3","w-m100","justify-content-center","flex-row-reverse"],["type","button",1,"btn","text-center","f-14","btn_confirm","rounded-4","py-2","py-md-3","px-3",3,"click"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank","rel","noopener noreferrer"]],template:function(t,e){1&t&&(o.TgZ(0,"section",0),o.TgZ(1,"div",1),o._UZ(2,"img",2),o._UZ(3,"img",3),o.qZA(),o.TgZ(4,"div",4),o.TgZ(5,"div",5),o.TgZ(6,"div",6),o.TgZ(7,"div",7),o.TgZ(8,"span",8),o.O4$(),o.TgZ(9,"svg",9),o._UZ(10,"path",10),o._UZ(11,"path",11),o._UZ(12,"path",12),o._UZ(13,"path",13),o._UZ(14,"path",14),o._UZ(15,"path",15),o._UZ(16,"path",16),o._UZ(17,"path",17),o._UZ(18,"path",18),o.qZA(),o._uU(19," Congratulations!"),o.qZA(),o.kcU(),o.TgZ(20,"h1",19),o._uU(21," Your 7-Day Free Trial Is Activated "),o.qZA(),o.TgZ(22,"h2"),o._uU(23,"You now have full access to AppyPie Automate. Build, test, and deploy powerful workflows."),o.qZA(),o.TgZ(24,"ul",20),o.TgZ(25,"li",21),o.TgZ(26,"div",22),o._UZ(27,"div",23),o.TgZ(28,"div",24),o.TgZ(29,"span",25),o.O4$(),o.TgZ(30,"svg",26),o._UZ(31,"rect",27),o._UZ(32,"rect",28),o._UZ(33,"rect",29),o._UZ(34,"rect",30),o.qZA(),o.qZA(),o.kcU(),o.TgZ(35,"h3",31),o._uU(36,"Full Platform Access"),o.qZA(),o.TgZ(37,"p",32),o._uU(38,"Create and test unlimited automations during your trial."),o.qZA(),o._UZ(39,"div",33),o.qZA(),o.qZA(),o.qZA(),o.TgZ(40,"li",21),o.TgZ(41,"div",22),o._UZ(42,"div",23),o.TgZ(43,"div",24),o.TgZ(44,"span",25),o.O4$(),o.TgZ(45,"svg",26),o._UZ(46,"path",34),o.qZA(),o.qZA(),o.kcU(),o.TgZ(47,"h3",31),o._uU(48,"Powerful Integrations"),o.qZA(),o.TgZ(49,"p",32),o._uU(50,"Connect your favorite apps and automate workflows easily."),o.qZA(),o._UZ(51,"div",33),o.qZA(),o.qZA(),o.qZA(),o.TgZ(52,"li",21),o.TgZ(53,"div",22),o._UZ(54,"div",23),o.TgZ(55,"div",24),o.TgZ(56,"span",25),o.O4$(),o.TgZ(57,"svg",26),o._UZ(58,"path",35),o._UZ(59,"path",36),o.qZA(),o.qZA(),o.kcU(),o.TgZ(60,"h3",31),o._uU(61,"Risk-Free Trial"),o.qZA(),o.TgZ(62,"p",32),o._uU(63,"No payment details required. Upgrade only if it fits your needs."),o.qZA(),o._UZ(64,"div",33),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(65,"div",37),o.TgZ(66,"h4",38),o._uU(67,"Your "),o.TgZ(68,"strong",39),o._uU(69,"automation is almost ready"),o.qZA(),o._uU(70,", and you're all set to begin! "),o.qZA(),o.TgZ(71,"p",40),o._uU(72,"Access your dashboard to create workflows, connect apps, and manage your automations."),o.qZA(),o.TgZ(73,"div",41),o.TgZ(74,"button",42),o.NdJ("click",function(){return e.continueToDashboard()}),o._uU(75," Continue to Dashboard "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(76,"small"),o._uU(77,"Your trial is active \u2014 start building or "),o.TgZ(78,"a",43),o._uU(79," Book Expert"),o.qZA(),o._uU(80," help anytime."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA())},styles:['.automation-sec[_ngcontent-%COMP%]{background:#fff;position:relative;overflow:auto}.automation-sec[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.extrawrap[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:33px;animation:fadeInUp 1s ease-out .2s both}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.feature-list[_ngcontent-%COMP%]{position:relative;padding:0;list-style:none}.feature-card[_ngcontent-%COMP%]{position:relative;padding:0;font-size:15px;text-align:center;display:flex;flex:1 1 300px;max-width:340px;min-width:300px;color:#1d1d1d;perspective:1000px;border-radius:16px}.feature-card-inner[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;padding:1rem;background:linear-gradient(135deg,#ffffff 0%,#f8f9ff 100%);border-radius:16px;border:2px solid transparent;box-shadow:0 4px 20px #5371ff14,0 1px 3px #0000000d;transition:all .4s cubic-bezier(.175,.885,.32,1.275);overflow:hidden;transform-style:preserve-3d}.feature-card-inner[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;border-radius:16px;padding:2px;background:linear-gradient(135deg,rgba(83,113,255,.3),rgba(242,183,13,.3),rgba(83,113,255,.3));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:1;transition:opacity .4s ease}.feature-card[_ngcontent-%COMP%]:hover   .feature-card-inner[_ngcontent-%COMP%]:before{opacity:1;animation:borderGlow 2s ease-in-out infinite}@keyframes borderGlow{0%,to{background:linear-gradient(135deg,rgba(83,113,255,.3),rgba(242,183,13,.3),rgba(83,113,255,.3))}50%{background:linear-gradient(135deg,rgba(83,113,255,.5),rgba(242,183,13,.5),rgba(83,113,255,.5))}}.feature-card-bg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(135deg,rgba(83,113,255,.05) 0%,rgba(242,183,13,.05) 100%);opacity:1;transition:opacity .4s ease;border-radius:16px}.feature-card[_ngcontent-%COMP%]:hover   .feature-card-bg[_ngcontent-%COMP%]{opacity:1}.feature-card-content[_ngcontent-%COMP%]{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;grid-gap:.65rem;gap:.65rem}.feature-shine[_ngcontent-%COMP%]{position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(45deg,transparent 30%,rgba(255,255,255,.3) 50%,transparent 70%);transform:rotate(45deg);opacity:0;transition:opacity .6s ease,transform .6s ease;pointer-events:none;z-index:3}@keyframes shine{0%{transform:translate(-100%) translateY(-100%) rotate(45deg)}to{transform:translate(100%) translateY(100%) rotate(45deg)}}.feature-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:#1d1d1d;margin:0;transition:color .3s ease;animation:slideUpFade .6s ease-out both}.feature-card[_ngcontent-%COMP%]:nth-child(1)   .feature-title[_ngcontent-%COMP%]{animation-delay:.8s}.feature-card[_ngcontent-%COMP%]:nth-child(2)   .feature-title[_ngcontent-%COMP%]{animation-delay:1s}.feature-card[_ngcontent-%COMP%]:nth-child(3)   .feature-title[_ngcontent-%COMP%]{animation-delay:1.2s}.feature-description[_ngcontent-%COMP%]{font-size:.85rem;color:#6d6d6d;line-height:1.6;margin:0;animation:slideUpFade .6s ease-out both}.feature-card[_ngcontent-%COMP%]:nth-child(1)   .feature-description[_ngcontent-%COMP%]{animation-delay:.9s}.feature-card[_ngcontent-%COMP%]:nth-child(2)   .feature-description[_ngcontent-%COMP%]{animation-delay:1.1s}.feature-card[_ngcontent-%COMP%]:nth-child(3)   .feature-description[_ngcontent-%COMP%]{animation-delay:1.3s}@keyframes slideUpFade{0%{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInScale{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.Icons[_ngcontent-%COMP%], .feature-icon[_ngcontent-%COMP%]{width:55px;height:55px;padding:12px;grid-gap:4px;gap:4px;border-radius:14px;background:linear-gradient(135deg,#F1F4FF 0%,#E0E7FF 100%);transition:all .4s cubic-bezier(.175,.885,.32,1.275);animation:iconBounce .8s ease-out both;position:relative;overflow:hidden}.feature-card[_ngcontent-%COMP%]:nth-child(1)   .feature-icon[_ngcontent-%COMP%]{animation-delay:.7s}.feature-card[_ngcontent-%COMP%]:nth-child(2)   .feature-icon[_ngcontent-%COMP%]{animation-delay:.9s}.feature-card[_ngcontent-%COMP%]:nth-child(3)   .feature-icon[_ngcontent-%COMP%]{animation-delay:1.1s}.feature-icon[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:radial-gradient(circle,rgba(83,113,255,.3) 0%,transparent 70%);transform:translate(-50%,-50%);transition:width .6s ease,height .6s ease}.feature-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{position:relative;z-index:2;transition:transform .4s ease,filter .4s ease;width:24px;height:24px;stroke:#5371ff;stroke-width:2}@keyframes iconBounce{0%{opacity:0;transform:scale(0) rotate(-180deg) translateY(20px)}50%{transform:scale(1.3) rotate(10deg) translateY(-5px)}70%{transform:scale(.95) rotate(-3deg) translateY(2px)}to{opacity:1;transform:scale(1) rotate(0) translateY(0)}}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes subtlePulse{0%,to{box-shadow:0 4px 20px #5371ff14,0 1px 3px #0000000d}50%{box-shadow:0 6px 25px #5371ff1f,0 2px 5px #00000014}}.feature-card-inner[_ngcontent-%COMP%]:after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:radial-gradient(circle,rgba(83,113,255,.4) 0%,transparent 70%);top:15px;right:15px;opacity:0;transition:opacity .4s ease,transform .4s ease;animation:sparkle 2s ease-in-out infinite}.feature-card[_ngcontent-%COMP%]:hover   .feature-card-inner[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1.5)}@keyframes sparkle{0%,to{opacity:0;transform:scale(.8)}50%{opacity:1;transform:scale(1.2)}}.extrawrap[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#6d6d6d;font-size:17px;font-weight:400;animation:fadeInUp 1s ease-out .4s both}.extrawrap[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .extrawrap[_ngcontent-%COMP%]   .btn_confirm[_ngcontent-%COMP%]{color:#0d6efd;background-color:#fff;min-width:215px;transition:all .3s ease;animation:fadeInUp 1s ease-out 1.2s both;position:relative;overflow:hidden}.extrawrap[_ngcontent-%COMP%]   .btn_confirm[_ngcontent-%COMP%]:hover{color:#fff!important;box-shadow:0 .5rem 1rem #00000026;border-color:currentColor!important;background-color:#5371ff!important;transform:translateY(-2px)}.extrawrap[_ngcontent-%COMP%]   .btn_confirm[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:rgba(255,255,255,.3);transform:translate(-50%,-50%);transition:width .6s,height .6s}.extrawrap[_ngcontent-%COMP%]   .btn_confirm[_ngcontent-%COMP%]:hover:before{width:300px;height:300px}.extrawrap[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:30px;background:#FFF2D8;color:#1d1d1d;font-size:clamp(14px,2vw,18px);font-style:normal;font-weight:500;line-height:30px;padding:8px 20px;animation:slideDownFadeIn .8s ease-out,pulse 2s ease-in-out infinite 1s;box-shadow:0 4px 15px #f2b70d33;border:3px solid #fff}@keyframes slideDownFadeIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{transform:scale(1);box-shadow:0 4px 15px #f2b70d33}50%{transform:scale(1.02);box-shadow:0 6px 20px #f2b70d4d}}.extrawrap[_ngcontent-%COMP%]   button.btn_confirm[_ngcontent-%COMP%]{background-color:#5371ff;color:#fff;animation:fadeInUp 1s ease-out 1.4s both}.extrawrap[_ngcontent-%COMP%]   button.btn_confirm[_ngcontent-%COMP%]:hover{background-color:#4358e8!important;transform:translateY(-2px);box-shadow:0 8px 25px #5371ff66!important}.extrawrap[_ngcontent-%COMP%]   a.btn_confirm[_ngcontent-%COMP%]:hover ~ button.btn_confirm[_ngcontent-%COMP%]{background-color:#fff!important;color:#5371ff!important}@media (max-width: 767px){.automation-sec[_ngcontent-%COMP%]{padding-top:5rem!important;min-height:unset!important;height:auto!important}.automation-sec[_ngcontent-%COMP%] > .z-index3[_ngcontent-%COMP%]{width:100%!important}.extrawrap[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:18px;margin-bottom:0!important}.extrawrap[_ngcontent-%COMP%] > .btn_confirm[_ngcontent-%COMP%], .w-m100[_ngcontent-%COMP%]{width:100%}.extrawrap[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:.8rem!important}.Icons[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%], .feature-icon[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{width:20px;height:20px}.Icons[_ngcontent-%COMP%], .feature-icon[_ngcontent-%COMP%]{width:50px;height:50px;padding:8px}.automation-sec[_ngcontent-%COMP%]:after{display:none}.extrawrap[_ngcontent-%COMP%]   .btn_confirm[_ngcontent-%COMP%]{font-size:12.5px!important;min-width:auto!important}.extrawrap[_ngcontent-%COMP%]   .gap-4[_ngcontent-%COMP%], .feature-list[_ngcontent-%COMP%]{grid-gap:16px!important;gap:16px!important}.extrawrap[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{min-width:auto}.feature-card[_ngcontent-%COMP%]{flex:1 1 100%;max-width:100%;min-width:100%}.feature-card-inner[_ngcontent-%COMP%]{padding:1rem 1.25rem}.feature-title[_ngcontent-%COMP%]{font-size:1rem}.feature-description[_ngcontent-%COMP%]{font-size:12px}.feature-card[_ngcontent-%COMP%]{animation:fadeInScale .8s ease-out both}.feature-card-content[_ngcontent-%COMP%]{grid-gap:.5rem;gap:.5rem}.feature-card[_ngcontent-%COMP%]:nth-child(1), .feature-card[_ngcontent-%COMP%]:nth-child(2), .feature-card[_ngcontent-%COMP%]:nth-child(3){animation-duration:.8s}}.extrawrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{animation:fadeIn 1s ease-out 1.6s both}.extrawrap[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{animation:fadeIn 1s ease-out 1.8s both}@keyframes fadeIn{0%{opacity:0}
1to{opacity:1}}.extrawrap[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{transition-timing-function:cubic-bezier(.4,0,.2,1)}#appointment_booking_sec[_ngcontent-%COMP%]   .extrawrap[_ngcontent-%COMP%]   small[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{color:#0d6efd!important;text-decoration:underline;background:none;font-weight:600}']}),t})();function YD(t,e){if(1&t&&(o.TgZ(0,"div",12),o._uU(1),o.qZA()),2&t){const t=e.$implicit;o.xp6(1),o.hij(" ",t," ")}}function zD(t,e){1&t&&o._UZ(0,"app-loader")}let VD=(()=>{class t{constructor(t,e,n){this.cusService=t,this.customerConnectService=e,this.actRoute=n,this.loader=!0,this.connectId="",this.connectTitle="",this.currentUser=this.cusService.GetCurrent(),this.actRoute.params.subscribe(t=>{(null==t?void 0:t.id)?this.customerConnectService.getUserTaskHistory({limit:1,skip:0,_id:null==t?void 0:t.id,customerId:this.currentUser.customerId}).subscribe(t=>{var e,n,i,o,r;this.errorMessage=null===(e=null==t?void 0:t[0])||void 0===e?void 0:e.message,this.loader=!1,this.connectId=null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.connectId,this.connectTitle=(null===(o=null===(i=null==t?void 0:t[0])||void 0===i?void 0:i.connect_trigger)||void 0===o?void 0:o.connectTitle)||(null===(r=null==t?void 0:t[0])||void 0===r?void 0:r.connectId)||"Untitled"}):this.loader=!1})}ngOnInit(){}handleWindowClose(){window.close()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(Fo),o.Y36(ui.gz))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-error-messages"]],decls:15,vars:4,consts:[[1,"error-message","position-relative","w-100","h-100"],[1,"back","bg-white","border-b","p-3","px-lg-4"],["type","button",1,"btn","d-inline-flex","align-items-center","gap-1","justify-content-center","p-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 20 20","fill","none"],["d","M13.3334 16.6667L6.66675 9.99999L13.3334 3.33333","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"p-4"],[1,"font-w600","fs-5","text-black","mb-2"],[1,"fw-normal"],[1,"bg-white","border","overflow-hidden","pe-2","rounded-4"],[1,"blockquote","mb-0","overflow-y-auto","p-3","thinScroll","w-100"],["class","lh-lg f-14 text-body text-break",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"lh-lg","f-14","text-body","text-break"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"button",2),o.NdJ("click",function(){return e.handleWindowClose()}),o.O4$(),o.TgZ(3,"svg",3),o._UZ(4,"path",4),o.qZA(),o._uU(5," Back "),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",5),o.TgZ(7,"h2",6),o._uU(8,"Error Details "),o.TgZ(9,"span",7),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",8),o.TgZ(12,"blockquote",9),o.YNc(13,YD,2,1,"div",10),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(14,zD,1,0,"app-loader",11)),2&t&&(o.xp6(10),o.AsE("(",e.connectTitle," - ",e.connectId,")"),o.xp6(3),o.Q6J("ngForOf",e.errorMessage),o.xp6(1),o.Q6J("ngIf",e.loader))},directives:[to.sg,to.O5,po],styles:[".error-message[_ngcontent-%COMP%]   .back[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{color:#1d1d1d;font-size:16px;font-weight:500;line-height:24px}.error-message[_ngcontent-%COMP%]   .back[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)}.blockquote[_ngcontent-%COMP%]{max-height:calc(100vh - 140px)}"]}),t})();var GD=n(1435);function WD(t,e){1&t&&(o.TgZ(0,"div",19),o.TgZ(1,"button",20),o._uU(2," Add a new MCP Server "),o.qZA(),o.qZA())}function KD(t,e){1&t&&(o.TgZ(0,"div",23),o.TgZ(1,"div",24),o._UZ(2,"div",25),o._UZ(3,"div",26),o.qZA(),o._UZ(4,"div",27),o.qZA())}const XD=function(){return[1,2,3]};function tL(t,e){1&t&&(o.TgZ(0,"div",21),o.YNc(1,KD,5,0,"div",22),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,XD)))}function eL(t,e){1&t&&(o.TgZ(0,"div",28),o.TgZ(1,"div",29),o.O4$(),o.TgZ(2,"svg",30),o._UZ(3,"path",31),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"div",32),o.TgZ(5,"button",20),o._uU(6," Add a new MCP Server "),o.qZA(),o.qZA(),o.TgZ(7,"p",33),o._uU(8,"You haven't created any MCP Servers yet. Click the button below to add your first server."),o.qZA(),o.qZA())}function nL(t,e){if(1&t&&o._UZ(0,"img",52),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.Q6J("src",e.appyConfig.cdnMediaPath+t.appDetails.image,o.LSH)("alt",t.appDetails.displayName)}}function iL(t,e){1&t&&o._UZ(0,"div",53)}function oL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",34),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).editMcpAction(e)}),o.TgZ(1,"div",35),o.TgZ(2,"div",36),o.YNc(3,nL,1,2,"img",37),o.YNc(4,iL,1,0,"div",38),o.qZA(),o.TgZ(5,"div",39),o.TgZ(6,"div",40),o.TgZ(7,"span",41),o._uU(8),o.qZA(),o.TgZ(9,"span",42),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",43),o.TgZ(12,"span",44),o._uU(13,"Account:"),o.qZA(),o.TgZ(14,"span"),o._uU(15),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"div",45),o.TgZ(17,"div",46),o.TgZ(18,"input",47),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).toggleMcpAction(n,e)}),o.qZA(),o.qZA(),o.TgZ(19,"button",48),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).deleteMcpAction(n,e)}),o.O4$(),o.TgZ(20,"svg",49),o._UZ(21,"path",50),o._UZ(22,"path",51),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(3),o.Q6J("ngIf",null==t.appDetails?null:t.appDetails.image),o.xp6(1),o.Q6J("ngIf",!(null!=t.appDetails&&t.appDetails.image)),o.xp6(3),o.ekj("text-muted",!t.status),o.xp6(1),o.hij(" ",t.appDetails.displayName," "),o.xp6(2),o.hij(" App ID: ",t.appDetails.appId," "),o.xp6(5),o.Oqu(t.connectedAccountData.accountName),o.xp6(3),o.Q6J("checked",t.status)}}
1const rL=function(){return{WidthContainer:!1}};function sL(t,e){if(1&t&&(o.TgZ(0,"main",1),o.TgZ(1,"div",2),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o.TgZ(4,"div",5),o.TgZ(5,"div",6),o.TgZ(6,"div",7),o.TgZ(7,"div",8),o.TgZ(8,"h1",9),o._uU(9,"MCP Servers Settings"),o.qZA(),o.TgZ(10,"p"),o._uU(11," Connect any AI model directly to Appy Pie Automate's integrations with MCP Servers. Enable your AI assistant to perform real-world tasks through a simple, secure connection with built-in authentication. "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"div",10),o.TgZ(13,"div",7),o.TgZ(14,"div",8),o.TgZ(15,"div",11),o.TgZ(16,"h2",12),o._uU(17,"Your saved MCP Servers"),o.qZA(),o.YNc(18,WD,3,0,"div",13),o.qZA(),o.TgZ(19,"div",14),o.TgZ(20,"div",15),o.YNc(21,tL,2,2,"div",16),o.YNc(22,eL,9,0,"div",17),o.YNc(23,oL,23,8,"div",18),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.Q6J("ngClass",o.DdM(7,rL)),o.xp6(18),o.Q6J("ngIf",!(t.isLoadingMcpActions||t.mcpActions&&0==t.mcpActions.length)),o.xp6(3),o.Q6J("ngIf",t.isLoadingMcpActions),o.xp6(1),o.Q6J("ngIf",!(t.isLoadingMcpActions||t.mcpActions&&0!==t.mcpActions.length)),o.xp6(1),o.Q6J("ngForOf",t.mcpActions)}}let aL=(()=>{class t{constructor(t,e,n,i){this.commonService=t,this.translatorService=e,this.router=n,this.customerService=i,this.appyConfig=go.N,this.isMenuBarActive=!0,this.mcpEndpoint="",this.isEndpointVisible=!1,this.mcpActions=[],this.isLoadingMcpActions=!1,this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.isLoadingMcpActions=!0,this.customerService.getMcpActions().pipe((0,GD.x)(()=>{this.isLoadingMcpActions=!1})).subscribe(t=>{this.mcpActions=t})}ngOnInit(){this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t})}toggleEndpointVisibility(){this.isEndpointVisible=!this.isEndpointVisible}copyEndpoint(){navigator.clipboard.writeText(this.mcpEndpoint).then(()=>{console.log("Endpoint copied to clipboard")})}toggleMcpAction(t,e){e.stopPropagation(),this.customerService.updateMcpAction({_id:t._id,status:!t.status}).subscribe(e=>{e.success&&(t.status=!t.status)})}editMcpAction(t){this.router.navigate(["/mcp-setup",t._id])}navigateToHistory(){this.router.navigate(["/history"])}copyConfig(t){navigator.clipboard.writeText("cursor"===t?`{\n  "mcpServers": {\n    "mcp-server-appypie": {\n      "url": "${this.mcpEndpoint}"\n    }\n  }\n}`:`{\n  "mcpServers": {\n    "mcp-server-appypie": {\n      "serverUrl": "${this.mcpEndpoint}"\n    }\n  }\n}`).then(()=>{console.log("Configuration copied to clipboard")})}deleteMcpAction(t,e){e.stopPropagation(),confirm("Are you sure you want to delete this MCP action?")&&this.customerService.deleteMcpAction({_id:t._id}).subscribe(e=>{e.success&&(this.mcpActions=this.mcpActions.filter(e=>e._id!==t._id))})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wo.v),o.Y36(Eo),o.Y36(ui.F0),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-mcp"]],decls:1,vars:1,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ng-class","toggleclass()","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],["id","main-container_","ng-class","toggleclass()","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","mcpserverPage",1,"dashboard-middle","clearfix","sectionpadding","mcp-serverPage"],[1,"mcp-item"],[1,"col-md-12"],[1,"mb-2"],[1,"containerCustom","clearfix","bg-white","rounded-4","p-3","p-xl-4"],[1,"d-flex","justify-content-between","align-items-center","mb-3","gap-3","flex-wrap"],[1,"mb-0"],["class","text-end my-0",4,"ngIf"],[1,"card"],[1,"list-group","list-group-flush"],["class","list-group-item","style","border: none;",4,"ngIf"],["class","list-group-item text-center p-4",4,"ngIf"],["class","list-group-item list-group-item-action d-flex justify-content-between align-items-center p-3 cursor-pointer flex-wrap flex-lg-nowrap position-relative",3,"click",4,"ngFor","ngForOf"],[1,"text-end","my-0"],["routerLink","/mcp-setup/new",1,"btn","btn-primary","addnewAction-btn"],[1,"list-group-item",2,"border","none"],["class","d-flex justify-content-between align-items-center p-3",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","p-3"],[1,"d-flex","align-items-center","gap-3"],[1,"skeleton-circle","bg-light","rounded-circle",2,"width","40px","height","40px"],[1,"skeleton-text",2,"width","200px","height","20px","background-color","#e9ecef","border-radius","4px"],[1,"skeleton-switch",2,"width","40px","height","20px","background-color","#e9ecef","border-radius","20px"],[1,"list-group-item","text-center","p-4"],[1,"text-muted","mb-2"],["xmlns","http://www.w3.org/2000/svg","width","48","height","48","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-inbox"],["d","M4.98 4a.5.5 0 0 0-.39.188L1.54 8H6a.5.5 0 0 1 .5.5 1.5 1.5 0 1 0 3 0A.5.5 0 0 1 10 8h4.46l-3.05-3.812A.5.5 0 0 0 11.02 4H4.98zm9.954 5H10.45a2.5 2.5 0 0 1-4.9 0H1.066l.32 2.562A.5.5 0 0 0 1.884 12H14.116a.5.5 0 0 0 .496-.438L14.933 9zM3.17.436A.5.5 0 0 1 3.5 0h9a.5.5 0 0 1 .33.436l3.882 12A.5.5 0 0 1 16.5 13h-13a.5.5 0 0 1-.212-.564l3.882-12z"],[1,"text-center","my-3"],[1,"text-muted","mb-0"],[1,"list-group-item","list-group-item-action","d-flex","justify-content-between","align-items-center","p-3","cursor-pointer","flex-wrap","flex-lg-nowrap","position-relative",3,"click"],[1,"d-flex","align-items-start","gap-3","flex-column","flex-sm-row","w-100"],[1,"rounded-circle","bg-light","d-flex","align-items-center","justify-content-center","flex-shrink-0","mx-sm-0",2,"width","40px","height","40px"],["class","img-fluid","style","max-width: 24px; max-height: 24px;",3,"src","alt",4,"ngIf"],["class","bg-secondary rounded-circle","style","width: 24px; height: 24px;",4,"ngIf"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-wrap","align-items-center","gap-2"],[1,"fw-semibold","text-break"],[1,"badge","bg-light","text-dark","text-truncate",2,"font-size","0.75rem","font-weight","normal","max-width","100%"],[1,"text-muted",2,"font-size","0.875rem","word-break","break-all"],[1,"me-1"],[1,"d-flex","align-items-center","gap-3","mobile-top"],[1,"form-check","form-switch",2,"min-height","auto"],["type","checkbox","role","switch",1,"form-check-input",3,"checked","click"],["title","Delete MCP action",1,"btn","btn-link","text-danger","p-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-trash"],["d","M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"],["fill-rule","evenodd","d","M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"],[1,"img-fluid",2,"max-width","24px","max-height","24px",3,"src","alt"],[1,"bg-secondary","rounded-circle",2,"width","24px","height","24px"]],template:function(t,e){1&t&&o.YNc(0,sL,24,8,"main",0),2&t&&o.Q6J("ngIf",e.translation)},directives:[to.O5,to.mk,to.sg,ui.rH],styles:['.mcp-serverPage[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:22px;font-weight:500;color:var(--cc-text-color)}.mcp-serverPage[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-weight:500}.addnewAction-btn[_ngcontent-%COMP%]{background:var(--Primary-Color);color:#fff;border-color:var(--Primary-Color);border-width:1px;border-radius:10px}.addnewAction-btn[_ngcontent-%COMP%]:hover{background-color:#fff;color:var(--Primary-Color);border-color:var(--Primary-Color)}.mcp-serverPage[_ngcontent-%COMP%]   b[_ngcontent-%COMP%], .mcp-serverPage[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:600}.alert-warning[_ngcontent-%COMP%]{color:#664d03;background-color:#fff3cd;border-color:#ffecb5;padding-bottom:1rem;box-shadow:none;border-radius:.25rem}.alert-info[_ngcontent-%COMP%]{color:var(--cc-text-color);background-color:var(--secondary-color);border-color:#b6effb;padding-bottom:1rem;box-shadow:none;border-radius:.25rem}.mcp-item[_ngcontent-%COMP%]   .card[_ngcontent-%COMP%]{background:linear-gradient(145deg,#fefefe,#ffffff);box-shadow:0 2px 10px #0000000d;transition:all .3s ease}.mcp-item[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{padding:2rem}.mcp-item[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#2c3e50;font-weight:600;position:relative;padding-bottom:.5rem}.mcp-item[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:0;left:0;width:50px;height:3px;background:#3498db;border-radius:2px}.mcp-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#34495e;font-weight:500}.mcp-item[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]{background:transparent;padding:1rem 0;border:none}.mcp-item[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#2c3e50;font-weight:600}.mcp-item[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--text-secondary);margin-top:.5rem}.mcp-item[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{background:#f1f3f5;
1color:#e74c3c;padding:.2rem .4rem;border-radius:3px;font-size:.9em}.mcp-item[_ngcontent-%COMP%]   pre[_ngcontent-%COMP%]{background:#f3f8ff;border:1px solid #e9ecef;border-radius:8px;padding:1.5rem;margin:1rem 0}.mcp-item[_ngcontent-%COMP%]   pre[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{background:transparent;color:#2c3e50;padding:0}.mcp-item[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{transition:all .2s ease}.mcp-item[_ngcontent-%COMP%]   .list-group-numbered[_ngcontent-%COMP%]{counter-reset:item}.mcp-item[_ngcontent-%COMP%]   .list-group-numbered[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{position:relative;padding-left:2.5rem}.mcp-item[_ngcontent-%COMP%]   .list-group-numbered[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:before{content:counter(item);counter-increment:item;position:absolute;left:0;top:10px;width:2rem;height:2rem;background:#3498db;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600}.mcp-item[_ngcontent-%COMP%]   ol[type=a][_ngcontent-%COMP%]{padding-left:1.5rem}.mcp-item[_ngcontent-%COMP%]   ol[type=a][_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{color:#7f8c8d;margin-bottom:.5rem}@keyframes shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}.skeleton-circle[_ngcontent-%COMP%], .skeleton-text[_ngcontent-%COMP%], .skeleton-switch[_ngcontent-%COMP%]{animation:shimmer 1.5s infinite linear;background:linear-gradient(to right,#f6f7f8 8%,#edeef1 18%,#f6f7f8 33%);background-size:800px 104px;position:relative}.list-group-item-action[_ngcontent-%COMP%]{cursor:pointer;transition:all .2s ease-in-out;background-color:#fff}.list-group-item-action[_ngcontent-%COMP%]:hover{background-color:#eef3ff!important;box-shadow:0 2px 4px #0000000d}.list-group-item-action[_ngcontent-%COMP%]:active{background-color:#e9ecef!important;transform:translate(2px)}@media (max-width: 767px){.app-id-badge[_ngcontent-%COMP%]{max-width:100%;display:block;white-space:normal;word-break:break-all}}.endpoint-container[_ngcontent-%COMP%]{overflow-x:auto;word-break:break-all;white-space:pre-line;font-size:1.1rem;padding:1.25rem;margin-bottom:1rem}.endpoint-container[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{color:#2563eb;font-size:1.1rem;word-break:break-all;white-space:pre-line;display:block}@media (max-width: 767px){.endpoint-container[_ngcontent-%COMP%]{font-size:1rem;padding:.75rem;margin-bottom:.75rem}.endpoint-container[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{font-size:1rem;padding:0}.mobile-top[_ngcontent-%COMP%]{position:absolute;right:16px;top:24px}.mcp-item[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]{border-bottom:1px solid #eee}.addnewAction-btn[_ngcontent-%COMP%]{width:100%}}']}),t})();function cL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",25),o.TgZ(1,"button",26),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(4);return e.selectApp(e.selectedApp)}),o.TgZ(2,"div",27),o._UZ(3,"img",28),o.qZA(),o.TgZ(4,"span",29),o._uU(5),o.qZA(),o.TgZ(6,"div",30),o.O4$(),o.TgZ(7,"svg",31),o._UZ(8,"path",32),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.uIk("aria-label","Select "+t.selectedApp.displayName),o.xp6(2),o.Q6J("src",t.CDN_ICON_PATH+t.selectedApp.image,o.LSH)("alt",t.selectedApp.displayName+" Integration")("title",t.selectedApp.displayName+" Integration"),o.xp6(2),o.Oqu(t.selectedApp.displayName)}}function lL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",25),o.TgZ(1,"button",33),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(4).selectApp(e)}),o.TgZ(2,"div",27),o._UZ(3,"img",28),o.qZA(),o.TgZ(4,"span",29),o._uU(5),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(1),o.uIk("aria-label","Select "+t.displayName),o.xp6(2),o.Q6J("src",e.CDN_ICON_PATH+t.image,o.LSH)("alt",t.displayName+" Integration")("title",t.displayName+" Integration"),o.xp6(2),o.Oqu(t.displayName)}}function dL(t,e){if(1&t&&(o.ynx(0),o.YNc(1,lL,6,5,"li",21),o.BQk()),2&t){const t=e.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngIf",!n.selectedApp||t.appId!==n.selectedApp.appId)}}function uL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",34),o.TgZ(1,"button",35),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).loadMoreApps()}),o.TgZ(2,"div",27),o.TgZ(3,"span",36),o._uU(4,"+"),o.qZA(),o.qZA(),o.TgZ(5,"span",29),o._uU(6,"Load More"),o.qZA(),o.qZA(),o.qZA()}}function pL(t,e){1&t&&(o.TgZ(0,"li",37),o._uU(1," No Result "),o.qZA())}function hL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",10),o.TgZ(1,"div",11),o.TgZ(2,"form"),o.TgZ(3,"div",12),o.TgZ(4,"input",13),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).ui.search=e})("input",function(e){return o.CHM(t),o.oxw(3).filterApps(e.target.value)}),o.qZA(),o.TgZ(5,"div",14),o.TgZ(6,"button",15),o.O4$(),o.TgZ(7,"svg",16),o._UZ(8,"path",17),o._UZ(9,"path",18),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(10,"div",19),o.TgZ(11,"ul",20),o.YNc(12,cL,9,5,"li",21),o.YNc(13,dL,2,1,"ng-container",22),o.ALo(14,"slice"),o.YNc(15,uL,7,0,"li",23),o.YNc(16,pL,2,0,"li",24),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(4),o.Q6J("ngModel",t.ui.search),o.xp6(8),o.Q6J("ngIf",t.selectedApp),o.xp6(1),o.Q6J("ngForOf",o.Dn7(14,5,t.filteredApps,0,t.appsDisplayLimit)),o.xp6(2),o.Q6J("ngIf",t.filteredApps.length>t.appsDisplayLimit),o.xp6(1),o.Q6J("ngIf",0===t.filteredApps.length)}}function gL(t,e){1&t&&(o.TgZ(0,"div",57),o.TgZ(1,"div",39),o._UZ(2,"div",58),o.TgZ(3,"div",59),o._UZ(4,"div",60),o._UZ(5,"div",61),o.qZA(),o.qZA(),o.qZA())}const fL=function(){return[1,2,3]};function mL(t,e){1&t&&(o.TgZ(0,"div",54),o.TgZ(1,"div",55),o.YNc(2,gL,6,0,"div",56),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Q6J("ngForOf",o.DdM(1,fL
1)))}function vL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",62),o.TgZ(1,"div",63),o._UZ(2,"img",64),o.qZA(),o.TgZ(3,"p",65),o._uU(4),o.qZA(),o.TgZ(5,"button",66),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).openAuthPopup()}),o._uU(6,"Connect Account"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5);o.xp6(2),o.Q6J("src",t.CDN_ICON_PATH+(null==t.selectedApp?null:t.selectedApp.image),o.LSH)("alt",null==t.selectedApp?null:t.selectedApp.displayName),o.xp6(2),o.hij("Connect a ",null==t.selectedApp?null:t.selectedApp.displayName," Account")}}function bL(t,e){if(1&t&&(o.TgZ(0,"span",78),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.accountNickName)}}function xL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",72),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(6).selectUserAccount(e)}),o._UZ(1,"input",73),o.TgZ(2,"label",74),o._UZ(3,"div",45),o.TgZ(4,"div",75),o.TgZ(5,"span",76),o._uU(6),o.YNc(7,bL,2,1,"span",77),o.qZA(),o.TgZ(8,"p",65),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(6);o.xp6(1),o.Q6J("checked",(null==n.selectedUserAccount?null:n.selectedUserAccount._id)===t._id)("id",t._id),o.xp6(1),o.Q6J("for",t._id),o.xp6(1),o.Udp("background-image","url("+n.CDN_ICON_PATH+t.appImage+") !important"),o.xp6(3),o.hij(" ",t.appName," "),o.xp6(1),o.Q6J("ngIf",t.accountNickName),o.xp6(2),o.Oqu(t.accountName)}}function _L(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",67),o.YNc(1,xL,10,8,"div",68),o.TgZ(2,"div",69),o.TgZ(3,"button",70),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).openAuthPopup()}),o._uU(4,"Connect another account"),o.qZA(),o.TgZ(5,"button",71),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).continueToInstructions()}),o._uU(6," Continue "),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",t.userAccounts),o.xp6(4),o.Q6J("disabled",!t.selectedUserAccount)}}function CL(t,e){if(1&t&&(o.TgZ(0,"div",122),o._uU(1),o.qZA()),2&t){const t=o.oxw(7);o.xp6(1),o.Oqu(t.selectedUserAccount.accountNickName)}}function wL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",119),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).changeUserAccount()}),o.TgZ(1,"div",83),o._UZ(2,"div",45),o.TgZ(3,"div",84),o.TgZ(4,"div",85),o._uU(5,"Account Selected"),o.qZA(),o.TgZ(6,"div",86),o._uU(7),o.qZA(),o.TgZ(8,"div",120),o._uU(9),o.qZA(),o.YNc(10,CL,2,1,"div",121),o.qZA(),o.TgZ(11,"div",87),o.O4$(),o.TgZ(12,"svg",31),o._UZ(13,"path",88),o.qZA(),o.kcU(),o.TgZ(14,"span",89),o._uU(15,"Change Account"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(6);o.ekj("hover-effect",!0),o.xp6(2),o.Udp("background-image","url("+t.CDN_ICON_PATH+t.selectedUserAccount.appImage+") !important"),o.xp6(5),o.Oqu(t.selectedUserAccount.appName),o.xp6(2),o.Oqu(t.selectedUserAccount.accountName),o.xp6(1),o.Q6J("ngIf",t.selectedUserAccount.accountNickName)}}function yL(t,e){1&t&&(o.TgZ(0,"ol",123),o.TgZ(1,"li"),o._uU(2,"1. Navigate to "),o.TgZ(3,"b"),o._uU(4,"Settings"),o.qZA(),o._uU(5,", then "),o.TgZ(6,"b"),o._uU(7,"Cursor Settings"),o.qZA(),o.qZA(),o.TgZ(8,"li"),o._uU(9,"2. Select "),o.TgZ(10,"b"),o._uU(11,"MCP"),o.qZA(),o._uU(12," on the left"),o.qZA(),o.TgZ(13,"li"),o._uU(14,"3. Click "),o.TgZ(15,"b"),o._uU(16,"Add new global MCP server"),o.qZA(),o._uU(17," at the top right"),o.qZA(),o.TgZ(18,"li"),o._uU(19,"4. Copy and paste the server config to your existing file, then save "),o.qZA(),o.qZA())}function AL(t,e){1&t&&(o.TgZ(0,"ol",123),o.TgZ(1,"li"),o._uU(2,"1. Open the Claude Desktop app"),o.qZA(),o.TgZ(3,"li"),o._uU(4,"2. Go to "),o.TgZ(5,"b"),o._uU(6,"Settings"),o.qZA(),o._uU(7,", then "),o.TgZ(8,"b"),o._uU(9,"Developer"),o.qZA(),o.qZA(),o.TgZ(10,"li"),o._uU(11,"3. Click "),o.TgZ(12,"b"),o._uU(13,"Edit Config"),o.qZA(),o.qZA(),o.TgZ(14,"li"),o._uU(15,"4. Open the "),o.TgZ(16,"b"),o._uU(17,"claude_desktop_config.json"),o.qZA(),o._uU(18," file"),o.qZA(),o.TgZ(19,"li"),o._uU(20,"5. Copy and paste the server config to your existing file, then save "),o.qZA(),o.qZA())}function ZL(t,e){1&t&&(o.TgZ(0,"ol",123),o.TgZ(1,"li"),o._uU(2,"1. Open Windsurf"),o.qZA(),o.TgZ(3,"li"),o._uU(4,"2. Go to "),o.TgZ(5,"b"),o._uU(6,"Settings"),o.qZA(),o._uU(7,", then "),o.TgZ(8,"b"),o._uU(9,"Developer"),o.qZA(),o.qZA(),o.TgZ(10,"li"),o._uU(11,"3. Click "),o.TgZ(12,"b"),o._uU(13,"Edit Config"),o.qZA(),o.qZA(),o.TgZ(14,"li"),o._uU(15,"4. Open the "),o.TgZ(16,"b"),o._uU(17,"windsurf_config.json"),o.qZA(),o._uU(18," file"),o.qZA(),o.TgZ(19,"li"),o._uU(20,"5. Copy and paste the server config to your existing file, then save "),o.qZA(),o.qZA())}function kL(t,e){1&t&&(o.TgZ(0,"ol",123),o.TgZ(1,"li"),o._uU(2,"1. Open VS Code"),o.qZA(),o.TgZ(3,"li"),o._uU(4,"2. Open the C
1ommand Palette ("),o.TgZ(5,"b"),o._uU(6,"Ctrl+Shift+P"),o.qZA(),o._uU(7," / "),o.TgZ(8,"b"),o._uU(9,"Cmd+Shift+P"),o.qZA(),o._uU(10,")"),o.qZA(),o.TgZ(11,"li"),o._uU(12,"3. Type "),o.TgZ(13,"b"),o._uU(14,"MCP: Add Server"),o.qZA(),o._uU(15," and select it"),o.qZA(),o.TgZ(16,"li"),o._uU(17,"4. Choose to add to workspace or user settings"),o.qZA(),o.TgZ(18,"li"),o._uU(19,"5. Copy and paste the server config"),o.qZA(),o.qZA())}function TL(t,e){1&t&&(o.TgZ(0,"ol",123),o.TgZ(1,"li"),o._uU(2,"1. Open VS Code with the Cline extension installed"),o.qZA(),o.TgZ(3,"li"),o._uU(4,"2. Click the "),o.TgZ(5,"b"),o._uU(6,"Cline"),o.qZA(),o._uU(7," icon in the sidebar"),o.qZA(),o.TgZ(8,"li"),o._uU(9,"3. Select "),o.TgZ(10,"b"),o._uU(11,"MCP Servers"),o.qZA(),o._uU(12," from the dropdown menu"),o.qZA(),o.TgZ(13,"li"),o._uU(14,"4. In the "),o.TgZ(15,"b"),o._uU(16,"Remote Servers"),o.qZA(),o._uU(17," tab, enter a server name and your MCP server URL"),o.qZA(),o.TgZ(18,"li"),o._uU(19,"5. Click "),o.TgZ(20,"b"),o._uU(21,"Add Server"),o.qZA(),o._uU(22," to connect"),o.qZA(),o.qZA())}function OL(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"span",124),o._uU(1,"Copied!"),o.qZA())}function ML(t,e){1&t&&(o.ynx(0),o._UZ(1,"div",125),o._UZ(2,"div",126),o.BQk())}function IL(t,e){if(1&t&&(o.TgZ(0,"pre",127),o.TgZ(1,"code"),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(6);o.xp6(2),o.Oqu(t.mcpConfigJson)}}function SL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",70),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).goToMcpList(!0)}),o._uU(1,"Enable MCP Server"),o.qZA()}}function PL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",70),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).goToMcpList(!1)}),o._uU(1,"Go to MCP List"),o.qZA()}}function NL(t,e){1&t&&(o.ynx(0),o._UZ(1,"div",128),o._UZ(2,"div",129),o._UZ(3,"div",130),o._UZ(4,"div",130),o.BQk())}function qL(t,e){if(1&t&&(o.TgZ(0,"div",135),o.TgZ(1,"div",136),o._uU(2),o.qZA(),o.TgZ(3,"div",137),o._uU(4),o.qZA(),o.qZA()),2&t){const t=e.$implicit;o.xp6(2),o.Oqu(t.trigger_action_displayname||t.trigger_action_name),o.xp6(2),o.Oqu(t.desc)}}function UL(t,e){1&t&&(o.TgZ(0,"div",120),o._uU(1,"No tools available for this app."),o.qZA())}function EL(t,e){if(1&t&&(o.TgZ(0,"h4",131),o._uU(1,"Available tools"),o.qZA(),o.TgZ(2,"p",132),o._uU(3,"Add all actions as tools in your MCP client"),o.qZA(),o.YNc(4,qL,5,2,"div",133),o.YNc(5,UL,2,0,"div",134)),2&t){const t=o.oxw(6);o.xp6(4),o.Q6J("ngForOf",t.availableTools),o.xp6(1),o.Q6J("ngIf",0===t.availableTools.length)}}function FL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",79),o.TgZ(1,"div",4),o.TgZ(2,"div",80),o.TgZ(3,"div",81),o.TgZ(4,"div",82),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).changeApp()}),o.TgZ(5,"div",83),o._UZ(6,"div",45),o.TgZ(7,"div",84),o.TgZ(8,"div",85),o._uU(9,"App Selected"),o.qZA(),o.TgZ(10,"div",86),o._uU(11),o.qZA(),o.qZA(),o.TgZ(12,"div",87),o.O4$(),o.TgZ(13,"svg",31),o._UZ(14,"path",88),o.qZA(),o.kcU(),o.TgZ(15,"span",89),o._uU(16,"Change App"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(17,wL,16,7,"div",90),o.qZA(),o.TgZ(18,"h2",91),o._uU(19,"Client-specific instructions"),o.qZA(),o.TgZ(20,"p",92),o._uU(21,"Follow the instructions below for your specific MCP client"),o.qZA(),o.TgZ(22,"div",93),o.TgZ(23,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).ui.selectedClient="Cursor"}),o.TgZ(24,"span",95),o._UZ(25,"img",96),o.qZA(),o._uU(26,"Cursor "),o.qZA(),o.TgZ(27,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).ui.selectedClient="AI Claude"}),o.TgZ(28,"span",95),o._UZ(29,"img",97),o.qZA(),o._uU(30,"Claude "),o.qZA(),o.TgZ(31,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).ui.selectedClient="Windsurf"}),o.TgZ(32,"span",95),o._UZ(33,"img",98),o.qZA(),o._uU(34,"Windsurf "),o.qZA(),o.TgZ(35,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).ui.selectedClient="VS Code"}),o.TgZ(36,"span",95),o._UZ(37,"img",99),o.qZA(),o._uU(38,"VS Code "),o.qZA(),o.TgZ(39,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).ui.selectedClient="Cline"}),o.TgZ(40,"span",95),o._UZ(41,"img",100),o.qZA(),o._uU(42,"Cline "),o.qZA(),o.Hsn(43),o.qZA(),o.TgZ(44,"div",101),o.YNc(45,yL,20,0,"ol",102),o.YNc(46,AL,21,0,"ol",102),o.YNc(47,ZL,21,0,"ol",102),o.YNc(48,kL,20,0,"ol",102),o.YNc(49,TL,23,0,"ol",102),o.Hsn(50,1),o.qZA(),o.TgZ(51,"div",103),o.TgZ(52,"div",104),o.TgZ(53,"span",105),o._uU(54,"MCP server config"),o.qZA(),o.TgZ(55,"span",106),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).copyConfig()}),o.O4$(),o.TgZ(56,"svg",107),o._UZ(57,"rect",108),o._UZ(58,"rect",109),o.qZA(),o.YNc(59,OL,2,0,"span",110),o.qZA(),o.qZA(),o.kcU(),o.TgZ(60,"div",111),o.YNc(61,ML,3,0,"ng-container",112),o.YNc(62,IL,3,1,"ng-template",null,113,o.W1O),o.qZA(),o.Hsn(64,2),o.qZA(),o.TgZ(65,"div",114),o.YNc(66,SL,2,0,"button",115),o.YNc(67,PL,2,0,"button",115),o.qZA(),o.qZA(),o.TgZ(68,"div",116),o.TgZ(69,"div",117),o.YNc(70,NL,5,0,"ng-container",112),o.YNc(71,EL,6,2,"ng-template",null,118,o.W1O),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.MAs(63),e=o.MAs(72),n=o.oxw(5);o.xp6(4),o.ekj("hover-effect",!0),o.xp6(2),o.Udp("background-image","url("+n.CDN_ICON_PATH+(null==n.selectedApp?null:n.selectedApp.image)+") !important"),o.xp6(5),o.Oqu(null==n.selectedApp?null:n.selectedApp.displayName),o.xp6(6),o.Q6J("ngIf",n.selectedUserAccount),o.xp6(6),o.ekj("active","Cursor"===n.ui.selectedClient),o.xp6(4),o.ekj("active","AI Claude"===n.ui.selectedClient),o.xp6(4),o.ekj("active","Windsurf"===n.ui.selectedClient),o.xp6(4),o.ekj("active","VS Code"===n.ui.selectedClient),o.xp6(4),o.ekj("active","Cline"===n.ui.selectedClient),o.xp6(6),o.Q6J("ngIf","Cursor"===n.ui.selectedClient),o.xp6(1),o.Q6J("ngIf","AI Claude"===n.ui.selectedClient),o.xp6(1),o.Q6J("ngIf","Windsurf"===n.ui.selectedClient),o.xp6(1),o.Q6J("ngIf","VS Code"===n.ui.selectedClient),o.xp6(1),o.Q6J("ngIf","Cline"===n.ui.selectedClient),o.xp6(10),o.Q6J("ngIf",n.ui.configCopied),o.xp6(2),o.Q6J("ngIf",n.ui.loadingConfig)("ngIfElse",t),o.xp6(5),o.Q6J("ngIf",!n.mcpConfig.status),o.xp6(1),o.Q6J("ngIf",n.mcpConfig.status),o.xp6(3),o.Q6J("ngIf",n.ui.loadingTools)("ngIfElse",e)}}
1function DL(t,e){if(1&t&&(o.TgZ(0,"div",49),o.YNc(1,mL,3,2,"div",50),o.YNc(2,vL,7,3,"div",51),o.YNc(3,_L,7,2,"div",52),o.YNc(4,FL,73,28,"div",53),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngIf",t.ui.loadingAccounts),o.xp6(1),o.Q6J("ngIf",!t.ui.loadingAccounts&&0===t.userAccounts.length),o.xp6(1),o.Q6J("ngIf",!t.ui.loadingAccounts&&t.userAccounts.length>0&&!t.ui.showInstructions),o.xp6(1),o.Q6J("ngIf",t.ui.showInstructions)}}function LL(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",38),o.TgZ(1,"div",39),o.TgZ(2,"button",40),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).onBack()}),o.O4$(),o.TgZ(3,"svg",41),o._UZ(4,"path",42),o._UZ(5,"path",43),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",44),o._UZ(7,"div",45),o.TgZ(8,"div",46),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",47),o.YNc(11,DL,5,4,"div",48),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(7),o.Udp("background-image","url("+t.CDN_ICON_PATH+(null==t.selectedApp?null:t.selectedApp.image)+") !important"),o.xp6(2),o.hij(" ",null==t.selectedApp?null:t.selectedApp.displayName," "),o.xp6(2),o.Q6J("ngIf",!t.ui.loadingTriggers&&t.ui.showAccounts)}}function JL(t,e){if(1&t&&(o.ynx(0),o.YNc(1,hL,17,9,"div",8),o.YNc(2,LL,12,4,"div",9),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",!t.ui.appSelected),o.xp6(1),o.Q6J("ngIf",t.ui.appSelected)}}function jL(t,e){1&t&&(o.ynx(0),o.TgZ(1,"div",138),o._UZ(2,"div",139),o._UZ(3,"div",140),o._UZ(4,"div",140),o.qZA(),o.BQk())}const RL=function(){return{WidthContainer:!1}};function $L(t,e){if(1&t&&(o.TgZ(0,"main",1),o.TgZ(1,"div",2),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o.TgZ(4,"div",5),o.TgZ(5,"h1"),o._uU(6,"MCP Setup"),o.qZA(),o.TgZ(7,"div",6),o.YNc(8,JL,3,2,"ng-container",7),o.YNc(9,jL,5,0,"ng-container",7),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.ekj("menubaractive",t.ui.menuBarActive),o.Q6J("ngClass",o.DdM(5,RL)),o.xp6(8),o.Q6J("ngIf",!t.ui.loadingMcp),o.xp6(1),o.Q6J("ngIf",t.ui.loadingMcp)}}const BL=[[["",8,"client-tabs"]],[["",8,"instructions-content"]],[["",8,"mcp-config-card"]]],HL=[".client-tabs",".instructions-content",".mcp-config-card"];let QL=(()=>{class t{constructor(t,e,n,i,o,r,s){this.route=t,this.translator=e,this.common=n,this.connect=i,this.customer=o,this.router=r,this.location=s,this.CDN_ICON_PATH="https://mediaconnect.appypie.com/media/icons/128x128/",this.API_BASE_URL=go.N.apiEndPoint,this.SHOPIFY_APP_ID="jnpl1uik645c878la4sp",this.SHOPIFY_URL="https://apps.shopify.com/appypie-connect",this.AUTH_POPUP_NAME="_authWindowPop",this.POPUP_SIZE="width=1050,height=700",this.ui={menuBarActive:!0,loadingTriggers:!1,loadingAccounts:!1,appSelected:!1,showAccounts:!1,showInstructions:!1,dropdownOpen:!1,configCopied:!1,search:"",selectedClient:"Cursor",loadingTools:!1,loadingMcp:!0,loadingConfig:!1},this.translations={},this.mcpId="",this.selectedAppId="",this.mcpConfig=null,this.allApps=[],this.filteredApps=[],this.selectedApp=null,this.userAccounts=[],this.selectedUserAccount=null,this.jwtToken="token",this.appsDisplayLimit=11,this.availableTools=[],this.subs=new pi.w}ngOnInit(){this.ui.loadingMcp=!0,this.loadTranslations(),this.loadRouteParam
1s(),this.observeMenuBar(),this.initMcpConfig()}ngOnDestroy(){this.subs.unsubscribe()}loadTranslations(){this.subs.add(this.translator.getMultipleTranslation("en",["user","custom_connect"]).pipe((0,Vr.q)(1)).subscribe(t=>{this.translations=t}))}loadRouteParams(){this.subs.add(this.route.params.subscribe(t=>{this.mcpId=t._id,this.selectedAppId=t.appId||""}))}observeMenuBar(){this.subs.add(this.common.data$.subscribe(t=>{this.ui.menuBarActive=t}))}initMcpConfig(){"new"===this.mcpId?this.createNewMcpConfig():this.loadExistingMcpConfig()}createNewMcpConfig(){const t=(new Date).toISOString();this.mcpConfig={_id:"new",appDetails:{appId:"",appName:"",displayName:"",image:""},connectId:"",status:!1,customerId:"",connectedAccountId:"",createdAt:t,updatedAt:t},localStorage.setItem("mcpData",JSON.stringify(this.mcpConfig)),this.selectedAppId?this.loadAppsAndSelect(!0):this.loadAppsList(!0)}loadExistingMcpConfig(){const t=localStorage.getItem("mcpData");if(t){const e=JSON.parse(t);e._id===this.mcpId?(this.mcpConfig=e,this.initJwtToken(),this.setupExistingConfig()):this.fetchMcpConfig()}else this.fetchMcpConfig()}fetchMcpConfig(){this.subs.add(this.customer.getMcpActionsById(this.mcpId).pipe((0,Vr.q)(1)).subscribe(t=>{this.mcpConfig=t,this.initJwtToken(),localStorage.setItem("mcpData",JSON.stringify(this.mcpConfig)),this.setupExistingConfig()}))}setupExistingConfig(){!this.mcpConfig||(this.selectedApp={_id:"",appId:this.mcpConfig.appDetails.appId,displayName:this.mcpConfig.appDetails.displayName,image:this.mcpConfig.appDetails.image,name:this.mcpConfig.appDetails.appName},this.ui.appSelected=!0,this.ui.loadingTools=!0,this.mcpConfig.connectedAccountId&&this.loadUserAccount(),this.loadAvailableTools())}loadUserAccount(){this.subs.add(this.connect.getUserConnectedAccountByAppId(this.mcpConfig.appDetails.appId).pipe((0,Vr.q)(1)).subscribe(t=>{this.userAccounts=(null==t?void 0:t.userConnectedAccount)||[],this.selectedUserAccount=this.userAccounts.find(t=>{var e;return t._id===(null===(e=this.mcpConfig)||void 0===e?void 0:e.connectedAccountId)})||null,this.ui.appSelected=!0,this.ui.showAccounts=!0,this.ui.showInstructions=!0,this.ui.loadingMcp=!1}))}loadAppsList(t=!1){this.subs.add(this.common.getAppsCustom("action").pipe((0,Vr.q)(1)).subscribe({next:e=>{let n=e.apps_list.filter(t=>!t.categoryId.includes("66ffa4b8edf853c2680514cd"));this.allApps=n,this.filteredApps=n,this.appsDisplayLimit=11,t&&(this.ui.loadingMcp=!1)},error:()=>{this.ui.loadingMcp=!1}}))}loadAppsAndSelect(t=!1,e=!1){this.subs.add(this.common.getAppsCustom("action").pipe((0,Vr.q)(1)).subscribe({next:n=>{let i=n.apps_list.filter(t=>!t.categoryId.includes("66ffa4b8edf853c2680514cd"));this.allApps=i,this.filteredApps=i,this.appsDisplayLimit=11;const o=this.allApps.find(t=>t.appId===this.selectedAppId);o&&this.selectApp(o,e),t&&(this.ui.loadingMcp=!1)},error:()=>{this.ui.loadingMcp=!1}}))}filterApps(t){this.ui.search=t.toLowerCase(),this.filteredApps=t?this.allApps.filter(t=>t.displayName.toLowerCase().includes(this.ui.search)):this.allApps,this.appsDisplayLimit=11}loadMoreApps(){this.appsDisplayLimit=Math.min(this.appsDisplayLimit+12,this.filteredApps.length)}selectApp(t,e=!1){this.selectedApp=t,this.mcpConfig&&(this.mcpConfig.appDetails={appId:t.appId,appName:t.name,displayName:t.displayName,image:t.image},localStorage.setItem("mcpData",JSON.stringify(this.mcpConfig))),e||(this.ui.appSelected=!0,this.loadUserAccounts())}loadUserAccounts(t=!1){!this.selectedApp||(this.ui.loadingAccounts=!0,this.ui.showAccounts=!0,this.subs.add(this.connect.getUserConnectedAccountByAppId(this.selectedApp.appId).pipe((0,GD.x)(()=>{this.ui.loadingAccounts=!1}),(0,Vr.q)(1)).subscribe(e=>{this.userAccounts=(null==e?void 0:e.userConnectedAccount)||[],this.userAccounts.length>0&&!t&&(this.selectedUserAccount=this.userAccounts[0])})))}selectUserAccount(t){this.selectedUserAccount=t}changeApp(t=!1){this.ui.showAccounts=!1,this.ui.showInstructions=!1,this.ui.appSelected=!1,this.selectedUserAccount=null,this.userAccounts=[],this.loadAppsAndSelect(!1,t)}changeUserAccount(){this.ui.showAccounts=!1,this.ui.showInstructions=!1,this.ui.appSelected=!0,this.loadUserAccounts(!0)}onBack(){this.ui.showInstructions?(this.ui.showInstructions=!1,this.ui.showAccounts=!0):this.ui.showAccounts&&this.changeApp(!0)}openAuthPopup(){if(!this.selectedApp)return;if(this.selectedApp.appId===this.SHOPIFY_APP_ID)return void window.open(this.SHOPIFY_URL);const t=this.selectedApp.name.split(" ").join("").toLowerCase(),e=window.open(`${this.API_BASE_URL}app/auth/${t}?id=${this.selectedApp.appId}`,this.AUTH_POPUP_NAME,this.POPUP_SIZE);localStorage.setItem("window_name",this.AUTH_POPUP_NAME),localStorage.setItem("closepopup","false"),this.monitorPopup(e,this.AUTH_POPUP_NAME)}monitorPopup(t,e){if(!t)return;const n=setInterval(()=>{t.closed&&(clearInterval(n),"_reconnWindowPop"!==e&&(this.selectedUserAccount=null,this.loadUserAccounts()))},200)}saveMcpConfig(t=!1){!this.mcpConfig||("new"===this.mcpConfig._id?this.subs.add(this.customer.createMcpAction(this.mcpConfig).pipe((0,Vr.q)(1)).subscribe(t=>{this.mcpConfig._id=t.insertedId,localStorage.removeItem("mcpData"),this.location.replaceState(`/mcp-setup/${this.mcpConfig._id}`),this.initJwtToken()})):(this.mcpConfig.updatedAt=(new Date).toISOString(),this.subs.add(this.customer.updateMcpAction(this.mcpConfig).pipe((0,Vr.q)(1)).subscribe(()=>{localStorage.removeItem("mcpData"),t&&this.router.navigate(["/mcp"])}))))}get mcpConfigJson(){if(!this.selectedApp)return"";const t=this.selectedApp.name.replace(/\s+/g,"").toLowerCase(),e=`https://mcp.appypie.com/v1/${this.jwtToken}/${this.selectedApp.appId}/sse`;
1return"AI Claude"===this.ui.selectedClient||"Windsurf"===this.ui.selectedClient?`{\n\t"mcpServers": {\n\t\t"mcp-${t}": {\n\t\t\t"command": "npx",\n\t\t\t"args": [\n\t\t\t\t"mcp-remote",\n\t\t\t\t"${e}"\n\t\t\t]\n\t\t}\n\t}\n}`:`{\n\t"mcpServers": {\n\t\t"mcp-${t}": {\n\t\t\t"url": "${e}"\n\t\t}\n\t}\n}`}copyConfig(){navigator.clipboard.writeText(this.mcpConfigJson).then(()=>{this.ui.configCopied=!0,setTimeout(()=>this.ui.configCopied=!1,1500)})}goToMcpList(t=!0){t?(this.mcpConfig&&(this.mcpConfig.status=!0,localStorage.setItem("mcpData",JSON.stringify(this.mcpConfig))),this.saveMcpConfig(!0)):this.router.navigate(["/mcp"])}initJwtToken(){var t,e;this.ui.loadingConfig=!0,this.subs.add(this.customer.getMcpServerUrl({connectedAccountId:null===(t=this.mcpConfig)||void 0===t?void 0:t.connectedAccountId,mcpId:null===(e=this.mcpConfig)||void 0===e?void 0:e._id}).pipe((0,Vr.q)(1)).subscribe({next:t=>{this.jwtToken=t.jwtToken,this.ui.loadingConfig=!1},error:()=>{this.ui.loadingConfig=!1}}))}continueToInstructions(){this.ui.showInstructions=!0,this.ui.loadingTools=!0,this.ui.dropdownOpen=!1,this.mcpConfig&&this.selectedUserAccount&&(this.mcpConfig.connectedAccountId=this.selectedUserAccount._id,this.mcpConfig.connectId=`mcp_${this.selectedUserAccount.appUrlName}_${Date.now()}`,this.mcpConfig.status=!1,localStorage.setItem("mcpData",JSON.stringify(this.mcpConfig))),this.saveMcpConfig(),this.loadAvailableTools()}loadAvailableTools(){!this.selectedApp||(this.ui.loadingTools=!0,this.common.getAppOptionsByAppId(this.selectedApp.appId,"action").pipe((0,Vr.q)(1)).subscribe({next:t=>{t&&t.app_options&&(this.availableTools=[...t.app_options.action,...t.app_options.search].filter(t=>1===t.status)),this.ui.loadingTools=!1},error:()=>{this.ui.loadingTools=!1}}))}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(ui.gz),o.Y36(Eo),o.Y36(wo.v),o.Y36(Fo),o.Y36(yo),o.Y36(ui.F0),o.Y36(to.Ye))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-mcp-setup"]],ngContentSelectors:HL,decls:1,vars:1,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ng-class","toggleclass()","ui-view","content",3,"ngClass","menubaractive",4,"ngIf"],["id","main-container_","ng-class","toggleclass()","ui-view","content",1,"connect-dash","ng-scope","main-container",3,"ngClass"],[1,"dashboardpage","mcp_setup_page","p-3"],[1,"container-fluid"],[1,"row"],[1,"col-md-12"],[1,"containerCustom","clearfix","bg-white","rounded-4","p-0","p-xl-4","mcp_setup_page_content"],[4,"ngIf"],["class","bg-white chooseapps mb-0",4,"ngIf"],["class","bg-white chooseapps choose-trigger-event mb-0 d-flex flex-column gap-3",4,"ngIf"],[1,"bg-white","chooseapps","mb-0"],[1,"search","mb-2"],[1,"inputgroup-search"],["type","text","name","ui.search","placeholder","Search apps...","aria-label","Search apps","maxlength","150",1,"form-control",3,"ngModel","ngModelChange","input"],[1,"inputgroupappend-btn"],["type","button","id","SearchApps","aria-label","Search",1,""],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.5 16C13.0899 16 16 13.0899 16 9.5C16 5.91015 13.0899 3 9.5 3C5.91015 3 3 5.91015 3 9.5C3 13.0899 5.91015 16 9.5 16Z","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M17 17L16 16","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"listedapps-mcp-wrap"],["id","listingAppsLi1",1,"scrollheight","listedapps_mcp","py-2",2,"max-height","100%","scrollbar-width","thin"],["class","app-list-item",4,"ngIf"],[4,"ngFor","ngForOf"],["class","app-list-item load-more-tile",4,"ngIf"],["class","no-results",4,"ngIf"],[1,"app-list-item"],[1,"app-select-btn","selected",3,"click"],[1,"app-icon"],["width","128","height","128",3,"src","alt","title"],[1,"app-name"],[1,"selected-indicator"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 15L3 10L4.41 8.59L8 12.17L15.59 4.58L17 6L8 15Z","fill","currentColor"],[1,"app-select-btn",3,"click"],[1,"app-list-item","load-more-tile"],["aria-label","Load more apps",1,"app-select-btn",3,"click"],[2,"font-size","2rem","color","#6B7A90"],[1,"n
1o-results"],[1,"bg-white","chooseapps","choose-trigger-event","mb-0","d-flex","flex-column","gap-3"],[1,"d-flex","align-items-center","gap-3"],["aria-label","Go back",1,"btn","btn-default","py-2",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 24 24","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["fill","none","d","M0 0h24v24H0z"],["d","M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"],[1,"d-flex","align-items-center","gap-2"],[1,"recipie_img_box","gmail32x32"],[1,"fw-semibold","f-14","text-black"],[1,"dropdown_menu_body_event","scrollheight",2,"max-height","100%","scrollbar-width","thin"],["class","connected-accounts-section",4,"ngIf"],[1,"connected-accounts-section"],["class","skeleton-loader",4,"ngIf"],["class","mar-10-b sample-accont",4,"ngIf"],["class","dropdown_menu_body_event",4,"ngIf"],["class","client-instructions-container px-0",4,"ngIf"],[1,"skeleton-loader"],[1,"skeleton-section","mb-4"],["class","skeleton-item mb-3",4,"ngFor","ngForOf"],[1,"skeleton-item","mb-3"],[1,"skeleton-checkbox"],[1,"skeleton-text","w-100"],[1,"skeleton-title"],[1,"skeleton-description"],[1,"mar-10-b","sample-accont"],[1,"service-icon-logo"],[3,"src","alt"],[1,"mb-0"],["type","button",1,"btn","btn-primary","mt-3",3,"click"],[1,"dropdown_menu_body_event"],["class","form-checkbox mar-10-b",3,"click",4,"ngFor","ngForOf"],[1,"text-center","mt-3","d-flex","justify-content-center","gap-3","buttonWrap-mcp"],["type","button",1,"btn","btn-outline-primary",3,"click"],["type","button",1,"btn","btn-primary",2,"background-color","#5371FF",3,"disabled","click"],[1,"form-checkbox","mar-10-b",3,"click"],["type","checkbox","disabled","",1,"form-check-input",3,"checked","id"],[1,"form-check-label",3,"for"],[1,"col-9","mar-15-l"],[1,"d-flex","align-items-lg-center","mb-2","mb-lg-0","gap-2","flex-column","flex-lg-row"],["class","badge badge-account text-truncate",4,"ngIf"],[1,"badge","badge-account","text-truncate"],[1,"client-instructions-container","px-0"],[1,"col-lg-8","col-12"],[1,"selected-details","mb-3","bg-white","p-3","rounded-3","shadow-sm",2,"border","0.5px solid #E9ECF2"],[1,"detail-item","position-relative","mb-3","p-3","rounded-3",3,"click"],[1,"d-flex","align-items-lg-center","gap-3","flex-column","flex-lg-row"],[1,"flex-grow-1"],[1,"text-muted","small"],[1,"fw-semibold"],[1,"edit-icon"],["d","M14.1667 2.5C14.3855 2.28115 14.6453 2.10752 14.9313 1.98907C15.2173 1.87063 15.5238 1.80957 15.8333 1.80957C16.1429 1.80957 16.4493 1.87063 16.7353 1.98907C17.0213 2.10752 17.2812 2.28115 17.5 2.5C17.7188 2.71885 17.8925 2.97871 18.0109 3.26468C18.1294 3.55064 18.1904 3.85706 18.1904 4.16667C18.1904 4.47628 18.1294 4.7827 18.0109 5.06866C17.8925 5.35463 17.7188 5.61448 17.5 5.83333L6.25 17.0833L1.66669 18.3333L2.91669 13.75L14.1667 2.5Z","stroke","#6B7A90","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"ms-2","text-muted","small"],["class","detail-item position-relative p-3 rounded-3",3,"hover-effect","click",4,"ngIf"],[1,"mb-1","text-black","fs-5"],[1,"mb-4"],[1,"d-flex","gap-2","mb-4","flex-nowrap","overflow-auto","align-items-center","client-tabs"],[1,"client-tab-btn",3,"click"],[1,"tab-icon","me-2"],["src","assets/images/cursor.svg","alt","Cursor","width","22","height","22"],["src","assets/images/claude.svg","alt","Claude","width","22","height","22"],["src","assets/images/windsurf.svg","alt","Windsurf","width","22","height","22"],["src","assets/images/vs_code.svg","alt","VS Code","width","22","height","22"],["src","assets/images/cline.svg","alt","Cline","width","22","height","22"],[1,"instructions-content","bg-white","p-0","rounded","mb-4","border-0"],["class","client-steps",4,"ngIf"],[1,"mcp-config-card","bg-light","p-0","rounded-4","position-relative","mb-4","mt-4",2,"border","1px solid #E9ECF2"],[1,"d-flex","align-items-center","justify-content-between","px-4","pt-3","pb-2","position-relative"],[1,"fw-semibold",2,"color","#6B7A90","font-size","1rem"],["title","Copy config",1,"ms-auto","position-relative","copy-config-btn",2,"color","#6B7A90","cursor","pointer",3,"click"],["width","28","height","28","fill","none","viewBox","0 0 20 20",1,"copy-config-icon"],["x","5","y","5","width","10","height","10","rx","2","fill","#6B7A90"],["x","2","y","2","width","10","height","10","rx","2","fill","#C7D1E0"],["class","copied-tooltip position-absolute top-0 end-0 translate-middle-y","
1style","right: -10px; top: -28px; background: #F6F8FA; color: #6B7A90; font-size: 0.95rem; border-radius: 6px; padding: 2px 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);",4,"ngIf"],[1,"px-4","pb-3","pt-0"],[4,"ngIf","ngIfElse"],["configJsonContent",""],[1,"d-flex","justify-content-end","mt-3"],["type","button","class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"col-lg-4","col-12","mt-4","mt-md-0"],[1,"available-tools-list","bg-white","rounded-4","p-3","shadow-sm",2,"border","0.5px solid #E9ECF2"],["toolsListContent",""],[1,"detail-item","position-relative","p-3","rounded-3",3,"click"],[1,"text-muted"],["class","badge badge-account mt-1",4,"ngIf"],[1,"badge","badge-account","mt-1"],[1,"client-steps"],[1,"copied-tooltip","position-absolute","top-0","end-0","translate-middle-y",2,"right","-10px","top","-28px","background","#F6F8FA","color","#6B7A90","font-size","0.95rem","border-radius","6px","padding","2px 10px","box-shadow","0 2px 8px rgba(0,0,0,0.04)"],[1,"skeleton-item","mb-2",2,"height","80px","width","100%"],[1,"skeleton-item","mb-2",2,"height","24px","width","60%"],[1,"m-0",2,"background","#F6F8FA","border-radius","8px","padding","16px","color","#222C3A","overflow-x","auto","tab-size","4","white-space","pre-wrap"],[1,"skeleton-item","mb-3",2,"height","32px","width","60%"],[1,"skeleton-item","mb-3",2,"height","20px","width","80%"],[1,"skeleton-item","mb-3",2,"height","60px","width","100%"],[1,"mb-3",2,"font-weight","600"],[1,"mb-3",2,"color","#6B7A90"],["class","tool-card mb-3 p-3 rounded-3 border",4,"ngFor","ngForOf"],["class","text-muted",4,"ngIf"],[1,"tool-card","mb-3","p-3","rounded-3","border"],[1,"tool-title",2,"font-weight","600","color","#2B3674","font-size","1rem"],[1,"tool-desc",2,"color","#6B7A90","font-size","0.75rem"],[1,"skeleton-loader","p-4"],[1,"skeleton-item","mb-3",2,"height","48px","width","40%"],[1,"skeleton-item","mb-3",2,"height","80px","width","100%"]],template:function(t,e){1&t&&(o.F$t(BL),o.YNc(0,$L,10,6,"main",0)),2&t&&o.Q6J("ngIf",e.translations)},directives:[to.O5,to.mk,Xi._Y,Xi.JL,Xi.F,Xi.Fj,Xi.nD,Xi.JJ,Xi.On,to.sg],pipes:[to.OU],styles:[".mcp_setup_page[_ngcontent-%COMP%]{padding:1rem}.mcp_setup_page[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.375rem;font-weight:500;color:var(--cc-text-color);margin-bottom:1.25rem}.mcp_setup_page_content[_ngcontent-%COMP%]{width:100%;max-width:100%;min-height:calc(100dvh - 150px)}.chooseapps[_ngcontent-%COMP%]{max-width:100%;width:100%}.choose-trigger-event[_ngcontent-%COMP%]{padding:.75rem;border-radius:.25rem;border:1px solid #C7C8CA;background:#FFF;color:#74748a;font-size:.75rem;font-weight:400}.listedapps_mcp[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));grid-gap:.625rem;gap:.625rem;grid-auto-rows:108px;padding:.5rem 0}.app-select-btn[_ngcontent-%COMP%]{border-radius:.25rem;border:1px solid #C7C8CA;background:#FFF;padding:.5rem;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;width:100%;cursor:pointer;color:var(--cc-text-color);text-align:center;font-size:.75rem;font-weight:500;grid-gap:.5rem;gap:.5rem;height:100%;transform:translateY(0);transition:all .4s ease-in-out;position:relative}.app-select-btn.selected[_ngcontent-%COMP%]{border-color:var(--Primary-Color);background-color:#f8f9fa;color:var(--Primary-Color)}.app-select-btn.selected[_ngcontent-%COMP%]   .selected-indicator[_ngcontent-%COMP%]{position:absolute;top:.5rem;right:.5rem;color:var(--Primary-Color);background:#FFF;border-radius:50%;width:20px;height:20px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000001a}.app-select-btn[_ngcontent-%COMP%]:hover{transform:translateY(-5px);color:var(--Primary-Color);border-color:var(--Primary-Color)}.app-select-btn.selected[_ngcontent-%COMP%]:hover{transform:translateY(-5px);background-color:#f0f4ff}.app-icon[_ngcontent-%COMP%]{padding:.5rem;display:flex;justify-content:center;align-items:center;overflow:hidden;max-width:45px;height:45px}.connected-accounts-section[_ngcontent-%COMP%]{padding:.5rem 0}.badge-account[_ngcontent-%COMP%]{border-radius:2.5rem;background:#E6F1FF;color:#5371ff;font-size:.75rem;font-weight:600;max-width:290px;padding:.25rem .5rem;text-align:start;width:100%}.client-instructions-container[_ngcontent-%COMP%]{max-width:100%;margin:0 auto;padding:0 .5rem}.client-tabs[_ngcontent-%COMP%]{display:flex;grid-gap:.5rem;gap:.5rem;flex-wrap:wrap;align-items:center;margin-bottom:1rem;overscroll-behavior:auto;scroll-behavior:smooth}.client-tab-btn[_ngcontent-%COMP%]{background:#F6F8FA;color:#6b7a90;border:none;border-radius:.625rem;padding:.625rem 1.375rem .625rem 1rem;font-weight:500;font-size:1rem;display:flex;align-items:center;transition:all .15s ease;margin-bottom:.25rem;white-space:nowrap}.client-tab-btn[_ngcontent-%COMP%]   .tab-icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:.375rem;width:18px}.client-tab-btn.active[_ngcontent-%COMP%]{background:#E9ECF2;color:#222c3a;font-weight:600;box-shadow:0 2px 8px #00000008}.client-tab-btn[_ngcontent-%COMP%]:not(.active):hover{background:#E9ECF2;color:#222c3a}.client-steps[_ngcontent-%COMP%]{color:#222c3a;margin-bottom:0;padding-left:1.2rem}.client-steps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{margin-bottom:.6rem;line-height:1.7}.mcp-config-card[_ngcontent-%COMP%]{background:#F6F8FA;border-radius:.875rem;border:1px solid #E9ECF2;box-shadow:0 2px 8px #00000008;margin-top:2rem}.copied-tooltip[_ngcontent-%COMP%]{z-index:10;pointer-events:none;font-size:.97rem;font-weight:500;letter-spacing:.01em;position:absolute;top:-28px;right:-10px;background:#F6F8FA;color:#6b7a90;border-radius:.375rem;padding:.125rem .625rem;box-shadow:0 2px 8px #0000000a}.detail-item[_ngcontent-%COMP%]{border:1px solid #E9ECF2;border-radius:.375rem;cursor:pointer;transition:background-color .2s ease;padding:1rem;margin-bottom:.75rem}
1.detail-item.hover-effect[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.detail-item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.skeleton-loader[_ngcontent-%COMP%]{padding:1rem 0}.skeleton-item[_ngcontent-%COMP%]{padding:1rem;border-radius:.5rem;background-color:#fafafa;margin-bottom:.75rem}.skeleton-checkbox[_ngcontent-%COMP%]{width:20px;height:20px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:.25rem}.skeleton-text[_ngcontent-%COMP%]{flex:1}.skeleton-title[_ngcontent-%COMP%]{height:20px;width:70%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:.25rem;margin-bottom:.5rem}.skeleton-description[_ngcontent-%COMP%]{height:16px;width:90%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:.25rem}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.recipie_img_box[_ngcontent-%COMP%]{width:32px;height:32px;background-size:18px 18px;background-position:center;background-repeat:no-repeat}.text-truncate[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 991px){.client-tab-btn[_ngcontent-%COMP%]{font-size:.9rem;padding:.5rem 1rem;white-space:nowrap}.mcp-config-card[_ngcontent-%COMP%]{margin-top:1.5rem}.buttonWrap-mcp[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{font-size:12px}.selected-details[_ngcontent-%COMP%], .available-tools-list[_ngcontent-%COMP%]{border:0!important;padding:0!important;box-shadow:none!important}}.copy-config-icon[_ngcontent-%COMP%]{width:28px;height:28px;display:inline-flex;vertical-align:middle;transition:color .2s}.copy-config-btn[_ngcontent-%COMP%]:hover   .copy-config-icon[_ngcontent-%COMP%]   rect[_ngcontent-%COMP%]{fill:#5371ff}.copy-config-btn[_ngcontent-%COMP%]{transition:color .2s}.copy-config-btn[_ngcontent-%COMP%]:hover{color:#5371ff!important}"]}),t})();function YL(t,e){if(1&t&&(o.TgZ(0,"div",17),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Oqu(t.errorMsg)}}let zL=(()=>{class t{constructor(t,e,n){this.bsModalRef=t,this.folderService=e,this.customerConnectService=n,this.deleteMode="folder",this.folderId="",this.folderName="",this.connectId="",this.connectTitle="",this.selectedItems=new Set,this.bulkCount=0,this.trashConnectIds=[],this.trashFolderIds=[],this.isDeleting=!1,this.errorMsg="",this.onClose=new fo.xQ}ngOnInit(){}get titleText(){return"trashBulk"===this.deleteMode?"Permanently Delete Selected Item":"bulk"===this.deleteMode?"Delete Selected Items":"connect"===this.deleteMode?'Delete "'+(this.connectTitle||this.connectId)+'"':'Delete Folder "'+this.folderName+'"'}get messageText(){return"trashBulk"===this.deleteMode?"This action will delete the item permanently. This cannot be undone.":"bulk"===this.deleteMode?"Delete "+this.bulkCount+" selected items and move to Trash?":"connect"===this.deleteMode?"Delete this connect and move to Trash?":"Delete this folder and move contents to Trash?"}get confirmButtonText(){return"connect"===this.deleteMode||"folder"===this.deleteMode?this.isDeleting?"Moving...":"Move to Trash":"trashBulk"===this.deleteMode?this.isDeleting?"Deleting...":"Delete Forever":this.isDeleting?"Deleting...":"Move to Trash"}onConfirm(){this.isDeleting||(this.isDeleting=!0,this.errorMsg="","folder"===this.deleteMode?this.deleteFolder():"connect"===this.deleteMode?this.deleteConnect():"bulk"===this.deleteMode?this.deleteBulk():"trashBulk"===this.deleteMode&&this.deleteTrashBulk())}deleteFolder(){this.folderService.moveFolderToTrash(this.folderId).subscribe(t=>{this.isDeleting=!1,t&&t.success?(this.folderService.notifyFolderChanged({action:"delete",_id:this.folderId}),this.onClose.next(!0),this.bsModalRef.hide()):this.errorMsg=(null==t?void 0:t.msg)||"Failed to move folder to trash"},()=>{this.isDeleting=!1,this.errorMsg="Something went wrong. Please try again."})}deleteConnect(){this.customerConnectService.moveToTrash(this.connectId).subscribe(t=>{this.isDeleting=!1,t&&t.success?(this.onClose.next(!0),this.bsModalRef.hide()):this.errorMsg=(null==t?void 0:t.msg)||"Failed to move to trash."},()=>{this.isDeleting=!1,this.errorMsg="Something went wrong. Please try again."})}deleteBulk(){const t=[],e=[];
1this.selectedItems.forEach(n=>{const i=n.substring(0,n.indexOf("_")),o=n.substring(n.indexOf("_")+1);"folder"===i?(t.push(this.folderService.moveFolderToTrash(o).toPromise()),e.push(o)):"connect"===i&&t.push(this.customerConnectService.moveToTrash(o).toPromise())}),Promise.all(t).then(t=>{this.isDeleting=!1;const n=t.filter(t=>t&&!1===t.success);e.forEach(t=>{this.folderService.notifyFolderChanged({action:"delete",_id:t})}),n.length>0?(this.errorMsg=n[0].msg||"Some items could not be deleted.",n.length<t.length&&(this.onClose.next(!0),this.bsModalRef.hide())):(this.onClose.next(!0),this.bsModalRef.hide())}).catch(()=>{this.isDeleting=!1,this.errorMsg="Something went wrong. Please try again."})}deleteTrashBulk(){const t=[...this.trashConnectIds.map(t=>this.customerConnectService.permanentDeleteConnect(t).toPromise()),...this.trashFolderIds.map(t=>this.folderService.permanentDeleteFolder(t).toPromise())];Promise.all(t).then(t=>{this.isDeleting=!1;const e=t.filter(t=>t&&!1===t.success);e.length>0&&(this.errorMsg=e[0].msg||"Some items could not be deleted."),e.length<t.length&&(this.onClose.next(!0),this.bsModalRef.hide())}).catch(()=>{this.isDeleting=!1,this.errorMsg="Something went wrong. Please try again."})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(mM),o.Y36(Fo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-folder-delete-popup"]],decls:22,vars:5,consts:[[1,"modal-header","testfetch-header"],[1,"modal-title","testfetch-title"],[1,"modal-body","py-0"],[1,"mb-3"],[1,"d-flex","align-items-start","gap-3"],[1,"delete-icon-wrap","mt-1"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none","stroke","#D81919","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M3 6h18"],["d","M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"],["d","M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"],["x1","10","y1","11","x2","10","y2","17"],["x1","14","y1","11","x2","14","y2","17"],[1,"mb-0"],["class","text-danger f-12 mt-3",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0"],["type","link","data-dismiss","modal",1,"btn","btn-default","rounded-pill","btn_cancel",3,"click"],["type","button",1,"btn","btn-default","rounded-pill","btn_confirm","btn_delete",3,"disabled","click"],[1,"text-danger","f-12","mt-3"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.TgZ(4,"div",3),o.TgZ(5,"div",4),o.TgZ(6,"div",5),o.O4$(),o.TgZ(7,"svg",6),o._UZ(8,"path",7),o._UZ(9,"path",8),o._UZ(10,"path",9),o._UZ(11,"line",10),o._UZ(12,"line",11),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"div"),o.TgZ(14,"p",12),o._uU(15),o.qZA(),o.qZA(),o.qZA(),o.YNc(16,YL,2,1,"div",13),o.qZA(),o.qZA(),o.TgZ(17,"div",14),o.TgZ(18,"a",15),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(19,"Cancel"),o.qZA(),o.TgZ(20,"button",16),o.NdJ("click",function(){return e.onConfirm()}),o._uU(21),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.titleText),o.xp6(13),o.Oqu(e.messageText),o.xp6(1),o.Q6J("ngIf",e.errorMsg),o.xp6(4),o.Q6J("disabled",e.isDeleting),o.xp6(1),o.Oqu(e.confirmButtonText))},directives:[to.O5],styles:[""]}),t})();function VL(t,e){1&t&&(o.TgZ(0,"h1",34),o._uU(1,"Folders"),o.qZA())}function GL(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"nav",35),o.TgZ(2,"button",36),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeTrashView()}),o.O4$(),o.TgZ(3,"svg",37),o._UZ(4,"path",38),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"button",39),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeTrashView()}),o._uU(6,"Folders"),o.qZA(),o.TgZ(7,"span",40),o._uU(8,"/"),o.qZA(),o.TgZ(9,"span",41),o._uU(10,"Trash"),o.qZA(),o.qZA(),o.TgZ(11,"div",10),o.TgZ(12,"div",42),o.O4$(),o.TgZ(13,"svg",43),o._UZ(14,"path",44),o._UZ(15,"path",45),o._UZ(16,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(17,"h1",34),o._uU(18,"Trash"),o.qZA(),o.qZA(),o.BQk()}}function WL(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"nav",35),o.TgZ(2,"button",36),o.NdJ("click",function(){return o.CHM(t),o.oxw().exitFavoritesView()}),o.O4$(),o.TgZ(3,"svg",37),o._UZ(4,"path",38),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"button",39),o.NdJ("click",function(){return o.CHM(t),o.oxw().exitFavoritesView()}),o._uU(6,"Folders"),o.qZA(),o.TgZ(7,"span",40),o._uU(8,"/"),o.qZA(),o.TgZ(9,"span",41),o._uU(10,"Favorites"),o.qZA(),o.qZA(),o.TgZ(11,"div",47),o.O4$(),o.TgZ(12,"svg",48),o._UZ(13,"polygon",49),o.qZA(),o.kcU(),o.TgZ(14,"h1",34),o._uU(15,"Favorites"),o.qZA(),o.qZA(),o.BQk()}}function KL(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"span",40),o._uU(2,"/"),o.qZA(),o.TgZ(3,"button",56),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).goToBreadcrumb(e)}),o._uU(4),o.qZA(),o.BQk()}if(2&t){const t=e.$implicit;o.xp6(3),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName)}}function XL(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"nav",35),o.TgZ(2,"button",50),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.breadcrumbs.length>0?e.goToBreadcrumb(e.breadcrumbs[e.breadcrumbs.length-1]):e.goToRoot()}),o.O4$(),o.TgZ(3,"svg",37),o._UZ(4,"path",38),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"button",39),o.NdJ("click",function(){return o.CHM(t),o.oxw().goToRoot()}),o._uU(6,"Folders"),o.qZA(),o.YNc(7,KL,5,2,"ng-container",51),o.TgZ(8,"span",40),o._uU(9,"/"),o.qZA(),o.TgZ(10,"span",52),o._uU(11),o.qZA(),o.qZA(),o.TgZ(12,"div",47),o.O4$(),o.TgZ(13,"svg",53),o._UZ(14,"path",54),o.qZA(),o.kcU(),o.TgZ(15,"h1",55),o._uU(16),o.qZA(),o.qZA(),o.BQk()}if(2&t){const t=o.oxw();o.xp6(7),o.Q6J("ngForOf",t.breadcrumbs),o.xp6(3),o.Q6J("title",t.currentFolder.folderName),o.xp6(1),o.Oqu(t.currentFolder.folderName),o.xp6(4),o.Q6J("title",t.currentFolder.folderName),o.xp6(1),o.Oqu(t.currentFolder.folderName)}}function tJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",57),o.NdJ("click",function(){return o.CHM(t),o.oxw().bulkRemoveFromFolder()}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"path",54),o._UZ(3,"path",58),o.qZA(),o._uU(4," Remove from Folder "),o.qZA()}}function eJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw().bulkRemoveFromFavorites()}),o.TgZ(1,"span",60),o._uU(2,"Remove from Favorites"),o.qZA(),o.TgZ(3,"span",61),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(4),o.Oqu(t.selectedCount)}}function nJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw().deleteSelected()}),o.O4$(),o.TgZ(1,"svg",63),o._UZ(2,"path",64),o._UZ(3,"path",65),o._UZ(4,"path",66),o._UZ(5,"path",67),o.qZA(),o._uU(6),o.qZA()}if(2&t){const t=o.oxw();o.xp6(6),o.hij(" Delete (",t.selectedCount,") ")}}function iJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",68),o.NdJ("click",function(){return o.CHM(t),o.oxw().bulkRestoreFromTrash()}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"path",69),o._UZ(3,"path",70),o.qZA(),o._uU(4),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("disabled",t.isBulkRestoring),o.xp6(4),o.hij(" ",t.isBulkRestoring?"Restoring...":"Restore ("+t.selectedTrashItems.size+")"," ")}}function oJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",71),o.NdJ("click",function(){return o.CHM(t),o.oxw().bulkDeleteFromTrash()}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"path",44),o._UZ(3,"path",45),o._UZ(4,"path",46),o.qZA(),o._uU(5),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("disabled",t.isBulkDeleting),o.xp6(5),o.hij(" ",t.isBulkDeleting?"Deleting...":"Delete ("+t.selectedTrashItems.size+")"," ")}}function rJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",72),o.NdJ("click",function(){return o.CHM(t),o.oxw().clearSearch()}),o.O4$(),o.TgZ(1,"svg",73),o._UZ(2,"path",74),o.qZA(),o.qZA()}}function sJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",83),o.TgZ(1,"button",84),o.TgZ(2,"span",85),o._uU(3,"Filter by: "),o.qZA(),o.TgZ(4,"span",86),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"ul",87),o.TgZ(7,"li"),o.TgZ(8,"button",88),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).selectedFilterValue("All Folders")}),o._uU(9,"All Folders"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(5),o.Oqu(t.selectedFilter)}}const aJ=function(t){return{active:t}};function cJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",89),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleFavoritesFilter()}),o.O4$(),o.TgZ(1,"svg",43),o._UZ(2,"path",90),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(2,aJ,t.showFavoritesOnly))("tooltip",t.showFavoritesOnly?"Show all":"Show favorites")}}function lJ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openTrashView()}),o.O4$(),o.TgZ(1,"svg",92),o._UZ(2,"path",93),o._UZ(3,"line",94),o.TgZ(4,"g",95),o._UZ(5,"rect",96),o._UZ(6,"path",97),o.qZA(),o._UZ(7,"line",98),o._UZ(8,"line",99),o._UZ(9,"line",100),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("tooltip",t.trashCount>0?"Trash ("+t.trashCount+" item"+(1===t.trashCount?"":"s")+")":"Trash")}}function dJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",75),o.YNc(1,sJ,10,1,"div",76),o.TgZ(2,"div",10),o.YNc(3,cJ,3,4,"button",77),o.TgZ(4,"button",78),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.showTrash?e.openTrashView():e.loadCurrentView()}),o.O4$(),o.TgZ(5,"svg",43),o._UZ(6,"path",79),o._UZ(7,"path",70),o._UZ(8,"path",80),o._UZ(9,"path",81),o.qZA(),o.qZA(),o.YNc(10,lJ,10,1,"button",82),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",!t.showTrash),o.xp6(2),o.Q6J("ngIf",!t.showTrash),o.xp6(7),o.Q6J("ngIf",!t.showTrash)}}function uJ(t,e){1&t&&o._UZ(0,"app-loader")}function pJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",101),o.O4$(),o.TgZ(1,"svg",102),o._UZ(2,"path",90),o.qZA(),o.kcU(),o.TgZ(3,"h4"),o._uU(4,"No favorites yet."),o.qZA(),o.TgZ(5,"p",103),o._uU(6,"Click the star icon on any folder or connect to add it to your favorites."),o.qZA(),o.TgZ(7,"button",104),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleFavoritesFilter()}),o._uU(8," Show All Folders "),o.qZA(),o.qZA()}}function hJ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.ynx(0),o.TgZ(1,"h4"),o._uU(2,"No folders yet."),o.qZA(),o.TgZ(3,"p",103),o._uU(4,"Create folders to organize your connects and workflows efficie
1ntly."),o.qZA(),o.TgZ(5,"button",106),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openNewFolderModal()}),o._uU(6," Create Folder "),o.qZA(),o.BQk()}}function gJ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.ynx(0),o.TgZ(1,"h4"),o._uU(2,"This folder is empty"),o.qZA(),o.TgZ(3,"p",103),o._uU(4,"Move connects here from the My Connects page, or create a subfolder to organize your workflows."),o.qZA(),o.TgZ(5,"button",106),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openNewFolderModal()}),o._uU(6," Create Subfolder "),o.qZA(),o.BQk()}}function fJ(t,e){if(1&t&&(o.TgZ(0,"div",101),o.O4$(),o.TgZ(1,"svg",105),o._UZ(2,"path",54),o.qZA(),o.YNc(3,hJ,7,0,"ng-container",9),o.YNc(4,gJ,7,0,"ng-container",9),o.qZA()),2&t){const t=o.oxw();o.xp6(3),o.Q6J("ngIf",!t.currentFolderId),o.xp6(1),o.Q6J("ngIf",t.currentFolderId)}}function mJ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",125),o._UZ(1,"path",126),o.qZA())}function vJ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",125),o._UZ(1,"path",127),o.qZA())}function bJ(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"Apps"),o.qZA())}function xJ(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"Last modified"),o.qZA())}function _J(t,e){1&t&&(o.TgZ(0,"th"),o._uU(1,"Status"),o.qZA())}function CJ(t,e){if(1&t&&(o.TgZ(0,"tr"),o.TgZ(1,"td",130),o.TgZ(2,"div",131),o._UZ(3,"div",132),o.TgZ(4,"span",133),o._uU(5,"Loading..."),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(2),o.Udp("padding-left",32*t._depth,"px")}}const wJ=function(t){return{"is-favorite":t}};function yJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",134),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).toggleItemSelect("connect",e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",136),o.TgZ(7,"div",137),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).navigateToConnect(e)}),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",140),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).copyConnectId(n.connectId,e)}),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.TgZ(14,"span",142),o.O4$(),o.TgZ(15,"svg",143),o._UZ(16,"path",144),o._UZ(17,"path",145),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"td",146),o.TgZ(19,"span",147),o._uU(20),o.qZA(),o.qZA(),o.TgZ(21,"td",148),o.TgZ(22,"div",10),o.TgZ(23,"button",149),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).toggleFavorite(e,"connect",n.connectId)}),o.O4$(),o.TgZ(24,"svg",150),o._UZ(25,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(26,"div",151),o.TgZ(27,"button",152),o.O4$(),o.TgZ(28,"svg",153),o._UZ(29,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"ul",155),o.TgZ(31,"li"),o.TgZ(32,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).navigateToConnect(e)}),o.O4$(),o.TgZ(33,"svg",156),o._UZ(34,"path",157),o.qZA(),o._uU(35," Open Connect "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(3),o.Q6J("checked",e.isItemSelected("connect",t.connectId)),o.xp6(3),o.Udp("padding-left",32*t._depth,"px"),o.xp6(2),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(6),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(e.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(12,wJ,e.isFavorite("connect",t.connectId)))("tooltip",e.isFavorite("connect",t.connectId)?"Remove from favorites":"Add to favorites"),o.xp6(1),o.uIk("fill",e.isFavorite("connect",t.connectId)?"#f5a623":"none")("stroke",e.isFavorite("connect",t.connectId)?"#f5a623":"currentColor")}}const AJ=function(t){return{expanded:t}};function ZJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",167),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).$implicit;return o.oxw(3).toggleExpand(e,n)}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"polyline",168),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw(3);o.Q6J("ngClass",o.VKq(1,AJ,e.isExpanded(t._id)))}}function kJ(t,e){if(1&t&&(o.TgZ(0,"span",169),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Oqu(t.totalConnectCount||t.connectCount)}
1}function TJ(t,e){1&t&&o._UZ(0,"td")}function OJ(t,e){1&t&&o._UZ(0,"td")}function MJ(t,e){1&t&&o._UZ(0,"td")}function IJ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"li"),o.TgZ(1,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(3).createSubfolder(e)}),o.O4$(),o.TgZ(2,"svg",170),o._UZ(3,"path",18),o.qZA(),o._uU(4," Create Subfolder "),o.qZA(),o.qZA()}}const SJ=function(t){return{"row-selected":t}};function PJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",158),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).toggleItemSelect("folder",e._id)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",159),o.YNc(7,ZJ,3,3,"button",160),o.TgZ(8,"span",161),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).openFolder(e)}),o.O4$(),o.TgZ(9,"svg",162),o._UZ(10,"path",54),o.qZA(),o.qZA(),o.kcU(),o.TgZ(11,"span",163),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).openFolder(e)}),o._uU(12),o.qZA(),o.YNc(13,kJ,2,1,"span",164),o.qZA(),o.qZA(),o.YNc(14,TJ,1,0,"td",9),o.YNc(15,OJ,1,0,"td",9),o.YNc(16,MJ,1,0,"td",9),o.TgZ(17,"td",146),o.TgZ(18,"span",147),o._uU(19),o.qZA(),o.qZA(),o.TgZ(20,"td",148),o.TgZ(21,"div",10),o.TgZ(22,"button",149),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).toggleFavorite(e,"folder",n._id)}),o.O4$(),o.TgZ(23,"svg",150),o._UZ(24,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"div",151),o.TgZ(26,"button",152),o.O4$(),o.TgZ(27,"svg",153),o._UZ(28,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(29,"ul",155),o.TgZ(30,"li"),o.TgZ(31,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).renameFolder(e)}),o.O4$(),o.TgZ(32,"svg",156),o._UZ(33,"path",157),o.qZA(),o._uU(34," Rename "),o.qZA(),o.qZA(),o.YNc(35,IJ,5,0,"li",9),o.kcU(),o.TgZ(36,"li"),o.TgZ(37,"button",165),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).openFolderDeletePopup(e)}),o.O4$(),o.TgZ(38,"svg",166),o._UZ(39,"path",64),o._UZ(40,"path",65),o._UZ(41,"path",66),o._UZ(42,"path",67),o.qZA(),o._uU(43," Delete folder "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.Q6J("ngClass",o.VKq(18,SJ,e.isItemSelected("folder",t._id))),o.xp6(3),o.Q6J("checked",e.isItemSelected("folder",t._id)),o.xp6(3),o.Udp("padding-left",32*t._depth,"px"),o.xp6(1),o.Q6J("ngIf",t._hasChildren),o.xp6(4),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName),o.xp6(1),o.Q6J("ngIf",(t.totalConnectCount||t.connectCount)>0),o.xp6(1),o.Q6J("ngIf",e.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",e.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",e.showFavoritesOnly),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(e.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(20,wJ,e.isFavorite("folder",t._id)))("tooltip",e.isFavorite("folder",t._id)?"Remove from favorites":"Add to favorites"),o.xp6(1),o.uIk("fill",e.isFavorite("folder",t._id)?"#f5a623":"none")("stroke",e.isFavorite("folder",t._id)?"#f5a623":"currentColor"),o.xp6(12),o.Q6J("ngIf",e.canCreateSubfolderForNode(t)&&!e.showFavoritesOnly)}}function NJ(t,e){if(1&t&&(o.ynx(0),o.YNc(1,CJ,6,2,"tr",9),o.YNc(2,yJ,36,14,"tr",128),o.YNc(3,PJ,44,22,"tr",129),o.BQk()),2&t){const t=e.$implicit;o.xp6(1),o.Q6J("ngIf",t._isLoading),o.xp6(1),o.Q6J("ngIf",t._isConnect),o.xp6(1),o.Q6J("ngIf",!t._isConnect&&!t._isLoading)}}function qJ(t,e){if(1&t&&(o.ynx(0),o.YNc(1,NJ,4,3,"ng-container",51),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.pagedFlatTree)}}function UJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",167),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).toggleSubfolderExpand(e,n)}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"polyline",168),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.Q6J("ngClass",o.VKq(1,AJ,e.isExpanded(t._id)))}}function EJ(t,e){if(1&t&&(o.TgZ(0,"span",169),o._uU(1),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Oqu(t.totalConnectCount||t.connectCount)}
1}function FJ(t,e){if(1&t&&(o.TgZ(0,"td",173),o.YNc(1,EJ,2,1,"span",164),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngIf",(t.totalConnectCount||t.connectCount)>0)}}function DJ(t,e){1&t&&o._UZ(0,"td",174)}function LJ(t,e){1&t&&o._UZ(0,"td",174)}function JJ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"li"),o.TgZ(1,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).createSubfolder(e)}),o.O4$(),o.TgZ(2,"svg",170),o._UZ(3,"path",18),o.qZA(),o._uU(4," Create Subfolder "),o.qZA(),o.qZA()}}function jJ(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"tr"),o.TgZ(1,"td",130),o.TgZ(2,"div",175),o._UZ(3,"div",132),o.TgZ(4,"span",133),o._uU(5,"Loading..."),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function RJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",167),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(5).toggleSubfolderExpand(e,n)}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"polyline",168),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.Q6J("ngClass",o.VKq(1,AJ,e.isExpanded(t._id)))}}function $J(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"tr"),o.TgZ(1,"td",130),o.TgZ(2,"div",182),o._UZ(3,"div",132),o.TgZ(4,"span",133),o._uU(5,"Loading..."),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function BJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",167),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(7).toggleSubfolderExpand(e,n)}),o.O4$(),o.TgZ(1,"svg",37),o._UZ(2,"polyline",168),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(7);o.Q6J("ngClass",o.VKq(1,AJ,e.isExpanded(t._id)))}}function HJ(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"tr"),o.TgZ(1,"td",130),o.TgZ(2,"div",184),o._UZ(3,"div",132),o.TgZ(4,"span",133),o._uU(5,"Loading..."),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function QJ(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(9);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.triggerImage,o.LSH)}}function YJ(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(9);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.actionImage,o.LSH)}}const zJ=function(t,e,n){return{"bg-warning":t,"bg-success":e,"bg-secondary":n}};function VJ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",134),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(9).toggleItemSelect("connect",e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",186),o.TgZ(7,"div",137),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(9).navigateToConnect(e)}),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",140),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(9).copyConnectId(n.connectId,e)}),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"td",173),o.TgZ(15,"div",187),o.YNc(16,QJ,2,1,"div",188),o.YNc(17,YJ,2,1,"div",188),o.qZA(),o.qZA(),o.TgZ(18,"td",178),o.TgZ(19,"span",133),o._uU(20),o.ALo(21,"date"),o.qZA(),o.qZA(),o.TgZ(22,"td",179),o.TgZ(23,"span",189),o._uU(24),o.qZA(),o.qZA(),o.TgZ(25,"td",146),o.TgZ(26,"span",147),o._uU(27),o.qZA(),o.qZA(),o.TgZ(28,"td",148),o.TgZ(29,"div",10),o.TgZ(30,"button",180),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(9).toggleFavorite(e,"connect",n.connectId)}),o.O4$(),o.TgZ(31,"svg",150),o._UZ(32,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(33,"div",151),o.TgZ(34,"button",152),o.O4$(),o.TgZ(35,"svg",153),o._UZ(36,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(37,"ul",155),o.TgZ(38,"li"),o.TgZ(39,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(9).navigateToConnect(e)}),o._uU(40,"Open Connect"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(9);o.xp6(3),o.Q6J("checked",n.isItemSelected("connect",t.connectId)),o.xp6(5),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(3),o.Q6J("ngIf",t.triggerImage),o.xp6(1),o.Q6J("ngIf",t.actionImage),o.xp6(3),o.Oqu(o.xi3(21,14,t._updated_at,"MMM d, yyyy")),o.xp6(3),o.Q6J("ngClass",o.kEZ(17,zJ,"Draft"===t.connectStatus,"Draft"!==t.connectStatus&&1===t.status,"Draft"!==t.connectStatus&&1!==t.status)),o.xp6(1),o.hij(" ","Draft"===t.connectStatus?"Draft":1===t.status?"Active":"Inactive"," "),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(21,wJ,n.isFavorite("connect",t.connectId))),o.xp6(1),o.uIk("fill",n.isFavorite("connect",t.connectId)?"#f5a623":"none")("stroke",n.isFavorite("connect",t.connectId)?"#f5a623":"currentColor")}}
1function GJ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,VJ,41,23,"tr",185),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(7);o.xp6(1),o.Q6J("ngForOf",e.expandedFolderConnects[t._id])}}function WJ(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"tr",176),o.TgZ(2,"td"),o.TgZ(3,"label",111),o.TgZ(4,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(7).toggleItemSelect("folder",e._id)}),o.qZA(),o._UZ(5,"span",113),o.qZA(),o.qZA(),o.TgZ(6,"td",135),o.TgZ(7,"div",183),o.YNc(8,BJ,3,3,"button",160),o.TgZ(9,"span",161),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(7).openFolder(e)}),o.O4$(),o.TgZ(10,"svg",162),o._UZ(11,"path",54),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"span",163),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(7).openFolder(e)}),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o._UZ(14,"td",173),o._UZ(15,"td",178),o._UZ(16,"td",179),o.TgZ(17,"td",146),o.TgZ(18,"span",147),o._uU(19),o.qZA(),o.qZA(),o.TgZ(20,"td",148),o.TgZ(21,"div",10),o.TgZ(22,"button",180),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(7).toggleFavorite(e,"folder",n._id)}),o.O4$(),o.TgZ(23,"svg",150),o._UZ(24,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"div",151),o.TgZ(26,"button",152),o.O4$(),o.TgZ(27,"svg",153),o._UZ(28,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(29,"ul",155),o.TgZ(30,"li"),o.TgZ(31,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(7).openFolder(e)}),o.O4$(),o.TgZ(32,"svg",181),o._UZ(33,"path",54),o.qZA(),o._uU(34," Open Folder "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(35,HJ,6,0,"tr",9),o.YNc(36,GJ,2,1,"ng-container",9),o.BQk()}if(2&t){const t=e.$implicit,n=o.oxw(7);o.xp6(4),o.Q6J("checked",n.isItemSelected("folder",t._id)),o.xp6(4),o.Q6J("ngIf",n.isSubfolderExpandable(t._id)),o.xp6(4),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName),o.xp6(5),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(11,wJ,n.isFavorite("folder",t._id))),o.xp6(1),o.uIk("fill",n.isFavorite("folder",t._id)?"#f5a623":"none")("stroke",n.isFavorite("folder",t._id)?"#f5a623":"currentColor"),o.xp6(12),o.Q6J("ngIf",n.isFolderLoading(t._id)),o.xp6(1),o.Q6J("ngIf",n.isExpanded(t._id)&&n.expandedFolderConnects[t._id])}}function KJ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,WJ,37,13,"ng-container",51),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",e.expandedSubfolders[t._id])}}function XJ(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(7);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.triggerImage,o.LSH)}}function tj(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(7);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.actionImage,o.LSH)}}function ej(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",134),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(7).toggleItemSelect("connect",e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",192),o.TgZ(7,"div",137),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(7).navigateToConnect(e)}),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",140),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(7).copyConnectId(n.connectId,e)}),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"td",173),o.TgZ(15,"div",187),o.YNc(16,XJ,2,1,"div",188),o.YNc(17,tj,2,1,"div",188),o.qZA(),o.qZA(),o.TgZ(18,"td",178),o.TgZ(19,"span",133),o._uU(20),o.ALo(21,"date"),o.qZA(),o.qZA(),o.TgZ(22,"td",179),o.TgZ(23,"span",189),o._uU(24),o.qZA(),o.qZA(),o.TgZ(25,"td",146),o.TgZ(26,"span",147),o._uU(27),o.qZA(),o.qZA(),o.TgZ(28,"td",148),o.TgZ(29,"div",10),o.TgZ(30,"button",180),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(7).toggleFavorite(e,"connect",n.connectId)}),o.O4$(),o.TgZ(31,"svg",150),o._UZ(32,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(33,"div",151),o.TgZ(34,"button",152),o.O4$(),o.TgZ(35,"svg",153),o._UZ(36,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(37,"ul",155),o.TgZ(38,"li"),o.TgZ(39,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(7).navigateToConnect(e)}),o._uU(40,"Open Connect"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(7);o.xp6(3),o.Q6J("checked",n.isItemSelected("connect",t.connectId)),o.xp6(5),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(3),o.Q6J("ngIf",t.triggerImage),o.xp6(1),o.Q6J("ngIf",t.actionImage),o.xp6(3),o.Oqu(o.xi3(21,14,t._updated_at,"MMM d, yyyy")),o.xp6(3),o.Q6J("ngClass",o.kEZ(17,zJ,"Draft"===t.connectStatus,"Draft"!==t.connectStatus&&1===t.status,"Draft"!==t.connectStatus&&1!==t.status)),o.xp6(1),o.hij(" ","Draft"===t.connectStatus?"Draft":1===t.status?"Active":"Inactive"," "),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(21,wJ,n.isFavorite("connect",t.connectId))),o.xp6(1),o.uIk("fill",n.isFavorite("connect",t.connectId)?"#f5a623":"none")("stroke",n.isFavorite("connect",t.connectId)?"#f5a623":"currentColor")}}
1function nj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,ej,41,23,"tr",185),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",e.expandedFolderConnects[t._id])}}function ij(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"tr",176),o.TgZ(2,"td"),o.TgZ(3,"label",111),o.TgZ(4,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(5).toggleItemSelect("folder",e._id)}),o.qZA(),o._UZ(5,"span",113),o.qZA(),o.qZA(),o.TgZ(6,"td",135),o.TgZ(7,"div",177),o.YNc(8,RJ,3,3,"button",160),o.TgZ(9,"span",161),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).openFolder(e)}),o.O4$(),o.TgZ(10,"svg",162),o._UZ(11,"path",54),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"span",163),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).openFolder(e)}),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o._UZ(14,"td",173),o._UZ(15,"td",178),o._UZ(16,"td",179),o.TgZ(17,"td",146),o.TgZ(18,"span",147),o._uU(19),o.qZA(),o.qZA(),o.TgZ(20,"td",148),o.TgZ(21,"div",10),o.TgZ(22,"button",180),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(5).toggleFavorite(e,"folder",n._id)}),o.O4$(),o.TgZ(23,"svg",150),o._UZ(24,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"div",151),o.TgZ(26,"button",152),o.O4$(),o.TgZ(27,"svg",153),o._UZ(28,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(29,"ul",155),o.TgZ(30,"li"),o.TgZ(31,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).openFolder(e)}),o.O4$(),o.TgZ(32,"svg",181),o._UZ(33,"path",54),o.qZA(),o._uU(34," Open Folder "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(35,$J,6,0,"tr",9),o.YNc(36,KJ,2,1,"ng-container",9),o.YNc(37,nj,2,1,"ng-container",9),o.BQk()}if(2&t){const t=e.$implicit,n=o.oxw(5);o.xp6(4),o.Q6J("checked",n.isItemSelected("folder",t._id)),o.xp6(4),o.Q6J("ngIf",n.isSubfolderExpandable(t._id)),o.xp6(4),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName),o.xp6(5),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(12,wJ,n.isFavorite("folder",t._id))),o.xp6(1),o.uIk("fill",n.isFavorite("folder",t._id)?"#f5a623":"none")("stroke",n.isFavorite("folder",t._id)?"#f5a623":"currentColor"),o.xp6(12),o.Q6J("ngIf",n.isFolderLoading(t._id)),o.xp6(1),o.Q6J("ngIf",n.isExpanded(t._id)&&n.expandedSubfolders[t._id]),o.xp6(1),o.Q6J("ngIf",n.isExpanded(t._id)&&n.expandedFolderConnects[t._id])}}function oj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,ij,38,14,"ng-container",51),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.expandedSubfolders[t._id])}}function rj(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.triggerImage,o.LSH)}}function sj(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(5);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.actionImage,o.LSH)}}function aj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",134),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(5).toggleItemSelect("connect",e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",193),o.TgZ(7,"div",137),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).navigateToConnect(e)}),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",140),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(5).copyConnectId(n.connectId,e)}),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.TgZ(14,"span",142),o.O4$(),o.TgZ(15,"svg",143),o._UZ(16,"path",144),o._UZ(17,"path",145),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"td",173),o.TgZ(19,"div",187),o.YNc(20,rj,2,1,"div",188),o.YNc(21,sj,2,1,"div",188),o.qZA(),o.qZA(),o.TgZ(22,"td",178),o.TgZ(23,"span",133),o._uU(24),o.ALo(25,"date"),o.qZA(),o.qZA(),o.TgZ(26,"td",179),o.TgZ(27,"span",189),o._uU(28),o.qZA(),o.qZA(),o.TgZ(29,"td",146),o.TgZ(30,"span",147),o._uU(31),o.qZA(),o.qZA(),o.TgZ(32,"td",148),o.TgZ(33,"div",10),o.TgZ(34,"button",180),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(5).toggleFavorite(e,"connect",n.connectId)}),o.O4$(),o.TgZ(35,"svg",150),o._UZ(36,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(37,"div",151),o.TgZ(38,"button",152),o.O4$(),o.TgZ(39,"svg",153),o._UZ(4
10,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(41,"ul",155),o.TgZ(42,"li"),o.TgZ(43,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(5).navigateToConnect(e)}),o.O4$(),o.TgZ(44,"svg",156),o._UZ(45,"path",157),o.qZA(),o._uU(46," Open Connect "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(5);o.xp6(3),o.Q6J("checked",n.isItemSelected("connect",t.connectId)),o.xp6(5),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(7),o.Q6J("ngIf",t.triggerImage),o.xp6(1),o.Q6J("ngIf",t.actionImage),o.xp6(3),o.Oqu(o.xi3(25,14,t._updated_at,"MMM d, yyyy")),o.xp6(3),o.Q6J("ngClass",o.kEZ(17,zJ,"Draft"===t.connectStatus,"Draft"!==t.connectStatus&&1===t.status,"Draft"!==t.connectStatus&&1!==t.status)),o.xp6(1),o.hij(" ","Draft"===t.connectStatus?"Draft":1===t.status?"Active":"Inactive"," "),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(21,wJ,n.isFavorite("connect",t.connectId))),o.xp6(1),o.uIk("fill",n.isFavorite("connect",t.connectId)?"#f5a623":"none")("stroke",n.isFavorite("connect",t.connectId)?"#f5a623":"currentColor")}}function cj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,aj,47,23,"tr",185),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",e.expandedFolderConnects[t._id])}}function lj(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"tr",158),o.TgZ(2,"td"),o.TgZ(3,"label",111),o.TgZ(4,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(3).toggleItemSelect("folder",e._id)}),o.qZA(),o._UZ(5,"span",113),o.qZA(),o.qZA(),o.TgZ(6,"td",135),o.TgZ(7,"div",159),o.YNc(8,UJ,3,3,"button",160),o.TgZ(9,"span",161),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).openFolder(e)}),o.O4$(),o.TgZ(10,"svg",162),o._UZ(11,"path",54),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"span",163),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).openFolder(e)}),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.YNc(14,FJ,2,1,"td",171),o.YNc(15,DJ,1,0,"td",172),o.YNc(16,LJ,1,0,"td",172),o.TgZ(17,"td",146),o.TgZ(18,"span",147),o._uU(19),o.qZA(),o.qZA(),o.TgZ(20,"td",148),o.TgZ(21,"div",10),o.TgZ(22,"button",149),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(3).toggleFavorite(e,"folder",n._id)}),o.O4$(),o.TgZ(23,"svg",150),o._UZ(24,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"div",151),o.TgZ(26,"button",152),o.O4$(),o.TgZ(27,"svg",153),o._UZ(28,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(29,"ul",155),o.TgZ(30,"li"),o.TgZ(31,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).renameFolder(e)}),o.O4$(),o.TgZ(32,"svg",156),o._UZ(33,"path",157),o.qZA(),o._uU(34," Rename "),o.qZA(),o.qZA(),o.YNc(35,JJ,5,0,"li",9),o.kcU(),o.TgZ(36,"li"),o.TgZ(37,"button",165),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).openFolderDeletePopup(e)}),o.O4$(),o.TgZ(38,"svg",166),o._UZ(39,"path",64),o._UZ(40,"path",65),o._UZ(41,"path",66),o._UZ(42,"path",67),o.qZA(),o._uU(43," Delete folder "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(44,jJ,6,0,"tr",9),o.YNc(45,oj,2,1,"ng-container",9),o.YNc(46,cj,2,1,"ng-container",9),o.BQk()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(18,SJ,n.isItemSelected("folder",t._id))),o.xp6(3),o.Q6J("checked",n.isItemSelected("folder",t._id)),o.xp6(4),o.Q6J("ngIf",n.isSubfolderExpandable(t._id)),o.xp6(4),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName),o.xp6(1),o.Q6J("ngIf",n.currentFolderId),o.xp6(1),o.Q6J("ngIf",n.currentFolderId),o.xp6(1),o.Q6J("ngIf",n.currentFolderId),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(20,wJ,n.isFavorite("folder",t._id)))("tooltip",n.isFavorite("folder",t._id)?"Remove from favorites":"Add to favorites"),o.xp6(1),o.uIk("fill",n.isFavorite("folder",t._id)?"#f5a623":"none")("stroke",n.isFavorite("folder",t._id)?"#f5a623":"currentColor"),o.xp6(12),o.Q6J("ngIf",!n.showFavoritesOnly),o.xp6(9),o.Q6J("ngIf",n.isFolderLoading(t._id)),o.xp6(1),o.Q6J("ngIf",n.isExpanded(t._id)&&n.expandedSubfolders[t._id]),o.xp6(1),o.Q6J("ngIf",n.isExpanded(t._id)&&n.expandedFolderConnects[t._id])}}
1function dj(t,e){if(1&t&&(o.ynx(0),o.YNc(1,lj,47,22,"ng-container",51),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.pagedChildFolders)}}function uj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",204),o.O4$(),o.TgZ(1,"svg",205),o._UZ(2,"path",54),o.qZA(),o.kcU(),o.TgZ(3,"span",206),o._uU(4),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.xp6(4),o.Oqu(e.folderNameMap[t.folderId])}}function pj(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(2);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.triggerImage,o.LSH)}}function hj(t,e){if(1&t&&(o.TgZ(0,"div",190),o._UZ(1,"img",191),o.qZA()),2&t){const t=o.oxw(2).$implicit,e=o.oxw(2);o.xp6(1),o.Q6J("src",e.appConfig.cdnMediaPath+t.actionImage,o.LSH)}}function gj(t,e){if(1&t&&(o.TgZ(0,"span",212),o._uU(1),o.qZA()),2&t){const t=o.oxw(3).$implicit;o.xp6(1),o.hij("+",t.totalApp-2,"")}}function fj(t,e){if(1&t&&o._UZ(0,"img",191),2&t){const t=o.oxw(3).$implicit,e=o.oxw(2);o.Q6J("src",e.appConfig.cdnMediaPath+t.lastActionImage,o.LSH)}}function mj(t,e){if(1&t&&(o.TgZ(0,"div",209),o.YNc(1,gj,2,1,"span",210),o.YNc(2,fj,1,1,"img",211),o.qZA()),2&t){const t=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf",t.totalApp>3),o.xp6(1),o.Q6J("ngIf",3===t.totalApp)}}function vj(t,e){1&t&&(o.TgZ(0,"span",213),o.O4$(),o.TgZ(1,"svg",162),o._UZ(2,"path",214),o._UZ(3,"path",215),o.qZA(),o.qZA())}function bj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"td",173),o.TgZ(1,"div",187),o.YNc(2,pj,2,1,"div",188),o.YNc(3,hj,2,1,"div",188),o.YNc(4,mj,3,2,"div",207),o.YNc(5,vj,4,0,"span",208),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(2),o.Q6J("ngIf",t.triggerImage),o.xp6(1),o.Q6J("ngIf",t.actionImage),o.xp6(1),o.Q6J("ngIf",t.lastActionImage&&t.totalApp>2),o.xp6(1),o.Q6J("ngIf",!t.triggerImage&&!t.actionImage)}}function xj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"td",178),o.TgZ(1,"span",133),o._uU(2),o.ALo(3,"date"),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(2),o.Oqu(o.xi3(3,1,t._updated_at,"MMM d, yyyy"))}}function _j(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"td",179),o.TgZ(1,"span",189),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngClass",o.kEZ(2,zJ,"Draft"===t.connectStatus,"Draft"!==t.connectStatus&&1===t.status,"Draft"!==t.connectStatus&&1!==t.status)),o.xp6(1),o.hij(" ","Draft"===t.connectStatus?"Draft":1===t.status?"Active":"Inactive"," ")}}function Cj(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"li"),o.TgZ(1,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(2).removeFavoriteConnect(e)}),o.O4$(),o.TgZ(2,"svg",216),o._UZ(3,"polygon",49),o.qZA(),o._uU(4," Remove from Favorites "),o.qZA(),o.qZA()}}function wj(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"li"),o.TgZ(1,"button",124),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(2).removeConnectFromFolder(e)}),o.O4$(),o.TgZ(2,"svg",181),o._UZ(3,"path",217),o._UZ(4,"path",218),o.qZA(),o._uU(5," Remove from folder "),o.qZA(),o.qZA()}}function yj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",194),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(2).toggleItemSelect("connect",e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",136),o.TgZ(7,"div",137),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).navigateToConnect(e)}),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",140),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).copyConnectId(n.connectId,e)}),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.TgZ(14,"span",142),o.O4$(),o.TgZ(15,"svg",143),o._UZ(16,"path",144),o._UZ(17,"path",145),o.qZA(),o.qZA(),o.qZA(),o.YNc(18,uj,5,1,"div",195),o.qZA(),o.qZA(),o.YNc(19,bj,6,4,"td",171),o.YNc(20,xj,4,4,"td",196),o.YNc(21,_j,3,6,"td",197),o.kcU(),o.TgZ(22,"td",146),o.TgZ(23,"span",147),o._uU(24),o.qZA(),o.qZA(),o.TgZ(25,"td",148),o.TgZ(26,"div",10),o.TgZ(27,"button",149),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).toggleFavorite(e,"connect",n.connectId)}),o.O4$(),o.TgZ(28,"svg",150),o._UZ(29,"polygon",49),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"div",151),o.TgZ(31,"button",152),o.O4$(),o.TgZ(32,"svg",153),o._UZ(33,"path",154),o.qZA(),o.qZA(),o.kcU(),o.TgZ(34,"ul",155),o.TgZ(35,"li"),o.TgZ(36,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).navigateToConnect(e)}),o.O4$(),o.TgZ(37,"svg",156),o._UZ(38,"path",157),o.qZA(),o._uU(39," Open Connect "),o.qZA(),o.qZA(),o.kcU(),o.TgZ(40,"li"),o.TgZ(41,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).moveConnectToFolder(e)}),o.O4$(),o.TgZ(42,"svg",198),o._UZ(43,"path",199),o._UZ(44,"path",200),o._UZ(45,"path",201),o.qZA(),o._uU(46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(47,"li"),o.TgZ(48,"button",124),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).duplicateConnect(e)}),o.O4$(),o.TgZ(49,"svg",181),o._UZ(50,"rect",202),o._UZ(51,"path",203),o.qZA(),o._uU(52," Duplicate "),o.qZA(),o.qZA(),o.YNc(53,Cj,5,0,"li",9),o.YNc(54,wj,6,0,"li",9),o.kcU(),o.TgZ(55,"li"),o.TgZ(56,"button",165),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).deleteConnect(e)}),o.O4$(),o.TgZ(57,"svg",166),o._UZ(58,"path",64),o._UZ(59,"path",65),o._UZ(60,"path",66),o._UZ(61,"path",67),o.qZA(),o._uU(62," Delete Connect "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.Q6J("ngClass",o.VKq(18,SJ,n.isItemSelected("connect",t.connectId))),o.xp6(3),o.Q6J("checked",n.isItemSelected("connect",t.connectId)),o.xp6(5),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(5),o.Q6J("ngIf",!n.currentFolderId&&n.folderSearchTxt&&t.folderId&&n.folderNameMap[t.folderId]),o.xp6(1),o.Q6J("ngIf",n.currentFolderId||n.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",n.currentFolderId||n.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",n.currentFolderId||n.showFavoritesOnly),o.xp6(2),o.Q6J("title",t.ownerName||""),o.xp6(1),o.Oqu(n.getOwnerInitials(t)),o.xp6(3),o.Q6J("ngClass",o.VKq(20,wJ,n.isFavorite("connect",t.connectId)))("tooltip",n.isFavorite("connect",t.connectId)?"Remove from favorites":"Add to favorites"),o.xp6(1),o.uIk("fill",n.isFavorite("connect",t.connectId)?"#f5a623":"none")("stroke",n.isFavorite("connect",t.connectId)?"#f5a623":"currentColor"),o.xp6(18),o.hij(" ",n.currentFolderId?"Move to another folder":"Move to folder"," "),o.xp6(7),o.Q6J("ngIf",n.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",!n.showFavoritesOnly)}}function Aj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",107),o.TgZ(1,"table",108),o.TgZ(2,"thead",109),o.TgZ(3,"tr"),o.TgZ(4,"th",110),o.TgZ(5,"label",111),o.TgZ(6,"input",112),o.NdJ("change",function(){return o.CHM(t),o.oxw().toggleSelectAll()}),o.qZA(),o._UZ(7,"span",113),o.qZA(),o.qZA(),o.TgZ(8,"th",114),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleSort()}),o._uU(9," Name "),o.YNc(10,mJ,2,0,"svg",115),o.YNc(11,vJ,2,0,"svg",115),o.qZA(),o.YNc(12,bJ,2,0,"th",9),o.YNc(13,xJ,2,0,"th",9),o.YNc(14,_J,2,0,"th",9),o.TgZ(15,"th",116),o._uU(16,"Owner"),o.qZA(),o.TgZ(17,"th",117),o._uU(18,"Actions"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(19,"tbody"),o.YNc(20,qJ,2,1,"ng-container",9),o.YNc(21,dj,2,1,"ng-container",9),o.YNc(22,yj,63,22,"tr",118),o.qZA(),o.qZA(),o.TgZ(23,"div",119),o.TgZ(24,"span",120),o._uU(25),o.qZA(),o.TgZ(26,"div",121),o.TgZ(27,"button",122),o._uU(28),o.qZA(),o.TgZ(29,"ul",123),o.TgZ(30,"li"),o.TgZ(31,"button",124),o.NdJ("click",function(){return o.CHM(t),o.oxw().onPerPageChange(10)}),o._uU(32,"10 per page"),o.qZA(),o.qZA(),o.TgZ(33,"li"),o.TgZ(34,"button",124),o.NdJ("click",function(){return o.CHM(t),o.oxw().onPerPageChange(25)}),o._uU(35,"25 per page"),o.qZA(),o.qZA(),o.TgZ(36,"li"),o.TgZ(37,"button",124),o.NdJ("click",function(){return o.CHM(t),o.oxw().onPerPageChange(50)}),o._uU(38,"50 per page"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(6),o.Q6J("checked",t.selectAll),o.xp6(4),o.Q6J("ngIf",t.sortAsc),o.xp6(1),o.Q6J("ngIf",!t.sortAsc),o.xp6(1),o.Q6J("ngIf",t.currentFolderId||t.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",t.currentFolderId||t.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",t.currentFolderId||t.showFavoritesOnly),o.xp6(6),o.Q6J("ngIf",!t.currentFolderId),o.xp6(1),o.Q6J("ngIf",t.currentFolderId),o.xp6(1),o.Q6J("ngForOf",t.pagedFolderConnects),o.xp6(3),o.lnq(" ",t.paginationStart," \u2013 ",t.paginationEnd," of ",t.totalItems," "),o.xp6(3),o.hij(" ",t.perPage," per page ")}}function Zj(t,e){1&t&&o._UZ(0,"app-loader")}function kj(t,e){1&t&&(o.TgZ(0,"div",228),o.TgZ(1,"div",229),o.O4$(),o.TgZ(2,"svg",230),o._UZ(3,"path",44),o._UZ(4,"path",45),o._UZ(5,"path",46),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"p",231),o._uU(7,"Trash is empty"),o.qZA(),o.TgZ(8,"p",232),o._uU(9,"Deleted connects and folders will appear here for 30 days."),o.qZA(),o.qZA())}function Tj(t,e){1&t&&(o.TgZ(0,"div",228),o.TgZ(1,"p",231),o._uU(2,"No matching items in Trash"),o.qZA(),o.TgZ(3,"p",232),o._uU(4,"Try a different search term."),o.qZA(),o.qZA())}function Oj(t,e){1&t&&o._UZ(0,"span",244)}function Mj(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",245),o._UZ(1,"path",69),o._UZ(2,"path",70),o.qZA())}function Ij(t,e){1&t&&o._UZ(0,"span",244)}function Sj(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",245),o._UZ(1,"path",44),o._UZ(2,"path",45),o._UZ(3,"path",46),o.qZA())}const Pj=function(t,e){return{"trash-days-urgent":t,"trash-days-warning":e}};function Nj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",176),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(3).toggleTrashItem("folder_"+e._id)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",10),o.O4$(),o.TgZ(7,"svg",162),o._UZ(8,"path",54),o.qZA(),o.kcU(),o.TgZ(9,"span",235),o._uU(10),o.qZA(),o.TgZ(11,"span",236),o._uU(12,"Folder"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"td",237),o.TgZ(14,"span",133),o._uU(15),o.ALo(16,"date"),o.qZA(),o.qZA(),o.TgZ(17,"td",238),o.TgZ(18,"span",239),o._uU(19),o.qZA(),o.qZA(),o.TgZ(20,"td",148),o.TgZ(21,"div",10),o.TgZ(22,"button",240),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).restoreFolder(e)}),o.YNc(23,Oj,1,0,"span",241),o.YNc(24,Mj,3,0,"svg",242),o._uU(25),o.qZA(),o.TgZ(26,"button",243),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).permanentDeleteFolderItem(e)}),o.YNc(27,Ij,1,0,"span",241),o.YNc(28,Sj,4,0,"svg",242),o._uU(29),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(3),o.Q6J("checked",n.selectedTrashItems.has("folder_"+t._id)),o.xp6(6),o.Q6J("title",t.folderName),o.xp6(1),o.Oqu(t.folderName),o.xp6(5),o.Oqu(o.xi3(16,15,t.deletedAt,"MMM d, yyyy")),o.xp6(3),o.Q6J("ngClass",o.WLB(18,Pj,n.daysUntilPurge(t.deletedAt)<=5,n.daysUntilPurge(t.deletedAt)>5&&n.daysUntilPurge(t.deletedAt)<=10)),o.xp6(1),o.AsE(" ",n.daysUntilPurge(t.deletedAt)," day",1===n.daysUntilPurge(t.deletedAt)?"":"s"," left "),o.xp6(3),o.Q6J("disabled",t._restoring||t._deleting),o.xp6(1),o.Q6J("ngIf",t._restoring),o.xp6(1),o.Q6J("ngIf",!t._restoring),o.xp6(1),o.hij(" ",t._restoring?"Restoring...":"Restore"," "),o.xp6(1),o.Q6J("disabled",t._restoring||t._deleting),o.xp6(1),o.Q6J("ngIf",t._deleting),o.xp6(1),o.Q6J("ngIf",!t._deleting),o.xp6(1),o.hij(" ",t._deleting?"Deleting...":"Delete"," ")}}function qj(t,e){1&t&&o._UZ(0,"span",244)}function Uj(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",245),o._UZ(1,"path",69),o._UZ(2,"path",70),o.qZA())}function Ej(t,e){1&t&&o._UZ(0,"span",244)}function Fj(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",245),o._UZ(1,"path",44),o._UZ(2,"path",45),o._UZ(3,"path",46),o.qZA())}function Dj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",134),o.TgZ(1,"td"),o.TgZ(2,"label",111),o.TgZ(3,"input",112),o.NdJ("change",function(){const e=o.CHM(t).$implicit;return o.oxw(3).toggleTrashItem("connect_"+e.connectId)}),o.qZA(),o._UZ(4,"span",113),o.qZA(),o.qZA(),o.TgZ(5,"td",135),o.TgZ(6,"div",136),o.TgZ(7,"div",246),o.TgZ(8,"span",138),o.TgZ(9,"a",139),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",247),o.TgZ(12,"span",141),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"td",237),o.TgZ(15,"span",133),o._uU(16),o.ALo(17,"date"),o.qZA(),o.qZA(),o.TgZ(18,"td",238),o.TgZ(19,"span",239),o._uU(20),o.qZA(),o.qZA(),o.TgZ(21,"td",148),o.TgZ(22,"div",10),o.TgZ(23,"button",240),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).restoreConnect(e)}),o.YNc(24,qj,1,0,"span",241),o.YNc(25,Uj,3,0,"svg",242),o._uU(26),o.qZA(),o.TgZ(27,"button",243),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).permanentDeleteConnect(e)}),o.YNc(28,Ej,1,0,"span",241),o.YNc(29,Fj,4,0,"svg",242),o._uU(30),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.xp6(3),o.Q6J("checked",n.selectedTrashItems.has("connect_"+t.connectId)),o.xp6(5),o.uIk("data-tooltip",t.connectTitle||t.connectId),o.xp6(2),o.Oqu(t.connectTitle||t.connectId),o.xp6(3),o.Oqu(t.connectId),o.xp6(3),o.Oqu(o.xi3(17,16,t.deletedAt,"MMM d, yyyy")),o.xp6(3),o.Q6J("ngClass",o.WLB(19,Pj,n.daysUntilPurge(t.deletedAt)<=5,n.daysUntilPurge(t.deletedAt)>5&&n.daysUntilPurge(t.deletedAt)<=10)),o.xp6(1),o.AsE(" ",n.daysUntilPurge(t.deletedAt)," day",1===n.daysUntilPurge(t.deletedAt)?"":"s"," left "),o.xp6(3),o.Q6J("disabled",t._restoring||t._deleting),o.xp6(1),o.Q6J("ngIf",t._restoring),o.xp6(1),o.Q6J("ngIf",!t._restoring),o.xp6(1),o.hij(" ",t._restoring?"Restoring...":"Restore"," "),o.xp6(1),o.Q6J("disabled",t._restoring||t._deleting),o.xp6(1),o.Q6J("ngIf",t._deleting),o.xp6(1),o.Q6J("ngIf",!t._deleting),o.xp6(1),o.hij(" ",t._deleting?"Deleting...":"Delete"," ")}}function Lj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",233),o.TgZ(1,"table",108),o.TgZ(2,"thead",109),o.TgZ(3,"tr"),o.TgZ(4,"th",110),o.TgZ(5,"label",111),o.TgZ(6,"input",112),o.NdJ("change",function(){return o.CHM(t),o.oxw(2).toggleTrashSelectAll()}),o.qZA(),o._UZ(7,"span",113),o.qZA(),o.qZA(),o.TgZ(8,"th"),o._uU(9,"Name"),o.qZA(),o.TgZ(10,"th"),o._uU(11,"Deleted"),o.qZA(),o.TgZ(12,"th"),o._uU(13,"Expires"),o.qZA(),o.TgZ(14,"th",117),o._uU(15,"Actions"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"tbody"),o.YNc(17,Nj,30,21,"tr",234),o.YNc(18,Dj,31,22,"tr",185),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("checked",t.trashSelectAll),o.xp6(11),o.Q6J("ngForOf",t.filteredTrashFolders),o.xp6(1),o.Q6J("ngForOf",t.filteredTrashConnects)}}
1function Jj(t,e){if(1&t&&(o.TgZ(0,"div",219),o.TgZ(1,"div",220),o.O4$(),o.TgZ(2,"svg",221),o._UZ(3,"circle",222),o._UZ(4,"path",223),o._UZ(5,"path",224),o.qZA(),o.kcU(),o.TgZ(6,"span",225),o._uU(7,"Items in Trash are permanently deleted after "),o.TgZ(8,"strong"),o._uU(9,"30 days"),o.qZA(),o._uU(10,". You can restore them anytime before that."),o.qZA(),o.qZA(),o.YNc(11,Zj,1,0,"app-loader",9),o.YNc(12,kj,10,0,"div",226),o.YNc(13,Tj,5,0,"div",226),o.YNc(14,Lj,19,3,"div",227),o.qZA()),2&t){const t=o.oxw();o.xp6(11),o.Q6J("ngIf",t.isLoading),o.xp6(1),o.Q6J("ngIf",!t.isLoading&&0===t.trashConnects.length&&0===t.trashFolders.length),o.xp6(1),o.Q6J("ngIf",!t.isLoading&&(t.trashConnects.length>0||t.trashFolders.length>0)&&0===t.filteredTrashFolders.length&&0===t.filteredTrashConnects.length),o.xp6(1),o.Q6J("ngIf",!t.isLoading&&(t.filteredTrashConnects.length>0||t.filteredTrashFolders.length>0))}}const jj=function(t){return{open:t}};let Rj=(()=>{class t{constructor(t,e,n,i,o,r,s){this.modalService=t,this.commonService=e,this.folderService=n,this.customerConnectService=i,this.dataService=o,this.router=r,this.route=s,this.appConfig=go.N,this.isMenuBarActive=!0,this.folderSearchTxt="",this.selectedFilter="All Folders",this.perPage=10,this.currentPage=1,this.isLoading=!0,this.currentFolderId=null,this.currentFolder=null,this.breadcrumbs=[],this.childFolders=[],this.folderConnects=[],this.totalItems=0,this.sortAsc=!0,this.sortByName=!1,this.selectedItems=new Set,this.selectAll=!1,this.favoriteIds=new Set,this.showFavoritesOnly=!1,this.expandedFolders=new Set,this.flattenedTree=[],this.folderNameMap={},this.searchConnectsByFolder={},this.expandedFolderConnects={},this.expandedSubfolders={},this.showTrash=!1,this.trashConnects=[],this.trashFolders=[],this.trashSearchTxt="",this.trashCount=0,this.selectedTrashItems=new Set,this.trashSelectAll=!1,this.isBulkRestoring=!1,this.isBulkDeleting=!1,this.emptyFolders=new Set,this.loadingFolders=new Set}ngOnInit(){this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),this.loadFavorites(),this.loadTrashCount(),this.route.params.subscribe(t=>{this.currentFolderId=t.folderId||null,this.selectedItems.clear(),this.selectAll=!1,this.folderSearchTxt="",this.showFavoritesOnly=!1,this.expandedFolderConnects={},this.expandedSubfolders={},this.expandedFolders.clear(),this.emptyFolders.clear(),this.loadCurrentView()}),this.folderChangedSub=this.folderService.folderChanged$.subscribe(()=>{this.loadCurrentView(),this.loadFavorites(),this.loadTrashCount()})}ngOnDestroy(){this.searchSub&&this.searchSub.unsubscribe(),this.folderChangedSub&&this.folderChangedSub.unsubscribe()}loadCurrentView(){this.isLoading=!0,this.childFolders=[],this.folderConnects=[],this.flattenedTree=[],this.totalItems=0,this.currentFolderId?(0,qo.D)({folderInfo:this.folderService.getFolderById(this.currentFolderId),children:this.folderService.getFolders({searchTXT:this.folderSearchTxt,parentFolderId:this.currentFolderId,pageSize:100}),connects:this.folderService.getConnectsByFolder(this.currentFolderId),tree:this.folderService.getFolderTree()}).subscribe(t=>{const e=t.tree&&t.tree.success&&t.tree.tree||[];if(t.folderInfo&&t.folderInfo.success&&t.folderInfo.folder&&(this.currentFolder=t.folderInfo.folder,this.breadcrumbs=this.buildBreadcrumbsFromTree(e,this.currentFolderId)),this.markEmptyFolders(e),t.children&&t.children.success){let e=t.children.folders||[];this.showFavoritesOnly&&(e=e.filter(t=>this.isFavorite("folder",t._id))),this.childFolders=e}if(t.connects&&t.connects.success){let e=t.connects.connects||[];this.showFavoritesOnly&&(e=e.filter(t=>this.isFavorite("connect",t.connectId))),this.folderConnects=e}this.updateTotalCount(),this.applySorting(),this.isLoading=!1},()=>{this.isLoading=!1}):(this.currentFolder=null,this.breadcrumbs=[],this.loadRootFolders())}loadRootFolders(){this.searchSub&&this.searchSub.unsubscribe();const t=this.folderService.getFolderTree();this.folderSearchTxt&&this.folderSearchTxt.trim()?this.searchSub=t.pipe((0,ts.w)(t=>{const e=t&&t.success&&t.tree||[];this.folderNameMap={},this.buildFolderNameMap(e),this.expandedFolders.clear(),this.searchConnectsByFolder={};const n=this.filterTree(e,this.folderSearchTxt.toLowerCase()),i=this.collectSearchFolderIds(e,this.folderSearchTxt.toLowerCase());return this.folderService.searchConnects(this.folderSearchTxt.trim(),i).pipe((0,ts.w)(t=>(0,Tr.of)({filteredTree:n,fullTree:e,connectsRes:t})))})).subscribe(t=>{let e=t.filteredTree;const n=t.fullTree,i=t.connectsRes&&t.connectsRes.success&&t.connectsRes.connects||[],o=new Set(this.collectAllFolderIds(e));this.searchConnectsByFolder={};const r=[];for(const s of i)if(s.folderId&&this.folderNameMap[s.folderId]){if(this.searchConnectsByFolder[s.folderId]||(this.searchConnectsByFolder[s.folderId]=[]),this.searchConnectsByFolder[s.folderId].push(s),!o.has(s.folderId)){const t=this.findFolderById(n,s.folderId);t&&(e.push(Object.assign(Object.assign({},t),{children:[]})),o.add(s.folderId))}}else r.push(s);for(const s of Object.keys(this.searchConnectsByFolder))this.expandedFolders.add(s);
1if(this.showFavoritesOnly){const t=this.collectFavoriteFolders(e);this.childFolders=t,this.flattenedTree=t.map(t=>Object.assign(Object.assign({},t),{_depth:0,_hasChildren:!1})),this.folderConnects=r.filter(t=>this.isFavorite("connect",t.connectId))}else this.childFolders=e,this.flattenTree(e),this.folderConnects=r;this.totalItems=this.flattenedTree.length+this.folderConnects.length,this.isLoading=!1},()=>{this.isLoading=!1}):(this.searchConnectsByFolder={},this.expandedFolders.clear(),this.folderNameMap={},this.searchSub=t.subscribe(t=>{if(t&&t.success){let e=t.tree||[];if(this.showFavoritesOnly){const t=this.collectFavoriteFolders(e),n=Array.from(this.favoriteIds).filter(t=>t.startsWith("connect_")).map(t=>t.replace("connect_",""));n.length>0?this.folderService.getConnectsByIds(n).subscribe(e=>{this.isLoading=!1,this.folderConnects=e&&e.success&&e.connects||[],this.childFolders=t,this.flattenedTree=t.map(t=>Object.assign(Object.assign({},t),{_depth:0,_hasChildren:!1})),this.totalItems=this.flattenedTree.length+this.folderConnects.length},()=>{this.isLoading=!1,this.childFolders=t,this.flattenedTree=t.map(t=>Object.assign(Object.assign({},t),{_depth:0,_hasChildren:!1})),this.totalItems=this.flattenedTree.length}):(this.isLoading=!1,this.folderConnects=[],this.childFolders=t,this.flattenedTree=t.map(t=>Object.assign(Object.assign({},t),{_depth:0,_hasChildren:!1})),this.totalItems=this.flattenedTree.length)}else this.isLoading=!1,this.folderConnects=[],this.childFolders=e,this.flattenTree(e),this.totalItems=this.flattenedTree.length}else this.isLoading=!1},()=>{this.isLoading=!1}))}collectFavoriteFolders(t){let e=[];for(const n of t)this.isFavorite("folder",n._id)&&e.push(Object.assign(Object.assign({},n),{children:[]})),n.children&&n.children.length>0&&(e=e.concat(this.collectFavoriteFolders(n.children)));return e}buildFolderNameMap(t){for(const e of t)this.folderNameMap[e._id]=e.folderName||"",e.children&&e.children.length>0&&this.buildFolderNameMap(e.children)}collectAllFolderIds(t){let e=[];for(const n of t)e.push(n._id),n.children&&n.children.length>0&&(e=e.concat(this.collectAllFolderIds(n.children)));return e}collectSearchFolderIds(t,e){let n=[];for(const i of t)(i.folderName||"").toLowerCase().includes(e)?n=n.concat(this.collectAllFolderIds([i])):i.children&&i.children.length>0&&(n=n.concat(this.collectSearchFolderIds(i.children,e)));return n}findFolderById(t,e){for(const n of t){if(n._id===e)return n;if(n.children&&n.children.length>0){const t=this.findFolderById(n.children,e);if(t)return t}}return null}filterTree(t,e){return t.reduce((t,n)=>{const i=(n.folderName||"").toLowerCase().includes(e),o=n.children?this.filterTree(n.children,e):[];return(i||o.length>0)&&(t.push(Object.assign(Object.assign({},n),{children:o})),o.length>0&&this.expandedFolders.add(n._id)),t},[])}flattenTree(t,e=0){this.flattenedTree=[],this._flattenRecursive(t,e)}_flattenRecursive(t,e){const n=this.sortAsc?1:-1;let i;i=this.sortByName?[...t].sort((t,e)=>{const i=(t.folderName||"").toLowerCase(),o=(e.folderName||"").toLowerCase();return i<o?-1*n:i>o?1*n:0}):[...t].sort((t,e)=>{const n=new Date(t._created_at||0).getTime();return new Date(e._created_at||0).getTime()-n});for(const o of i){const t=this.searchConnectsByFolder[o._id]||[],n=this.expandedFolderConnects[o._id]||[],i=t.length>0?t:n,r=o.children&&o.children.length>0||i.length>0||o.connectCount>0||o.totalConnectCount>0;if(this.flattenedTree.push(Object.assign(Object.assign({},o),{_depth:e,_hasChildren:r})),r&&this.expandedFolders.has(o._id))if(this.loadingFolders.has(o._id))this.flattenedTree.push({_isLoading:!0,_depth:e+1});else{o.children&&o.children.length>0&&this._flattenRecursive(o.children,e+1);for(const t of i)this.flattenedTree.push(Object.assign(Object.assign({},t),{_isConnect:!0,_depth:e+1}))}}}toggleExpand(t,e){t.stopPropagation(),this.expandedFolders.has(e._id)?(this.deselectExpandedContent(e._id),this.expandedFolders.delete(e._id),this.flattenTree(this.childFolders),this.totalItems=this.flattenedTree.length+this.folderConnects.length,this.currentPage=1):(this.expandedFolders.add(e._id),this.expandedFolderConnects[e._id]?(this.flattenTree(this.childFolders),this.totalItems=this.flattenedTree.length+this.folderConnects.length,this.currentPage=1):(this.loadingFolders.add(e._id),this.flattenTree(this.childFolders),this.folderService.getConnectsByFolder(e._id).subscribe(t=>{this.loadingFolders.delete(e._id),this.expandedFolderConnects[e._id]=t&&t.success&&t.connects||[],this.isItemSelected("folder",e._id)&&this.selectConnectsIn
1Folder(e._id),this.flattenTree(this.childFolders),this.totalItems=this.flattenedTree.length+this.folderConnects.length,this.currentPage=1},()=>{this.loadingFolders.delete(e._id)})))}toggleSubfolderExpand(t,e){t.stopPropagation(),this.expandedFolders.has(e._id)?(this.deselectExpandedContent(e._id),this.expandedFolders.delete(e._id),this.updateTotalCount()):(this.expandedFolders.add(e._id),this.expandedFolderConnects[e._id]||this.expandedSubfolders[e._id]?(this.isItemSelected("folder",e._id)&&this.selectConnectsInFolder(e._id),this.updateTotalCount()):(this.loadingFolders.add(e._id),(0,qo.D)({connects:this.folderService.getConnectsByFolder(e._id),subfolders:this.folderService.getFolders({parentFolderId:e._id,pageSize:100})}).subscribe(t=>{this.loadingFolders.delete(e._id),this.expandedFolderConnects[e._id]=t.connects&&t.connects.success&&t.connects.connects||[],this.expandedSubfolders[e._id]=t.subfolders&&t.subfolders.success&&t.subfolders.folders||[],this.isItemSelected("folder",e._id)&&this.selectConnectsInFolder(e._id),0===this.expandedFolderConnects[e._id].length&&0===this.expandedSubfolders[e._id].length&&(this.emptyFolders.add(e._id),this.expandedFolders.delete(e._id)),this.updateTotalCount()},()=>{this.loadingFolders.delete(e._id)})))}isFolderLoading(t){return this.loadingFolders.has(t)}isSubfolderExpandable(t){return!this.emptyFolders.has(t)}markEmptyFolders(t){for(const e of t){const t=(e.connectCount||0)>0||(e.totalConnectCount||0)>0;!(e.children&&e.children.length>0)&&!t&&this.emptyFolders.add(e._id),e.children&&e.children.length>0&&this.markEmptyFolders(e.children)}}isExpanded(t){return this.expandedFolders.has(t)}createSubfolder(t){this.bsModalRef=this.modalService.show(xM,{initialState:{parentFolderId:t._id},class:"new-folder-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(e=>{e&&(this.expandedFolders.add(t._id),this.loadCurrentView(),this.folderService.notifyFolderChanged(e))})}loadChildFolders(){this.folderService.getFolders({searchTXT:this.folderSearchTxt,parentFolderId:this.currentFolderId,pageSize:100}).subscribe(t=>{if(t&&t.success){let e=t.folders||[];this.showFavoritesOnly&&(e=e.filter(t=>this.isFavorite("folder",t._id))),this.childFolders=e,this.updateTotalCount(),this.applySorting()}})}loadFolderConnects(){this.folderService.getConnectsByFolder(this.currentFolderId).subscribe(t=>{if(this.isLoading=!1,t&&t.success){let e=t.connects||[];this.showFavoritesOnly&&(e=e.filter(t=>this.isFavorite("connect",t.connectId))),this.folderConnects=e,this.updateTotalCount(),this.applySorting()}},()=>{this.isLoading=!1,this.folderConnects=[]})}updateTotalCount(){let t=this.childFolders.length+this.filteredFolderConnects.length;for(const e of this.childFolders)t+=this.countExpandedItems(e._id);this.totalItems=t}countExpandedItems(t){if(!this.expandedFolders.has(t))return 0;let e=(this.expandedFolderConnects[t]||[]).length+(this.expandedSubfolders[t]||[]).length;for(const n of this.expandedSubfolders[t]||[])e+=this.countExpandedItems(n._id);return e}buildBreadcrumbsFromTree(t,e){const n=(t,i)=>{for(const o of t){if(o._id===e)return i;if(o.children&&o.children.length>0){const t=n(o.children,[...i,o]);if(t)return t}}return null};return n(t,[])||[]}openFolder(t){this.router.navigateByUrl("/folders/"+t._id)}goToRoot(){this.router.navigateByUrl("/folders")}goToBreadcrumb(t){this.router.navigateByUrl("/folders/"+t._id)}navigateToConnect(t){t&&t.connectId&&this.router.navigateByUrl("/customeditor/"+t._id+"/account/"+t.connectId)}copyConnectId(t,e){if(e.stopPropagation(),t){if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t);else{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}this.commonService.showToast("Connect ID copied")}}openNewFolderModal(){this.bsModalRef=this.modalService.show(xM,{initialState:{parentFolderId:this.currentFolderId},class:"new-folder-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{t&&(this.loadCurrentView(),this.folderService.notifyFolderChanged(t))})}renameFolder(t){this.bsModalRef=this.modalService.show(xM,{initialState:{folderName:t.folderName,isRename:!0,folderId:t._id}
1,class:"new-folder-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(e=>{if(e){const e=this.bsModalRef.content.folderName;this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"rename",_id:t._id,folderName:e})}})}openFolderDeletePopup(t){const e=()=>{this.bsModalRef=this.modalService.show(zL,{initialState:{folderId:t._id,folderName:t.folderName},class:"folder-delete-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(e=>{e&&(this.folderService.notifyFolderChanged({action:"delete",_id:t._id}),this.loadCurrentView())})};this.checkFolderHasFavorites(t._id,t=>{t?this.showFavoritesWarning("This folder has favorite items. They will be removed from Favorite on deletion.",e):e()})}moveConnectToFolder(t){this.bsModalRef=this.modalService.show(RM,{initialState:{connectTitle:t.connectTitle||t.connectId,connectId:t.connectId,currentFolderId:this.currentFolderId},class:"folder-move-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{t&&t.success&&(this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast("Connect moved to folder successfully"))})}removeConnectFromFolder(t){if(this.isFavorite("connect",t.connectId))return this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Remove from Favorites?",modelContent:"This connect is in your Favorites. Please remove it from Favorites first before removing it from the folder.",translation:{CANCEL:"No",CONFIRM:"Yes"}}}),void this.bsModalRef.content.onClose.subscribe(e=>{e&&this.folderService.toggleFavorite(t.connectId,"connect").subscribe(e=>{e&&e.success&&!e.isFavorite&&(this.favoriteIds.delete("connect_"+t.connectId),this.folderService.moveConnectToFolder({connectId:t.connectId,folderId:null}).subscribe(t=>{t&&t.success&&(this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast("Connect removed from Favorites and folder successfully"))}))})});this.folderService.moveConnectToFolder({connectId:t.connectId,folderId:null}).subscribe(t=>{t&&t.success&&(this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast("Connect removed from folder successfully"))})}removeFavoriteConnect(t){if(!t||!t.connectId)return;const e="connect_"+t.connectId;!this.favoriteIds.has(e)||this.folderService.toggleFavorite(t.connectId,"connect").subscribe(t=>{t&&t.success&&!t.isFavorite&&(this.favoriteIds.delete(e),this.commonService.showToast("Connect removed from Favorites"),this.loadCurrentView())},()=>{this.commonService.showToast("Failed to remove from Favorites")})}duplicateConnect(t){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Duplicate Connect?",modelContent:"Are you sure you want to duplicate this connect?",modelConnectId:t.connectId,translation:{CANCEL:"Cancel",CONFIRM:"Duplicate"}}}),this.bsModalRef.content.onClose.subscribe(e=>{if(e){const e=this.dataService.createConnectId();this.isLoading=!0,this.customerConnectService.createDuplicateConnect({orignalConnectId:t.connectId,dulicateConnectId:e}).subscribe(t=>{this.loadCurrentView()})}})}deleteConnect(t){const e=()=>{this.bsModalRef=this.modalService.show(zL,{initialState:{deleteMode:"connect",connectId:t.connectId,connectTitle:t.connectTitle||t.connectId},class:"folder-delete-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{"openTrash"===t?this.openTrashView():t&&(this.loadCurrentView(),this.loadTrashCount(),this.folderService.notifyFolderChanged({action:"refresh"}))})};this.isFavorite("connect",t.connectId)?this.showFavoritesWarning("This connect is in Favorite. It will be removed from Favorite on deletion.",e):e()}toggleSelectAll(){this.selectAll=!this.selectAll,this.selectedItems.clear(),this.selectAll&&(this.childFolders.forEach(t=>{this.selectedItems.add("folder_"+t._id),this.selectDescendants(t._id)}),this.folderConnects.forEach(t=>this.selectedItems.add("connect_"+t.connectId)))}toggleItemSelect(t,e){const n=t+"_"+e;this.selectedItems.has(n)?(this.selectedItems.delete(n),"folder"===t&&this.deselectDescendants(e)):(this.selectedItems.add(n),"folder"===t&&this.selectDescendants(e)),this.selectAll=this.selectedCount===this.totalItems&&this.selectedCount>0}isItemSelected(t,e){return!!this.selectedItems.has(t+"_"+e)||!this.currentFolderId&&"folder"===t&&this.isAncestorSelected(e,this.childFolders)}isAncestorSelected(t,e){for(const n of e)if(this.selectedItems.has("folder_"+n._id)&&this.isDescendant(t,n.children||[])||n.children&&n.children.length>0&&this.isAncestorSelected(t,n.children))return!0;return!1}isDescendant(t,e){for(const n of e)if(n._id===t||n.children&&this.isDescendant(t,n.children))return!0;return!1}
1selectDescendants(t){this.selectConnectsInFolder(t);const e=this.findFolderInTree(t,this.childFolders);e&&e.children&&this.selectAllInBranch(e.children)}deselectDescendants(t){this.deselectConnectsInFolder(t);const e=this.findFolderInTree(t,this.childFolders);e&&e.children&&this.deselectAllInBranch(e.children)}selectAllInBranch(t){for(const e of t)this.selectedItems.add("folder_"+e._id),this.selectConnectsInFolder(e._id),e.children&&this.selectAllInBranch(e.children)}deselectAllInBranch(t){for(const e of t)this.selectedItems.delete("folder_"+e._id),this.deselectConnectsInFolder(e._id),e.children&&this.deselectAllInBranch(e.children)}selectConnectsInFolder(t){const e=this.expandedFolderConnects[t]||this.searchConnectsByFolder[t]||[];for(const i of e)this.selectedItems.add("connect_"+i.connectId);const n=this.expandedSubfolders[t]||[];for(const i of n)this.selectedItems.add("folder_"+i._id)}deselectConnectsInFolder(t){const e=this.expandedFolderConnects[t]||this.searchConnectsByFolder[t]||[];for(const i of e)this.selectedItems.delete("connect_"+i.connectId);const n=this.expandedSubfolders[t]||[];for(const i of n)this.selectedItems.delete("folder_"+i._id)}deselectExpandedContent(t){const e=this.expandedFolderConnects[t]||[];for(const i of e)this.selectedItems.delete("connect_"+i.connectId);const n=this.expandedSubfolders[t]||[];for(const i of n)this.selectedItems.delete("folder_"+i._id),this.expandedFolders.has(i._id)&&this.deselectExpandedContent(i._id)}findFolderInTree(t,e){for(const n of e){if(n._id===t)return n;if(n.children){const e=this.findFolderInTree(t,n.children);if(e)return e}}return null}get selectedCount(){if(!this.currentFolderId){let t=0;for(const e of this.flattenedTree)e._isLoading||(e._isConnect?this.selectedItems.has("connect_"+e.connectId)&&t++:this.selectedItems.has("folder_"+e._id)&&t++);for(const e of this.folderConnects)this.selectedItems.has("connect_"+e.connectId)&&t++;return t}return this.selectedItems.size}get hasSelectedConnects(){return Array.from(this.selectedItems).some(t=>t.startsWith("connect_"))}hasAnyFavoriteInSelection(t){for(const e of t)if(this.favoriteIds.has(e))return!0;return!1}collectDescendantFolderIds(t){const e=[t],n=this.findFolderInTree(t,this.childFolders);if(n&&n.children)for(const i of n.children)e.push(...this.collectDescendantFolderIds(i._id));return e}checkFolderHasFavorites(t,e){const n=this.collectDescendantFolderIds(t);if(n.some(t=>this.isFavorite("folder",t)))return void e(!0);const i=n.map(t=>this.folderService.getConnectsByFolder(t));(0,qo.D)(i).subscribe(t=>{const n=t.some(t=>(t&&t.success&&t.connects||[]).some(t=>this.isFavorite("connect",t.connectId)));e(n)},()=>e(!1))}showFavoritesWarning(t,e){const n=this.modalService.show($O.f,{initialState:{modelTitle:"Item is in Favorite",modelContent:t,translation:{CANCEL:"Cancel",CONFIRM:"Continue"}}});let i=!1;n.content.onClose.subscribe(()=>{i=!0}),n.onHidden.subscribe(()=>{i&&e()})}bulkMoveSelectedToFolder(){const t=Array.from(this.selectedItems).filter(t=>t.startsWith("connect_")).map(t=>t.replace("connect_",""));0!==t.length&&(this.bsModalRef=this.modalService.show(RM,{initialState:{connectTitle:t.length+" connects",connectIds:t,currentFolderId:this.currentFolderId},class:"folder-move-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(e=>{e&&e.success&&(this.selectedItems.clear(),this.selectAll=!1,this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast(t.length+" connects moved to folder successfully"))}))}bulkRemoveFromFolder(){const t=Array.from(this.selectedItems).filter(t=>t.startsWith("connect_")).map(t=>t.replace("connect_",""));0!==t.length&&this.folderService.bulkMoveConnects({connectIds:t,folderId:null}).subscribe(e=>{e&&e.success&&(this.selectedItems.clear(),this.selectAll=!1,this.loadCurrentView(),this.folderService.notifyFolderChanged({action:"refresh"}),this.commonService.showToast(t.length+" connects removed from folder successfully"))})}bulkRemoveFromFavorites(){const t=Array.from(this.selectedItems).map(t=>{const e=t.indexOf("_");return{type:t.substring(0,e),id:t.substring(e+1)}}).filter(t=>
1this.favoriteIds.has(t.type+"_"+t.id));if(0===t.length)return;const e=t.map(t=>this.folderService.toggleFavorite(t.id,t.type));(0,qo.D)(e).subscribe(e=>{e.forEach((e,n)=>{e&&e.success&&!e.isFavorite&&this.favoriteIds.delete(t[n].type+"_"+t[n].id)}),this.selectedItems.clear(),this.selectAll=!1,this.commonService.showToast(t.length+" item"+(1===t.length?"":"s")+" removed from favorites"),this.loadCurrentView()},()=>{this.commonService.showToast("Failed to remove some items from favorites")})}deleteSelected(){const t=()=>{this.bsModalRef=this.modalService.show(zL,{initialState:{deleteMode:"bulk",selectedItems:new Set(this.selectedItems),bulkCount:this.selectedCount},class:"folder-delete-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{t&&(this.selectedItems.clear(),this.selectAll=!1,this.loadCurrentView(),this.loadTrashCount(),this.folderService.notifyFolderChanged({action:"refresh"}))})};this.hasAnyFavoriteInSelection(this.selectedItems)?this.showFavoritesWarning("Some selected items are in Favorite. They will be removed from Favorite on deletion.",t):t()}searchFolders(t){this.showTrash?this.trashSearchTxt=t:(this.folderSearchTxt=t,this.currentPage=1,(!t||!t.trim())&&(this.expandedFolders.clear(),this.searchConnectsByFolder={}),this.currentFolderId?this.loadChildFolders():this.loadRootFolders())}clearSearch(){this.folderSearchTxt="",this.expandedFolders.clear(),this.searchConnectsByFolder={},this.searchFolders("")}onPerPageChange(t){this.perPage=t,this.currentPage=1,this.loadCurrentView()}selectedFilterValue(t){this.selectedFilter=t}toggleSort(){this.sortByName?this.sortAsc=!this.sortAsc:(this.sortByName=!0,this.sortAsc=!0),this.currentPage=1,this.applySorting()}applySorting(){const t=this.sortAsc?1:-1;this.childFolders.sort(this.sortByName?(e,n)=>{const i=(e.folderName||"").toLowerCase(),o=(n.folderName||"").toLowerCase();return i<o?-1*t:i>o?1*t:0}:(t,e)=>{const n=new Date(t._created_at||0).getTime();return new Date(e._created_at||0).getTime()-n}),this.folderConnects.sort((e,n)=>{const i=(e.connectTitle||e.connectId||"").toLowerCase(),o=(n.connectTitle||n.connectId||"").toLowerCase();return i<o?-1*t:i>o?1*t:0}),this.currentFolderId||(this.flattenTree(this.childFolders),this.totalItems=this.flattenedTree.length)}get pagedFlatTree(){const t=(this.currentPage-1)*this.perPage;return this.flattenedTree.slice(t,t+this.perPage)}get filteredFolderConnects(){const t=(this.folderSearchTxt||"").trim().toLowerCase();return t?this.folderConnects.filter(e=>{const n=(e.connectTitle||"").toLowerCase(),i=(e.connectId||"").toLowerCase();return n.includes(t)||i.includes(t)}):this.folderConnects}get filteredChildFoldersCount(){return this.childFolders.length}get pagedChildFolders(){const t=(this.currentPage-1)*this.perPage;return this.childFolders.slice(t,t+this.perPage)}get pagedFolderConnects(){const t=(this.currentPage-1)*this.perPage,e=t+this.perPage,n=this.filteredChildFoldersCount,i=Math.max(0,t-n),o=Math.max(0,e-n);return this.filteredFolderConnects.slice(i,o)}get totalPages(){return Math.max(1,Math.ceil(this.totalItems/this.perPage))}get paginationStart(){return 0===this.totalItems?0:(this.currentPage-1)*this.perPage+1}get paginationEnd(){return Math.min(this.currentPage*this.perPage,this.totalItems)}prevPage(){this.currentPage>1&&this.currentPage--}nextPage(){this.currentPage<this.totalPages&&this.currentPage++}canCreateSubfolderForNode(t){return(t.children?t.children.length:0)<5}getOwnerInitials(t){return t.ownerName?t.ownerName.split(" ").map(t=>t[0]).join("").toUpperCase().substring(0,2):"U"}loadFavorites(){this.folderService.getFavorites().subscribe(t=>{t&&t.success&&t.favorites&&(this.favoriteIds.clear(),t.favorites.forEach(t=>{this.favoriteIds.add(t.itemType+"_"+t.itemId)}))})}isFavorite(t,e){return this.favoriteIds.has(t+"_"+e)}toggleFavorite(t,e,n){t.stopPropagation();const i=e+"_"+n,o=this.favoriteIds.has(i);o?this.favoriteIds.delete(i):this.favoriteIds.add(i),this.folderService.toggleFavorite(n,e).subscribe(t=>{t&&t.success?(t.isFavorite?this.favoriteIds.add(i):this.favoriteIds.delete(i),this.showFavoritesOnly&&this.loadCurrentView()):o?this.favoriteIds.add(i):this.favoriteIds.delete(i)},()=>{o?this.favoriteIds.add(i):this.favoriteIds.delete(i)})}
1toggleFavoritesFilter(){this.showFavoritesOnly=!this.showFavoritesOnly,this.showTrash=!1,this.trashConnects=[],this.selectedItems.clear(),this.selectAll=!1,this.loadCurrentView()}exitFavoritesView(){!this.showFavoritesOnly||(this.showFavoritesOnly=!1,this.selectedItems.clear(),this.selectAll=!1,this.loadCurrentView())}loadTrashCount(){(0,qo.D)({connects:this.customerConnectService.getTrashConnects(),folders:this.folderService.getTrashFolders()}).subscribe(t=>{this.trashCount=(t.connects&&t.connects.success?(t.connects.connects||[]).length:0)+(t.folders&&t.folders.success?(t.folders.folders||[]).length:0)},()=>{this.trashCount=0})}openTrashView(){this.showTrash=!0,this.showFavoritesOnly=!1,this.selectedItems.clear(),this.selectAll=!1,this.selectedTrashItems.clear(),this.trashSelectAll=!1,this.trashSearchTxt="",this.folderSearchTxt="",this.isLoading=!0,(0,qo.D)({connects:this.customerConnectService.getTrashConnects(),folders:this.folderService.getTrashFolders()}).subscribe(t=>{this.isLoading=!1,this.trashConnects=t.connects&&t.connects.success&&t.connects.connects||[],this.trashFolders=t.folders&&t.folders.success&&t.folders.folders||[],this.trashCount=this.trashConnects.length+this.trashFolders.length},()=>{this.isLoading=!1,this.trashConnects=[],this.trashFolders=[],this.trashCount=0})}closeTrashView(){this.showTrash=!1,this.trashConnects=[],this.trashFolders=[],this.trashSearchTxt="",this.folderSearchTxt="",this.loadCurrentView()}restoreConnect(t){t._restoring=!0,this.customerConnectService.restoreFromTrash(t.connectId).subscribe(e=>{t._restoring=!1,e&&e.success&&(this.trashConnects=this.trashConnects.filter(e=>e.connectId!==t.connectId),this.updateTrashCount(),this.folderService.notifyFolderChanged({action:"refresh"}))},()=>{t._restoring=!1})}restoreFolder(t){t._restoring=!0,this.folderService.restoreFolderFromTrash(t._id).subscribe(e=>{t._restoring=!1,e&&e.success&&(this.trashFolders=this.trashFolders.filter(e=>e._id!==t._id),this.updateTrashCount(),this.folderService.notifyFolderChanged({action:"refresh"}))},()=>{t._restoring=!1})}permanentDeleteConnect(t){t._deleting=!0,this.customerConnectService.permanentDeleteConnect(t.connectId).subscribe(e=>{t._deleting=!1,e&&e.success&&(this.trashConnects=this.trashConnects.filter(e=>e.connectId!==t.connectId),this.updateTrashCount())},()=>{t._deleting=!1})}permanentDeleteFolderItem(t){t._deleting=!0,this.folderService.permanentDeleteFolder(t._id).subscribe(e=>{t._deleting=!1,e&&e.success&&(this.trashFolders=this.trashFolders.filter(e=>e._id!==t._id),this.updateTrashCount())},()=>{t._deleting=!1})}updateTrashCount(){this.trashCount=this.trashConnects.length+this.trashFolders.length}daysUntilPurge(t){const e=new Date(t).getTime()+2592e6;return Math.max(0,Math.ceil((e-Date.now())/864e5))}get filteredTrashFolders(){const t=(this.trashSearchTxt||"").trim().toLowerCase();return t?this.trashFolders.filter(e=>(e.folderName||"").toLowerCase().includes(t)):this.trashFolders}get filteredTrashConnects(){const t=(this.trashSearchTxt||"").trim().toLowerCase();return t?this.trashConnects.filter(e=>(e.connectTitle||"").toLowerCase().includes(t)||(e.connectId||"").toLowerCase().includes(t)):this.trashConnects}toggleTrashItem(t){this.selectedTrashItems.has(t)?this.selectedTrashItems.delete(t):this.selectedTrashItems.add(t),this.trashSelectAll=this.selectedTrashItems.size===this.trashConnects.length+this.trashFolders.length&&this.trashCount>0}toggleTrashSelectAll(){this.trashSelectAll=!this.trashSelectAll,this.selectedTrashItems.clear(),this.trashSelectAll&&(this.trashConnects.forEach(t=>this.selectedTrashItems.add("connect_"+t.connectId)),this.trashFolders.forEach(t=>this.selectedTrashItems.add("folder_"+t._id)))}bulkRestoreFromTrash(){const t=Array.from(this.selectedTrashItems);if(0===t.length)return;this.isBulkRestoring=!0;const e=t.map(t=>{const e=t.indexOf("_"),n=t.substring(0,e),i=t.substring(e+1);return"folder"===n?this.folderService.restoreFolderFromTrash(i).toPromise():this.customerConnectService.restoreFromTrash(i).toPromise()});Promise.all(e).then(()=>{this.isBulkRestoring=!1;const e=t.filter(t=>t.startsWith("connect_")).map(t=>t.replace("connect_","")),n=t.filter(t=>t.startsWith("folder_")).map(t=>t.replace("folder_",""));this.trashConnects=this.trashConnects.filter(t=>!e.includes(t.connectId)),this.trashFolders=this.trashFolders.filter(t=>!n.includes(t._id)),this.updateTrashCount(),this.selectedTrashItems.clear(),this.trashSelectAll=!1,this.folderService.n
1otifyFolderChanged({action:"refresh"}),this.commonService.showToast(t.length+" item"+(1===t.length?"":"s")+" restored successfully")}).catch(()=>{this.isBulkRestoring=!1})}bulkDeleteFromTrash(){const t=Array.from(this.selectedTrashItems);if(0===t.length)return;const e=t.filter(t=>t.startsWith("connect_")).map(t=>t.replace("connect_","")),n=t.filter(t=>t.startsWith("folder_")).map(t=>t.replace("folder_",""));this.bsModalRef=this.modalService.show(zL,{initialState:{deleteMode:"trashBulk",trashConnectIds:e,trashFolderIds:n},class:"folder-delete-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(i=>{i&&(this.trashConnects=this.trashConnects.filter(t=>!e.includes(t.connectId)),this.trashFolders=this.trashFolders.filter(t=>!n.includes(t._id)),this.updateTrashCount(),this.selectedTrashItems.clear(),this.trashSelectAll=!1,this.commonService.showToast(t.length+" item"+(1===t.length?"":"s")+" permanently deleted"))})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.tT),o.Y36(wo.v),o.Y36(mM),o.Y36(Fo),o.Y36(DA),o.Y36(ui.F0),o.Y36(ui.gz))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-folders"]],decls:39,vars:26,consts:[["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","Folderspage",1,"dashboard-middle","clearfix","sectionpadding"],[1,"mar-15-b","d-flex","align-items-center","gap-3","justify-content-between"],[1,"folder-header-left","min-w-0","d-flex","flex-column","gap-2"],["class","h3 mb-0",4,"ngIf"],[4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],["class","btn remove-folder-btn d-inline-flex align-items-center gap-1 f-14 fw-normal rounded-pill w-auto",3,"click",4,"ngIf"],["class","btn remove-fav-btn d-inline-flex align-items-center gap-2 f-14 fw-normal rounded-pill w-auto",3,"click",4,"ngIf"],["class","btn btn-outline-danger d-inline-flex align-items-center gap-1 f-14 fw-normal rounded-pill w-auto",3,"click",4,"ngIf"],["class","btn remove-folder-btn d-inline-flex align-items-center gap-1 f-14 fw-normal rounded-pill w-auto",3,"disabled","click",4,"ngIf"],["class","btn btn-outline-danger d-inline-flex align-items-center gap-1 f-14 fw-normal rounded-pill w-auto",3,"disabled","click",4,"ngIf"],[1,"btn","viewbtn","btn-primary","d-inline-flex","align-items-center","gap-1","justify-content-center","f-14","fw-normal","dropdown-toggle","bg-transparent","border-0","foldersButton",3,"disabled","title","click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],["x1","12","y1","11","x2","12","y2","17"],["x1","9","y1","14","x2","15","y2","14"],[1,"searchtask-container","d-flex","align-items-center","gap-3","justify-content-between","flex-column","flex-md-row"],[1,"searchtask","position-relative",3,"ngClass"],[1,"position-relative"],["title","Search",1,"searchtask-btn"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M12.8333 22.1667C17.988 22.1667 22.1667 17.988 22.1667 12.8333C22.1667 7.67868 17.988 3.5 12.8333 3.5C7.67868 3.5 3.5 7.67868 3.5 12.8333C3.5 17.988 7.67868 22.1667 12.8333 22.1667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M24.5001 24.5001L22.1667 22.1667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","text",1,"form-control",3,"ngModel","placeholder","ngModelChange","input"],["class","searchtask-btn right-left","title","Clear Search","type","button",3,"click",4,"ngIf"],["class","filter-container d-flex align-items-center gap-2 justify-content-between",4,"ngIf"],["class","folders-list text-center bg-white rounded-4 mt-4 p-lg-5 p-3 d-flex gap-3 flex-column justify-content-center align-items-center",4,"ngIf"],["id","folder-list-table","class","mt-4",4,"ngIf"],["class","trash-view mt-4",4,"ngIf"],[1,"h3","mb-0"],[1,"folder-breadcrumb","d-flex","align-items-center","gap-1","flex-wrap","mb
1-1","bg-transparent"],["title","Back to Folders",1,"btn","p-0","breadcrumb-back-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","m15 18-6-6 6-6"],[1,"btn","p-0","breadcrumb-link",3,"click"],[1,"breadcrumb-sep"],[1,"breadcrumb-current"],[1,"trash-icon-circle"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M3 6h18"],["d","M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"],["d","M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"],[1,"d-flex","align-items-center","gap-2","min-w-0"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","#f5a623","stroke","#f5a623","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"flex-shrink-0"],["points","12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"],["title","Go back",1,"btn","p-0","breadcrumb-back-btn",3,"click"],[4,"ngFor","ngForOf"],[1,"breadcrumb-current","text-truncate","breadcrumb-item-max",3,"title"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","24","width","24","xmlns","http://www.w3.org/2000/svg",1,"flex-shrink-0"],["d","M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],[1,"h3","mb-0","text-truncate",2,"max-width","400px",3,"title"],[1,"btn","p-0","breadcrumb-link","text-truncate","breadcrumb-item-max",3,"title","click"],[1,"btn","remove-folder-btn","d-inline-flex","align-items-center","gap-1","f-14","fw-normal","rounded-pill","w-auto",3,"click"],["d","M9.5 12.5h5"],[1,"btn","remove-fav-btn","d-inline-flex","align-items-center","gap-2","f-14","fw-normal","rounded-pill","w-auto",3,"click"],[1,"remove-fav-label"],[1,"remove-fav-count","badge"],[1,"btn","btn-outline-danger","d-inline-flex","align-items-center","gap-1","f-14","fw-normal","rounded-pill","w-auto",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M2.80005 5.20001H17.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M15.6 5.2V16.4C15.6 16.8243 15.4315 17.2313 15.1314 17.5314C14.8313 17.8314 14.4244 18 14 18H6.00002C5.57568 18 5.16871 17.8314 4.86865 17.5314C4.5686 17.2313 4.40002 16.8243 4.40002 16.4V5.2M6.80002 5.2V3.6C6.80002 3.17565 6.9686 2.76869 7.26865 2.46863C7.56871 2.16857 7.97568 2 8.40002 2H11.6C12.0244 2 12.4313 2.16857 12.7314 2.46863C13.0315 2.76869 13.2 3.17565 13.2 3.6V5.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M8.40002 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M11.6001 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"btn","remove-folder-btn","d-inline-flex","align-items-center","gap-1","f-14","fw-normal","rounded-pill","w-auto",3,"disabled","click"],["d","M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"],["d","M3 3v5h5"],[1,"btn","btn-outline-danger","d-inline-flex","align-items-center","gap-1","f-14","fw-normal","rounded-pill","w-auto",3,"disabled","click"],["title","Clear Search","type","button",1,"searchtask-btn","right-left",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 28 28","fill","none"],["d","M21 7L7 21M7 7L21 21","stroke","#dc3545","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],[1,"filter-container","d-flex","align-items-center","gap-2","justify-content-between"],["class","filter-item dropdown bg-white rounded-3",4,"ngIf"],["class","btn border bg-white p-2 favorite-filter-btn h-40","placement","bottom","container","body",3,"ngClass","tooltip","click",4,"ngIf"],["tooltip","Refresh","placement","bottom","container","body",1,"btn","border","bg-white","p-2","h-40",3,"click"],["d","M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"],["d","M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"],["d","M16 16h5v5"],["class","btn border bg-white p-2 h-4
10","placement","bottom","container","body",3,"tooltip","click",4,"ngIf"],[1,"filter-item","dropdown","bg-white","rounded-3"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"dropdown-toggle","btn","border","py-2","fw-normal","pe-4","f-14","filter-item-btn",2,"height","45px"],[1,"text-secondary"],[1,"text-primary","fw-semibold","ms-2"],[1,"folders-dropdown","dropdown-menu","dropdown-menu-end","w-100","py-0"],["type","button",1,"dropdown-item","btn","d-flex","align-items-center","gap-1","border-bottom",3,"click"],["placement","bottom","container","body",1,"btn","border","bg-white","p-2","favorite-filter-btn","h-40",3,"ngClass","tooltip","click"],["d","m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"],["placement","bottom","container","body",1,"btn","border","bg-white","p-2","h-40",3,"tooltip","click"],["xmlns","http://www.w3.org/2000/svg","width","26","height","26","viewBox","0 0 100 100","fill","none","stroke","#e05555","stroke-width","5.5","stroke-linecap","round","stroke-linejoin","round"],["d","M24 42 L29 85 Q30 93 38 93 L62 93 Q70 93 71 85 L76 42"],["x1","20","y1","42","x2","80","y2","42"],["transform","rotate(10, 77, 34)"],["x","17","y","28","width","60","height","12","rx","4"],["d","M40 28 C40 21 50 19 51 26"],["x1","40","y1","52","x2","38","y2","80"],["x1","50","y1","52","x2","50","y2","80"],["x1","60","y1","52","x2","62","y2","80"],[1,"folders-list","text-center","bg-white","rounded-4","mt-4","p-lg-5","p-3","d-flex","gap-3","flex-column","justify-content-center","align-items-center"],["xmlns","http://www.w3.org/2000/svg","width","30","height","30","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"text-secondary","mb-0"],["type","button",1,"btn","btn-outline-primary","fw-normal","p-3","py-2","rounded-pill",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","30","width","30","xmlns","http://www.w3.org/2000/svg"],["type","button",1,"btn","btn-primary","fw-normal","p-3","py-2","rounded-pill",3,"click"],["id","folder-list-table",1,"mt-4"],[1,"table","table_folders","rounded-4"],[1,"conncf"],[2,"width","40px"],[1,"container-checkbox","mb-0"],["type","checkbox",3,"checked","change"],[1,"checkmark"],[2,"cursor","pointer","user-select","none",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 16 16","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],[1,"col-owner"],[1,"numeric"],["class","connect-row",3,"ngClass",4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","gap-3","w-100","justify-content-between","flex-wrap"],[1,"pagination-per-page","f-13","text-secondary"],[1,"d-flex","align-items-center","gap-2","dropdown","dropdown-menu-end"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"align-items-center","bg-body","border","btn","pe-5","d-flex","dropdown-toggle","gap-3","f-14","justify-content-between","px-3","py-2"],[1,"dropdown-menu","p-2","mt-1","f-14"],["type","button",1,"dropdown-item",3,"click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 16 16","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],["d","M3.5 2.5a.5.5 0 0 0-1 0v8.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L3.5 11.293zm3.5 1a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5M7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1z"],["d","M3.5 12.5a.5.5 0 0 1-1 0V3.707L1.354 4.854a.5.5 0 1 1-.708-.708l2-1.999.007-.007a.5.5 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L3.5 3.707zm3.5-9a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5M7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1z"],["class","connect-row",4,"ngIf"],["class","folder-row",3,"ngClass",4,"ngIf"],["colspan","7"],[1,"d-flex","align-items-center","gap-2","py-2"],["role","status",1,"spinner-border","spinner-border-sm","text-primary"],[1,"text-muted","f-12"],[1,"connect-row"],["data-title","Name"],[1,"folder-connect-name-cell"],[1,"connectname","connectname-effect","mb-0",2,"cursor","pointer",3,"click"],[1,"custom-options-tooltip"],[1,"lh-sm","d-inline-block","max-w-250","w-100","text-truncate"],[1,"appid_connect","d-inline-flex","align-items-center","gap-1",2,"cursor","pointer",3,"click"],[1,"text-truncate"],["data-tooltip","Copy ID",1,"folder-copy-icon","custom-options-tooltip","d-inline-flex"],["width","14","height","14","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M17.8287 9.59998H10.9715C10.2141 9.59998 9.6001 10.214 9.6001 10.9714V17.8285C9.6001 18.586 10.2141 19.2 10.9715 19.2H17.8287C18.5861 19.2 19.2001 18.586 19.2001 17.8285V10.9714C19.2001 10.214 18.5861 9.59998 17.8287 9.59998Z","stroke","currentColor","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["d","M6.85714 14.4H6.17143C5.80764 14.4 5.45878 14.2554 5.20159 13.9982C4.9444 13.7411 4.7998 13.3922 4.7998 13.0285V6.17139C4.7998 5.8076 4.9444 5.45875 5.20159 5.20156C5.45878 4.94436 5.80764 4.79996 6.17143 4.79996H13.0286C13.3924 4.79996 13.7412 4.94436 13.9984 5.20156C14.2556 5.45875 14.4002 5.8076 14.4002 6.17139V6.85711","stroke","currentColor","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],["data-title","Owner",1,"col-owner"],[1,"folder-owner","overflow-hidden","fw-semibold","border","text-primary",3,"title"],["data-title","Actions",1,"numeric"],["placement","top","container","body",1,"btn","p-0","favorite-btn",3,"ngClass","tooltip","click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"dropdown","dropdown-menu-end"],["type","button","data-bs-toggle","dropdown","aria-expanded","fal
1se",1,"btn","dropdown-toggle","p-0"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"],[1,"dropdown-menu","p-2","mt-1"],["width","16","height","16","viewBox","0 0 17 17","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.50014 15.6667H16.0001M11.0001 3.16666L13.5001 5.66666M12.1468 2.01833C12.4786 1.68658 12.9285 1.50021 13.3976 1.50021C13.8668 1.50021 14.3167 1.68658 14.6485 2.01833C14.9802 2.35007 15.1666 2.80001 15.1666 3.26916C15.1666 3.73831 14.9802 4.18825 14.6485 4.51999L4.64014 14.5292C4.44189 14.7274 4.19683 14.8724 3.92764 14.9508L1.53431 15.6492C1.4626 15.6701 1.38659 15.6713 1.31423 15.6528C1.24188 15.6343 1.17583 15.5966 1.12302 15.5438C1.0702 15.491 1.03255 15.4249 1.01401 15.3526C0.995475 15.2802 0.996729 15.2042 1.01764 15.1325L1.71598 12.7392C1.79449 12.4703 1.93952 12.2255 2.13764 12.0275L12.1468 2.01833Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"folder-row",3,"ngClass"],[1,"d-flex","align-items-center","gap-2","item-name-cell"],["class","expand-chevron-btn",3,"ngClass","click",4,"ngIf"],[1,"folder-icon",2,"cursor","pointer",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","18","width","18","xmlns","http://www.w3.org/2000/svg"],[1,"folder-name","text-truncate","fw-medium",2,"cursor","pointer",3,"title","click"],["class","folder-connect-count",4,"ngIf"],["type","button",1,"dropdown-item","text-danger",3,"click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 20 20","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],[1,"expand-chevron-btn",3,"ngClass","click"],["points","9 18 15 12 9 6"],[1,"folder-connect-count"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 25 25","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["data-title","Apps",4,"ngIf"],["data-title","",4,"ngIf"],["data-title","Apps"],["data-title",""],[1,"d-flex","align-items-center","gap-2","py-2",2,"padding-left","32px"],[1,"folder-row"],[1,"d-flex","align-items-center","gap-2","item-name-cell",2,"padding-left","32px"],["data-title","Last modified"],["data-title","Status"],[1,"btn","p-0","favorite-btn",3,"ngClass","click"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],[1,"d-flex","align-items-center","gap-2","py-2",2,"padding-left","64px"],[1,"d-flex","align-items-center","gap-2","item-name-cell",2,"padding-left","64px"],[1,"d-flex","align-items-center","gap-2","py-2",2,"padding-left","96px"],["class","connect-row",4,"ngFor","ngForOf"],[1,"folder-connect-name-cell",2,"padding-left","96px"],[1,"connect-app-icons"],["class","app-icon-item",4,"ngIf"],[1,"badge","rounded-pill","f-11",3,"ngClass"],[1,"app-icon-item"],["width","24","height","24","alt","",1,"app-icon-img",3,"src"],[1,"folder-connect-name-cell",2,"padding-left","64px"],[1,"folder-connect-name-cell",2,"padding-left","32px"],[1,"connect-row",3,"ngClass"],["class","connect-folder-tag d-inline-flex align-items-center gap-1 mt-1",4,"ngIf"],["data-title","Last modified",4,"ngIf"],["data-title","Status",4,"ngIf"],["stroke","currentColor","fill","none","stroke-width","1.5","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["d","M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1"],["d","M2 13h10"],["d","m9 16 3-3-3-3"],["width","14","height","14","x","8","y","8","rx","2","ry","2"],["d","M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"],[1,"connect-folder-tag","d-inline-flex","align-items-center","gap-1","mt-1"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","12","width","12","xmlns","http://www.w3.org/2000/svg"],[1,"text-muted","f-11"],["class","app-icon-item app-icon-more",4,"ngIf"],["class","connect-icon d-flex align-items-center",4,"ngIf"],[1,"app-icon-item","app-icon-more"],["class","app-icon-extra-count",4,"ngIf"],["width","24","height","24","alt","","class","app-icon-img",3,"src",4,"ngIf"],[1,"app-icon-extra-count"],[1,"connect-icon","d-flex","align-items-center"],["d","M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"],["d","M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","#f5a623","stroke","#f5a623","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M18 6 6 18"],["d","m6 6 12 12"],[1,"trash-view","mt-4"],[1,"trash-info-banner","d-flex","align-items-start","gap-2","mb-4"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"flex-shrink-0","mt-1"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],[1,"f-13"],["class","trash-empty-state",4,"ngIf"],["class","mt-4",4,"ngIf"],[1,"trash-empty-state"],[1,"trash-empty-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"fw-semibold","mb-1",2,"color","#1d1d1d"],[1,"f-13","text-secondary","mb-0"],[1,"mt-4"],["class","folder-row",4,"ngFor","ngForOf"],[1,"fw-medium","text-truncate",2,"max-width","320px",3,"title"],[1,"badge","bg-secondary","f-11"],["data-title","Deleted"],["data-title","Expires"],[1,"trash-days-pill",3,"ngClass"],["tooltip","Re
1store","placement","top","container","body",1,"btn","trash-restore-btn",3,"disabled","click"],["class","spinner-border spinner-border-sm","role","status",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["tooltip","Delete forever","placement","top","container","body",1,"btn","trash-delete-btn",3,"disabled","click"],["role","status",1,"spinner-border","spinner-border-sm"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"connectname","connectname-effect","mb-0"],[1,"appid_connect","d-inline-flex","align-items-center","gap-1"]],template:function(t,e){1&t&&(o.TgZ(0,"main",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o.TgZ(4,"div",4),o.TgZ(5,"section",5),o.TgZ(6,"div",6),o.TgZ(7,"div",7),o.YNc(8,VL,2,0,"h1",8),o.YNc(9,GL,19,0,"ng-container",9),o.YNc(10,WL,16,0,"ng-container",9),o.YNc(11,XL,17,5,"ng-container",9),o.qZA(),o.TgZ(12,"div",10),o.YNc(13,tJ,5,0,"button",11),o.YNc(14,eJ,5,1,"button",12),o.YNc(15,nJ,7,1,"button",13),o.YNc(16,iJ,5,2,"button",14),o.YNc(17,oJ,6,2,"button",15),o.TgZ(18,"button",16),o.NdJ("click",function(){return e.openNewFolderModal()}),o.O4$(),o.TgZ(19,"svg",17),o._UZ(20,"path",18),o._UZ(21,"line",19),o._UZ(22,"line",20),o.qZA(),o._uU(23),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(24,"div",21),o.TgZ(25,"div",22),o.TgZ(26,"div",23),o.TgZ(27,"button",24),o.O4$(),o.TgZ(28,"svg",25),o._UZ(29,"path",26),o._UZ(30,"path",27),o.qZA(),o.qZA(),o.kcU(),o.TgZ(31,"input",28),o.NdJ("ngModelChange",function(t){return e.folderSearchTxt=t})("input",function(){return e.searchFolders(e.folderSearchTxt)}),o.qZA(),o.YNc(32,rJ,3,0,"button",29),o.qZA(),o.qZA(),o.YNc(33,dJ,11,3,"div",30),o.qZA(),o.YNc(34,uJ,1,0,"app-loader",9),o.YNc(35,pJ,9,0,"div",31),o.YNc(36,fJ,5,2,"div",31),o.YNc(37,Aj,39,13,"div",32),o.YNc(38,Jj,15,4,"div",33),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.ekj("menubaractive",e.isMenuBarActive),o.xp6(8),o.Q6J("ngIf",!e.currentFolderId&&!e.showFavoritesOnly&&!e.showTrash),o.xp6(1),o.Q6J("ngIf",e.showTrash),o.xp6(1),o.Q6J("ngIf",!e.currentFolderId&&e.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",e.currentFolderId&&e.currentFolder),o.xp6(2),o.Q6J("ngIf",e.hasSelectedConnects&&e.currentFolderId),o.xp6(1),o.Q6J("ngIf",e.selectedCount>0&&e.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",e.selectedCount>0&&!e.showFavoritesOnly),o.xp6(1),o.Q6J("ngIf",e.showTrash&&e.selectedTrashItems.size>0),o.xp6(1),o.Q6J("ngIf",e.showTrash&&e.selectedTrashItems.size>0),o.xp6(1),o.Q6J("disabled",e.currentFolderId&&e.childFolders.length>=5)("title",e.currentFolderId&&e.childFolders.length>=5?"Maximum of 5 sub-folders allowed per folder":""),o.xp6(5),o.hij(" ",e.currentFolderId?"Create":"Folders"," "),o.xp6(2),o.Q6J("ngClass",o.VKq(24,jj,e.folderSearchTxt)),o.xp6(6),o.Q6J("ngModel",e.folderSearchTxt)("placeholder","Search by folder name, connect name or ID"),o.xp6(1),o.Q6J("ngIf",e.folderSearchTxt),o.xp6(1),o.Q6J("ngIf",!e.currentFolderId),o.xp6(1),o.Q6J("ngIf",e.isLoading&&!e.showTrash),o.xp6(1),o.Q6J("ngIf",!e.showTrash&&!e.isLoading&&e.showFavoritesOnly&&(e.currentFolderId?0===e.childFolders.length&&0===e.folderConnects.length:0===e.flattenedTree.length&&0===e.folderConnects.length)),o.xp6(1),o.Q6J("ngIf",!e.showTrash&&!e.isLoading&&!e.showFavoritesOnly&&(e.currentFolderId?0===e.childFolders.length&&0===e.folderConnects.length:0===e.flattenedTree.length&&0===e.folderConnects.length)),o.xp6(1),o.Q6J("ngIf",!e.showTrash&&!e.isLoading&&(e.currentFolderId?e.childFolders.length>0||e.folderConnects.length>0:e.flattenedTree.length>0||e.folderConnects.length>0)),o.xp6(1),o.Q6J("ngIf",e.showTrash))},directives:[to.O5,to.mk,Xi.Fj,Xi.JJ,Xi.On,to.sg,tr,po],pipes:[to.uU],styles:['.table_folders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{border:0;justify-content:flex-start;grid-gap:.5rem;gap:.5rem;line-height:normal;border-radius:0;margin:auto;background:#FAFDFF;font-size:12px;padding:.5rem 1rem;color:var(--text-primary);border-bottom:1px solid #E7E7EB;display:flex;width:100%}.table_folders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:hover{color:var(--Primary-Color)}.table_folders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child   .dropdown-item[_ngcontent-%COMP%]{border-bottom:0}.table_folders[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child   .dropdown-item[_ngcontent-%COMP%]{color:#d81919!important}.table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:13px;vertical-align:middle;padding:12px;border-bottom:0}.table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:top;padding-top:20px}.table_folders[_ngcontent-%COMP%]   tr.child-folder[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:50px}.folder-row[_ngcontent-%COMP%]:hover, .connect-row[_ngcontent-%COMP%]:hover{background-color:#f8f9ff}.row-selected[_ngcontent-%COMP%]{background-color:#eef0ff!important}.item-name-cell[_ngcontent-%COMP%]{min-width:0;overflow:hidden}
1.item-name-cell[_ngcontent-%COMP%]:hover   .folder-name[_ngcontent-%COMP%]{color:#5371ff;color:var(--Primary-Color, #5371ff)}.connect-title-link[_ngcontent-%COMP%]:hover{color:#5371ff;color:var(--Primary-Color, #5371ff);text-decoration:underline}.table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:last-child, .table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child{width:80px;text-align:right}.table_folders[_ngcontent-%COMP%]   .col-owner[_ngcontent-%COMP%]{width:80px}.table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-weight:600;color:#1d1d1d;border-top:0;font-size:14px;padding:12px}.personAddButton[_ngcontent-%COMP%], .folder-owner[_ngcontent-%COMP%]{width:30px;height:30px;background-color:#f3f8ff;color:#000;display:flex;align-items:center;justify-content:center;border-radius:100px}.expandButton[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;background-color:transparent;border:0}@media only screen and (max-width: 1024px){.mar-15-b.d-flex[_ngcontent-%COMP%]{flex-wrap:wrap;grid-gap:.5rem!important;gap:.5rem!important}.searchtask-container[_ngcontent-%COMP%]{flex-wrap:wrap}.filter-container[_ngcontent-%COMP%]{width:100%;justify-content:flex-start!important}}@media only screen and (max-width: 800px){#folder-list-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{display:block}#folder-list-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{position:absolute;top:-9999px;left:-9999px}#folder-list-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{margin-bottom:12px;border-radius:12px;background-color:#fff;box-shadow:0 1px 4px #0000000f;border:1px solid #E7E7EB}#folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child, #folder-list-table[_ngcontent-%COMP%]   td.col-favorite[_ngcontent-%COMP%], #folder-list-table[_ngcontent-%COMP%]   td[data-title=""][_ngcontent-%COMP%]{display:none!important}#folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:none;border-bottom:1px solid #E7E7EB;position:relative;padding:11px 12px 11px 42%;white-space:normal;text-align:left;min-height:44px;display:flex;align-items:center}#folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child{border-bottom:none;border-bottom-left-radius:12px;border-bottom-right-radius:12px}#folder-list-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){border-top-left-radius:12px;border-top-right-radius:12px}#folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:before{position:absolute;top:50%;left:12px;transform:translateY(-50%);width:38%;white-space:nowrap;text-align:left;font-weight:600;color:#1d1d1d;font-size:12px;content:attr(data-title)}.table_folders[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child, .table_folders[_ngcontent-%COMP%]   .col-owner[_ngcontent-%COMP%]{width:100%!important}.table_folders[_ngcontent-%COMP%]{background:none!important;border:0!important}.mar-15-b.d-flex[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start!important;grid-gap:.75rem!important;gap:.75rem!important}.mar-15-b[_ngcontent-%COMP%]   .d-flex.align-items-center.gap-2[_ngcontent-%COMP%]{width:100%;justify-content:flex-end}.searchtask-container[_ngcontent-%COMP%]{flex-direction:column!important;align-items:stretch!important}.searchtask[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.searchtask[_ngcontent-%COMP%]   .position-relative[_ngcontent-%COMP%]{width:100%}.filter-container[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap;grid-gap:.5rem!important;gap:.5rem!important}.filter-item[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.filter-item[_ngcontent-%COMP%]   .filter-item-btn[_ngcontent-%COMP%]{width:100%}#folder-list-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .text-truncate[_ngcontent-%COMP%]{overflow:visible;white-space:normal;text-overflow:unset}}.connect-row[_ngcontent-%COMP%]   .checkmark[_ngcontent-%COMP%]:before, .folder-row[_ngcontent-%COMP%]   .checkmark[_ngcontent-%COMP%]:before, .container-checkbox[_ngcontent-%COMP%]   .checkmark[_ngcontent-%COMP%]:before{display:none}.col-favorite[_ngcontent-%COMP%]{width:40px;text-align:center}.favorite-btn[_ngcontent-%COMP%]{color:silver;transition:color .2s,transform .2s;line-height:1}.favorite-btn[_ngcontent-%COMP%]:hover{color:#f5a623;transform:scale(1.15)}.favorite-btn.is-favorite[_ngcontent-%COMP%]{color:#f5a623}.favorite-filter-btn[_ngcontent-%COMP%]{transition:background-color .2s,border-color .2s}.favorite-filter-btn.active[_ngcontent-%COMP%]{background-color:#5371ff!important;border-color:#5371ff!important;color:#fff}.h-40[_ngcontent-%COMP%]{height:45px;width:45px;display:flex;align-items:center;justify-content:center}.filter-item[_ngcontent-%COMP%]   .filter-item-btn[aria-expanded=false][_ngcontent-%COMP%]:before{top:18px;right:8px}.filter-item[_ngcontent-%COMP%]   .filter-item-btn[aria-expanded=true][_ngcontent-%COMP%]:before{transform:rotate(225deg);top:20px;right:8px}.expand-chevron-btn[_ngcontent-%COMP%]{width:24px;height:24px;min-width:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;color:#888;transition:transform .2s,color .2s,background-color .15s}.expand-chevron-btn[_ngcontent-%COMP%]:hover{background-color:#eef0ff;color:#5371ff}.expand-chevron-btn.expanded[_ngcontent-%COMP%]{transform:rotate(90deg)}.connect-app-icons[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:4px;gap:4px}.app-icon-item[_ngcontent-%COMP%]{position:relative;width:32px;height:32px;border-radius:25px;overflow:hidden;border:1px solid #e5e7eb;background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}.app-icon-img[_ngcontent-%COMP%]{width:16px;height:16px;-o-object-fit:contain;object-fit:contain;border-radius:4px}.app-icon-item.app-icon-more[_ngcontent-%COMP%]{background:#f3f4f6}.app-icon-extra-count[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#6b7280}.folder-header-left[_ngcontent-%COMP%]{flex:1 1 0;min-width:0}.folder-header-left[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{line-height:1.4!important}.folder-breadcrumb[_ngcontent-%COMP%]{font-size:13px;color:#74748a;color:var(--text-secondary, #74748a);min-width:0;line-height:1.8!important}.breadcrumb-back-btn[_ngcontent-%COMP%]{color:#74748a;color:var(--text-secondary, #74748a);display:flex;align-items:center;flex-shrink:0;transition:color .15s}.breadcrumb-back-btn[_ngcontent-%COMP%]:hover{color:#5371ff;color:var(--Primary-Color, #5371ff)}.breadcrumb-link[_ngcontent-%COMP%]{font-size:13px;color:#5371ff;color:var(--Primary-Color, #5371ff);line-height:2.2;padding:0;flex-shrink:1;min-width:0}.breadcrumb-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-sep[_ngcontent-%COMP%]{color:#bbb;color:var(--text-secondary, #bbb);font-size:13px;padding:0 2px;flex-shrink:0}.breadcrumb-current[_ngcontent-%COMP%]{font-size:13px;color:#74748a;color:var(--text-secondary, #74748a);font-weight:500;flex-shrink:1;min-width:0}.breadcrumb-item-max[_ngcontent-%COMP%]{max-width:160px}.folder-connect-count[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;background:#eef0ff;color:#5371ff;border-radius:10px;font-size:11px;font-weight:600;flex-shrink:0}.trash-view[_ngcontent-%COMP%]{animation:fadeInUp .18s ease}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
1.trash-icon-circle[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:10px;background:#fff3f3;color:#d81919;display:flex;align-items:center;justify-content:center;flex-shrink:0}.trash-count-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;background:#fee2e2;color:#d81919;border-radius:20px;font-size:11px;font-weight:700}.trash-info-banner[_ngcontent-%COMP%]{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:10px 14px;color:#92400e}.trash-info-banner[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#d97706}.trash-empty-state[_ngcontent-%COMP%]{text-align:center;padding:60px 20px;background:#fff;border-radius:16px;border:1px dashed #e7e7eb}.trash-empty-icon[_ngcontent-%COMP%]{width:72px;height:72px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;color:#9ca3af}.trash-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:8px;gap:8px}.trash-card[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:16px;gap:16px;background:#fff;border:1px solid #e7e7eb;border-radius:12px;padding:14px 16px;transition:box-shadow .15s,border-color .15s}.trash-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #00000012;border-color:#d1d5db}.trash-card-name[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;display:flex;align-items:center;grid-gap:10px;gap:10px}.trash-card-meta[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px;flex-shrink:0}.trash-deleted-date[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:4px;gap:4px;font-size:12px;color:#74748a}.trash-days-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:4px;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;background:#f3f4f6;color:#6b7280;flex-shrink:0}.trash-days-pill.trash-days-warning[_ngcontent-%COMP%]{background:#fff7ed;color:#c2410c}.trash-days-pill.trash-days-urgent[_ngcontent-%COMP%]{background:#fee2e2;color:#b91c1c}.trash-card-actions[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;flex-shrink:0}.trash-restore-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;font-size:13px;font-weight:500;padding:6px 14px;border-radius:20px;border:1.5px solid #5371ff;color:#5371ff;background:#fff;transition:background .15s,color .15s}.trash-restore-btn[_ngcontent-%COMP%]:hover{background:#5371ff;color:#fff}.trash-delete-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;font-size:13px;font-weight:500;padding:6px 14px;border-radius:20px;border:1.5px solid #fca5a5;color:#d81919;background:#fff;transition:background .15s,color .15s,border-color .15s}.trash-delete-btn[_ngcontent-%COMP%]:hover{background:#fee2e2;border-color:#d81919}html.dark[_nghost-%COMP%]   .trash-icon-circle[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-icon-circle[_ngcontent-%COMP%]{background:rgba(218,54,51,.15);color:#f85149}html.dark[_nghost-%COMP%]   .trash-count-badge[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-count-badge[_ngcontent-%COMP%]{background:rgba(218,54,51,.15);color:#f85149}html.dark[_nghost-%COMP%]   .trash-info-banner[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-info-banner[_ngcontent-%COMP%]{background:rgba(158,106,3,.12);border-color:#9e6a034d;color:#e3b341}html.dark[_nghost-%COMP%]   .trash-info-banner[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-info-banner[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#e3b341}html.dark[_nghost-%COMP%]   .trash-empty-state[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-empty-state[_ngcontent-%COMP%]{background:#161b22;background:var(--card-bg, #161b22);border-color:#30363d;border-color:var(--border-color, #30363d)}html.dark[_nghost-%COMP%]   .trash-empty-icon[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-empty-icon[_ngcontent-%COMP%]{background:#21262d;background:var(--tertiary-bg, #21262d);color:#7d8590;color:var(--secondary-text, #7d8590)}html.dark[_nghost-%COMP%]   .trash-card[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-card[_ngcontent-%COMP%]{background:#161b22;background:var(--card-bg, #161b22);border-color:#30363d;border-color:var(--border-color, #30363d)}html.dark[_nghost-%COMP%]   .trash-card[_ngcontent-%COMP%]:hover, html.dark   [_nghost-%COMP%]   .trash-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #0000004d;border-color:#30363d;border-color:var(--border-color, #30363d)}html.dark[_nghost-%COMP%]   .trash-days-pill[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-days-pill[_ngcontent-%COMP%]{background:#21262d;background:var(--tertiary-bg, #21262d);color:#7d8590;color:var(--secondary-text, #7d8590)}html.dark[_nghost-%COMP%]   .trash-days-pill.trash-days-warning[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-days-pill.trash-days-warning[_ngcontent-%COMP%]{background:rgba(158,106,3,.15);color:#e3b341}html.dark[_nghost-%COMP%]   .trash-days-pill.trash-days-urgent[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-days-pill.trash-days-urgent[_ngcontent-%COMP%]{background:rgba(218,54,51,.15);color:#f85149}html.dark[_nghost-%COMP%]   .trash-restore-btn[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-restore-btn[_ngcontent-%COMP%]{background:transparent;color:#6c82ff;color:var(--accent-color, #6c82ff);border-color:#6c82ff;border-color:var(--accent-color, #6c82ff)}html.dark[_nghost-%COMP%]   .trash-restore-btn[_ngcontent-%COMP%]:hover, html.dark   [_nghost-%COMP%]   .trash-restore-btn[_ngcontent-%COMP%]:hover{background:#6c82ff;background:var(--accent-color, #6c82ff);color:#fff}html.dark[_nghost-%COMP%]   .trash-delete-btn[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .trash-delete-btn[_ngcontent-%COMP%]{background:transparent;color:#f85149;border-color:#f8514966}html.dark[_nghost-%COMP%]   .trash-delete-btn[_ngcontent-%COMP%]:hover, html.dark   [_nghost-%COMP%]   .trash-delete-btn[_ngcontent-%COMP%]:hover{background:rgba(218,54,51,.15);border-color:#f85149}.trash-list[_ngcontent-%COMP%]   .container-checkbox[_ngcontent-%COMP%], .trash-view[_ngcontent-%COMP%] > .d-flex[_ngcontent-%COMP%]   .container-checkbox[_ngcontent-%COMP%]{min-width:20px;min-height:20px;
1display:inline-block}.remove-folder-btn[_ngcontent-%COMP%]{color:var(--Primary-Color);border:1px solid var(--Primary-Color);transition:all .2s ease}.remove-folder-btn[_ngcontent-%COMP%]:hover{background:var(--Primary-Color);color:#fff}.btn.remove-fav-btn[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%], html.dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]{color:var(--Primary-Color)!important;background:transparent!important;background-color:transparent!important;border:1px solid var(--Primary-Color)!important;padding:6px 14px;transition:all .2s ease;white-space:nowrap}.btn.remove-fav-btn[_ngcontent-%COMP%]:hover, .theme-dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover, html.dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover, html.dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover{background:var(--Primary-Color)!important;background-color:var(--Primary-Color)!important;border-color:var(--Primary-Color)!important;color:#fff!important;box-shadow:0 2px 6px #0000002e}.btn.remove-fav-btn[_ngcontent-%COMP%]   .remove-fav-count[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]   .remove-fav-count[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]   .remove-fav-count[_ngcontent-%COMP%], html.dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]   .remove-fav-count[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]   .remove-fav-count[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--Primary-Color)!important;background-color:var(--Primary-Color)!important;color:#fff!important;font-size:11px;font-weight:600;line-height:1}.btn.remove-fav-btn[_ngcontent-%COMP%]:hover   .remove-fav-count[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover   .remove-fav-count[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover   .remove-fav-count[_ngcontent-%COMP%], html.dark[_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover   .remove-fav-count[_ngcontent-%COMP%], html.dark   [_nghost-%COMP%]   .btn.remove-fav-btn[_ngcontent-%COMP%]:hover   .remove-fav-count[_ngcontent-%COMP%]{background:#fff!important;background-color:#fff!important;color:var(--Primary-Color)!important;font-weight:700}.folder-connect-name-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:0;gap:0;min-width:0;line-height:1.15}.folder-connect-name-cell[_ngcontent-%COMP%]   .connectname[_ngcontent-%COMP%], .folder-connect-name-cell[_ngcontent-%COMP%]   .connectname[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{margin:0!important;padding:0!important;line-height:1.15!important}.folder-connect-name-cell[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]{margin:0!important;padding:0!important;line-height:1.15!important;max-width:-moz-max-content;max-width:max-content;font-size:inherit;opacity:.8;transition:opacity .15s ease,color .15s ease}.folder-connect-name-cell[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .folder-connect-name-cell[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]   .folder-copy-icon[_ngcontent-%COMP%]{font-size:inherit;line-height:1.15}.folder-connect-name-cell[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]:hover{opacity:1;color:var(--Primary-Color)}.folder-connect-name-cell[_ngcontent-%COMP%]   .folder-copy-icon[_ngcontent-%COMP%]{opacity:.7;color:inherit;transition:opacity .15s ease}.folder-connect-name-cell[_ngcontent-%COMP%]   .appid_connect[_ngcontent-%COMP%]:hover   .folder-copy-icon[_ngcontent-%COMP%]{opacity:1}.folder-connect-name-cell[_ngcontent-%COMP%]   .folder-copy-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:16px;height:16px;stroke-width:1.6}.connect-folder-tag[_ngcontent-%COMP%]{background:#f0f4ff;border-radius:4px;padding:1px 6px;max-width:-moz-fit-content;max-width:fit-content}']}),t})();function $j(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",27),o.TgZ(1,"span",28),o._uU(2),o.qZA(),o.TgZ(3,"button",29),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return"published"===e.activeTab?e.toggleSelectAll():e.toggleSelectAllDrafts()}),o._uU(4,"Select All"),o.qZA(),o.TgZ(5,"button",29),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).unselectAllUserTools()}),o._uU(6,"Clear"),o.qZA(),o.TgZ(7,"button",30),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).deleteMultipleTools()}),o.O4$(),o.TgZ(8,"svg",31),o._UZ(9,"path",32),o._UZ(10,"path",33),o._UZ(11,"path",34),o._UZ(12,"path",35),o.qZA(),o._uU(13," Delete "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(2),o.hij("Selected (",t.checkIfSelectedCount(),")")}}function Bj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",40),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).toggleListViewChange()}),o.O4$(),o.TgZ(1,"svg",41),o._UZ(2,"path",42),o._UZ(3,"path",43),o._UZ(4,"path",44),o._UZ(5,"path",45),o.qZA(),o.qZA()}}function Hj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",46),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).toggleCardViewChange()}),o.O4$(),o.TgZ(1,"svg",47),o._UZ(2,"path",48),o._UZ(3,"path",49),o._UZ(4,"path",50),o._UZ(5,"path",51),o._UZ(6,"path",52),o._UZ(7,"path",53),o.qZA(),o.qZA()}}function Qj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",54),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).toggleForm()}),o.O4$(),o.TgZ(1,"svg",55),o._UZ(2,"rect",56),o._UZ(3,"path",57),o._UZ(4,"path",58),o.qZA(),o.qZA()}}
1function Yj(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",36),o.YNc(1,Bj,6,0,"button",37),o.YNc(2,Hj,8,0,"button",38),o.YNc(3,Qj,5,0,"button",39),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",t.isListViewButton),o.xp6(1),o.Q6J("ngIf",t.isCardViewButton),o.xp6(1),o.Q6J("ngIf",t.showButton)}}function zj(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"form",59),o.TgZ(1,"div",60),o.TgZ(2,"button",61),o.O4$(),o.TgZ(3,"svg",62),o._UZ(4,"rect",56),o._UZ(5,"path",57),o._UZ(6,"path",58),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"input",63,64),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(3).searchTxt=e}),o.qZA(),o.TgZ(9,"button",65),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).hideForm()}),o.O4$(),o.TgZ(10,"svg",31),o._UZ(11,"path",66),o._UZ(12,"path",67),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(7),o.s9C("placeholder",t.translation.FILTER_CONNECTS),o.Q6J("ngModel",t.searchTxt)}}function Vj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",8),o.TgZ(1,"div",15),o.TgZ(2,"div",16),o.TgZ(3,"button",17),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setActiveTab("published")}),o.O4$(),o.TgZ(4,"svg",18),o._UZ(5,"path",19),o.qZA(),o._uU(6," Published "),o.qZA(),o.kcU(),o.TgZ(7,"button",20),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setActiveTab("draft")}),o.O4$(),o.TgZ(8,"svg",21),o._UZ(9,"path",22),o._UZ(10,"path",23),o.qZA(),o._uU(11," Draft "),o.qZA(),o.qZA(),o.YNc(12,$j,14,1,"div",24),o.YNc(13,Yj,4,3,"div",25),o.YNc(14,zj,13,2,"form",26),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(3),o.ekj("active","published"===t.activeTab),o.xp6(4),o.ekj("active","draft"===t.activeTab),o.xp6(5),o.Q6J("ngIf",!t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",t.checkIfNoneSelected()),o.xp6(1),o.Q6J("ngIf",t.showForm)}}function Gj(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.TgZ(1,"label",82),o.TgZ(2,"input",83),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(4).selectedAll=e})("ngModelChange",function(){o.CHM(t);const e=o.oxw(4);return e.selectAll(e.userToolsConnects)}),o.qZA(),o._UZ(3,"span",84),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.Q6J("ngModel",t.selectedAll)}}function Wj(t,e){if(1&t&&(o.TgZ(0,"div",73),o.YNc(1,Gj,4,1,"div",74),o.TgZ(2,"div",75),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA(),o.TgZ(5,"div",76),o.TgZ(6,"span"),o._uU(7,"ID"),o.qZA(),o.qZA(),o.TgZ(8,"div",77),o.TgZ(9,"span"),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"div",78),o.TgZ(12,"span"),o._uU(13,"Created On"),o.qZA(),o.qZA(),o.TgZ(14,"div",79),o.TgZ(15,"span"),o._uU(16,"Last edit"),o.qZA(),o.qZA(),o.TgZ(17,"div",80),o.TgZ(18,"span"),o._uU(19,"Actions"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngIf",t.userToolsConnects.length>0),o.xp6(3),o.Oqu(t.translation.CONNECT_NAME||"Name"),o.xp6(6),o.Oqu(t.translation.CONNECT_APPS||"Apps")}}function Kj(t,e){if(1&t&&(o.TgZ(0,"div",96),o.TgZ(1,"div",97),o.TgZ(2,"div",98),o._UZ(3,"img",99),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.xp6(3),o.s9C("src",t.actionImage?e.appyConfig.cdnMediaPath+t.actionImage:e.appyConfig.cdnMediaPath+"connect.png",o.LSH)}}function Xj(t,e){1&t&&(o.TgZ(0,"div",121),o._UZ(1,"span",122),o._uU(2," Active "),o.qZA())}function tR(t,e){1&t&&(o.TgZ(0,"div",121),o._UZ(1,"span",123),o._uU(2," InActive "),o.qZA())}function eR(t,e){1&t&&(o.TgZ(0,"button",124),o._UZ(1,"span",122),o._uU(2," Active "),o.qZA())}function nR(t,e){1&t&&(o.TgZ(0,"button",124),o._UZ(1,"span",123),o._uU(2," InActive "),o.qZA())}function iR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",87),o.TgZ(1,"div",88),o.TgZ(2,"label",82),o._uU(3,"Select "),o.TgZ(4,"input",83),o.NdJ("ngModelChange",function(e){return o.CHM(t).$implicit.Selected=e})("ngModelChange",function(){const e=o.CHM(t).$implicit;return o.oxw(4).checkIfAllSelected(e)}),o.qZA(),o._UZ(5,"span",89),o.qZA(),o.qZA(),o.TgZ(6,"div",90),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o.TgZ(7,"span",91),o.TgZ(8,"a",92),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",93),o.TgZ(11,"span",94),o._uU(12),o.qZA(),o.qZA(),o.TgZ(13,"div",95),o.TgZ(14,"div",96),o.TgZ(15,"div",97),o.TgZ(16,"div",98),o._UZ(17,"img",99),o.qZA(),o.qZA(),o.qZA(),o.YNc(18,Kj,4,1,"div",100),o.qZA(),o.TgZ(19,"div",78),o.TgZ(20,"span",101),o._uU(21,"Created On: "),o.qZA(),o.TgZ(22,"span"),o._uU(23),o.ALo(24,"date"),o.qZA(),o.qZA(),o.TgZ(25,"div",79),o.TgZ(26,"span",101),o._uU(27,"Last edit: "),o.qZA(),o.TgZ(28,"strong"),o._uU(29),o.ALo(30,"date"),o.qZA(),o.qZA(),o.TgZ(31,"div",102),o.YNc(32,Xj,3,0,"div",103),o.YNc(33,tR,3,0,"div",103),o.TgZ(34,"div",104),o.YNc(35,eR,3,0,"button",105),o.YNc(36,nR,3,0,"button",105),o.qZA(),o.TgZ(37,"div",106),o.TgZ(38,"button",107),o.O4$(),o.TgZ(39,"svg",108),o._UZ(4
10,"path",109),o.qZA(),o.qZA(),o.kcU(),o.TgZ(41,"div",110),o.TgZ(42,"ul",111),o.TgZ(43,"li"),o.TgZ(44,"a",112),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).deleteTool(e.connectId)}),o.TgZ(45,"span",113),o.O4$(),o.TgZ(46,"svg",114),o._UZ(47,"path",115),o._UZ(48,"path",116),o._UZ(49,"path",117),o._UZ(50,"path",118),o._UZ(51,"path",119),o.qZA(),o.qZA(),o.kcU(),o.TgZ(52,"span",120),o._uU(53,"Delete Tool"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4);o.Q6J("id","tool"+n),o.xp6(1),o.Q6J("ngClass",0==i.selectedIds.length?"class-if-not-selected":"class-if--selected"),o.xp6(3),o.Q6J("ngModel",t.Selected),o.xp6(3),o.uIk("data-tooltip",t.connectTitle),o.xp6(2),o.hij(" ",t.connectTitle," "),o.xp6(1),o.MGl("id","tool",n,""),o.xp6(2),o.Oqu(t.connectId),o.xp6(5),o.s9C("src",t.triggerImage?i.appyConfig.cdnMediaPath+t.triggerImage:i.appyConfig.cdnMediaPath+"connect.png",o.LSH),o.xp6(1),o.Q6J("ngIf",t.actionImage&&t.actionImage!==t.triggerImage),o.xp6(5),o.Oqu(o.Dn7(24,16,t._created_at,"MM-dd-yyyy","localTimezone")),o.xp6(6),o.Oqu(o.Dn7(30,20,t._updated_at,"MM-dd-yyyy","localTimezone")),o.xp6(3),o.Q6J("ngIf",1==t.status),o.xp6(1),o.Q6J("ngIf",0==t.status),o.xp6(2),o.Q6J("ngIf",1==t.status),o.xp6(1),o.Q6J("ngIf",1!=t.status),o.xp6(2),o.Q6J("id","toolDropdownMenuLink"+n)}}function oR(t,e){if(1&t&&(o.TgZ(0,"ul",85),o.YNc(1,iR,54,24,"li",86),o.ALo(2,"slice"),o.ALo(3,"filterConnects"),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",o.Dn7(2,1,o.xi3(3,5,t.userToolsConnects,t.searchTxt),0,t.completeFilLim))}}function rR(t,e){1&t&&(o.TgZ(0,"div",125),o.TgZ(1,"p",126),o._uU(2,"No tools found. Tools are connects with a single app/action."),o.qZA(),o.qZA())}function sR(t,e){if(1&t&&(o.TgZ(0,"div",125),o.TgZ(1,"p",126),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.hij('No tools found matching "',t.searchTxt,'"')}}const aR=function(t,e){return{"card-view":t,"list-view":e}};function cR(t,e){if(1&t&&(o.TgZ(0,"div",68),o.TgZ(1,"div",69),o.YNc(2,Wj,20,3,"div",70),o.YNc(3,oR,4,8,"ul",71),o.YNc(4,rR,3,0,"div",72),o.YNc(5,sR,3,1,"div",72),o.ALo(6,"filterConnects"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngClass",o.WLB(8,aR,!t.isClassViewChange,t.isClassViewChange)),o.xp6(1),o.Q6J("ngIf",t.userToolsConnects.length>=1||t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.userToolsConnects.length>=1),o.xp6(1),o.Q6J("ngIf",0===t.userToolsConnects.length&&!t.testloader&&!t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.searchTxt&&0===o.xi3(6,5,t.userToolsConnects,t.searchTxt).length)}}function lR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"label",82),o.TgZ(1,"input",83),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(4).selectedAllDrafts=e})("ngModelChange",function(){o.CHM(t);const e=o.oxw(4);return e.selectAllDrafts(e.userDraftToolsConnects)}),o.qZA(),o._UZ(2,"span",84),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngModel",t.selectedAllDrafts)}}function dR(t,e){if(1&t&&(o.TgZ(0,"div",73),o.TgZ(1,"div",129),o.YNc(2,lR,3,1,"label",130),o.qZA(),o.TgZ(3,"div",75),o.TgZ(4,"span"),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"div",76),o.TgZ(7,"span"),o._uU(8,"ID"),o.qZA(),o.qZA(),o.TgZ(9,"div",77),o.TgZ(10,"span"),o._uU(11),o.qZA(),o.qZA(),o.TgZ(12,"div",78),o.TgZ(13,"span"),o._uU(14,"Created On"),o.qZA(),o.qZA(),o.TgZ(15,"div",79),o.TgZ(16,"span"),o._uU(17,"Last edit"),o.qZA(),o.qZA(),o.TgZ(18,"div",80),o.TgZ(19,"span"),o._uU(20,"Actions"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("ngIf",t.userDraftToolsConnects.length>0),o.xp6(3),o.Oqu(t.translation.CONNECT_NAME||"Name"),o.xp6(6),o.Oqu(t.translation.CONNECT_APPS||"Apps")}}function uR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",87),o.TgZ(1,"div",88),o.TgZ(2,"label",82),o._uU(3,"Select "),o.TgZ(4,"input",83),o.NdJ("ngModelChange",function(e){return o.CHM(t).$implicit.Selected=e})("ngModelChange",function(){const e=o.CHM(t).$implicit;return o.oxw(4).checkIfAllSelectedDrafts(e)}),o.qZA(),o._UZ(5,"span",89),o.qZA(),o.qZA(),o.TgZ(6,"div",90),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o.TgZ(7,"span",91),o.TgZ(8,"a",92),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.TgZ(10,"div",93),o.TgZ(11,"span",94),o._uU(12),o.qZA(),o.qZA(),o.TgZ(13,"div",95),o.TgZ(14,"div",96),o.TgZ(15,"div",97),o.TgZ(16,"div",98),o._UZ(17,"img",99),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(18,"div",78),o.TgZ(19,"span",101),o._uU(20,"Created On: "),o.qZA(),o.TgZ(21,"span"),o._uU(22),o.ALo(23,"date"),o.qZA(),o.qZA(),o.TgZ(24,"div",79),o.TgZ(25,"span",101),o._uU(26,"Last edit: "),o.qZA(),o.TgZ(27,"strong"),o._uU(28),o.ALo(29,"date"),o.qZA(),o.qZA(),o.TgZ(30,"div",102),o.TgZ(31,"ul",131),o.TgZ(32,"li",132),o.TgZ(33,"a",133),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).clickProp(n.connectId,e)}),o._uU(34," Edit "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(35,"div",106),o.TgZ(36,"button",107),o.O4$(),o.TgZ(37,"svg",108),o._UZ(38,"path",109),o.qZA(),o.qZA(),o.kcU(),o.TgZ(39,"div",134),o.TgZ(40,"ul",111),o.TgZ(41,"li"),o.TgZ(42,"a",112),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(4).deleteTool(e.connectId)}),o.TgZ(43,"span",113),o.O4$(),o.TgZ(44,"svg",114),o._UZ(45,"path",115),o._UZ(46,"path",116),o._UZ(47,"path",117),o._UZ(48,"path",118),o._UZ(49,"path",119),o.qZA(),o.qZA(),o.kcU(),o.TgZ(50,"span",120),o._uU(51,"Delete Tool"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(4);o.Q6J("id","draftTool"+n),o.xp6(1),o.Q6J("ngClass",0==i.selectedDraftsIds.length?"class-if-not-selected":"class-if--selected"),o.xp6(3),o.Q6J("ngModel",t.Selected),o.xp6(3),o.uIk("data-tooltip",t.connectTitle),o.xp6(2),o.hij(" ",t.connectTitle," "),o.xp6(1),o.MGl("id","draftTool",n,""),o.xp6(2),o.Oqu(t.connectId),o.xp6(5),o.s9C("src",t.triggerImage?i.appyConfig.cdnMediaPath+t.triggerImage:i.appyConfig.cdnMediaPath+"connect.png",o.LSH),o.xp6(5),o.Oqu(o.Dn7(23,11,t._created_at,"MM-dd-yyyy","localTimezone")),o.xp6(6),o.Oqu(o.Dn7(29,15,t._updated_at,"MM-dd-yyyy","localTimezone")),o.xp6(8),o.Q6J("id","draftToolDropdownMenuLink"+n)}}
1function pR(t,e){if(1&t&&(o.TgZ(0,"ul",85),o.YNc(1,uR,52,19,"li",86),o.ALo(2,"slice"),o.ALo(3,"filterConnects"),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",o.Dn7(2,1,o.xi3(3,5,t.userDraftToolsConnects,t.searchTxt),0,t.draftFilLim))}}function hR(t,e){1&t&&(o.TgZ(0,"div",125),o.TgZ(1,"p",126),o._uU(2,"No draft tools found."),o.qZA(),o.qZA())}function gR(t,e){if(1&t&&(o.TgZ(0,"div",125),o.TgZ(1,"p",126),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.hij('No draft tools found matching "',t.searchTxt,'"')}}function fR(t,e){if(1&t&&(o.TgZ(0,"div",127),o.TgZ(1,"div",128),o.YNc(2,dR,21,3,"div",70),o.YNc(3,pR,4,8,"ul",71),o.YNc(4,hR,3,0,"div",72),o.YNc(5,gR,3,1,"div",72),o.ALo(6,"filterConnects"),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngClass",o.WLB(8,aR,!t.isClassViewChange,t.isClassViewChange)),o.xp6(1),o.Q6J("ngIf",t.userDraftToolsConnects.length>=1||t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.userDraftToolsConnects.length>=1),o.xp6(1),o.Q6J("ngIf",0===t.userDraftToolsConnects.length&&!t.testloader&&!t.searchTxt),o.xp6(1),o.Q6J("ngIf",t.searchTxt&&0===o.xi3(6,5,t.userDraftToolsConnects,t.searchTxt).length)}}const mR=function(t){return{"User-connects":t}};function vR(t,e){if(1&t&&(o.TgZ(0,"main",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"div",5),o.TgZ(4,"div",6),o.TgZ(5,"div",7),o.TgZ(6,"div",5),o.TgZ(7,"div",8),o.TgZ(8,"div",9),o.TgZ(9,"h1",10),o._uU(10,"My Tools"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",11),o.YNc(12,Vj,15,7,"div",12),o.TgZ(13,"div",8),o.YNc(14,cR,7,11,"div",13),o.YNc(15,fR,7,11,"div",14),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.xp6(11),o.Q6J("ngClass",o.VKq(6,mR,0==t.userToolsConnects.length&&0==t.userDraftToolsConnects.length)),o.xp6(1),o.Q6J("ngIf",t.userToolsConnects.length>0||t.userDraftToolsConnects.length>0),o.xp6(2),o.Q6J("ngIf","published"===t.activeTab),o.xp6(1),o.Q6J("ngIf","draft"===t.activeTab)}}function bR(t,e){1&t&&o._UZ(0,"app-loader")}let xR=(()=>{class t{constructor(t,e,n,i,o,r,s){this.cusService=t,this.translatorService=e,this.commonService=n,this.customerConnectService=i,this.router=o,this.actRoute=r,this.modalService=s,this.appyConfig=go.N,this.userToolsConnects=[],this.userDraftToolsConnects=[],this.activeTab="published",this.testloader=!0,this.completeFilLim=20,this.draftFilLim=20,this.showForm=!1,this.showButton=!0,this.isClassViewChange=!1,this.isListViewButton=!0,this.isCardViewButton=!1,this.isMenuBarActive=!0,this.selectedIds=[],this.selectedAll=!1,this.selectedDraftsIds=[],this.selectedAllDrafts=!1}ngOnInit(){this.currentUser=this.cusService.GetCurrent(),this.translatorService.getMultipleTranslation("en",["user","custom_connect"]).subscribe(t=>{this.translation=t}),this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t}),"1"===localStorage.getItem("isGridView")&&this.toggleListViewChange(),this.loadToolsConnects()}loadToolsConnects(){this.testloader=!0,this.customerConnectService.getUserConnectList({connectStatus:"Completed",pageSize:this.completeFilLim}).subscribe(t=>{if(t&&t.userConnects){console.log("Raw API result - first connect:",t.userConnects[0]);const e=this.formatConnectData(t);console.log("Formatted data:",e),this.userToolsConnects=e.filter(t=>1===t.totalApp),console.log("Tools connects data:",this.userToolsConnects),this.userToolsConnects.forEach((t,e)=>{console.log(`Connect ${e} has triggerImage:`,t.triggerImage)})}this.testloader=!1},t=>{console.error("Error loading tools connects:",t),this.testloader=!1})}formatConnectData(t){var e,n,i;const o={},r={};if(t&&t.userConnects)for(let a=0;a<t.userConnects.length;a++){const s=t.userConnects[a].connectId;if(o[s]||(o[s]={},r[s]=[]),r[s].push(s),o[s].connectId=s,o[s].connectTitle="string"==typeof t.userConnects[a].connectTitle&&t.userConnects[a].connectTitle.trim().length>0?t.userConnects[a].connectTitle:s,o[s].status=t.userConnects[a].status,o[s].connectStatus=t.userConnects[a].connectStatus,o[s]._created_at=t.userConnects[a].oldest_created_at,o[s]._updated_at=t.userConnects[a].recent_updated_at,o[s].customConnect=t.userConnects[a].customConnect,0==t.userConnects[a].index||!o[s].triggerImage){const e=t.userConnects[a].triggerImage||t.userConnects[a].image;e&&(o[s].triggerImage=e,o[s].triggerAppName=t.userConnects[a].appName)}if(0==t.userConnects[a].index){const r=(null===(n=null===(e=t.userConnects[a])||void 0===e?void 0:e.childIndex)||void 0===n?void 0:n.length)>0?null===(i=t.userConnects[a])||void 0===i?void 0:i.childIndex[0]:null;if(null!==r){const e=t.userConnects.find(t=>t.connectId===s&&t.index==r);e&&(o[s].actionImage=e.triggerImage||e.image,o[s].actionAppName=e.appName)}}}const s=[];for(const a of Object.keys(o))o[a].totalApp=r[a].length,s.push(o[a]);return s}setActiveTab(t){this.activeTab=t,this.unselectAllUserTools(),"draft"===t&&0===this.userDraftToolsConnects.length?this.loadDraftToolsConnects():"published"===t&&0===this.userToolsConnects.length&&this.loadToolsConnects()}loadDraftToolsConnects(){this.testloader=!0,this.customerConnectService.getUserConnectList({connectStatus:"Draft",pageSize:this.draftFilLim}).subscribe(t=>
1{if(t&&t.userConnects){const e=this.formatConnectData(t);this.userDraftToolsConnects=e.filter(t=>1===t.totalApp)}this.testloader=!1},t=>{console.error("Error loading draft tools connects:",t),this.testloader=!1})}clickProp(t,e){"BUTTON"!==e.target.tagName&&"INPUT"!==e.target.tagName&&(e.preventDefault(),this.router.navigateByUrl(`/customeditor/${t}/action/${t}`))}toggleForm(){this.showForm=!this.showForm,this.showButton=!1}hideForm(){this.showForm=!1,this.showButton=!0,this.searchTxt=""}toggleListViewChange(){this.isClassViewChange=!this.isClassViewChange,localStorage.setItem("isGridView",this.isClassViewChange?"1":"0"),this.isListViewButton=!1,this.isCardViewButton=!0}toggleCardViewChange(){this.isClassViewChange=!this.isClassViewChange,localStorage.setItem("isGridView",this.isClassViewChange?"1":"0"),this.isCardViewButton=!1,this.isListViewButton=!0}checkIfAllSelected(t){if(!0===t.Selected&&!1===this.selectedAll&&this.selectedIds.push(t.connectId),!1===t.Selected){const e=this.selectedIds.indexOf(t.connectId);this.selectedIds.splice(e,1)}this.selectedAll=this.userToolsConnects.every(t=>!0===t.Selected),this.checked=this.userToolsConnects.filter(t=>!0===t.Selected).length,this.checked===this.completeFilLim&&(this.selectedAll=!0)}checkIfNoneSelected(){return 0===this.selectedIds.concat(this.selectedDraftsIds).length}checkIfSelectedCount(){return this.selectedIds.concat(this.selectedDraftsIds).length}toggleSelectAll(){this.selectedAll=!this.selectedAll,this.selectAll(this.userToolsConnects)}selectAll(t){this.selectedAll?t.forEach((t,e)=>{this.completeFilLim>e&&!this.selectedIds.includes(t.connectId)&&(t.Selected=!0,this.selectedIds.push(t.connectId))}):this.unselectAllUserTools()}unselectAllUserTools(){this.userToolsConnects.forEach(t=>t.Selected=!1),this.userDraftToolsConnects.forEach(t=>t.Selected=!1),this.selectedIds=[],this.selectedDraftsIds=[],this.selectedAll=!1,this.selectedAllDrafts=!1}checkIfAllSelectedDrafts(t){if(!0===t.Selected&&!1===this.selectedAllDrafts&&this.selectedDraftsIds.push(t.connectId),!1===t.Selected){const e=this.selectedDraftsIds.indexOf(t.connectId);this.selectedDraftsIds.splice(e,1)}this.selectedAllDrafts=this.userDraftToolsConnects.every(t=>!0===t.Selected),this.checkedDrafts=this.userDraftToolsConnects.filter(t=>!0===t.Selected).length,this.checkedDrafts===this.draftFilLim&&(this.selectedAllDrafts=!0)}toggleSelectAllDrafts(){this.selectedAllDrafts=!this.selectedAllDrafts,this.selectAllDrafts(this.userDraftToolsConnects)}selectAllDrafts(t){this.selectedAllDrafts?t.forEach((t,e)=>{this.draftFilLim>e&&!this.selectedDraftsIds.includes(t.connectId)&&(t.Selected=!0,this.selectedDraftsIds.push(t.connectId))}):this.unselectAllUserTools()}deleteMultipleTools(){let t=this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE_MANY_CONNECTS;const e=this.selectedIds.concat(this.selectedDraftsIds),n=e.filter((t,n)=>e.indexOf(t)===n);let i=n.length;t=1===i?this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE:t.replace("__NUMBER__",i.toString()),this.bsModalRef=this.modalService.show(RO,{initialState:{modelTitle:"Delete Selected Tools",modelContent:t,translation:this.translation,IsDelete:!0}}),this.bsModalRef.content.onClose.subscribe(t=>{t&&(this.testloader=!0,this.customerConnectService.deleteManyConnects({connectIds:n}).subscribe(t=>{"success"===t.message&&(this.selectedIds=[],this.selectedDraftsIds=[],this.unselectAllUserTools(),this.reloadToolsConnects())}))})}reloadToolsConnects(){this.cusService.getCurrentUser({}).subscribe(t=>{this.cusService.setCurrent(t),"published"===this.activeTab?this.loadToolsConnects():this.loadDraftToolsConnects()})}deleteTool(t){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Delete Tool?",modelContent:this.translation.ARE_YOU_SURE_YOU_WANT_TO_DELETE,modelConnectId:t,translation:this.translation,IsDelete:!0}}),this.bsModalRef.content.onClose.subscribe(e=>{e&&(this.testloader=!0,"published"===this.activeTab?this.customerConnectService.deleteUserConnectCron(t).subscribe(e=>{this.customerConnectService.deleteUserConnects(t).subscribe(()=>{this.reloadToolsConnects()})}):this.customerConnectService.deleteUserConnects(t).subscribe(()=>{this.reloadToolsConnects()}))})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(Eo),o.Y36(wo.v),o.Y36(Fo),o.Y36(ui.F0),o.Y36(ui.gz),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-tools"]],decls:2,vars:2,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ui-view","content",3,"menubaractive",4,"ngIf"],[4,"ngIf"],["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","myConnectpage",1,"dashboard-middle","clearfix","sectionpadding"],[1,"col-sm-12"],[1,"d-flex","align-items-center","justify-content-between","mb-3","mb-md-4"],[1,"fs-3","fw-semibold","lh-base","mb-0"],[1,"containerCustom","clearfix","bg-white","rounded-4","p-3","p-xl-4",3,"ngClass"],["class","col-sm-12",4,"ngIf"],["class","publishedTabs",4,"ngIf"],["class","draftTabs",4,"ngIf"],[1,"d-flex","align-items-center","flex-wrap","gap-4","justify-content-between","mb-3"],[1,"tabs","d-flex","align-items-center","gap-3"],[1,"tabs-btn","published-btn",3,"click"],["stroke","currentColor","fill","CurrentColor","stroke-width","0","viewBox","0 0 24 24","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11.0026 16L18.0737 8.92893L16.6595 7.51472L11.0026 13.1716L8.17421 10.3431L6.75999 11.7574L11.0026 16Z"],[1,"tabs-btn","draft
1-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","none"],["d","M13.4 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V12.6","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M18.4 2.59999C18.8168 2.33093 19.3133 2.21284 19.8066 2.26538C20.3 2.31793 20.7604 2.53794 21.1112 2.88876C21.4621 3.23957 21.6821 3.70001 21.7346 4.19336C21.7872 4.6867 21.6691 5.18315 21.4 5.59999L16 11L12 12L13 7.99999L18.4 2.59999Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","d-flex align-items-center gap-md-3 flex-wrap justify-content-center ms-lg-auto mobile_fonts",4,"ngIf"],["class","searchconnect d-flex align-items-center gap-3 flex-wrap ms-lg-auto",4,"ngIf"],["class","formseach d-none d-lg-block","method","post",4,"ngIf"],[1,"d-flex","align-items-center","gap-md-3","flex-wrap","justify-content-center","ms-lg-auto","mobile_fonts"],[1,"fw-normal","text-color","p-2","f-14"],["type","button",1,"btn","fw-normal","text-color","p-2","f-14","fw-normal","text-color","p-2",3,"click"],["type","button",1,"btn","fw-normal","text-color","p-2","f-14","delete_button","d-inline-flex","align-items-center","gap-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M2.80005 5.20001H17.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M15.6 5.2V16.4C15.6 16.8243 15.4315 17.2313 15.1314 17.5314C14.8313 17.8314 14.4244 18 14 18H6.00002C5.57568 18 5.16871 17.8314 4.86865 17.5314C4.5686 17.2313 4.40002 16.8243 4.40002 16.4V5.2M6.80002 5.2V3.6C6.80002 3.17565 6.9686 2.76869 7.26865 2.46863C7.56871 2.16857 7.97568 2 8.40002 2H11.6C12.0244 2 12.4313 2.16857 12.7314 2.46863C13.0315 2.76869 13.2 3.17565 13.2 3.6V5.2","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M8.40002 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M11.6001 9.20001V14","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"searchconnect","d-flex","align-items-center","gap-3","flex-wrap","ms-lg-auto"],["class","btn viewbtn p-1 d-none d-xl-block","type","button","aria-label","Tile View",3,"click",4,"ngIf"],["class","btn viewbtn p-1",3,"click",4,"ngIf"],["class","btn viewbtn p-1 d-none d-xl-block","type","button","id","SearchButton","aria-label","Search",3,"click",4,"ngIf"],["type","button","aria-label","Tile View",1,"btn","viewbtn","p-1","d-none","d-xl-block",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 28 28","fill","none"],["d","M10.5 3.5H4.66667C4.02233 3.5 3.5 4.02233 3.5 4.66667V10.5C3.5 11.1443 4.02233 11.6667 4.66667 11.6667H10.5C11.1443 11.6667 11.6667 11.1443 11.6667 10.5V4.66667C11.6667 4.02233 11.1443 3.5 10.5 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3335 3.5H17.5002C16.8558 3.5 16.3335 4.02233 16.3335 4.66667V10.5C16.3335 11.1443 16.8558 11.6667 17.5002 11.6667H23.3335C23.9778 11.6667 24.5002 11.1443 24.5002 10.5V4.66667C24.5002 4.02233 23.9778 3.5 23.3335 3.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M23.3335 16.3333H17.5002C16.8558 16.3333 16.3335 16.8556 16.3335 17.5V23.3333C16.3335 23.9776 16.8558 24.5 17.5002 24.5H23.3335C23.9778 24.5 24.5002 23.9776 24.5002 23.3333V17.5C24.5002 16.8556 23.9778 16.3333 23.3335 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M10.5 16.3333H4.66667C4.02233 16.3333 3.5 16.8556 3.5 17.5V23.3333C3.5 23.9776 4.02233 24.5 4.66667 24.5H10.5C11.1443 24.5 11.6667 23.9776 11.6667 23.3333V17.5C11.6667 16.8556 11.1443 16.3333 10.5 16.3333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"btn","viewbtn","p-1",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","28","height","28","viewBox","0 0 28 28","fill","none"],["d","M9.33301 7H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33301 14H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33301 21H24.4997","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 7H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 14H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 21H3.51167","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["type","button","id","SearchButton","aria-label","Search",1,"btn","viewbtn","p-1","d-none","d-xl-block",3,"click"],["width","30","height","30","viewBox","0 0 38 38","fill","none","xmlns","http://www.w3.org/2000/svg",1,"searchicon"],["width","38","height","38","rx","10","fill","none"],["d","M17.8333 27.1667C22.988 27.1667 27.1667 22.988 27.1667 17.8333C27.
11667 12.6787 22.988 8.5 17.8333 8.5C12.6787 8.5 8.5 12.6787 8.5 17.8333C8.5 22.988 12.6787 27.1667 17.8333 27.1667Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.5001 29.5L27.1667 27.1667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["method","post",1,"formseach","d-none","d-lg-block"],[1,"gridform"],["type","submit",1,"btn","p-0"],["width","30","height","30","viewBox","0 0 38 38","fill","none","xmlns","http://www.w3.org/2000/svg"],["type","text","name","searchText",1,"form-control","dataapps","border-0","f-14","px-1",3,"placeholder","ngModel","ngModelChange"],["searchText",""],[1,"btn","p-1",3,"click"],["d","M15 5L5 15","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M5 5L15 15","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"publishedTabs"],[1,"myconnectapps",3,"ngClass"],["class","headconnectapp text-start",4,"ngIf"],["class","mapping-list",4,"ngIf"],["class","text-center p-5",4,"ngIf"],[1,"headconnectapp","text-start"],["class","select-all",4,"ngIf"],[1,"connectname","d-flex","align-items-start","gap-2"],[1,"connectname","appid_connect","text-truncate"],[1,"connect"],[1,"created"],[1,"lastupdate"],[1,"actions","text-center"],[1,"select-all"],[1,"container-checkbox"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"checkmark","d-none-before"],[1,"mapping-list"],["class","headconnectapp connectitemsapp",3,"id",4,"ngFor","ngForOf"],[1,"headconnectapp","connectitemsapp",3,"id"],[1,"select",3,"ngClass"],[1,"checkmark"],[1,"connectname","connectname-effect",3,"click"],[1,"custom-options-tooltip"],[1,"lh-sm","d-inline-block","max-w-250","w-100","text-truncate",3,"click"],[1,"appid_connect","text-truncate","overflow-visible","d-flex","align-items-center","gap-2",3,"id"],[1,"d-block"],[1,"connect","your_connects"],[1,"slelected-app"],[1,"item","item-2x","item-circle"],[1,"img-avatar","img-avatar48"],["alt","","width","20","height","20",3,"src"],["class","slelected-app",4,"ngIf"],[1,"d-xl-none"],[1,"actions","actionMenu"],["class","activetoption btn end-0 f-14 fw-normal position-absolute px-3 pt-3 top-0 d-xl-none",4,"ngIf"],[1,"dropdown","inactivedrop","d-none","d-xl-block"],["class","btn dropdown-toggle f-14 fw-normal px-4 ps-2 activetoption","role","button","data-bs-toggle","dropdown","aria-expanded","false",4,"ngIf"],[1,"dropdown","actions-dropdwon","dropdown-menu-end"],["type","button","data-tooltip","More Options","data-bs-toggle","dropdown","aria-expanded","false","aria-label","More Options",1,"btn","dropdown-toggle","custom-options-tooltip","d-none","d-xl-block",3,"id"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","200px","width","200px","xmlns","http://www.w3.org/2000/svg"],["d","M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"],["aria-labelledby","'toolDropdownMenuLink' + i",1,"dropdown-menu"],[1,"p-0"],["href","javascript:void(0);",1,"dropdown-item",3,"click"],[1,"svgicon"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M2 4H14","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M12.6666 4V13.3333C12.6666 14 12 14.6667 11.3333 14.6667H4.66665C3.99998 14.6667 3.33331 14 3.33331 13.3333V4","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M5.33331 3.99998V2.66665C5.33331 1.99998 5.99998 1.33331 6.66665 1.33331H9.33331C9.99998 1.33331 10.6666 1.99998 10.6666 2.66665V3.99998","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M6.66669 7.33331V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],["d","M9.33331 7.33331V11.3333","stroke","#D81919","stroke-linecap","round","stroke-linejoin","round"],[1,"text-danger"],[1,"activetoption","btn","end-0","f-14","fw-normal","position-absolute","px-3","pt-3","top-0","d-xl-none"],[1,"dotpill","dotactive"],[1,"dotpill","dotinactive"],["role","button","data-bs-toggle","dropdown","aria-expanded","fal
1se",1,"btn","dropdown-toggle","f-14","fw-normal","px-4","ps-2","activetoption"],[1,"text-center","p-5"],[1,"text-muted"],[1,"draftTabs"],[1,"draft-toggle-target",3,"ngClass"],[1,"select","select-all"],["class","container-checkbox",4,"ngIf"],[1,"drafteditoptions","d-xl-block","d-none"],[1,"listview-hide"],["href","javascript:void(0);","data-tooltip","Edit Tool",1,"custom-options-tooltip","border-0","text-muted",3,"click"],["aria-labelledby","'draftToolDropdownMenuLink' + i",1,"dropdown-menu"]],template:function(t,e){1&t&&(o.YNc(0,vR,16,8,"main",0),o.YNc(1,bR,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf",e.translation),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[to.O5,to.mk,Xi._Y,Xi.JL,Xi.F,Xi.Fj,Xi.JJ,Xi.On,Xi.Wl,to.sg,po],pipes:[BM,to.OU,to.uU],styles:[".tab-button[_ngcontent-%COMP%]{padding:8px 16px;border:1px solid #ddd;background:white;cursor:pointer;border-radius:4px}.tab-button.active[_ngcontent-%COMP%]{background:#007bff;color:#fff;border-color:#007bff}.tab-button[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{margin-right:4px}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .select[_ngcontent-%COMP%]{opacity:0;visibility:hidden}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .select[_ngcontent-%COMP%], .list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]:hover   .actions-dropdwon[_ngcontent-%COMP%]{opacity:1;visibility:visible}.list-view[_ngcontent-%COMP%]   .headconnectapp[_ngcontent-%COMP%]   .class-if--selected[_ngcontent-%COMP%]{opacity:1!important;visibility:visible!important}"]}),t})();function _R(t,e){1&t&&(o.TgZ(0,"small",37),o._uU(1,"Please enter a valid email address"),o.qZA())}function CR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",40),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).selectFolder(n),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.ekj("active",(null==n.selectedFolder?null:n.selectedFolder.id)===t.id),o.xp6(1),o.hij(" ",t.label," ")}}function wR(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",38),o.YNc(1,CR,2,3,"li",39),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",t.workflowFolderOptions)}}function yR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",18),o.TgZ(1,"p",19),o._uU(2,"Invite users to manage specific automations and integration workflows."),o.qZA(),o.TgZ(3,"form",20),o.NdJ("ngSubmit",function(){return o.CHM(t),o.oxw(2).sendInvitation()}),o.TgZ(4,"div",21),o.TgZ(5,"div",22),o.TgZ(6,"label",23),o._uU(7,"FULL NAME "),o.TgZ(8,"sub",24),o._uU(9,"*"),o.qZA(),o.qZA(),o.TgZ(10,"input",25),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).fullName=e}),o.qZA(),o.qZA(),o.TgZ(11,"div",22),o.TgZ(12,"label",23),o._uU(13,"EMAIL ADDRESS "),o.TgZ(14,"sub",24),o._uU(15,"*"),o.qZA(),o.qZA(),o.TgZ(16,"input",26),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).email=e})("input",function(){return o.CHM(t),o.oxw(2).emailTouched=!0})("blur",function(){return o.CHM(t),o.oxw(2).emailTouched=!0}),o.qZA(),o.YNc(17,_R,2,0,"small",27),o.qZA(),o.qZA(),o.TgZ(18,"div",28),o.TgZ(19,"label",23),o._uU(20,"ASSIGNED WORKFLOW FOLDER "),o.TgZ(21,"sub",24),o._uU(22,"*"),o.qZA(),o.qZA(),o.TgZ(23,"div",29),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleDropdown()})("keydown.escape",function(){return o.CHM(t),o.oxw(2).dropdownOpen=!1}),o.TgZ(24,"div",30),o.NdJ("keydown.enter",function(e){return o.CHM(t),o.oxw(2).toggleDropdown(),e.preventDefault()}),o.TgZ(25,"span",31),o._uU(26),o.qZA(),o.O4$(),o.TgZ(27,"svg",32),o._UZ(28,"path",33),o.qZA(),o.qZA(),o.YNc(29,wR,2,1,"ul",34),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"div",35),o.TgZ(31,"button",36),o._uU(32,"Send Invitation"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(10),o.Q6J("ngModel",t.fullName),o.xp6(6),o.ekj("add-team-moderator__input--error",t.emailTouched&&t.email&&!t.isValidEmail(t.email)),o.Q6J("ngModel",t.email),o.xp6(1),o.Q6J("ngIf",t.emailTouched&&t.email&&!t.isValidEmail(t.email)),o.xp6(7),o.ekj("open",t.dropdownOpen),o.xp6(2),o.Oqu((null==t.selectedFolder?null:t.selectedFolder.label)||"Select folder"),o.xp6(1),o.ekj("open",t.dropdownOpen),o.xp6(2),o.Q6J("ngIf",t.dropdownOpen),o.xp6(2),o.Q6J("disabled",!(null!=t.fullName&&t.fullName.trim()&&null!=t.email&&t.email.trim()&&t.isValidEmail(t.email)))}}
1function AR(t,e){if(1&t&&(o.TgZ(0,"span",52),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.AsE("",t.moderatorUsers.length," ",1===t.moderatorUsers.length?"member":"members","")}}function ZR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",74),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).resendInvitation(e)}),o._uU(1,"Resend"),o.qZA()}}function kR(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",75),o._UZ(1,"circle",76),o._UZ(2,"line",77),o.qZA())}function TR(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",75),o._UZ(1,"path",78),o._UZ(2,"polyline",79),o.qZA())}function OR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tr",53),o.TgZ(1,"td"),o.TgZ(2,"div",54),o.TgZ(3,"div",55),o._uU(4),o.qZA(),o.TgZ(5,"span",56),o._uU(6),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"td"),o.TgZ(8,"span",57),o._uU(9),o.qZA(),o.qZA(),o.TgZ(10,"td"),o.TgZ(11,"span",58),o._uU(12),o.qZA(),o.qZA(),o.TgZ(13,"td"),o.TgZ(14,"span",59),o._UZ(15,"span",60),o._uU(16),o.qZA(),o.qZA(),o.TgZ(17,"td"),o.TgZ(18,"div",61),o.YNc(19,ZR,2,0,"button",62),o.TgZ(20,"button",63),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).viewUser(e)}),o.O4$(),o.TgZ(21,"svg",64),o._UZ(22,"path",65),o._UZ(23,"circle",66),o.qZA(),o.qZA(),o.kcU(),o.TgZ(24,"button",67),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).toggleUserStatus(e)}),o.YNc(25,kR,3,0,"svg",68),o.YNc(26,TR,3,0,"svg",68),o.qZA(),o.TgZ(27,"button",69),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).deleteUser(e)}),o.O4$(),o.TgZ(28,"svg",64),o._UZ(29,"polyline",70),o._UZ(30,"path",71),o._UZ(31,"line",72),o._UZ(32,"line",73),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;let n;o.ekj("add-team-moderator__table-row--deleted",null==t.email?null:t.email.includes("_deleted")),o.xp6(3),o.ekj("add-team-moderator__avatar-sm--active","active"===t.status)("add-team-moderator__avatar-sm--disabled","active"!==t.status),o.xp6(1),o.hij(" ",(null==t.name||null==(n=t.name.charAt(0))?null:n.toUpperCase())||"?"," "),o.xp6(2),o.Oqu(t.name),o.xp6(3),o.Oqu(t.email),o.xp6(3),o.Oqu(t.app),o.xp6(2),o.ekj("add-team-moderator__status-badge--active","active"===t.status&&!(null!=t.email&&t.email.includes("_deleted")))("add-team-moderator__status-badge--disabled","active"!==t.status||(null==t.email?null:t.email.includes("_deleted"))),o.xp6(2),o.hij(" ",null!=t.email&&t.email.includes("_deleted")||"active"!==t.status?"Disabled":"Active"," "),o.xp6(3),o.Q6J("ngIf","pending"===t.status),o.xp6(5),o.ekj("add-team-moderator__btn-icon--disable","active"===t.status)("add-team-moderator__btn-icon--enable","active"!==t.status),o.uIk("data-tooltip","active"===t.status?"Disable this user":"Enable this user"),o.xp6(1),o.Q6J("ngIf","active"===t.status),o.xp6(1),o.Q6J("ngIf","active"!==t.status)}}function MR(t,e){if(1&t&&(o.TgZ(0,"tr"),o.TgZ(1,"td",80),o._uU(2),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.Oqu(null!=t.searchQuery&&t.searchQuery.trim()?"No results found.":"No moderators yet. Add one from the Add Team Moderator tab.")}}function IR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",18),o.TgZ(1,"div",41),o.TgZ(2,"p",42),o._uU(3,"View and manage user permissions for your team moderators."),o.qZA(),o.TgZ(4,"div",43),o.O4$(),o.TgZ(5,"svg",44),o._UZ(6,"circle",45),o._UZ(7,"line",46),o.qZA(),o.kcU(),o.TgZ(8,"input",47),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(2).searchQuery=e}),o.qZA(),o.qZA(),o.YNc(9,AR,2,2,"span",48),o.qZA(),o.TgZ(10,"div",49),o.TgZ(11,"table",50),o.TgZ(12,"thead"),o.TgZ(13,"tr"),o.TgZ(14,"th"),o._uU(15,"Name"),o.qZA(),o.TgZ(16,"th"),o._uU(17,"Email"),o.qZA(),o.TgZ(18,"th"),o._uU(19,"App"),o.qZA(),o.TgZ(20,"th"),o._uU(21,"Status"),o.qZA(),o.TgZ(22,"th"),o._uU(23,"Action"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(24,"tbody"),o.YNc(25,OR,33,23,"tr",51),o.YNc(26,MR,3,1,"tr",17),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(8),o.Q6J("ngModel",t.searchQuery),o.xp6(1),o.Q6J("ngIf",null==t.moderatorUsers?null:t.moderatorUsers.length),o.xp6(16),o.Q6J("ngForOf",t.filteredModeratorUsers),o.xp6(1),o.Q6J("ngIf",!(null!=t.filteredModeratorUsers&&t.filteredModeratorUsers.length))}}function SR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeViewModal()}),o.qZA()}}
1function PR(t,e){if(1&t&&(o.TgZ(0,"p",101),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Oqu(t.viewPermissionsLabel)}}function NR(t,e){if(1&t&&(o.TgZ(0,"div",107),o.TgZ(1,"div",104),o.TgZ(2,"span",108),o._uU(3),o.qZA(),o.TgZ(4,"span",109),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"div",105),o._uU(7,"\u2014"),o.qZA(),o.qZA()),2&t){const t=e.$implicit;o.xp6(3),o.Oqu(t.name),o.xp6(2),o.Oqu(t.description)}}function qR(t,e){if(1&t&&(o.TgZ(0,"div",102),o.TgZ(1,"div",103),o.TgZ(2,"span",104),o._uU(3,"Permission type"),o.qZA(),o.TgZ(4,"span",105),o._uU(5,"Global access"),o.qZA(),o.qZA(),o.YNc(6,NR,8,2,"div",106),o.qZA()),2&t){const t=o.oxw(3);o.xp6(6),o.Q6J("ngForOf",t.viewPermissionsList)}}function UR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",82),o.TgZ(1,"div",83),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",84),o.TgZ(3,"h2",85),o._uU(4,"User Details"),o.qZA(),o.TgZ(5,"button",86),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeViewModal()}),o.O4$(),o.TgZ(6,"svg",87),o._UZ(7,"line",88),o._UZ(8,"line",89),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",90),o.TgZ(10,"div",91),o.TgZ(11,"div",92),o.TgZ(12,"span",93),o._uU(13,"Full name "),o.TgZ(14,"sub",94),o._uU(15,"*"),o.qZA(),o.qZA(),o.TgZ(16,"p",95),o._uU(17),o.qZA(),o.qZA(),o.TgZ(18,"div",92),o.TgZ(19,"span",93),o._uU(20,"Email address "),o.TgZ(21,"sub",94),o._uU(22,"*"),o.qZA(),o.qZA(),o.TgZ(23,"p",95),o._uU(24),o.qZA(),o.qZA(),o.qZA(),o.TgZ(25,"div",96),o.TgZ(26,"div",92),o.TgZ(27,"span",93),o._uU(28,"Assigned workflow folder "),o.TgZ(29,"sub",94),o._uU(30,"*"),o.qZA(),o.qZA(),o.TgZ(31,"p",95),o._uU(32),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"div",97),o.TgZ(34,"span",98),o._uU(35,"Permissions access"),o.qZA(),o.YNc(36,PR,2,1,"p",99),o.YNc(37,qR,7,1,"div",100),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(17),o.Oqu(t.viewModalUser.name||"\u2014"),o.xp6(7),o.Oqu(t.viewModalUser.email||"\u2014"),o.xp6(8),o.Oqu(t.viewAssignedFolder),o.xp6(4),o.Q6J("ngIf",t.viewPermissionsLabel),o.xp6(1),o.Q6J("ngIf",!t.viewPermissionsLabel&&t.viewPermissionsList.length)}}function ER(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeInvitationModal()}),o.qZA()}}function FR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",110),o.TgZ(1,"div",83),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",84),o.TgZ(3,"h2",111),o._uU(4,"Invitation Status"),o.qZA(),o.TgZ(5,"button",86),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeInvitationModal()}),o.O4$(),o.TgZ(6,"svg",87),o._UZ(7,"line",88),o._UZ(8,"line",89),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",90),o.TgZ(10,"div",96),o.TgZ(11,"div",92),o.TgZ(12,"p",95),o._uU(13),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(14,"div",112),o.TgZ(15,"button",113),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeInvitationModal()}),o._uU(16,"OK"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(13),o.Oqu(t.invitationModalMessage)}}function DR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeUpgradeModal()}),o.qZA()}}function LR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",114),o.TgZ(1,"div",83),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",115),o.TgZ(3,"button",86),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeUpgradeModal()}),o.O4$(),o.TgZ(4,"svg",87),o._UZ(5,"line",88),o._UZ(6,"line",89),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",116),o.TgZ(8,"h2",117),o._uU(9,"Upgrade Required"),o.qZA(),o.TgZ(10,"div",118),o.O4$(),o.TgZ(11,"svg",119),o._UZ(12,"circle",120),o._UZ(13,"path",121),o._UZ(14,"path",122),o._UZ(15,"path",123),o.qZA(),o.kcU(),o.TgZ(16,"p",124),o._uU(17,"Team moderators are available on Trial or paid plans. Upgrade to invite your team."),o.qZA(),o.qZA(),o.TgZ(18,"button",113),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).goToUpgradePlan()}),o._uU(19,"Upgrade Plan"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}function JR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeLimitModal()}),o.qZA()}}function jR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",125),o.TgZ(1,"div",83),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",115),o.TgZ(3,"button",86),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeLimitModal()}),o.O4$(),o.TgZ(4,"svg",87),o._UZ(5,"line",88),o._UZ(6,"line",89),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",116),o.TgZ(8,"h2",126),o._uU(9,"Moderator Limit Reached"),o.qZA(),o.TgZ(10,"div",127),o.O4$(),o.TgZ(11,"svg",128),o._UZ(12,"circle",120),o._UZ(13,"path",121),o._UZ(14,"path",122),o._UZ(15,"path",123),o.qZA(),o.kcU(),o.TgZ(16,"span",129),o._uU(17),o.qZA(),o.qZA(),o.TgZ(18,"p",130),o._uU(19,"To add more team moderators, please contact our support team."),o.qZA(),o.TgZ(20,"div",131),o.TgZ(21,"button",132),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeLimitModal()}),o._uU(22,"Cancel"),o.qZA(),o.TgZ(23,"button",113),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).contactSupport()}),o._uU(24,"Contact Support"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(17),o.AsE("",t.moderatorUsers.length," / ",t.moderatorLimit," moderators used")}}function RR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",81),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeEditModal()}),o.qZA()}}function $R(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",40),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(4).selectEditFolder(n),e.stopPropagation()}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(4);o.ekj("active",(null==n.editModalSelectedFolder?null:n.editModalSelectedFolder.id)===t.id),o.xp6(1),o.hij(" ",t.label," ")}}
1function BR(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",38),o.YNc(1,$R,2,3,"li",39),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",t.workflowFolderOptions)}}function HR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",107),o.TgZ(1,"div",104),o.TgZ(2,"span",108),o._uU(3),o.qZA(),o.TgZ(4,"span",109),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"div",105),o.TgZ(7,"label",140),o.TgZ(8,"input",141),o.NdJ("ngModelChange",function(e){return o.CHM(t).$implicit.checked=e}),o.qZA(),o._UZ(9,"span",142),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(3),o.Oqu(t.name),o.xp6(2),o.Oqu(t.description),o.xp6(2),o.uIk("for","edit-perm-"+t.id),o.xp6(1),o.Q6J("ngModel",t.checked)("name","edit-"+t.id)("id","edit-perm-"+t.id)}}function QR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",133),o.TgZ(1,"div",134),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",84),o.TgZ(3,"h2",135),o._uU(4,"Edit User"),o.qZA(),o.TgZ(5,"button",86),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeEditModal()}),o.O4$(),o.TgZ(6,"svg",87),o._UZ(7,"line",88),o._UZ(8,"line",89),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",90),o.TgZ(10,"div",91),o.TgZ(11,"div",92),o.TgZ(12,"span",93),o._uU(13,"Full name "),o.TgZ(14,"sub",94),o._uU(15,"*"),o.qZA(),o.qZA(),o.TgZ(16,"p",95),o._uU(17),o.qZA(),o.qZA(),o.TgZ(18,"div",92),o.TgZ(19,"span",93),o._uU(20,"Email address "),o.TgZ(21,"sub",94),o._uU(22,"*"),o.qZA(),o.qZA(),o.TgZ(23,"p",95),o._uU(24),o.qZA(),o.qZA(),o.qZA(),o.TgZ(25,"div",96),o.TgZ(26,"div",92),o.TgZ(27,"span",93),o._uU(28,"Assigned workflow folder "),o.TgZ(29,"sub",94),o._uU(30,"*"),o.qZA(),o.qZA(),o.TgZ(31,"div",136),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleEditDropdown()})("keydown.escape",function(){return o.CHM(t),o.oxw(2).editDropdownOpen=!1}),o.TgZ(32,"div",30),o.NdJ("keydown.enter",function(e){return o.CHM(t),o.oxw(2).toggleEditDropdown(),e.preventDefault()}),o.TgZ(33,"span",31),o._uU(34),o.qZA(),o.O4$(),o.TgZ(35,"svg",32),o._UZ(36,"path",33),o.qZA(),o.qZA(),o.YNc(37,BR,2,1,"ul",34),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(38,"div",97),o.TgZ(39,"span",98),o._uU(40,"Permissions access"),o.qZA(),o.TgZ(41,"p",137),o._uU(42,"Add or remove permissions for this user."),o.qZA(),o.TgZ(43,"div",138),o.TgZ(44,"div",103),o.TgZ(45,"span",104),o._uU(46,"Permission type"),o.qZA(),o.TgZ(47,"span",105),o._uU(48,"Global access"),o.qZA(),o.qZA(),o.YNc(49,HR,10,6,"div",106),o.qZA(),o.qZA(),o.TgZ(50,"div",139),o.TgZ(51,"button",132),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeEditModal()}),o._uU(52,"Cancel"),o.qZA(),o.TgZ(53,"button",113),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).saveEditUser()}),o._uU(54,"Update"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(17),o.Oqu(t.editModalUser.name||"\u2014"),o.xp6(7),o.Oqu(t.editModalUser.email||"\u2014"),o.xp6(8),o.ekj("open",t.editDropdownOpen),o.xp6(2),o.Oqu((null==t.editModalSelectedFolder?null:t.editModalSelectedFolder.label)||"All Connects"),o.xp6(1),o.ekj("open",t.editDropdownOpen),o.xp6(2),o.Q6J("ngIf",t.editDropdownOpen),o.xp6(12),o.Q6J("ngForOf",t.editModalPermissions)}}function YR(t,e){1&t&&o._UZ(0,"app-loader")}function zR(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"main",1),o.TgZ(1,"div",2),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o.TgZ(4,"div",5),o.TgZ(5,"section",6),o.TgZ(6,"h1",7),o._uU(7,"User Permissions"),o.qZA(),o.TgZ(8,"div",8),o.TgZ(9,"button",9),o.NdJ("click",function(){return o.CHM(t),o.oxw().activeTab="add-moderator"}),o._uU(10,"Add Team Moderator"),o.qZA(),o.TgZ(11,"button",9),o.NdJ("click",function(){return o.CHM(t),o.oxw().activeTab="user-permissions"}),o._uU(12,"Moderators User Permissions"),o.qZA(),o.qZA(),o.YNc(13,yR,33,12,"div",10),o.YNc(14,IR,27,4,"div",10),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(15,SR,1,0,"div",11),o.YNc(16,UR,38,5,"div",12),o.YNc(17,ER,1,0,"div",11),o.YNc(18,FR,17,1,"div",13),o.YNc(19,DR,1,0,"div",11),o.YNc(20,LR,20,0,"div",14),o.YNc(21,JR,1,0,"div",11),o.YNc(22,jR,25,2,"div",15),o.YNc(23,RR,1,0,"div",11),o.YNc(24,QR,55,9,"div",16),o.YNc(25,YR,1,0,"app-loader",17),o.qZA()}if(2&t){const t=o.oxw();o.ekj("menubaractive",t.isMenuBarActive),o.xp6(5),o.ekj("active","user-permissions"===t.activeTab),o.xp6(4),o.ekj("active","add-moderator"===t.activeTab),o.xp6(2),o.ekj("active","user-permissions"===t.activeTab),o.xp6(2),o.Q6J("ngIf","add-moderator"===t.activeTab),o.xp6(1),o.Q6J("ngIf","user-permissions"===t.activeTab),o.xp6(1),o.Q6J("ngIf",t.showViewModal),o.xp6(1),o.Q6J("ngIf",t.showViewModal&&t.viewModalUser),o.xp6(1),o.Q6J("ngIf",t.showInvitationModal),o.xp6(1),o.Q6J("ngIf",t.showInvitationModal),o.xp6(1),o.Q6J("ngIf",t.showU
1pgradeModal),o.xp6(1),o.Q6J("ngIf",t.showUpgradeModal),o.xp6(1),o.Q6J("ngIf",t.showLimitModal),o.xp6(1),o.Q6J("ngIf",t.showLimitModal),o.xp6(1),o.Q6J("ngIf",t.showEditModal),o.xp6(1),o.Q6J("ngIf",t.showEditModal&&t.editModalUser),o.xp6(1),o.Q6J("ngIf",t.toggleLoader)}}const VR=[{path:"customeditor/:nodeId/:currentAction/:triggerId",canActivate:[JO],component:LO},{path:"connects/:redirectFrom",canActivate:[JO],component:BP},{path:"connects",canActivate:[JO],component:BP},{path:"create-agent",canActivate:[JO],component:tN},{path:"settings",canActivate:[JO],component:bN},{path:"plans-usage",canActivate:[JO],component:ZU},{path:"connections",canActivate:[JO],component:tE},{path:"history/:connectId",canActivate:[JO],component:Dl},{path:"history",canActivate:[JO],component:Dl},{path:"authorizations",canActivate:[JO],component:yr},{path:"plans",canActivate:[JO],component:Vq},{path:"accountDisabled",canActivate:[JO],component:eE},{path:"portal-payment-handler/:planId/:cpId/:planPeriod/:couponCode",canActivate:[JO],component:vF},{path:"portal-payment-handler/:planId/:cpId/:planPeriod",canActivate:[JO],component:vF},{path:"purchase",canActivate:[JO],component:rE},{path:"profile",canActivate:[JO],component:LE},{path:"admin/customers",canActivate:[JO],component:eF},{path:"app/:successtrial",canActivate:[JO],component:gF},{path:"register",canActivate:[JO],component:fF},{path:"logout",canActivate:[JO],component:ho},{path:"build-your-connect/:appsParameters",canActivate:[JO],component:fF},{path:"build-your-connect",canActivate:[JO],component:fF},{path:"success-run-test",canActivate:[JO],component:XF},{path:"setup-editor",canActivate:[JO],component:ZD},{path:"setup-editor-integrate",canActivate:[JO],component:$D},{path:"app-error-messages/:id",canActivate:[JO],component:VD},{path:"appointment",canActivate:[JO],component:QD},{path:"mcp",canActivate:[JO],component:aL},{path:"mcp-setup/:_id/:appId",canActivate:[JO],component:QL},{path:"mcp-setup/:_id",canActivate:[JO],component:QL},{path:"folders",canActivate:[JO],component:Rj},{path:"folders/:folderId",canActivate:[JO],component:Rj},{path:"tools",canActivate:[JO],component:xR},{path:"team-moderator",canActivate:[JO],component:(()=>{class t{constructor(t,e,n,i,o,r,s){this.translatorService=t,this.commonService=e,this.apiService=n,this.customerService=i,this.router=o,this.el=r,this.modalService=s,this.appyConfig=go.N,this.taskalert=!0,this.isAlertShow=!1,this.isMenuBarActive=!0,this.subs=new pi.w,this.fullName="",this.email="",this.selectedFolder=null,this.dropdownOpen=!1,this.workflowFolderOptions=[{id:"all",label:"All Connects"}],this.activeTab="add-moderator",this.moderatorUsers=[],this.searchQuery="",this.showViewModal=!1,this.viewModalUser=null,this.viewModalSettings=null,this.showEditModal=!1,this.editModalUser=null,this.editModalSettings=null,this.editModalSelectedFolder=null,this.editModalPermissions=[],this.editDropdownOpen=!1,this.showInvitationModal=!1,this.invitationModalMessage="",this.showUpgradeModal=!1,this.showLimitModal=!1,this.moderatorLimit=3,this.toggleLoader=!1,this.emailTouched=!1,this.permissions=[{id:"edit",name:"Edit Connects",description:"Ability to modify trigger and action steps in workflows.",checked:!1},{id:"view-history",name:"View Task History",description:"Can view success/failure logs of automated tasks.",checked:!1},{id:"credentials",name:"Credential Management",description:"Add or remove linked third-party accounts (API keys).",checked:!1},{id:"replay",name:"Task Replay",description:"Manually trigger failed tasks for processing.",checked:!1},{id:"billing",name:"Billing & Usage",description:"View monthly task consumption and plan limits.",checked:!1}],this.selectedFolder=this.workflowFolderOptions[0]}onDocumentClick(t){this.dropdownOpen&&!this.el.nativeElement.contains(t.target)&&(this.dropdownOpen=!1)}ngOnInit(){var t;this.subs.add(this.translatorService.getTranslation("en","user").subscribe(t=>{this.translation=t})),this.subs.add(this.commonService.data$.subscribe(t=>{this.isMenuBarActive=t})),this.currentUser=this.customerService.GetCurrent(),(null===(t=this.currentUser)||void 0===t?void 0:t.isSubUser)?this.router.navigate(["/connects"]):this.loadModeratorUsers()}loadModeratorUsers(){var t;const e=null===(t=this.currentUser)||void 0===t?void 0:t.customerId;!e||this.subs.add(this.apiService.getSubUsersList(e).subscribe(t=>{console.log("Sub-users API response:",t),this.moderatorUsers=(t||[]).map(t=>{var e;return{id:t._id||t.customerId,customerId:t.customerId,name:[t.firstName,t.lastName].filter(
1Boolean).join(" ")||t.username||t.email,email:t.email,app:(null===(e=t.selected_apps)||void 0===e?void 0:e.join(", "))||"All Connects",status:!0===t.isSubUser?"active":"disabled"}})},t=>{console.error("Error loading moderator users:",t)}))}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}selectFolder(t){this.selectedFolder=t,this.dropdownOpen=!1}resendInvitation(t){alert(`Resend invitation to ${t.email}`)}viewUser(t){this.viewModalUser=t,this.viewModalSettings=null,this.showViewModal=!0,this.subs.add(this.apiService.getModeratorUserSettings(t.customerId||t.id).subscribe(t=>{this.viewModalSettings=t},()=>{this.viewModalSettings=null}))}closeViewModal(){this.showViewModal=!1,this.viewModalUser=null,this.viewModalSettings=null}get viewAssignedFolder(){var t;return this.viewModalUser&&(null===(t=this.viewModalUser.app)||void 0===t?void 0:t.trim())||"All Connects"}get viewPermissionsLabel(){if(null==this.viewModalSettings)return"All permission granted";const t=this.viewModalSettings;return t.apps&&t.apps.length>0||null!=t.no_of_tasks&&t.no_of_tasks>0||null!=t.no_of_connects&&t.no_of_connects>0?"":"All permission granted"}get viewPermissionsList(){return"All permission granted"===this.viewPermissionsLabel?[]:this.permissions}toggleUserStatus(t){const e="active"!==t.status;this.toggleLoader=!0,this.subs.add(this.apiService.toggleModeratorUserStatus(t.id,e).subscribe(()=>{t.status=e?"active":"disabled",this.toggleLoader=!1},t=>{this.toggleLoader=!1,this.invitationModalMessage="Error updating user status. Please try again.",this.showInvitationModal=!0}))}editPermissions(t){this.editModalUser=t,this.editModalSettings=null,this.editModalSelectedFolder=this.workflowFolderOptions.find(e=>{var n;return e.label===((null===(n=t.app)||void 0===n?void 0:n.trim())||"All Connects")})||this.workflowFolderOptions[0],this.editModalPermissions=this.permissions.map(t=>Object.assign(Object.assign({},t),{checked:!1})),this.editDropdownOpen=!1,this.showEditModal=!0,this.subs.add(this.apiService.getModeratorUserSettings(t.customerId||t.id).subscribe(t=>{var e;this.editModalSettings=t,(null===(e=null==t?void 0:t.apps)||void 0===e?void 0:e.length)&&(this.editModalPermissions=this.permissions.map(e=>Object.assign(Object.assign({},e),{checked:-1!==(t.apps||[]).indexOf(e.id)})))},()=>{this.editModalSettings=null}))}closeEditModal(){this.showEditModal=!1,this.editModalUser=null,this.editModalSettings=null,this.editModalSelectedFolder=null,this.editModalPermissions=[],this.editDropdownOpen=!1}toggleEditDropdown(){this.editDropdownOpen=!this.editDropdownOpen}selectEditFolder(t){this.editModalSelectedFolder=t,this.editDropdownOpen=!1}closeInvitationModal(){this.showInvitationModal=!1,this.invitationModalMessage=""}closeUpgradeModal(){this.showUpgradeModal=!1}goToUpgradePlan(){this.showUpgradeModal=!1,this.router.navigateByUrl("/plans")}closeLimitModal(){this.showLimitModal=!1}contactSupport(){this.showLimitModal=!1,window.open("https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","_blank")}saveEditUser(){}deleteUser(t){this.bsModalRef=this.modalService.show($O.f,{initialState:{modelTitle:"Delete User?",modelContent:`Are you sure you want to delete ${t.name}?`,modelConnectId:t.id,translation:this.translation,IsDelete:!0}}),this.bsModalRef.content.onClose.subscribe(e=>{e&&this.subs.add(this.apiService.deleteModeratorUser(t.id).subscribe(()=>{this.moderatorUsers=this.moderatorUsers.filter(e=>e.id!==t.id)},t=>{this.invitationModalMessage="Error deleting user. Please try again.",this.showInvitationModal=!0}))})}get filteredModeratorUsers(){var t;if(!(null===(t=this.searchQuery)||void 0===t?void 0:t.trim()))return this.moderatorUsers;const e=this.searchQuery.trim().toLowerCase();return this.moderatorUsers.filter(t=>{var n,i;return(null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e))||(null===(i=t.email)||void 0===i?void 0:i.toLowerCase().includes(e))})}isValidEmail(t){return!!t&&/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t.trim())}sendInvitation(){var t,e,n,i,o;if("Free Plan"===((null===(n=null===(e=null===(t=this.currentUser)||void 0===t?void 0:t.plan_details)||void 0===e?void 0:e[0])||void 0===n?void 0:n.planName)||"Free Plan"))return void(this.showUpgradeModal=!0);if(this.emailTouched=!0,!this.email)return this.invitationModalMessage="Please enter email address",void(this.showInvitationModal=!0);if(!this.isValidEmail(this.email))return this.invitationModalMessage="Please enter a valid email address",void(this.showInvitationModal=!0);const r={email:this.email,fullName:this.fullName,userId:null===(i=this.currentUser)||void 0===i?void 0:i.customerId,folder:null===(o=this.selectedFolder)||void 0===o?void 0:o.id,permissions:this.permissions.filter(t=>t.checked).map(t=>
1t.id)};this.subs.add(this.apiService.createModerator(r).subscribe(t=>{var e;(null==t?void 0:t.success)&&200===(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.status)?(this.invitationModalMessage="ID & Password sent successfully!",this.showInvitationModal=!0,this.fullName="",this.email="",this.emailTouched=!1,this.selectedFolder=this.workflowFolderOptions[0],this.permissions.forEach(t=>t.checked=!1),this.loadModeratorUsers()):"string"==typeof(null==t?void 0:t.message)&&t.message.includes("UPGRADE_REQUIRED")?this.showUpgradeModal=!0:"MODERATOR_LIMIT"===(null==t?void 0:t.code)?(this.moderatorLimit=(null==t?void 0:t.limit)||3,this.showLimitModal=!0):(this.invitationModalMessage=(null==t?void 0:t.msg)||"User already exists. Invitation not required \u2014 share login credentials instead.",this.showInvitationModal=!0)},t=>{var e;403===(null==t?void 0:t.status)&&"UPGRADE_REQUIRED"===(null===(e=null==t?void 0:t.error)||void 0===e?void 0:e.code)?this.showUpgradeModal=!0:(this.invitationModalMessage="Error sending invitation. Please try again.",this.showInvitationModal=!0)}))}ngOnDestroy(){this.subs.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(wo.v),o.Y36(co.s),o.Y36(yo),o.Y36(ui.F0),o.Y36(o.SBq),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-add-team-moderator"]],hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.onDocumentClick(t)},!1,o.evT)},decls:1,vars:1,consts:[["id","main-container_","class","connect-dash ng-scope main-container","ui-view","content",3,"menubaractive",4,"ngIf"],["id","main-container_","ui-view","content",1,"connect-dash","ng-scope","main-container"],[1,"dashboardpage"],[1,"container-fluid"],[1,"row"],[1,"col-md-12","col-lg-12"],["id","MultiLevelModerator",1,"dashboard-middle","clearfix","sectionpadding","add-team-moderator"],[1,"add-team-moderator__title","h3"],[1,"add-team-moderator__tabs","mt-3"],["type","button",1,"add-team-moderator__tab",3,"click"],["class","add-team-moderator__tab-content",4,"ngIf"],["class","add-team-moderator__modal-backdrop",3,"click",4,"ngIf"],["class","add-team-moderator__modal","role","dialog","aria-labelledby","view-modal-title",4,"ngIf"],["class","add-team-moderator__modal","role","dialog","aria-labelledby","invitation-modal-title",4,"ngIf"],["class","add-team-moderator__modal","role","dialog","aria-labelledby","upgrade-modal-title",4,"ngIf"],["class","add-team-moderator__modal","role","dialog","aria-labelledby","limit-modal-title",4,"ngIf"],["class","add-team-moderator__modal","role","dialog","aria-labelledby","edit-modal-title",4,"ngIf"],[4,"ngIf"],[1,"add-team-moderator__tab-content"],[1,"add-team-moderator__subtitle"],[1,"add-team-moderator__form",3,"ngSubmit"],[1,"add-team-moderator__field","flex-md-row","w-100","gap-4"],[1,"add-team-moderator__field","w-100"],[1,"add-team-moderator__label"],[1,"fs-6","lh-sm","text-danger"],["type","text","placeholder","e.g. John Doe","name","fullName","required","",1,"add-team-moderator__input",3,"ngModel","ngModelChange"],["type","email","placeholder","[email protected]","name","email","required","",1,"add-team-moderator__input",3,"ngModel","ngModelChange","input","blur"],["class","add-team-moderator__error-text",4,"ngIf"],[1,"add-team-moderator__field"],[1,"add-team-moderator__dropdown",3,"click","keydown.escape"],["tabindex","0",1,"add-team-moderator__dropdown-trigger",3,"keydown.enter"],[1,"add-team-moderator__dropdown-value"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 12 12","fill","none",1,"add-team-moderator__dropdown-arrow"],["d","M3 4.5L6 7.5L9 4.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","add-team-moderator__dropdown-menu",4,"ngIf"],[1,"add-team-moderator__actions"],["type","submit",1,"add-team-moderator__btn-submit",3,"disabled"],[1,"add-team-moderator__error-text"],[1,"add-team-moderator__dropdown-menu"],["class","add-team-moderator__dropdown-item",3,"active","click",4,"ngFor","ngForOf"],[1,"add-team-moderator__dropdown-item",3,"click"],[1,"add-team-moderator__perm-header"],[1,"add-team-moderator__subtitle",2,"margin-bottom","0"],[1,"add-team-moderator__search-wrap"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"add-team-moderator__search-icon"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["type","text","placeholder","Search by name or email...",1,"add-team-moderator__search-input",3,"ngModel","ngModelChange"],["class","add-team-moderator__user-count",4,"ngIf"],[1,"add-team-moderator__users-table-wrap"],[1,"add-team-moderator__users-table"],["class","add-team-moderator__table-row",3,"add-team-moderator__table-row--deleted",4,"ngFor","ngForOf"],[1,"add-team-moderator__user-count"],[1,"add-team-moderator__table-row"],[1,"add-team-moderator__name-cell"],[1,"add-team-moderator__avatar-sm"],[1,"add-team-moderator__name-text"],[1,"add-team-moderator__email-text"],[1,"add-team-moderator__app-text"],[1,"add-team-moderator__status-badge"],[1,"add-team-moderator__status-dot"],[1,"add-team-moderator__action-btns"],["type","button","class","add-team-moderator__btn-resend","data-tooltip","Re
1send invitation email",3,"click",4,"ngIf"],["type","button","data-tooltip","View user details",1,"add-team-moderator__btn-icon","add-team-moderator__btn-icon--view",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"],["cx","12","cy","12","r","3"],["type","button",1,"add-team-moderator__btn-icon",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",4,"ngIf"],["type","button","data-tooltip","Delete this user",1,"add-team-moderator__btn-icon","add-team-moderator__btn-icon--delete",3,"click"],["points","3 6 5 6 21 6"],["d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"],["x1","10","y1","11","x2","10","y2","17"],["x1","14","y1","11","x2","14","y2","17"],["type","button","data-tooltip","Re
1send invitation email",1,"add-team-moderator__btn-resend",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2"],["cx","12","cy","12","r","10"],["x1","4.93","y1","4.93","x2","19.07","y2","19.07"],["d","M22 11.08V12a10 10 0 1 1-5.93-9.14"],["points","22 4 12 14.01 9 11.01"],["colspan","5",1,"add-team-moderator__empty-row"],[1,"add-team-moderator__modal-backdrop",3,"click"],["role","dialog","aria-labelledby","view-modal-title",1,"add-team-moderator__modal"],[1,"add-team-moderator__modal-content",3,"click"],[1,"add-team-moderator__modal-header"],["id","view-modal-title",1,"add-team-moderator__modal-title"],["type","button","aria-label","Close",1,"add-team-moderator__modal-close",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"add-team-moderator__modal-body"],[1,"add-team-moderator__view-row","add-team-moderator__view-row--two"],[1,"add-team-moderator__view-block"],[1,"add-team-moderator__view-label"],[1,"add-team-moderator__view-required"],[1,"add-team-moderator__view-value"],[1,"add-team-moderator__view-row"],[1,"add-team-moderator__view-row","add-team-moderator__view-row--permissions"],[1,"add-team-moderator__view-label","add-team-moderator__view-label--section"],["class","add-team-moderator__view-value add-team-moderator__view-value--highlight",4,"ngIf"],["class","add-team-moderator__permissions-table add-team-moderator__permissions-table--modal",4,"ngIf"],[1,"add-team-moderator__view-value","add-team-moderator__view-value--highlight"],[1,"add-team-moderator__permissions-table","add-team-moderator__permissions-table--modal"],[1,"add-team-moderator__permissions-header"],[1,"add-team-moderator__permissions-col--type"],[1,"add-team-moderator__permissions-col--access"],["class","add-team-moderator__permissions-row",4,"ngFor","ngForOf"],[1,"add-team-moderator__permissions-row"],[1,"add-team-moderator__permission-name"],[1,"add-team-moderator__permission-desc"],["role","dialog","aria-labelledby","invitation-modal-title",1,"add-team-moderator__modal"],["id","invitation-modal-title",1,"add-team-moderator__modal-title"],[1,"add-team-moderator__modal-actions",2,"padding","0 24px 24px","display","flex","justify-content","flex-end"],["type","button",1,"add-team-moderator__btn-submit","add-team-moderator__btn-submit--modal",3,"click"],["role","dialog","aria-labelledby","upgrade-modal-title",1,"add-team-moderator__modal"],[1,"add-team-moderator__popup-close-row"],[1,"add-team-moderator__popup-body"],["id","upgrade-modal-title",1,"add-team-moderator__popup-title"],[1,"add-team-moderator__popup-infobox"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",2,"flex-shrink","0"],["cx","9","cy","7","r","4"],["d","M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"],["d","M16 3.13a4 4 0 0 1 0 7.75"],["d","M21 21v-2a4 4 0 0 0-3-3.85"],[1,"add-team-moderator__popup-infotext"],["role","dialog","aria-labelledby","limit-modal-title",1,"add-team-moderator__modal"],["id","limit-modal-title",1,"add-team-moderator__popup-title"],[1,"add-team-moderator__limit-badge"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"add-team-moderator__limit-badge-text"],[1,"add-team-moderator__popup-msg"],[1,"add-team-moderator__popup-actions"],["type","button",1,"add-team-moderator__btn-cancel",3,"click"],["role","dialog","aria-labelledby","edit-modal-title",1,"add-team-moderator__modal"],[1,"add-team-moderator__modal-content","add-team-moderator__modal-content--edit",3,"click"],["id","edit-modal-title",1,"add-team-moderator__modal-title"],[1,"add-team-moderator__dropdown","add-team-moderator__dropdown--modal",3,"click","keydown.escape"],[1,"add-team-moderator__view-hint"],[1,"add-team-moderator__permissions-table","add-team-moderator__permissions-table--modal","add-team-moderator__permissions-table--edit"],[1,"add-team-moderator__modal-actions"],[1,"add-team-moderator__checkbox-wrap"],["type","checkbox",1,"add-team-moderator__checkbox",3,"ngModel","name","id","ngModelChange"],["aria-hidden","true",1,"add-team-moderator__checkbox-custom"]],template:function(t,e){1&t&&o.YNc(0,zR,26,21,"main",0),2&t&&o.Q6J("ngIf",e.translation)},directives:[to.O5,Xi._Y,Xi.JL,Xi.F,Xi.Fj,Xi.Q7,Xi.JJ,Xi.On,to.sg,Xi.Wl,po],styles:[".add-team-moderator[_ng
1content-%COMP%]{max-width:900px;background-color:transparent!important}.add-team-moderator__tabs[_ngcontent-%COMP%]{display:flex;grid-gap:1rem;gap:1rem;margin-bottom:1rem;border-bottom:1px solid #dee2e6}.add-team-moderator__tab[_ngcontent-%COMP%]{padding:.5rem .25rem;font-size:14px;font-weight:500;color:#6c757d;background:transparent;border:none;border-bottom:2px solid transparent;cursor:pointer;transition:color .2s ease,border-color .2s ease;margin-bottom:-1px}.add-team-moderator__tab[_ngcontent-%COMP%]:hover{color:#333}.add-team-moderator__tab.active[_ngcontent-%COMP%]{color:#5371ff;color:var(--Primary-Color, #5371ff);border-bottom-color:#5371ff;border-bottom-color:var(--Primary-Color, #5371ff)}.add-team-moderator__tab-content[_ngcontent-%COMP%]{animation:add-team-moderator-fade .2s ease}@keyframes add-team-moderator-fade{0%{opacity:.7}to{opacity:1}}.add-team-moderator__perm-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;grid-gap:1rem;gap:1rem}.add-team-moderator__user-count[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#5a6270;background:#eef0f4;height:38px;line-height:38px;padding:0 .85rem;border-radius:20px;white-space:nowrap;letter-spacing:.02em;flex-shrink:0}.add-team-moderator__search-wrap[_ngcontent-%COMP%]{position:relative;flex:0 1 360px}.add-team-moderator__search-icon[_ngcontent-%COMP%]{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:#9ca3af;pointer-events:none}.add-team-moderator__search-input[_ngcontent-%COMP%]{width:100%;height:38px;padding:0 .85rem 0 2.5rem;font-size:14px;color:#333;background:#fff;border:1px solid #dee2e6;border-radius:8px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.add-team-moderator__search-input[_ngcontent-%COMP%]::-moz-placeholder{color:#adb5bd}.add-team-moderator__search-input[_ngcontent-%COMP%]::placeholder{color:#adb5bd}.add-team-moderator__search-input[_ngcontent-%COMP%]:focus{border-color:#5371ff;box-shadow:0 0 0 3px #5371ff26}.add-team-moderator__users-table-wrap[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid #e2e5ea;border-radius:10px;background:#fff;box-shadow:0 1px 4px #0000000a}.add-team-moderator__users-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}.add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .add-team-moderator__users-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:.85rem 1.15rem;text-align:left;border-bottom:1px solid #eef0f3}.add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#6b7280;background:linear-gradient(180deg,#f9fafb 0%,#f3f4f6 100%);letter-spacing:.06em;text-transform:uppercase;padding:.75rem 1.15rem}.add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-child{border-radius:10px 0 0}.add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:last-child{border-radius:0 10px 0 0}.add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{background:#fff;transition:background .2s ease}.add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(even){background:#fafbfc}.add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%]{border-bottom:none}.add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#f0f3ff!important}.add-team-moderator__name-cell[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:.7rem;gap:.7rem}.add-team-moderator__avatar-sm[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:#fff;flex-shrink:0;letter-spacing:.02em}.add-team-moderator__avatar-sm--active[_ngcontent-%COMP%]{background:linear-gradient(135deg,#5371ff 0%,#7b93ff 100%)}.add-team-moderator__avatar-sm--disabled[_ngcontent-%COMP%]{background:linear-gradient(135deg,#9ca3af 0%,#bdc3cc 100%)}.add-team-moderator__name-text[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#111827;letter-spacing:-.01em}.add-team-moderator__email-text[_ngcontent-%COMP%]{font-size:13px;color:#4b5563}.add-team-moderator__app-text[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;font-weight:500}.add-team-moderator__status-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:.35rem;gap:.35rem;font-size:11px;font-weight:600;padding:.2rem .65rem;border-radius:20px;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}.add-team-moderator__status-badge--active[_ngcontent-%COMP%]{color:#15803d;background:#dcfce7}.add-team-moderator__status-badge--disabled[_ngcontent-%COMP%]{color:#92400e;background:#fef3c7}.add-team-moderator__status-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex-shrink:0}.add-team-moderator__status-badge--active[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%]{background:#15803d}.add-team-moderator__status-badge--disabled[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%]{background:#92400e}.add-team-moderator__table-row--deleted[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;background:#f5f5f5!important}.add-team-moderator__table-row--deleted[_ngcontent-%COMP%]   .add-team-moderator__name-text[_ngcontent-%COMP%], .add-team-moderator__table-row--deleted[_ngcontent-%COMP%]   .add-team-moderator__email-text[_ngcontent-%COMP%], .add-team-moderator__table-row--deleted[_ngcontent-%COMP%]   .add-team-moderator__app-text[_ngcontent-%COMP%]{color:#9ca3af!important}.add-team-moderator__table-row--deleted[_ngcontent-%COMP%]   .add-team-moderator__btn-icon[_ngcontent-%COMP%], .add-team-moderator__table-row--deleted[_ngcontent-%COMP%]   .add-team-moderator__btn-resend[_ngcontent-%COMP%]{opacity:.4;cursor:not-allowed}.add-team-moderator__empty-row[_ngcontent-%COMP%]{font-size:14px;padding:2.5rem 1rem!important;text-align:center;color:#9ca3af}.add-team-moderator__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:.4rem;gap:.4rem;flex-wrap:nowrap}.add-team-moderator__btn-resend[_ngcontent-%COMP%]{padding:.3rem .7rem;font-size:11px;font-weight:600;color:#fff;background:#6366f1;border:none;border-radius:6px;cursor:pointer;transition:background .2s ease,transform .1s ease;letter-spacing:.02em}.add-team-moderator__btn-resend[_ngcontent-%COMP%]:hover{background:#4f46e5;transform:translateY(-1px)}.add-team-moderator__btn-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;color:#fff;background:#6b7280;border:none;border-radius:8px;
1cursor:pointer;transition:background .2s ease,transform .15s ease,box-shadow .2s ease;position:relative}.add-team-moderator__btn-icon[data-tooltip][_ngcontent-%COMP%]:after, .add-team-moderator__btn-resend[data-tooltip][_ngcontent-%COMP%]:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 10px;background:#1f2937;color:#fff;font-size:11px;font-weight:500;white-space:nowrap;border-radius:6px;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:10}.add-team-moderator__btn-icon[data-tooltip][_ngcontent-%COMP%]:hover:after, .add-team-moderator__btn-resend[data-tooltip][_ngcontent-%COMP%]:hover:after{opacity:1}.add-team-moderator__btn-icon[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 2px 6px #00000026}.add-team-moderator__btn-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{flex-shrink:0}.add-team-moderator__btn-icon--view[_ngcontent-%COMP%]{background:#6366f1}.add-team-moderator__btn-icon--view[_ngcontent-%COMP%]:hover{background:#4f46e5}.add-team-moderator__btn-icon--disable[_ngcontent-%COMP%]{background:#ef4444}.add-team-moderator__btn-icon--disable[_ngcontent-%COMP%]:hover{background:#dc2626}.add-team-moderator__btn-icon--enable[_ngcontent-%COMP%]{background:#22c55e}.add-team-moderator__btn-icon--enable[_ngcontent-%COMP%]:hover{background:#16a34a}.add-team-moderator__btn-icon--delete[_ngcontent-%COMP%]{background:#991b1b}.add-team-moderator__btn-icon--delete[_ngcontent-%COMP%]:hover{background:#7f1d1d}.add-team-moderator__subtitle[_ngcontent-%COMP%]{font-size:14px;margin-bottom:1.75rem;line-height:1.4}.add-team-moderator__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:1rem;gap:1rem}.add-team-moderator__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:.4rem;gap:.4rem}.add-team-moderator__label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#333;letter-spacing:.02em}.add-team-moderator__input[_ngcontent-%COMP%]{width:100%;padding:.6rem .85rem;font-size:14px;color:#333;background:#fff;border:1px solid #dee2e6;border-radius:6px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.add-team-moderator__input[_ngcontent-%COMP%]::-moz-placeholder{color:#adb5bd}.add-team-moderator__input[_ngcontent-%COMP%]::placeholder{color:#adb5bd}.add-team-moderator__input[_ngcontent-%COMP%]:hover{border-color:#ced4da}.add-team-moderator__input[_ngcontent-%COMP%]:focus{border-color:#5371ff;box-shadow:0 0 0 3px #5371ff26}.add-team-moderator__input--error[_ngcontent-%COMP%]{border-color:#dc3545!important;box-shadow:0 0 0 3px #dc354526!important}.add-team-moderator__error-text[_ngcontent-%COMP%]{color:#dc3545;font-size:12px;margin-top:4px;display:block}.add-team-moderator__dropdown[_ngcontent-%COMP%]{position:relative;width:100%}.add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.6rem .85rem;font-size:14px;color:#333;background:#fff;border:1px solid #dee2e6;border-radius:6px;cursor:pointer;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover{border-color:#ced4da}.add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%], .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:focus{border-color:#5371ff;box-shadow:0 0 0 3px #5371ff26}.add-team-moderator__dropdown-value[_ngcontent-%COMP%]{flex:1;text-align:left}.add-team-moderator__dropdown-value[_ngcontent-%COMP%]:empty:before{content:\"Select folder\";color:#adb5bd}.add-team-moderator__dropdown-arrow[_ngcontent-%COMP%]{flex-shrink:0;margin-left:.5rem;transition:transform .2s ease;color:#6c757d}.add-team-moderator__dropdown-arrow.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.add-team-moderator__dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);left:0;right:0;margin:0;padding:.35rem 0;list-style:none;background:#fff;border:1px solid #dee2e6;border-radius:6px;box-shadow:0 4px 12px #00000014;z-index:10;max-height:220px;overflow-y:auto}.add-team-moderator__dropdown-item[_ngcontent-%COMP%]{padding:.5rem .85rem;font-size:14px;color:#333;cursor:pointer;transition:background .15s ease}.add-team-moderator__dropdown-item[_ngcontent-%COMP%]:hover, .add-team-moderator__dropdown-item.active[_ngcontent-%COMP%]{background:#f0f4ff!important;color:#000!important}.add-team-moderator__permissions[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:.5rem}.add-team-moderator__permissions-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#333;letter-spacing:.02em;margin-bottom:.75rem}.add-team-moderator__permissions-table[_ngcontent-%COMP%]{border:1px solid #dee2e6;border-radius:6px;background:#fff;overflow:hidden}.add-team-moderator__permissions-header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto;grid-gap:1rem;gap:1rem;padding:.65rem 1rem;font-size:12px;font-weight:600;color:#333;background:#f8f9fa;border-bottom:1px solid #dee2e6}.add-team-moderator__permissions-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto;grid-gap:1rem;gap:1rem;align-items:flex-start;padding:.85rem 1rem;border-bottom:1px solid #eee}.add-team-moderator__permissions-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.add-team-moderator__permissions-col--type[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:.2rem;gap:.2rem}
1.add-team-moderator__permission-name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#333}.add-team-moderator__permission-desc[_ngcontent-%COMP%]{font-size:13px;color:#6c757d;line-height:1.35}.add-team-moderator__permissions-col--access[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:.15rem}.add-team-moderator__checkbox-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:center;cursor:pointer;margin:0}.add-team-moderator__checkbox[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0;height:0}.add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{display:inline-block;width:18px;height:18px;border:2px solid #dee2e6;border-radius:4px;background:#fff;transition:border-color .2s ease,background .2s ease}.add-team-moderator__checkbox[_ngcontent-%COMP%]:checked + .add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{background:#5371ff;border-color:#5371ff;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none'%3E%3Cpath d='M1 5L4.5 8.5L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-size:12px 10px;background-position:center;background-repeat:no-repeat}.add-team-moderator__checkbox-wrap[_ngcontent-%COMP%]:hover   .add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{border-color:#5371ff}.add-team-moderator__actions[_ngcontent-%COMP%]{margin-top:0;display:flex;justify-content:flex-end}.add-team-moderator__btn-submit[_ngcontent-%COMP%]{padding:.6rem 1.5rem;font-size:14px;font-weight:600;color:#fff;background:var(--Primary-Color);border:none;border-radius:6px;cursor:pointer;transition:background .2s ease,transform .05s ease}.add-team-moderator__btn-submit[_ngcontent-%COMP%]:hover{background:rgb(83 113 255 / 93%)}.add-team-moderator__btn-submit[_ngcontent-%COMP%]:active{transform:scale(.98)}.add-team-moderator__btn-submit[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.add-team-moderator.active[_ngcontent-%COMP%]{max-width:100%}.add-team-moderator__modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1040;backdrop-filter:blur(4px)}.add-team-moderator__modal[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1050;display:flex;align-items:center;justify-content:center;padding:1.5rem;box-sizing:border-box}.add-team-moderator__modal-content[_ngcontent-%COMP%]{background:#fff;border-radius:12px;max-width:520px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 50px #0000002e,0 0 0 1px #0000000a}.add-team-moderator__modal-content--edit[_ngcontent-%COMP%]{max-width:600px}.add-team-moderator__modal-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem;background:linear-gradient(135deg,#f8f9fc 0%,#f0f2f8 100%);border-bottom:1px solid #e8eaef;border-radius:12px 12px 0 0}.add-team-moderator__modal-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:#1a1d24;letter-spacing:-.02em}.add-team-moderator__modal-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:#fff;border:1px solid #e8eaef;border-radius:8px;color:#6c757d;cursor:pointer;padding:0;transition:color .2s ease,background .2s ease,border-color .2s ease}.add-team-moderator__modal-close[_ngcontent-%COMP%]:hover{color:#1a1d24;background:#f0f2f8;border-color:#dee2e6}.add-team-moderator__modal-body[_ngcontent-%COMP%]{padding:1.5rem}.add-team-moderator__view-row[_ngcontent-%COMP%]{margin-bottom:1.25rem}.add-team-moderator__view-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}.add-team-moderator__view-row--two[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:1.25rem;gap:1.25rem}.add-team-moderator__view-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:.35rem;gap:.35rem}.add-team-moderator__view-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.06em}.add-team-moderator__view-label--section[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem}.add-team-moderator__view-required[_ngcontent-%COMP%]{color:#dc3545;font-size:.85em}.add-team-moderator__view-value[_ngcontent-%COMP%]{margin:0;font-size:15px;font-weight:500;
1color:#1a1d24;line-height:1.45}.add-team-moderator__view-value--highlight[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#f0f7f0;color:#2d6a2d;border-radius:8px;font-size:14px;font-weight:500;border:1px solid #d4e8d4}.add-team-moderator__view-row--permissions[_ngcontent-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]{margin-top:.5rem;border-radius:8px;overflow:hidden;border:1px solid #e8eaef}.add-team-moderator__view-hint[_ngcontent-%COMP%]{margin:0 0 .6rem;font-size:12px;color:#8c9199;letter-spacing:.01em}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]{max-width:100%;position:relative}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]{padding:.6rem .85rem;border:1px solid #e8eaef;border-radius:8px;background:#fafbfc;font-size:14px;font-weight:500;color:#1a1d24;transition:border-color .2s ease,background .2s ease}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover{border-color:#dee2e6;background:#fff}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%]{border-color:#5371ff;border-color:var(--Primary-Color, #5371ff);background:#fff;box-shadow:0 0 0 2px #5371ff1f}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-menu[_ngcontent-%COMP%]{position:absolute;z-index:10;margin-top:.35rem;border-radius:8px;box-shadow:0 8px 24px #0000001f;border:1px solid #e8eaef}.add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]{padding:.5rem .85rem;font-size:14px}.add-team-moderator__permissions-table--edit[_ngcontent-%COMP%]   .add-team-moderator__permissions-row[_ngcontent-%COMP%]{padding:.7rem 1rem}.add-team-moderator__permissions-table--edit[_ngcontent-%COMP%]   .add-team-moderator__permissions-col--access[_ngcontent-%COMP%]{padding-top:.4rem}.add-team-moderator__modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;grid-gap:.65rem;gap:.65rem;margin-top:1.35rem;padding-top:1.15rem;border-top:1px solid #e8eaef}.add-team-moderator__btn-cancel[_ngcontent-%COMP%]{padding:.55rem 1.2rem;font-size:13px;font-weight:500;color:#6c757d;background:#fff;border:1px solid #e8eaef;border-radius:8px;cursor:pointer;transition:background .2s ease,border-color .2s ease,color .2s ease}.add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover{background:#f8f9fc;border-color:#dee2e6;color:#495057}.add-team-moderator__btn-submit--modal[_ngcontent-%COMP%]{padding:.55rem 1.2rem;font-size:13px;font-weight:600;border-radius:8px}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-backdrop[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-backdrop[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);backdrop-filter:blur(8px)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-content[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-content[_ngcontent-%COMP%]{background:#1c2128;background:var(--card-bg, #1c2128);box-shadow:0 24px 56px #00000080,0 0 0 1px #373e47;box-shadow:0 24px 56px #00000080,0 0 0 1px var(--border-color, #373e47)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-header[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-header[_ngcontent-%COMP%]{background:linear-gradient(135deg,#22272e 0%,#2d333b 100%)!important;background:linear-gradient(135deg,var(--secondary-bg, #22272e) 0%,var(--secondary-bg, #2d333b) 100%)!important;border-bottom-color:#373e47!important;border-bottom-color:var(--border-color, #373e47)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-title[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-title[_ngcontent-%COMP%]{color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-close[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-close[_ngcontent-%COMP%]{background:#2d333b;background:var(--secondary-bg, #2d333b);border-color:#373e47;border-color:var(--border-color, #373e47);color:#8b949e;color:var(--primary-text, #8b949e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-close[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-close[_ngcontent-%COMP%]:hover{color:#e6edf3;color:var(--primary-text, #e6edf3);background:#373e47;background:var(--secondary-bg, #373e47);border-color:#444c56;border-color:var(--border-color, #444c56)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__view-label[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__view-label[_ngcontent-%COMP%]{color:#8b949e;color:var(--primary-text, #8b949e);opacity:.95}.theme-dark[_nghost-%COMP%]   .add-team-moderator__view-value[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__view-value[_ngcontent-%COMP%]{color:#e6edf3;color:var(--primary-text, #e6edf3)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__view-value--highlight[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__view-value--highlight[_ngcontent-%COMP%]{background:rgba(46,160,67,.22);color:#7ee787;border-color:#2ea04380}.theme-dark[_nghost-%COMP%]   .add-team-moderator__view-row--permissions[_ngcontent-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__view-row--permissions[_ngcontent-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]{border-color:#373e47;border-color:var(--border-color, #373e47);background:#22272e;background:var(--secondary-bg, #22272e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]   .add-team-moderator__permissions-header[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]   .add-team-moderator__permissions-header[_ngcontent-%COMP%]{background:#2d333b;background:var(--secondary-bg, #2d333b);color:#8b949e;color:var(--primary-text, #8b949e);border-bottom-color:#373e47;border-bottom-color:var(--border-color, #373e47)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]   .add-team-moderator__permissions-row[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__permissions-table--modal[_ngcontent-%COMP%]   .add-team-moderator__permissions-row[_ngcontent-%COMP%]{border-bottom-color:#373e47;border-bottom-color:var(--border-color, #373e47)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__permission-name[_ng
1content-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__permission-name[_ngcontent-%COMP%]{color:#e6edf3;color:var(--primary-text, #e6edf3)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__permission-desc[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__permission-desc[_ngcontent-%COMP%]{color:#8b949e;color:var(--primary-text, #8b949e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__view-hint[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__view-hint[_ngcontent-%COMP%]{color:#8b949e;color:var(--primary-text, #8b949e);opacity:.9}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]{background:#2d333b!important;background:var(--secondary-bg, #2d333b)!important;border-color:#373e47;border-color:var(--border-color, #373e47);color:#e6edf3;color:var(--primary-text, #e6edf3)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover{background:#373e47;background:var(--secondary-bg, #373e47);border-color:#444c56;border-color:var(--border-color, #444c56)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%]{border-color:#539bf5;border-color:var(--Primary-Color, #539bf5);background:#373e47!important;background:var(--secondary-bg, #373e47)!important;box-shadow:0 0 0 2px #539bf54d}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-menu[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-menu[_ngcontent-%COMP%]{background:#1c2128!important;background:var(--card-bg, #1c2128)!important;border-color:#373e47;border-color:var(--border-color, #373e47);box-shadow:0 8px 28px #00000080}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]{color:#e6edf3;color:var(--primary-text, #e6edf3)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]:hover, .theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item.active[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown--modal[_ngcontent-%COMP%]   .add-team-moderator__dropdown-item.active[_ngcontent-%COMP%]{background:#373e47!important;color:#e6edf3!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__modal-actions[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__modal-actions[_ngcontent-%COMP%]{border-top-color:#373e47;border-top-color:var(--border-color, #373e47)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]{background:#2d333b!important;background:var(--secondary-bg, #2d333b)!important;border-color:#373e47!important;border-color:var(--border-color, #373e47)!important;color:#8b949e!important;color:var(--primary-text, #8b949e)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover{background:#373e47!important;background:var(--secondary-bg, #373e47)!important;border-color:#444c56!important;border-color:var(--border-color, #444c56)!important;color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-submit--modal[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-submit--modal[_ngcontent-%COMP%]{background:#539bf5!important;background:var(--Primary-Color, #539bf5)!important;color:#fff!important;border:none}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-submit--modal[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-submit--modal[_ngcontent-%COMP%]:hover{filter:brightness(1.12)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__checkbox-custom[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{border-color:#444c56!important;border-color:var(--border-color, #444c56)!important;background-color:#2d333b!important;background-color:var(--secondary-bg, #2d333b)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__checkbox[_ngcontent-%COMP%]:checked + .add-team-moderator__checkbox-custom[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__checkbox[_ngcontent-%COMP%]:checked + .add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{background-color:#539bf5!important;background-color:var(--Primary-Color, #539bf5)!important;border-color:#539bf5!important;border-color:var(--Primary-Color, #539bf5)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__checkbox-wrap[_ngcontent-%COMP%]:hover   .add-team-moderator__checkbox-custom[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__checkbox-wrap[_ngcontent-%COMP%]:hover   .add-team-moderator__checkbox-custom[_ngcontent-%COMP%]{border-color:#539bf5!important;border-color:var(--Primary-Color, #539bf5)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]{background:#2d333b!important;background:var(--secondary-bg, #2d333b)!important;border-color:#373e47!important;border-color:var(--border-color, #373e47)!important;color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:hover{border-color:#444c56!important;border-color:var(--border-color, #444c56)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger.open[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:focus, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-trigger[_ngcontent-%COMP%]:focus{border-color:#539bf5!important;border-color:var(--Primary-Color, #539bf5)!important;box-shadow:0 0 0 2px #539bf540}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-value[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-value[_ngcontent-%COMP%]{color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-value[_ngcontent-%COMP%]:empty:before, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-value[_ngcontent-%COMP%]:empty:before{color:#8b949e!important;color:var(--primary-text, #8b949e)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-arrow[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-arrow[_ngcontent-%COMP%]{color:#8b949e!important;color:var(--primary-text, #8b949e)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-menu[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-menu[_ngcontent-%COMP%]{background:#1c2128!important;background:var(--card-bg, #1c2128)!important;border-color:#373e47;border-color:var(--border-color, #373e47);box-shadow:0 8px 28px #00000080}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]{color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item[_ngcontent-%COMP%]:hover, .theme-dark[_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item.active[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__dropdown[_ngcontent-%COMP%]:not(.add-team-moderator__dropdown--modal)   .add-team-moderator__dropdown-item.active[_ngcontent-%COMP%]{background:#373e47!important;background:var(--secondary-bg, #373e47)!important;color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__user-count[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__user-count[_ngcontent-%COMP%]{background:#2d333b;background:var(--secondary-bg, #2d333b);color:#8b949e;color:var(--primary-text, #8b949e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__search-input[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__search-input[_ngcontent-%COMP%]{background:#2d333b;background:var(--secondary-bg, #2d333b);border-color:#373e47;border-color:var(--border-color, #373e47);color:#e6edf3;color:var(--primary-text, #e6edf3)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__search-input[_ngcontent-%COMP%]:focus, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__search-input[_ngcontent-%COMP%]:focus{border-color:#539bf5;border-color:var(--Primary-Color, #539bf5);box-shadow:0 0 0 3px #539bf533}.theme-dark[_nghost-%COMP%]   .add-team-moderator__search-icon[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__search-icon[_ngcontent-%COMP%]{color:#8b949e;color:var(--primary-text, #8b949e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table-wrap[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table-wrap[_ngcontent-%COMP%]{background:#1c2128;background:var(--card-bg, #1c2128);border-color:#373e47;border-color:var(--border-color, #373e47);box-shadow:0 1px 4px #0003}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:linear-gradient(180deg,#2d333b 0%,#22272e 100%);background:linear-gradient(180deg,var(--secondary-bg, #2d333b) 0%,var(--secondary-bg, #22272e) 100%);color:#8b949e;color:var(--primary-text, #8b949e);border-bottom-color:#373e47;border-bottom-color:var(--border-color, #373e47)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-bottom-color:#2d333b;border-bottom-color:var(--border-color, #2d333b)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{background:#1c2128;background:var(--card-bg, #1c2128)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(even), .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(even){background:#22272e;background:var(--secondary-bg, #22272e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__users-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#2d333b!important;background:var(--secondary-bg, #2d333b)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__name-text[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__name-text[_ngcontent-%COMP%]{color:#f0f3f6;color:var(--primary-text, #f0f3f6)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__email-text[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__email-text[_ngcontent-%COMP%]{color:#9aa5b1;color:var(--primary-text, #9aa5b1)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__app-text[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__app-text[_ngcontent-%COMP%]{color:#8b949e;color:var(--primary-text, #8b949e)}.theme-dark[_nghost-%COMP%]   .add-team-moderator__status-badge--active[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__status-badge--active[_ngcontent-%COMP%]{background:rgba(34,197,94,.2)!important;color:#4ade80!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__status-badge--active[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__status-badge--active[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%]{background:#4ade80!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__status-badge--disabled[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__status-badge--disabled[_ngcontent-%COMP%]{background:rgba(234,179,8,.2)!important;color:#fbbf24!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__status-badge--disabled[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__status-badge--disabled[_ngcontent-%COMP%]   .add-team-moderator__status-dot[_ngcontent-%COMP%]{background:#fbbf24!important}.theme-dark[_nghost-%COMP%]   .add-tea
1m-moderator__btn-icon--view[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--view[_ngcontent-%COMP%]{background:#818cf8!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--view[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--view[_ngcontent-%COMP%]:hover{background:#6366f1!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--disable[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--disable[_ngcontent-%COMP%]{background:#f87171!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--disable[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--disable[_ngcontent-%COMP%]:hover{background:#ef4444!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--enable[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--enable[_ngcontent-%COMP%]{background:#4ade80!important;color:#052e16!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--enable[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--enable[_ngcontent-%COMP%]:hover{background:#22c55e!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--delete[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--delete[_ngcontent-%COMP%]{background:#b91c1c!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-icon--delete[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-icon--delete[_ngcontent-%COMP%]:hover{background:#991b1b!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__table-row--deleted[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__table-row--deleted[_ngcontent-%COMP%]{background:#1a1e24!important;background:var(--secondary-bg, #1a1e24)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__empty-row[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__empty-row[_ngcontent-%COMP%]{color:#6b7685;color:var(--primary-text, #6b7685)}.add-team-moderator__popup-close-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding:12px 14px 0}.add-team-moderator__popup-body[_ngcontent-%COMP%]{padding:0 28px 26px;text-align:center}.add-team-moderator__popup-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1f2430;margin:0 0 12px}.add-team-moderator__popup-infobox[_ngcontent-%COMP%]{background:#eef1fe;border-radius:10px;padding:14px 16px;margin-bottom:18px;display:flex;align-items:center;grid-gap:10px;gap:10px;text-align:left;color:#5b6cf9}.add-team-moderator__popup-infobox[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{flex-shrink:0}.add-team-moderator__popup-infotext[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#3c4353;line-height:1.55}.add-team-moderator__limit-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:8px;gap:8px;background:#fdf3e0;border-radius:20px;padding:6px 16px;margin-bottom:14px;color:#ba7517}.add-team-moderator__limit-badge-text[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:#854f0b}.add-team-moderator__popup-msg[_ngcontent-%COMP%]{margin:0 0 18px;font-size:13.5px;color:#5a6172;line-height:1.6}.add-team-moderator__popup-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;grid-gap:12px;gap:12px}.add-team-moderator__btn-cancel[_ngcontent-%COMP%]{border:1px solid #d4d9e4;background:transparent;color:#5a6172;font-size:13px;font-weight:500;padding:10px 22px;border-radius:8px;cursor:pointer}.add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover{background:#f5f7fb}.theme-dark[_nghost-%COMP%]   .add-team-moderator__popup-title[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__popup-title[_ngcontent-%COMP%]{color:#e6edf3!important;color:var(--primary-text, #e6edf3)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__popup-infobox[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__popup-infobox[_ngcontent-%COMP%]{background:rgba(91,108,249,.18);color:#97a3ff}.theme-dark[_nghost-%COMP%]   .add-team-moderator__popup-infotext[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__popup-infotext[_ngcontent-%COMP%]{color:#cdd5e0!important;color:var(--primary-text, #cdd5e0)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__limit-badge[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__limit-badge[_ngcontent-%COMP%]{background:rgba(239,159,39,.18);color:#efb35a}.theme-dark[_nghost-%COMP%]   .add-team-moderator__limit-badge-text[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__limit-badge-text[_ngcontent-%COMP%]{color:#f0c078!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__popup-msg[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__popup-msg[_ngcontent-%COMP%]{color:#8b949e!important;color:var(--primary-text, #8b949e)!important}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]{border-color:#444c56;border-color:var(--border-color, #444c56);color:#cdd5e0;color:var(--primary-text, #cdd5e0);background:transparent}.theme-dark[_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .add-team-moderator__btn-cancel[_ngcontent-%COMP%]:hover{background:#2d333b;background:var(--secondary-bg, #2d333b)}"]}),t})()},{path:"email-templates",canActivate:[JO],loadChildren:()=>n.e(34).then(n.bind(n,2034)).then(t=>
1t.EmailTemplatesModule)},{path:"",redirectTo:"create-agent",pathMatch:"full"},{path:"**",redirectTo:"connects",pathMatch:"full"}];let GR=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[ui.Bz.forRoot(VR,{relativeLinkResolution:"legacy"})],ui.Bz]}),t})(),WR=(()=>{class t{constructor(t){this.bsModalRef=t}ngOnInit(){this.onClose=new fo.xQ}confirmDeleteConnect(t){this.onClose.next(!0),this.bsModalRef.hide()}hideModal(t){this.bsModalRef.hide()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-version-confirm-pop-up"]],decls:13,vars:0,consts:[[1,"modal-body"],[1,"text-center","version-popup"],["src","https://media.appypieautomate.ai/images/press_f5_uiversionmismatch.webp","alt","UI Version Mismatch Error"],[1,"mb-2"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o._UZ(2,"img",2),o.TgZ(3,"h3"),o._uU(4,"Time For a Refresh"),o.TgZ(5,"strong"),o._uU(6," Press F5"),o.qZA(),o.qZA(),o.TgZ(7,"p",3),o._uU(8,"For more Features and better user experience "),o._UZ(9,"br"),o._uU(10,"please give a hard refresh by clicking"),o.qZA(),o.TgZ(11,"h4"),o._uU(12,'"F5 on your keyboard"'),o.qZA(),o.qZA(),o.qZA())},styles:[".version-popup[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], .version-popup[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#0f3d6f;font-weight:700;margin-bottom:1.5rem;font-size:clamp(1.24rem,2vw,1.5rem)}.version-popup[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#0f3d6f;font-size:clamp(13px,2vw,16px)!important}.version-popup[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-bottom:1rem;width:300px}"]}),t})();function KR(t,e){if(1&t&&(o.TgZ(0,"p",16),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.hij("Minimum balance must be at least ",t.currentUserBalanceSign," 10.")}}function XR(t,e){if(1&t&&(o.TgZ(0,"p",17),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.hij("Minimum threshold balance must be at least ",t.currentUserBalanceSign," 5.")}}function t$(t,e){1&t&&(o.TgZ(0,"p",17),o._uU(1,"The threshold balance must be less than the amount."),o.qZA())}let e$=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.cusService=e,this.modelTitle="Configure Auto Recharge",this.modelContent="Enter the amount to be added automatically.",this.modelContentThreshold="Enter the credit balance to be automatically topped up, whenever it falls below.",this.IsDelete=!1,this.amountInputValue="Fetching...",this.thresholdInputValue="Fetching...",this.currentUserBalanceSign="USD",this.isFetching=!0,this.getUserBalance()}ngOnInit(){this.onClose=new fo.xQ}onSave(){this.onClose.next({price:this.amountInputValue,threshold:this.thresholdInputValue}),this.bsModalRef.hide()}isButtonEnable(){return Number.parseInt(this.amountInputValue)>=10&&Number.parseInt(this.amountInputValue)<=999999&&Number.parseInt(this.thresholdInputValue)>=5&&Number.parseInt(this.thresholdInputValue)<=999999}isEnteredValueLow(t,e){return null!=t&&Number.parseInt(t)<e}isEnteredValueLowThanAmount(t,e){return"Fetching..."!==e&&Number.parseInt(t)>Number.parseInt(e)}getUserBalance(){this.cusService.getCustomerBlance().subscribe(t=>{var e,n,i,o,r;"success"===(null==t?void 0:t.status)&&(this.currentUserBalanceSign=(null===(e=null==t?void 0:t.results)||void 0===e?void 0:e.userCurrency)||"USD",this.amountInputValue=(null===(n=null==t?void 0:t.results)||void 0===n?void 0:n.autoRechargeAmount)?null===(i=null==t?void 0:t.results)||void 0===i?void 0:i.autoRechargeAmount:"",this.thresholdInputValue=(null===(o=null==t?void 0:t.results)||void 0===o?void 0:o.rechargeLimit)?null===(r=null==t?void 0:t.results)||void 0===r?void 0:r.rechargeLimit:"")})}restrictTextInput(t){["Backspace","Tab","ArrowLeft","ArrowRight","Delete","0","1","2","3","4","5","6","7","8","9","."].includes(t.key)||t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-configure-auto-recharge-popup"]],decls:31,vars:13,consts:[[1,"modal-header","testfetch-header","border-bottom"],[1,"modal-title","testfetch-title","fw-semibold"],[1,"modal-body","auto-bal-wrap"],[1,"d-flex","flex-column","gap-4","text-start"],[1,"d-flex","flex-column"],[1,"mb-0"],[1,"align-items-center","border","bg-white","d-flex","gap-3","my-2","rounded","rounded-3","text-black","autorecharge-input"],[1,"d-inline-block","p-2","rounded-start","fw-semibold","text-nowrap",2,"background","#F6
1FBFF"],["type","text","placeholder","10.00","pattern","^[0-9]*\\.?[0-9]+$",1,"d-inline-block","fw-normal","w-100","border-0",3,"ngModel","value","ngModelChange","keydown"],["class","text-danger mb-0",4,"ngIf"],[1,"align-items-center","border","bg-white","d-flex","gap-3","mt-2","rounded","rounded-3","text-black","autorecharge-input"],["type","text","placeholder","5.00","pattern","^[0-9]*\\.?[0-9]+$",1,"d-inline-block","fw-normal","w-100","border-0",3,"ngModel","value","ngModelChange","keydown"],["class","text-danger mb-0 mt-2",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0","gap-2"],["type","button","data-dismiss","modal",1,"btn","btn-default","rounded-pill","px-md-4","btn_cancel",3,"click"],["type","button","id","ProfileOpenButton",1,"btn","btn-default","rounded-pill","px-md-4","btn_confirm",3,"disabled","click"],[1,"text-danger","mb-0"],[1,"text-danger","mb-0","mt-2"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.TgZ(4,"div",3),o.TgZ(5,"div",4),o.TgZ(6,"h4"),o._uU(7,"Amount:"),o.qZA(),o.TgZ(8,"p",5),o._uU(9),o.qZA(),o.TgZ(10,"div",6),o.TgZ(11,"strong",7),o._uU(12),o.qZA(),o.TgZ(13,"input",8),o.NdJ("ngModelChange",function(t){return e.amountInputValue=t})("keydown",function(t){return e.restrictTextInput(t)}),o.qZA(),o.qZA(),o.YNc(14,KR,2,1,"p",9),o.qZA(),o.TgZ(15,"div",4),o.TgZ(16,"h4"),o._uU(17,"Threshold Balance:"),o.qZA(),o.TgZ(18,"p",5),o._uU(19),o.qZA(),o.TgZ(20,"div",10),o.TgZ(21,"strong",7),o._uU(22),o.qZA(),o.TgZ(23,"input",11),o.NdJ("ngModelChange",function(t){return e.thresholdInputValue=t})("keydown",function(t){return e.restrictTextInput(t)}),o.qZA(),o.qZA(),o.YNc(24,XR,2,1,"p",12),o.YNc(25,t$,2,0,"p",12),o.qZA(),o.qZA(),o.qZA(),o.TgZ(26,"div",13),o.TgZ(27,"button",14),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(28,"Cancel"),o.qZA(),o.TgZ(29,"button",15),o.NdJ("click",function(){return e.onSave()}),o._uU(30,"Save"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(7),o.Oqu(e.modelContent),o.xp6(3),o.Oqu(e.currentUserBalanceSign),o.xp6(1),o.Q6J("ngModel",e.amountInputValue)("value","Fetching..."===e.amountInputValue?"Fetching...":""),o.xp6(1),o.Q6J("ngIf",e.isEnteredValueLow(e.amountInputValue,10)),o.xp6(5),o.Oqu(e.modelContentThreshold),o.xp6(3),o.Oqu(e.currentUserBalanceSign),o.xp6(1),o.Q6J("ngModel",e.thresholdInputValue)("value","Fetching..."===e.thresholdInputValue?"Fetching...":""),o.xp6(1),o.Q6J("ngIf",e.isEnteredValueLow(e.thresholdInputValue,5)),o.xp6(1),o.Q6J("ngIf",e.isEnteredValueLowThanAmount(e.thresholdInputValue,e.amountInputValue)),o.xp6(4),o.Q6J("disabled",!e.isButtonEnable()||e.isEnteredValueLowThanAmount(e.thresholdInputValue,e.amountInputValue)))},directives:[Xi.Fj,Xi.c5,Xi.JJ,Xi.On,to.O5],styles:[".autorecharge-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{outline:0;border:0;box-shadow:none}.auto-bal-wrap[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{color:#1d1d1d!important;font-size:1rem!important;font-weight:500!important;line-height:22px!important;margin-bottom:.25rem}.auto-bal-wrap[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#74748a!important;font-size:13px!important;font-weight:400!important;line-height:18px!important}.auto-bal-wrap[_ngcontent-%COMP%]   p.text-danger[_ngcontent-%COMP%]{color:#db3536!important;font-size:13px!important;font-weight:400!important;line-height:18px!important}"]}),t})();function n$(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.hij(" (",t.currencyCode,")")}}function i$(t,e){if(1&t&&(o.TgZ(0,"p",14),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.AsE("Minimum amount is ",t.currentUserBalanceSign," ",t.minAmount,".")}}function o$(t,e){if(1&t&&(o.TgZ(0,"p",14),o._uU(1),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.AsE("Maximum amount is ",t.currentUserBalanceSign," ",t.maxAmount,".")}}let r$=(()=>{class t{constructor(t,e){this.bsModalRef=t,this.cusService=e,this.modelTitle="Add Funds",this.modelContent="Enter the amount to add to your wallet. Your saved card may be charged instantly, or you will be redirected to Stripe to pay securely.",this.amountInputValue="",this.currentUserBalanceSign="$",this.currencyCode="USD",this.minAmount=10,this.maxAmount=5e3,this.isProcessing=!1,this.getUserBalance()}ngOnInit(){this.onClose=new fo.xQ}getUserBalance(){this.cusService.getCustomerBlance().subscribe(t=>{var e,n,i,o;"success"===(null==t?void 0:t.status)&&(this.currentUserBalanceSign=(null===(e=null==t?void 0:t.results)||void 0===e?void 0:e.userCurrency)||"$",this.currencyCode=(null===(n=null==t?void 0:t.results)||void 0===n?void 0:n.userCurrencyCode)||"USD",this.minAmount=Number(null===(i=null==t?void 0:t.results)||void 0===i?void 0:i.minAmount)||10,this.maxAmount=Number(null===(o=null==t?void 0:t.results)||void 0===o?void 0:o.maxAmount)||5e3)})}isAmountLow(){const t=Number.parseFloat(this.amountInputValue);return null!=this.amountInputValue&&""!==this.amountInputValue&&(!isFinite(t)||t<this.minAmount)}isAmountHigh(){const t=Number.parseFloat(this.amountInputValue);return isFinite(t)&&t>this.maxAmount}isButtonEnable(){const t=Number.parseFloat(this.amountInputValue);return!this.isProcessing&&isFinite(t)&&t>=this.minAmount&&t<=this.maxAmount}onSave(){!this.isButtonEnable()||(this.isProcessing=!0,this.onClose.next({amount:this.amountInputValue}),this.bsModalRef.hide())}
1restrictTextInput(t){["Backspace","Tab","ArrowLeft","ArrowRight","Delete","0","1","2","3","4","5","6","7","8","9","."].includes(t.key)||t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(mo.UZ),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-add-fund-popup"]],decls:23,vars:9,consts:[[1,"modal-header","testfetch-header","border-bottom"],[1,"modal-title","testfetch-title","fw-semibold"],[1,"modal-body","auto-bal-wrap"],[1,"d-flex","flex-column","gap-4","text-start"],[1,"d-flex","flex-column"],[4,"ngIf"],[1,"mb-0"],[1,"align-items-center","border","bg-white","d-flex","gap-3","my-2","rounded","rounded-3","text-black","autorecharge-input"],[1,"d-inline-block","p-2","rounded-start","fw-semibold","text-nowrap",2,"background","#F6FBFF"],["type","text","pattern","^[0-9]*\\.?[0-9]+$",1,"d-inline-block","fw-normal","w-100","border-0",3,"ngModel","placeholder","ngModelChange","keydown"],["class","text-danger mb-0",4,"ngIf"],[1,"modal-footer","text-center","justify-content-end","border-0","gap-2"],["type","button","data-dismiss","modal",1,"btn","btn-default","rounded-pill","px-md-4","btn_cancel",3,"click"],["type","button",1,"btn","btn-default","rounded-pill","px-md-4","btn_confirm",3,"disabled","click"],[1,"text-danger","mb-0"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h3",1),o._uU(2),o.qZA(),o.qZA(),o.TgZ(3,"div",2),o.TgZ(4,"div",3),o.TgZ(5,"div",4),o.TgZ(6,"h4"),o._uU(7,"Amount"),o.YNc(8,n$,2,1,"span",5),o._uU(9,":"),o.qZA(),o.TgZ(10,"p",6),o._uU(11),o.qZA(),o.TgZ(12,"div",7),o.TgZ(13,"strong",8),o._uU(14),o.qZA(),o.TgZ(15,"input",9),o.NdJ("ngModelChange",function(t){return e.amountInputValue=t})("keydown",function(t){return e.restrictTextInput(t)}),o.qZA(),o.qZA(),o.YNc(16,i$,2,2,"p",10),o.YNc(17,o$,2,2,"p",10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(18,"div",11),o.TgZ(19,"button",12),o.NdJ("click",function(){return e.bsModalRef.hide()}),o._uU(20,"Cancel"),o.qZA(),o.TgZ(21,"button",13),o.NdJ("click",function(){return e.onSave()}),o._uU(22,"Add Funds"),o.qZA(),o.qZA()),2&t&&(o.xp6(2),o.Oqu(e.modelTitle),o.xp6(6),o.Q6J("ngIf",e.currencyCode),o.xp6(3),o.Oqu(e.modelContent),o.xp6(3),o.Oqu(e.currentUserBalanceSign),o.xp6(1),o.MGl("placeholder","",e.minAmount,".00"),o.Q6J("ngModel",e.amountInputValue),o.xp6(1),o.Q6J("ngIf",e.isAmountLow()),o.xp6(1),o.Q6J("ngIf",e.isAmountHigh()),o.xp6(4),o.Q6J("disabled",!e.isButtonEnable()))},directives:[to.O5,Xi.Fj,Xi.c5,Xi.JJ,Xi.On],styles:[".autorecharge-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}"]}),t})(),s$=(()=>{class t{constructor(){this.themeSubject=new qr.X("light"),this.theme$=this.themeSubject.asObservable(),this.THEME_KEY="appyconnect-theme",this.initializeTheme()}initializeTheme(){const t=localStorage.getItem(this.THEME_KEY),e=window.matchMedia("(prefers-color-scheme: dark)").matches;this.setTheme(t||(e?"dark":"light")),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{localStorage.getItem(this.THEME_KEY)||this.setTheme(t.matches?"dark":"light")})}setTheme(t){const e=document.documentElement,n=document.body;n.classList.add("no-transition"),e.classList.remove("dark","light"),n.classList.remove("theme-dark","theme-light"),e.classList.add(t),n.classList.add(`theme-${t}`),requestAnimationFrame(()=>{requestAnimationFrame(()=>{n.classList.remove("no-transition")})}),localStorage.setItem(this.THEME_KEY,t),this.themeSubject.next(t)}getCurrentTheme(){return this.themeSubject.value}toggleTheme(){const t="light"===this.getCurrentTheme()?"dark":"light";this.setTheme(t)}isDarkTheme(){return"dark"===this.getCurrentTheme()}isLightTheme(){return"light"===this.getCurrentTheme()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function a$(t,e){if(1&t&&(o.TgZ(0,"label",15),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.isDarkTheme()?"Dark":"Light")}}function c$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",4),o.YNc(1,a$,2,1,"label",5),o.TgZ(2,"div",6),o.TgZ(3,"input",7),o.NdJ("change",function(){return o.CHM(t),o.oxw().toggleTheme()}),o.qZA(),o.TgZ(4,"label",8),o.TgZ(5,"span",9),o.O4$(),o.TgZ(6,"svg",10),o._UZ(7,"circle",11),o._UZ(8,"path",12),o.qZA(),o.TgZ(9,"svg",13),o._UZ(10,"path",14),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.showLabel),o.xp6(2),o.Q6J("checked",t.isDarkTheme())}}function l$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",18),o._UZ(1,"path",14),o.qZA())}function d$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",18),o._UZ(1,"circle",11),o._UZ(2,"path",12),o.qZA())}
1function u$(t,e){if(1&t&&(o.TgZ(0,"span",15),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.isDarkTheme()?"Light Mode":"Dark Mode"," ")}}function p$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",16),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleTheme()}),o.YNc(1,l$,2,0,"svg",17),o.YNc(2,d$,3,0,"svg",17),o.YNc(3,u$,2,1,"span",5),o.qZA()}if(2&t){const t=o.oxw();o.uIk("aria-label","Switch to "+(t.isDarkTheme()?"light":"dark")+" theme"),o.xp6(1),o.Q6J("ngIf",!t.isDarkTheme()),o.xp6(1),o.Q6J("ngIf",t.isDarkTheme()),o.xp6(1),o.Q6J("ngIf",t.showLabel)}}function h$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",21),o._UZ(1,"path",14),o.qZA())}function g$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",21),o._UZ(1,"circle",11),o._UZ(2,"path",12),o.qZA())}function f$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",19),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleTheme()}),o.YNc(1,h$,2,0,"svg",20),o.YNc(2,g$,3,0,"svg",20),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("title","Switch to "+(t.isDarkTheme()?"light":"dark")+" theme"),o.uIk("aria-label","Switch to "+(t.isDarkTheme()?"light":"dark")+" theme"),o.xp6(1),o.Q6J("ngIf",!t.isDarkTheme()),o.xp6(1),o.Q6J("ngIf",t.isDarkTheme())}}let m$=(()=>{class t{constructor(t){this.themeService=t,this.showLabel=!0,this.size="md",this.variant="switch",this.currentTheme="light",this.destroy$=new fo.xQ}ngOnInit(){this.themeService.theme$.pipe(Qr(this.destroy$)).subscribe(t=>{this.currentTheme=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}toggleTheme(){this.themeService.toggleTheme()}isDarkTheme(){return"dark"===this.currentTheme}getSizeClass(){return`theme-toggle-${this.size}`}getVariantClass(){return`theme-toggle-${this.variant}`}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(s$))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-theme-toggle"]],inputs:{showLabel:"showLabel",size:"size",variant:"variant"},decls:4,vars:5,consts:[[1,"theme-toggle-container"],["class","theme-switch-wrapper",4,"ngIf"],["class","theme-button",3,"click",4,"ngIf"],["class","theme-icon-button",3,"title","click",4,"ngIf"],[1,"theme-switch-wrapper"],["class","theme-label",4,"ngIf"],[1,"theme-switch"],["type","checkbox","id","theme-toggle-switch",1,"theme-switch-input",3,"checked","change"],["for","theme-toggle-switch",1,"theme-switch-label"],[1,"theme-switch-slider"],["width","14","height","14","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"theme-switch-icon","sun-icon"],["cx","12","cy","12","r","5","stroke","currentColor","stroke-width","2"],["d","M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42","stroke","currentColor","stroke-width","2"],["width","14","height","14","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"theme-switch-icon","moon-icon"],["d","M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z","stroke","currentColor","stroke-width","2","fill","currentColor"],[1,"theme-label"],[1,"theme-button",3,"click"],["class","theme-icon","width","16","height","16","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","16","height","16","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"theme-icon"],[1,"theme-icon-button",3,"title","click"],["class","theme-icon","width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"theme-icon"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.YNc(1,c$,11,2,"div",1),o.YNc(2,p$,4,4,"button",2),o.YNc(3,f$,3,4,"button",3),o.qZA()),2&t&&(o.Tol(e.getSizeClass()),o.xp6(1),o.Q6J("ngIf","switch"===e.variant),o.xp6(1),o.Q6J("ngIf","button"===e.variant),o.xp6(1),o.Q6J("ngIf","icon"===e.variant))},directives:[to.O5],styles:['.theme-toggle-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:8px;gap:8px}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]{font-size:.875rem}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{width:40px;height:20px}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{width:16px;height:16px}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]{width:12px;height:12px}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%], .theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{padding:4px 8px;font-size:.75rem}.theme-toggle-container.theme-toggle-sm[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{width:14px;
1height:14px}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]{font-size:1rem}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{width:50px;height:24px}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{width:20px;height:20px}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]{width:14px;height:14px}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%], .theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{padding:6px 12px;font-size:.875rem}.theme-toggle-container.theme-toggle-md[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{width:16px;height:16px}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]{font-size:1.125rem}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{width:60px;height:30px}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{width:26px;height:26px}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]{width:16px;height:16px}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%], .theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{padding:8px 16px;font-size:1rem}.theme-toggle-container.theme-toggle-lg[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{width:20px;height:20px}.theme-switch-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.theme-label[_ngcontent-%COMP%]{font-weight:500;color:#212529;margin:0;font-size:inherit;transition:none}.theme-switch[_ngcontent-%COMP%]{position:relative}.theme-switch-input[_ngcontent-%COMP%]{opacity:0;width:0;height:0;position:absolute}.theme-switch-label[_ngcontent-%COMP%]{position:relative;display:inline-block;cursor:pointer;margin:0}.theme-switch-slider[_ngcontent-%COMP%]{position:relative;display:block;background-color:#d1d5db;border-radius:50px;transition:all .2s ease;border:2px solid #e5e7eb;overflow:hidden}.theme-switch-slider[_ngcontent-%COMP%]:before{content:"";position:absolute;top:2px;left:2px;background-color:#fff;border-radius:50%;transition:all .2s ease;box-shadow:0 2px 4px #0003;z-index:3}.theme-switch-slider[_ngcontent-%COMP%]:after{display:none}.theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:1;color:#6b7280;display:block;line-height:0;font-size:0}.theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]:before, .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]:after{display:none;content:none}.theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon.sun-icon[_ngcontent-%COMP%]{left:6px;opacity:1;color:#f59e0b}.theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon.moon-icon[_ngcontent-%COMP%]{right:6px;opacity:0;color:#e5e7eb}.theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;stroke:currentColor;fill:currentColor}.theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{background-color:#3b82f6;border-color:#2563eb}.theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{transform:translate(calc(100% + 4px));background-color:#fff}.theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .sun-icon[_ngcontent-%COMP%]{opacity:0}.theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .moon-icon[_ngcontent-%COMP%]{opacity:1;color:#fbbf24}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-label[_ngcontent-%COMP%]{color:#f9fafb}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{background-color:#4b5563;border-color:#6b7280}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{background-color:#f9fafb;box-shadow:0 2px 4px #0006}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon.sun-icon[_ngcontent-%COMP%]{color:#fbbf24}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .theme-switch-icon.moon-icon[_ngcontent-%COMP%]{color:#e5e7eb}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]{background-color:#3b82f6;border-color:#1d4ed8}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before{background-color:#f9fafb}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .sun-icon[_ngcontent-%COMP%]{color:#fbbf24}html.dark[_ngcontent-%COMP%]   .theme-toggle-container[_ngcontent-%COMP%]   .theme-switch-input[_ngcontent-%COMP%]:checked + .theme-switch-label[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]   .moon-icon[_ngcontent-%COMP%]{color:#fbbf24}.theme-button[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:6px;gap:6px;background-color:#f8f9fa;color:#6c757d;border:1px solid #dee2e6;border-radius:6px;cursor:pointer;transition:all .2s ease;font-family:inherit}.theme-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{color:currentColor;stroke:currentColor;fill:currentColor;display:block;line-height:0}.theme-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.theme-button[_ngcontent-%COMP%]:hover{background-color:#5371ff;color:#fff;border-color:#5371ff;transform:translateY(-1px);box-shadow:0 .125rem .25rem #00000013}.theme-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.theme-button[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 2px #5371ff,0 0 0 4px #5371ff33}.theme-icon-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:transparent;color:#212529;border:1px solid #dee2e6;border-radius:50%;cursor:pointer;transition:all .2s ease;font-family:inherit}.theme-icon-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{color:currentColor;stroke:currentColor;fill:currentColor;display:block;line-height:0}.theme-icon-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.theme-icon-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa;border-color:#5371ff;transform:scale(1.1);box-shadow:0 .125rem .25rem #00000013}.theme-icon-button[_ngcontent-%COMP%]:active{transform:scale(1)}.theme-icon-button[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 2px #5371ff,0 0 0 4px #5371ff33}html.dark[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%]{background-color:#374151;color:#f9fafb;border-color:#6b7280}html.dark[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{color:#f9fafb;stroke:#f9fafb}html.dark[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%]:hover{background-color:#3b82f6;color:#fff;border-color:#3b82f6}html.dark[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%]:hover   .theme-icon[_ngcontent-%COMP%]{color:#fff;stroke:#fff}html.dark[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{background-color:transparent;color:#f9fafb;border-color:#6b7280}html.dark[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]   .theme-icon[_ngcontent-%COMP%]{color:#f9fafb;stroke:#f9fafb}html.dark[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]:hover{background-color:#374151;border-color:#3b82f6}html.dark[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]:hover   .theme-icon[_ngcontent-%COMP%]{color:#3b82f6;stroke:#3b82f6}.theme-toggle-container[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]:before, .theme-toggle-container[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]:after{content:none}.theme-switch-icon[_ngcontent-%COMP%]{font-size:0;text-indent:-9999px;overflow:hidden}.theme-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .theme-switch-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:block;visibility:visible}@media (prefers-reduced-motion: reduce){.theme-switch-slider[_ngcontent-%COMP%], .theme-switch-slider[_ngcontent-%COMP%]:before, .theme-switch-icon[_ngcontent-%COMP%], .theme-button[_ngcontent-%COMP%], .theme-icon-button[_ngcontent-%COMP%]{transition:none}}.no-transition[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%], .no-transition[_ngcontent-%COMP%]   .theme-switch-slider[_ngcontent-%COMP%]:before, .no-transition[_ngcontent-%COMP%]   .theme-switch-icon[_ngcontent-%COMP%], .no-transition[_ngcontent-%COMP%]   .theme-button[_ngcontent-%COMP%], .no-transition[_ngcontent-%COMP%]   .theme-icon-button[_ngcontent-%COMP%]{transition:none!important}@media (prefers-contrast: high){.theme-switch-slider[_ngcontent-%COMP%]{border:2px solid var(--primary-text)}.theme-button[_ngcontent-%COMP%], .theme-icon-button[_ngcontent-%COMP%]{border-width:2px}}@media (max-width: 1199px){.theme-icon-button[_ngcontent-%COMP%]{width:30px;height:30px;padding:2px!important}}']}),t})();
1function v$(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.labelOf(t.statusOptions,t.status))}}function b$(t,e){1&t&&(o.ynx(0),o._uU(1," \xb7 "),o.BQk())}function x$(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.labelOf(t.activityOptions,t.activity))}}function _$(t,e){1&t&&(o.ynx(0),o._uU(1," \xb7 "),o.BQk())}function C$(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Oqu(t.labelOf(t.typeOptions,t.type))}}function w$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",18),o.TgZ(1,"button",19),o.NdJ("click",function(e){return o.CHM(t),o.oxw().clearFilters(e)}),o.YNc(2,v$,2,1,"ng-container",20),o.YNc(3,b$,2,0,"ng-container",20),o.YNc(4,x$,2,1,"ng-container",20),o.YNc(5,_$,2,0,"ng-container",20),o.YNc(6,C$,2,1,"ng-container",20),o.O4$(),o.TgZ(7,"svg",21),o._UZ(8,"path",22),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(2),o.Q6J("ngIf","all"!==t.status),o.xp6(1),o.Q6J("ngIf","all"!==t.status&&"all"!==t.activity),o.xp6(1),o.Q6J("ngIf","all"!==t.activity),o.xp6(1),o.Q6J("ngIf",("all"!==t.status||"all"!==t.activity)&&"all"!==t.type),o.xp6(1),o.Q6J("ngIf","all"!==t.type)}}function y$(t,e){if(1&t&&o._UZ(0,"img",33),2&t){const t=o.oxw().$implicit;o.Q6J("src",t.triggerImage,o.LSH)}}function A$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",34),o._UZ(1,"path",35),o._UZ(2,"rect",36),o._UZ(3,"path",37),o._UZ(4,"path",38),o._UZ(5,"path",39),o._UZ(6,"path",40),o.qZA())}function Z$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",23),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw().open(e)})("mouseenter",function(e){const n=o.CHM(t).$implicit;return o.oxw().hoverIn(e,n)})("mouseleave",function(){return o.CHM(t),o.oxw().hoverOut()}),o._UZ(1,"span",24),o.YNc(2,y$,1,1,"img",25),o.YNc(3,A$,7,0,"svg",26),o.TgZ(4,"span",27),o._uU(5),o.qZA(),o.TgZ(6,"button",28),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw().openMenu(e,n)}),o.O4$(),o.TgZ(7,"svg",29),o._UZ(8,"circle",30),o._UZ(9,"circle",31),o._UZ(10,"circle",32),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw();o.ekj("hl",(null==n.menuFor?null:n.menuFor.connectId)===t.connectId),o.xp6(1),o.Q6J("ngClass",n.dotClass(t)),o.xp6(1),o.Q6J("ngIf",t.triggerImage),o.xp6(1),o.Q6J("ngIf","ab"===t.source),o.xp6(2),o.Oqu(t.connectTitle)}}function k$(t,e){1&t&&(o.TgZ(0,"div",41),o._uU(1,"No agents match."),o.qZA())}function T$(t,e){1&t&&(o.TgZ(0,"div",41),o._uU(1,"Loading\u2026"),o.qZA())}function O$(t,e){1&t&&o.GkF(0)}function M$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",55),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setStatus(e.id)}),o.YNc(1,O$,1,0,"ng-container",56),o._uU(2),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3),i=o.MAs(20);o.ekj("sel",n.status===t.id),o.xp6(1),o.Q6J("ngTemplateOutlet",i),o.xp6(1),o.hij("",t.label," ")}}function I$(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",53),o.YNc(1,M$,3,4,"button",54),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.statusOptions)}}function S$(t,e){1&t&&o.GkF(0)}function P$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",55),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setActivity(e.id)}),o.YNc(1,S$,1,0,"ng-container",56),o._uU(2),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3),i=o.MAs(20);o.ekj("sel",n.activity===t.id),o.xp6(1),o.Q6J("ngTemplateOutlet",i),o.xp6(1),o.hij("",t.label," ")}}function N$(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",53),o.YNc(1,P$,3,4,"button",54),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.activityOptions)}}function q$(t,e){1&t&&o.GkF(0)}function U$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",55),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setType(e.id)}),o.YNc(1,q$,1,0,"ng-container",56),o._uU(2),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3),i=o.MAs(20);o.ekj("sel",n.type===t.id),o.xp6(1),o.Q6J("ngTemplateOutlet",i),o.xp6(1),o.hij("",t.label," ")}}function E$(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",53),o.YNc(1,U$,3,4,"button",54),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.typeOptions)}}function F$(t,e){1&t&&o.GkF(0)}function D$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",55),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).setSort(e.id)}),o.YNc(1,F$,1,0,"ng-container",56),o._uU(2),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3),i=o.MAs(20);o.ekj("sel",n.sort===t.id),o.xp6(1),o.Q6J("ngTemplateOutlet",i),o.xp6(1),o.hij("",t.label," ")}}
1function L$(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",53),o.YNc(1,D$,3,4,"button",54),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.sortOptions)}}function J$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",42),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"button",43),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleFilterRow("status")}),o._uU(2," Status"),o.TgZ(3,"span",44),o._uU(4),o.qZA(),o.O4$(),o.TgZ(5,"svg",45),o._UZ(6,"path",46),o.qZA(),o.qZA(),o.YNc(7,I$,2,1,"div",47),o.kcU(),o.TgZ(8,"button",43),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleFilterRow("activity")}),o._uU(9," Activity"),o.TgZ(10,"span",44),o._uU(11),o.qZA(),o.O4$(),o.TgZ(12,"svg",45),o._UZ(13,"path",46),o.qZA(),o.qZA(),o.YNc(14,N$,2,1,"div",47),o.kcU(),o.TgZ(15,"button",43),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleFilterRow("type")}),o._uU(16," Type"),o.TgZ(17,"span",44),o._uU(18),o.qZA(),o.O4$(),o.TgZ(19,"svg",45),o._UZ(20,"path",46),o.qZA(),o.qZA(),o.YNc(21,E$,2,1,"div",47),o.kcU(),o._UZ(22,"div",48),o.TgZ(23,"button",43),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleFilterRow("sort")}),o._uU(24," Sort by"),o.TgZ(25,"span",44),o._uU(26),o.qZA(),o.O4$(),o.TgZ(27,"svg",45),o._UZ(28,"path",46),o.qZA(),o.qZA(),o.YNc(29,L$,2,1,"div",47),o.kcU(),o._UZ(30,"div",48),o.TgZ(31,"div",49),o.TgZ(32,"span"),o._UZ(33,"span",50),o._uU(34,"Active"),o.qZA(),o.TgZ(35,"span"),o._UZ(36,"span",51),o._uU(37,"Inactive"),o.qZA(),o.TgZ(38,"span"),o._UZ(39,"span",52),o._uU(40,"Draft"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.Udp("top",t.filterTop,"px")("left",t.filterLeft,"px"),o.xp6(1),o.ekj("open","status"===t.filterRow),o.xp6(3),o.Oqu(t.labelOf(t.statusOptions,t.status)),o.xp6(3),o.Q6J("ngIf","status"===t.filterRow),o.xp6(1),o.ekj("open","activity"===t.filterRow),o.xp6(3),o.Oqu(t.labelOf(t.activityOptions,t.activity)),o.xp6(3),o.Q6J("ngIf","activity"===t.filterRow),o.xp6(1),o.ekj("open","type"===t.filterRow),o.xp6(3),o.Oqu(t.labelOf(t.typeOptions,t.type)),o.xp6(3),o.Q6J("ngIf","type"===t.filterRow),o.xp6(2),o.ekj("open","sort"===t.filterRow),o.xp6(3),o.Oqu(t.labelOf(t.sortOptions,t.sort)),o.xp6(3),o.Q6J("ngIf","sort"===t.filterRow)}}function j$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",59),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.open(e.menuFor)}),o._uU(1,"Open in Agent Builder"),o.qZA()}}function R$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).menuAction()}),o._uU(1,"Set Task Frequency"),o.qZA()}}function $$(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).menuAction()}),o._uU(1,"Sync Past 24hrs Data"),o.qZA()}}function B$(t,e){if(1&t&&(o.TgZ(0,"div",63),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("In Folder: ",t.menuFor.folderName,"")}}function H$(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).menuAction()}),o._uU(2,"Duplicate"),o.qZA(),o.YNc(3,R$,2,0,"button",58),o.TgZ(4,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).menuAction()}),o._uU(5,"See Task History"),o.qZA(),o.YNc(6,$$,2,0,"button",58),o.YNc(7,B$,2,1,"div",60),o.TgZ(8,"button",59),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).menuAction()}),o._uU(9,"Move to folder"),o.qZA(),o._UZ(10,"div",61),o.TgZ(11,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).menuAction()}),o._uU(12,"Delete Connect"),o.qZA(),o.BQk()}if(2&t){const t=o.oxw(2);o.xp6(3),o.Q6J("ngIf",!t.menuFor.isDraft),o.xp6(3),o.Q6J("ngIf",!t.menuFor.isDraft),o.xp6(1),o.Q6J("ngIf",t.menuFor.folderName)}}function Q$(t,e){if(1&t&&(o.TgZ(0,"div",57),o.NdJ("click",function(t){return t.stopPropagation()}),o.YNc(1,j$,2,0,"button",58),o.YNc(2,H$,13,3,"ng-container",20),o.qZA()),2&t){const t=o.oxw();o.Udp("top",t.menuTop,"px")("left",t.popLeft,"px"),o.xp6(1),o.Q6J("ngIf","ab"===t.menuFor.source),o.xp6(1),o.Q6J("ngIf","ab"!==t.menuFor.source)}}function Y$(t,e){if(1&t&&(o.TgZ(0,"div",68),o.O4$(),o.TgZ(1,"svg",69),o._UZ(2,"path",35),o._UZ(3,"rect",36),o._UZ(4,"path",37),o._UZ(5,"path",38),o._UZ(6,"path",39),o._UZ(7,"path",40),o.qZA(),o.kcU(),o.TgZ(8,"span"),o._uU(9),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(9),o.hij("Agent Builder \xb7 ",t.kindLabel(t.hoverFor),"")}}function z$(t,e){if(1&t&&o._UZ(0,"img",74),2&t){const t=o.oxw(3);o.Q6J("src",t.hoverFor.triggerImage,o.LSH)}}function V$(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",75),o._UZ(1,"path",46),o.qZA())}function G$(t,e){if(1&t&&o._UZ(0,"img",74),2&t){const t=o.oxw(3);o.Q6J("src",t.hoverFor.actionImage,o.LSH)}}
1function W$(t,e){if(1&t&&(o.TgZ(0,"span",76),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("+",t.hoverFor.totalApp-2,"")}}function K$(t,e){if(1&t&&(o.TgZ(0,"div",70),o.YNc(1,z$,1,1,"img",71),o.YNc(2,V$,2,0,"svg",72),o.YNc(3,G$,1,1,"img",71),o.YNc(4,W$,2,1,"span",73),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.hoverFor.triggerImage),o.xp6(1),o.Q6J("ngIf",t.hoverFor.actionImage),o.xp6(1),o.Q6J("ngIf",t.hoverFor.actionImage),o.xp6(1),o.Q6J("ngIf",t.hoverFor.totalApp>2)}}function X$(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"dt"),o._uU(2,"Folder"),o.qZA(),o.TgZ(3,"dd"),o._uU(4),o.qZA(),o.BQk()),2&t){const t=o.oxw(2);o.xp6(4),o.Oqu(t.hoverFor.folderName)}}function tB(t,e){if(1&t&&(o.TgZ(0,"div",64),o.TgZ(1,"div",65),o._uU(2),o.qZA(),o.YNc(3,Y$,10,1,"div",66),o.YNc(4,K$,5,4,"div",67),o.TgZ(5,"dl"),o.TgZ(6,"dt"),o._uU(7,"ID"),o.qZA(),o.TgZ(8,"dd"),o.TgZ(9,"code"),o._uU(10),o.qZA(),o.qZA(),o.TgZ(11,"dt"),o._uU(12,"Status"),o.qZA(),o.TgZ(13,"dd"),o._UZ(14,"span",24),o._uU(15),o.qZA(),o.YNc(16,X$,5,1,"ng-container",20),o.TgZ(17,"dt"),o._uU(18,"Created on"),o.qZA(),o.TgZ(19,"dd"),o._uU(20),o.ALo(21,"date"),o.qZA(),o.TgZ(22,"dt"),o._uU(23),o.qZA(),o.TgZ(24,"dd"),o._uU(25),o.ALo(26,"date"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.Udp("top",t.hoverTop,"px")("left",t.popLeft,"px"),o.xp6(2),o.Oqu(t.hoverFor.connectTitle),o.xp6(1),o.Q6J("ngIf","ab"===t.hoverFor.source),o.xp6(1),o.Q6J("ngIf","ab"!==t.hoverFor.source),o.xp6(6),o.Oqu(t.hoverFor.connectId),o.xp6(4),o.Q6J("ngClass",t.dotClass(t.hoverFor)),o.xp6(1),o.Oqu(t.statusLabel(t.hoverFor)),o.xp6(1),o.Q6J("ngIf",t.hoverFor.folderName),o.xp6(4),o.Oqu(o.xi3(21,14,t.hoverFor.createdAt,"MM-dd-yyyy")),o.xp6(3),o.Oqu("ab"===t.hoverFor.source?"Last activity":"Last edit"),o.xp6(2),o.Oqu(o.xi3(26,17,t.hoverFor.updatedAt,"MM-dd-yyyy"))}}function eB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",77),o._UZ(1,"path",78),o.qZA())}const nB="ns.agents.filters";let iB=(()=>{class t{constructor(t,e,n){this.customerConnectService=t,this.router=e,this.shellEvents=n,this.pageStep=20,this.statusOptions=[{id:"all",label:"All"},{id:"published",label:"Published"},{id:"draft",label:"Draft"}],this.activityOptions=[{id:"all",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"draft",label:"Draft"}],this.typeOptions=[{id:"all",label:"All"},{id:"agents",label:"Agents"},{id:"loops",label:"Loops"}],this.sortOptions=[{id:"edited",label:"Last edit"},{id:"created",label:"Created on"},{id:"name",label:"Name"}],this.items=[],this.loading=!1,this.query="",this.status="all",this.activity="all",this.type="all",this.sort="edited",this.pageSize=this.pageStep,this.hasMore=!1,this.scrolling=!1,this.filterOpen=!1,this.filterRow=null,this.filterTop=0,this.filterLeft=0,this.menuFor=null,this.menuTop=0,this.popLeft=0,this.hoverFor=null,this.hoverTop=0,this.raw=[],this.requestSeq=0,this.lastNavKey="",this.search$=new fo.xQ,this.subs=new pi.w}ngOnInit(){this.restoreFilters(),this.load(),this.subs.add(this.search$.pipe(ad(400),Wr()).subscribe(()=>this.reload())),this.subs.add(this.router.events.pipe((0,hi.h)(t=>t instanceof ui.m2)).subscribe(t=>{this.closePopovers();const e=t.urlAfterRedirects.split("?")[0].split("/"),n="customeditor"===e[1]?"customeditor/"+(e[4]||""):t.urlAfterRedirects;n!==this.lastNavKey&&(this.lastNavKey=n,this.load())}))}ngOnDestroy(){this.subs.unsubscribe(),clearTimeout(this.hoverTimer),clearTimeout(this.scrollTimer)}get isFiltered(){return"all"!==this.status||"all"!==this.activity||"all"!==this.type}labelOf(t,e){const n=t.find(t=>t.id===e);return n?n.label:""}onQueryChange(t){this.search$.next(t)}reload(){this.pageSize=this.pageStep,this.load()}load(){const t=++this.requestSeq;this.loading=!0;const e={pageSize:this.pageSize,sortBy:this.sort};this.query.trim()&&(e.searchTXT=this.query.trim());const n="agents"!==this.type,i="loops"!==this.type,o=n&&"published"!==this.status&&("all"===this.activity||"draft"===this.activity);(0,qo.D)([n&&"draft"!==this.status&&"draft"!==this.activity?this.fetch(Object.assign(Object.assign({},e),{connectStatus:"Completed"})):(0,Tr.of)(null),o?this.fetch(Object.assign(Object.assign({},e),{connectStatus:"Draft"})):(0,Tr.of)(null),i?this.customerConnectService.getAgentBuilderAgents().pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null)]).subscribe(([e,n,i])=>{if(t!==this.requestSeq)return;const o=e&&e.userConnects||[],r=n&&n.userConnects||[];this.raw=[...o,...r];
1const s=this.format(o),a=this.format(r),c=this.formatAgentBuilder(i&&i.agents||[]);this.hasMore=s.length>=this.pageSize||a.length>=this.pageSize,this.items=this.applyActivity([...s,...a,...c]).sort((t,e)=>this.compare(t,e)),this.loading=!1})}onListScroll(t){this.scrolling=!0,clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.scrolling=!1},900);const e=t.target;this.loading||!this.hasMore||e.scrollTop+e.clientHeight>=e.scrollHeight-40&&(this.pageSize+=this.pageStep,this.load())}fetch(t){return this.customerConnectService.getUserConnectList(t).pipe((0,$l.K)(()=>(0,Tr.of)(null)))}format(t){const e={},n=[];for(const i of t){const o=i.connectId;if(!e[o]){const t="string"==typeof i.connectTitle&&i.connectTitle.trim().length>0?i.connectTitle:o;e[o]={connectId:o,connectTitle:t,status:i.status,isDraft:"Draft"===i.connectStatus,createdAt:i.oldest_created_at,updatedAt:i.recent_updated_at,folderName:i.folderName||null,triggerImage:null,actionImage:null,totalApp:0,source:"loop"},n.push(o)}if(e[o].totalApp++,0==i.index){e[o].triggerImage=this.imageUrl(i.triggerImage);const n=i.childIndex&&i.childIndex.length>0?i.childIndex[0]:null,r=t.find(t=>t.connectId===o&&t.index==n);r&&(e[o].actionImage=this.imageUrl(r.triggerImage))}}return n.map(t=>e[t])}formatAgentBuilder(t){const e=this.query.trim().toLowerCase();return t.filter(t=>t&&t.id&&(!e||-1!==String(t.name||"").toLowerCase().indexOf(e))).map(t=>({connectId:t.id,connectTitle:t.name||"Untitled agent",status:"published"!==t.status||"workflow"===t.kind&&!t.active?0:1,isDraft:"draft"===t.status,createdAt:t.createdAt||null,updatedAt:t.lastActivity||null,folderName:null,triggerImage:null,actionImage:null,totalApp:0,source:"ab",kind:t.kind,url:t.url,pinned:!!t.pinned}))}imageUrl(t){return go.N.cdnMediaPath+(t||"connect.png")}applyActivity(t){return t.filter(t=>!("agents"===this.type&&"ab"!==t.source||"loops"===this.type&&"ab"===t.source||"published"===this.status&&t.isDraft||"draft"===this.status&&!t.isDraft)&&("active"===this.activity?!t.isDraft&&1===t.status:"inactive"===this.activity?!t.isDraft&&1!==t.status:"draft"!==this.activity||t.isDraft))}compare(t,e){if(!!t.pinned!=!!e.pinned)return t.pinned?-1:1;if("name"===this.sort)return t.connectTitle.localeCompare(e.connectTitle,void 0,{sensitivity:"base"});const n="created"===this.sort?"createdAt":"updatedAt";return new Date(e[n]||0).getTime()-new Date(t[n]||0).getTime()}dotClass(t){return t.isDraft?"st-draft":1===t.status?"st-on":"st-off"}statusLabel(t){return"ab"===t.source?t.isDraft?"Draft":1===t.status?"Live":"Offline":t.isDraft?"Draft":(1===t.status?"Active":"Inactive")+" \xb7 Published"}kindLabel(t){return"workflow"===t.kind?"Workflow":"Bot"}trackById(t,e){return e.connectId}open(t){if(this.closePopovers(),"ab"===t.source)return void(t.url&&window.open(t.url,"_blank","noopener"));const e=this.raw.filter(e=>e.connectId===t.connectId).sort((t,e)=>t.index-e.index);if(!e.length)return;const n=e[e.length-1];let i=1===n.status||e[0].sample_data&&0==e[0].sample_data.length?e[0]._id:n._id,o=1===n.status?"preview":"overview";e.every(t=>t.sample_data&&t.sample_data.length>0&&"Completed"==t.connectStatus)&&(o="preview",i=e[0]._id);const r=`/customeditor/${i}/${o}/${t.connectId}`;this.shellEvents.editorLeave?this.shellEvents.editorLeave(r):this.router.navigateByUrl(r)}toggleFilter(t){t.stopPropagation();const e=!this.filterOpen;if(this.closePopovers(),!e)return;const n=t.currentTarget.getBoundingClientRect();this.filterTop=n.bottom+6,this.filterLeft=Math.max(8,n.right-236),this.filterOpen=!0}toggleFilterRow(t){this.filterRow=this.filterRow===t?null:t}setStatus(t){this.status=t,this.filterRow=null,this.saveFilters(),this.reload()}setActivity(t){this.activity=t,this.filterRow=null,this.saveFilters(),this.reload()}setType(t){this.type=t,this.filterRow=null,this.saveFilters(),this.reload()}setSort(t){this.sort=t,this.filterRow=null,this.saveFilters(),this.reload()}clearFilters(t){t.stopPropagation(),this.status="all",this.activity="all",this.type="all",this.saveFilters(),this.reload()}openMenu(t,e){t.stopPropagation();const n=this.menuFor&&this.menuFor.connectId===e.connectId;if(this.closePopovers(),n)return;
1const i=t.currentTarget.closest(".ns-row");this.positionNextToSidebar(i),this.menuTop=Math.min(i.getBoundingClientRect().top-4,window.innerHeight-300),this.menuFor=e}menuAction(){this.menuFor=null}hoverIn(t,e){if(this.menuFor||this.filterOpen)return;const n=t.currentTarget;clearTimeout(this.hoverTimer),this.hoverTimer=setTimeout(()=>{this.positionNextToSidebar(n),this.hoverTop=Math.max(8,Math.min(n.getBoundingClientRect().top-6,window.innerHeight-250)),this.hoverFor=e},350)}hoverOut(){clearTimeout(this.hoverTimer),this.hoverFor=null}positionNextToSidebar(t){const e=t.closest(".ns-sidebar");this.popLeft=(e?e.getBoundingClientRect().right:t.getBoundingClientRect().right)+8}closePopovers(){this.filterOpen=!1,this.filterRow=null,this.menuFor=null,this.hoverOut()}onDocumentClick(){(this.filterOpen||this.menuFor)&&this.closePopovers()}onEscape(){this.closePopovers()}restoreFilters(){try{const t=JSON.parse(localStorage.getItem(nB)||"{}");this.statusOptions.some(e=>e.id===t.status)&&(this.status=t.status),this.activityOptions.some(e=>e.id===t.activity)&&(this.activity=t.activity),this.typeOptions.some(e=>e.id===t.type)&&(this.type=t.type),this.sortOptions.some(e=>e.id===t.sort)&&(this.sort=t.sort)}catch(t){}}saveFilters(){try{localStorage.setItem(nB,JSON.stringify({status:this.status,activity:this.activity,type:this.t
1ype,sort:this.sort}))}catch(t){}}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Fo),o.Y36(ui.F0),o.Y36(JA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-sidebar-agents"]],hostBindings:function(t,e){1&t&&o.NdJ("click",function(){return e.onDocumentClick()},!1,o.evT)("keydown.escape",function(){return e.onEscape()},!1,o.evT)},decls:21,vars:15,consts:[[1,"sa-rail"],[1,"sa-titlerow"],[1,"sa-title"],["type","button","title","Filter & sort","aria-label","Filter and sort agents",1,"sa-fbtn",3,"click"],["width","15","height","15","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round"],["d","M2 4.5h3.2M8.4 4.5H14M2 11.5h2.7M7.9 11.5H14"],["cx","6.8","cy","4.5","r","1.6"],["cx","6.3","cy","11.5","r","1.6"],[1,"sa-search"],["type","text","placeholder","Filter agents\u2026","aria-label","Filter agents",3,"ngModel","ngModelChange"],["class","sa-chips",4,"ngIf"],[1,"sa-list",3,"scroll"],["class","ns-row",3,"hl","click","mouseenter","mouseleave",4,"ngFor","ngForOf","ngForTrackBy"],["class","sa-empty",4,"ngIf"],["class","sa-pop sa-fpop",3,"top","left","click",4,"ngIf"],["class","sa-pop sa-rmenu",3,"top","left","click",4,"ngIf"],["class","sa-hc",3,"top","left",4,"ngIf"],["tick",""],[1,"sa-chips"],["type","button","title","Clear filters",1,"sa-chip",3,"click"],[4,"ngIf"],["width","11","height","11","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.7","stroke-linecap","round"],["d","M4.5 4.5l7 7M11.5 4.5l-7 7"],[1,"ns-row",3,"click","mouseenter","mouseleave"],[1,"sa-dot",3,"ngClass"],["class","sa-kind","alt","",3,"src",4,"ngIf"],["class","sa-kind sa-kind-ab","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",4,"ngIf"],[1,"sa-nm"],["type","button","title","More","aria-label","More options",1,"sa-more",3,"click"],["width","14","height","14","viewBox","0 0 16 16","fill","currentColor"],["cx","8","cy","3.2","r","1.3"],["cx","8","cy","8","r","1.3"],["cx","8","cy","12.8","r","1.3"],["alt","",1,"sa-kind",3,"src"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"sa-kind","sa-kind-ab"],["d","M12 8V4H8"],["width","16","height","12","x","4","y","8","rx","2"],["d","M2 14h2"],["d","M20 14h2"],["d","M15 13v2"],["d","M9 13v2"],[1,"sa-empty"],[1,"sa-pop","sa-fpop",3,"click"],["type","button",1,"sa-frow",3,"click"],[1,"sa-fv"],["width","12","height","12","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round",1,"sa-fc"],["d","M6 3.5 10.5 8 6 12.5"],["class","sa-fopts",4,"ngIf"],[1,"sa-fdiv"],[1,"sa-legend"],[1,"sa-dot","st-on"],[1,"sa-dot","st-off"],[1,"sa-dot","st-draft"],[1,"sa-fopts"],["type","button","class","sa-fopt",3,"sel","click",4,"ngFor","ngForOf"],["type","button",1,"sa-fopt",3,"click"],[4,"ngTemplateOutlet"],[1,"sa-pop","sa-rmenu",3,"click"],["type","button","class","sa-ritem",3,"click",4,"ngIf"],["type","button",1,"sa-ritem",3,"click"],["class","sa-ritem sa-label",4,"ngIf"],[1,"sa-rdiv"],["type","button",1,"sa-ritem","sa-danger",3,"click"],[1,"sa-ritem","sa-label"],[1,"sa-hc"],[1,"sa-hc-t"],["class","sa-hc-apps sa-hc-ab",4,"ngIf"],["class","sa-hc-apps",4,"ngIf"],[1,"sa-hc-apps","sa-hc-ab"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"sa-hc-robot"],[1,"sa-hc-apps"],["class","sa-hc-logo","alt","",3,"src",4,"ngIf"],["class","sa-hc-arr","width","11","height","11","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["class","sa-hc-n",4,"ngIf"],["alt","",1,"sa-hc-logo",3,"src"],["width","11","height","11","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round",1,"sa-hc-arr"],[1,"sa-hc-n"],["width","12","height","12","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round",1,"sa-tk"],["d","M3.5 8.5 6.5 11.5 12.5 4.5"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"span",2),o._uU(3,"My Agents"),o.qZA(),o.TgZ(4,"button",3),o.NdJ("click",function(t){return e.toggleFilter(t)}),o.O4$(),o.TgZ(5,"svg",4),o._UZ(6,"path",5),o._UZ(7,"circle",6),o._UZ(8,"circle",7),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",8),o.TgZ(10,"input",9),o.NdJ("ngModelChange",function(t){return e.query=t})("ngModelChange",function(t){return e.onQueryChange(t)}
1),o.qZA(),o.qZA(),o.YNc(11,w$,9,5,"div",10),o.TgZ(12,"div",11),o.NdJ("scroll",function(t){return e.onListScroll(t)}),o.YNc(13,Z$,11,6,"div",12),o.YNc(14,k$,2,0,"div",13),o.YNc(15,T$,2,0,"div",13),o.qZA(),o.qZA(),o.YNc(16,J$,41,20,"div",14),o.YNc(17,Q$,3,6,"div",15),o.YNc(18,tB,27,20,"div",16),o.YNc(19,eB,2,0,"ng-template",null,17,o.W1O)),2&t&&(o.xp6(4),o.ekj("on",e.filterOpen)("filtered",e.isFiltered),o.xp6(6),o.Q6J("ngModel",e.query),o.xp6(1),o.Q6J("ngIf",e.isFiltered),o.xp6(1),o.ekj("scrolling",e.scrolling),o.xp6(1),o.Q6J("ngForOf",e.items)("ngForTrackBy",e.trackById),o.xp6(1),o.Q6J("ngIf",!e.loading&&!e.items.length),o.xp6(1),o.Q6J("ngIf",e.loading&&!e.items.length),o.xp6(1),o.Q6J("ngIf",e.filterOpen),o.xp6(1),o.Q6J("ngIf",e.menuFor),o.xp6(1),o.Q6J("ngIf",e.hoverFor&&!e.menuFor))},directives:[Xi.Fj,Xi.JJ,Xi.On,to.O5,to.sg,to.mk,to.tP],pipes:[to.uU],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.sa-rail[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column}.sa-titlerow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-right:12px;margin-top:8px}.sa-title[_ngcontent-%COMP%]{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--ns-faint);padding:2px 12px 4px}.sa-fbtn[_ngcontent-%COMP%]{position:relative;width:24px;height:24px;border:0;border-radius:6px;background:none;color:var(--ns-faint);display:grid;place-items:center;cursor:pointer}.sa-fbtn[_ngcontent-%COMP%]:hover, .sa-fbtn.on[_ngcontent-%COMP%]{background:var(--ns-panel-2);color:var(--ns-ink)}.sa-fbtn.filtered[_ngcontent-%COMP%]{color:var(--ns-accent)}.sa-fbtn.filtered[_ngcontent-%COMP%]:after{content:"";position:absolute;top:2px;right:2px;width:6px;height:6px;border-radius:50%;background:var(--ns-accent);box-shadow:0 0 0 2px var(--ns-panel)}.sa-search[_ngcontent-%COMP%]{padding:0 12px 8px}.sa-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%;font:inherit;font-size:13px;color:var(--ns-ink);background:var(--ns-paper);border:1px solid var(--ns-line);border-radius:9px;padding:6px 10px;outline:none}.sa-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{border-color:var(--ns-accent)}.sa-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::-moz-placeholder{color:var(--ns-faint)}.sa-search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:var(--ns-faint)}.sa-chips[_ngcontent-%COMP%]{padding:0 12px 4px}.sa-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px;height:22px;padding:0 7px 0 9px;border:0;border-radius:99px;background:var(--ns-accent-soft);color:var(--ns-accent-ink);font:inherit;font-size:11.5px;font-weight:600;cursor:pointer}.sa-list[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;padding:8px;display:flex;flex-direction:column;grid-gap:2px;gap:2px;scrollbar-width:thin;scrollbar-color:transparent transparent}.sa-list.scrolling[_ngcontent-%COMP%]{scrollbar-color:var(--ns-line-strong) transparent}.sa-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.sa-list[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.sa-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:transparent;border-radius:3px}.sa-list.scrolling[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--ns-line-strong)}.ns-row[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;min-height:32px;padding:5px 10px 5px 24px;border:1px solid transparent;border-radius:10px;cursor:pointer}.ns-row[_ngcontent-%COMP%]:hover, .ns-row.hl[_ngcontent-%COMP%]{background:var(--ns-panel-2);padding-right:36px}.sa-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.ns-row[_ngcontent-%COMP%] > .sa-dot[_ngcontent-%COMP%]{position:absolute;left:9px;top:50%;margin-top:-4px}.st-on[_ngcontent-%COMP%]{background:var(--ns-ok)}.st-off[_ngcontent-%COMP%]{background:var(--ns-idle)}.st-draft[_ngcontent-%COMP%]{background:var(--ns-amber)}.sa-kind[_ngcontent-%COMP%]{width:14px;height:14px;margin-right:7px;flex:none;border-radius:3px;-o-object-fit:contain;object-fit:contain}
1.sa-kind-ab[_ngcontent-%COMP%]{padding:1px;color:var(--ns-accent-ink);background:var(--ns-accent-soft)}.sa-nm[_ngcontent-%COMP%]{min-width:0;font-size:13.5px;font-weight:600;color:var(--ns-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sa-more[_ngcontent-%COMP%]{display:none;position:absolute;right:8px;top:50%;margin-top:-11px;width:22px;height:22px;border:0;border-radius:6px;background:var(--ns-panel);color:var(--ns-muted);place-items:center;cursor:pointer}.ns-row[_ngcontent-%COMP%]:hover   .sa-more[_ngcontent-%COMP%], .ns-row.hl[_ngcontent-%COMP%]   .sa-more[_ngcontent-%COMP%]{display:grid}.sa-more[_ngcontent-%COMP%]:hover{color:var(--ns-ink)}.sa-empty[_ngcontent-%COMP%]{padding:12px;font-size:12.5px;color:var(--ns-faint)}.sa-pop[_ngcontent-%COMP%]{position:fixed;z-index:990;background:var(--ns-panel);color:var(--ns-ink);border:1px solid var(--ns-line-strong);border-radius:10px;box-shadow:var(--ns-shadow);padding:6px}.sa-fpop[_ngcontent-%COMP%]{width:236px}.sa-frow[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;grid-gap:6px;gap:6px;padding:7px 8px;border:0;border-radius:6px;background:none;color:var(--ns-ink);font:inherit;font-size:13px;text-align:left;cursor:pointer}.sa-frow[_ngcontent-%COMP%]:hover{background:var(--ns-accent-tint)}.sa-fv[_ngcontent-%COMP%]{margin-left:auto;font-size:12px;color:var(--ns-muted)}.sa-fc[_ngcontent-%COMP%]{color:var(--ns-faint);transition:transform .15s}.sa-frow.open[_ngcontent-%COMP%]   .sa-fc[_ngcontent-%COMP%]{transform:rotate(90deg)}.sa-fopts[_ngcontent-%COMP%]{padding:0 0 4px 10px}.sa-fopt[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;grid-gap:6px;gap:6px;padding:6px 8px;border:0;border-radius:6px;background:none;color:var(--ns-muted);font:inherit;font-size:12.5px;text-align:left;cursor:pointer}.sa-fopt[_ngcontent-%COMP%]:hover{background:var(--ns-accent-tint)}.sa-tk[_ngcontent-%COMP%]{color:var(--ns-accent);visibility:hidden;flex:none}.sa-fopt.sel[_ngcontent-%COMP%]{color:var(--ns-ink);font-weight:600}.sa-fopt.sel[_ngcontent-%COMP%]   .sa-tk[_ngcontent-%COMP%]{visibility:visible}.sa-fdiv[_ngcontent-%COMP%]{height:1px;background:var(--ns-line);margin:5px 4px}.sa-legend[_ngcontent-%COMP%]{display:flex;grid-gap:12px;gap:12px;padding:6px 8px 3px;font-size:11.5px;color:var(--ns-faint)}.sa-legend[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:5px;gap:5px}.sa-rmenu[_ngcontent-%COMP%]{min-width:214px;padding:4px;border-color:var(--ns-line);border-radius:8px;box-shadow:0 6px 20px #0000001f}.sa-ritem[_ngcontent-%COMP%]{width:100%;display:block;padding:6px 10px;border:0;border-radius:6px;background:none;color:var(--ns-ink);font:inherit;font-size:13px;text-align:left;white-space:nowrap;cursor:pointer}.sa-ritem[_ngcontent-%COMP%]:hover{background:var(--ns-accent-tint)}.sa-ritem.sa-label[_ngcontent-%COMP%]{font-size:12px;color:var(--ns-faint);cursor:default}.sa-ritem.sa-label[_ngcontent-%COMP%]:hover{background:none}.sa-ritem.sa-danger[_ngcontent-%COMP%]{color:var(--ns-danger)}.sa-rdiv[_ngcontent-%COMP%]{height:1px;background:var(--ns-line);margin:4px 2px}.sa-hc[_ngcontent-%COMP%]{position:fixed;z-index:990;width:300px;padding:12px 14px 13px;background:var(--ns-panel);color:var(--ns-ink);border:1px solid var(--ns-line-strong);border-radius:10px;box-shadow:var(--ns-shadow);pointer-events:none}.sa-hc-t[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;line-height:1.35}.sa-hc-apps[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:5px;gap:5px;margin:10px 0 11px}.sa-hc-ab[_ngcontent-%COMP%]{grid-gap:7px;gap:7px;font-size:12px;color:var(--ns-muted)}.sa-hc-robot[_ngcontent-%COMP%]{width:24px;height:24px;padding:4px;border-radius:7px;color:var(--ns-accent-ink);background:var(--ns-accent-soft)}.sa-hc-logo[_ngcontent-%COMP%]{width:24px;height:24px;padding:2px;border:1px solid var(--ns-line);border-radius:7px;background:#fff;-o-object-fit:contain;object-fit:contain}.sa-hc-arr[_ngcontent-%COMP%]{color:var(--ns-faint)}.sa-hc-n[_ngcontent-%COMP%]{height:22px;padding:0 7px;border-radius:99px;background:var(--ns-panel-2);color:var(--ns-muted);font-size:11px;font-weight:700;display:inline-grid;place-items:center}.sa-hc[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:76px 1fr;grid-row-gap:7px;row-gap:7px;margin:0;font-size:12.5px;align-items:center}.sa-hc[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-weight:400;color:var(--ns-faint)}.sa-hc[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:6px;gap:6px;min-width:0;margin:0}.sa-hc[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{font:11.5px var(--ns-mono);color:var(--ns-muted);background:none;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}']}),t})();const oB=["messagesContainer"];function rB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",36),o.NdJ("click",function(){return o.CHM(t),o.oxw().onClose()}),o.qZA()}}function sB(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",52),o.TgZ(1,"button",53),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setConnectsRailTab("all")}),o._uU(2,"All connects"),o.qZA(),o.TgZ(3,"button",53),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setConnectsRailTab("published")}),o._uU(4,"Published"),o.qZA(),o.TgZ(5,"button",53),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).setConnectsRailTab("draft")}),o._uU(6,"Draft"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.ekj("selected","all"===t.connectsRailTab),o.xp6(2),o.ekj("selected","published"===t.connectsRailTab),o.xp6(2),o.ekj("selected","draft"===t.connectsRailTab)}}function aB(t,e){1&t&&(o.TgZ(0,"span",56),o._UZ(1,"span",57),o._UZ(2,"span",58),o.qZA())}const cB=function(){return[1,2,3,4,5,6,7,8]};function lB(t,e){1&t&&(o.TgZ(0,"div",54),o.YNc(1,aB,3,0,"span",55),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,cB)))}function dB(t,e){1&t&&o._UZ(0,"span",80)}function uB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",44),o._UZ(1,"rect",81),o._UZ(2,"path",82),o.qZA())}function pB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",83),o._UZ(1,"polyline",84),o.qZA())}function hB(t,e){1&t&&o._UZ(0,"span",85)}function gB(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"span",64),o.YNc(2,dB,1,0,"span",65),o.TgZ(3,"span",66),o._uU(4),o.qZA(),o.TgZ(5,"span",67),o.TgZ(6,"button",68),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).startRailRename(n,e)}),o.O4$(),o.TgZ(7,"svg",69),o._UZ(8,"path",70),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"button",71),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).askRailDelete(n,e)}),o.O4$(),o.TgZ(10,"svg",69),o._UZ(11,"polyline",72),o._UZ(12,"path",73),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"span",74),o.TgZ(14,"span",75),o._uU(15),o.qZA(),o.TgZ(16,"button",76),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).copyRailConnectId(n,e)}),o.YNc(17,uB,3,0,"svg",77),o.YNc(18,pB,2,0,"svg",78),o.qZA(),o.qZA(),o.YNc(19,hB,1,0,"span",79),o.BQk()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(2),o.Q6J("ngIf",e.isActiveRailConnect(t.connectId)),o.xp6(2),o.Oqu(e.railRowTitle(t)),o.xp6(11),o.Oqu(t.connectId),o.xp6(1),o.ekj("copied",e.railCopiedId===t.connectId),o.Q6J("title",e.railCopiedId===t.connectId?"Copied!":"Copy ID"),o.xp6(1),o.Q6J("ngIf",e.railCopiedId!==t.connectId),o.xp6(1),o.Q6J("ngIf",e.railCopiedId===t.connectId),o.xp6(1),o.Q6J("ngIf",e.railOpeningConnectId===t.connectId)}}function fB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",86),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"input",87),o.NdJ("ngModelChange",function(e){return o.CHM(t),o.oxw(4).railEditingTitle=e})("keydown.enter",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).saveRailRename(n,e)})("keydown.escape",function(e){return o.CHM(t),o.oxw(4).cancelRailAction(e)}),o.qZA(),o.TgZ(2,"button",88),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).saveRailRename(n,e)}),o.O4$(),o.TgZ(3,"svg",89),o._UZ(4,"polyline",84),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"button",90),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).cancelRailAction(e)}),o.O4$(),o.TgZ(6,"svg",89),o._UZ(7,"line",91),o._UZ(8,"line",92),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngModel",t.railEditingTitle)("disabled",t.railActionBusy),o.xp6(1),o.Q6J("disabled",t.railActionBusy),o.xp6(3),o.Q6J("disabled",t.railActionBusy)}}function mB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",93),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"span",94),o._uU(2,"Delete this connect?"),o.qZA(),o.TgZ(3,"span",95),o.TgZ(4,"button",96),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw(3).confirmRailDelete(n,e)}),o._uU(5),o.qZA(),o.TgZ(6,"button",97),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).cancelRailAction(e)}),o._uU(7,"Cancel"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(4),o.Q6J("disabled",t.railActionBusy),o.xp6(1),o.hij(" ",t.railActionBusy?"Deleting\u2026":"Delete"," "),o.xp6(1),o.Q6J("disabled",t.railActionBusy)}}function vB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",61),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).openRailConnect(e.connectId)})("keyup.enter",function(){const e=o.CHM(t).$implicit;return o.oxw(3).openRailConnect(e.connectId)})("mouseenter",function(e){const n=o.CHM(t).$implicit;return o.oxw(3).showRailTooltip(n,e)})("mouseleave",function(){return o.CHM(t),o.oxw(3).hideRailTooltip()}),o.YNc(1,gB,20,9,"ng-container",50),o.YNc(2,fB,9,4,"span",62),o.YNc(3,mB,8,3,"span",63),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(3);o.ekj("active",n.isActiveRailConnect(t.connectId))("rail-status-published","published"===t.railStatus)("rail-status-draft","draft"===t.railStatus)("opening",n.railOpeningConnectId===t.connectId)("editing",n.railEditingConnectId===t.connectId||n.railDeletingConnectId===t.connectId),o.xp6(1),o.Q6J("ngIf",n.railEditingConnectId!==t.connectId&&n.railDeletingConnectId!==t.connectId),o.xp6(1),o.Q6J("ngIf",n.railEditingConnectId===t.connectId),o.xp6(1),o.Q6J("ngIf",n.railDeletingConnectId===t.connectId)}}
1function bB(t,e){if(1&t&&(o.TgZ(0,"div",98),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij(" ","all"===t.connectsRailTab?"No connects yet":"No "+t.connectsRailTab+" connects yet"," ")}}function xB(t,e){if(1&t&&(o.ynx(0),o.YNc(1,vB,4,13,"div",59),o.YNc(2,bB,2,1,"div",60),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngForOf",t.railVisibleConnects),o.xp6(1),o.Q6J("ngIf",0===t.railVisibleConnects.length)}}function _B(t,e){if(1&t&&(o.TgZ(0,"div",99),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.Udp("top",t.railTooltip.top,"px"),o.xp6(1),o.Oqu(t.railTooltip.text)}}function CB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",37),o.TgZ(1,"div",38),o.TgZ(2,"button",39),o.NdJ("click",function(){return o.CHM(t),o.oxw().createNewRailConnect()}),o.O4$(),o.TgZ(3,"svg",40),o._UZ(4,"line",10),o._UZ(5,"line",11),o.qZA(),o._uU(6," New Chat "),o.qZA(),o.kcU(),o.TgZ(7,"div",41),o.TgZ(8,"button",42),o.NdJ("click",function(){o.CHM(t);const e=o.oxw();return e.railFilterMenuOpen=!e.railFilterMenuOpen}),o.TgZ(9,"span",43),o.O4$(),o.TgZ(10,"svg",44),o._UZ(11,"polygon",45),o.qZA(),o._uU(12),o.qZA(),o.TgZ(13,"svg",44),o._UZ(14,"polyline",46),o.qZA(),o.qZA(),o.YNc(15,sB,7,6,"div",47),o.qZA(),o.qZA(),o.kcU(),o.TgZ(16,"div",48),o.YNc(17,lB,2,2,"div",49),o.YNc(18,xB,3,2,"ng-container",50),o.qZA(),o.YNc(19,_B,2,3,"div",51),o.qZA()}if(2&t){const t=o.oxw();o.xp6(12),o.hij(" ",t.railFilterLabel," "),o.xp6(3),o.Q6J("ngIf",t.railFilterMenuOpen),o.xp6(2),o.Q6J("ngIf",t.railShowSkeleton),o.xp6(1),o.Q6J("ngIf",!t.railShowSkeleton),o.xp6(1),o.Q6J("ngIf",t.railTooltip.visible)}}function wB(t,e){if(1&t&&(o.TgZ(0,"span",111),o.O4$(),o.TgZ(1,"svg",112),o._UZ(2,"path",113),o._UZ(3,"path",114),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.uIk("title",e.connectTitleForChat(t.connectId))}}function yB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",103),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).loadConversation(e._id)}),o.TgZ(1,"div",104),o.TgZ(2,"span",105),o.YNc(3,wB,4,1,"span",106),o.TgZ(4,"span",107),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"span",108),o._uU(7),o.ALo(8,"date"),o.qZA(),o.qZA(),o.TgZ(9,"button",109),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).deleteConversation(n._id,e)}),o.O4$(),o.TgZ(10,"svg",110),o._UZ(11,"polyline",72),o._UZ(12,"path",73),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("active",t._id===n.activeConversationId),o.xp6(3),o.Q6J("ngIf",t.connectId),o.xp6(2),o.Oqu(t.title),o.xp6(2),o.Oqu(o.xi3(8,5,t.updatedAt,"short"))}}function AB(t,e){1&t&&(o.TgZ(0,"div",115),o._uU(1,"No previous chats"),o.qZA())}function ZB(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",100),o.YNc(1,yB,13,8,"div",101),o.YNc(2,AB,2,0,"div",102),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.conversations),o.xp6(1),o.Q6J("ngIf",0===t.conversations.length)}}function kB(t,e){1&t&&(o.TgZ(0,"div",116),o._UZ(1,"span",117),o._UZ(2,"span",118),o._UZ(3,"span",119),o._UZ(4,"span",120),o._UZ(5,"span",121),o.qZA())}function TB(t,e){if(1&t&&(o.TgZ(0,"p",129),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.content)}}function OB(t,e){if(1&t&&o._UZ(0,"div",130),2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("innerHTML",e.formatContent(t.content),o.oJD)}}function MB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",151),o._UZ(1,"rect",81),o._UZ(2,"path",82),o.qZA())}function IB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",151),o._UZ(1,"polyline",84),o.qZA())}function SB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",148),o.TgZ(1,"span"),o._uU(2),o.qZA(),o.TgZ(3,"button",149),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(3).copyConnectId(e)}),o.YNc(4,MB,3,0,"svg",150),o.YNc(5,IB,2,0,"svg",150),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit;o.xp6(2),o.hij("ID: ",t.connectId,""),o.xp6(1),o.ekj("feedback-copied",t.idCopied),o.xp6(1),o.Q6J("ngIf",!t.idCopied),o.xp6(1),o.Q6J("ngIf",t.idCopied)}}function PB(t,e){if(1&t&&(o.TgZ(0,"div",152),o.O4$(),o.TgZ(1,"svg",141),o._UZ(2,"path",153),o.qZA(),o.kcU(),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(4),o.Oqu(t.comment)}}
1function NB(t,e){if(1&t&&(o.TgZ(0,"div",133),o.TgZ(1,"div",134),o.TgZ(2,"span",135),o._uU(3),o.qZA(),o.TgZ(4,"span",136),o._uU(5),o.qZA(),o.qZA(),o.TgZ(6,"div",137),o._uU(7),o.qZA(),o.YNc(8,SB,6,5,"div",138),o.TgZ(9,"div",139),o.TgZ(10,"div",140),o.O4$(),o.TgZ(11,"svg",141),o._UZ(12,"rect",142),o._UZ(13,"line",143),o._UZ(14,"line",144),o._UZ(15,"line",145),o.qZA(),o.kcU(),o.TgZ(16,"span"),o._uU(17),o.qZA(),o.qZA(),o.TgZ(18,"div",140),o.O4$(),o.TgZ(19,"svg",141),o._UZ(20,"polyline",146),o.qZA(),o.kcU(),o.TgZ(21,"span"),o._uU(22),o.qZA(),o.qZA(),o.YNc(23,PB,5,1,"div",147),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index;o.xp6(3),o.hij("#",n+1,""),o.xp6(1),o.ekj("success","Success"===t.status)("failed","Failed"===t.status)("partial","Partial"===t.status),o.xp6(1),o.Oqu(t.status),o.xp6(2),o.Oqu(t.title),o.xp6(1),o.Q6J("ngIf",t.connectId),o.xp6(9),o.Oqu(t.date),o.xp6(5),o.hij("Task(s): ",t.taskCount,""),o.xp6(1),o.Q6J("ngIf",t.comment)}}function qB(t,e){if(1&t&&(o.TgZ(0,"div",131),o.YNc(1,NB,24,13,"div",132),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.taskHistory)}}function UB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",156),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(3).onActionClick(e)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit;o.ekj("btn-action-connected",t.connected),o.xp6(1),o.hij(" ",t.connected?"\u2713 "+(t.appName||"Account")+" Connected":t.label," ")}}function EB(t,e){if(1&t&&(o.TgZ(0,"div",154),o.YNc(1,UB,2,3,"button",155),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.actions)}}function FB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",165),o._UZ(1,"rect",81),o._UZ(2,"path",82),o.qZA())}function DB(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",165),o._UZ(1,"polyline",84),o.qZA())}function LB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",157),o.TgZ(1,"button",158),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw().copyMessage(e)}),o.YNc(2,FB,3,0,"svg",159),o.YNc(3,DB,2,0,"svg",159),o.qZA(),o.TgZ(4,"button",160),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw().toggleFeedback(e,"like")}),o.O4$(),o.TgZ(5,"svg",161),o._UZ(6,"path",162),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"button",163),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw().toggleFeedback(e,"dislike")}),o.O4$(),o.TgZ(8,"svg",161),o._UZ(9,"path",164),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit;o.xp6(1),o.ekj("feedback-copied",t.copied),o.xp6(1),o.Q6J("ngIf",!t.copied),o.xp6(1),o.Q6J("ngIf",t.copied),o.xp6(1),o.ekj("feedback-selected","like"===t.feedback),o.xp6(3),o.ekj("feedback-selected","dislike"===t.feedback)}}function JB(t,e){if(1&t&&(o.TgZ(0,"div",122),o.TgZ(1,"div",123),o.YNc(2,TB,2,1,"p",124),o.YNc(3,OB,1,1,"div",125),o.YNc(4,qB,2,1,"div",126),o.YNc(5,EB,2,1,"div",127),o.YNc(6,LB,10,8,"div",128),o.qZA(),o.qZA()),2&t){const t=e.$implicit;o.ekj("user","user"===t.role)("assistant","assistant"===t.role)("step-message",t.isStep),o.xp6(2),o.Q6J("ngIf","user"===t.role),o.xp6(1),o.Q6J("ngIf","assistant"===t.role),o.xp6(1),o.Q6J("ngIf",null==t.taskHistory?null:t.taskHistory.length),o.xp6(1),o.Q6J("ngIf",null==t.actions?null:t.actions.length),o.xp6(1),o.Q6J("ngIf","assistant"===t.role&&"welcome"!==t.id&&!t.isStep)}}function jB(t,e){1&t&&(o.TgZ(0,"div",166),o.TgZ(1,"div",167),o.TgZ(2,"span",168),o.O4$(),o.TgZ(3,"svg",169),o._UZ(4,"circle",13),o._UZ(5,"path",170),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"span",171),o._uU(7,"Applying theme..."),o.qZA(),o.qZA(),o.qZA())}function RB(t,e){1&t&&(o.TgZ(0,"div",166),o.TgZ(1,"div",167),o.TgZ(2,"span",168),o.O4$(),o.TgZ(3,"svg",169),o._UZ(4,"circle",13),o._UZ(5,"path",170),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"span",171),o._uU(7,"Setting up app..."),o.qZA(),o.qZA(),o.qZA())}function $B(t,e){1&t&&(o.TgZ(0,"div",166),o.TgZ(1,"div",167),o.TgZ(2,"span",168),o.O4$(),o.TgZ(3,"svg",169),o._UZ(4,"circle",13),o._UZ(5,"path",170),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"span",171),o._uU(7,"Fetching task history..."),o.qZA(),o.qZA(),o.qZA())}function BB(t,e){1&t&&(o.TgZ(0,"div",166),o.TgZ(1,"div",167),o.TgZ(2,"span",171),o._uU(3,"Creating your Connect..."),o.qZA(),o.TgZ(4,"span",172),o._UZ(5,"span"),o._UZ(6,"span"),o._UZ(7,"span"),o.qZA(),o.qZA(),o.qZA())}
1function HB(t,e){if(1&t&&(o.TgZ(0,"div",166),o.TgZ(1,"div",167),o.TgZ(2,"span",171),o._uU(3),o.qZA(),o.TgZ(4,"span",172),o._UZ(5,"span"),o._UZ(6,"span"),o._UZ(7,"span"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(3),o.Oqu(t.statusWord)}}function QB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",173),o.O4$(),o.TgZ(1,"svg",174),o._UZ(2,"circle",13),o._UZ(3,"line",175),o._UZ(4,"line",176),o.qZA(),o.kcU(),o.TgZ(5,"span"),o._uU(6,"The Connect associated with this conversation has been deleted."),o.qZA(),o.TgZ(7,"button",177),o.NdJ("click",function(){return o.CHM(t),o.oxw().connectDeletedNotice=!1}),o.O4$(),o.TgZ(8,"svg",178),o._UZ(9,"line",91),o._UZ(10,"line",92),o.qZA(),o.qZA(),o.qZA()}}function YB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",179),o.NdJ("click",function(){return o.CHM(t),o.oxw().scrollToBottom()}),o.O4$(),o.TgZ(1,"svg",180),o._UZ(2,"polyline",46),o.qZA(),o.qZA()}}function zB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",183),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).onQuickAction(e.message)}),o._UZ(1,"span",184),o.TgZ(2,"span",185),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.Q6J("innerHTML",t.icon,o.oJD),o.xp6(2),o.Oqu(t.label)}}function VB(t,e){if(1&t&&(o.TgZ(0,"div",181),o.YNc(1,zB,4,2,"button",182),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.quickActionChips)}}function GB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",187),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).onQuickAction(e.message)}),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.hij(" ",t.label," ")}}function WB(t,e){if(1&t&&(o.TgZ(0,"div",181),o.YNc(1,GB,2,1,"button",186),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.followUpChips)}}let KB=(()=>{class t{constructor(t,e,n,i,r,s,a,c){this.commonService=t,this.customerConnectService=e,this.customerService=n,this.dataService=i,this.themeService=r,this.folderService=s,this.sanitizer=a,this.router=c,this.isOpen=!1,this.connectList=[],this.closeCopilot=new o.vpe,this.appSetupComplete=new o.vpe,this.addNodeRequest=new o.vpe,this.addFlowRequest=new o.vpe,this.addAIAgentRequest=new o.vpe,this.deleteNodeRequest=new o.vpe,this.renameConnectRequest=new o.vpe,this.activateConnectRequest=new o.vpe,this.addNodeNoteRequest=new o.vpe,this.navigateToNodeRequest=new o.vpe,this.runTestRequest=new o.vpe,this.mapFieldsRequest=new o.vpe,this.setFieldMappingRequest=new o.vpe,this.clearFieldMappingRequest=new o.vpe,this.showCurrentMappingRequest=new o.vpe,this.listFieldOptionsRequest=new o.vpe,this.setFilterConditionRequest=new o.vpe,this.bookExpertRequest=new o.vpe,this.accountConnected=new o.vpe,this.messages=[],this.userInput="",this._isProcessing=!1,this._processingWatchdog=null,this.thinkingMessages=["Thinking...","Understanding your request...","Analyzing the details...","Working on it...","Putting the pieces together...","Refining the response...","Almost there..."],this._thinkingTimer=null,this.statusWord="Thinking",this.stickToBottom=!0,this.conversations=[],this.activeConversationId=null,this.showConversationList=!1,this.pausedFieldMappings=[],this.draftsInFlight=!1,this._resumeTestAfterCompose=!1,this._autofillProposals=null,this.pausedTestChain=null,this.pendingFilterGuess=null,this.walkResumeAt=null,this.autoRunPaused=!1,this.pendingFieldChoices=[],this.pendingCreate=null,this.emptyTriggerPause=!1,this.pausedFieldMappingIndex=0,this.connectCreationGuard=!1,this.mappingChainId=0,this.chainNodeWaits=0,this.chainNodeLastLen=-1,this.lastDropdownContext=null,this.pendingDeleteDisambig=null,this.DELETE_DISAMBIG_TTL_MS=6e4,this.DROPDOWN_CONTEXT_TTL_MS=9e4,this.pendingConnectEvents=[],this.pendingConnectAppSelection=null,this.documentId="",this.isCreatingConnect=!1,this.isChangingTheme=!1,this.isSettingUpApp=!1,this.isFetchingHistory=!1,this.activeAgent="",this.showQuickActions=!0,this.showScrollDown=!1,this.followUpChips=[],this.navHistory=[],this.panelSide="right",this.showConnectsRail=!1,this.connectsRailTab="all",this.railPublishedConnects=[],this.railDraftConnects=[],this.railAllConnects=[],this.railFilterMenuOpen=!1,this.railLoa
1ding=!1,this.railLoaded=!1,this.railRawData=[],this.railTooltip={visible:!1,text:"",top:0},this.railOpeningConnectId=null,this.railEditingConnectId=null,this.railEditingTitle="",this.railDeletingConnectId=null,this.railActionBusy=!1,this.railCopiedId=null,this.isLoadingConversation=!1,this.connectDeletedNotice=!1,this.railCopyTimer=null,this.railTooltipTimer=null,this.railSuppressTooltipUntil=0,this.quickActionChips=[],this.dashboardQuickActions=[{label:"Create a Connect",message:"create a connect",icon:"&#9889;"},{label:"My Tasks",message:"show my task history",icon:"&#128202;"},{label:"My Plan",message:"what is my plan",icon:"&#128176;"},{label:"Linked Accounts",message:"check my linked accounts",icon:"&#128279;"},{label:"Switch Theme",message:"switch theme",icon:"&#127763;"},{label:"Help",message:"help me get started",icon:"&#10067;"}],this.editorQuickActions=[{label:"Select Trigger",message:"help me select a trigger event",icon:"&#9889;"},{label:"Add Action App",message:"add a new action step",icon:"&#10133;"},{label:"Add Flow",message:"add a flow to my workflow",icon:"&#128260;"},{label:"Explain Connect",message:"explain what this connect does",icon:"&#128161;"},{label:"Add AI Agent",message:"add an AI agent to my workflow",icon:"&#129302;"},{label:"Dashboard",message:"go to dashboard",icon:"&#127968;"}],this.automationKeywords=["create","connect","gmail","sheet","spreadsheet","slack","email","automate","workflow","trigger","action","when","save","add","send","sync"],this.formattedCache=new Map,this.destroyed=!1,this.managementKeywords=["activate","deactivate","turn on","turn off","enable","disable","pause","rename","delete","remove","navigate","go to","show me","check","what is","how many","my plan","my tasks","task history","linked accounts","team","note","dark mode","light mode","theme","help","explain","map fields","auto map","ai map","fill mapping","map this","set field","clear field","show options","list options","show worksheets","list channels","what's mapped","whats mapped","show current mapping","review fields","run test","run trigger","run action","test now","test it","select ","pick ","use value","choose ","go with "],this.FILTER_OPS=[{re:/\bdoes(?:\s+not|n['\u2019]t)\s+contain(?:s)?\b/i,op:"doesnotcontains",disp:"does not contain",needsValue:!0},{re:/\b(?:contains?|includes?|has)\b/i,op:"contains",disp:"contains",needsValue:!0},{re:/\bdoes(?:\s+not|n['\u2019]t)\s+start\s+with\b/i,op:"doesnotstartwith",disp:"does not start with",needsValue:!0},{re:/\bstarts?\s+with\b/i,op:"startwith",disp:"starts with",needsValue:!0},{re:/\bdoes(?:\s+not|n['\u2019]t)\s+end\s+with\b/i,op:"doesnotendwith",disp:"does not end with",needsValue:!0},{re:/\bends?\s+with\b/i,op:"endwith",disp:"ends with",needsValue:!0},{re:/\b(?:greater\s+than\s+or\s+equal|greater\s+than|more\s+than|bigger\s+than|larger\s+than|above|over)\b/i,op:"greaterthan",disp:"greater than",needsValue:!0},{re:/\b(?:less\s+than|fewer\s+than|lower\s+than|smaller\s+than|below|under)\b/i,op:"lessthan",disp:"less than",needsValue:!0},{re:/\bis\s+not\s+empty\b/i,op:"isnotempty",disp:"is not empty",needsValue:!1},{re:/\bis\s+empty\b/i,op:"isempty",disp:"is empty",needsValue:!1},{re:/\bis\s+true\b/i,op:"istrue",disp:"is true",needsValue:!1},{re:/\bis\s+false\b/i,op:"isfalse",disp:"is false",needsValue:!1},{re:/\b(?:does(?:\s+not|n['\u2019]t)\s+exist|doesn['\u2019]t\s+exist|not\s+exists?)\b/i,op:"doesnotexists",disp:"does not exist",needsValue:!1},{re:/\bexists?\b/i,op:"exists",disp:"exists",needsValue:!1},{re:/\b(?:is\s+not|isn['\u2019]t|are\s+not|aren['\u2019]t|not\s+equals?(?:\s+to)?|does(?:\s+not|n['\u2019]t)\s+equal|!=)\b/i,op:"doesnotexactlymatch",disp:"is not",needsValue:!0,numOp:"notequalsto",numDisp:"is not equal to"},{re:/\b(?:is\s+exactly|exactly\s+match(?:es)?|equals?(?:\s+to)?|matches?|is|are|=)\b/i,op:"exacltymatch",disp:"is",needsValue:!0,numOp:"equalsto",numDisp:"equals"}],this.IN_HOUSE_APP_IDS=["k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f473388E6g","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733syncdata","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","k2P4p45df5f222345E0a","jlp5059wb5f473388e6f","janrjh1l08ex59386f67g7nh","janrjh1l08ex59386f8cx5lp","lna8nwtk00qb7189999ylsri"]}get isProcessing(){var t;return!((null===(t=this.pendingFieldChoices)||void 0===t?void 0:t.length)>0||this.pausedTestChain)&&this._isProcessing}get showThinking(){return this.isProcessing&&!this.destroyed}set isProcessing(t){this._isProcessing=t,this._processingWatchdog&&(clearTimeout(this._processingWatchdog),this._processingWatchdog=null),t?(this.armProcessingWatchdog(),this.startThinkingRotation(),this.followStream()):this.stopThinkingRotation()}startThinkingRotation(){this.stopThinkingRotation();const t=this.thinkingMessages.slice(1);for(let o=t.length-1;o>0;o--){const e=Math.floor(Math.random()*(o+1));[t[o],t[e]]=[t[e],t[o]]}const e=[this.thinkingMessages[0],...t];let n=0;this.statusWord=e[0];const i=()=>{this.showThinking?(n=(n+1)%e.length,this.statusWord=e[n],this._thinkingTimer=setTimeout(i,1500+Math.floor(1e3*Math.random()))):this.stopThinkingRotation()};this._thinkingTimer=setTimeout(i,1500+Math.floor(1e3*Math.random()))}stopThinkingRotation(){this._thinkingTimer&&(clearTimeout(this._thinkingTimer),this._thinkingTimer=null)}armProcessingWatchdog(){this._processingWatchdog&&clearTimeout(this._processingWatchdog),this._processingWatchdog=setTimeout(()=>{var t;if(this._processingWatchdog=null,this._isProcessing&&!this.destroyed){
1if((null===(t=this.pendingFieldChoices)||void 0===t?void 0:t.length)>0||this.pendingCreate||this.pausedTestChain||this.emptyTriggerPause)return void(this._isProcessing=!1);this._isProcessing=!1,this.addAssistantMessage('\u26a0\ufe0f That step stopped responding, so I\'ve stopped waiting. You can say **"run test"** or **"map fields"** to continue, or tell me what to do next.'),this.scrollToShowQuestionAndAnswer()}},12e4)}closestApps(t,e,n=5){const i=String(e||"").toLowerCase().replace(/[^a-z0-9]/g,"");if(!i)return[];const o=String(e).toLowerCase().split(/[^a-z0-9]+/).filter(t=>t.length>2),r=t=>{let e=0;for(const n of[null==t?void 0:t.displayName,null==t?void 0:t.name]){const t=String(n||"").toLowerCase().replace(/[^a-z0-9]/g,"");if(!t)continue;if(t===i)return 5;if(t.includes(i)||i.includes(t)){e=Math.max(e,3);continue}let r=0;for(;r<Math.min(t.length,i.length)&&t[r]===i[r];)r++;r>=3&&(e=Math.max(e,2)),o.some(e=>t.includes(e))&&(e=Math.max(e,1))}return e};return t.map(t=>({a:t,s:r(t)})).filter(t=>t.s>0).sort((t,e)=>e.s-t.s).slice(0,n).map(t=>t.a)}resolveAppForCreate(t,e){const n=t.find(t=>(null==t?void 0:t.appId)&&String(t.appId)===String(e));if(n)return{app:n};const i=t.find(t=>this.appMatchesName(t,e,!0)),o=t.filter(t=>this.appMatchesName(t,e,!1));return i&&o.length<=1?{app:i}:i&&o.length>1?{ask:[i,...o.filter(t=>t!==i)]}:1===o.length?{app:o[0]}:o.length>1?{ask:o}:{ask:this.closestApps(t,e)}}askCreateChoice(t,e,n,i,o){this.pendingCreate=Object.assign(Object.assign({},t),{ask:{kind:e,slot:n,options:o}}),this.isProcessing=!1;const r=n<0?"the trigger":`action ${n+1}`;if(0===o.length)this.addAssistantMessage(`I couldn't find any ${e} matching **"${i}"** for ${r}. Please tell me the exact ${"app"===e?"app":"event"} name to use.`);else{const t=o.map((t,e)=>`${e+1}. ${t.label}`).join("\n");this.addAssistantMessage("app"===e?`Which app should I use for ${r}? "${i}" matches more than one:\n\n${t}\n\nReply with the **number**.`:`I couldn't confidently match the event **"${i}"** for ${r}. Available events:\n\n${t}\n\nReply with the **number**.`)}this.scrollToShowQuestionAndAnswer()}tryResolvePendingCreate(t){if(!this.pendingCreate)return!1;const e=this.pendingCreate,n=t.trim();let i;const o=n.match(/^(?:option\s*)?(\d{1,2})\.?$/i);if(o&&e.ask.options.length>0)i=e.ask.options[parseInt(o[1],10)-1];else if(e.ask.options.length>0){const t=n.toLowerCase();if(i=e.ask.options.find(e=>e.label.toLowerCase()===t),!i){const n=e.ask.options.filter(e=>e.label.toLowerCase().includes(t)||t.includes(e.label.toLowerCase()));1===n.length&&(i=n[0])}}else n.length>1&&!/^(cancel|stop|no)$/i.test(n)&&(i={value:n,label:n});if(!i||!i.value)return!1;const r=i.value;this.pendingCreate=null;const s={triggerApp:e.triggerApp,triggerEvent:e.triggerEvent,actionApps:e.actionApps.map(t=>Object.assign({},t))};return"app"===e.ask.kind?e.ask.slot<0?s.triggerApp=r:s.actionApps[e.ask.slot].appName=r:e.ask.slot<0?s.triggerEvent=r:s.actionApps[e.ask.slot].eventName=r,this.addAssistantMessage(`Got it \u2014 using **${i.label}**. Continuing...`),this.applyEventSelection(s.triggerApp,s.actionApps,s.triggerEvent),!0}offerFieldChoices(t,e){this.offerNextFieldChoice(t,[...e])}offerNextFieldChoice(t,e){if(this.destroyed||0===e.length)return;const n=e.shift();this.listFieldOptionsRequest.emit({fieldName:n,nodeIndex:t,targetAppName:"",onOptions:(i,o)=>{if(!i||!o||0===o.length)return void this.offerNextFieldChoice(t,e);const r=o.slice(0,25).map(t=>{var e,n,i;return{value:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:""),label:String(null!==(i=null!==(n=null==t?void 0:t.disp_val)&&void 0!==n?n:null==t?void 0:t.value)&&void 0!==i?i:"")}});this.pendingFieldChoices.push({label:i.label||n,nodeIndex:t,options:r,remaining:e});const s=r.map((t,e)=>`${e+1}. ${t.label}`).join("\n");this.addAssistantMessage(`The dropdown values for **${i.label||n}** are:\n\n${s}${o.length>25?`\n\u2026and ${o.length-25} more \u2014 say the exact name for those.`:""}\n\nReply with the **number** to use that value.`),this.scrollToShowQuestionAndAnswer()}})}tryResolveFieldChoice(t){if(0===this.pendingFieldChoices.length)return!1;const e=this.pendingFieldChoices[0],n=t.trim().match(/^(?:option\s*)?(\d{1,2})\.?$/i);let i;if(n)i=e.options[parseInt(n[1],10)-1];else{const n=t.trim().toLowerCase();if(i=e.options.find(t=>t.label.toLowerCase()===n),!i){const t=e.options.filter(t=>t.label.toLowerCase().includes(n)||n.includes(t.label.toLowerCase()));1===t.length&&(i=t[0])}}return!!i&&(this.pendingFieldChoices.shift(),e.remaining&&e.remaining.length>0&&setTimeout(()=>this.offerNextFieldChoice(e.nodeIndex,e.remaining),1200),this.addAssistantMessage(`Setting **${e.label}** \u2192 **${i.label}**...`),this.setFieldMappingRequest.emit({fieldName:e.label,source:i.label,nodeIndex:e.nodeIndex,targetAppName:"",onResult:t=>{if(this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer(),!(this.pendingFieldChoices.length>0||e.remaining&&e.remaining.length>0))if(this.pausedTestChain){const{indexes:t,i:e}=this.pausedTestChain;this.pausedTestChain=null,this.isProcessing=!0,this.addAssistantMessage(`Field set \u2014 continuing the tests from step ${t[e]+1}...`),setTimeout(()=>this.runTestChainStep(t,e,this.mappingChainId,0),4e3)}else if(this.autoRunPaused||this.pausedFieldMappings.length>0){const t=[...this.pausedFieldMappings];this.pausedFieldMappings=[],this.pausedFieldMappingIndex=0,this.autoRunPaused=!1,this.isProcessing=!0,this.addAssistantMessage("Field set \u2014 retrying the trigger test..."),this.runTriggerTestThenApplyMappings(t)}}}),!0)}pinToPausedNode(t,e){if(this.pausedTestChain){const{indexes:t,i:e}=this.pausedTestChain;return t[e]}return null!=t?t:null}getWelcomeMessage(){var t,e;const n=(null===(t=this.currentUser)||void 0===t?void 0:t.firstName)||"there";return this.currentApp?{id:"welcome",role:"assistant",content:`Hi ${n}! \ud83d\udc4b ${(null===(e=this.connectList)||void 0===e?void 0:e.length)>0&&this.connectList[0]?"I can see your Connect is ready to configure.":"Let's set up your Connect."} Here's what I can help with:\n\n\u2022 Select trigger & action events\n\u2022 Add action apps, flows, or AI agents\n\u2022 Explain what this connect does\n\u2022 Configure and test your workflow\n\nTry a quick action below or just ask me anything!`,timestamp:new Date}:{id:"welcome",role:"assistant",content:`Hi ${n}! \ud83d\udc4b Welcome to Appy Pie Automate! Here's what I can do:\n\n\u2022 Build automations \u2014 "Connect Gmail to Sheets"\n\u2022 Manage workflow \u2014 add, change, or remove apps\n\u2022 Check tasks, plan, linked accounts & tools\n\u2022 Switch theme, manage team & more\n\nTry a quick action below or just ask me anything!`,timestamp:new Date}}formatContent(t){if(!t)return"";if(this.formattedCache.has(t))return this.formattedCache.get(t);let e=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"<em>$1</em>").replace(/`(.+?)`/g,'<code class="copilot-inline-code">$1</code>').replace(/^[\-\u2022]\s+(.+)$/gm,"<li>$1</li>").replace(/^\d+\.\s+(.+)$/gm,'<li class="numbered">$1</li>');e=e.replace(/((?:<li[^>]*>.*?<\/li>\n?)+)/g,'<ul class="copilot-list">$1</ul>'),e=e.replace(/<\/li>\n<li/g,"</li><li"),e=e.replace(/\n/g,"<br>"),e=e.replace(/<br>\s*<ul/g,"<ul"),e=e.replace(/<\/ul>\s*<br>/g,"</ul>");const n=this.sanitizer.bypassSecurityTrustHtml(e);return this.formattedCache.set(t,n),n}trackByMessageId(t,e){return e.id}getProcessingLabel(t){const e=(t||"").toLowerCase();return/\b(test|dry run)\b/.test(e)?"Testing":/\b(map|mapping|field)\b/.test(e)?"Mapping fields":/\b(theme|dark mode|light mode)\b/.test(e)?"Switching theme":/\brename\b/.test(e)?"Renaming":/\b(activate|publish|go live|turn (it )?on)\b/.test(e)?"Activating":/\b(delete|remove|clear)\b/.test(e)?"Updating":/\b(folder|favou?rite|organi[sz]e)\b/.test(e)?"Organizing":/\b(history|task|linked account|tool|team|member|plan|usage|billing)\b/.test(e)?"Fetching":/\b(explain|understand|describe|what|why|how|help)\b/.test(e)?"Thinking":/\b(add|insert|append)\b/.test(e)?"Adding":/\b(create|build|connect|automate|sync|integrate|set ?up)\b/.test(e)?"Building":"Thinking"}ngOnInit(){this.quickActionChips=this.currentApp?this.editorQuickActions:this.dashboardQuickActions;const t=this.dataService.consumeCopilotMessages(),e=this.dataService.consumeBlueprint();if(t.length>0){if(this.messages=t,this.showQuickActions=!1,e){const t=`Here's your Connect blueprint:\n\n**${e.connectTitle}**\n\n${e.steps.map((t,e)=>`${e+1}. ${t}`).join("\n")}\n\nTrigger is set! Now let's configure your action steps \u2014 set up events, map fields, or activate when ready!`;this.messages.push({id:`msg-blueprint-${Date.now()}`,role:"assistant",content:t,timestamp:new Date,status:"complete"})}this.followUpChips=this.currentApp?[{label:"Add Action App",message:"add a new action step"},{label:"Explain this connect",message:"explain what this connect does"},{label:"Dashboard",message:"go to dashboard"}]:this.getPageChips(),setTimeout(()=>{var t;const e=null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement;e&&(e.scrollTop=e.scrollHeight)},300),setTimeout(()=>{var t;if(null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement){const t=this.messagesContainer.nativeElement.querySelectorAll(".copilot-message.user");t.length>0&&t[t.length-1].scrollIntoView({block:"start",behavior:"instant"}),this.onMessagesScroll()}},200)}else this.messages=this.currentApp?[]:[this.getWelcomeMessage()];if(this.currentApp){this.dataService.consumeRailSwitch()&&this.messages.length>0&&(this.messages=[],this.showQuickActions=!0,this.followUpChips=[]);const t=this.currentConnectIdFromUrl(),e=!!t&&"newNode"!==t,n=this.dataService.consumePendingConversation();e&&n?(this.messages=[],this.loadConversation(n)):e&&this.messages.length>0&&!this.activeConversationId?this.autoSaveConversation():e&&0===this.messages.length&&!this.dataService.hasAutoPrompt()&&this.restoreConnectConversation(t)}this.currentApp||(this.routerSub=this.router.events.subscribe(t=>
1{if(!(t instanceof ui.m2))return;const e=this.messages[this.messages.length-1];"assistant"===(null==e?void 0:e.role)&&e.timestamp&&Date.now()-new Date(e.timestamp).getTime()<5e3||(this.followUpChips=this.getPageChips())})),this.showConnectsRail&&(this.railRouterSub=this.router.events.subscribe(t=>{t instanceof ui.m2&&this.railLoaded&&this.syncRailWithActiveConnect()})),this.loadConversationList(),e||this.dataService.peekAutoRunPending()?setTimeout(()=>{if(this.destroyed)return;this.dataService.clearAutoRunPending();const t=(this.dataService.consumeFieldMappings()||[]).filter(t=>t&&t.fieldName&&null!=t.value&&""!==String(t.value).trim()&&!/^dummy( value)?$/i.test(String(t.value).trim()));this.runTriggerTestThenApplyMappings(t)},4e3):this.dataService.consumeFieldMappings()}ngOnDestroy(){var t,e;if(this.destroyed=!0,this.stopThinkingRotation(),null===(t=this.routerSub)||void 0===t||t.unsubscribe(),null===(e=this.railRouterSub)||void 0===e||e.unsubscribe(),!this.isOpen)return;const n=this.messages.filter(t=>"welcome"!==t.id);0!==n.length&&this.dataService.openCopilotWithHistory(n)}ngOnChanges(t){if((t.currentUser||t.connectList)&&1===this.messages.length&&"welcome"===this.messages[0].id&&(this.messages[0]=this.getWelcomeMessage()),t.isOpen&&this.isOpen&&this.showConnectsRail&&!this.railLoaded&&this.loadConnectsRail(),t.connectList&&this.showConnectsRail&&this.railLoaded&&this.syncRailWithActiveConnect(),t.isOpen&&this.isOpen){const t=this.dataService.consumeAutoPrompt();t&&setTimeout(()=>{this.userInput=t,this.sendMessage()},200)}}loadConnectsRail(){this.railSuppressTooltipUntil=Date.now()+1500,this.connectsRailTab=this.dataService.copilotRailTab;const t=this.dataService.copilotRailCache;t?(this.railPublishedConnects=t.published,this.railDraftConnects=t.drafts,this.railRawData=t.raw,this.railLoaded=!0,this.rebuildRailAllConnects(),this.syncRailWithActiveConnect()):this.railLoading=!0,this.dataService.copilotRailLoading=!0,(0,qo.D)({published:this.customerConnectService.getUserConnectList({connectStatus:"Completed",pageSize:25}).pipe((0,$l.K)(()=>(0,Tr.of)(null))),draft:this.customerConnectService.getUserConnectList({connectStatus:"Draft",pageSize:25}).pipe((0,$l.K)(()=>(0,Tr.of)(null)))}).subscribe(({published:e,draft:n})=>{if(!e&&!n&&t)return this.railLoading=!1,void(this.dataService.copilotRailLoading=!1);this.railPublishedConnects=this.groupRailConnects(e,"published"),this.railDraftConnects=this.groupRailConnects(n,"draft"),this.railRawData=[...(null==e?void 0:e.userConnects)||[],...(null==n?void 0:n.userConnects)||[]],this.railLoading=!1,this.dataService.copilotRailLoading=!1,this.railLoaded=!0,this.rebuildRailAllConnects(),this.updateRailCache(),this.syncRailWithActiveConnect()})}rebuildRailAllConnects(){this.railAllConnects=[...this.railPublishedConnects,...this.railDraftConnects].sort((t,e)=>(Date.parse(e.createdAt)||0)-(Date.parse(t.createdAt)||0))}get railShowSkeleton(){return this.railLoading||this.dataService.editorSkeletonActive}get railVisibleConnects(){return"published"===this.connectsRailTab?this.railPublishedConnects:"draft"===this.connectsRailTab?this.railDraftConnects:this.railAllConnects}get railFilterLabel(){return"published"===this.connectsRailTab?"Published":"draft"===this.connectsRailTab?"Draft":"All connects"}syncRailWithActiveConnect(){var t,e;const n=this.router.url.split("?")[0].split("/").pop()||"";if(!n||"newNode"===n)return;const i=this.railPublishedConnects.some(t=>t.connectId===n);let o=this.railDraftConnects.some(t=>t.connectId===n);const r=null===(e=null===(t=this.connectList)||void 0===t?void 0:t[0])||void 0===e?void 0:e.connectTitle;if(!i&&!o&&(this.railDraftConnects=[{connectId:n,connectTitle:r||n,railStatus:"draft",createdAt:(new Date).toISOString()},...this.railDraftConnects],this.rebuildRailAllConnects(),this.updateRailCache(),o=!0),r){const t=[...this.railDraftConnects,...this.railPublishedConnects].find(t=>t.connectId===n);t&&t.connectTitle===n&&t.connectTitle!==r&&(t.connectTitle=r,this.rebuildRailAllConnects(),this.updateRailCache())}"published"!==this.connectsRailTab||i?"draft"===this.connectsRailTab&&!o&&(this.connectsRailTab="published"):this.connectsRailTab="draft"}groupRailConnects(t,e){const n={};for(const i of(null==t?void 0:t.userConnects)||[])n[i.connectId]||(n[i.connectId]={connectId:i.connectId,connectTitle:"string"==typeof i.connectTitle&&i.connectTitle.trim().length>0?i.connectTitle:i.connectId,railStatus:e,createdAt:i.oldest_created_at||i.recent_updated_at||""});return Object.values(n).sort((t,e)=>(Date.parse(e.createdAt)||0)-(Date.parse(t.createdAt)||0))}setConnectsRailTab(t){this.connectsRailTab=t,this.dataService.copilotRailTab=t,this.railFilterMenuOpen=!1,this.hideRailTooltip()}closeRailFilterMenuOnOutsideClick(t){var e;if(!this.railFilterMenuOpen)return;const n=t.target;(null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".rail-filter"))||(this.railFilterMenuOpen=!1)}currentConnectIdFromUrl(){return this.router.url.split("?")[0].split("/").pop()||""}restoreConnectConversation(t){this.isLoadingConversation=!0,this.showQuickActions=!1,this.commonService.getCopilotConversationByConnect(t).subscribe({next:t=>{this.isLoadingConversation=!1,!t||!t._id||this.messages.length>0?this.showQuickActions=0===this.messages.length:(this.activeConversationId=t._id,this.messages=[...t.messages||[]],this.showQuickActions=!1,setTimeout(()=>{var t;const e=null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement;e&&(e.scrollTop=e.scrollHeight)},80))},error:()=>{this.isLoadingConversation=!1,this.showQuickActions=!0}})}updateRailCache(){this.dataService.copilotRailCache={published:this.railPublishedConnects,drafts:this.railDraftConnects,raw:this.railRawData}}copyRailConnectId(t,e){var n;e.stopPropagation();const i=t.connectId,o=()=>{this.railCopiedId=i,clearTimeout(this.railCopyTimer),this.railCopyTimer=setTimeout(()=>{this.railCopiedId=null},1500)},r=()=>{const t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}t.remove(),o()};(null===(n=navigator.clipboard)||void 0===n?void 0:n.writeText)?navigator.clipboard.writeText(i).then(o).catch(r):r()}startRailRename(t,e){e.stopPropagation(),this.hideRailTooltip(),this.railDeletingConnectId=null,this.railEditingConnectId=t.connectId,this.railEditingTitle=t.connectTitle,setTimeout(()=>{var t;return null===(t=document.getElementById("railRenameInput"))||void 0===t?void 0:t.focus()})}askRailDelete(t,e){e.stopPropagation(),this.hideRailTooltip(),this.railEditingConnectId=null,this.railDeletingConnectId=t.connectId}cancelRailAction(t){null==t||t.stopPropagation(),!this.railActionBusy&&(this.railEditingConnectId=null,this.railDeletingConnectId=null,this.railEditingTitle="")}saveRailRename(t,e){if(null==e||e.stopPropagation(),this.railActionBusy)return;const n=(this.railEditingTitle||"").trim();n&&n!==t.connectTitle?(this.railActionBusy=!0,this.customerConnectService.updateConnectByConnectId(t.connectId,{connectTitle:n}).subscribe({next:()=>{var e;t.connectTitle=n,this.rebuildRailAllConnects(),this.updateRailCache(),this.isActiveRailConnect(t.connectId)&&(null===(e=this.connectList)||void 0===e?void 0:e[0])&&(this.connectList[0].connectTitle=n),this.railActionBusy=!1,this.railEditingConnectId=null,this.railEditingTitle=""},error:()=>{this.railActionBusy=!1,this.railEditingConnectId=null,this.railEditingTitle=""}})):this.cancelRailAction()}confirmRailDelete(t,e){if(null==e||e.stopPropagation(),this.railActionBusy)return;this.railActionBusy=!0;const n=this.isActiveRailConnect(t.connectId),i=()=>{this.railPublishedConnects=this.railPublishedConnects.filter(e=>e.connectId!==t.connectId),this.railDraftConnects=this.railDraftConnects.filter(e=>e.connectId!==t.connectId),this.railRawData=this.railRawData.filter(e=>e.connectId!==t.connectId),this.rebuildRailAllConnects(),this.updateRailCache(),this.railActionBusy=!1,this.railDeletingConnectId=null,n&&this.router.navigateByUrl("/connects")},o=()=>{this.railActionBusy=!1,this.railDeletingConnectId=null},r=()=>this.customerConnectService.deleteUserConnects(t.connectId).subscribe({next:i,error:o});"published"===t.railStatus?this.customerConnectService.deleteUserConnectCron(t.connectId).subscribe({next:r,error:r}):r()}showRailTooltip(t,e){if(clearTimeout(this.railTooltipTimer),this.railOpeningConnectId||Date.now()<this.railSuppressTooltipUntil||this.railEditingConnectId===t.connectId||this.railDeletingConnectId===t.connectId)return;const n=e.currentTarget.getBoundingClientRect();this.railTooltipTimer=setTimeout(()=>{this.railTooltip={visible:!0,text:t.connectTitle,top:n.top+n.height/2}},350)}hideRailTooltip(){clearTimeout(this.railTooltipTimer),this.railTooltip.visible=!1}isActiveRailConnect(t){return(this.router.url.split("?")[0].split("/").pop()||"")===t}createNewRailConnect(){if(this.railOpeningConnectId||"newNode"===(this.router.url.split("?")[0].split("/").pop()||""))return;this.hideRailTooltip(),this.dataService.openCopilot(),this.dataService.markRailSwitch();const t=this.router.routeReuseStrategy.shouldReuseRoute;this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigateByUrl("/customeditor/fresh/app/newNode").finally(()=>{this.router.routeReuseStrategy.shouldReuseRoute=t})}openRailConnect(t){if(this.railOpeningConnectId||this.railEditingConnectId===t||this.railDeletingConnectId===t)return;const e=this.railRawData.filter(e=>e.connectId===t).sort((t,e)=>t.index-e.index);if(!e.length||this.isActiveRailConnect(t))return;this.hideRailTooltip(),this.railOpeningConnectId=t;const n=e[e.length-1];let i=1===n.status||e[0].sample_data&&0===e[0].sample_data.length?e[0]._id:n._id,o=1===n.status?"preview":"overview";e.every(t=>t.sample_data&&t.sample_data.length>0&&"Completed"===t.connectStatus)&&(o="preview",i=e[0]._id),this.dataService.openCopilot(),this.dataService.markRailSwitch();const r=this.router.routeReuseStrategy.shouldReuseRoute;this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigateByUrl(`/customeditor/${i}/${o}/${t}`).finally(()=>{this.router.routeReuseStrategy.shouldReuseRoute=r,this.railOpeningConnectId=null})}scrollToShowQuestion(){setTimeout(()=>{var t;if(!(null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement))return;const e=this.messagesContainer.nativeElement.querySelectorAll(".copilot-message");0!==e.length&&e[e.length-1].scrollIntoView({block:"start",behavior:"smooth"})},0)}scrollToShowQuestionAndAnswer(){setTimeout(()=>{var t;if(!(null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement))return;const e=this.messagesContainer.nativeElement.querySelectorAll(".copilot-message");e.length<2||e[e.length-2].scrollIntoView({block:"start",behavior:"smooth"})},0)}onClose(){this.closeCopilot.emit()}loadConversationList(){this.commonService.getCopilotConversations().subscribe({next:t=>{this.conversations=t||[]},error:()=>{this.conversations=[]}})}autoSaveConversation(){const t=this.messages.filter(t=>"welcome"!==t.id);if(0===t.length)return;const e=this.currentConnectIdFromUrl();this.commonService.saveCopilotConversation({conversationId:this.activeConversationId||void 0,messages:t,context:this.currentApp?"editor":"dashboard",connectId:this.currentApp&&e&&"newNode"!==e?e:void 0}).subscribe({next:t=>{!this.activeConversationId&&(null==t?void 0:t.conversationId)&&(this.activeConversationId=t.conversationId)},error:t=>console.error("Auto-save conversation failed:",t)})}onHeaderNewChat(){this.showConnectsRail?this.createNewRailConnect():this.startNewChat()}startNewChat(){this.activeConversationId=null,this.connectDeletedNotice=!1,this.messages=this.currentApp?[]:[this.getWelcomeMessage()],this.showQuickActions=!0,this.followUpChips=[],this.showConversationList=!1,this.loadConversationList()}railRowTitle(t){var e,n;if(this.isActiveRailConnect(t.connectId)){const i=null===(n=null===(e=this.connectList)||void 0===e?void 0:e[0])||void 0===n?void 0:n.connectTitle;if(i&&t.connectTitle===t.connectId)return i}return t.connectTitle}connectTitleForChat(t){const e=[...this.railPublishedConnects,...this.railDraftConnects].find(e=>e.connectId===t);return(null==e?void 0:e.connectTitle)||t}applyConversationInPlace(t){this.isLoadingConversation=!1,this.activeConversationId=t._id,this.messages=this.currentApp?[...t.messages||[]]:[this.getWelcomeMessage(),...t.messages||[]],this.showQuickActions=!1,this.showConversationList=!1,setTimeout(()=>{var t;const e=null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement;e&&(e.scrollTop=e.scrollHeight)},80)}openConnectForConversation(t,e){this.customerConnectService.getUserConnectData(t).subscribe({next:n=>{const i=[...(null==n?void 0:n.userConnects)||[]].sort((t,e)=>t.index-e.index);if(!i.length)return this.applyConversationInPlace(e),void(this.connectDeletedNotice=!0);const o=i[i.length-1];let r=1===o.status||i[0].sample_data&&0===i[0].sample_data.length?i[0]._id:o._id,s=1===o.status?"preview":"overview";i.every(t=>t.sample_data&&t.sample_data.length>0&&"Completed"===t.connectStatus)&&(s="preview",r=i[0]._id),this.isLoadingConversation=!1,this.dataService.markPendingConversation(e._id
1),this.dataService.openCopilot(),this.router.navigateByUrl(`/customeditor/${r}/${s}/${t}`)},error:()=>this.applyConversationInPlace(e)})}loadConversation(t){this.isLoadingConversation=!0,this.connectDeletedNotice=!1,this.messages=[],this.showQuickActions=!1,this.showConversationList=!1,this.commonService.getCopilotConversation(t).subscribe({next:t=>{const e=null==t?void 0:t.connectId;if(e&&e!==this.currentConnectIdFromUrl())return this.showConnectsRail&&this.railRawData.some(t=>t.connectId===e)?(this.isLoadingConversation=!1,this.dataService.markPendingConversation(t._id),void this.openRailConnect(e)):void this.openConnectForConversation(e,t);this.applyConversationInPlace(t)},error:()=>{this.isLoadingConversation=!1,this.showQuickActions=!0,this.addAssistantMessage("Failed to load conversation.")}})}deleteConversation(t,e){e.stopPropagation(),this.commonService.deleteCopilotConversation(t).subscribe({next:()=>{this.conversations=this.conversations.filter(e=>e._id!==t),this.activeConversationId===t&&this.startNewChat()}})}toggleConversationList(){this.showConversationList=!this.showConversationList,this.showConversationList&&this.loadConversationList()}processPendingFieldMappings(t){t=(t||[]).filter(t=>t&&t.value&&!/^\s*(dummy( value)?|placeholder|example|sample|tbd|todo|n\/a)\s*$/i.test(String(t.value))&&!/^\s*(your|my)\s+.+$/i.test(String(t.value))&&!/^\s*<[^>]*>\s*$/.test(String(t.value)));const e=t=>/\{\{.+\}\}/.test(t),n=t.filter(t=>!e(t.value)),i=t.filter(t=>e(t.value)),o=()=>!this.destroyed||(this.dataService.setFieldMappings(t),!1);if(0===i.length)return this.addAssistantMessage("Configuring your fields..."),void setTimeout(()=>{!o()||this.applyFieldMappingsSequentially(t,0)},4e3);this.addAssistantMessage("Configuring dropdown fields..."),setTimeout(()=>{!o()||(n.length>0?this.applyFieldMappingsSequentially(n,0,()=>{this.addAssistantMessage("\u23f3 Waiting for fields to load..."),setTimeout(()=>this.runTriggerTestThenApplyMappings(i),12e3)}):this.runTriggerTestThenApplyMappings(i))},4e3)}runTriggerTestThenApplyMappings(t){var e,n,i,o;this.autoRunPaused=!1;const r=++this.mappingChainId,s=this.connectList||[],a=s.filter(t=>t&&t.appId),c=s.length===this.chainNodeLastLen;if(this.chainNodeLastLen=s.length,!(s.length>=2&&a.length===s.length&&c&&a.some(t=>0===Number(t.index)))&&(this.chainNodeWaits+=1,this.chainNodeWaits<=60))return void setTimeout(()=>{this.destroyed||r!==this.mappingChainId||this.runTriggerTestThenApplyMappings(t)},1500);this.chainNodeWaits=0,this.chainNodeLastLen=-1;const l=()=>(this.connectList||[]).filter(t=>t&&t.appId&&this.appNeedsAccount(t)&&"account_selected"!==t.nodeStatus),d=l();if(d.length>0){this.isProcessing=!1;const e=d.map(t=>`**${t.name}** (step ${Number(t.index)+1})`).join(", ");this.addAssistantMessage(1===d.length?`\ud83d\udd11 Before I run anything: ${e} needs its account. Connect it with the button below \u2014 I'll run the whole flow automatically once it's connected.`:`\ud83d\udd11 Before I run anything: ${e} need their accounts. Connect them with the buttons below \u2014 I'll run the whole flow automatically once they're all connected.`),this.messages[this.messages.length-1].actions=d.map(t=>({label:`Connect ${t.name} Account`,type:"connect_account",appId:t.appId,appName:t.name,nodeId:t.nodeId||""})),this.scrollToShowQuestionAndAnswer();const n=e=>{if(!this.destroyed&&r===this.mappingChainId){if(0===l().length)return this.addStepMessage("\u2705 All accounts connected \u2014 starting the flow..."),void this.runTriggerTestThenApplyMappings(t);if(e>=180)return this.addAssistantMessage('Whenever the remaining account is connected, say **"run test"** and I\'ll run the whole flow.'),void this.scrollToShowQuestionAndAnswer();setTimeout(()=>n(e+1),5e3)}};return void n(0)}this.addAssistantMessage("\ud83d\udd04 Running trigger test to fetch sample data for field mapping...");const u=null===(e=this.connectList)||void 0===e?void 0:e.find(t=>0===(null==t?void 0:t.index));if((null===(o=null===(i=null===(n=null==u?void 0:u.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)||void 0===o?void 0:o.length)>0&&!this.triggerSampleIsEmpty())return this.addAssistantMessage("\u2705 Sample data already available. Mapping fields..."),this.scrollToShowQuestionAndAnswer(),void setTimeout(()=>{r===this.mappingChainId&&this.applySpecThenWalk(t,r)},500);
1this.runTestRequest.emit({nodeIndex:0,appName:"",nodeType:"trigger",onMissingFields:(e,n)=>{this.isProcessing=!1;const i=n.map(t=>`\u2022 ${t}`).join("\n");this.addAssistantMessage(`\u26a0\ufe0f **${e}** needs these fields before the test can run:\n\n${i}`),this.pausedFieldMappings=t,this.pausedFieldMappingIndex=0,this.autoRunPaused=!0,this.scrollToShowQuestionAndAnswer(),this.offerFieldChoices(0,n)},onNodeNotFound:t=>{this.isProcessing=!1,this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onTestStarted:e=>{this.isProcessing=!1,this.addAssistantMessage(`\ud83d\udd04 Testing **${e}**...`),this.scrollToShowQuestionAndAnswer(),this.waitForSampleDataThenMap(t,0,30,r)},onTestComplete:(t,e)=>{}})}triggerSampleIsEmpty(){var t,e,n,i;const o=null===(i=null===(n=null===(e=null===(t=this.connectList)||void 0===t?void 0:t.find(t=>0===(null==t?void 0:t.index)))||void 0===e?void 0:e.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data;return!Array.isArray(o)||0===o.length||!o.some(t=>{const e=t&&null!=t.value?String(t.value).trim():"";return e.length>0&&!/^dummy( value| session name)?$/i.test(e)})}applySpecThenWalk(t,e){t&&0!==t.length?(this.addAssistantMessage(`\ud83e\uddfe Applying your ${t.length} specified field value(s) first...`),this.scrollToShowQuestionAndAnswer(),this.isProcessing=!0,this.applyFieldMappingsSequentially(t,0,()=>{e===this.mappingChainId&&(this.addStepMessage("\u2705 Specified values applied \u2014 filling anything still open..."),this.isProcessing=!0,setTimeout(()=>{e===this.mappingChainId&&this.autoMapRemainingNodes(1)},2e3))})):this.autoMapRemainingNodes(1)}waitForSampleDataThenMap(t,e,n,i){var o,r,s,a;if(i!==this.mappingChainId)return;const c=null===(o=this.connectList)||void 0===o?void 0:o.find(t=>0===(null==t?void 0:t.index)),l=(null===(a=null===(s=null===(r=null==c?void 0:c.sample_data)||void 0===r?void 0:r[0])||void 0===s?void 0:s.data)||void 0===a?void 0:a.length)>0;if(l&&this.triggerSampleIsEmpty()){this.isProcessing=!1,this.emptyTriggerPause=!0;const t=(null==c?void 0:c.name)||"the trigger app";return this.addAssistantMessage(`\u26a0\ufe0f The trigger test came back with **no real data** \u2014 every field is empty. That usually means **${t}** had nothing new to fetch (no new appointment/email/record in the test window).\n\nAI mapping needs real values to work with, so I've paused. Create a fresh test record in ${t}, then say **"run test"** \u2014 I'll rerun the trigger and continue the whole flow automatically.`),void this.scrollToShowQuestionAndAnswer()}return l?(this.addAssistantMessage("\u2705 Sample data loaded! Mapping fields..."),this.scrollToShowQuestionAndAnswer(),void setTimeout(()=>{i===this.mappingChainId&&this.applySpecThenWalk(t,i)},3e3)):e>=n?(this.addAssistantMessage("\u26a0\ufe0f Could not confirm sample data. Attempting field mapping..."),this.scrollToShowQuestionAndAnswer(),void this.autoMapRemainingNodes(1)):void setTimeout(()=>{this.waitForSampleDataThenMap(t,e+1,n,i)},2e3)}autoMapRemainingNodes(t){var e;const n=(this.connectList||[]).filter(t=>t&&Number(t.index)>=1).find(e=>Number(e.index)===t);if(!n)return void this.activateAfterMapping();const i=`${n.name||"Node "+(t+1)}${n.actionNameTitle?" \u2014 "+n.actionNameTitle:""}`;if(this.appNeedsAccount(n)&&"account_selected"!==n.nodeStatus)return this.isProcessing=!1,this.addAssistantMessage(`\ud83d\udd11 **${i}** needs its account before I can map its fields. Connect it with the button below \u2014 I'll continue automatically once it's connected.`),this.messages[this.messages.length-1].actions=[{label:`Connect ${n.name} Account`,type:"connect_account",appId:n.appId,appName:n.name,nodeId:n.nodeId||""}],this.scrollToShowQuestionAndAnswer(),void this.waitForAccountThenResume(t,0);const o={done:!1};this.addStepMessage(`\ud83d\udd04 Configuring and mapping: **${i}**`);const r=((null===(e=this.messages.find(t=>"user"===t.role))||void 0===e?void 0:e.content)||"").slice(0,600),s=(this.connectList||[]).filter(t=>t).map(t=>`${Number(t.index)+1}. ${t.name}${t.actionNameTitle?" \u2014 "+t.actionNameTitle:""}`).join("; "),a=[];(this.connectList||[]).filter(e=>e&&Number(e.index)>
1=1&&Number(e.index)<t&&e.appId===n.appId).forEach(t=>Object.values(t.editOptions||{}).forEach(t=>{Array.isArray(t)&&t.forEach(t=>{t&&"label"===t.type&&t.key&&a.push(t.key)})}));const c=a.length?` Identical earlier steps ALREADY process: ${[...new Set(a)].join(", ")} \u2014 THIS step must process a DIFFERENT field taken from the SAME original dataset those steps read from (dataset 0), NEVER the output of another identical step.`:"",l=this.appNeedsAccount(n)?"":" This step TRANSFORMS data: take its input field(s) from the ORIGINAL trigger dataset (dataset 0) unless the user explicitly asked to chain transformations.";this.mapFieldsRequest.emit({nodeIndex:t,targetAppName:n.name||"",workflowIntent:`${r}\n\n[You are mapping STEP ${t+1} of this workflow: ${s}. When several similar steps exist (e.g. two date Formatters), give THIS step the role its position implies \u2014 the first date Formatter converts the START date/time, the second converts the END date/time.${l}${c}]`,onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onNeedsTest:t=>{this.onMapNeedsTest(t),o.done||(o.done=!0,this.isProcessing=!1)},onMapped:e=>{var r,s,a;this.onMapCompleted(e);const c=(null==e?void 0:e.mappedCount)||0;if(0===c&&(null==e?void 0:e.panelNotReady)&&!n.__mapRetried)return n.__mapRetried=!0,void(o.done||(o.done=!0,this.addStepMessage(`\ud83d\udd01 Retrying mapping: **${i}**`),setTimeout(()=>this.autoMapRemainingNodes(t),4e3)));if(this.addStepMessage(c>0?`\u2705 Mapped ${c} field(s): **${i}**`:`\u26a0\ufe0f Nothing mapped on **${i}**${(null==e?void 0:e.panelNotReady)?" \u2014 the panel did not open in time":""}`),!o.done){o.done=!0;const e=(this.connectList||[]).find(e=>e&&Number(e.index)===t);"complete"===(null==e?void 0:e.nodeStatus)&&(null===(a=null===(s=null===(r=null==e?void 0:e.sample_data)||void 0===r?void 0:r[0])||void 0===s?void 0:s.data)||void 0===a?void 0:a.length)>0?this.autoMapRemainingNodes(t+1):this.runNodeTestThenAdvance(t)}}}),setTimeout(()=>{o.done||(o.done=!0,this.runNodeTestThenAdvance(t))},9e4)}waitForAccountThenResume(t,e,n){if(this.destroyed||(void 0===n&&(n=this.mappingChainId),n!==this.mappingChainId))return;const i=(this.connectList||[]).find(e=>e&&Number(e.index)===t);return i&&"account_selected"===i.nodeStatus?(this.addStepMessage(`\u2705 Account connected \u2014 resuming mapping for step ${t+1}.`),void this.autoMapRemainingNodes(t)):e>=180?(this.addAssistantMessage(`I'm still waiting on the account for step ${t+1}. Whenever you've connected it, say **"map fields"** and I'll finish that step.`),void this.scrollToShowQuestionAndAnswer()):void setTimeout(()=>this.waitForAccountThenResume(t,e+1,n),5e3)}runNodeTestThenAdvance(t){this.walkResumeAt=t+1,this.runTestChainStep([t],0,this.mappingChainId,0)}applyFieldMappingsSequentially(t,e,n,i=[]){if(e>=t.length)return i.length>0?(this.addStepMessage(`\ud83d\udd01 Retrying ${i.length} deferred value(s) now that their fields should have loaded...`),void setTimeout(()=>this.applyFieldMappingsSequentially(i,0,n,[]),4e3)):(this.pausedFieldMappings=[],this.pausedFieldMappingIndex=0,this.isProcessing=!1,void(n?n():(this.addAssistantMessage("\u2705 All fields mapped! Running test..."),setTimeout(()=>this.autoRunTest(),1500))));const o=t[e],r=t=>!(!t||t.__deferredOnce||(t.__deferredOnce=!0,i.push(t),0)),s={value:!1},a=setTimeout(()=>{s.value||(s.value=!0,r(o)?this.addAssistantMessage(`\u23f3 **${o.fieldName}** isn't available yet \u2014 I'll retry it after the other values.`):this.addAssistantMessage(`\u26a0\ufe0f Skipping **${o.fieldName}** \u2014 no response while setting it. You can set it manually in the panel.`),this.applyFieldMappingsSequentially(t,e+1,n,i))},6e4);this.setFieldMappingRequest.emit({fieldName:o.fieldName,source:o.value,nodeIndex:o.nodeIndex,targetAppName:"",onResult:c=>{if(!s.value)return s.value=!0,clearTimeout(a),/couldn't find a field/i.test(c)&&r(o)?(this.addAssistantMessage(`\u23f3 **${o.fieldName}** isn't available yet \u2014 I'll retry it after the other values.`),void setTimeout(()=>{this.applyFieldMappingsSequentially(t,e+1,n,i)},1500)):(this.addAssistantMessage(c),c.includes("connect your account")||c.includes("connect it manually")?(this.pausedFieldMappings=t,this.pausedFieldMappingIndex=e,void this.addAssistantMessage("Please connect your account first using the button above. I'll continue configuring fields after.")):void setTimeout(()=>{this.applyFieldMappingsSequentially(t,e+1,n,i)},5e3))}})}activateAfterMapping(){this.isProcessing=!1,this.addAssistantMessage("\u2705 Mapping walk finished! Running each step's test, then activating your connect..."),this.scrollToShowQuestionAndAnswer(),setTimeout(()=>this.runRemainingTestsThenActivate(),1e3)}runRemainingTestsThenActivate(){const t=this.mappingChainId,e=(this.connectList||[]).filter(t=>t&&Number(t.index)>=1&&t.appId).map(t=>Number(t.index)).sort((t,e)=>t-e);0!==e.length?(this.pausedTestChain=null,this.walkResumeAt=null,this.runTestChainStep(e,0,t,0)):this.attemptActivation()}runTestChainStep(t,e,n,i){var o,r,s;if(n!==this.mappingChainId||this.destroyed)return;if(this.draftsInFlight&&i<40)return void setTimeout(()=>this.runTestChainStep(t,e,n,i+1),1500);if(e>=t.length){if(null!=this.walkResumeAt){const t=this.walkResumeAt;return this.walkResumeAt=null,void this.autoMapRemainingNodes(t)}return void this.attemptActivation()}const a=t[e],c=(this.connectList||[]).find(t=>t&&Number(t.index)===a),l=`${(null==c?void 0:c.name)||"Step "+(a+1)}${(null==c?void 0:c.actionNameTitle)?" \u2014 "+c.actionNameTitle:""}`;if("complete"===(null==c?void 0:c.nodeStatus)&&(null===(s=null===(r=null===(o=null==c?void 0:c.sample_data)||void 0===o?void 0:o[0])||void 0===r?void 0:r.data)||void 0===s?void 0:s.length)>0)return this.addStepMessage(`\u2705 Step ${a+1} (**${l}**) already tested \u2014 skipping.`),void this.runTestChainStep(t,e+1,n,0);const d={done:!1},u=i=>{d.done||(d.done=!0,this.isProcessing=!1,this.pausedTestChain={indexes:t,i:e,chainId:n},this.addAssistantMessage(i),this.followUpChips=[{label:"Run test",message:"run test"}],this.scrollToShowQuestionAndAnswer())};this.addStepMessage(`\ud83e\uddea Running test for step ${a+1}: **${l}
1**`),this.runTestRequest.emit({nodeIndex:a,appName:"",nodeType:"action",onMissingFields:(i,o)=>{var r;if(d.done)return;if(d.done=!0,c&&/filter/i.test(String(c.name||c.appName||""))){this.isProcessing=!1,this.pausedTestChain={indexes:t,i:e,chainId:n};const o=this.parseFilterIntent(a);return o?(this.pendingFilterGuess=Object.assign(Object.assign({},o),{nodeIndex:a}),this.addAssistantMessage(`\u2699\ufe0f **${i}** is a Filter step. From your request, the rule looks like:\n\n> **${o.fieldLabel}** ${o.opDisplay}${o.needsValue?` **"${o.value}"**`:""}\n\nTap to apply it and continue \u2014 or set it yourself in the panel on the right, then say **"run test"**.`),this.followUpChips=[{label:"\u2705 Apply filter & run test",message:"__apply_filter_and_test__"},{label:"I'll set it myself",message:"run test"}]):(this.addAssistantMessage(`\u26a0\ufe0f **${i}** is a Filter step \u2014 set the condition in the panel on the right: pick the **field** to check, a **condition** (operator), and a **value** (e.g. "Type equals lead"), then tap **Continue & Run Test** (or say **"run test"**) to continue.`),this.followUpChips=[{label:"Run test",message:"run test"}]),void this.scrollToShowQuestionAndAnswer()}if(c&&!c.__chainRemapTried){c.__chainRemapTried=!0,this.addStepMessage(`\ud83e\udde0 Filling the remaining fields on **${l}** with AI first...`);const i={v:!1},o=()=>{i.v||(i.v=!0,this.runTestChainStep(t,e,n,0))};return this.mapFieldsRequest.emit({nodeIndex:a,targetAppName:"",workflowIntent:((null===(r=this.messages.find(t=>"user"===t.role))||void 0===r?void 0:r.content)||"").slice(0,600),onResult:t=>{},onNeedsTest:()=>o(),onMapped:t=>o()}),void setTimeout(o,6e4)}this.isProcessing=!1,this.pausedTestChain={indexes:t,i:e,chainId:n};const s=o.map(t=>`\u2022 ${t}`).join("\n");this.addAssistantMessage(`\u26a0\ufe0f **${i}** still needs these fields before its test can run:\n\n${s}`),this.scrollToShowQuestionAndAnswer(),this.proposeAutofillPreview(a,o)},onNodeNotFound:t=>u(t),onTestStarted:()=>{const i=o=>{var r,s,c;if(d.done||n!==this.mappingChainId)return;const p=(this.connectList||[]).find(t=>t&&Number(t.index)===a);if((null===(c=null===(s=null===(r=null==p?void 0:p.sample_data)||void 0===r?void 0:r[0])||void 0===s?void 0:s.data)||void 0===c?void 0:c.length)>0&&"complete"===(null==p?void 0:p.nodeStatus))return d.done=!0,this.addStepMessage(`\u2705 Step ${a+1} (**${l}**) test passed.`),void this.runTestChainStep(t,e+1,n,0);o>=45?u(`\u26a0\ufe0f Step ${a+1} (**${l}**) didn't finish its test in time. Check the panel for an error, fix it (or ask me to change a field), then say **"run test"** to continue from this step.`):setTimeout(()=>i(o+1),2e3)};i(0)},onTestComplete:(i,o,r)=>{d.done||(i?(d.done=!0,this.addStepMessage(`\u2705 Step ${a+1} (**${l}**) test passed.`),this.runTestChainStep(t,e+1,n,0)):u(`\u274c Test failed on **${o}
1**.${r?`\n\n> ${r}\n\n`:" "}Fix the field it names (or ask me to change a mapping), then say **"run test"** to continue from this step.`))}}),setTimeout(()=>u(`\u26a0\ufe0f Step ${a+1} (**${l}**) didn't report a result. Say **"run test"** to retry from this step.`),15e4)}attemptActivation(){this.isProcessing=!1,this.pausedTestChain=null,this.addAssistantMessage("\ud83d\ude80 All steps tested! Activating your connect..."),this.scrollToShowQuestionAndAnswer(),setTimeout(()=>{const t={value:!1};this.activateConnectRequest.emit({activate:!0,onIncomplete:e=>{t.value=!0,this.isProcessing=!1,this.addAssistantMessage(`\u26a0\ufe0f Cannot activate yet \u2014 these steps still need setup:\n\n${e}\n\nSay **"run test"** and I'll finish them.`),this.scrollToShowQuestionAndAnswer()}}),setTimeout(()=>{t.value||(this.isProcessing=!1,this.addAssistantMessage("\ud83c\udf89 Your connect is live! It will now run automatically."),this.followUpChips=[{label:"Add Action App",message:"add a new action step"},{label:"What's mapped",message:"what's mapped"},{label:"Dashboard",message:"go to dashboard"}],this.scrollToShowQuestionAndAnswer())},2e3)},1e3)}autoRunTest(){if(this.isProcessing=!1,this.pausedTestChain){const{indexes:t,i:e}=this.pausedTestChain;return this.pausedTestChain=null,this.addAssistantMessage(`\u25b6\ufe0f Continuing the tests from step ${t[e]+1}...`),this.scrollToShowQuestionAndAnswer(),void this.runTestChainStep(t,e,this.mappingChainId,0)}this.runTestRequest.emit({nodeIndex:null,appName:"",nodeType:"trigger",onMissingFields:(t,e)=>{this.isProcessing=!1;const n=e.map(t=>`\u2022 ${t}`).join("\n");this.addAssistantMessage(`\u26a0\ufe0f **${t}** still needs these fields before testing:\n\n${n}`),this.scrollToShowQuestionAndAnswer()},onNodeNotFound:t=>{this.isProcessing=!1,this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onTestStarted:t=>{this.isProcessing=!1,this.addAssistantMessage(`\ud83d\udd04 Running test for **${t}**...`),this.scrollToShowQuestionAndAnswer()},onTestComplete:(t,e,n)=>{this.isProcessing=!1,t?(this.addAssistantMessage("\u2705 Trigger test passed! Running each action step's test next..."),this.scrollToShowQuestionAndAnswer(),setTimeout(()=>this.runRemainingTestsThenActivate(),1e3)):(this.addAssistantMessage(`\u274c Test failed for **${e}**.${n?`\n\n> ${n}\n\n`:" "}Fix the issue (or ask me to change a field) and say **"run test"** again.`),this.followUpChips=[{label:"What's mapped",message:"what's mapped"},{label:"Run test again",message:"run test"}],this.scrollToShowQuestionAndAnswer())}})}resumePausedFieldMappings(){if(this.pausedFieldMappings.length>0){const t=this.pausedFieldMappings,e=this.pausedFieldMappingIndex;this.pausedFieldMappings=[],this.pausedFieldMappingIndex=0,this.addAssistantMessage("Account connected! Resuming field configuration..."),setTimeout(()=>{this.applyFieldMappingsSequentially(t,e)},3e3)}}fetchTaskHistory(t){this.isFetchingHistory=!0;const e=this.customerService.GetCurrent();if(!(null==e?void 0:e.customerId))return this.addErrorMessage("Please sign in to view task history."),void(this.isFetchingHistory=!1);const n={customerId:e.customerId,skip:0,limit:t.count||5};"success"===t.status?n.status=!0:"failed"===t.status&&(n.status=!1),t.dateRange&&"all"!==t.dateRange&&(n.connectDateValue=t.dateRange),this.customerConnectService.getUserTaskHistory(n).subscribe({next:e=>{var n;if(!e||0===e.length)return this.addAssistantMessage("No task history found for the selected criteria."),void(this.isFetchingHistory=!1);const i=e.map(t=>{var e,n,i;return{title:(null===(e=t.connect_trigger)||void 0===e?void 0:e.connectTitle)||"Untitled Connect",connectId:t.connectId||(null===(n=t.connect_trigger)||void 0===n?void 0:n.connectId)||"",status:!0===t.status?"Success":!1===t.status?t.numberOfTask>0?"Partial":"Failed":"Unknown",taskCount:t.numberOfTask||0,date:t._created_at?new Date(t._created_at).toLocaleString():"N/A",comment:t.messageSort||t.message||"",apps:(null===(i=t.connect_trigger)||void 0===i?void 0:i.apps)||[]}}),o="all"===t.status?"":t.status,r="all"===t.dateRange?"":` from ${null===(n=t.dateRange)||void 0===n?void 0:n.replace(/_/g," ")}`,s=`Here are your ${i.length} ${o} task(s)${r}:`;this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:s,timestamp:new Date,status:"complete",taskHistory:i}),this.isFetchingHistory=!1,this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation()},error:()=>{this.addErrorMessage("Failed to fetch task history. Please try again."),this.isFetchingHistory=!1}})}fetchLinkedAccounts(){this.customerConnectService.getUserConnectedAccounts().subscribe({next:t=>{const e=(null==t?void 0:t.userConnectedAccount)||[];if(0===e.length)return this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:"You don't have any linked accounts yet. You can authorize your apps from this page.",timestamp:new Date,status:"complete"}),this.scrollToShowQuestionAndAnswer(),void this.autoSaveConversation();const n=e.map(t=>({appName:t.appName||t.name||"Unknown App",email:t.email||t.accountName||"",status:!1!==t.isActive?"Active":"Expired"})),i=`You have ${n.length} linked account(s):\n\n`+n.map((t,e)=>`${e+1}. **${t.appName}** \u2014 ${t.email} (${t.status})`).join("\n");this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:i,timestamp:new Date,status:"complete"}),this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation()},error:()=>{this.addErrorMessage("Failed to fetch linked accounts. Please try again.")}})}fetchTeamMembers(){this.messages.push({id:`msg-${Date.now()}
1`,role:"assistant",content:"I've navigated you to the User Management page where you can view and manage your team members, roles, and permissions.",timestamp:new Date,status:"complete"}),this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation()}fetchTools(){this.customerService.getMcpActions().subscribe({next:t=>{if(!t||0===t.length)return this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:"No tools configured yet. You can set up API tools, webhooks, or custom tools from this page.",timestamp:new Date,status:"complete"}),this.scrollToShowQuestionAndAnswer(),void this.autoSaveConversation();const e=t.map(t=>({name:t.name||t.toolName||"Unnamed Tool",type:t.type||t.toolType||"Custom",status:!1!==t.isActive?"Active":"Inactive"})),n=`You have ${e.length} tool(s) configured:\n\n`+e.map((t,e)=>`${e+1}. **${t.name}** \u2014 ${t.type} (${t.status})`).join("\n");this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:n,timestamp:new Date,status:"complete"}),this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation()},error:()=>{this.addErrorMessage("Failed to fetch tools. Please try again.")}})}fetchFoldersAction(){this.folderService.getFolders({pageSize:100}).subscribe({next:t=>{var e;const n=t&&(t.folders||(null===(e=t.data)||void 0===e?void 0:e.folders))||[];if(!n.length)return this.addAssistantMessage('You don\'t have any folders yet. Say "create folder X" to make one.'),void this.scrollToShowQuestionAndAnswer();const i=`You have ${n.length} folder(s):\n\n`+n.map((t,e)=>`${e+1}. **${t.folderName||"(unnamed)"}**`).join("\n");this.addAssistantMessage(i),this.scrollToShowQuestionAndAnswer()},error:()=>this.addErrorMessage("Failed to fetch folders. Please try again.")})}navigateAndPushBack(t){this.router.url.toLowerCase()!==t.toLowerCase()&&(this.navHistory.push(this.router.url),this.router.navigateByUrl(t))}resolveFolderByName(t){const e=(t||"").trim();return e?this.folderService.getFolders({searchTXT:e,pageSize:20}).pipe((0,Uo.U)(t=>{var n;const i=t&&(t.folders||(null===(n=t.data)||void 0===n?void 0:n.folders))||[];return i.find(t=>(t.folderName||"").toLowerCase()===e.toLowerCase())||i[0]||null}),(0,$l.K)(()=>(0,Tr.of)(null)),(0,ts.w)(t=>{if(t&&t._id)return(0,Tr.of)(t);const n=e.replace(/\s+folder\s*$/i,"").trim();return n&&n.toLowerCase()!==e.toLowerCase()?this.folderService.getFolders({searchTXT:n,pageSize:20}).pipe((0,Uo.U)(t=>{var e;const i=t&&(t.folders||(null===(e=t.data)||void 0===e?void 0:e.folders))||[];return i.find(t=>(t.folderName||"").toLowerCase()===n.toLowerCase())||i[0]||null}),(0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null)})):(0,Tr.of)(null)}goToFolderAction(t,e){t?this.navigateAndPushBack("/folders/"+t):e?this.resolveFolderByName(e).subscribe(t=>{t&&t._id?this.navigateAndPushBack("/folders/"+t._id):(this.addAssistantMessage(`I couldn't find a folder named **${e}**. Say "show my folders" to see what's available.`),this.scrollToShowQuestionAndAnswer())}):this.navigateAndPushBack("/folders")}resolveConnectIdForMove(t,e){var n;return t?(0,Tr.of)(t):!e&&(null===(n=this.currentApp)||void 0===n?void 0:n.triggerId)?(0,Tr.of)(this.currentApp.triggerId):e?this.folderService.searchConnects(e).pipe((0,Uo.U)(t=>{var n;const i=t&&(t.connects||(null===(n=t.data)||void 0===n?void 0:n.connects)||t.data)||[],o=i.find(t=>(t.connectName||t.name||"").toLowerCase()===e.toLowerCase())||i[0];return o&&(o._id||o.connectId||o.id)||null}),(0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null)}moveConnectToFolderAction(t){const e=t.connectName||"",n=t.folderName||"";(0,qo.D)({connectId:this.resolveConnectIdForMove(t.connectId||"",e),folder:t.folderId?(0,Tr.of)({_id:t.folderId,folderName:n||""}):n?this.resolveFolderByName(n):(0,Tr.of)(null)}).subscribe(({connectId:t,folder:i})=>t?i&&i._id?void this.folderService.moveConnectToFolder({connectId:t,folderId:i._id}).subscribe({next:()=>{this.folderService.notifyFolderChanged(),this.addAssistantMessage(`Moved the connect to **${i.folderName||n||"the folder"}**.`),this.scrollToShowQuestionAndAnswer();const t="/folders/"+i._id;this.router.url.toLowerCase()!==t.toLowerCase()&&this.navigateAndPushBack(t)},error:()=>this.addErrorMessage("Failed to move the connect. Please try again.")}):(this.addAssistantMessage(`I couldn't find a folder${n?" named **"+n+"**":""}. Say "show my folders" to see what's available, or "create folder ${n||"X"}" to make one.`),void this.scrollToShowQuestionAndAnswer()):(this.addAssistantMessage(e?`I couldn't find a connect named **${e}**.`:'Tell me which connect to move (e.g. "move Gmail to Slack into Marketing").'),void this.scrollToShowQuestionAndAnswer()))}createFolderAction(t){const e=(t.name||"").trim();if(!e)return this.addAssistantMessage("What should I name the folder?"),void this.scrollToShowQuestionAndAnswer();
1const n=t.parentFolderName||"";(t.parentFolderId?(0,Tr.of)({_id:t.parentFolderId,folderName:n}):n?this.resolveFolderByName(n):(0,Tr.of)(null)).subscribe(t=>{if(n&&(!t||!t._id))return this.addAssistantMessage(`I couldn't find a parent folder named **${n}**. Creating **${e}** at the top level instead is also fine \u2014 say "create folder ${e}" to do that.`),void this.scrollToShowQuestionAndAnswer();const i={folderName:e};t&&t._id&&(i.parentFolderId=t._id),this.folderService.createFolder(i).subscribe({next:()=>{this.folderService.notifyFolderChanged(),this.addAssistantMessage(`Created folder **${e}**${t&&t._id?` under **${t.folderName||n}**`:""}.`),this.scrollToShowQuestionAndAnswer();const i=t&&t._id?"/folders/"+t._id:"/folders";this.router.url.toLowerCase()!==i.toLowerCase()&&this.navigateAndPushBack(i)},error:()=>this.addErrorMessage("Failed to create the folder. Please try again.")})})}fetchFavoritesAction(){this.folderService.getFavorites().subscribe({next:t=>{var e;const n=t&&(t.favorites||(null===(e=t.data)||void 0===e?void 0:e.favorites))||[];if(!n.length){this.addAssistantMessage('You don\'t have any favorites yet. Say "favorite [folder or connect name]" to add one.'),this.scrollToShowQuestionAndAnswer();const t="/folders";return void(this.router.url.toLowerCase()!==t.toLowerCase()&&this.navigateAndPushBack(t))}const i=n.filter(t=>"folder"===t.itemType).map(t=>t.itemId),o=n.filter(t=>"connect"===t.itemType).map(t=>t.itemId),r=i.length?(0,qo.D)(i.map(t=>this.folderService.getFolderById(t).pipe((0,Uo.U)(e=>{var n;return{id:t,name:(null===(n=null==e?void 0:e.folder)||void 0===n?void 0:n.folderName)||(null==e?void 0:e.folderName)||"(unnamed folder)"}}),(0,$l.K)(()=>(0,Tr.of)({id:t,name:"(unknown folder)"}))))):(0,Tr.of)([]),s=o.length?this.folderService.getConnectsByIds(o).pipe((0,Uo.U)(t=>{var e;return(t&&(t.connects||(null===(e=t.data)||void 0===e?void 0:e.connects))||[]).map(t=>({id:t.connectId||t._id,name:t.connectTitle||t.name||"(unnamed connect)"}))}),(0,$l.K)(()=>(0,Tr.of)([]))):(0,Tr.of)([]);(0,qo.D)({folders:r,connects:s}).subscribe(({folders:t,connects:e})=>{const i=[];t.length&&i.push("**Folders:**\n"+t.map((t,e)=>`${e+1}. ${t.name}`).join("\n")),e.length&&i.push("**Connects:**\n"+e.map((t,e)=>`${e+1}. ${t.name}`).join("\n")),this.addAssistantMessage(i.length?`You have ${t.length+e.length} item(s) in your favorites:\n\n`+i.join("\n\n")+'\n\nSay "unfavorite X" to remove one, or "favorite [name]" to add another.':`You have ${n.length} item(s) in favorites, but I couldn't load their details right now.`),this.scrollToShowQuestionAndAnswer();const o="/folders";this.router.url.toLowerCase()!==o.toLowerCase()&&this.navigateAndPushBack(o)})},error:()=>this.addErrorMessage("Failed to fetch your favorites. Please try again.")})}toggleFavoriteAction(t){const e="connect"===t.itemType?"connect":"folder",n="remove"===t.intent?"remove":"add",i=(t.itemName||"").trim();(t.itemId?(0,Tr.of)({id:t.itemId,displayName:i||("folder"===e?"the folder":"the connect")}):"folder"===e?this.resolveFolderByName(i).pipe((0,Uo.U)(t=>({id:(null==t?void 0:t._id)||null,displayName:(null==t?void 0:t.folderName)||i||"the folder"}))):this.resolveConnectIdForMove("",i).pipe((0,Uo.U)(t=>({id:t,displayName:i||"the connect"})))).subscribe(({id:t,displayName:o})=>{if(!t)return this.addAssistantMessage(i?`I couldn't find a ${"folder"===e?"folder":"connect"} named **${i}**.`:"connect"===e?"Tell me which connect to favorite (open one in the editor, or give me its name).":"Tell me which folder to favorite."),void this.scrollToShowQuestionAndAnswer();this.folderService.getFavorites().pipe((0,$l.K)(()=>(0,Tr.of)({favorites:[]}))).subscribe(i=>{var r;const s=(i&&(i.favorites||(null===(r=i.data)||void 0===r?void 0:r.favorites))||[]).some(n=>{const i=n&&(n.itemId===t||n._id===t),o=!(null==n?void 0:n.itemType)||String(n.itemType).toLowerCase()===String(e).toLowerCase();return i&&o});return"add"===n&&s?(this.addAssistantMessage(`**${o}** is already in your favorites.`),void this.scrollToShowQuestionAndAnswer()):"remove"!==n||s?void this.folderService.toggleFavorite(t,e).subscribe({next:t=>
1{this.folderService.notifyFolderChanged({action:"refresh"});const e=!!(null==t?void 0:t.isFavorite);this.addAssistantMessage(`${e?"Added":"Removed"} **${o}** ${e?"to":"from"} favorites.`),this.scrollToShowQuestionAndAnswer()},error:()=>this.addErrorMessage("Failed to update favorites. Please try again.")}):(this.addAssistantMessage(`**${o}** isn't in your favorites \u2014 nothing to remove.`),void this.scrollToShowQuestionAndAnswer())})})}removeConnectFromFolderAction(t){const e=t.connectName||"";this.resolveConnectIdForMove(t.connectId||"",e).subscribe(t=>{if(!t)return this.addAssistantMessage(e?`I couldn't find a connect named **${e}**.`:"Tell me which connect to remove (paste the connect id or its name)."),void this.scrollToShowQuestionAndAnswer();this.folderService.getConnectsByIds([t]).pipe((0,$l.K)(()=>(0,Tr.of)({connects:[]}))).subscribe(e=>{const n=((null==e?void 0:e.connects)||[])[0],i=(null==n?void 0:n.folderId)||"";if(!i)return this.addAssistantMessage("This connect isn't inside any folder \u2014 it's already at the top level."),void this.scrollToShowQuestionAndAnswer();(0,qo.D)({folder:this.folderService.getFolderById(i).pipe((0,$l.K)(()=>(0,Tr.of)(null))),move:this.folderService.moveConnectToFolder({connectId:t,folderId:null})}).subscribe({next:({folder:t})=>{var e;this.folderService.notifyFolderChanged({action:"refresh"});const n=(null===(e=null==t?void 0:t.folder)||void 0===e?void 0:e.folderName)||"";this.addAssistantMessage(`Removed the connect from its folder${n?` **${n}**`:""}. It's now back at the top level.`),this.scrollToShowQuestionAndAnswer();const i="/folders";this.router.url.toLowerCase()!==i.toLowerCase()&&this.navigateAndPushBack(i)},error:()=>this.addErrorMessage("Failed to remove the connect from the folder. Please try again.")})})})}deleteFolderAction(t){if(!t.confirmed)return;const e=t.folderName||"";(t.folderId?(0,Tr.of)({_id:t.folderId,folderName:e}):e?this.resolveFolderByName(e):(0,Tr.of)(null)).subscribe(t=>{if(!t||!t._id)return this.addAssistantMessage(`I couldn't find a folder${e?" named **"+e+"**":""}. Say "show my folders" to see what's available.`),void this.scrollToShowQuestionAndAnswer();this.folderService.moveFolderToTrash(t._id).subscribe({next:()=>{this.folderService.notifyFolderChanged({action:"delete",_id:t._id}),this.addAssistantMessage(`Folder **${t.folderName||e}** has been deleted and moved to trash. You can restore it from the Trash section anytime.`),this.scrollToShowQuestionAndAnswer()},error:()=>this.addErrorMessage("Failed to delete the folder. Please try again.")})})}createFolderAndMoveConnectAction(t){const e=(t.folderName||"").trim(),n=t.connectName||"";if(!e)return this.addAssistantMessage("What should I name the folder?"),void this.scrollToShowQuestionAndAnswer();this.resolveConnectIdForMove(t.connectId||"",n).subscribe(t=>{if(!t)return this.addAssistantMessage(n?`I couldn't find a connect named **${n}**.`:"I can't tell which connect to move \u2014 open a connect in the editor first, or say the connect's name (e.g. \"move Gmail to Slack into Marketing\")."),void this.scrollToShowQuestionAndAnswer();this.folderService.createFolder({folderName:e}).subscribe({next:n=>{var i;this.folderService.notifyFolderChanged();const o=n&&(n.folder||(null===(i=n.data)||void 0===i?void 0:i.folder)),r=o&&(o._id||o.id);if(!r)return this.addAssistantMessage(`Created folder **${e}** \u2014 but I couldn't read its id back, so the connect wasn't moved. You can drag it in from the folders page.`),void this.scrollToShowQuestionAndAnswer();this.folderService.moveConnectToFolder({connectId:t,folderId:r}).subscribe({next:()=>{this.folderService.notifyFolderChanged(),this.addAssistantMessage(`Created folder **${e}** and moved the connect into it.`),this.scrollToShowQuestionAndAnswer();const t="/folders/"+r;this.router.url.toLowerCase()!==t.toLowerCase()&&this.navigateAndPushBack(t)},error:()=>this.addErrorMessage(`Folder **${e}** was created, but moving the connect failed. Try again from the folders page.`)})},error:()=>this.addErrorMessage("Failed to create the folder. Please try again.")})})}addNodeWithOptionalApp(t){const{appName:e,eventName:n}=t;let{afterNodeIndex:i}=t;const o=(this.connectList||[]).filter(t=>t&&Object.keys(t).length>0).map(t=>Number(t.index));null!=i&&!o.includes(Number(i))&&(i=null);const r=new Set(o);if(this.addNodeRequest.emit({afterNodeIndex:i}),!e)return;const s=Date.now(),a=()=>{const t=(this.connectList||[]).find(t=>t&&Object.keys(t).length>0&&!r.has(Number(t.index)));t?this.setupAppFromChat({appName:e,nodeType:"action",eventName:n,nodeIndex:Number(t.index)}):Date.now()-s<5e3?setTimeout(a,200):this.addAssistantMessage(`I added the step but couldn't auto-configure **${e}**. Please click the new node and pick it manually.`)};setTimeout(a,200)}setupAppFromChat(t){var e,n,i,o;if(!(null==t?void 0:t.appName))return;this.isSettingUpApp=!0;const r="trigger"===t.nodeType;let s=null;if(null!=t.nodeIndex&&(s=null===(e=this.connectList)||void 0===e?void 0:e.find(e=>(null==e?void 0:e.index)==t.nodeIndex),!s))return this.addAssistantMessage(`I couldn't find a step at position ${t.nodeIndex+1}. This workflow has ${(null===(n=this.connectList)||void 0===n?void 0:n.length)||0} step(s).`),void(this.isSettingUpApp=!1);if(!s&&t.targetAppName){const e=t.targetAppName.toLowerCase().replace(/\s+/g,""),n=(this.connectList||[]).filter(t=>{if(!(null==t?void 0:t.appId))return!1;const n=(t.name||"").toLowerCase().replace(/\s+/g,"");return n===e||n.includes(e)});if(1===n.length)s=n[0];else{if(!(n.length>1))return this.addAssistantMessage(`I couldn't find a **${t.targetAppName}** step in this workflow. Please check the name or tell me which step to change.`),void(this.isSettingUpApp=!1);{const e=this.currentApp?n.find(t=>t.index==this.currentApp.index):null;if(!e){const e=n.map(t=>`\u2022 ${0===t.index?"Trigger":"Action"}: ${t.name}${t.actionNameTitle?" \u2014 "+t.actionNameTitle:""}`).join("\n");return this.addAssistantMessage(`There are multiple **${t.targetAppName}** steps. Which one should I change to **${t.appName}**?\n\n${e}\n\nYou can say e.g. "change ${t.targetAppName} trigger to ${t.appName}" or name the event.`),void(this.isSettingUpApp=!1)}s=e}}}if(!s&&r&&(s=null===(i=this.connectList)||void 0===i?void 0:i.find(t=>0===t.index)),!s&&!r)if(this.currentApp&&this.currentApp.index>=1)s=null===(o=this.connectList)||void 0===o?void 0:o.find(t=>t.index==this.currentApp.index);else{const e=(this.connectList||[]).filter(t=>(null==t?void 0:t.index)>=1);if(1===e.length)s=e[0];else if(e.length>1){const n=e.map(t=>"\u2022 "+(t.appId?`${t.name}${t.actionNameTitle?" \u2014 "+t.actionNameTitle:""}`:"Empty action step")).join("\n");return this.addAssistantMessage(`There are multiple action steps. Which one should I change to **${t.appName}**?\n\n${n}\n\nYou can say e.g. "change slack to ${t.appName}" or "change the second action to ${t.appName}".`),void(this.isSettingUpApp=!1)}}if(!s)return this.addAssistantMessage(r?"I couldn't find a trigger node in this workflow.":`There is no action step yet. Would you like me to add one and set ${t.appName} on it? Just say "add an action step".`),void(this.isSettingUpApp=!1);const a=s.nodeId,c=s.index,l=0===c?"trigger":"action";this.commonService.getAppsCustom(l,"copilot").subscribe({next:e=>{const n=(null==e?void 0:e.apps_list)||[];let i=n.find(e=>this.appMatchesName(e,t.appName,!0));if(!i){const e=n.filter(e=>this.appMatchesName(e,t.appName,!1));if(1!==e.length){if(e.length>
11){let n=`I found multiple apps matching "${t.appName}". Which one would you like to use?\n\n`;return e.forEach((t,e)=>{n+=`${e+1}. **${t.displayName}**\n`}),n+="\nPlease select the app you want to use.",this.addAssistantMessage(n),this.followUpChips=e.slice(0,4).map(t=>({label:t.displayName,message:`change ${l} to ${t.displayName}`})),this.scrollToShowQuestionAndAnswer(),void(this.isSettingUpApp=!1)}return this.addAssistantMessage(`I couldn't find any app matching "${t.appName}". Please check the name and try again.`),this.scrollToShowQuestionAndAnswer(),void(this.isSettingUpApp=!1)}i=e[0]}this.customerConnectService.updateUserConnectBy_Id(a,{appId:i.appId,image:i.image,displayName:i.displayName,nodeStatus:"app_selected",actionName:{title:"",desc:""},auth:{},editOptions:{},test_data:{},sample_data:[],fields_error:"",connected_account_id:""}).subscribe({next:()=>{this.commonService.getAppOptionsByAppId(i.appId,{type:l}).subscribe({next:e=>{var n,o;const r=null==e?void 0:e.app_options,d="trigger"===l?Array.isArray(r)?r:[]:(null==r?void 0:r.action)||[];if(!d||0===d.length)return this.emitAppSetup(i,null,null,s),this.addAssistantMessage(`${i.displayName} has been added but no events are available for it.`),void(this.isSettingUpApp=!1);let u=d[0],p=!1;if(t.eventName){const e=d.find(e=>{var n,i;return(null===(n=e.trigger_action_name)||void 0===n?void 0:n.toLowerCase())===t.eventName.toLowerCase()||(null===(i=e.trigger_action_displayname)||void 0===i?void 0:i.toLowerCase())===t.eventName.toLowerCase()})||d.find(e=>{var n,i;return(null===(n=e.trigger_action_name)||void 0===n?void 0:n.toLowerCase().includes(t.eventName.toLowerCase()))||(null===(i=e.trigger_action_displayname)||void 0===i?void 0:i.toLowerCase().includes(t.eventName.toLowerCase()))});e?u=e:p=!0}s._requestedEventName=t.eventName,s._eventFallbackUsed=p;let h="polling",g="NA";if(0===c)if(h="webhook"===u.triggerType?"webhook":"polling","webhook"===h){const t=(null===(n=i.credential)||void 0===n?void 0:n.urlName)||(null===(o=i.name)||void 0===o?void 0:o.split(" ").join("").toLowerCase());g={subscribe:`${t}/${u.subscribeHookFunction}`},u.unsubscribeHookFunction&&(g.unsubscribe=`${t}/${u.unsubscribeHookFunction}`)}else"webhookUrl"===u.triggerType&&(h="webhookUrl",g="NA");this.customerConnectService.updateUserConnectBy_Id(a,{nodeStatus:"ta_selected",actionName:{title:u.trigger_action_name,desc:u.desc,display_title:u.trigger_action_displayname},nodeType:"action"===u.type?"actions":u.type,sample_data:[],editOptions:{},fields_error:"",triggerType:h,webhook_functions:g}).subscribe({next:()=>{this.customerConnectService.getUserConnectedAccountByAppId(i.appId).subscribe({next:t=>{const e=(null==t?void 0:t.userConnectedAccount)||[],n=e.length>0;this.emitAppSetup(i,u,n?e[0]:null,s);const o=u.trigger_action_displayname||u.trigger_action_name,r=s._eventFallbackUsed?` (I couldn't find "${s._requestedEventName}", so I picked the first available event "${o}" \u2014 let me know if you want a different one.)`:"";this.addAssistantMessage(n?`Done! I've set up ${i.displayName} with "${o}" and connected your existing account.${r}`:`I've set up ${i.displayName} with "${o}". You'll need to connect your ${i.displayName} account to continue \u2014 click the account section in the editor.${r}`),this.isSettingUpApp=!1},error:()=>{this.emitAppSetup(i,u,null,s),this.addAssistantMessage(`${i.displayName} is set up with "${u.trigger_action_displayname||u.trigger_action_name}". Please connect your account to continue.`),this.isSettingUpApp=!1}})},error:()=>{this.addErrorMessage("Failed to set the event. Please try again."),this.isSettingUpApp=!1}})},error:()=>{this.emitAppSetup(i,null,null,s),this.addAssistantMessage(`${i.displayName} has been added but I couldn't load events. Please select an event manually.`),this.isSettingUpApp=!1}})},error:()=>{this.addErrorMessage("Failed to set up the app. Please try again."),this.isSettingUpApp=!1}})},error:()=>{this.addErrorMessage("Failed to fetch apps. Please try again."),this.isSettingUpApp=!1}})}listAppEventsFromChat(t){if(!(null==t?void 0:t.appName))return void this.addAssistantMessage('Which app would you like to list events for? For example: "list gmail events".');const e=t.nodeType||"both",n=t=>this.commonService.getAppsCustom(t,"copilot");n("trigger").subscribe({next:i=>{const o=(null==i?void 0:i.apps_list)||[],r=t=>{this.commonService.getAppOptionsByAppId(t.appId,{type:"trigger"}).subscribe({next:n=>{const i=Array.isArray(null==n?void 0:n.app_options)?n.app_options:[];this.commonService.getAppOptionsByAppId(t.appId,{type:"action"}).subscribe({next:n=>{var o,r;const s=[...(null===(o=null==n?void 0:n.app_options)||void 0===o?void 0:o.action)||[],...(null===(r=null==n?void 0:n.app_options)||void 0===r?void 0:r.search)||[]];this.renderAppEvents(t.displayName,i,s,e)},error:()=>{this.renderAppEvents(t.displayName,i,[],e)}})},error:()=>
1{this.addAssistantMessage(`Couldn't load events for ${t.displayName}. Please try again.`)}})},s=e=>{let n=`I found multiple apps matching "${t.appName}". Which one would you like to see events for?\n\n`;e.forEach((t,e)=>{n+=`${e+1}. **${t.displayName}**\n`}),n+="\nPlease select the app you want.",this.addAssistantMessage(n),this.followUpChips=e.slice(0,4).map(t=>({label:t.displayName,message:`show ${t.displayName} events`})),this.scrollToShowQuestionAndAnswer()};let a=o.find(e=>this.appMatchesName(e,t.appName,!0));if(a)r(a);else{const e=o.filter(e=>this.appMatchesName(e,t.appName,!1));1===e.length?r(e[0]):e.length>1?s(e):n("action").subscribe({next:e=>{const n=(null==e?void 0:e.apps_list)||[],i=n.find(e=>this.appMatchesName(e,t.appName,!0));if(i)return void r(i);const a=n.filter(e=>this.appMatchesName(e,t.appName,!1));if(1===a.length)r(a[0]);else if(a.length>1)s(a);else{const e=[...o,...n].filter(e=>this.appMatchesName(e,t.appName,!1));e.length>0?s(e):(this.addAssistantMessage(`I couldn't find any app matching "${t.appName}". Please check the name and try again.`),this.scrollToShowQuestionAndAnswer())}},error:()=>{this.addAssistantMessage(`I couldn't find any app matching "${t.appName}". Please check the name and try again.`),this.scrollToShowQuestionAndAnswer()}})}},error:()=>{this.addAssistantMessage("Failed to fetch apps. Please try again.")}})}renderAppEvents(t,e,n,i){const o=t=>t.map(t=>`\u2022 **${t.trigger_action_displayname||t.trigger_action_name}**${t.desc?" \u2014 "+t.desc:""}`).join("\n"),r=[];("trigger"===i||"both"===i)&&(e.length?r.push(`**${t} \u2014 Triggers (${e.length})**\n${o(e)}`):"trigger"===i&&r.push(`**${t}** has no triggers available.`)),("action"===i||"both"===i)&&(n.length?r.push(`**${t} \u2014 Actions (${n.length})**\n${o(n)}`):"action"===i&&r.push(`**${t}** has no actions available.`)),0!==r.length?(this.addAssistantMessage(r.join("\n\n")),this.scrollToShowQuestionAndAnswer()):this.addAssistantMessage(`No events found for ${t}.`)}extractDropdownSelectionValue(t){if(!t)return null;const e=t.trim();if(!e||/\b(run|test|execute|trigger|map\s+fields?|auto\s*map|ai\s*map|clear|unset|delete|remove|add|create|build|navigate|go\s+to|show|list|what(?:'s|s)?|how|why|when|where|explain|help|fetch|reload|change\s+app|change\s+trigger|change\s+action|setup|set\s+up)\b/i.test(e))return null;const n=[/^(?:please\s+)?(?:select|pick|use|choose|go\s+with)\s+(?:value\s+of\s+|the\s+|that\s+)?(.+)$/i,/^use\s+value\s+(.+)$/i];for(const i of n){const t=i.exec(e);if(t&&t[1]){const e=t[1].trim().replace(/^["']|["']$/g,"");if(e.length>0)return e}}return null}listAvailableVariablesFromChat(t){var e;if(!(null===(e=this.connectList)||void 0===e?void 0:e.length))return void this.addAssistantMessage("No workflow is open.");let n;if(null!=t)n=t;else if(this.currentApp&&this.currentApp.index>=1)n=this.currentApp.index;else{const t=this.connectList.filter(t=>(null==t?void 0:t.index)>=1&&(null==t?void 0:t.appId));if(0===t.length)return void this.addAssistantMessage("There are no action steps yet. Add one first, then I can show you the upstream variables available for mapping.");n=t[t.length-1].index}const i=this.buildAvailableVariablesString(n);i?(this.addAssistantMessage(`Available variables you can map into this step:\n\n${i}`),this.scrollToShowQuestionAndAnswer()):this.addAssistantMessage("There are no upstream steps above this one, so no variables are available yet.")}buildAvailableVariablesString(t){var e,n;const i=this.connectList.filter(e=>(null==e?void 0:e.index)<t&&(null==e?void 0:e.appId));if(0===i.length)return null;const o=[];for(const r of i){const t=0===r.index?"Trigger":`Action ${r.index}`,i=null===(n=null===(e=null==r?void 0:r.sample_data)||void 0===e?void 0:e[0])||void 0===n?void 0:n.data;if(!Array.isArray(i)||0===i.length){o.push(`**${t} \u2014 ${r.name}${r.actionNameTitle?" ("+r.actionNameTitle+")":""}**\n_No sample data yet \u2014 run its test first to fetch fields._`);continue}const s=i.slice(0,40).map(t=>`\u2022 **${t.text||t.key||t.label||""}**${null!=t.value&&String(t.value).length?` \u2014 example: \`${String(t.value).substring(0,60)}\``:""}`),a=i.length>40?`\n\u2026and ${i.length-40} more`:"";o.push(`**${t} \u2014 ${r.name}${r.actionNameTitle?" ("+r.actionNameTitle+")":""}**\n${s.join("\n")}${a}`)}return o.join("\n\n")}
1oxford(t){const e=(t||[]).filter(Boolean);return 0===e.length?"":1===e.length?e[0]:2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}hasUpstreamData(t){return this.connectList.some(e=>{var n,i;return(null==e?void 0:e.index)<t&&(null==e?void 0:e.appId)&&Array.isArray(null===(i=null===(n=null==e?void 0:e.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)&&e.sample_data[0].data.length>0})}onMapNeedsTest(t){this.addAssistantMessage('Before I can map, I need sample data from the trigger. Run the trigger test to fetch it, then say **"map"** again \u2014 I\'ll take it from there.'),this.followUpChips=[{label:"Run trigger test",message:"run test"},{label:"What variables are available",message:"what variables are available"}],this.scrollToShowQuestionAndAnswer()}onMapCompleted(t){const e=(null==t?void 0:t.mappedCount)||0,n=(null==t?void 0:t.totalRequired)||0,i=(null==t?void 0:t.missingLabels)||[],o=(null==t?void 0:t.missingFields)||[],r=null==t?void 0:t.targetIndex;if(0===n)return this.addAssistantMessage('This step has no required fields \u2014 nothing to map. Say **"run test"** when ready.'),this.followUpChips=[{label:"Run test",message:"run test"}],void this.scrollToShowQuestionAndAnswer();if(e===n)return this.addAssistantMessage(`\u2705 AI Mapping done \u2014 all ${n} required field(s) are set. Review them in the panel, then say **"run test"** when ready.`),this.followUpChips=[{label:"Run test",message:"run test"},{label:"What's mapped",message:"what's mapped"}],void this.scrollToShowQuestionAndAnswer();const s=t=>"select"===t.type||"nestedSelect"===t.type,a=o.filter(t=>!s(t)),c=o.filter(t=>s(t)),l=[0===e?`AI Mapping couldn't confidently match ${this.oxford(i)}. No problem \u2014 here's how to finish quickly:`:`AI Mapping set ${e} of ${n} field(s). Still open: ${this.oxford(i)}. Here's how to finish:`],d=a.length>0&&void 0!==r&&this.hasUpstreamData(r);d&&l.push(`I'll pre-fill ${this.oxford(a.map(t=>"**"+t.label+"**"))} with a starter draft built from your trigger data \u2014 review and tweak it in the panel (or say "clear ${a[0].label}" to remove).`),c.length>0&&l.push(`For ${this.oxford(c.map(t=>"**"+t.label+"**"))}, pick a value \u2014 say **"show options for ${c[0].label}"**.`);const u=void 0!==r?this.buildAvailableVariablesString(r):null;u&&l.push(`**Available variables:**\n${u}`),this.addAssistantMessage(l.join("\n\n"));const p=[];c.length>0&&p.push({label:`Options for ${c[0].label}`,message:`show options for ${c[0].label}`}),p.push({label:"What variables",message:"what variables are available"}),p.push({label:"Run test",message:"run test"}),this.followUpChips=p,this.scrollToShowQuestionAndAnswer(),d&&setTimeout(()=>this.autoComposeFreeTextFields(a,r),400)}getSourceNodeForCompose(t){const e=this.connectList.filter(e=>{var n,i;return(null==e?void 0:e.index)<t&&(null==e?void 0:e.appId)&&Array.isArray(null===(i=null===(n=null==e?void 0:e.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)&&e.sample_data[0].data.length>0});return 0===e.length?null:e.find(t=>0===t.index)||e[e.length-1]}getUpstreamFieldPool(t){const e=[];return(this.connectList||[]).filter(e=>{var n,i;return e&&Number(e.index)<t&&e.appId&&Array.isArray(null===(i=null===(n=null==e?void 0:e.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)&&e.sample_data[0].data.length>0}).sort((t,e)=>Number(t.index)-Number(e.index)).forEach(t=>{const n=0===Number(t.index)?"trigger":t.name||"trigger",i=`${t.name||"Step "+(Number(t.index)+1)}`;(t.sample_data[0].data||[]).forEach(o=>{o&&o.key&&(t=>"string"==typeof t&&t.trim().length>0&&!t.includes("[object Object]")||"number"==typeof t||"boolean"==typeof t)(o.value)&&e.push({key:o.key,text:o.text||o.key,value:o.value,nodeRef:n,srcLabel:i,srcIndex:Number(t.index),fromUtility:!this.appNeedsAccount(t)})})}),e}pickPoolFieldForLabel(t,e){if(!e||!e.length)return null;const n=t=>String(t||"").toLowerCase().replace(/[^a-z0-9]/g,""),i=n(t);if(!i)return null;const o=(t,e)=>e.srcIndex-t.srcIndex,r=e.filter(t=>n(t.text)===i||n(t.key)===i);if(r.length)return r.sort(o)[0];const s=e.filter(t=>n(t.text).includes(i)||n(t.key).includes(i)||i.length>=4&&n(t.text).length>=3&&i.includes(n(t.text)));if(s.length)return s.sort(o)[0];if(/date|time/.test(i)){const t=e.filter(t=>/date|time/.test(n(t.text))||/\d{4}-\d{2}-\d{2}|T\d{2}:\d{2}/.test(String(t.value)));if(t.length)return t.sort((t,e)=>(e.fromUtility?1:0)-(t.fromUtility?1:0)||o(t,e))[0]}if(/name/.test(i)){const t=e.filter(t=>/name/.test(n(t.text)));if(t.length)return t[0]}if(/email|mail|recipient|to$/.test(i)){const t=e.filter(t=>/email/.test(n(t.text))||/@/.test(String(t.value)));if(t.length)return t[0]}if(/phone|mobile/.test(i)){const t=e.filter(t=>/phone|mobile/.test(n(t.text)));if(t.length)return t[0]}return null}composeDraftForField(t,e){if(!e||0===e.length)return"";const n=String(t.label||t.name||"").toLowerCase(),i=t=>`{{${t.nodeRef}.${t.key}}}`,o=e.filter(t=>0===t.srcIndex),r=(o[0]||e[0]).srcLabel,s=this.pickPoolFieldForLabel(n,e);if(/subject|title|summary/.test(n)){const t=s||o.find(t=>/name|email|subject|title/i.test(String(t.text)))||o[0]||e[0];return`New ${r} update: ${i(t)}`}if(/body|message|content|description|text|note|html/.test(n)){const t=o.slice(0,5).map(t=>`${t.text}: ${i(t)}`),n={};return e.filter(t=>t.srcIndex>
10).forEach(t=>{(n[t.srcIndex]=n[t.srcIndex]||[]).push(t)}),Object.keys(n).sort((t,e)=>Number(t)-Number(e)).forEach(e=>{n[Number(e)].slice(0,2).forEach(e=>t.push(`${e.text}: ${i(e)}`))}),`You have a new ${r} event.\n\n${t.join("\n")}`}return i(s||o[0]||e[0])}autoComposeFreeTextFields(t,e){const n=this.getUpstreamFieldPool(e);if(!n.length)return;const i=(this.connectList||[]).find(t=>t&&Number(t.index)===e),o=t.filter(t=>{var e;let n=null===(e=null==i?void 0:i.editOptions)||void 0===e?void 0:e[t.name];if("string"==typeof n)try{n=JSON.parse(n)}catch(o){}return!(Array.isArray(n)&&n.length>0)&&!/date|time/i.test(`${t.label||""} ${t.label_help||t.hint||t.placeholder||""}`)}).map(t=>({fieldName:t.name,value:this.composeDraftForField(t,n),nodeIndex:e})).filter(t=>t.value);0!==o.length&&(this.draftsInFlight=!0,this.applyDraftsSequentially(o,0))}applyDraftsSequentially(t,e){if(e>=t.length){if(this.draftsInFlight=!1,this._resumeTestAfterCompose&&this.pausedTestChain){this._resumeTestAfterCompose=!1;const{indexes:t,i:e}=this.pausedTestChain;return this.pausedTestChain=null,this.isProcessing=!0,this.addAssistantMessage(`Filled \u2014 running the test for step ${t[e]+1}...`),this.scrollToShowQuestionAndAnswer(),void setTimeout(()=>this.runTestChainStep(t,e,this.mappingChainId,0),4e3)}return this.isProcessing=!1,this.addAssistantMessage("Done \u2014 I pre-filled the draft(s) above. You can review or edit them in the panel."),void this.scrollToShowQuestionAndAnswer()}const n=t[e];this.setFieldMappingRequest.emit({fieldName:n.fieldName,source:n.value,nodeIndex:n.nodeIndex,targetAppName:"",onResult:n=>{setTimeout(()=>this.applyDraftsSequentially(t,e+1),800)}})}emitAppSetup(t,e,n,i){this.appSetupComplete.emit({app:t,event:e,account:n,targetNode:i,nodeIndex:i.index})}isAutomationIntent(t){const e=t.toLowerCase();return!this.managementKeywords.some(t=>e.includes(t))&&(this.automationKeywords.some(t=>e.includes(t))||e.length>15)}isAffirmative(t){const e=t.toLowerCase().trim();return["yes","yeah","yep","sure","ok","okay","please","do it","create it"].includes(e)}getConversationHistory(){return this.messages.filter(t=>"welcome"!==t.id).map(t=>({role:t.role,content:t.content}))}getNodesInVisualOrder(){const t=(this.connectList||[]).filter(t=>t&&Object.keys(t).length>0);if(!t.length)return[];const e=new Map;for(const n of t){const t=null==n?void 0:n.nodesData;if(Array.isArray(t)&&t.length){for(const n of t)n&&null!=n.connectorId&&n.position&&"number"==typeof n.position.y&&e.set(String(n.connectorId),n.position.y);if(e.size>0)break}}return 0===e.size?t:[...t].sort((t,n)=>{var i,o;return(null!==(i=e.get(String(null==t?void 0:t.index)))&&void 0!==i?i:Number.POSITIVE_INFINITY)-(null!==(o=e.get(String(null==n?void 0:n.index)))&&void 0!==o?o:Number.POSITIVE_INFINITY)})}getWorkflowNodes(){return this.getNodesInVisualOrder().map((t,e)=>{var n,i;return{index:null!==(n=t.index)&&void 0!==n?n:e,appName:t.displayName||(null===(i=t.AppData)||void 0===i?void 0:i.appName)||t.appName||"Not selected",nodeType:0===e?"trigger":"action",eventName:t.eventFinal||t.selectedEventName||t.eventName||""}})}workflowHasFlows(){const t=(this.connectList||[]).filter(t=>t&&Object.keys(t).length>0);for(const e of t)if("Splits in different flows"===(null==e?void 0:e.actionNameTitle)||Array.isArray(null==e?void 0:e.childIndex)&&e.childIndex.filter(t=>null!=t).length>1)return!0;return!1}findBranchRootByHeader(t){const e=(this.connectList||[]).filter(t=>t&&Object.keys(t).length>0);let n=[];for(const o of e)if(Array.isArray(o.graphData)&&o.graphData.length){n=o.graphData;break}if(!n.length)return null;const i=n.find(e=>e&&"string"==typeof e.headerName&&e.headerName.trim()===t.trim());return i&&e.find(t=>String(t.index)===String(i.id))||null}getFlowOfNode(t){if(!t)return null;const e=(this.connectList||[]).filter(t=>t&&Object.keys(t).length>0);let n=[];for(const s of e)if(Array.isArray(s.graphData)&&s.graphData.length){n=s.graphData;break}if(!n.length)return null;const i=new Map;for(const s of n)s&&null!=s.id&&i.set(String(s.id),s);let o=i.get(String(t.index));const r=new Set;for(;o;){const t=String(o.id);if(r.has(t))break;r.add(t);const e=o.headerName;if("string"==typeof e&&/^Flow\s+\d+$/.test(e.trim()))return e.trim();if(null==o.parentId)break;o=i.get(String(o.parentId))}return null}onQuickAction(t){"__apply_autofill_and_test__"!==t?"__autofill_and_test__"!==t?"__resume_test_chain__"!==t?"__apply_filter_and_test__"!==t?(this.userInput=t,this.sendMessage()):this.applyFilterGuessThenTest():this.resumePausedTestChain():this.autofillMissingThenTest():this.applyAutofillThenTest()}applyFilterGuessThenTest(){const t=this.pendingFilterGuess;if(!t)return void this.resumePausedTestChain();this.pendingFilterGuess=null,this.isProcessing=!0,this.followUpChips=[],this.addAssistantMessage("Applying the filter condition..."),this.scrollToShowQuestionAndAnswer();const e={v:!1},n=(n,i)=>{e.v||(e.v=!0,n?(this.addStepMessage(`\u2705 Filter set: **${t.fieldLabel}** ${t.opDisplay}
1${t.needsValue?' "'+t.value+'"':""}.`),this.resumePausedTestChain()):(this.isProcessing=!1,this.addAssistantMessage(`\u26a0\ufe0f I couldn't auto-apply the filter${i?" \u2014 "+i:""}. Please set the condition in the panel on the right (field \u2192 operator \u2192 value), then say **"run test"** to continue.`),this.followUpChips=[{label:"Run test",message:"run test"}],this.scrollToShowQuestionAndAnswer()))};this.setFilterConditionRequest.emit({nodeIndex:t.nodeIndex,fieldHint:t.fieldHint,operator:t.operator,opDisplay:t.opDisplay,value:t.value,needsValue:t.needsValue,onResult:t=>{"__filter_applied__"===t?n(!0):n(!1,t)}}),setTimeout(()=>n(!1,"it took too long to respond"),15e3)}parseFilterIntent(t){try{const e=(this.messages||[]).filter(t=>t&&"user"===t.role).map(t=>String(t.content||"")).join("  ").trim();if(!e)return null;const n=e.match(/(?:only\s+continue\s+(?:if|when)|continue\s+only\s+(?:if|when)|continue\s+(?:if|when)|only\s+proceed\s+(?:if|when)|proceed\s+(?:only\s+)?(?:if|when)|only\s+run\s+(?:if|when)|run\s+only\s+(?:if|when)|skip\s+unless|filter\s+(?:to|where|for|only|out|so\s+that)|only\s+(?:if|when))\s+(.+)/i);if(!n||!n[1])return null;const i=n[1].split(/(?:[.;]|,?\s*(?:then|and\s+then|after\s+that|otherwise|else)\b)/i)[0].trim();if(!i)return null;let o=null,r=null;for(const t of this.FILTER_OPS){const e=t.re.exec(i);if(e){o=t,r=e;break}}if(!o||!r)return null;const s=i.slice(0,r.index).trim(),a=i.slice(r.index+r[0].length).trim();if(!s)return null;const c=this.cleanFilterFieldName(s);if(!c)return null;const l=this.resolveUpstreamFieldForFilter(t,s),d=l&&l.label||c;let u=o.op,p=o.disp,h="";if(o.needsValue){const t=a.match(/^["'`]([^"'`]+)["'`]/);if(t)h=t[1].trim();else{h=a.replace(/^["'`\s]+/,"").split(/["'`]|[.,;]|\s+(?:then|and|so|otherwise|else)\b/i)[0].trim();const t=h.split(/\s+/).filter(Boolean);t.length>3&&(h=t[0])}if(!h)return null;/^-?\d+(?:\.\d+)?$/.test(h)&&o.numOp&&(u=o.numOp,p=o.numDisp||o.disp)}return{fieldHint:d,fieldLabel:d,operator:u,opDisplay:p,needsValue:o.needsValue,value:h}}catch(e){return null}}cleanFilterFieldName(t){let e=String(t||"").replace(/["'`]/g,"").split(/\s+/).filter(Boolean);e=e.filter(t=>!/^(the|a|an|this|that|its|their|his|her|your|our|each|every|any)$/i.test(t));const n=[];for(let i=0;i<e.length;i++){const t=e[i];i<e.length-1&&/['\u2019]s?$/.test(t)||n.push(t)}return(n.length?n:e).slice(-2).join(" ").trim()}collectUpstreamSampleFields(t){const e=[];return(this.connectList||[]).forEach(n=>{var i,o;if(!n||Number(n.index)>=Number(t))return;const r=null===(o=null===(i=null==n?void 0:n.sample_data)||void 0===i?void 0:i[0])||void 0===o?void 0:o.data;Array.isArray(r)&&r.forEach(t=>{t&&(t.key||t.text)&&e.push({key:String(t.key||""),text:String(t.text||t.key||"")})})}),e}resolveUpstreamFieldForFilter(t,e){const n=this.collectUpstreamSampleFields(t);if(!n.length)return null;const i=t=>String(t||"").toLowerCase().replace(/[^a-z0-9]/g,""),o=String(e||"").split(/\s+/).filter(Boolean);if(!o.length)return null;for(let r=Math.min(3,o.length);r>=1;r--){const t=i(o.slice(-r).join(""));if(t.length<2)continue;const e=n.find(e=>i(e.text)===t||i(e.key)===t);if(e)return{label:e.text||e.key}}for(let r=1;r<=Math.min(3,o.length);r++){const t=i(o.slice(-r).join(""));if(t.length<3)continue;const e=n.find(e=>i(e.text).includes(t)||i(e.key).includes(t));if(e)return{label:e.text||e.key}}return null}resumePausedTestChain(){if(!this.pausedTestChain)return this.userInput="run test",void this.sendMessage();const{indexes:t,i:e}=this.pausedTestChain;this.pausedTestChain=null,this.isProcessing=!0,this.followUpChips=[],this.addAssistantMessage(`Continuing the tests from step ${t[e]+1}...`),this.scrollToShowQuestionAndAnswer(),setTimeout(()=>this.runTestChainStep(t,e,this.mappingChainId,0),1e3)}autofillMissingThenTest(){var t;if(!this.pausedTestChain)return this.userInput="map this step",void this.sendMessage();const{indexes:e,i:n}=this.pausedTestChain,i=e[n],o=(this.connectList||[]).find(t=>t&&Number(t.index)===i);this.addAssistantMessage(`On it \u2014 filling **${(null==o?void 0:o.name)||"Step "+(i+1)}${(null==o?void 0:o.actionNameTitle)?" \u2014 "+o.actionNameTitle:""}**'s fields from your trigger data, then running the test\u2026`),this.followUpChips=[],this.scrollToShowQuestionAndAnswer(),this.isProcessing=!0,this._resumeTestAfterCompose=!0,this.mapFieldsRequest.emit({
1nodeIndex:i,targetAppName:"",workflowIntent:((null===(t=this.messages.find(t=>"user"===t.role))||void 0===t?void 0:t.content)||"").slice(0,600),onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onNeedsTest:t=>{this._resumeTestAfterCompose=!1,this.onMapNeedsTest(t),this.isProcessing=!1},onMapped:t=>this.onMapCompleted(t)}),setTimeout(()=>{this._resumeTestAfterCompose&&(this._resumeTestAfterCompose=!1,this._isProcessing&&(this.isProcessing=!1))},45e3)}proposeAutofillPreview(t,e){const n=(e||[]).filter(Boolean);if(0===n.length)return;const i=(this.connectList||[]).find(e=>e&&Number(e.index)===t),o=!!i&&!this.appNeedsAccount(i),r=this.getUpstreamFieldPool(t),s=this.getSourceNodeForCompose(t),a=[],c=[],l=e=>{if(this.destroyed)return;if(0===e.length)return a.length&&this.showAutofillPreview(t,a),void(c.length&&this.offerFieldChoices(t,c));const n=e.shift(),d={v:!1},u=()=>{d.v||(d.v=!0,l(e))};setTimeout(u,8e3),this.listFieldOptionsRequest.emit({fieldName:n,nodeIndex:t,targetAppName:"",onOptions:(t,e)=>{var l,p,h;if(d.v)return;const g=(null==t?void 0:t.label)||n;if(Array.isArray(e)&&e.length>0)if(o)c.push(g);else{const t=e.find(t=>{var e,n;return!String(null!==(n=null!==(e=null==t?void 0:t.disp_val)&&void 0!==e?e:null==t?void 0:t.label)&&void 0!==n?n:"").includes("---Select---")})||e[0],n=String(null!==(h=null!==(p=null!==(l=null==t?void 0:t.disp_val)&&void 0!==l?l:null==t?void 0:t.label)&&void 0!==p?p:null==t?void 0:t.value)&&void 0!==h?h:"");n&&a.push({fieldName:g,label:g,source:n,display:n})}else if(r.length||s){let e="";if(/value/i.test(g)&&/lookup|search/i.test(g)){const t=this.findChosenColumnName(i,a),n=t?this.pickPoolFieldForLabel(t,r):null;n&&(e=`{{${n.nodeRef}.${n.key}}}`)}e||(e=o&&/^input$/i.test(g)&&this.guessUtilityInputValue(i,s)||this.composeDraftForField(t||{name:g,label:g},r)),e&&a.push({fieldName:g,label:g,source:e,display:e.replace(/\n+/g," ").slice(0,60)})}u()}})};l([...n])}findChosenColumnName(t,e){var n;const i=(e||[]).find(t=>/column/i.test(String((null==t?void 0:t.label)||"")));if(i&&i.display&&!/\{\{/.test(String(i.display)))return String(i.display);const o=[...(null==t?void 0:t.triggerEditOptions)||[],...(null==t?void 0:t.additionalTriggerEditOptions)||[]].find(t=>/column/i.test(String((null==t?void 0:t.label)||(null==t?void 0:t.name)||"")));if(!o)return"";let r=null===(n=null==t?void 0:t.editOptions)||void 0===n?void 0:n[o.name];if("string"==typeof r)try{r=JSON.parse(r)}catch(c){return""}const s=Array.isArray(r)?r[0]:null;if(!s)return"";const a=s.display_value||s[o.name+"__disp"]||s[o.name]||s.value;return a&&"object"!=typeof a&&!/\{\{/.test(String(a))?String(a):""}guessUtilityInputValue(t,e){var n,i;const o=(null===(i=null===(n=null==e?void 0:e.sample_data)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data)||[];if(!o.length)return"";const r=0===e.index?"trigger":e.name||"trigger";let s=null;return/date|time/i.test(String((null==t?void 0:t.actionNameTitle)||(null==t?void 0:t.name)||""))&&(s=o.find(t=>t&&t.key&&null!=t.value&&/\d{4}-\d{2}-\d{2}|T\d{2}:\d{2}|\d{1,2}[\/-]\d{1,2}[\/-]\d{2,4}/.test(String(t.value)))),s||(s=o.find(t=>t&&t.key&&null!=t.value&&String(t.value).trim().length>0)),s?`{{${r}.${s.key}}}`:""}showAutofillPreview(t,e){if(this.destroyed||!e.length)return;this._autofillProposals={nodeIndex:t,items:e};const n=e.map(t=>`\u2022 **${t.label}** \u2192 ${t.display}`).join("\n");this.addAssistantMessage(`Here's what I can fill for you:\n\n${n}\n\nTap **Apply all & run test** to accept \u2014 or change any first (e.g. "show options for ${e[0].label}", or type your own value).`),this.followUpChips=[{label:"Apply all & run test",message:"__apply_autofill_and_test__"},{label:"What variables",message:"what variables are available"},{label:"Run test",message:"run test"}],this.scrollToShowQuestionAndAnswer()}applyAutofillThenTest(){const t=this._autofillProposals;if(!t||!t.items.length)return this.userInput="run test",void this.sendMessage();this._autofillProposals=null;const e=t.nodeIndex,n=[...t.items];this.addAssistantMessage("Applying the fields, then running the test\u2026"),this.followUpChips=[],this.scrollToShowQuestionAndAnswer(),this.isProcessing=!0;const i=t=>{if(this.destroyed)return;if(t>=n.length){if(this.pausedTestChain){const{indexes:t,i:e}=this.pausedTestChain;this.pausedTestChain=null,this.addAssistantMessage(`Filled \u2014 running the test for step ${t[e]+1}...`),setTimeout(()=>this.runTestChainStep(t,e,this.mappingChainId,0),4e3)}else this.isProcessing=!1;return}const o=n[t];this.setFieldMappingRequest.emit({fieldName:o.fieldName,source:o.source,nodeIndex:e,targetAppName:"",onResult:e=>{setTimeout(()=>i(t+1),1500)}})};i(0)}guessAgent(t){const e=t.toLowerCase();return/task|history|failed|error|log/.test(e)?"Task History Agent":/connect|automate|trigger|action|workflow|gmail|slack|
1sheet|webhook|add.*app|change.*app|delete.*node|add.*flow|add.*branch|add.*ai.*agent/.test(e)?"Connects Agent":/plan|subscription|usage|billing|upgrade|tasks? (left|remaining)/.test(e)?"Account Agent":/linked|authorized|oauth|re-?authorize|connected apps/.test(e)?"Linked Accounts Agent":/team|member|user|role|permission|invite|moderator/.test(e)?"User Management Agent":/tool|api tool|custom tool/.test(e)?"Tools Agent":/mcp|server/.test(e)?"MCP Agent":/dark|light|theme|mode/.test(e)?"Switching theme...":"Thinking..."}getPageChips(){const t=[],e=this.router.url.toLowerCase();return e.includes("customeditor")||this.currentApp?(t.push({label:"Add Action App",message:"add a new action step"}),t.push({label:"Add Flow",message:"add a flow to my workflow"})):e.includes("history")?(t.push({label:"Failed Tasks",message:"show my failed tasks"}),t.push({label:"Today's Tasks",message:"show tasks from today"})):e.includes("authorization")?(t.push({label:"Connect New App",message:"how to connect a new app"}),t.push({label:"My Accounts",message:"check my linked accounts"})):e.includes("mcp")||e.includes("tool")?t.push({label:"Create a Tool",message:"how to create a tool"}):e.includes("plan")||e.includes("pricing")?(t.push({label:"My Plan",message:"what is my plan"}),t.push({label:"Upgrade Plan",message:"upgrade my plan"})):e.includes("folder")?(t.push({label:"Create folder",message:"create a new folder"}),t.push({label:"Move connect",message:"move a connect to a folder"})):(t.push({label:"Create a Connect",message:"create a connect"}),t.push({label:"My Tasks",message:"show my task history"}),t.push({label:"My Plan",message:"what is my plan"}),t.push({label:"Linked Accounts",message:"check my linked accounts"})),this.navHistory.length>0&&t.unshift({label:"\u2190 Go back",message:"navigate back"}),(!e.includes("connects")||this.navHistory.length>0)&&t.push({label:"Dashboard",message:"go to dashboard"}),t.slice(0,4)}getFollowUpChips(t,e){var n,i;const o=[],r=!!this.currentApp;for(const l of t)switch(l){case"task_history":o.push({label:"Failed tasks",message:"show my failed tasks"}),o.push({label:"Today's tasks",message:"show tasks from today"});break;case"connects":e.includes("setupApp")||e.includes("addFlow")||e.includes("addAction")||e.includes("createConnect")?(o.push({label:"Add Action App",message:"add a new action step"}),o.push({label:"Add Flow",message:"add a flow to my workflow"}),o.push({label:"Add AI Agent",message:"add an AI agent to my workflow"})):r?(o.push({label:"Add Action App",message:"add a new action step"}),o.push({label:"Add Flow",message:"add a flow to my workflow"}),o.push({label:"Explain this connect",message:"explain what this connect does"})):(o.push({label:"Create a connect",message:"create a connect"}),o.push({label:"Suggest automations",message:"suggest automations for me"}));break;case"account":o.push({label:"Upgrade plan",message:"upgrade my plan"}),o.push({label:"Task usage",message:"how many tasks do I have left"});break;case"linked_accounts":o.push({label:"List Linked Accounts",message:"list my linked accounts"}),o.push({label:"Connect new app",message:"how to connect a new app"});break;case"user_management":o.push({label:"Invite user",message:"how to invite a user"}),o.push({label:"User roles",message:"explain user roles"});break;case"tools":o.push({label:"Create a tool",message:"how to create a tool"});break;case"folders":o.push({label:"Create folder",message:"create a new folder"}),o.push({label:"Move connect",message:"move a connect to a folder"});break;case"theme":o.push({label:"Switch back",message:"switch theme"});break;case"navigation":o.push(r?{label:"Select trigger event",message:"help me select a trigger event"}:{label:"My plan",message:"what is my plan"});break;case"general":r?(o.push({label:"Select trigger event",message:"help me select a trigger event"}),o.push({label:"Add Action App",message:"add a new action step"}),o.push({label:"Explain this connect",message:"explain what this connect does"})):(o.push({label:"Create a connect",message:"create a connect"}),o.push({label:"My tasks",message:"show my task history"}),o.push({label:"My plan",message:"what is my plan"}))}this.navHistory.length>0&&!o.some(t=>"\u2190 Go back"===t.label)&&o.unshift({label:"\u2190 Go back",message:"navigate back"}),o.some(t=>"Dashboard"===t.label)||o.push({label:"Dashboard",message:"go to dashboard"});const s=(null===(i=null===(n=this.messages.filter(t=>"user"===t.role).pop())||void 0===n?void 0:n.content)||void 0===i?void 0:i.toLowerCase())||"",a={"show my failed tasks":{label:"Success tasks",message:"show my successful tasks"},"show my successful tasks":{label:"Failed tasks",message:"show my failed tasks"},"show tasks from today":{label:"All tasks",message:"show my task history"},"show my task history":{label:"Today's tasks",message:"show tasks from today"},"upgrade my plan":{label:"Task usage",message:"how many tasks do I have left"},"how many tasks do i have left":{label:"Upgrade plan",message:"upgrade my plan"},"what is my plan":{label:"Task usage",message:"how many tasks do I have left"},"list my linked accounts":{label:"Connect new app",message:"how to connect a new app"}
1,"how to connect a new app":{label:"List Linked Accounts",message:"list my linked accounts"},"how to invite a user":{label:"User roles",message:"explain user roles"},"explain user roles":{label:"Invite user",message:"how to invite a user"},"add a new action step":{label:"Add Flow",message:"add a flow to my workflow"},"add a flow to my workflow":{label:"Add Action App",message:"add a new action step"},"explain what this connect does":{label:"Add Action App",message:"add a new action step"}}[s];if(a){const t=o.findIndex(t=>t.message.toLowerCase()===s);-1!==t&&(o[t]=a)}const c=new Set;return o.filter(t=>!c.has(t.message)&&(c.add(t.message),!0)).slice(0,4)}dispatchAgentAction(t,e,n){var i,o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_,C,w,y,A,Z,k,T,O,M,I,S,P,N,q,U,E,F,D,L,J,j,R,$,B,H,Q,Y,z,V,G,W,K,X,tt,et,nt,it,ot,rt,st,at;switch(t.type){case"fetchTaskHistory":this.fetchTaskHistory(t.params);break;case"setupApp":this.setupAppFromChat(t.params);break;case"addNode":this.addNodeWithOptionalApp({afterNodeIndex:null!==(o=null===(i=t.params)||void 0===i?void 0:i.afterNodeIndex)&&void 0!==o?o:null,appName:(null===(r=t.params)||void 0===r?void 0:r.appName)||"",eventName:(null===(s=t.params)||void 0===s?void 0:s.eventName)||""});break;case"addFlow":this.addFlowRequest.emit({afterNodeIndex:null!==(c=null===(a=t.params)||void 0===a?void 0:a.afterNodeIndex)&&void 0!==c?c:null});break;case"addAIAgent":this.addAIAgentRequest.emit({afterNodeIndex:null!==(d=null===(l=t.params)||void 0===l?void 0:l.afterNodeIndex)&&void 0!==d?d:null});break;case"deleteNode":{const e=null!==(p=null===(u=t.params)||void 0===u?void 0:u.nodeIndex)&&void 0!==p?p:null===(h=this.currentApp)||void 0===h?void 0:h.index;let i=null===(g=this.connectList)||void 0===g?void 0:g.find(t=>t.index==e);if(!i){const t=n.toLowerCase();i=(this.connectList||[]).filter(t=>t.index>=1).find(e=>{const n=(e.name||e.appName||"").toLowerCase();return n&&t.includes(n)})}if(i||(i=[...this.connectList||[]].reverse().find(t=>!t.appId||"Not selected"===t.appName)),i&&0==i.index){const t=i.name||i.appName||"trigger",e=this.messages[this.messages.length-1];"assistant"===(null==e?void 0:e.role)&&(e.content=`You can't delete the trigger node (**${t}**). You can only change it to a different app. Try saying "change trigger to [app name]".`);break}
1if(i){const t=i.appId?`**${i.name||i.appName}**${i.actionNameTitle?" ("+i.actionNameTitle+")":""}`:"**empty action step**";this.deleteNodeRequest.emit(i);const e=this.messages[this.messages.length-1];"assistant"===(null==e?void 0:e.role)&&(e.content=`Removing ${t} from your workflow.`)}else this.addAssistantMessage("Could not find the node to delete. Please check your workflow.");break}case"askCreateChoice":{const e=t.params||{};Array.isArray(e.fieldMappings)&&e.fieldMappings.length&&this.dataService.setFieldMappings(e.fieldMappings),this.pendingCreate={triggerApp:e.triggerApp||"",triggerEvent:e.triggerEvent||"",actionApps:(e.actionApps||[]).map(t=>({appName:t.appName,eventName:t.eventName||""})),ask:{kind:"event"===e.kind?"event":"app",slot:"number"==typeof e.slot?e.slot:-1,options:(e.options||[]).map(t=>({value:t,label:t}))}};break}case"createConnect":(null===(f=t.params)||void 0===f?void 0:f.triggerApp)&&(null===(v=null===(m=t.params)||void 0===m?void 0:m.actionApps)||void 0===v?void 0:v.length)&&((null===(x=null===(b=t.params)||void 0===b?void 0:b.fieldMappings)||void 0===x?void 0:x.length)&&this.dataService.setFieldMappings(t.params.fieldMappings),this.applyEventSelection(t.params.triggerApp,t.params.actionApps,t.params.triggerEvent||""));break;case"navigate":if(null===(_=t.params)||void 0===_?void 0:_.page){const e="/"+t.params.page;if(this.router.url.toLowerCase()===e.toLowerCase())break;this.navHistory.push(this.router.url),this.router.navigateByUrl(e),setTimeout(()=>{const t=this.followUpChips.filter(t=>"\u2190 Go back"!==t.label&&"Dashboard"!==t.label);this.followUpChips=[{label:"\u2190 Go back",message:"navigate back"},{label:"Dashboard",message:"go to dashboard"},...t]},100)}break;case"toggleTheme":if(/^(.*\b(switch|toggle|change|enable|set|turn|make|want|go|put)\b.*(theme|mode|dark|light)\b|.*(theme|mode|dark|light)\b.*(switch|toggle|change|enable|set|turn|make|want|go|put)\b)/i.test(n)&&!/has been|was |been toggled|been switched|been changed|already/i.test(n)){const e=null===(C=t.params)||void 0===C?void 0:C.theme;"dark"===e?this.themeService.setTheme("dark"):"light"===e?this.themeService.setTheme("light"):this.themeService.toggleTheme()}break;case"fetchLinkedAccounts":e.some(t=>"navigate"===t.type)||this.fetchLinkedAccounts();break;case"fetchTeamMembers":this.fetchTeamMembers();break;case"fetchTools":this.fetchTools();break;case"listFolders":this.fetchFoldersAction();break;case"goToFolder":this.goToFolderAction((null===(w=t.params)||void 0===w?void 0:w.folderId)||"",(null===(y=t.params)||void 0===y?void 0:y.folderName)||"");break;case"moveConnectToFolder":this.moveConnectToFolderAction(t.params||{});break;case"createFolder":this.createFolderAction(t.params||{});break;case"createFolderAndMoveConnect":this.createFolderAndMoveConnectAction(t.params||{});break;case"removeConnectFromFolder":this.removeConnectFromFolderAction(t.params||{});break;case"toggleFavorite":this.toggleFavoriteAction(t.params||{});break;case"listFavorites":this.fetchFavoritesAction();break;case"deleteFolder":this.deleteFolderAction(t.params||{});break;case"renameConnect":(null===(A=t.params)||void 0===A?void 0:A.newName)&&this.renameConnectRequest.emit({newName:t.params.newName});break;case"activateConnect":this.activateConnectRequest.emit({activate:null===(Z=t.params)||void 0===Z?void 0:Z.activate,onIncomplete:t=>{this.addAssistantMessage(`Cannot activate \u2014 the following nodes are incomplete and need to be configured first:\n\n${t}\n\nPlease complete all nodes before activating.`),this.scrollToShowQuestionAndAnswer()}});break;case"addNodeNote":void 0!==(null===(k=t.params)||void 0===k?void 0:k.nodeIndex)&&(null===(T=t.params)||void 0===T?void 0:T.noteText)&&this.addNodeNoteRequest.emit({nodeIndex:t.params.nodeIndex,noteText:t.params.noteText});break;case"navigateToNode":void 0!==(null===(O=t.params)||void 0===O?void 0:O.nodeIndex)&&this.navigateToNodeRequest.emit({nodeIndex:t.params.nodeIndex});break;case"listAppEvents":this.listAppEventsFromChat(t.params);break;case"mapFields":this.mapFieldsRequest.emit({nodeIndex:this.pinToPausedNode(null===(M=t.params)||void 0===M?void 0:M.nodeIndex,(null===(I=t.params)||void 0===I?void 0:I.targetAppName)||""),targetAppName:(null===(S=t.params)||void 0===S?void 0:S.targetAppName)||"",onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onNeedsTest:t=>this.onMapNeedsTest(t),onMapped:t=>this.onMapCompleted(t)});break;case"listAvailableVariables":this.listAvailableVariablesFromChat(null===(P=t.params)||void 0===P?void 0:P.nodeIndex);break;case"setFieldMapping":(null===(N=t.params)||void 0===N?void 0:N.fieldName)&&(this.lastDropdownContext={fieldName:t.params.fieldName,nodeIndex:this.pinToPausedNode(null===(q=t.params)||void 0===q?void 0:q.nodeIndex,(null===(U=t.params)||void 0===U?void 0:U.targetAppName)||""),targetAppName:(null===(E=t.params)||void 0===E?void 0:E.targetAppName)||"",setAt:Date.now()}),this.setFieldMappingRequest.emit({fieldName:(null===(F=t.params)||void 0===F?void 0:F.fieldName)||"",source:null!==(L=null===(D=t.params)||void 0===D?void 0:D.source)&&void 0!==L?L:"",nodeIndex:this.pinToPausedNode(null===(J=t.params)||void 0===J?void 0:J.nodeIndex,(null===(j=t.params)||void 0===j?void 0:j.targetAppName)||""),targetAppName:(null===(R=t.params)||void 0===R?void 0:R.targetAppName)||"",onResult:t=>{if(this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer(),this.pausedTestChain){const{indexes:t,i:e}=this.pausedTestChain;this.pausedTestChain=null,this.isProcessing=!0,this.addAssistantMessage(`Field set \u2014 continuing the tests from step ${t[e]+1}...`),setTimeout(()=>this.runTestChainStep(t,e,this.mappingChainId,0),4e3)}else if(this.autoRunPaused||this.pausedFieldMappings.length>0){const t=[...this.pausedFieldMappings];this.pausedFieldMappings=[],this.pausedFieldMappingIndex=0,this.autoRunPaused=!1,this.isProcessing=!0,this.addAssistantMessage("Field set \u2014 retrying the trigger test..."),this.runTriggerTestThenApplyMappings(t)}}});break;case"clearFieldMapping":this.clearFieldMappingRequest.emit({fieldName:(null===($=t.params)||void 0===$?void 0:$.fieldName)||"",nodeIndex:this.pinToPausedNode(null===(B=t.params)||void 0===B?void 0:B.nodeIndex,(null===(H=t.params)||void 0===H?void 0:H.targetAppName)||""),targetAppName:(null===(Q=t.params)||void 0===Q?void 0:Q.targetAppName)||"",onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()}});break;
1case"showCurrentMapping":this.showCurrentMappingRequest.emit({nodeIndex:null!==(z=null===(Y=t.params)||void 0===Y?void 0:Y.nodeIndex)&&void 0!==z?z:null,targetAppName:(null===(V=t.params)||void 0===V?void 0:V.targetAppName)||"",onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()}});break;case"listFieldOptions":(null===(G=t.params)||void 0===G?void 0:G.fieldName)&&(this.lastDropdownContext={fieldName:t.params.fieldName,nodeIndex:this.pinToPausedNode(null===(W=t.params)||void 0===W?void 0:W.nodeIndex,(null===(K=t.params)||void 0===K?void 0:K.targetAppName)||""),targetAppName:(null===(X=t.params)||void 0===X?void 0:X.targetAppName)||"",setAt:Date.now()}),this.listFieldOptionsRequest.emit({fieldName:(null===(tt=t.params)||void 0===tt?void 0:tt.fieldName)||"",nodeIndex:this.pinToPausedNode(null===(et=t.params)||void 0===et?void 0:et.nodeIndex,(null===(nt=t.params)||void 0===nt?void 0:nt.targetAppName)||""),targetAppName:(null===(it=t.params)||void 0===it?void 0:it.targetAppName)||"",onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()}});break;case"runTest":this.runTestRequest.emit({nodeIndex:null!==(rt=null===(ot=t.params)||void 0===ot?void 0:ot.nodeIndex)&&void 0!==rt?rt:null,appName:(null===(st=t.params)||void 0===st?void 0:st.appName)||"",nodeType:(null===(at=t.params)||void 0===at?void 0:at.nodeType)||"any",onMissingFields:(t,e)=>{const n=e.map(t=>`\u2022 ${t}`).join("\n");this.addAssistantMessage(`Cannot run test for **${t}** \u2014 please fill the following required fields first:\n\n${n}`),this.scrollToShowQuestionAndAnswer()},onNodeNotFound:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()},onTestStarted:t=>{this.addAssistantMessage(`Running test for **${t}**...`),this.scrollToShowQuestionAndAnswer()}});break;case"bookExpert":this.bookExpertRequest.emit()}}sendMessage(){var t,e,n,i,o,r;const s=null===(t=this.userInput)||void 0===t?void 0:t.trim();if(!s||this.isProcessing)return;this.showQuickActions=!1,this.followUpChips=[];const a={id:`msg-${Date.now()}`,role:"user",content:s,timestamp:new Date};this.messages.push(a),this.userInput="";const c=document.querySelector(".copilot-input");if(c&&(c.style.height="auto"),this.statusWord=this.getProcessingLabel(s),this.isProcessing=!0,this.scrollToShowQuestion(),/^exit$/i.test(s))return this.isProcessing=!1,this.pendingConnectAppSelection=null,this.addAssistantMessage("Closing the Copilot. You can reopen anytime to continue!"),this.followUpChips=this.currentApp?[{label:"Select trigger event",message:"help me select a trigger event"},{label:"Add Action App",message:"add a new action step"},{label:"Dashboard",message:"go to dashboard"}]:[{label:"Create a Connect",message:"create a connect"},{label:"My Tasks",message:"show my task history"},{label:"My Plan",message:"what is my plan"},{label:"Dashboard",message:"go to dashboard"}],this.scrollToShowQuestionAndAnswer(),void setTimeout(()=>this.closeCopilot.emit(),1500);if(/^back$/i.test(s))if(this.isProcessing=!1,this.pendingConnectAppSelection=null,this.navHistory.length>0){const t=this.navHistory.pop();this.router.navigateByUrl(t),this.addAssistantMessage("Took you back!"),setTimeout(()=>{this.followUpChips=this.getPageChips(),this.scrollToShowQuestionAndAnswer()},100)}else this.addAssistantMessage("No previous page to go back to."),this.followUpChips=this.getPageChips(),this.scrollToShowQuestionAndAnswer();else{if(this.isAffirmative(s)&&(null===(e=this.pendingConnectEvents)||void 0===e?void 0:e.length)>0)return this.isProcessing=!1,void this.createConnectFromPending();if(this.pendingConnectAppSelection){if(/^(leave it|leave|cancel|exit|skip|stop)$/i.test(s))return this.pendingConnectAppSelection=null,this.isProcessing=!1,this.addAssistantMessage("Event selection cancelled. What would you like to do instead?"),this.followUpChips=this.currentApp?[{label:"Select trigger event",message:"help me select a trigger event"},{label:"Add Action App",message:"add a new action step"},{label:"Dashboard",message:"go to dashboard"}]:[{label:"Create a Connect",message:"create a connect"},{label:"My Tasks",message:"show my task history"},{label:"My Plan",message:"what is my plan"},{label:"Dashboard",message:"go to dashboard"}],void this.scrollToShowQuestionAndAnswer();const t=/event|trigger|action|default|new email|create meeting|search|thread|attachment|label|registrant|participant|send|lead|update|contact|ticket/i.test(s)||/\bfor\b.*\band\b/i.test(s)||/\band\b.*\bfor\b/i.test(s);if(!(/^(go back|dashboard|show my plan|what is my plan|show my task|show task|my plan|my tasks|linked accounts|help|check my|show me)$/i.test(s)||!t&&s.length>20))return this.isProcessing=!1,void this.handleEventSelectionResponse(s);this.pendingConnectAppSelection=null,this.isProcessing=!1,this.addAssistantMessage("Event selection cancelled.")}if(this.lastDropdownContext&&Date.now()-this.lastDropdownContext.setAt>this.DROPDOWN_CONTEXT_TTL_MS&&(this.lastDropdownContext=null),this.lastDropdownContext){const t=this.extractDropdownSelectionValue(s);if(null!==t){const e=this.lastDropdownContext;return this.lastDropdownContext=null,this.isProcessing=!1,void this.setFieldMappingRequest.emit({fieldName:e.fieldName,source:t,nodeIndex:e.nodeIndex,targetAppName:e.targetAppName,onResult:t=>{this.addAssistantMessage(t),this.scrollToShowQuestionAndAnswer()}})}}if("navigate back"===s&&this.navHistory.length>0){this.isProcessing=!1;const t=this.navHistory.pop();return this.router.navigateByUrl(t),this.addAssistantMessage("Took you back!"),void setTimeout(()=>{this.followUpChips=this.getPageChips(),this.scrollToShowQuestionAndAnswer()},100)}if("list my linked accounts"===s)return this.isProcessing=!1,this.addAssistantMessage("Fetching your linked accounts..."),this.fetchLinkedAccounts(),this.followUpChips=[{label:"Connect new app",message:"how to connect a new app"}],this.navHistory.length>0&&this.followUpChips.unshift({label:"\u2190 Go back",message:"navigate back"}),this.followUpChips.push({label:"Dashboard",message:"go to dashboard"}),void this.scrollToShowQuestionAndAnswer();if("go to dashboard"===s)return this.isProcessing=!1,this.navHistory=[],this.router.navigateByUrl("/connects"),this.addAssistantMessage("Welcome back to the dashboard!"),this.followUpChips=this.getPageChips(),void this.scrollToShowQuestionAndAnswer();if(this.currentApp&&/^(remove|delete)\s+(this|this node|this step|current node|current step|selected node)$/i.test(s)){this.isProcessing=!1;const t=null===(n=this.connectList)||void 0===n?void 0:n.find(t=>t.index==this.currentApp.index);if(t&&0===t.index)this.addAssistantMessage(`You can't delete the trigger node (**${t.n
1ame||t.appName}**). You can only change it to a different app. Try saying "change trigger to [app name]".`);else if(t){const e=t.appId?`**${t.name||t.appName}**${t.actionNameTitle?" ("+t.actionNameTitle+")":""}`:"**empty action step**";this.deleteNodeRequest.emit(t),this.addAssistantMessage(`Removing ${e} from your workflow.`)}else this.addAssistantMessage('No node is currently selected. Please click on a node first or say "delete [app name]".');this.scrollToShowQuestionAndAnswer()}else{if(this.currentApp&&/\bflow\s*\d+\b/i.test(s)){const t=/^(remove|delete)\b/i.test(s),e=!!this.pendingDeleteDisambig&&Date.now()-this.pendingDeleteDisambig.setAt<this.DELETE_DISAMBIG_TTL_MS;if(t||e){const t=s.match(/\bflow\s*(\d+)\b/i);if(t){this.pendingDeleteDisambig=null;const e=`Flow ${t[1]}`,n=s.replace(/^(remove|delete)\s+(?:the\s+)?/i,"").replace(/\bflow\s*\d+\b[:\-,\s]*/i,"").replace(/\b(node|step|action|branch)\b/gi,"").replace(/[():]/g," ").trim(),i=n.toLowerCase(),o=(this.connectList||[]).filter(t=>!(!t||t.index<1||"Splits in different flows"===t.actionNameTitle)&&this.getFlowOfNode(t)===e);let r=o;if(!n){const t=this.findBranchRootByHeader(e);if(t)return this.isProcessing=!1,this.pendingDeleteDisambig=null,this.deleteNodeRequest.emit(t),this.addAssistantMessage(`Removing **${e}** and everything inside it.`),void this.scrollToShowQuestionAndAnswer()}if(n){const t=o.filter(t=>{const e=(t.name||t.appName||"").toLowerCase();return e&&i.includes(e)});if(t.length>0&&(r=t),r.length>1){const t=r.filter(t=>{const e=(t.actionNameTitle||"").toLowerCase();return e&&i.includes(e)});t.length>=1&&(r=t)}}if(1===r.length){this.isProcessing=!1;const t=r[0],n=t.appId?`**${t.name||t.appName}**${t.actionNameTitle?" ("+t.actionNameTitle+")":""}`:"**empty action step**";return this.deleteNodeRequest.emit(t),this.addAssistantMessage(`Removing ${n} from **${e}**.`),void this.scrollToShowQuestionAndAnswer()}if(r.length>1){this.isProcessing=!1;const t=r.map(t=>`\u2022 ${t.name||t.appName||"Action"}${t.actionNameTitle?` (${t.actionNameTitle})`:""}`).join("\n"),n=r.slice(0,2).map(t=>{const n=t.actionNameTitle||"";return`"delete ${e} ${t.name||t.appName||""}${n?" "+n:""}"`}).join(" or ");return this.addAssistantMessage(`There are ${r.length} matching nodes in **${e}**. Which one should I delete?\n\n${t}\n\nSay something like ${n} to specify.`),void this.scrollToShowQuestionAndAnswer()}return this.isProcessing=!1,this.addAssistantMessage(`I couldn't find a matching node in **${e}**${n?' for "'+n+'"':""}. Check the workflow and try again.`),void this.scrollToShowQuestionAndAnswer()}}}if(this.currentApp&&/^(remove|delete)\s+(.+)$/i.test(s)){const t=s.match(/^(?:remove|delete)\s+(.+)$/i);if(t){const e=t[1].toLowerCase().trim(),n=(this.connectList||[]).filter(t=>{if(t.index<1)return!1;const n=(t.name||t.appName||"").toLowerCase();return n&&(n===e||n.includes(e)||e.includes(n))}),o=null===(i=this.connectList)||void 0===i?void 0:i[0],r=((null==o?void 0:o.name)||(null==o?void 0:o.appName)||"").toLowerCase();if(0===n.length&&r&&(r===e||r.includes(e)||e.includes(r)))return this.isProcessing=!1,this.addAssistantMessage(`You can't delete the trigger node (**${o.name||o.appName}**). You can only change it to a different app. Try saying "change trigger to [app name]".`),void this.scrollToShowQuestionAndAnswer();if(1===n.length){this.isProcessing=!1;const t=n[0],e=t.appId?`**${t.name||t.appName}**${t.actionNameTitle?" ("+t.actionNameTitle+")":""}`:"**empty action step**";return this.deleteNodeRequest.emit(t),this.addAssistantMessage(`Removing ${e} from your workflow.`),void this.scrollToShowQuestionAndAnswer()}if(n.length>1){if(this.isProcessing=!1,this.workflowHasFlows()){const e=t[1],i=[...n].sort((t,e)=>{const n=this.getFlowOfNode(t)||"",i=this.getFlowOfNode(e)||"";return n.localeCompare(i,void 0,{numeric:!0})}),o=i.map(t=>`\u2022 ${this.getFlowOfNode(t)||"Main path"}: ${t.name||t.appName||"Action"}${t.actionNameTitle?` (${t.actionNameTitle})`:""}`).join("\n"),r=i[0],s=r&&this.getFlowOfNode(r)||"",a=(null==r?void 0:r.name)||(null==r?void 0:r.appName)||e,c=(null==r?void 0:r.actionNameTitle)?` ${r.actionNameTitle}`:"";return this.addAssistantMessage(`This workflow has flows \u2014 there are ${n.length} **${e}** nodes across them. Which one should I remove?\n\n${o}\n\nSay something like ${(s?`"delete ${s} ${a}${c}".trim()`:`"delete ${a}${c}".trim()`).replace(/\.trim\(\)$/,"")} to specify.`),this.pendingDeleteDisambig={setAt:Date.now()},void this.scrollToShowQuestionAndAnswer()}const e=this.getNodesInVisualOrder(),i=t=>{const n=e.findIndex(e=>e&&e.index===t.index);return-1===n?-1:n+1},o=[...n].sort((t,e)=>i(t)-i(e)),r=o.map(t=>{const e=t.appId?`${t.name||t.appName}${t.actionNameTitle?" ("+t.actionNameTitle+")":""}`:"Empty action step",n=i(t);return n>0?`\u2022 ${e} \u2014 Step ${n}`:`\u2022 ${e}`}).join("\n"),s=o.slice(0,2).map(t=>{const e=i(t);return e>0?`"delete step ${e}"`:null}
1).filter(Boolean).join(" or ");return this.addAssistantMessage(`There are ${n.length} **${t[1]}** nodes. Which one should I remove?\n\n${r}\n\nSay ${s||'"delete step 2"'} to specify.`),void this.scrollToShowQuestionAndAnswer()}}}if(this.currentApp&&/^(remove|delete)\s+(?:the\s+)?(last|latest|bottom|first|top)(?:\s+(?:step|action|node))?$/i.test(s)){const t=s.match(/^(?:remove|delete)\s+(?:the\s+)?(last|latest|bottom|first|top)(?:\s+(?:step|action|node))?$/i);if(t){if(this.workflowHasFlows())return this.isProcessing=!1,this.addAssistantMessage('This workflow has flows (branches), so "last" / "first" is ambiguous. Please tell me which app node you want to delete by giving its app name along with the event name (e.g. "delete the Gmail Send Email node").'),void this.scrollToShowQuestionAndAnswer();const e=t[1].toLowerCase(),n=this.getNodesInVisualOrder();if(n.length<=1)return this.isProcessing=!1,this.addAssistantMessage("There's no action to delete \u2014 your workflow only has a trigger."),void this.scrollToShowQuestionAndAnswer();const i="first"===e||"top"===e?n[1]:n[n.length-1];if(i&&0!==i.index){this.isProcessing=!1;
1const t=i.appId?`**${i.name||i.appName}**${i.actionNameTitle?" ("+i.actionNameTitle+")":""}`:"**empty action step**";return this.deleteNodeRequest.emit(i),this.addAssistantMessage(`Removing ${t} from your workflow.`),void this.scrollToShowQuestionAndAnswer()}}}if(this.currentApp&&/^(remove|delete)\s+step\s+(\d+)$/i.test(s)){const t=s.match(/^(?:remove|delete)\s+step\s+(\d+)$/i);if(t){if(this.workflowHasFlows())return this.isProcessing=!1,this.addAssistantMessage('This workflow has flows (branches), so step numbers don\'t work across branches. Please tell me which app node you want to delete by giving its app name along with the event name (e.g. "delete the Gmail Send Email node").'),void this.scrollToShowQuestionAndAnswer();const e=parseInt(t[1],10),n=this.getNodesInVisualOrder();if(e<1||e>n.length)return this.isProcessing=!1,this.addAssistantMessage(`There's no Step ${e} in your workflow \u2014 you have ${n.length} step(s). Tell me which one to delete.`),void this.scrollToShowQuestionAndAnswer();if(1===e){this.isProcessing=!1;const t=n[0];return this.addAssistantMessage(`You can't delete the trigger node (**${(null==t?void 0:t.name)||(null==t?void 0:t.appName)||"trigger"}**). You can only change it to a different app.`),void this.scrollToShowQuestionAndAnswer()}const i=n[e-1];if(i){this.isProcessing=!1;
1const t=i.appId?`**${i.name||i.appName}**${i.actionNameTitle?" ("+i.actionNameTitle+")":""}`:"**empty action step**";return this.deleteNodeRequest.emit(i),this.addAssistantMessage(`Removing ${t} from your workflow.`),void this.scrollToShowQuestionAndAnswer()}}}if(this.currentApp&&/^(explain this connect|explain what this connect does|explain connect|what does this connect do)$/i.test(s)){this.isProcessing=!1;const t=this.connectList||[];if(0===t.length)return this.addAssistantMessage("No workflow is open. Please open a connect first."),void this.scrollToShowQuestionAndAnswer();const e=t.find(t=>0===t.index),n=t.filter(t=>t.index>=1);let i=`**${(null===(o=t[0])||void 0===o?void 0:o.connectTitle)||"Untitled Connect"}**\n\nThis Connect has the following automation steps:\n\n`;if(null==e?void 0:e.appId){const t=e.name||e.appName,n=e.actionNameTitle||(null===(r=e.actionName)||void 0===r?void 0:r.display_title)||"";i+=n?`**Trigger: ${t}** \u2014 This triggers the workflow when **${n}** happens in ${t}.\n`:`**Trigger: ${t}** \u2014 App is selected but no trigger event has been chosen yet. Select an event to define when this workflow should start.\n`}else i+="**Trigger:** No app selected yet. Choose a trigger app to define when this workflow should start.\n";n.length>0?n.forEach((t,e)=>{var o;if(t.appId){const r=t.name||t.appName,s=t.actionNameTitle||(null===(o=t.actionName)||void 0===o?void 0:o.display_title)||"",a=e===n.length-1&&n.length>1?"Finally, this":"After the trigger, this";i+=s?`**Action ${e+1}: ${r}** \u2014 ${a} action performs **${s}** in ${r}.\n`:`**Action ${e+1}: ${r}** \u2014 App is selected but no action event has been chosen yet.\n`}else i+=`**Action ${e+1}:** Empty step \u2014 No app selected yet. Add an app to define what happens next.\n`}):i+="\nNo action steps added yet. Add an action app to define what happens after the trigger.";const s=[e,...n].filter(t=>{var e;return(null==t?void 0:t.appId)&&(t.actionNameTitle||(null===(e=t.actionName)||void 0===e?void 0:e.display_title))}).length,a=t.length;i+=s===a?"\nAll steps are fully configured! You can run a test or activate this connect.":`\n${s} of ${a} steps are configured. Would you like help setting up the remaining steps?`,this.isProcessing=!0,this.scrollToShowQuestionAndAnswer();const c=`Enhance this connect explanation in a friendly, concise way. Keep all app names and event names exactly as provided. Don't add any actions or tools, just respond with an improved explanation:\n\n${i}`,l=this.getConversationHistory(),d=this.getWorkflowNodes();this.commonService.copilotChat({message:c,conversationHistory:l,workflowNodes:d}).subscribe({next:t=>{var e;this.isProcessing=!1;const n=(null===(e=t)||void 0===e?void 0:e.response)||i;this.addAssistantMessage(n),this.followUpChips=[{label:"Select trigger event",message:"help me select a trigger event"},{label:"Add Action App",message:"add a new action step"},{label:"Dashboard",message:"go to dashboard"}],this.scrollToShowQuestionAndAnswer()},error:()=>{this.isProcessing=!1,this.addAssistantMessage(i),this.followUpChips=[{label:"Select trigger event",message:"help me select a trigger event"},{label:"Add Action App",message:"add a new action step"},{label:"Dashboard",message:"go to dashboard"}],this.scrollToShowQuestionAndAnswer()}})}else if(!this.tryResolvePendingCreate(s)&&!this.tryResolveFieldChoice(s)){if(this.emptyTriggerPause&&/run\s*test|continue|done|created|ready|try again/i.test(s))return this.emptyTriggerPause=!1,this.isProcessing=!0,void this.runTriggerTestThenApplyMappings([]);if(/^continue\s+mapping$/i.test(s)&&(this.autoRunPaused||this.pausedFieldMappings.length>0)){this.isProcessing=!0,this.addAssistantMessage("Retrying trigger test before applying field mappings...");const t=[...this.pausedFieldMappings];return this.pausedFieldMappings=[],this.pausedFieldMappingIndex=0,void this.runTriggerTestThenApplyMappings(t)}this.activeAgent=this.guessAgent(s),this.dispatchSingleMessage(s)}}}}dispatchSingleMessage(t){const e=this.getConversationHistory(),n=this.getWorkflowNodes(),i=this.commonService.copilotChat({message:t,conversationHistory:e,workflowNodes:n}),o=this.isAutomationIntent(t)?this.commonService.getConnectEventsFromTextPrompt({prompt:t}).pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null);(0,qo.D)([i,o]).subscribe({next:([e,n])=>{var i,o;const r=(null==e?void 0:e.response)||"I couldn't generate a response. Please try again.",s=(null==e?void 0:e.actions)||[],a=(null==e?void 0:e.agents_used)||[];this.activeAgent="";const c=null===(i=n)||void 0===i?void 0:i.finalConnectEvents;if(this.documentId=(null===(o=n)||void 0===o?void 0:o.documentId)||"",c&&c.length>=2){this.pendingConnectEvents=c;const t=c[0],e=c[1],n=`\n\nI can build: ${null==t?void 0:t.appName} \u2192 ${null==e?void 0:e.appName}. Click below to create.`;this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:r+n,timestamp:new Date,status:"complete",actions:[{label:"Create Connect",type:"create_connect",connectEvents:c}],connectEvents:c})}else this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:r,timestamp:new Date,status:"complete"});this.isProcessing=!1,this.followUpChips=this.getFollowUpChips(a,s.map(t=>t.type)),this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation();for(const l of s)this.dispatchAgentAction(l,s,t)},error:t=>{const e=(null==t?void 0:t.error)||(null==t?void 0:t.message)||"",n="string"==typeof e&&e.toLowerCase().includes("quota");this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:n?"Your AI mapping quota has been used. Please upgrade your plan to continue."
1:"I apologize, I could not process your request. Please try again.",timestamp:new Date,status:"error"}),this.isProcessing=!1,this.scrollToShowQuestionAndAnswer(),this.autoSaveConversation()}})}onActionClick(t){var e;"create_connect"===t.type&&(null===(e=t.connectEvents)||void 0===e?void 0:e.length)?(this.pendingConnectEvents=t.connectEvents,this.createConnectFromPending()):"connect_account"===t.type&&t.appId&&this.openAccountAuth(t)}openAccountAuth(t){const{appId:e,appName:n,nodeId:i}=t;this.commonService.getApp(e).subscribe({next:o=>{var r,s;const a=null===(s=null===(r=null==o?void 0:o.app_detail)||void 0===r?void 0:r.credential)||void 0===s?void 0:s.urlName;if(!a)return void this.addAssistantMessage(`Unable to connect ${n}. Please connect it manually from the right panel.`);localStorage.setItem("userConnectId",i||""),localStorage.setItem("connectAppId",e),localStorage.setItem("window_name","_authWindowPop"),localStorage.setItem("closepopup","false");const c=window.open(`${go.N.apiEndPoint}app/auth/${a}?id=${e}`,"_authWindowPop","width=1050,height=700,scrollbars=yes"),l=setInterval(()=>{(!c||c.closed)&&(clearInterval(l),this.customerConnectService.getUserConnectedAccountByAppId(e).subscribe({next:e=>{const o=((null==e?void 0:e.userConnectedAccount)||[])[0];if(o){const e=(null==o?void 0:o.accountName)||(null==o?void 0:o.accountNickName)||"";this.customerConnectService.updateUserConnectBy_Id(i,{connected_account_id:o._id,authId:o._id,auth:{authId:o._id,connected:!0,userEmail:e,accountName:e},nodeStatus:"account_selected"}).subscribe(()=>{t.connected=!0,this.addAssistantMessage(`${n} account connected successfully!`),this.accountConnected.emit(),this.resumePausedFieldMappings(),this.scrollToShowQuestionAndAnswer()})}else this.addAssistantMessage(`${n} account was not connected. You can try again or connect from the right panel.`),this.scrollToShowQuestionAndAnswer()}}))},500)}})}createConnectFromPending(){var t,e,n,i,o;if(!(null===(t=this.pendingConnectEvents)||void 0===t?void 0:t.length)||this.isCreatingConnect)return;const r=this.customerService.GetCurrent();if(!(null==r?void 0:r.customerId))return void this.addErrorMessage("Please sign in to create a Connect.");if(this.isSkeletonConnect())return void this.updateSkeletonFromPending();this.isCreatingConnect=!0;const s=this.dataService.createConnectId();let a="";const c={},l=((null===(e=this.pendingConnectEvents[0])||void 0===e?void 0:e.appName)+" to "+(null===(n=this.pendingConnectEvents[1])||void 0===n?void 0:n.appName)||"New Connect").substring(0,100),d=this.pendingConnectEvents,u=(null===(i=d[0])||void 0===i?void 0:i.appId)||"",p=(null===(o=d[1])||void 0===o?void 0:o.appId)||"";(0,qo.D)([u?this.customerConnectService.getUserConnectedAccountByAppId(u).pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null),p?this.customerConnectService.getUserConnectedAccountByAppId(p).pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null)]).subscribe({next:([t,e])=>{const n={0:((null==t?void 0:t.userConnectedAccount)||[])[0]||null,1:((null==e?void 0:e.userConnectedAccount)||[])[0]||null},i=d.map((t,e)=>{var i,o,u,p,h,g,f,m,v,b,x,_;const C=0===(null==t?void 0:t.index)&&"trigger"!==(null==t?void 0:t.appOptionsType)||0!==(null==t?void 0:t.index)&&"trigger"===(null==t?void 0:t.appOptionsType),w=C?null:n[null==t?void 0:t.index],y=(null==w?void 0:w.accountName)||(null==w?void 0:w.accountNickName)||"";let A=C?"new":"ta_selected";w&&!C&&(null==t?void 0:t.appOptionsName)&&(A="account_selected");const Z={customerId:r.customerId,connectId:s,connectTitle:l,appId:C?"":null==t?void 0:t.appId,actionName:{title:C?"":null==t?void 0:t.appOptionsName,desc:C?"":null==t?void 0:t.appOptionsDesc},image:C?"":null==t?void 0:t.appImage,index:null==t?void 0:t.index,status:0,connectStatus:"Draft",nodeType:C?"trigger":null==t?void 0:t.appOptionsType,nodeStatus:A,customConnect:!0,parentIndex:0===(null==t?void 0:t.index)?null:(null==t?void 0:t.index)-1,childIndex:0===(null==t?void 0:t.index)?[1]:d.length-1===(null==t?void 0:t.index)?[null]:[(null==t?void 0:t.index)+1],editOptions:{},graphData:[{id:"0",parentId:null,displayName:(null===(i=d[0])||void 0===i?void 0:i.appName)||"",imageFinal:(null===(o=d[0])||void 0===o?void 0:o.appImage)||"",eventFinal:(null===(u=d[0])||void 0===u?void 0:u.appOptionsName)||"",headerName:l},{id:"1",parentId:"0",displayName:(null===(p=d[1])||void 0===p?void 0:p.appName)||"",imageFinal:(null===(h=d[1])||void 0===h?void 0:h.appImage)||"",eventFinal:(null===(g=d[1])||void 0===g?void 0:g.appOptionsName)||"",headerName:l}],nodesData:[{connectorId:"0",displayName:(null===(f=d[0])||void 0===f?void 0:f.a
1ppName)||"",imageFinal:(null===(m=d[0])||void 0===m?void 0:m.appImage)||"",eventFinal:(null===(v=d[0])||void 0===v?void 0:v.appOptionsName)||"",position:{x:175,y:67.5}},{connectorId:"1",displayName:(null===(b=d[1])||void 0===b?void 0:b.appName)||"",imageFinal:(null===(x=d[1])||void 0===x?void 0:x.appImage)||"",eventFinal:(null===(_=d[1])||void 0===_?void 0:_.appOptionsName)||"",position:{x:175,y:252.5}}]};return w&&(Z.connected_account_id=w._id,Z.authId=w._id,Z.auth={authId:w._id,connected:!0,userEmail:y,accountName:y}),this.customerConnectService.addUserConnect(Z).pipe((0,Uo.U)(e=>(c[null==t?void 0:t.index]=(null==e?void 0:e.insertedId)||"",0===(null==t?void 0:t.index)&&(a=(null==e?void 0:e.insertedId)||""),e)))}),o=this.documentId?this.commonService.updateTextToConnectDocument({documentId:this.documentId,connectId:s}):(0,Tr.of)(null);(0,qo.D)([...i,o]).subscribe({next:()=>{var t,e,i,o,r,u,p,h;this.isCreatingConnect=!1,this.pendingConnectEvents=[];const g=["Connect created!"];n[0]&&g.push(`${null===(t=d[0])||void 0===t?void 0:t.appName} account connected.`),n[1]&&g.push(`${null===(e=d[1])||void 0===e?void 0:e.appName} account connected.`),(!n[0]||!n[1])&&g.push("Please connect the remaining accounts."),g.push("Taking you to the editor."),this.addAssistantMessage(g.join(" "));const f=[];d.forEach((t,e)=>{!n[e]&&(null==t?void 0:t.appId)&&f.push({label:`Connect ${t.appName} Account`,type:"connect_account",appId:t.appId,appName:t.appName,nodeId:c[e]||""})}),this.closeCopilot.emit();const m={triggerApp:(null===(i=d[0])||void 0===i?void 0:i.appName)||"Unknown",actionApp:(null===(o=d[1])||void 0===o?void 0:o.appName)||"Unknown",connectTitle:l,connectAccountActions:f,steps:[`Trigger: ${(null===(r=d[0])||void 0===r?void 0:r.appName)||"Unknown"} \u2014 ${(null===(u=d[0])||void 0===u?void 0:u.appOptionsName)||"select a trigger event"}`,`Action: ${(null===(p=d[1])||void 0===p?void 0:p.appName)||"Unknown"} \u2014 ${(null===(h=d[1])||void 0===h?void 0:h.appOptionsName)||"select an action event"}`,...n[0]&&n[1]?["\u2705 Accounts connected for both apps"]:["\u274c Connect accounts for remaining apps"],"Map fields between trigger and action","Test and activate your Connect"]};this.dataService.openCopilotWithHistory(this.messages,m),this.router.navigateByUrl(`/customeditor/${a}/account/${s}`)},error:()=>{this.isCreatingConnect=!1,this.addErrorMessage("Failed to create Connect. Please try again.")}})},error:()=>{this.isCreatingConnect=!1,this.addErrorMessage("Failed to check accounts. Please try again.")}})}updateSkeletonFromPending(){var t,e,n,i,o,r;this.isCreatingConnect=!0;const s=this.pendingConnectEvents,a=((null===(t=s[0])||void 0===t?void 0:t.appName)+" to "+(null===(e=s[1])||void 0===e?void 0:e.appName)||"New Connect").substring(0,100),c=(null===(n=this.currentApp)||void 0===n?void 0:n.triggerId)||(null===(i=this.connectList[0])||void 0===i?void 0:i.connectId),l=this.customerService.GetCurrent(),d=(null===(o=s[0])||void 0===o?void 0:o.appId)||"",u=(null===(r=s[1])||void 0===r?void 0:r.appId)||"";(0,qo.D)([d?this.customerConnectService.getUserConnectedAccountByAppId(d).pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null),u?this.customerConnectService.getUserConnectedAccountByAppId(u).pipe((0,$l.K)(()=>(0,Tr.of)(null))):(0,Tr.of)(null)]).subscribe({next:([t,e])=>{var n,i,o,r,d,u,p,h,g,f,m,v;const b={0:((null==t?void 0:t.userConnectedAccount)||[])[0]||null,1:((null==e?void 0:e.userConnectedAccount)||[])[0]||null},x=[{id:"0",parentId:null,displayName:(null===(n=s[0])||void 0===n?void 0:n.appName)||"",imageFinal:(null===(i=s[0])||void 0===i?void 0:i.appImage)||"",eventFinal:(null===(o=s[0])||void 0===o?void 0:o.appOptionsName)||"",headerName:a},{id:"1",parentId:"0",displayName:(null===(r=s[1])||void 0===r?void 0:r.appName)||"",imageFinal:(null===(d=s[1])||void 0===d?void 0:d.appImage)||"",eventFinal:(null===(u=s[1])||void 0===u?void 0:u.appOptionsName)||"",headerName:a}],_=[{connectorId:"0",displayName:(null===(p=s[0])||void 0===p?void 0:p.appName)||"",imageFinal:(null===(h=s[0])||void 0===h?void 0:h.appImage)||"",eventFinal:(null===(g=s[0])||void 0===g?void 0:g.appOptionsName)||"",position:{x:175,y:67.5}},{connectorId:"1",displayName:(null===(f=s[1])||void 0===f?void 0:f.a
1ppName)||"",imageFinal:(null===(m=s[1])||void 0===m?void 0:m.appImage)||"",eventFinal:(null===(v=s[1])||void 0===v?void 0:v.appOptionsName)||"",position:{x:175,y:252.5}}],C=s.map(t=>{const e=0===(null==t?void 0:t.index)&&"trigger"!==(null==t?void 0:t.appOptionsType)||0!==(null==t?void 0:t.index)&&"trigger"===(null==t?void 0:t.appOptionsType),n=e?null:b[null==t?void 0:t.index],i=(null==n?void 0:n.accountName)||(null==n?void 0:n.accountNickName)||"";let o=e?"new":"ta_selected";n&&!e&&(null==t?void 0:t.appOptionsName)&&(o="account_selected");const r={connectTitle:a,appId:e?"":null==t?void 0:t.appId,actionName:{title:e?"":null==t?void 0:t.appOptionsName,desc:e?"":null==t?void 0:t.appOptionsDesc},image:e?"":null==t?void 0:t.appImage,nodeType:e?"trigger":null==t?void 0:t.appOptionsType,nodeStatus:o,parentIndex:0===(null==t?void 0:t.index)?null:(null==t?void 0:t.index)-1,childIndex:(null==t?void 0:t.index)===s.length-1?[null]:[(null==t?void 0:t.index)+1],graphData:x,nodesData:_};n&&(r.connected_account_id=n._id,r.authId=n._id,r.auth={authId:n._id,connected:!0,userEmail:i,accountName:i});const d=this.connectList.find(e=>(null==e?void 0:e.index)==(null==t?void 0:t.index));if(null==d?void 0:d._id)return this.customerConnectService.updateUserConnectBy_Id(d._id,r);const u=Object.assign(Object.assign({},r),{customerId:null==l?void 0:l.customerId,connectId:c,index:null==t?void 0:t.index,status:0,connectStatus:"Draft",customConnect:!0,parentIndex:0===(null==t?void 0:t.index)?null:(null==t?void 0:t.index)-1,childIndex:(null==t?void 0:t.index)===s.length-1?[null]:[(null==t?void 0:t.index)+1],editOptions:{}});return this.customerConnectService.addUserConnect(u)});(0,qo.D)(C).subscribe({next:()=>{var t,e;this.isCreatingConnect=!1,this.pendingConnectEvents=[];const n=["Connect created!"];b[0]&&n.push(`${null===(t=s[0])||void 0===t?void 0:t.appName} account connected.`),b[1]&&n.push(`${null===(e=s[1])||void 0===e?void 0:e.appName} account connected.`),(!b[0]||!b[1])&&n.push("Please connect the remaining accounts."),this.addAssistantMessage(n.join(" "));const i=[];s.forEach((t,e)=>{if(!b[e]&&(null==t?void 0:t.appId)){const n=this.connectList.find(t=>(null==t?void 0:t.index)==e);i.push({label:`Connect ${t.appName} Account`,type:"connect_account",appId:t.appId,appName:t.appName,nodeId:(null==n?void 0:n._id)||""})}}),i.length>0&&(this.messages[this.messages.length-1].actions=i),this.followUpChips=[{label:"Add Action App",message:"add a new action step"},{label:"Explain this connect",message:"explain what this connect does"}],this.accountConnected.emit(),this.scrollToShowQuestionAndAnswer()},error:()=>{this.isCreatingConnect=!1,this.addErrorMessage("Failed to update Connect. Please try again.")}})},error:()=>{this.isCreatingConnect=!1,this.addErrorMessage("Failed to check accounts. Please try again.")}})}isSkeletonConnect(){var t;return this.currentApp&&(null===(t=this.connectList)||void 0===t?void 0:t.length)>0&&this.connectList.every(t=>!t||!t.appId)}applyEventSelection(t,e,n){var i;if(this.currentApp&&(null===(i=this.connectList)||void 0===i?void 0:i.length)>0&&!this.isSkeletonConnect())return this.addAssistantMessage('You already have a workflow open! You can make changes here:\n\n\u2022 **"change trigger to [appname]"** to change the trigger app\n\u2022 **"add [appname] as action"** to add an action app\n\u2022 **"select trigger event"** to pick a trigger event\n\u2022 **"add action app"** to add a new step\n\nOr go to **Dashboard** to create a new Connect.'),this.followUpChips=[{label:"Select trigger event",message:"help me select a trigger event"},{label:"Add Action App",message:"add a new action step"},{label:"Dashboard",message:"go to dashboard"}],void this.scrollToShowQuestionAndAnswer();this.createConnectByAppNames(t,e,n)}handleSingleAppConnect(t){this.commonService.getAppsCustom("trigger","copilot").subscribe({next:e=>{const n=(null==e?void 0:e.apps_list)||[];let i=n.find(e=>this.appMatchesName(e,t,!0));if(!i){const e=n.filter(e=>this.appMatchesName(e,t,!1));if(1!==e.length){if(e.length>1){this.isCreatingConnect=!1;let n=`I found multiple apps matching "${t}". Which one would you like to use?\n\n`;return e.forEach((t,e)=>{n+=`${e+1}. **${t.displayName}**\n`}),this.addAssistantMessage(n),this.followUpChips=e.slice(0,4).map(t=>({label:t.displayName,message:`connect with ${t.displayName}`})),void this.scrollToShowQuestionAndAnswer()}return this.isCreatingConnect=!1,this.addAssistantMessage(`I couldn't find any app matching "${t}". Please check the name and try again.`),void this.scrollToShowQuestionAndAnswer()}i=e[0]}this.commonService.getAppOptionsByAppId(i.appId,{type:"trigger"}).subscribe({next:t=>{this.isCreatingConnect=!1;const e=null==t?void 0:t.app_options,n=Array.isArray(e)?e:[];let o="";n.length>0?(o+=`Here are the **trigger events** for **${i.displayName}
1**:\n\n`,n.forEach((t,e)=>{o+=`${e+1}. ${t.trigger_action_displayname||t.trigger_action_name||"Unknown"}\n`}),o+=`\nNow please tell me which **action app** you'd like to connect with ${i.displayName}.\n`,o+=`For example: **"${i.displayName} to Gmail"** or **"${i.displayName} to Slack"**`):(o+=`**${i.displayName}** has no trigger events available. You may want to use it as an action app instead.\n\n`,o+=`Try something like: **"Gmail to ${i.displayName}"**`),this.addAssistantMessage(o),this.followUpChips=[{label:`${i.displayName} to Gmail`,message:`${i.displayName} to Gmail`},{label:`${i.displayName} to Slack`,message:`${i.displayName} to Slack`},{label:"Cancel",message:"cancel"}],this.scrollToShowQuestionAndAnswer()},error:()=>{this.isCreatingConnect=!1,this.addAssistantMessage(`Failed to load events for ${i.displayName}. Please try again.`)}})},error:()=>{this.isCreatingConnect=!1,this.addErrorMessage("Failed to fetch apps. Please try again.")}})}createConnectByAppNames(t,e,n){const i=this.customerService.GetCurrent();if(null==i?void 0:i.customerId){if(!this.connectCreationGuard)return this.connectCreationGuard=!0,1===e.length&&e[0].appName.toLowerCase()===t.toLowerCase()?(this.connectCreationGuard=!1,this.isCreatingConnect=!0,void this.handleSingleAppConnect(t)):void this.runConnectCreationFlow(t,e,n,i)}else this.addErrorMessage("Please sign in to create a Connect.")}runConnectCreationFlow(t,e,n,i){var o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_;return(0,Jo.mG)(this,void 0,void 0,function*(){try{yield this.addStepMessage(`\ud83d\udd04 Finding trigger app: **${t}**...`);const[C,w]=yield(0,qo.D)([this.commonService.getAppsCustom("trigger","copilot"),this.commonService.getAppsCustom("action","copilot")]).toPromise(),y=(null==C?void 0:C.apps_list)||[],A=(null==w?void 0:w.apps_list)||[],Z={triggerApp:t,triggerEvent:n||"",actionApps:e.map(t=>Object.assign({},t))},k=this.resolveAppForCreate(y,t);if(!k.app)return void this.askCreateChoice(Z,"app",-1,t,(k.ask||[]).map(t=>({value:t.appId||t.displayName,label:t.displayName})));const T=k.app;yield this.addStepMessage(`\u2705 Choosing trigger: **${T.displayName}**`);const O=[];for(let t=0;t<e.length;t++){const n=e[t],i=this.resolveAppForCreate(A,n.appName);if(!i.app)return void this.askCreateChoice(Z,"app",t,n.appName,(i.ask||[]).map(t=>({value:t.appId||t.displayName,label:t.displayName})));O.push({catalogApp:i.app,requestedEventName:n.eventName||""})}yield this.addStepMessage("\ud83d\udd04 Finding events and accounts...");const M=[];O.forEach(t=>{M.push(this.commonService.getAppOptionsByAppId(t.catalogApp.appId,{type:"action"}).pipe((0,$l.K)(()=>(0,Tr.of)(null)))),M.push(this.customerConnectService.getUserConnectedAccountByAppId(t.catalogApp.appId).pipe((0,$l.K)(()=>(0,Tr.of)(null))))});const I=[this.commonService.getAppOptionsByAppId(T.appId,{type:"trigger"}).pipe((0,$l.K)(()=>(0,Tr.of)(null))),this.customerConnectService.getUserConnectedAccountByAppId(T.appId).pipe((0,$l.K)(()=>(0,Tr.of)(null))),...M],S=yield(0,qo.D)(I).toPromise(),P=S[0],N=S[1],q=null==P?void 0:P.app_options,U=Array.isArray(q)?q:[],E=(null==N?void 0:N.userConnectedAccount)||[],F=E.length>0?E[0]:null,D=[];for(let t=0;t<O.length;t++){const e=S[2+2*t],n=S[3+2*t],i=[...(null===(o=null==e?void 0:e.app_options)||void 0===o?void 0:o.action)||[],...(null===(r=null==e?void 0:e.app_options)||void 0===r?void 0:r.search)||[]],s=(null==n?void 0:n.userConnectedAccount)||[];D.push(Object.assign(Object.assign({},O[t]),{events:i,account:s.length>0?s[0]:null}))}const L=!n,J=D.some(t=>!t.requestedEventName);if(L&&J){this.pendingConnectAppSelection={triggerApp:T,actionApps:D,triggerEvents:U};let n="Here are the available events:\n\n";n+=`**${T.displayName} \u2014 Trigger Events:**\n`,U.length>0?U.forEach((t,e)=>{n+=`${e+1}. ${t.trigger_action_displayname||t.trigger_action_name||"Unknown"}\n`}):n+="No trigger events available.\n",D.forEach(t=>{n+=`\n**${t.catalogApp.displayName} \u2014 Action Events:**\n`,t.events.length>0?t.events.forEach((t,e)=>{n+=`${e+1}. ${t.trigger_action_displayname||t.trigger_action_name||"Unknown"}\n`}):n+="No action events available.\n"}),n+=`\nPlease select events for each app. For example: **"${(null===(s=U[0])||void 0===s?void 0:s.trigger_action_displayname)||(null===(a=U[0])||void 0===a?void 0:a.trigger_action_name)||"first event"} for ${T.displayName}`,D.forEach(t=>{var e,i;n+=` and ${(null===(e=t.events[0])||void 0===e?void 0:e.trigger_action_displayname)||(null===(i=t.events[0])||void 0===i?void 0:i.trigger_action_name)||"first event"} for ${t.catalogApp.displayName}`}),n+="\"**. Or say **'default'** to pick the first available events.";const i=D.filter(t=>0===t.events.length);if(0===U.length||i.length>0){const o=[];0===U.length&&o.push(`**${T.displayName}
1** has no trigger events available`),i.forEach(t=>{o.push(`**${t.catalogApp.displayName}** has no action events available`)}),n=`This connect is not possible because:\n\n${o.map(t=>"\u2022 "+t).join("\n")}`;const r=[];if(0===U.length){const i=this.findSimilarApps(y,t);i.length>0&&(n+="\n\nSimilar trigger apps you could try:\n",i.forEach((t,e)=>{n+=`${e+1}. **${t.displayName}**\n`}),i.slice(0,3).forEach(t=>{r.push({label:t.displayName,message:`${t.displayName} to ${e.map(t=>t.appName).join(" to ")}`})}))}return i.forEach(t=>{const e=this.findSimilarApps(A,t.catalogApp.displayName);e.length>0&&(n+=`\n\nSimilar action apps you could try instead of ${t.catalogApp.displayName}:\n`,e.forEach((t,e)=>{n+=`${e+1}. **${t.displayName}**\n`}))}),n+="\nPlease try with a different app name.",this.pendingConnectAppSelection=null,this.addAssistantMessage(n),this.followUpChips=r.length>0?[...r,{label:"Cancel",message:"cancel"}]:[{label:"Cancel",message:"cancel"}],void this.scrollToShowQuestionAndAnswer()}return this.addAssistantMessage(n),this.followUpChips=[{label:"Default events",message:"default"},{label:"Cancel",message:"cancel"}],void this.scrollToShowQuestionAndAnswer()}const j=((null===(c=this.messages.find(t=>"user"===t.role))||void 0===c?void 0:c.content)||"").slice(0,400),R=t=>t.slice(0,12).map(t=>({value:t.trigger_action_displayname||t.trigger_action_name,label:t.trigger_action_displayname||t.trigger_action_name})),$=(t,e)=>{const n=String(e||"").trim().toLowerCase();return n&&t.find(t=>String(t.trigger_action_displayname||"").trim().toLowerCase()===n||String(t.trigger_action_name||"").trim().toLowerCase()===n)||null};let B=null;if(n){if(B=$(U,n)||this.findBestEventMatch(U,n)||this.findBestEventMatch(U,`${n} ${j}`),!B)return void this.askCreateChoice(Z,"event",-1,n,R(U))}else B=this.findBestEventMatch(U,j)||U[0]||null;B&&(yield this.addStepMessage(`\u2705 Choosing trigger event: **${T.displayName}** \u2014 ${B.trigger_action_displayname||B.trigger_action_name}`));const H=[];for(let t=0;t<D.length;t++){const e=D[t];let n=null;if(e.requestedEventName){if(n=$(e.events,e.requestedEventName)||this.findBestEventMatch(e.events,e.requestedEventName)||this.findBestEventMatch(e.events,`${e.requestedEventName} ${j}`),!n)return void this.askCreateChoice(Z,"event",t,e.requestedEventName,R(e.events))}else n=this.findBestEventMatch(e.events,j)||e.events[0]||null;H.push(Object.assign(Object.assign({},e),{selectedEvent:n}))}{const t=t=>{let e=null==t?void 0:t.options;if("string"==typeof e)try{e=JSON.parse(e)}catch(n){e=[]}return Array.isArray(e)?e:[]};for(const s of H){const t=String((null===(l=s.selectedEvent)||void 0===l?void 0:l.trigger_action_displayname)||(null===(d=s.selectedEvent)||void 0===d?void 0:d.trigger_action_name)||""),e=t.match(/^create\s+(?!or\b)([a-z][a-z ]*)$/i);if(!e)continue;const n=e[1].trim().toLowerCase();if(new RegExp(`create\\s+(a\\s+|an\\s+|new\\s+)?${n}`,"i").test(j))continue;const i=(s.events||[]).find(t=>{const e=String(t.trigger_action_displayname||t.trigger_action_name||"").toLowerCase();return e.includes(n)&&/find.*create|create.*or.*update/.test(e)});i&&(yield this.addStepMessage(`\ud83d\udd01 Using **${i.trigger_action_displayname||i.trigger_action_name}** instead of **${t}** \u2014 so repeat trigger runs don't create duplicate ${n}s.`),s.selectedEvent=i)}const e=/(\bdo\s+not\b|\bdon['\u2019]?t\b|\bnever\b|\bno\b)[^.]{0,60}\b(extra|duplicate|additional)\b[^.]{0,30}\b(node|step)s?\b/i.test(j),n={};let i=0;const o=[];for(const s of H){i++;const r=t(s.selectedEvent).filter(t=>t&&(!0===t.required||"true"===t.required)).map(t=>({f:t,m:String(t.name||"").match(/^([a-zA-Z]+?)_?[Ii]d$/)})).filter(t=>t.m);for(const{f:t,m:n}of r){const i=n[1].toLowerCase();if(o.some(t=>{var e,n;return(null===(e=null==t?void 0:t.catalogApp)||void 0===e?void 0:e.appId)===(null===(n=s.catalogApp)||void 0===n?void 0:n.appId)})||(null==T?void 0:T.appId)===(null===(u=s.catalogApp)||void 0===u?void 0:u.appId))continue;const r=(s.events||[]).filter(t=>t!==s.selectedEvent).map(t=>{const e=String(t.trigger_action_displayname||t.trigger_action_name||"").toLowerCase();if(!e.includes(i))return{e:t,s:0};let n=0;return/find.*create|create.*or.*update|create or update/.test(e)?n=3:/find|search|lookup|get /.test(e)?n=2:/create|add/.test(e)&&(n=1),{e:t,s:n}}).sort((t,e)=>
1e.s-t.s)[0];r&&r.s>0&&!e?(yield this.addStepMessage(`\u2795 **${(null===(p=s.selectedEvent)||void 0===p?void 0:p.trigger_action_displayname)||"This action"}** needs a **${t.label||t.name}** that upstream data can't provide \u2014 adding **${s.catalogApp.displayName} \u2014 ${r.e.trigger_action_displayname||r.e.trigger_action_name}** before it.`),o.push({catalogApp:s.catalogApp,events:s.events,requestedEventName:"",selectedEvent:r.e,account:s.account})):r&&r.s>0&&e?yield this.addStepMessage(`\u26a0\ufe0f **${(null===(h=s.selectedEvent)||void 0===h?void 0:h.trigger_action_displayname)||"This action"}** needs a **${t.label||t.name}** \u2014 your request forbids extra nodes, so I won't insert a resolver step; I'll ask you for it during setup.`):yield this.addStepMessage(`\u26a0\ufe0f **${(null===(g=s.selectedEvent)||void 0===g?void 0:g.trigger_action_displayname)||"This action"}** requires **${t.label||t.name}**, which upstream data can't provide and I found no matching lookup action \u2014 I'll ask you for it during setup.`);break}o.push(s),n[i]=o.length}H.length=0,H.push(...o);const r=this.dataService.pendingFieldMappings||[];r.length&&o.length!==i&&r.forEach(t=>{t&&void 0!==n[t.nodeIndex]&&(t.nodeIndex=n[t.nodeIndex])})}for(let t=0;t<H.length;t++){const e=H[t],n=(null===(f=e.selectedEvent)||void 0===f?void 0:f.trigger_action_displayname)||(null===(m=e.selectedEvent)||void 0===m?void 0:m.trigger_action_name)||"";n?yield this.addStepMessage(`\u2705 Choosing action ${t+1}: **${e.catalogApp.displayName}** \u2014 ${n}`):yield this.addStepMessage(`\u2705 Choosing action ${t+1}: **${e.catalogApp.displayName}**`)}let Q="polling",Y="NA";if(B)if(Q="webhook"===B.triggerType?"webhook":"polling","webhook"===Q){const t=(null===(v=T.credential)||void 0===v?void 0:v.urlName)||(null===(b=T.name)||void 0===b?void 0:b.split(" ").join("").toLowerCase());Y={subscribe:`${t}/${B.subscribeHookFunction}`},B.unsubscribeHookFunction&&(Y.unsubscribe=`${t}/${B.unsubscribeHookFunction}`)}else"webhookUrl"===B.triggerType&&(Q="webhookUrl",Y="NA");const z=this.isSkeletonConnect(),V=z?(null===(x=this.currentApp)||void 0===x?void 0:x.triggerId)||(null===(_=this.connectList[0])||void 0===_?void 0:_.connectId):this.dataService.createConnectId();let G="";const W=[T.displayName,...H.map(t=>t.catalogApp.displayName)].join(" to "),K=[],X=[],tt=67.5,et=185,nt=(null==B?void 0:B.trigger_action_displayname)||"";K.push({id:"0",parentId:null,displayName:T.displayName,imageFinal:T.image,eventFinal:nt,headerName:W}),X.push({connectorId:"0",displayName:T.displayName,imageFinal:T.image,eventFinal:nt,position:{x:175,y:tt}}),H.forEach((t,e)=>{var n;const i=e+1,o=(null===(n=t.selectedEvent)||void 0===n?void 0:n.trigger_action_displayname)||"";K.push({id:`${i}`,parentId:""+(i-1),displayName:t.catalogApp.displayName,imageFinal:t.catalogApp.image,eventFinal:o,headerName:W}),X.push({connectorId:`${i}`,displayName:t.catalogApp.displayName,imageFinal:t.catalogApp.image,eventFinal:o,position:{x:175,y:tt+et*i}})});const it=!!B,ot=[{app:T,type:"trigger",index:0,event:B,account:F,nodeStatus:F&&it?"account_selected":it?"ta_selected":"app_selected",triggerType:Q,webhookFunctions:Y}];H.forEach((t,e)=>{const n=!!t.selectedEvent,i=!!t.account||!this.appNeedsAccount(t.catalogApp);ot.push({app:t.catalogApp,type:"action",index:e+1,event:t.selectedEvent,account:t.account,nodeStatus:i&&n?"account_selected":n?"ta_selected":"app_selected"})});const rt={},st=ot.map(t=>{var e,n,o,r,s;const a=(null===(e=t.account)||void 0===e?void 0:e.accountName)||(null===(n=t.account)||void 0===n?void 0:n.accountNickName)||"",c={connectTitle:W,appId:t.app.appId,actionName:t.event?{title:t.event.trigger_action_name,desc:t.event.desc||"",display_title:t.event.trigger_action_displayname||""}:{title:"",desc:""},image:t.app.image,nodeType:0===t.index?(null===(o=t.event)||void 0===o?void 0:o.type)||"trigger":"action"===(null===(r=t.event)||void 0===r?void 0:r.type)?"actions":(null===(s=t.event)||void 0===s?void 0:s.type)||"action",nodeStatus:t.nodeStatus,parentIndex:0===t.index?null:t.index-1,childIndex:t.index===ot.length-1?[null]:[t.index+1],editOptions:{},graphData:K,nodesData:X};if(0===t.index&&t.event&&(c.triggerType=t.triggerType,c.webhook_functions=t.webhookFunctions),t.account&&(c.connected_account_id=t.account._id,c.authId=t.account._id,c.auth={authId:t.account._id,connected:!0,userEmail:a,accountName:a}),z){const e=this.connectList.find(e=>(null==e?void 0:e.index)==t.index);if(null==e?void 0:e._id)return rt[t.index]=e._id,0===t.index&&(G=e._id),this.customerConnectService.updateUserConnectBy_Id(e._id,c);const n=Object.assign(Object.assign({},c),{customerId:i.customerId,connectId:V,index:t.index,status:0,connectStatus:"Draft",customConnect:!0,parentIndex:0===t.index?null:t.index-1,childIndex:t.index===ot.length-1?[null]:[t.index+1]});return this.customerConnectService.addUserConnect(n).pipe((0,Uo.U)(e=>(rt[t.index]=(null==e?void 0:e.insertedId)||"",0===t.index&&(G=(null==e?void 0:e.insertedId)||""),e)))}{const e=Object.assign(Object.assign({},c),{customerId:i.customerId,connectId:V,index:t.index,status:0,connectStatus:"Draft",customConnect:!0,parentIndex:0===t.index?null:t.index-1,childIndex:t.index===ot.length-1?[null]:[t.index+1]});return this.customerConnectService.addUserConnect(e).pipe((0,Uo.U)(e=>(rt[t.index]=(null==e?void 0:e.insertedId)||"",0===t.index&&(G=(null==e?void 0:e.insertedId)||""),e)))}});yield this.addStepMessage("\ud83d\udd04 Creating connect..."),this.isCreatingConnect=!0,yield(0,qo.D)(st).toProm
1ise(),this.isCreatingConnect=!1;const at=["\u2705 Connect created!"];ot.forEach(t=>{var e;const n=(null===(e=t.event)||void 0===e?void 0:e.trigger_action_displayname)||"",i=0===t.index?"Trigger":`Action ${t.index}`;at.push(n?`${i}: ${t.app.displayName} \u2014 ${n}`:`${i}: ${t.app.displayName}`)});const ct=ot.every(t=>t.account);at.push(ct?"All accounts connected.":"Please connect the remaining accounts.");const lt=[];if(ot.forEach(t=>{var e;!t.account&&(null===(e=t.app)||void 0===e?void 0:e.appId)&&this.appNeedsAccount(t.app)&&lt.push({label:`Connect ${t.app.displayName} Account`,type:"connect_account",appId:t.app.appId,appName:t.app.displayName,nodeId:rt[t.index]||""})}),z)ct?(at.push("Taking you to the editor."),this.addAssistantMessage(at.join("\n")),this.dataService.setAutoRunPending(),this.router.navigateByUrl(`/customeditor/${G}/account/${V}`)):(this.addAssistantMessage(at.join("\n")),lt.length>0&&(this.messages[this.messages.length-1].actions=lt),this.followUpChips=[{label:"Add Action App",message:"add a new action step"},{label:"Explain this connect",message:"explain what this connect does"}],this.accountConnected.emit(),this.scrollToShowQuestionAndAnswer());else{at.push("Taking you to the editor."),this.addAssistantMessage(at.join("\n"));const t=[],e=[];ot.forEach(n=>{var i;const o=(null===(i=n.event)||void 0===i?void 0:i.trigger_action_displayname)||"",r=0===n.index?"Trigger":`Action ${n.index}`;o?t.push(`${r}: ${n.app.displayName} \u2014 ${o}`):e.push(`${r}: ${n.app.displayName} \u2014 select an event`)}),ct||e.push("Connect accounts for remaining apps"),0===e.length&&ct&&e.push("\ud83d\udd04 Configuring fields and running test automatically...");const n={triggerApp:T.displayName,actionApp:H.map(t=>t.catalogApp.displayName).join(", "),connectTitle:W,connectAccountActions:lt,steps:[...t.map(t=>`\u2705 ${t}`),...e]};this.dataService.openCopilotWithHistory(this.messages,n),this.dataService.setAutoRunPending(),this.router.navigateByUrl(`/customeditor/${G}/account/${V}`)}}catch(C){this.isCreatingConnect=!1,this.isProcessing=!1,this.addErrorMessage("Failed to create Connect. Please try again.")}finally{this.isProcessing=!1,this.connectCreationGuard=!1}})}appMatchesName(t,e,n){const i=(e||"").toLowerCase().trim();if(!i)return!1;return[null==t?void 0:t.displayName,null==t?void 0:t.name].filter(Boolean).map(t=>t.toLowerCase()).some(n?t=>t===i:t=>t.includes(i))}appNeedsAccount(t){return!this.IN_HOUSE_APP_IDS.includes(null==t?void 0:t.appId)}significantWords(t){const e=["the","and","for","from","into","with","this","that","when","was","are","you","your","all"];return(t||"").toLowerCase().split(/\s+/).map(t=>t.replace(/[^a-z0-9]/g,"")).filter(t=>t.length>2&&-1===e.indexOf(t))}phraseIntent(t){const e=(t||"").toLowerCase();return/\b(cancel|cancels|cancelled|canceled|cancellation|delete|deleted|remove|removed|void|voided)\b/.test(e)?"delete":/\b(update|updated|updates|edit|edited|modify|modified|change|changed)\b/.test(e)?"update":/\b(new|create|created|creates|add|added|book|booked|booking|schedule|scheduled)\b/.test(e)?"create":null}eventIntent(t){return this.phraseIntent(`${(null==t?void 0:t.trigger_action_displayname)||""} ${(null==t?void 0:t.trigger_action_name)||""} ${(null==t?void 0:t.desc)||""}`)}findBestEventMatch(t,e){const n=(e||"").toLowerCase().trim();if(!n||!Array.isArray(t)||0===t.length)return null;const i=t.find(t=>(t.trigger_action_displayname||"").toLowerCase()===n||(t.trigger_action_name||"").toLowerCase()===n);if(i)return i;const o=this.phraseIntent(n),r=o?t.filter(t=>this.eventIntent(t)===o):[],s=r.length?r:t,a=this.significantWords(n);if(!a.length)return null;let c=null,l=0;for(const d of s){const t=`${d.trigger_action_displayname||""} ${d.trigger_action_name||""}`,e=`${t} ${d.desc||""}`.toLowerCase(),i=this.significantWords(t),o=a.filter(t=>e.includes(t)).length/a.length,r=i.length?i.filter(t=>n.includes(t)).length/i.length:0,s=Math.max(o,r);s>l&&(l=s,c=d)}return l>=.5?c:null}handleEventSelectionResponse(t){var e,n,i,o,r,s,a,c;const l=this.pendingConnectAppSelection;if(!l)return;const d=t.toLowerCase().trim();if("default"===d||"first"===d||"any"===d||"pick for me"===d){const t=(null===(e=l.triggerEvents[0])||void 0===e?void 0:e.trigger_action_displayname)||(null===(n=l.triggerEvents[0])||void 0===n?void 0:n.trigger_action_name)||"",i=l.actionApps.map(t=>{var e,n;return{appName:t.catalogApp.displayName,eventName:(null===(e=t.events[0])||void 0===e?void 0:e.trigger_action_displayname)||(null===(n=t.events[0])||void 0===n?void 0:n.trigger_action_name)||""}});return this.pendingConnectAppSelection=null,void this.applyEventSelection(l.triggerApp.displayName,i,t)}const u=1+l.actionApps.length,p=d.match(/\d+/g);if(p&&p.length>=u){const t=parseInt(p[0])-1,e=t>=0&&t<l.triggerEvents.length&&((null===(i=l.triggerEvents[t])||void 0===i?void 0:i.trigger_action_displayname)||(null===(o=l.triggerEvents[t])||void 0===o?void 0:o.trigger_action_name))||"",n=l.actionApps.map((t,e)=>{var n,i;const o=parseInt(p[e+1])-1,r=o>=0&&o<t.events.length&&((null===(n=t.events[o])||void 0===n?void 0:n.trigger_action_displayname)||(null===(i=t.events[o])||void 0===i?void 0:i.trigger_action_name))||"";return{appName:t.catalogApp.displayName,eventName:r}});if(e||n.some(t=>t.eventName))return this.pendingConnectAppSelection=null,void this.applyEventSelection(l.triggerApp.displayName,n,e)}const h=t.split(/\s+and\s+|,\s*/i).map(t=>
1t.replace(/\s+for\s+\S+$/i,"").trim()).filter(Boolean);if(h.length>=u){const t=(null===(r=this.findBestEventMatch(l.triggerEvents,h[0]))||void 0===r?void 0:r.trigger_action_displayname)||(null===(s=this.findBestEventMatch(l.triggerEvents,h[0]))||void 0===s?void 0:s.trigger_action_name)||h[0],e=l.actionApps.map((t,e)=>{const n=h[e+1]||"",i=this.findBestEventMatch(t.events,n);return{appName:t.catalogApp.displayName,eventName:(null==i?void 0:i.trigger_action_displayname)||(null==i?void 0:i.trigger_action_name)||n}});return this.pendingConnectAppSelection=null,void this.applyEventSelection(l.triggerApp.displayName,e,t)}const g=this.findBestEventMatch(l.triggerEvents,d);let f=null;for(let m=0;m<l.actionApps.length;m++){const t=this.findBestEventMatch(l.actionApps[m].events,d);if(t){f={appIndex:m,event:t};break}}if(g||f){const t=g?g.trigger_action_displayname||g.trigger_action_name:(null===(a=l.triggerEvents[0])||void 0===a?void 0:a.trigger_action_displayname)||(null===(c=l.triggerEvents[0])||void 0===c?void 0:c.trigger_action_name)||"",e=l.actionApps.map((t,e)=>{var n,i;return f&&e===f.appIndex?{appName:t.catalogApp.displayName,eventName:f.event.trigger_action_displayname||f.event.trigger_action_name||""}:{appName:t.catalogApp.displayName,eventName:(null===(n=t.events[0])||void 0===n?void 0:n.trigger_action_displayname)||(null===(i=t.events[0])||void 0===i?void 0:i.trigger_action_name)||""}});return this.pendingConnectAppSelection=null,void this.applyEventSelection(l.triggerApp.displayName,e,t)}this.addAssistantMessage("I couldn't understand your selection. Please try again.\nProvide events for each app separated by \"and\" or commas, or say **'default'** to pick the first events."),this.followUpChips=[{label:"Default events",message:"default"},{label:"Cancel",message:"cancel"}],this.scrollToShowQuestionAndAnswer()}addStepMessage(t,e=400){return this.isProcessing=!1,this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:t,timestamp:new Date,status:"complete",isStep:!0}),this.followStream(),new Promise(t=>setTimeout(()=>{this.isProcessing=!0,t()},e))}addAssistantMessage(t){this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:t,timestamp:new Date,status:"complete"}),this._isProcessing&&this.armProcessingWatchdog(),this.followStream(),this.autoSaveConversation()}addErrorMessage(t){this.messages.push({id:`msg-${Date.now()}`,role:"assistant",content:t,timestamp:new Date,status:"error"}),this.autoSaveConversation()}copyMessage(t){(null==t?void 0:t.content)&&(null==navigator?void 0:navigator.clipboard)&&(navigator.clipboard.writeText(t.content),t.copied=!0,setTimeout(()=>t.copied=!1,2e3))}copyConnectId(t){(null==t?void 0:t.connectId)&&(null==navigator?void 0:navigator.clipboard)&&(navigator.clipboard.writeText(t.connectId),t.idCopied=!0,setTimeout(()=>t.idCopied=!1,2e3))}toggleFeedback(t,e){t.feedback=t.feedback===e?null:e}autoResizeInput(t){const e=t.target;e.style.height="auto",e.style.height=Math.min(e.scrollHeight,120)+"px"}isNearMessagesBottom(){var t;const e=null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<120}onMessagesScroll(){var t;if(!(null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement))return;const e=this.messagesContainer.nativeElement,n=e.scrollHeight-e.scrollTop-e.clientHeight;this.showScrollDown=n>100,this.stickToBottom=n<100}scrollToBottom(){var t;if(!(null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement))return;const e=this.messagesContainer.nativeElement;e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),this.stickToBottom=!0}followStream(){!this.stickToBottom||setTimeout(()=>{var t;if(!this.stickToBottom)return;const e=null===(t=this.messagesContainer)||void 0===t?void 0:t.nativeElement;e&&(e.scrollTop=e.scrollHeight)})}onKeydown(t){"Enter"===t.key&&!t.shiftKey&&(t.preventDefault(),this.sendMessage())}findSimilarApps(t,e,n=6){const i=e.toLowerCase();return t.filter(t=>{var e;const n=(null===(e=t.displayName)||void 0===e?void 0:e.toLowerCase())||"";return n.includes(i)&&n!==i}).slice(0,n)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(wo.v),o.Y36(Fo),o.Y36(yo),o.Y36(DA),o.Y36(s$),o.Y36(mM),o.Y36(i.H7),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-appypie-copilot"]],viewQuery:function(t,e){if(1&t&&o.Gf(oB,5),2&t){let t;o.iGM(t=o.CRH())&&(e.messagesContainer=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.closeRailFilterMenuOnOutsideClick(t)},!1,o.evT)},inputs:{isOpen:"isOpen",currentUser:"currentUser",currentApp:"currentApp",connectList:"connectList",panelSide:"panelSide",showConnectsRail:"showConnectsRail"},outputs:{closeCopilot:"closeCopilot",appSetupComplete:"appSetupComplete",addNodeRequest:"addNodeRequest",addFlowRequest:"addFlowRequest",addAIAgentRequest:"addAIAgentRequest",deleteNodeRequest:"deleteNodeRequest",renameConnectRequest:"renameConnectRequest",activateConnectRequest:"activateConnectRequest",addNodeNoteRequest:"addNodeNoteRequest",navigateToNodeRequest:"navigateToNodeRequest",runTestRequest:"runTestRequest",mapFieldsRequest:"mapFieldsRequest",setFieldMappingRequest:"setFieldMappingRequest",clearFieldMappingRequest:"clearFieldMappingRequest",showCurrentMappingRequest:"showCurrentMappingRequest",listFieldOptionsRequest:"listFieldOptionsRequest",setFilterConditionRequest:"setFilterConditionRequest",bookExpertRequest:"bookExpertRequest",accountConnected:"accountConnected"},features:[o.TTD],decls:45,vars:32,consts:[["class","copilot-overlay",3,"click",4,"ngIf"],["class","copilot-connects-rail",4,"ngIf"],[1,"copilot-panel"],[1,"copilot-header"],[1,"copilot-title"],[1,"copilot-label"],[1,"copilot-badge"],[1,"copilot-header-actions"],["type","button","aria-label","New Chat","data-copilot-tip","New Chat",1,"btn","btn-icon-copilot",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["type","button","aria-label","Chat History","data-copilot-tip","Chat History",1,"btn","btn-icon-copilot",3,"click"],["cx","12","cy","12","r","10"],["points","12 6 12 12 16 14"],["type","button","aria-label","Back","data-copilot-tip","Close",1,"btn","btn-icon-copilot",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2"],["x1","19","y1","12","x2","5","y2","12"],["points","12 19 5 12 12 5"],["class","copilot-conversation-list",4,"ngIf"],[1,"copilot-messages",3,"scroll"],["messagesContainer",""],["class","copilot-chat-skeleton",4,"ngIf"],["class","copilot-message",3,"user","assistant","step-message",4,"ngFor","ngForOf","ngForTrackBy"],["class","copilot-message assistant",4,"ngIf"],["class","copilot-deleted-notice",4,"ngIf"],["type","button","class","scroll-to-bottom-btn","aria-label","Scroll to bottom",3,"click",4,"ngIf"],["class","quick-actions",4,"ngIf"],[1,"copilot-input-area"],[1,"copilot-input-wrapper"],["rows","1","placeholder","Chat with Copilot",1,"copilot-input",3,"ngModel","disabled","ngModelChange","keydown","input"],["type","button","aria-label","Send",1,"btn","btn-send",3,"disabled","click"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["x1","22","y1","2","x2","11","y2","13"],["points","22 2 15 22 11 13 2 9 22 2"],[1,"copilot-hint"],[1,"copilot-overlay",3,"click"],[1,"copilot-connects-rail"],[1,"rail-header"],["type","button",1,"rail-new-chat",3,"click"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.4","stroke-linecap","round","stroke-linejoin","round"],[1,"rail-filter"],["type","button",1,"rail-filter-btn",3,"click"],[1,"rail-filter-label"],["width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2","stroke-linecap","round","stroke-linejoin","round"],["points","22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"],["points","6 9 12 15 18 9"],["class","rail-filter-menu",4,"ngIf"],[1,"rail-list"],["class","rail-skeleton",4,"ngIf"],[4,"ngIf"],["class","rail-tooltip",3,"top",4,"ngIf"],[1,"rail-filter-menu"],["type","button",3,"click"],[1,"rail-skeleton"],["class","rls-row",4,"ngFor","ngForOf"],[1,"rls-row"],[1,"rls-line","rls-name"],[1,"rls-line","rls-id"],["class","rail-item","role","button","tabindex","0",3,"active","rail-status-published","rail-status-draft","opening","editing","click","keyup.enter","mouseenter","mouseleave",4,"ngFor","ngForOf"],["class","rail-empty",4,"ngIf"],["role","button","tabindex","0",1,"rail-item",3,"click","keyup.enter","mouseenter","mouseleave"],["class","rail-rename",3,"click",4,"ngIf"],["class","rail-delete-confirm",3,"click",4,"ngIf"],[1,"rail-item-top"],["class","rail-active-dot",4,"ngIf"],[1,"rail-item-name"],[1,"rail-actions"],["type","button","title","Rename","aria-label","Rename connect",1,"rail-action-btn",3,"click"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"],["type","button","title","Delete","aria-label","Delete connect",1,"rail-action-btn","rail-action-danger",3,"click"],["points","3 6 5 6 21 6"],["d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"],[1,"rail-item-bottom"],[1,"rail-item-id"],["type","button","aria-label","Copy connect ID",1,"rail-copy-btn",3,"title","click"],["width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.6","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["class","rail-item-spinner",4,"ngIf"],[1,"rail-active-dot"],["x","9","y","9","
1width","13","height","13","rx","2","ry","2"],["d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"],["width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.6","stroke-linecap","round","stroke-linejoin","round"],["points","20 6 9 17 4 12"],[1,"rail-item-spinner"],[1,"rail-rename",3,"click"],["id","railRenameInput","type","text","maxlength","100",3,"ngModel","disabled","ngModelChange","keydown.enter","keydown.escape"],["type","button","title","Save","aria-label","Save name",1,"rail-action-btn","rail-action-confirm",3,"disabled","click"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["type","button","title","Cancel","aria-label","Cancel rename",1,"rail-action-btn",3,"disabled","click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"rail-delete-confirm",3,"click"],[1,"rail-delete-text"],[1,"rail-delete-actions"],["type","button",1,"rail-mini-btn","rail-mini-danger",3,"disabled","click"],["type","button",1,"rail-mini-btn",3,"disabled","click"],[1,"rail-empty"],[1,"rail-tooltip"],[1,"copilot-conversation-list"],["class","conversation-item",3,"active","click",4,"ngFor","ngForOf"],["class","no-conversations",4,"ngIf"],[1,"conversation-item",3,"click"],[1,"conversation-item-content"],[1,"conversation-title-row"],["class","conversation-connect-icon",4,"ngIf"],[1,"conversation-title"],[1,"conversation-date"],["type","button","aria-label","Delete conversation","title","Delete",1,"conversation-delete",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"conversation-connect-icon"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2","stroke-linecap","round","stroke-linejoin","round"],["d","M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"],["d","M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"],[1,"no-conversations"],[1,"copilot-chat-skeleton"],[1,"ccs-bubble","ccs-left",2,"width","72%","height","58px"],[1,"ccs-bubble","ccs-right",2,"width","45%"],[1,"ccs-bubble","ccs-left",2,"width","62%"],[1,"ccs-bubble","ccs-right",2,"width","35%"],[1,"ccs-bubble","ccs-left",2,"width","55%","height","52px"],[1,"copilot-message"],[1,"message-bubble"],["class","message-content",4,"ngIf"],["class","message-content formatted",3,"innerHTML",4,"ngIf"],["class","task-history-container",4,"ngIf"],["class","message-actions",4,"ngIf"],["class","message-feedback",4,"ngIf"],[1,"message-content"],[1,"message-content","formatted",3,"innerHTML"],[1,"task-history-container"],["class","task-history-card",4,"ngFor","ngForOf"],[1,"task-history-card"],[1,"task-card-header"],[1,"task-card-number"],[1,"task-card-status"],[1,"task-card-title"],["class","task-card-row task-card-id",4,"ngIf"],[1,"task-card-details"],[1,"task-card-row"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2"],["x","3","y","4","width","18","height","18","rx","2","ry","2"],["x1","16","y1","2","x2","16","y2","6"],["x1","8","y1","2","x2","8","y2","6"],["x1","3","y1","10","x2","21","y2","10"],["points","22 12 18 12 15 21 9 3 6 12 2 12"],["class","task-card-row task-card-comment",4,"ngIf"],[1,"task-card-row","task-card-id"],["type","button","aria-label","Copy ID",1,"copilot-feedback-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","10","height","10","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","10","height","10","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5"],[1,"task-card-row","task-card-comment"],["d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"],[1,"message-actions"],["type","button","class","btn btn-action",3,"btn-action-connected","click",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-action",3,"click"],[1,"message-feedback"],["type","button","aria-label","Copy",1,"copilot-feedback-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5",4,"ngIf"],["type","button","aria-label","Helpful",1,"copilot-feedback-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 24 24","fill","currentColor","stroke","currentColor","stroke-width","1"],["d","M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"],["type","button","aria-label","Not helpful",1,"copilot-feedback-btn",3,"click"],["d","M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5"],[1,"copilot-message","assistant"],[1,"message-bubble","thinking"],[1,"theme-loader"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"theme-spinner"],["d","M12 6v6l4 2"],[1,"agent-status-label","shimmer"],[1,"typing-dots"],[1,"copilot-deleted-notice"],["width","15","height","15","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"cdn-icon"],["x1","12","y1","8","x2","12","y2","12"],["x1","12","y1","16","x2","12.01","y2","16"],["type","button","aria-label","Dismiss",1,"copilot-deleted-notice-close",3,"click"],["width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.4","stroke-linecap","round","stroke-linejoin","round"],["type","button","aria-label","Scroll to bottom",1,"scroll-to-bottom-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5","
1stroke-linecap","round","stroke-linejoin","round"],[1,"quick-actions"],["type","button","class","quick-action-chip",3,"click",4,"ngFor","ngForOf"],["type","button",1,"quick-action-chip",3,"click"],[1,"chip-icon",3,"innerHTML"],[1,"chip-label"],["type","button","class","quick-action-chip followup",3,"click",4,"ngFor","ngForOf"],["type","button",1,"quick-action-chip","followup",3,"click"]],template:function(t,e){1&t&&(o.YNc(0,rB,1,0,"div",0),o.YNc(1,CB,20,5,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o.TgZ(4,"div",4),o.TgZ(5,"span",5),o._uU(6,"Copilot"),o.qZA(),o.TgZ(7,"span",6),o._uU(8,"beta"),o.qZA(),o.qZA(),o.TgZ(9,"div",7),o.TgZ(10,"button",8),o.NdJ("click",function(){return e.onHeaderNewChat()}),o.O4$(),o.TgZ(11,"svg",9),o._UZ(12,"line",10),o._UZ(13,"line",11),o.qZA(),o.qZA(),o.kcU(),o.TgZ(14,"button",12),o.NdJ("click",function(){return e.toggleConversationList()}),o.O4$(),o.TgZ(15,"svg",9),o._UZ(16,"circle",13),o._UZ(17,"polyline",14),o.qZA(),o.qZA(),o.kcU(),o.TgZ(18,"button",15),o.NdJ("click",function(){return e.onClose()}),o.O4$(),o.TgZ(19,"svg",16),o._UZ(20,"line",17),o._UZ(21,"polyline",18),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(22,ZB,3,2,"div",19),o.kcU(),o.TgZ(23,"div",20,21),o.NdJ("scroll",function(){return e.onMessagesScroll()}),o.YNc(25,kB,6,0,"div",22),o.YNc(26,JB,7,11,"div",23),o.YNc(27,jB,8,0,"div",24),o.YNc(28,RB,8,0,"div",24),o.YNc(29,$B,8,0,"div",24),o.YNc(30,BB,8,0,"div",24),o.YNc(31,HB,8,1,"div",24),o.YNc(32,QB,11,0,"div",25),o.qZA(),o.YNc(33,YB,3,0,"button",26),o.YNc(34,VB,2,1,"div",27),o.YNc(35,WB,2,1,"div",27),o.TgZ(36,"div",28),o.TgZ(37,"div",29),o.TgZ(38,"textarea",30),o.NdJ("ngModelChange",function(t){return e.userInput=t})("keydown",function(t){return e.onKeydown(t)})("input",function(t){return e.autoResizeInput(t)}),o.qZA(),o.TgZ(39,"button",31),o.NdJ("click",function(){return e.sendMessage()}),o.O4$(),o.TgZ(40,"svg",32),o._UZ(41,"line",33),o._UZ(42,"polygon",34),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(43,"p",35),o._uU(44,"What triggers the workflow? What should happen next? I'll build the entire flow for you."),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.Q6J("ngIf",e.isOpen),o.xp6(1),o.Q6J("ngIf",e.isOpen&&e.showConnectsRail),o.xp6(1),o.ekj("open",e.isOpen)("side-left","left"===e.panelSide)("side-right","right"===e.panelSide)("dashboard-context",!e.currentApp)("with-connects-rail",e.showConnectsRail),o.xp6(12),o.ekj("active",e.showConversationList),o.xp6(8),o.Q6J("ngIf",e.showConversationList),o.xp6(1),o.ekj("hidden",e.showConversationList),o.xp6(2),o.Q6J("ngIf",e.isLoadingConversation),o.xp6(1),o.Q6J("ngForOf",e.messages)("ngForTrackBy",e.trackByMessageId),o.xp6(1),o.Q6J("ngIf",e.isChangingTheme),o.xp6(1),o.Q6J("ngIf",e.isSettingUpApp),o.xp6(1),o.Q6J("ngIf",e.isFetchingHistory),o.xp6(1),o.Q6J("ngIf",e.isCreatingConnect),o.xp6(1),o.Q6J("ngIf",e.showThinking&&!e.isCreatingConnect),o.xp6(1),o.Q6J("ngIf",e.connectDeletedNotice),o.xp6(1),o.Q6J("ngIf",e.showScrollDown),o.xp6(1),o.Q6J("ngIf",e.showQuickActions&&!e.isProcessing),o.xp6(1),o.Q6J("ngIf",!e.showQuickActions&&e.followUpChips.length>0&&!e.isProcessing),o.xp6(3),o.Q6J("ngModel",e.userInput)("disabled",e.isProcessing),o.xp6(1),o.Q6J("disabled",!(null!=e.userInput&&e.userInput.trim())||e.isProcessing))},directives:[to.O5,to.sg,Xi.Fj,Xi.JJ,Xi.On,Xi.nD],pipes:[to.uU],styles:['.copilot-panel{position:fixed;top:0;width:400px;max-width:95vw;height:100vh;background:#fff;background:var(--primary-bg, #fff);z-index:1000;display:flex;flex-direction:column;transition:transform .3s ease;pointer-events:none}.copilot-panel.open{pointer-events:auto}.copilot-panel.side-right{right:0;left:auto;border-left:1px solid #e5e7eb;border-left:1px solid var(--border-color, #e5e7eb);border-right:none;box-shadow:-4px 0 24px #00000014;transform:translate(100%)}.copilot-panel.side-right.open{transform:translate(0)}.copilot-panel.side-left{left:70px;right:auto;top:56px;height:calc(100vh - 56px);border-right:1px solid #e5e7eb;border-right:1px solid var(--border-color, #e5e7eb);border-left:none;box-shadow:4px 0 24px #00000014;transform:translateY(100%);transition:transform .3s ease;border-top:1px solid #e5e7eb;border-top:1px solid var(--border-color, #e5e7eb)}.copilot-panel.side-left.open{transform:translateY(0)}
1.copilot-panel.side-left.dashboard-context{left:65px;top:0;width:368px;height:100vh}.copilot-chat-skeleton{display:flex;flex-direction:column;grid-gap:12px;gap:12px;padding:10px 0}.copilot-chat-skeleton .ccs-bubble{height:44px;border-radius:14px;background:rgba(20,23,33,.06);animation:ccsPulse 1.2s ease-in-out infinite}.copilot-chat-skeleton .ccs-left{align-self:flex-start;border-bottom-left-radius:4px}.copilot-chat-skeleton .ccs-right{align-self:flex-end;border-bottom-right-radius:4px;background:rgba(83,113,255,.14)}@keyframes ccsPulse{0%,to{opacity:.55}50%{opacity:1}}.theme-dark .copilot-chat-skeleton .ccs-bubble{background:rgba(255,255,255,.07)!important}.theme-dark .copilot-chat-skeleton .ccs-right{background:rgba(120,140,255,.16)!important}.copilot-connects-rail{position:fixed;left:70px;top:56px;width:260px;height:calc(100vh - 56px);background:#fff;background:var(--primary-bg, #fff);border-top:1px solid #e5e7eb;border-top:1px solid var(--border-color, #e5e7eb);border-right:1px solid #e5e7eb;border-right:1px solid var(--border-color, #e5e7eb);z-index:1001;display:flex;flex-direction:column}.copilot-connects-rail .rail-header{padding:14px 10px 10px;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color, #e5e7eb)}.copilot-connects-rail .rail-new-chat{display:flex;align-items:center;justify-content:center;grid-gap:6px;gap:6px;width:100%;margin-bottom:8px;padding:5px 10px;border:1px solid rgba(83,113,255,.45);border-radius:7px;background:#fff;background:var(--primary-bg, #fff);color:#5371ff;color:var(--Primary-Color, #5371FF);font-size:12px;font-weight:600;cursor:pointer;transition:border-color .15s ease,background .15s ease}.copilot-connects-rail .rail-new-chat:hover{border-color:#5371ff;border-color:var(--Primary-Color, #5371FF);background:rgba(83,113,255,.08)}.copilot-connects-rail .rail-filter{position:relative}.copilot-connects-rail .rail-filter-btn{width:100%;display:flex;align-items:center;justify-content:space-between;grid-gap:6px;gap:6px;border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);background:#fff;background:var(--primary-bg, #fff);border-radius:7px;padding:5px 9px;font-size:11.5px;color:#3c4257;color:var(--text-primary, #3c4257);cursor:pointer;transition:border-color .15s ease}.copilot-connects-rail .rail-filter-btn:hover{border-color:#5371ff73}.copilot-connects-rail .rail-filter-label{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;overflow:hidden;white-space:nowrap}.copilot-connects-rail .rail-filter-label svg{color:#5371ff;color:var(--Primary-Color, #5371FF);flex:0 0 auto}.copilot-connects-rail .rail-filter-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#fff;background:var(--primary-bg, #fff);border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);border-radius:8px;box-shadow:0 8px 22px #0f121e24;padding:4px;z-index:1003;display:flex;flex-direction:column}.copilot-connects-rail .rail-filter-menu button{border:0;background:transparent;text-align:left;font-size:11.5px;padding:6px 8px;border-radius:6px;color:#3c4257;color:var(--text-primary, #3c4257);cursor:pointer}.copilot-connects-rail .rail-filter-menu button:hover{background:rgba(83,113,255,.08)}.copilot-connects-rail .rail-filter-menu button.selected{color:#5371ff;color:var(--Primary-Color, #5371FF);font-weight:600;background:rgba(83,113,255,.08)}.copilot-connects-rail .rail-item-top{display:flex;align-items:center;grid-gap:6px;gap:6px}.copilot-connects-rail .rail-item-bottom{display:flex;align-items:center;grid-gap:4px;gap:4px}.copilot-connects-rail .rail-copy-btn{display:none;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:0;border-radius:4px;background:transparent;color:#8a90a8;color:var(--text-secondary, #8a90a8);cursor:pointer;flex:0 0 auto}.copilot-connects-rail .rail-item:hover .rail-copy-btn{display:inline-flex}.copilot-connects-rail .rail-copy-btn:hover{background:rgba(83,113,255,.12);color:#5371ff;color:var(--Primary-Color, #5371FF)}.copilot-connects-rail .rail-copy-btn.copied{display:inline-flex;color:#1d9e75}.copilot-connects-rail .rail-actions{display:none;align-items:center;grid-gap:2px;gap:2px;flex:0 0 auto}.copilot-connects-rail .rail-item:hover .rail-actions{display:inline-flex}.copilot-connects-rail .rail-action-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:0;border-radius:5px;background:transparent;color:#8a90a8;color:var(--text-secondary, #8a90a8);cursor:pointer}.copilot-connects-rail .rail-action-btn:hover{background:rgba(83,113,255,.12);color:#5371ff;color:var(--Primary-Color, #5371FF)}.copilot-connects-rail .rail-action-btn.rail-action-danger:hover{background:rgba(226,75,74,.12);color:#e24b4a}.copilot-connects-rail .rail-action-btn.rail-action-confirm{color:#1d9e75}.copilot-connects-rail .rail-action-btn:disabled{opacity:.5;cursor:default}.copilot-connects-rail .rail-rename{display:flex;align-items:center;grid-gap:4px;gap:4px}.copilot-connects-rail .rail-rename input{flex:1;min-width:0;font-size:12px;font-weight:600;
1color:#1a1f2e;color:var(--text-primary, #1a1f2e);background:#fff;background:var(--primary-bg, #fff);border:1px solid rgba(83,113,255,.5);border-radius:6px;padding:3px 7px;outline:none}.copilot-connects-rail .rail-delete-confirm{display:flex;flex-direction:column;grid-gap:6px;gap:6px}.copilot-connects-rail .rail-delete-text{font-size:11.5px;font-weight:600;color:#1a1f2e;color:var(--text-primary, #1a1f2e)}.copilot-connects-rail .rail-delete-actions{display:flex;grid-gap:6px;gap:6px}.copilot-connects-rail .rail-mini-btn{border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);background:#fff;background:var(--primary-bg, #fff);color:#3c4257;color:var(--text-primary, #3c4257);font-size:11px;font-weight:600;border-radius:6px;padding:3px 10px;cursor:pointer}.copilot-connects-rail .rail-mini-btn.rail-mini-danger{background:#E24B4A;border-color:#e24b4a;color:#fff}.copilot-connects-rail .rail-mini-btn:disabled{opacity:.6;cursor:default}.theme-dark .copilot-connects-rail .rail-item.rail-item{background:transparent!important;background-color:transparent!important;border-color:transparent!important}.theme-dark .copilot-connects-rail .rail-item span:not(.rail-dot):not(.rail-badge):not(.rail-active-dot):not(#railNope){background:transparent!important;background-color:transparent!important}.copilot-connects-rail .rail-item *::-moz-selection{background:transparent}.copilot-connects-rail .rail-item *::selection{background:transparent}.theme-dark .copilot-connects-rail .rail-item.rail-item:hover{background-color:#788cff1a!important;filter:brightness(1.25)}.theme-dark .copilot-connects-rail .rail-item.rail-item.active{background-color:#788cff29!important;border-left-color:#8ea0ff!important;border-left-color:var(--Primary-Color, #8ea0ff)!important}.theme-dark .copilot-connects-rail .rail-active-dot:not(#railNope){background:#5DCAA5!important;animation-name:railActivePulseDark}@keyframes railActivePulseDark{0%{box-shadow:0 0 #5dcaa58c}to{box-shadow:0 0 0 7px #5dcaa500}}.theme-dark .copilot-connects-rail .rail-copy-btn:not(#railNope){background:transparent!important;background-color:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#9aa0bd!important}.theme-dark .copilot-connects-rail .rail-copy-btn:not(#railNope):hover{background:rgba(142,160,255,.2)!important;background-color:#8ea0ff33!important;color:#cdd6ff!important}.theme-dark .copilot-connects-rail .rail-copy-btn.copied:not(#railNope){color:#5dcaa5!important}.theme-dark .copilot-connects-rail .rail-new-chat:not(#railNope){background:transparent!important;background-color:transparent!important;border-color:#8ea0ff73!important;color:#8ea0ff!important;-webkit-text-fill-color:#8ea0ff!important;box-shadow:none!important}.theme-dark .copilot-connects-rail .rail-new-chat:not(#railNope):hover{background:rgba(142,160,255,.14)!important;background-color:#8ea0ff24!important;border-color:#8ea0ff!important}.theme-dark .copilot-connects-rail .rail-filter-btn.rail-filter-btn{background:transparent!important;background-color:transparent!important;border-color:#ffffff24!important;border-color:var(--border-color, rgba(255, 255, 255, .14))!important}.theme-dark .copilot-connects-rail .rail-filter-menu button{background:transparent!important;background-color:transparent!important;border-color:transparent!important}.theme-dark .copilot-connects-rail .rail-filter-menu button:hover,.theme-dark .copilot-connects-rail .rail-filter-menu button.selected{background-color:#788cff24!important}.theme-dark .copilot-connects-rail .rail-item-id:not(#railNope){color:#9aa0bd!important;color:var(--text-secondary, #9aa0bd)!important;-webkit-text-fill-color:#9aa0bd!important;-webkit-text-fill-color:var(--text-secondary, #9aa0bd)!important}.theme-dark .copilot-connects-rail svg:not(#railNope){background:transparent!important;background-color:transparent!important}.theme-dark .copilot-connects-rail .rail-action-btn:not(#railNope){background:transparent!important;background-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;color:#9aa0bd!important}.theme-dark .copilot-connects-rail .rail-action-btn:not(#railNope):hover{background:rgba(142,160,255,.28)!important;background-color:#8ea0ff47!important;color:#cdd6ff!important}.theme-dark .copilot-connects-rail .rail-action-btn.rail-action-danger:not(#railNope):hover{background:rgba(240,149,149,.28)!important;background-color:#f0959547!important;color:#ffb9b9!important}.theme-dark .copilot-connects-rail .rail-action-btn.rail-action-confirm:not(#railNope){color:#5dcaa5!important}.theme-dark .copilot-connects-rail .rail-mini-btn.rail-mini-btn{background:transparent!important;background-color:transparent!important;border-color:#fff3!important;color:#eef1f8!important}.theme-dark .copilot-connects-rail .rail-mini-btn.rail-mini-danger{background:#E24B4A!important;background-color:#e24b4a!important;border-color:#e24b4a!important;color:#fff!important}.theme-dark .copilot-connects-rail .rail-rename input{background:rgba(255,255,255,.06)!important;border-color:#788cff80!important;color:#eef1f8!important}.copilot-connects-rail .rail-list{flex:1;overflow-y:auto;padding:8px;scrollbar-width:thin;scrollbar-color:rgba(20,23,33,.16) transparent}.copilot-connects-rail .rail-list::-webkit-scrollbar{width:3px!important;height:3px!important}.copilot-connects-rail .rail-list::-webkit-scrollbar-track{background:transparent!important}.copilot-connects-rail .rail-list::-webkit-scrollbar-thumb{background:rgba(20,23,33,.18)!important;border-radius:3px!important;border:0!important}.copilot-connects-rail .rail-list::-webkit-scrollbar-thumb:hover{background:rgba(20,23,33,.32)!important}.copilot-connects-rail .rail-list::-webkit-scrollbar-button{display:none!important;height:0!important}.theme-dark .copilot-connects-rail .rail-list::-webkit-scrollbar{width:3px!important;height:3px!important}.theme-dark .copilot-connects-rail .rail-list::-webkit-scrollbar-track{background:transparent!important}.theme-dark .copilot-connects-rail .rail-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2)!important;border-radius:3px!important}.copilot-connects-rail .rail-item{display:block;width:100%;text-align:left;position:relative;background:transparent;border:0;border-left:3px solid transparent;border-radius:7px;padding:6px 9px 6px 8px;margin-bottom:1px;cursor:pointer;transition:background .15s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.copilot-connects-rail .rail-item.opening{opacity:.65;pointer-events:none}.copilot-connects-rail .rail-item-spinner{position:absolute;right:8px;top:50%;width:14px;
1height:14px;margin-top:-7px;border:2px solid rgba(83,113,255,.25);border-top-color:#5371ff;border-radius:50%;animation:railSpin .7s linear infinite}@keyframes railSpin{to{transform:rotate(360deg)}}.copilot-connects-rail .rail-item:hover{background:rgba(83,113,255,.06);filter:brightness(.965)}.copilot-connects-rail .rail-active-dot{flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#1D9E75;animation:railActivePulse 1s ease-out infinite}@keyframes railActivePulse{0%{box-shadow:0 0 #1d9e7580}to{box-shadow:0 0 0 7px #1d9e7500}}.copilot-connects-rail .rail-item.active{background:rgba(83,113,255,.12);border-left-color:#5371ff;border-left-color:var(--Primary-Color, #5371FF);border-radius:0 7px 7px 0}.copilot-connects-rail .rail-item-name{display:block;flex:1;min-width:0;font-size:12px;font-weight:600;color:#1a1f2e;color:var(--text-primary, #1a1f2e);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.copilot-connects-rail .rail-item-id{display:block;font-size:10px;font-family:monospace;color:#8a90a8;color:var(--text-secondary, #8a90a8);white-space:nowrap;line-height:1.35}.copilot-connects-rail .rail-empty{font-size:12px;color:#8a90a8;color:var(--text-secondary, #8a90a8);text-align:center;padding:16px 6px}.copilot-connects-rail .rail-tooltip{position:fixed;left:334px;transform:translateY(-50%);background:#1a1f2e;color:#fff;font-size:12px;font-weight:500;line-height:1.4;padding:6px 12px;border-radius:7px;box-shadow:0 6px 18px #0f121e4d;max-width:280px;z-index:1002;pointer-events:none;white-space:normal}.copilot-connects-rail .rail-tooltip:before{content:"";position:absolute;left:-5px;top:50%;transform:translateY(-50%);border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #1a1f2e}body.theme-dark .copilot-connects-rail .rail-tooltip.rail-tooltip,.theme-dark .copilot-connects-rail .rail-tooltip.rail-tooltip,html.dark .copilot-connects-rail .rail-tooltip.rail-tooltip{background:#ffffff!important;background-color:#fff!important;color:#14161f!important;-webkit-text-fill-color:#14161f!important;box-shadow:0 6px 18px #0000008c}body.theme-dark .copilot-connects-rail .rail-tooltip.rail-tooltip:before,.theme-dark .copilot-connects-rail .rail-tooltip.rail-tooltip:before,html.dark .copilot-connects-rail .rail-tooltip.rail-tooltip:before{border-right-color:#fff!important}.copilot-panel.side-left.with-connects-rail{left:330px}@media (max-width: 767px){.copilot-panel.side-left{left:0;width:100vw;max-width:100vw}.copilot-panel.side-left.dashboard-context{left:0;width:100vw}.copilot-connects-rail{display:none}.copilot-panel.side-left.with-connects-rail{left:0}}.copilot-panel.side-free{right:auto;border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);border-radius:12px;box-shadow:0 8px 32px #0000001f;height:85vh;transform:none}.copilot-panel.side-free.open{transform:none}.copilot-panel.dragging{transition:none!important;box-shadow:0 8px 32px #0000002e;opacity:.92}.copilot-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color, #e5e7eb);flex-shrink:0}.drag-handle{display:flex;align-items:center;color:#9ca3af;color:var(--muted-text, #9ca3af);margin-right:4px;opacity:.5;transition:opacity .15s}.copilot-header:hover .drag-handle{opacity:1}.copilot-title{display:flex;align-items:center;grid-gap:8px;gap:8px}.copilot-label{font-weight:600;font-size:16px;color:#1f2937;color:var(--primary-text, #1f2937)}.copilot-badge{font-size:11px;font-weight:500;padding:2px 6px;border-radius:4px;background:#e0e7ff;color:#4338ca}.theme-dark .copilot-badge{background:#3730a3;color:#c7d2fe}.btn-close-copilot{padding:6px;border:none;background:transparent;color:#6b7280;color:var(--secondary-text, #6b7280);cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}.copilot-header-actions{display:flex;align-items:center;grid-gap:4px;gap:4px}.btn-icon-copilot{padding:6px;border:none;background:transparent;color:#6b7280;color:var(--secondary-text, #6b7280);cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}.btn-icon-copilot:hover{background:#f3f4f6;background:var(--tertiary-bg, #f3f4f6);color:#374151;color:var(--primary-text, #374151)}.btn-close-copilot:hover{background:#f3f4f6;background:var(--tertiary-bg, #f3f4f6);color:#374151;color:var(--primary-text, #374151)}.scroll-to-bottom-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1px solid rgba(0,0,0,.1);background:rgba(255,255,255,.7);color:#0006;cursor:pointer;box-shadow:0 1px 4px #0000000f;backdrop-filter:blur(4px);z-index:10;margin:-20px auto 4px}.scroll-to-bottom-btn:hover{background:rgba(255,255,255,.9);color:#0009}.theme-dark .scroll-to-bottom-btn{background:rgba(31,41,55,.6);border-color:#ffffff1a;color:#fff6;box-shadow:0 1px 4px #00000026}.theme-dark .scroll-to-bottom-btn:hover{background:rgba(55,65,81,.8);color:#ffffffb3}.message-feedback{display:flex;align-items:center;grid-gap:4px;gap:4px;margin-top:10px}.copilot-feedback-btn{padding:3px;border:none!important;background:none!important;color:#9ca3af!important;cursor:pointer;border-radius:4px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.copilot-feedback-btn:hover{color:#374151!important}.copilot-feedback-btn.feedback-selected{color:#4338ca!important;background:#e0e7ff!important}.copilot-feedback-btn.feedback-copied{color:#16a34a!important;background:#dcfce7!important}.theme-dark .copilot-feedback-btn{color:#fff!important;background:none!important}.theme-dark .copilot-feedback-btn:hover{color:#f3f4f6!important;background:rgba(255,255,255,.1)!important}.theme-dark .copilot-feedback-btn.feedback-selected{color:#5371ff!important;background:rgba(255,255,255,.15)!important}.theme-dark .copilot-feedback-btn.feedback-selected svg{stroke:#fff!important;fill:#5371ff!important}.theme-dark .copilot-feedback-btn.feedback-copied{color:#4ade80!important;background:rgba(74,222,128,.15)!important}.thought-indicator{font-size:12px;color:#9ca3af;color:var(--muted-text, #9ca3af);margin-right:4px}.thought-arrow{font-size:12px;color:#9ca3af;color:var(--muted-text, #9ca3af);margin-right:8px}.copilot-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;grid-gap:16px;gap:16px}.copilot-message{display:flex}.copilot-message.user{justify-content:flex-end}.copilot-message.assistant{justify-content:flex-start}.message-bubble{max-width:90%;padding:12px 16px;border-radius:12px;font-size:14px;line-height:1.5}.copilot-message.user .message-bubble{background:#5371FF;color:#fff}.copilot-message.assistant .message-bubble{background:#f3f4f6;background:var(--secondary-bg, #f3f4f6);color:#374151;color:var(--primary-text, #374151)}.theme-dark .copilot-message.assistant .message-bubble{background:#2a2d35;color:#e5e7eb}.message-bubble.thinking{display:flex;align-items:center;grid-gap:8px;gap:8px;padding:14px 18px}.typing-dots{display:flex;grid-gap:4px;gap:4px;align-items:center}.typing-dots span{width:6px;height:6px;border-radius:50%;background:#9ca3af;background:var(--muted-text, #9ca3af);animation:typingBounce 1.4s ease-in-out infinite}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typingBounce{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-4px)}}.message-content{margin:0;white-space:pre-wrap;word-break:break-word}.message-actions{margin-top:12px;display:flex;flex-wrap:wrap;grid-gap:8px;gap:8px}.btn-action{padding:8px 16px;border-radius:8px;background:#5371FF;color:#fff;border:none;font-size:14px;font-weight:500;cursor:pointer;transition:background .15s}.btn-action:hover{background:#435ce0}.btn-action.btn-action-connected:not(#railNope),.btn-action.btn-action-connected:not(#railNope):hover{background:#10b981!important;background-color:#10b981!important;color:#fff!important;opacity:1!important;cursor:default}.copilot-input-area{padding:16px;border-top:1px solid #e5e7eb;border-top:1px solid var(--border-color, #e5e7eb);flex-shrink:0}.copilot-input-wrapper{display:flex;align-items:flex-end;grid-gap:8px;gap:8px;background:#f9fafb;background:var(--input-bg, #f9fafb);border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);border-radius:10px;padding:4px 4px 4px 16px}.copilot-input{flex:1;min-width:0;border:none;background:transparent;font-size:14px;padding:10px 0;outline:none;color:#1f2937;color:var(--primary-text, #1f2937);resize:none;max-height:120px;overflow-y:auto;line-height:1.4;font-family:inherit}.copilot-input::-moz-placeholder{color:#9ca3af;color:var(--muted-text, #9ca3af)}.copilot-input::placeholder{color:#9ca3af;color:var(--muted-text, #9ca3af)}.btn-send{padding:8px;border:none;background:#5371FF;color:#fff;border-radius:8px;
1cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity .15s,background .15s}.btn-send:hover:not(:disabled){background:#435ce0}.btn-send:disabled{opacity:.5;cursor:not-allowed}.copilot-hint{margin:8px 0 0;font-size:12px;color:#9ca3af;color:var(--muted-text, #9ca3af)}.theme-loader{display:inline-flex;align-items:center}.theme-spinner{animation:themeSpin 1s linear infinite}@keyframes themeSpin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.task-history-container{display:flex;flex-direction:column;grid-gap:10px;gap:10px;margin-top:12px}.task-history-card{background:#fff;background:var(--primary-bg, #fff);border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);border-radius:10px;padding:12px 14px;transition:box-shadow .2s ease,border-color .2s ease}.task-history-card:hover{box-shadow:0 2px 8px #00000014;border-color:#5371ff40}.task-card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.task-card-number{font-size:11px;font-weight:600;color:#9ca3af;color:var(--muted-text, #9ca3af)}.task-card-status{font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px;text-transform:uppercase;letter-spacing:.5px}.task-card-status.success{background:#dcfce7;color:#16a34a}.task-card-status.failed{background:#fee2e2;color:#dc2626}.theme-dark .task-card-status.success{background:#14532d;color:#4ade80}.task-card-status.partial{background:#fef3c7;color:#d97706}.theme-dark .task-card-status.failed{background:#7f1d1d;color:#fca5a5}.theme-dark .task-card-status.partial{background:#854d0e;color:#fef08a}.task-card-title{font-size:13px;font-weight:600;color:#1f2937;color:var(--primary-text, #1f2937);margin-bottom:4px;line-height:1.3}.task-card-id{font-size:11px;color:#9ca3af;color:var(--muted-text, #9ca3af);margin-bottom:8px;display:flex;align-items:center;grid-gap:4px;gap:4px}.task-card-details{display:flex;flex-direction:column;grid-gap:4px;gap:4px}.task-card-row{display:flex;align-items:center;grid-gap:6px;gap:6px;font-size:11px;color:#6b7280;color:var(--secondary-text, #6b7280)}.task-card-row svg{flex-shrink:0;opacity:.6}.task-card-comment{margin-top:4px;padding-top:6px;border-top:1px dashed #e5e7eb;border-top:1px dashed var(--border-color, #e5e7eb)}.task-card-comment span{word-break:break-word;line-height:1.4}app-appypie-copilot .message-content.formatted{margin:0;word-break:break-word;line-height:1.6}app-appypie-copilot .message-content.formatted strong{font-weight:600;color:#1f2937;color:var(--primary-text, #1f2937)}app-appypie-copilot .message-content.formatted em{font-style:italic}app-appypie-copilot .message-content.formatted .copilot-inline-code{background:rgba(0,0,0,.06);background:var(--tertiary-bg, rgba(0, 0, 0, .06));padding:1px 5px;border-radius:4px;font-family:"SF Mono","Fira Code",monospace;font-size:12px}app-appypie-copilot .message-content.formatted .copilot-list{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;grid-gap:2px;gap:2px}app-appypie-copilot .message-content.formatted .copilot-list li{position:relative;padding-left:16px;line-height:1.5}app-appypie-copilot .message-content.formatted .copilot-list li:before{content:"";position:absolute;left:2px;top:8px;width:5px;height:5px;border-radius:50%;background:#5371FF}app-appypie-copilot .message-content.formatted .copilot-list li.numbered{counter-increment:copilot-list;padding-left:20px}app-appypie-copilot .message-content.formatted .copilot-list li.numbered:before{content:counter(copilot-list) ".";background:none;width:auto;height:auto;border-radius:0;top:0;left:0;font-size:12px;font-weight:600;color:#5371ff}.quick-actions{display:flex;flex-wrap:wrap;grid-gap:8px;gap:8px;padding:0 16px 12px;flex-shrink:0}.quick-action-chip{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;padding:7px 14px;border-radius:20px;border:1px solid #e5e7eb;border:1px solid var(--border-color, #e5e7eb);background:#fff;background:var(--primary-bg, #fff);color:#374151;color:var(--primary-text, #374151);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease;white-space:nowrap}.quick-action-chip:hover{border-color:#5371ff;background:rgba(83,113,255,.06);color:#5371ff}.chip-icon{font-size:14px;line-height:1}.chip-label{line-height:1}.quick-action-chip.followup{padding:6px 12px;font-size:12px;border-color:#5371ff40;color:#5371ff;background:rgba(83,113,255,.04)}.quick-action-chip.followup:hover{border-color:#5371ff;background:rgba(83,113,255,.1)}.agent-status-label{font-size:13px;font-weight:600;color:#5371ff;display:inline-block;letter-spacing:.01em}.agent-status-label.shimmer{background:linear-gradient(90deg,#5371FF 0%,#a9b8ff 25%,#5371FF 50%,#a9b8ff 75%,#5371FF 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:copilotShimmer 2.2s linear infinite}.theme-dark .agent-status-label.shimmer{background:linear-gradient(90deg,#8ea0ff 0%,#d6ddff 25%,#8ea0ff 50%,#d6ddff 75%,#8ea0ff 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}@keyframes copilotShimmer{0%{background-position:200% 0}to{background-position:0 0}}@media (prefers-reduced-motion: reduce){.agent-status-label.shimmer{animation:none}.agent-status-label{transition:none}}.btn-icon-copilot.active{background:#f3f4f6;background:var(--tertiary-bg, #f3f4f6);color:#5371ff;color:var(--accent, #5371FF)}.copilot-conversation-list{flex:1;overflow-y:auto;padding:8px;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color, #e5e7eb)}.conversation-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;
1cursor:pointer;transition:background .15s ease}.conversation-item:hover{background:#f3f4f6;background:var(--tertiary-bg, #f3f4f6)}.conversation-item.active{background:#f3f4f6;background:var(--tertiary-bg, #f3f4f6);border-left:3px solid #5371FF;border-left:3px solid var(--accent, #5371FF)}.conversation-item-content{display:flex;flex-direction:column;grid-gap:2px;gap:2px;overflow:hidden;flex:1;min-width:0}.conversation-title-row{display:flex;align-items:center;grid-gap:6px;gap:6px;min-width:0}.conversation-connect-icon{flex:0 0 auto;display:inline-flex;align-items:center;color:#5371ff;color:var(--Primary-Color, #5371FF)}.theme-dark .conversation-connect-icon:not(#railNope){color:#8ea0ff!important}.conversation-title{flex:1;min-width:0;font-size:13px;font-weight:500;color:#374151;color:var(--primary-text, #374151);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-date{font-size:11px;color:#9ca3af;color:var(--muted-text, #9ca3af)}.conversation-delete{display:none;padding:4px;border:none;background:transparent;color:#9ca3af;color:var(--muted-text, #9ca3af);cursor:pointer;border-radius:4px;flex-shrink:0}.conversation-item:hover .conversation-delete{display:flex}.conversation-delete:hover{background:#fee2e2;background:var(--danger-bg, #fee2e2);color:#ef4444;color:var(--danger, #ef4444)}.no-conversations{text-align:center;padding:24px 16px;font-size:13px;color:#9ca3af;color:var(--muted-text, #9ca3af)}.copilot-messages.hidden{display:none}.copilot-message.assistant.step-message{width:100%;padding-left:4px}.copilot-message.assistant.step-message+.copilot-message.assistant.step-message{margin-top:-14px}.copilot-message.assistant.step-message .message-bubble{background:transparent;color:#374151;color:var(--primary-text, #374151);border-left:2px solid rgba(83,113,255,.4);border-radius:0;padding:5px 12px;font-size:13px;max-width:100%;width:100%;position:relative}.copilot-message.assistant.step-message .message-bubble:before{content:"";position:absolute;left:-5px;top:50%;transform:translateY(-50%);width:8px;height:8px;border-radius:50%;background:#5371FF;border:2px solid #fff;border:2px solid var(--primary-bg, #fff)}.copilot-message.assistant:not(.step-message)+.copilot-message.assistant.step-message .message-bubble{padding-top:10px}.copilot-message.assistant.step-message+.copilot-message.assistant:not(.step-message){margin-top:4px}.theme-dark .copilot-message.assistant.step-message .message-bubble{background:transparent;color:#e5e7eb;border-left-color:#5371ff80}.theme-dark .copilot-message.assistant.step-message .message-bubble:before{border-color:#1a1c23;border-color:var(--primary-bg, #1a1c23)}[data-copilot-tip]{position:relative}[data-copilot-tip]:after{content:attr(data-copilot-tip);position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);background:#1a1f2e;color:#fff;font-size:11px;font-weight:500;line-height:1.3;white-space:nowrap;padding:4px 8px;border-radius:6px;box-shadow:0 4px 12px #0f121e40;opacity:0;visibility:hidden;pointer-events:none;z-index:1005}[data-copilot-tip]:hover:after{opacity:1;visibility:visible}.theme-dark [data-copilot-tip]:after{background:#ffffff!important;color:#14161f!important;-webkit-text-fill-color:#14161f!important;box-shadow:0 4px 12px #00000080}.copilot-deleted-notice{display:flex;align-items:flex-start;grid-gap:8px;gap:8px;margin:12px 0 0;padding:9px 12px;border-radius:8px;background:#FAEEDA;border:1px solid rgba(186,117,23,.3);color:#854f0b;font-size:12px;line-height:1.45}.copilot-deleted-notice .cdn-icon{flex:0 0 auto;margin-top:1px}.copilot-deleted-notice>span{flex:1;min-width:0}.copilot-deleted-notice-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin:-2px -4px 0 0;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;opacity:.65;cursor:pointer}.copilot-deleted-notice-close:hover{opacity:1;background:rgba(133,79,11,.12)}.theme-dark .copilot-deleted-notice-close:not(#railNope){background:transparent!important;color:#fac775!important;border-color:transparent!important;box-shadow:none!important}.theme-dark .copilot-deleted-notice-close:not(#railNope):hover{background:rgba(250,199,117,.18)!important}.theme-dark .copilot-deleted-notice:not(#railNope){background:rgba(186,117,23,.18)!important;border-color:#fac77559!important;color:#fac775!important;-webkit-text-fill-color:#FAC775!important}.copilot-connects-rail .rail-skeleton{display:flex;flex-direction:column;grid-gap:10px;gap:10px;padding:4px 2px}
1.copilot-connects-rail .rls-row{display:flex;flex-direction:column;grid-gap:5px;gap:5px;padding:2px 7px}.copilot-connects-rail .rls-line{height:10px;border-radius:5px;background:rgba(20,23,33,.07);animation:rlsPulse 1.2s ease-in-out infinite}.copilot-connects-rail .rls-name{width:72%}.copilot-connects-rail .rls-id{width:90%;height:8px}@keyframes rlsPulse{0%,to{opacity:.55}50%{opacity:1}}.theme-dark .copilot-connects-rail .rls-line:not(#railNope){background:rgba(255,255,255,.08)!important}\n'],encapsulation:2}),t})();function XB(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"a",8),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToOffer()}),o._uU(2,"Limited Time Offer: Get 20% Off"),o.qZA(),o.TgZ(3,"p",9),o.TgZ(4,"span",10),o._uU(5,"You're on a Trial plan"),o.qZA(),o._uU(6," - "),o.TgZ(7,"span",11),o._uU(8,"Only "),o.TgZ(9,"strong"),o._uU(10),o.qZA(),o._uU(11," left!"),o.qZA(),o.TgZ(12,"span",12),o._uU(13,"Enjoy premium features and "),o.TgZ(14,"a",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToPro()}),o._uU(15,"Upgrade Plan"),o.qZA(),o._uU(16," anytime to continue your AI-powered automation experience."),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(10),o.AsE("",t.daysLeft," ",1===t.daysLeft?"day":"days","")}}function tH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"p",9),o.TgZ(2,"span",10),o._uU(3,"Your trial has been cancelled."),o.qZA(),o._uU(4," - "),o.TgZ(5,"span",12),o.TgZ(6,"a",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToPro()}),o._uU(7,"Upgrade your Plan"),o.qZA(),o._uU(8," to regain access to premium features and keep your automations running smoothly."),o.qZA(),o.qZA(),o.qZA()}}function eH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"p",9),o.TgZ(2,"span",10),o._uU(3,"Experience the power of AI-driven automation."),o.qZA(),o._uU(4," - "),o.TgZ(5,"span",14),o._uU(6,"Activate your "),o.TgZ(7,"button",15),o.NdJ("click",function(){return o.CHM(t),o.oxw().getFreeTrial()}),o._uU(8,"7-day free trial "),o.qZA(),o._uU(9," now and explore premium features."),o.qZA(),o.qZA(),o.qZA()}}function nH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"p",9),o.TgZ(2,"span",10),o._uU(3,"Your 7-day free trial has ended."),o.qZA(),o._uU(4," - "),o.TgZ(5,"span",12),o.TgZ(6,"a",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToPro()}),o._uU(7,"Upgrade your Plan"),o.qZA(),o._uU(8," to regain access to premium features and keep your automations running smoothly."),o.qZA(),o.qZA(),o.qZA()}}function iH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"a",8),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToOffer()}),o._uU(2,"Limited Time Offer: Get 20% Off"),o.qZA(),o.TgZ(3,"p",9),o._uU(4,"Free trial tasks limit exhausted. Activate your plan now to resume service. "),o.TgZ(5,"a",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().unlockTrialNow()}),o._uU(6,"Upgrade your Plan"),o.qZA(),o.qZA(),o.qZA()}}function oH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",7),o.TgZ(1,"a",8),o.NdJ("click",function(){return o.CHM(t),o.oxw().upgradeToOffer()}),o._uU(2,"Limited Time Offer: Get 20% Off"),o.qZA(),o.TgZ(3,"p",9),o._uU(4,"7 days trial task limit has been exhausted. Activate now to resume service. "),o.TgZ(5,"a",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().unlockTrialNow()}),o._uU(6,"Upgrade your Plan"),o.qZA(),o.qZA(),o.qZA()}}let rH=(()=>{class t{constructor(t,e,n,i,o,r){this.customerService=t,this.router=e,this.cookieService=n,this.planService=i,this.commonService=o,this.modalService=r,this.appyConfig=go.N,this.daysLeft=7,this.isAlertShow=!1,this.OFFER_COUPON="NEWUSER20",this.unlockLoading=!1}ngOnInit(){this.calculateDaysLeft(),this.currentUser=this.customerService.GetCurrent(),("trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status)&&200===this.currentUser.used_task&&(this.isAlertShow=!0)}calculateDaysLeft(){const t=this.customerService.GetCurrent();if(!(null==t?void 0:t.trialEnd))return;const e=t=>t>1e12?t:1e3*t,n=864e5,i=e(t.trialEnd),o=t.trialStart?Math.round((i-e(t.trialStart))/n):7,r=Math.ceil((i-Date.now())/n);this.daysLeft=Math.max(0,Math.min(o,r))}upgradeToPro(){this.router.navigateByUrl("/plans")}upgradeToOffer(){this.currentUser=this.customerService.GetCurrent(),this.planService.checkStripeCoupon({couponCode:this.OFFER_COUPON}).subscribe(t=>this.showCouponPopup(!(!t||!t.alreadyApplied)),()=>this.showCouponPopup(!1))}showCouponPopup(t){t?this.modalService.show(wN,{initialState:{modelTitle:"Coupon already applied",modelContent:"You have already used this coupon.",primaryLabel:"Close",closeOnly:!0},class:"plan-change-modal modal-dialog-centered",ignoreBackdropClick:!0}):this.modalService.show(wN,{initialState:{modelTitle:"Upgrade Plan",modelContent:"Continue to upgrade your account with 20% off. Your free trial will end, and your paid subscription will start immediately.",primaryLabel:"Upgrade Plan",secondaryLabel:"Cancel",variant:"confirm"},class:"plan-change-modal modal-dialog-centered",ignoreBackdropClick:!0}).content.onPrimary.subscribe(()=>{this.router.navigateByUrl(`/portal-payment-handler/${this.currentUser.planId}/${this.currentUser.custom_planId}/yearly/${this.OFFER_COUPON}`)})}getFreeTrial(){this.router.navigateByUrl("/setup-editor")}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}unlockTrialNow(){var t,e,n,i,o,r;if(this.unlockLoading)return;this.currentUser=this.customerService.GetCurrent();const s=(null===(t=this.currentUser)||void 0===t?void 0:t.planId)||(null===(i=null===(n=null===(e=this.currentUser)||void 0===e?void 0:e.plan_details)||void 0===n?void 0:n[0])||void 0===i?void 0:i.planId);!s||(this.unlockLoading=!0,this.planService.createStripeCheckoutSession({planId:s,planPeriod:"yearly",currency:null===(o=this.currentUser)||void 0===o?void 0:o.customerCurrencyCode,countryCode:null===(r=this.currentUser)||void 0===r?void 0:r.countryCode,forceCheckout:!0,noTrial:!0}).subscribe(t=>{t&&t.success&&t.url?window.location.href=t.url:(this.unlockLoading=!1,console.error("Unlock checkout could not be started:",t&&t.msg),alert(t&&t.msg||"Could not start checkout. Please try again."))},t=>{this.unlockLoading=!1,console.error("Unlock checkout request failed:",t),alert("Could not start checkout. Please try again.")}))}upgradePlan(t,e){this.currentUser=this.customerService.GetCurrent(),this.customerInfo=this.currentUser,this.customerInfo.upgrade_plan_id=t.planId,this.customerInfo.currencyCode=t.currencyCode,this.customerInfo.countryCode=t.countryCode,this.customerInfo.planPeriod=t.paymentType,localStorage.setItem("planId",t.planId);const n=JSON.stringify({planId:t.planId,currencyCode:t.currencyCode,countryCode:t.countryCode,paymentType:t.paymentType}),i=btoa(encodeURIComponent(n));this.cookieService.set("custPlan",i,1,"/");var o=localStorage.getItem("mode");"jnpl1uik645c878la4sp"==o?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=o,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>
1{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(yo),o.Y36(ui.F0),o.Y36(lo.N),o.Y36(Zr),o.Y36(wo.v),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-day-free-trial"]],decls:16,vars:6,consts:[[1,"day_free_trial","position-fixed","top-0","start-0","w-100"],[1,"trial-container"],[1,"trial-content"],["class","trial-text-wrapper",4,"ngIf"],[1,"background-shine"],[1,"particles"],[1,"particle"],[1,"trial-text-wrapper"],[1,"trial-badge",3,"click"],[1,"trial-message"],[1,"highlight-text"],[1,"countdown-text","m-0"],[1,"trial-subtext"],["href","javascript:void(0)",1,"text-decoration-underline","text-white",3,"click"],[1,"trial-subtext","countdown-text","m-0"],["type","button",1,"countdown-text","m-0","dayfree-trial-btn",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.YNc(3,XB,17,2,"div",3),o.YNc(4,tH,9,0,"div",3),o.YNc(5,eH,10,0,"div",3),o.YNc(6,nH,9,0,"div",3),o.YNc(7,iH,7,0,"div",3),o.YNc(8,oH,7,0,"div",3),o.qZA(),o._UZ(9,"div",4),o.TgZ(10,"div",5),o._UZ(11,"span",6),o._UZ(12,"span",6),o._UZ(13,"span",6),o._UZ(14,"span",6),o._UZ(15,"span",6),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(3),o.Q6J("ngIf",e.daysLeft>0&&"jc0fgwefcky2"!==(null==e.currentUser?null:e.currentUser.planId)&&!e.isAlertShow),o.xp6(1),o.Q6J("ngIf","canceled"===(null==e.currentUser?null:e.currentUser.payment_status)&&!e.isAlertShow),o.xp6(1),o.Q6J("ngIf","jc0fgwefcky2"===(null==e.currentUser?null:e.currentUser.planId)&&"canceled"!==(null==e.currentUser?null:e.currentUser.payment_status)&&!e.isAlertShow),o.xp6(1),o.Q6J("ngIf",0==e.daysLeft&&"jc0fgwefcky2"!==(null==e.currentUser?null:e.currentUser.planId)&&!e.isAlertShow),o.xp6(1),o.Q6J("ngIf","trialWithoutCC"===e.currentUser.payment_status&&e.isAlertShow),o.xp6(1),o.Q6J("ngIf","trialWithoutCC"!==e.currentUser.payment_status&&"trial"===e.currentUser.payment_status&&e.isAlertShow))},directives:[to.O5],styles:[".day_free_trial[_ngcontent-%COMP%]{background:linear-gradient(135deg,#5371FF 0%,#2E6CFF 50%,#1E5AE8 100%);color:#fff;font-size:14px;font-weight:500;z-index:99;box-shadow:0 4px 20px #5371ff4d,0 2px 8px #0000001a;overflow:hidden;position:relative;animation:slideDown .6s cubic-bezier(.68,-.55,.265,1.55)}@keyframes slideDown{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.trial-container[_ngcontent-%COMP%]{position:relative;max-width:1400px;margin:0 auto;padding:16px;display:flex;align-items:center;justify-content:space-between;grid-gap:20px;gap:20px;min-height:60px}.trial-content[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:16px;gap:16px;flex:1;flex-wrap:wrap;justify-content:center}.trial-icon-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:48px;height:48px;flex-shrink:0}.trial-icon[_ngcontent-%COMP%]{position:relative;z-index:2;color:#fff;animation:iconBounce 2s ease-in-out infinite;filter:drop-shadow(0 2px 4px rgba(255,255,255,.3))}@keyframes iconBounce{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.05)}}.icon-pulse[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border-radius:50%;background:rgba(255,255,255,.2);animation:pulse 2s ease-in-out infinite}@keyframes pulse{0%,to{transform:scale(1);opacity:.6}50%{transform:scale(1.3);opacity:0}}.trial-text-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;grid-gap:12px;gap:12px;flex:1;
1min-width:200px;flex-wrap:nowrap}.trial-badge[_ngcontent-%COMP%]{display:inline-block;background:rgba(255,255,255,.2);backdrop-filter:blur(10px);padding:4px 12px;border-radius:12px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;width:-moz-fit-content;width:fit-content;animation:badgeGlow 3s ease-in-out infinite;border:1px solid rgba(255,255,255,.3);color:#ffe66d!important;flex:0 0 auto}@keyframes badgeGlow{0%,to{box-shadow:0 0 8px #ffffff4d}50%{box-shadow:0 0 16px #ffffff80}}.trial-message[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:500;line-height:1.4;animation:fadeInUp .8s ease-out .2s both;display:flex;align-items:center;grid-gap:8px;gap:8px;flex-wrap:wrap}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.highlight-text[_ngcontent-%COMP%]{font-weight:600;color:#ffe66d!important;text-shadow:0 2px 4px rgba(0,0,0,.2)}.countdown-text[_ngcontent-%COMP%]{font-weight:500;color:#fff}.countdown-text[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:700;color:#ffe66d!important;animation:countdownPulse 2s ease-in-out infinite;text-shadow:0 2px 8px rgba(255,230,109,.5)}@keyframes countdownPulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}.trial-subtext[_ngcontent-%COMP%]{margin:0;font-size:12px;opacity:.9;animation:fadeInUp .8s ease-out .4s both;display:inline}.upgrade_btn[_ngcontent-%COMP%]{position:relative;background:#fff;color:#5371ff;font-size:14px;font-weight:600;border-radius:50px;border:2px solid transparent;padding:6px 18px;display:inline-flex;align-items:center;grid-gap:8px;gap:8px;transition:all .3s cubic-bezier(.4,0,.2,1);overflow:hidden;white-space:nowrap;animation:fadeInUp .8s ease-out .6s both;box-shadow:0 4px 12px #ffffff4d}.upgrade_btn[_ngcontent-%COMP%]:hover{background:#FFE66D;color:#1e5ae8;transform:translateY(-2px);box-shadow:0 6px 20px #ffe66d66;border-color:#ffe66d}.upgrade_btn[_ngcontent-%COMP%]:active{transform:translateY(0)}.btn-text[_ngcontent-%COMP%]{position:relative;z-index:2}.btn-arrow[_ngcontent-%COMP%]{position:relative;z-index:2;transition:transform .3s ease}.upgrade_btn[_ngcontent-%COMP%]:hover   .btn-arrow[_ngcontent-%COMP%]{transform:translate(4px)}.btn-shine[_ngcontent-%COMP%]{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transition:left .5s ease}.upgrade_btn[_ngcontent-%COMP%]:hover   .btn-shine[_ngcontent-%COMP%]{left:100%}.close_btn[_ngcontent-%COMP%]{background:rgba(255,255,255,.15);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2);border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;padding:0;color:#fff;cursor:pointer;transition:all .3s ease;flex-shrink:0;animation:fadeInUp .8s ease-out .8s both}.close_btn[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.25);transform:rotate(90deg) scale(1.1);box-shadow:0 4px 12px #fff3}.close_btn[_ngcontent-%COMP%]:active{transform:rotate(90deg) scale(.95)}.close_btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:16px;height:16px}.background-shine[_ngcontent-%COMP%]{position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(45deg,transparent 30%,rgba(255,255,255,.1) 50%,transparent 70%);transform:rotate(45deg);animation:shine 8s linear infinite;pointer-events:none}@keyframes shine{0%{transform:translate(-100%) translateY(-100%) rotate(45deg)}to{transform:translate(100%) translateY(100%) rotate(45deg)}}.particles[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.particle[_ngcontent-%COMP%]{position:absolute;width:4px;height:4px;background:rgba(255,255,255,.6);border-radius:50%;animation:float 6s ease-in-out infinite}.particle[_ngcontent-%COMP%]:nth-child(1){left:10%;animation-delay:0s;animation-duration:5s}.particle[_ngcontent-%COMP%]:nth-child(2){left:30%;animation-delay:1s;animation-duration:6s}.particle[_ngcontent-%COMP%]:nth-child(3){left:50%;animation-delay:2s;animation-duration:7s}.particle[_ngcontent-%COMP%]:nth-child(4){left:70%;animation-delay:1.5s;animation-duration:5.5s}.particle[_ngcontent-%COMP%]:nth-child(5){left:90%;animation-delay:.5s;animation-duration:6.5s}@keyframes float{0%{transform:translateY(100%) translate(0);opacity:0}
110%{opacity:1}90%{opacity:1}to{transform:translateY(-100%) translate(20px);opacity:0}}@media (max-width: 768px){.trial-container[_ngcontent-%COMP%]{padding:8px;flex-direction:column;grid-gap:8px;gap:8px}.trial-content[_ngcontent-%COMP%]{flex-direction:column;text-align:center;grid-gap:8px;gap:8px;width:100%}.trial-icon-wrapper[_ngcontent-%COMP%]{width:40px;height:40px}.trial-icon[_ngcontent-%COMP%]{width:20px;height:20px}.trial-text-wrapper[_ngcontent-%COMP%]{align-items:center;min-width:auto;flex-direction:column;grid-gap:8px;gap:8px}.trial-message[_ngcontent-%COMP%]{font-size:11px;text-align:center;flex-direction:row;grid-gap:4px;gap:4px;justify-content:center}.trial-subtext[_ngcontent-%COMP%]{font-size:11px;text-align:center;display:block}.upgrade_btn[_ngcontent-%COMP%]{width:100%;justify-content:center;padding:10px 20px;font-size:11px}.close_btn[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;width:28px;height:28px}.trial-badge[_ngcontent-%COMP%]{display:none}.countdown-text[_ngcontent-%COMP%]{font-size:11px}}@media (max-width: 480px){.trial-message[_ngcontent-%COMP%]{font-size:11px}.trial-subtext[_ngcontent-%COMP%]{font-size:10px}.upgrade_btn[_ngcontent-%COMP%]{font-size:13px;padding:8px 18px}}.dayfree-trial-btn[_ngcontent-%COMP%]{display:inline-block;background:rgba(255,255,255,.2);backdrop-filter:blur(10px);padding:4px 12px;border-radius:12px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;width:-moz-fit-content;width:fit-content;animation:badgeGlow 3s ease-in-out infinite;border:1px solid rgba(255,255,255,.3);color:#ffe66d!important}"]}),t})(),sH=(()=>{class t{constructor(t,e){this.authService=t,this.cookieService=e}logout(){this.authService.logout({originUrl:"/"}).subscribe(t=>{this.cookieService.deleteAll("/","loop.flozic.ai"),this.cookieService.deleteAll("/",".appypie.com"),window.location.href=t&&t.redirectUrl?t.redirectUrl:"/"})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(uo),o.Y36(lo.N))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-access-suspended"]],decls:16,vars:0,consts:[[1,"access-suspended-overlay"],[1,"access-suspended-card"],[1,"lock-icon-wrapper"],["xmlns","http://www.w3.org/2000/svg","width","40","height","40","viewBox","0 0 24 24","fill","none","stroke","#dc3545","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["x","3","y","11","width","18","height","11","rx","2","ry","2"],["d","M7 11V7a5 5 0 0 1 10 0v4"],["cx","12","cy","16","r","1"],[1,"suspended-title"],[1,"suspended-message"],[1,"suspended-divider"],[1,"suspended-help"],[1,"btn-logout",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.O4$(),o.TgZ(3,"svg",3),o._UZ(4,"rect",4),o._UZ(5,"path",5),o._UZ(6,"circle",6),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"h1",7),o._uU(8,"Account Disabled"),o.qZA(),o.TgZ(9,"p",8),o._uU(10," Your account has been disabled by your administrator. You are currently unable to access this platform. "),o.qZA(),o._UZ(11,"div",9),o.TgZ(12,"p",10),o._uU(13," If you believe this is a mistake, please reach out to your organization's administrator to re-enable your account. "),o.qZA(),o.TgZ(14,"button",11),o.NdJ("click",function(){return e.logout()}),o._uU(15," Sign Out "),o.qZA(),o.qZA(),o.qZA())},styles:['.access-suspended-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.4);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;z-index:99999;overflow:hidden}.access-suspended-card[_ngcontent-%COMP%]{background:#ffffff;background:var(--card-bg, #ffffff);border:1px solid #f1f3f4;border:1px solid var(--tertiary-bg, #f1f3f4);border-radius:16px;padding:48px 40px;max-width:460px;width:90%;text-align:center;box-shadow:0 20px 60px #00000026;animation:fadeInUp .5s ease-out;font-family:"Poppins",sans-serif}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.lock-icon-wrapper[_ngcontent-%COMP%]{width:88px;height:88px;background:rgba(220,53,69,.08);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 24px;border:2px solid rgba(220,53,69,.15);animation:pulse 2.5s ease-in-out infinite}@keyframes pulse{0%,to{box-shadow:0 0 #dc354526}50%{box-shadow:0 0 0 12px #dc354500}}.suspended-title[_ngcontent-%COMP%]{color:#212529;color:var(--primary-text, #212529);font-size:24px;font-weight:700;margin:0 0 12px}.suspended-message[_ngcontent-%COMP%]{color:#6c757d;color:var(--secondary-text, #6c757d);font-size:15px;line-height:1.6;margin:0 0 20px}.suspended-divider[_ngcontent-%COMP%]{width:50px;height:2px;background:#5371FF;background:var(--accent-color, #5371FF);opacity:.4;margin:0 auto 20px;border-radius:2px}.suspended-help[_ngcontent-%COMP%]{color:#6c757d;color:var(--secondary-text, #6c757d);font-size:13px;line-height:1.5;margin:0 0 28px;opacity:.7}.btn-logout[_ngcontent-%COMP%]{background:#5371FF;background:var(--accent-color, #5371FF);border:none;color:#fff;padding:10px 36px;border-radius:50px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease}.btn-logout[_ngcontent-%COMP%]:hover{opacity:.9;transform:translateY(-1px);box-shadow:0 4px 12px #5371ff4d}.btn-logout[_ngcontent-%COMP%]:active{transform:translateY(0)}']}
1),t})();function aH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",12),o.TgZ(1,"div",13),o.O4$(),o.TgZ(2,"svg",14),o._UZ(3,"path",15),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5," Impersonating "),o.TgZ(6,"strong"),o._uU(7),o.qZA(),o._uU(8," as admin "),o.TgZ(9,"strong"),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",16),o.TgZ(12,"button",17),o.NdJ("click",function(){return o.CHM(t),o.oxw().hideImpersonationBanner()}),o.O4$(),o.TgZ(13,"svg",18),o._UZ(14,"polyline",19),o.qZA(),o.qZA(),o.kcU(),o.TgZ(15,"button",20),o.NdJ("click",function(){return o.CHM(t),o.oxw().exitImpersonation()}),o._uU(16),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(7),o.Oqu(null==t.currentUser?null:t.currentUser.email),o.xp6(3),o.Oqu(null==t.currentUser||null==t.currentUser.impersonatedBy?null:t.currentUser.impersonatedBy.email),o.xp6(5),o.Q6J("disabled",t.exitingImpersonation),o.xp6(1),o.hij(" ",t.exitingImpersonation?"Exiting\u2026":"Exit impersonation"," ")}}function cH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",21),o.NdJ("click",function(){return o.CHM(t),o.oxw().showImpersonationBanner()}),o.O4$(),o.TgZ(1,"svg",22),o._UZ(2,"path",15),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.MGl("title","Impersonating ",null==t.currentUser?null:t.currentUser.email," \u2014 click to show banner")}}function lH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",31),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).loadJs()}),o.O4$(),o.TgZ(1,"svg",32),o._UZ(2,"path",33),o._UZ(3,"path",34),o._UZ(4,"path",35),o._UZ(5,"path",36),o.qZA(),o.qZA()}}function dH(t,e){1&t&&(o.TgZ(0,"div",37),o.TgZ(1,"a",38),o.O4$(),o.TgZ(2,"svg",39),o.TgZ(3,"g",40),o._UZ(4,"path",41),o._UZ(5,"path",42),o.qZA(),o.qZA(),o._uU(6," Create Loop "),o.qZA(),o.qZA())}function uH(t,e){if(1&t&&(o.TgZ(0,"div",28),o.YNc(1,lH,6,0,"button",29),o.YNc(2,dH,7,0,"div",30),o.qZA()),2&t){const t=o.oxw(3);o.Q6J("hidden",!t.showCreateAConnectBtn),o.xp6(1),o.Q6J("ngIf",!(t.showGlobalCopilot&&!t.isCustomEditorRoute)),o.xp6(1),o.Q6J("ngIf",t.showCreateAConnectBtn)}}function pH(t,e){if(1&t&&(o.TgZ(0,"span"),o._UZ(1,"img",59),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.s9C("src",t.appyConfig.cdnMediaPath+t.imageIconSearch,o.LSH)}}function hH(t,e){1&t&&o._UZ(0,"i",60)}function gH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",65),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(6).getSearchNameValue(e)}),o._UZ(1,"img",59),o.TgZ(2,"span"),o._uU(3),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(6);o.xp6(1),o.s9C("src",n.appyConfig.cdnMediaPath+t.image,o.LSH),o.xp6(2),o.Oqu(t.displayName)}}function fH(t,e){if(1&t&&(o.TgZ(0,"ul",63),o.YNc(1,gH,4,2,"li",64),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngForOf",t.recordsSearch)}}function mH(t,e){if(1&t&&(o.TgZ(0,"ul"),o.TgZ(1,"li"),o.TgZ(2,"span"),o._uU(3),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(5);o.xp6(3),o.Oqu(t.translation.NO_SEARCH_FOUND)}}function vH(t,e){if(1&t&&(o.TgZ(0,"div",61),o.YNc(1,fH,2,1,"ul",62),o.YNc(2,mH,4,1,"ul",4),o.qZA()),2&t){const t=o.oxw(4);o.Udp("display",t.isTrueAction?"block":"none"),o.xp6(1),o.Q6J("ngIf",t.recordsSearch&&t.recordsSearch[0]),o.xp6(1),o.Q6J("ngIf",!t.recordsSearch||0==t.recordsSearch.length)}}function bH(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",66),o.TgZ(2,"span",67),o.O4$(),o.TgZ(3,"svg",68),o._UZ(4,"path",69),o.qZA(),o.kcU(),o.TgZ(5,"span",70),o._uU(6,"AI Agent"),o.qZA(),o.qZA(),o.TgZ(7,"span",71),o._uU(8,"Build & Manage AI Agents, Voice & GPTs"),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId))}}function xH(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"div",72),o.TgZ(2,"button",73),o._UZ(3,"img",74),o.TgZ(4,"span",70),o._uU(5),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(5),o.hij(" ",t.translation.UPGRADE_PLAN,"")}}function _H(t,e){1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",75),o.TgZ(2,"span",76),o._uU(3,"New Interface"),o.qZA(),o.O4$(),o.TgZ(4,"svg",77),o._UZ(5,"path",78),o._UZ(6,"path",79),o._UZ(7,"path",80),o.qZA(),o.qZA(),o.qZA())}function CH(t,e){1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",81),o.O4$(),o.TgZ(2,"svg",68),o._UZ(3,"path",82),o.qZA(),o.qZA(),o.qZA())}function wH(t,e){if(1&t&&o._UZ(0,"span",87),2&t){const t=o.oxw(5);o.Q6J("innerHtml",t.setNameLetter(),o.oJD)}}function yH(t,e){if(1&t&&o._UZ(0,"span",112),2&t){const t=o.oxw(6);o.Q6J("innerHtml",t.setNameLetter(),o.oJD)}}
1function AH(t,e){if(1&t&&(o.TgZ(0,"span",113),o.TgZ(1,"span",114),o._uU(2,"Sub-account of"),o.qZA(),o.TgZ(3,"strong",115),o._uU(4),o.qZA(),o.qZA()),2&t){const t=o.oxw(6);o.xp6(4),o.hij("(",t.currentUser.adminEmail,")")}}function ZH(t,e){1&t&&o.GkF(0)}function kH(t,e){1&t&&o.GkF(0)}function TH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",101),o.TgZ(1,"a",116),o.NdJ("click",function(){return o.CHM(t),o.oxw(6).closeDropdown()}),o.O4$(),o.TgZ(2,"svg",68),o._UZ(3,"path",117),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"Admin"),o.qZA(),o.qZA(),o.qZA()}}function OH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",88),o.TgZ(1,"ul",89),o.TgZ(2,"li",90),o.YNc(3,yH,1,1,"span",91),o.TgZ(4,"div",92),o.TgZ(5,"p",93),o._UZ(6,"span",94),o._UZ(7,"span",95),o.qZA(),o.TgZ(8,"a",96),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(5);return e.copyToClipboard(e.currentUser.email)}),o.qZA(),o.YNc(9,AH,5,1,"span",97),o.qZA(),o.qZA(),o._UZ(10,"li",98),o.YNc(11,ZH,1,0,"ng-container",99),o.qZA(),o.YNc(12,kH,1,0,"ng-container",99),o.TgZ(13,"ul",100),o.TgZ(14,"li",101),o.TgZ(15,"a",102),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).closeDropdown()}),o.O4$(),o.TgZ(16,"svg",103),o._UZ(17,"path",104),o.qZA(),o.kcU(),o._UZ(18,"span",105),o.qZA(),o.qZA(),o.TgZ(19,"li",101),o.TgZ(20,"a",106),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).billingOverview()}),o.O4$(),o.TgZ(21,"svg",68),o._UZ(22,"path",107),o.qZA(),o.kcU(),o._UZ(23,"span",105),o.qZA(),o.qZA(),o.YNc(24,TH,6,0,"li",108),o.TgZ(25,"li",109),o.TgZ(26,"a",110),o.NdJ("click",function(){return o.CHM(t),o.oxw(5).logout()}),o.O4$(),o.TgZ(27,"svg",103),o._UZ(28,"path",111),o.qZA(),o.kcU(),o._UZ(29,"span",105),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(5),e=o.MAs(17),n=o.MAs(19);o.xp6(3),o.Q6J("ngIf",t.profile_image_url),o.xp6(3),o.Q6J("innerHTML",t.currentUser.firstName+" "+t.currentUser.lastName,o.oJD),o.xp6(1),o.Q6J("innerHtml",null==t.currentUser||null==t.currentUser.plan_details[0]?null:t.currentUser.plan_details[0].planName,o.oJD),o.xp6(1),o.Q6J("innerHtml",t.currentUser.email,o.oJD),o.xp6(1),o.Q6J("ngIf",t.currentUser.isSubUser&&t.currentUser.adminEmail),o.xp6(2),o.Q6J("ngTemplateOutlet",e),o.xp6(1),o.Q6J("ngTemplateOutlet",n),o.xp6(6),o.Q6J("innerHtml",t.translation.PROFILE,o.oJD),o.xp6(5),o.Q6J("innerHtml",t.translation.BILLING_OVERVIEW,o.oJD),o.xp6(1),o.Q6J("ngIf",null==t.currentUser?null:t.currentUser.isAdmin),o.xp6(5),o.Q6J("innerHtml",t.translation.LOG_OUT,o.oJD)}}const MH=function(t){return{show:t}};function IH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",83),o.TgZ(1,"button",84),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).ProfileClick()}),o.YNc(2,wH,1,1,"span",85),o.qZA(),o.YNc(3,OH,30,11,"div",86),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngClass",o.VKq(3,MH,t.showDropdown)),o.xp6(1),o.Q6J("ngIf",t.profile_image_url),o.xp6(1),o.Q6J("ngIf",t.showDropdown)}}const SH=function(){return{display:"unset"}};function PH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",43),o.TgZ(1,"div",44),o.TgZ(2,"div",45),o.TgZ(3,"button",46),o.YNc(4,pH,2,1,"span",4),o.YNc(5,hH,1,0,"i",47),o.qZA(),o.qZA(),o.TgZ(6,"input",48),o.NdJ("keyup",function(e){return o.CHM(t),o.oxw(3).SearchFilter(e)})("blur",function(){return o.CHM(t),o.oxw(3).hideListSearch()})("ngModelChange",function(e){return o.CHM(t),o.oxw(3).searchDisplayModel=e})("click",function(e){return o.CHM(t),o.oxw(3).toggleSearch(e)}),o.qZA(),o.TgZ(7,"div",49),o.TgZ(8,"button",50),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).clearSearchInput()}),o._UZ(9,"span",51),o.qZA(),o.qZA(),o.YNc(10,vH,3,4,"div",52),o.qZA(),o.TgZ(11,"ul",53),o.YNc(12,bH,9,1,"li",4),o.YNc(13,xH,6,1,"li",4),o.YNc(14,_H,8,0,"li",4),o.YNc(15,CH,4,0,"li",4),o.TgZ(16,"li",54),o._UZ(17,"app-theme-toggle",55),o.qZA(),o.TgZ(18,"li",56),o.TgZ(19,"div",57),o._uU(20,"Your profile and settings"),o.qZA(),o.YNc(21,IH,4,5,"div",58),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(4),o.Q6J("ngIf",t.searchDisplayModel.length>0),o.xp6(1),o.Q6J("ngIf",0==t.searchDisplayModel.length),o.xp6(1),o.s9C("placeholder",t.translation.CUSTOM_SEARCH_APPS),o.Q6J("ngModel",t.searchDisplayModel),o.xp6(1),o.Q6J("ngStyle",1==t.isTrueAction&&o.DdM(14,SH)),o.xp6(3),o.Q6J("ngIf",t.isTrueAction),o.xp6(2),o.Q6J("ngIf",!t.useNewShell),o.xp6(1),o.Q6J("ngIf",!(t.hideUpgradeBtn||null!=t.currentUser&&t.currentUser.isSubUser)),o.xp6(1),o.Q6J("ngIf",!t.useNewShell),o.xp6(1),o.Q6J("ngIf","jc0fgwefcky2"!==(null==t.currentUser?null:t.currentUser.planId)),o.xp6(2),o.Q6J("variant","icon")("size","md")("showLabel",!1),o.xp6(4),o.Q6J("ngIf",t.currentUser)}}const NH=function(t,e,n,i,o){return{"hidemenu side-task-alert":t,headerClass:!0,headeractive:e,taskalert:n,day_free_trialHeader:i,"copilot-open":o}};
1function qH(t,e){if(1&t&&(o.TgZ(0,"header",25),o.YNc(1,uH,3,3,"div",26),o.YNc(2,PH,22,15,"div",27),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("id",t.headerId)("ngClass",o.qbA(4,NH,!t.showCreateAConnectBtn,t.isMenuBarActive,t.checkAlert(),t.showDayFreeTrial||"jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId),t.showGlobalCopilot&&!t.isCustomEditorRoute)),o.xp6(1),o.Q6J("ngIf",t.currentUser),o.xp6(1),o.Q6J("ngIf",t.currentUser&&t.showCreateAConnectBtn)}}const UH=function(t){return{rempadd:t}};function EH(t,e){if(1&t&&(o.TgZ(0,"div",23),o.YNc(1,qH,3,10,"header",24),o.qZA()),2&t){const t=o.oxw();o.Q6J("id",t.showCreateAConnectBtn?"page-container":"page-container-customeditor")("ngClass",o.VKq(3,UH,!t.showCreateAConnectBtn)),o.xp6(1),o.Q6J("ngIf",t.showHead&&t.showCreateAConnectBtn)}}function FH(t,e){1&t&&o._UZ(0,"img",192)}function DH(t,e){1&t&&o._UZ(0,"img",193)}function LH(t,e){1&t&&o._UZ(0,"img",194)}function JH(t,e){1&t&&o._UZ(0,"img",195)}function jH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",196),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).loadJs()}),o.O4$(),o.TgZ(1,"svg",197),o._UZ(2,"path",33),o._UZ(3,"path",34),o._UZ(4,"path",35),o._UZ(5,"path",36),o.qZA(),o.qZA()}}function RH(t,e){if(1&t&&(o.TgZ(0,"li",198),o.TgZ(1,"a",199),o.TgZ(2,"span",127),o.O4$(),o.TgZ(3,"svg",200),o.TgZ(4,"g",40),o._UZ(5,"path",41),o._UZ(6,"path",42),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"span",201),o._uU(8,"Create Loop"),o.qZA(),o.qZA(),o.TgZ(9,"span",202),o._uU(10,"Create Loop"),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId))}}const $H=function(t){return{hidemenu:t}};function BH(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",180),o.TgZ(1,"li",181),o.TgZ(2,"a",182),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).goToConnects()}),o.YNc(3,FH,1,0,"img",183),o.YNc(4,DH,1,0,"img",184),o.YNc(5,LH,1,0,"img",185),o.YNc(6,JH,1,0,"img",186),o.qZA(),o.YNc(7,jH,6,0,"button",187),o.qZA(),o.YNc(8,RH,11,1,"li",188),o.TgZ(9,"li",189),o.TgZ(10,"div",190),o.TgZ(11,"p",191),o._UZ(12,"span",94),o._UZ(13,"span",95),o.qZA(),o.TgZ(14,"a",96),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(3);return e.copyToClipboard(null==e.currentUser?null:e.currentUser.email)}),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.Q6J("ngClass",o.VKq(12,$H,!t.showCreateAConnectBtn)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(1),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.plan_details&&null!=t.currentUser&&t.currentUser.plan_details[0]&&"enterprise"==(null==t.currentUser?null:t.currentUser.plan_details[0].identifire))),o.xp6(1),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.plan_details&&null!=t.currentUser&&t.currentUser.plan_details[0]&&"enterprise"==(null==t.currentUser?null:t.currentUser.plan_details[0].identifire))),o.xp6(1),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.plan_details&&null!=t.currentUser&&t.currentUser.plan_details[0]&&"enterprise"==(null==t.currentUser?null:t.currentUser.plan_details[0].identifire))),o.xp6(1),o.Q6J("ngIf",(null==t.currentUser?null:t.currentUser.plan_details)&&(null==t.currentUser?null:t.currentUser.plan_details[0])&&"enterprise"==(null==t.currentUser?null:t.currentUser.plan_details[0].identifire)),o.xp6(1),o.Q6J("ngIf",!(t.showGlobalCopilot&&!t.isCustomEditorRoute)),o.xp6(1),o.Q6J("ngIf",t.showCreateAConnectBtn),o.xp6(4),o.Q6J("innerHTML",(null==t.currentUser?null:t.currentUser.firstName)+" "+(null==t.currentUser?null:t.currentUser.lastName),o.oJD),o.xp6(1),o.Q6J("innerHtml",null!=t.currentUser&&t.currentUser.plan_details&&t.currentUser.plan_details[0]?t.currentUser.plan_details[0].planName:"",o.oJD),o.xp6(1),o.Q6J("innerHtml",null==t.currentUser?null:t.currentUser.email,o.oJD)}}const HH=function(t){return{active:t}};function QH(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"a",203),o.TgZ(2,"span",127),o.O4$(),o.TgZ(3,"svg",204),o._UZ(4,"path",205),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"abbr",131),o._uU(6,"User Management"),o.qZA(),o.qZA(),o.TgZ(7,"span",206),o._uU(8,"User Management"),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngClass",o.VKq(2,HH,"team-moderator"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId))}}function YH(t,e){1&t&&(o.TgZ(0,"div",211),o._UZ(1,"div",212),o._UZ(2,"div",213),o.qZA())}const zH=function(){return[1,2,3]};function VH(t,e){1&t&&(o.TgZ(0,"div",209),o.YNc(1,YH,3,0,"div",210),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngForOf",o.DdM(1,zH)))}function GH(t,e){1&t&&o.GkF(0)}const WH=function(t){return{$implicit:t,depth:0}};
1function KH(t,e){if(1&t&&(o.ynx(0),o.YNc(1,GH,1,0,"ng-container",216),o.BQk()),2&t){const t=e.$implicit;o.oxw(5);const n=o.MAs(14);o.xp6(1),o.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",o.VKq(2,WH,t))}}function XH(t,e){1&t&&(o.TgZ(0,"div",217),o._uU(1,"No folders yet"),o.qZA())}function tQ(t,e){if(1&t&&(o.ynx(0),o.YNc(1,KH,2,4,"ng-container",214),o.YNc(2,XH,2,0,"div",215),o.BQk()),2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngForOf",t.sidebarFolderTree),o.xp6(1),o.Q6J("ngIf",0===t.sidebarFolderTree.length)}}function eQ(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"div",207),o.YNc(2,VH,2,2,"div",208),o.YNc(3,tQ,3,2,"ng-container",4),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.Q6J("ngIf",t.isSidebarFoldersLoading&&0===t.sidebarFolderTree.length),o.xp6(1),o.Q6J("ngIf",!t.isSidebarFoldersLoading||t.sidebarFolderTree.length>0)}}function nQ(t,e){if(1&t&&o._UZ(0,"small",105),2&t){const t=o.oxw(5);o.Q6J("innerHtml","trialWithoutCC"!==t.currentUser.payment_status&&"trial"!==t.currentUser.payment_status||t.isBillingDateValid()?t.currentUser.used_task+" / "+(t.currentUser.plan_details[0].custom_plans&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId]&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks?t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks:t.currentUser.plan_details[0].tasks):"0 / 0",o.oJD)}}function iQ(t,e){if(1&t&&o._UZ(0,"small",105),2&t){const t=o.oxw(5);o.Q6J("innerHtml",t.currentUser.used_task+" / 200",o.oJD)}}function oQ(t,e){1&t&&(o.TgZ(0,"small"),o._uU(1,"(Free Trial) "),o.qZA())}function rQ(t,e){if(1&t&&(o.TgZ(0,"small"),o._uU(1),o.qZA()),2&t){const t=o.oxw(5);let e;o.xp6(1),o.hij(" (",0===t.calculateTaskProgress(t.currentUser)?"0":null==(e=t.calculateTaskProgress(t.currentUser))?null:e.toFixed(2),"%)")}}function sQ(t,e){if(1&t&&(o.TgZ(0,"span"),o.YNc(1,nQ,1,1,"small",245),o.YNc(2,iQ,1,1,"small",245),o.YNc(3,oQ,2,0,"small",4),o.YNc(4,rQ,2,1,"small",4),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.Q6J("ngIf","trialWithoutCC"!==t.currentUser.payment_status&&"trial"!==t.currentUser.payment_status&&t.calculateTaskProgress(t.currentUser)<=100||!t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",t.calculateTaskProgress(t.currentUser)<=100)}}function aQ(t,e){if(1&t&&(o.TgZ(0,"span",89),o.TgZ(1,"small",246),o._uU(2),o.TgZ(3,"small",247),o._uU(4,"(Metered)"),o.qZA(),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(2),o.hij("+",t.currentUser.used_task-t.currentUser.plan_details[0].tasks," "),o.xp6(3),o.AsE(" (",t.currentUser.customerCurrencySign,"",(null==t.planCostData?null:t.planCostData.extraTaskPrice)*(t.currentUser.used_task-t.currentUser.plan_details[0].tasks)==null?null:((null==t.planCostData?null:t.planCostData.extraTaskPrice)*(t.currentUser.used_task-t.currentUser.plan_details[0].tasks)).toFixed(4),")")}}function cQ(t,e){if(1&t&&(o.TgZ(0,"small",105),o._uU(1),o.qZA()),2&t){const t=o.oxw(6);
1o.xp6(1),o.AsE("",t.totalFreeMindBodyHits-t.totalMindBodyHits,"/",t.totalFreeMindBodyHits,"")}}const lQ=function(t){return{"d-none":t}};function dQ(t,e){if(1&t&&(o.TgZ(0,"small",254),o._uU(1),o.qZA()),2&t){const t=o.oxw(6);let e;o.Q6J("ngClass",o.VKq(2,lQ,t.totalMindBodyHits<0)),o.xp6(1),o.hij("(",0===t.getProgress()?"0":null==(e=t.getProgress())?null:e.toFixed(2),"%)")}}const uQ=function(t){return{"d-flex":t}};function pQ(t,e){if(1&t&&(o.TgZ(0,"div",255),o.TgZ(1,"small"),o._uU(2),o.TgZ(3,"small",247),o._uU(4,"(Metered)"),o.qZA(),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(6);o.Q6J("ngClass",o.VKq(4,uQ,t.totalMindBodyHits<0)),o.xp6(2),o.hij("+",-t.totalMindBodyHits," "),o.xp6(3),o.AsE(" (",t.currentUser.customerCurrencySign,"",(null==t.planCostData?null:t.planCostData.mindbodyOverageCost)*-t.totalMindBodyHits==null?null:((null==t.planCostData?null:t.planCostData.mindbodyOverageCost)*-t.totalMindBodyHits).toFixed(4),")")}}function hQ(t,e){if(1&t&&(o.TgZ(0,"div",251),o.YNc(1,cQ,2,2,"small",245),o.YNc(2,dQ,2,4,"small",252),o.YNc(3,pQ,6,6,"div",253),o.qZA()),2&t){const t=o.oxw(5);o.xp6(1),o.Q6J("ngIf",t.totalMindBodyHits>=0),o.xp6(1),o.Q6J("ngIf",t.totalMindBodyHits>=0),o.xp6(1),o.Q6J("ngIf",t.totalMindBodyHits<0)}}const gQ=function(t){return{orange:t}};function fQ(t,e){if(1&t&&(o.TgZ(0,"li",226),o.TgZ(1,"a",220),o.TgZ(2,"div",221),o.TgZ(3,"span",248),o._uU(4,"API"),o.qZA(),o.qZA(),o.TgZ(5,"div",224),o.TgZ(6,"div",225),o.TgZ(7,"span",105),o._uU(8,"Mindbody Tasks"),o.qZA(),o.YNc(9,hQ,4,3,"div",249),o.qZA(),o.TgZ(10,"div",250),o._UZ(11,"div",230),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.xp6(9),o.Q6J("ngIf",t.currentUser&&t.currentUser.plan_details[0]&&null!=t.totalFreeMindBo
1dyHits&&0!=t.totalFreeMindBodyHits&&t.currentUser.plan_details[0].planName),o.xp6(2),o.Udp("width",t.getProgress(),"%"),o.Q6J("ngClass",o.VKq(4,gQ,t.totalMindBodyHits<0))}}function mQ(t,e){if(1&t&&(o.TgZ(0,"p",261),o.TgZ(1,"span",262),o.O4$(),o.TgZ(2,"svg",263),o._UZ(3,"path",264),o.qZA(),o._uU(4," Overlimit charges:"),o.qZA(),o.kcU(),o.TgZ(5,"span"),o._uU(6),o.qZA(),o.qZA()),2&t){const t=o.oxw(5);o.xp6(6),o.AsE("1 Task = ",t.currentUser.customerCurrencySign," ",null==t.planCostData?null:t.planCostData.extraTaskPrice," ")}}function vQ(t,e){if(1&t&&(o.TgZ(0,"p",261),o.TgZ(1,"span",265),o._uU(2," Overlimit charges:"),o.qZA(),o.TgZ(3,"span"),o._uU(4),o.qZA(),o.qZA()),2&t){const t=o.oxw(5);o.xp6(4),o.AsE("1 MB Task = ",t.currentUser.customerCurrencySign," ",null==t.planCostData?null:t.planCostData.mindbodyOverageCost," ")}}function bQ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",256),o.TgZ(1,"div",257),o.YNc(2,mQ,7,2,"p",258),o.YNc(3,vQ,5,2,"p",258),o.TgZ(4,"p",259),o._uU(5,"Checkout "),o.TgZ(6,"a",260),o.NdJ("click",function(){return o.CHM(t),o.oxw(4).billingOverview()}),o._uU(7,"Billing Page"),o.qZA(),o._uU(8," for more information"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(2),o.Q6J("ngIf",t.currentUser.used_task>t.currentUser.plan_details[0].tasks),o.xp6(1),o.Q6J("ngIf",t.totalMindBodyHits<0)}}const xQ=function(t,e){return{"bg-warning":t,"bg-danger":e}};function _Q(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",218),o.TgZ(1,"li",219),o.TgZ(2,"a",220),o.TgZ(3,"div",221),o.O4$(),o.TgZ(4,"svg",68),o._UZ(5,"path",222),o._UZ(6,"path",223),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",224),o.TgZ(8,"div",225),o._UZ(9,"span",105),o._UZ(10,"small",105),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"li",226),o.TgZ(12,"a",220),o.TgZ(13,"div",221),o._UZ(14,"img",227),o.qZA(),o.TgZ(15,"div",224),o.TgZ(16,"div",225),o._UZ(17,"span",105),o.YNc(18,sQ,5,4,"span",4),o.YNc(19,aQ,6,3,"span",228),o.qZA(),o.TgZ(20,"div",229),o._UZ(21,"div",230),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(22,fQ,12,6,"li",231),o.TgZ(23,"li",226),o.TgZ(24,"a",220),o.TgZ(25,"div",221),o.O4$(),o.TgZ(26,"svg",68),o._UZ(27,"path",232),o._UZ(28,"path",233),o._UZ(29,"path",234),o._UZ(30,"path",235),o._UZ(31,"path",236),o._UZ(32,"path",237),o._UZ(33,"path",238),o._UZ(34,"path",239),o._UZ(35,"path",240),o.qZA(),o.qZA(),o.kcU(),o.TgZ(36,"div",224),o.TgZ(37,"div",225),o._UZ(38,"span",105),o.TgZ(39,"span",241),o._uU(40),o.qZA(),o.qZA(),o.TgZ(41,"div",242),o._UZ(42,"div",243),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(43,bQ,9,2,"li",244),o.qZA()),2&t){const t=o.oxw(3);o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(7),o.Q6J("innerHtml",t.translation.CONNECTS,o.oJD),o.xp6(1),o.Q6J("innerHtml",t.getConnectData(),o.oJD),o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(5),o.Q6J("innerHtml",t.translation.TASKS,o.oJD),o.xp6(1),o.Q6J("ngIf",t.currentUser&&t.currentUser.plan_details[0]),o.xp6(1),o.Q6J("ngIf",t.currentUser.used_task>t.currentUser.plan_details[0].tasks),o.xp6(2),o.Udp("width",t.calculateTaskProgress(t.currentUser),"%"),o.Q6J("ngClass",o.VKq(19,gQ,t.currentUser.used_task>t.currentUser.plan_details[0].tasks)),o.xp6(1),o.Q6J("ngIf",t.showMindBodyElement),o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(14),o.Q6J("innerHtml",t.translation.MCP_SERVERS,o.oJD),o.xp6(2),o.hij("",t.currentUser.used_mcp_quota||0,"/100"),o.xp6(2),o.Udp("width",t.currentUser.used_mcp_quota||0,"%"),o.Q6J("ngClass",o.WLB(21,xQ,(t.currentUser.used_mcp_quota||0)>=80,(t.currentUser.used_mcp_quota||0)>=90)),o.uIk("aria-valuenow",t.currentUser.used_mcp_quota||0),o.xp6(1),o.Q6J("ngIf",t.currentUser.used_task>t.currentUser.plan_details[0].tasks||t.totalMindBodyHits<0)}}function CQ(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(4);o.xp6(1),o.hij(" ",t.currentUserCurrencyCode,"")}}function wQ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",284),o.NdJ("click",function(e){return o.CHM(t),o.oxw(5).autoCharge(e,!0)}),o._uU(1,"Edit"),o.qZA()}}function yQ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",277),o.TgZ(1,"div",221),o._UZ(2,"img",278),o.qZA(),o.TgZ(3,"div",224),o.TgZ(4,"div",225),o.TgZ(5,"small",279),o._uU(6,"Auto Recharge "),o.YNc(7,wQ,2,0,"button",280),o.qZA(),o.TgZ(8,"button",281),o.TgZ(9,"label",282),o.TgZ(10,"input",283),o.NdJ("click",function(e){return o.CHM(t),o.oxw(4).autoCharge(e)}),o.qZA(),o._UZ(11,"span"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(4);o.xp6(7),o.Q6J("ngIf",t.currentAutoChargeStatus),o.xp6(3),o.Q6J("checked",t.currentAutoChargeStatus)}}function AQ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"ul",218),o.TgZ(1,"li",266),o.TgZ(2,"div",221),o.O4$(),o.TgZ(3,"svg",68),o._UZ(4,"path",267),o._UZ(5,"path",268),o._UZ(6,"path",269),o.qZA(),o.qZA(),o.kcU(),o.TgZ(7,"div",270),o.TgZ(8,"span",271),o._uU(9,"Balance: "),o.TgZ(10,"span",272),o._uU(11),o.ALo(12,"number"),o.YNc(13,CQ,2,1,"span",4),o.qZA(),o.qZA(),o.TgZ(14,"a",273),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(3);return("trialWithoutCC"===n.currentUser.payment_status||"trial"===n.currentUser.payment_status)&&n.isBillingDateValid()||"jc0fgwefcky2"===n.currentUser.planId?e.preventDefault():n.addFund()}),o.TgZ(15,"span",274),o.TgZ(16,"span",275),o._uU(17,"+"),o.qZA(),o._uU(18," Add Fund"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(19,yQ,12,2,"li",276),o.qZA()}if(2&t){const t=o.oxw(3);o.xp6(11),o.AsE("",t.currentUserBalanceSign+" ","",o.xi3(12,7,t.currentBalance,"1.2-3")||"Fetching..",""),o.xp6(2),o.Q6J("ngIf",t.currentUserCurrencyCode),o.xp6(1),o.ekj("disabled",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()||"jc0fgwefcky2"===t.currentUser.planId),o.uIk("data-tooltip",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()||"jc0fgwefcky2"===t.currentUser.planId?"Subscribe now to access your wallet":"Click to add funds to your wallet"),o.xp6(5),o.Q6J("ngIf","jc0fgwefcky2"!==t.currentUser.planId&&0!==t.currentBalance&&null!==t.currentBalance)}}const ZQ=function(t,e){return{"side-task-alert__removeText":t,day_free_trialTop:e}},kQ=function(t){return{"rotate-180":t}};function TQ(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"nav",120,121),o.TgZ(2,"div",122),o.TgZ(3,"div",123),o.YNc(4,BH,15,14,"ul",124),o.TgZ(5,"ul",125),o.TgZ(6,"li"),o.TgZ(7,"a",126),o.TgZ(8,"span",127),o.O4$(),o.TgZ(9,"svg",128),o._UZ(10,"defs"),o.TgZ(11,"g",129),o._UZ(12,"path",130),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"abbr",131),o._uU(14,"My Loops"),o.qZA(),o.qZA(),o.TgZ(15,"span",132),o._uU(16,"My Loops"),o.qZA(),o.qZA(),o.TgZ(17,"li"),o.TgZ(18,"a",133),o.TgZ(19,"span",127),o.O4$(),o.TgZ(20,"svg",134),o.TgZ(21,"g",135),o._UZ(22,"path",136),o._UZ(23,"path",137),o._UZ(24,"path",138),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"abbr",131),o._uU(26,"Task History"),o.qZA(),o.qZA(),o.TgZ(27,"span",132),o._uU(28,"Task History"),o.qZA(),o.qZA(),o.TgZ(29,"li"),o.TgZ(30,"a",139),o.TgZ(31,"span",127),o.O4$(),o.TgZ(32,"svg",140),o._UZ(33,"path",141),o._UZ(34,"path",142),o._UZ(35,"path",143),o._UZ(36,"path",144),o._UZ(37,"path",145),o._UZ(38,"path",146
1),o.qZA(),o.qZA(),o.kcU(),o.TgZ(39,"abbr",131),o._uU(40,"Linked Accounts"),o.qZA(),o.qZA(),o.TgZ(41,"span",132),o._uU(42,"Linked Accounts"),o.qZA(),o.qZA(),o.TgZ(43,"li"),o.TgZ(44,"a",147),o.TgZ(45,"span",148),o.O4$(),o.TgZ(46,"svg",134),o._UZ(47,"path",149),o._UZ(48,"path",150),o._UZ(49,"path",151),o._UZ(50,"path",152),o.qZA(),o.qZA(),o.kcU(),o.TgZ(51,"abbr",131),o._uU(52,"MCP"),o.qZA(),o.qZA(),o.TgZ(53,"span",132),o._uU(54,"MCP Settings"),o.qZA(),o.qZA(),o.TgZ(55,"li"),o.TgZ(56,"a",153),o.TgZ(57,"span",127),o.O4$(),o.TgZ(58,"svg",154),o._UZ(59,"path",155),o.qZA(),o.qZA(),o.kcU(),o.TgZ(60,"abbr",131),o._uU(61,"Tools"),o.qZA(),o.qZA(),o.TgZ(62,"span",132),o._uU(63,"Tools Settings"),o.qZA(),o.qZA(),o.TgZ(64,"li"),o.TgZ(65,"a",156),o.TgZ(66,"span",127),o.O4$(),o.TgZ(67,"svg",157),o.TgZ(68,"g",158),o._UZ(69,"path",159),o._UZ(70,"path",160),o._UZ(71,"path",161),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(72,"abbr",131),o._uU(73,"Help"),o.qZA(),o.qZA(),o.TgZ(74,"span",132),o._uU(75,"Help"),o.qZA(),o.qZA(),o.YNc(76,QH,9,4,"li",4),o.TgZ(77,"li"),o.TgZ(78,"a",162),o.TgZ(79,"span",127),o.O4$(),o.TgZ(80,"svg",163),o._UZ(81,"path",164),o.qZA(),o.qZA(),o.kcU(),o.TgZ(82,"abbr",131),o._uU(83,"Folders"),o.qZA(),o.qZA(),o.TgZ(84,"button",165),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openFolderListMenu()}),o.O4$(),o.TgZ(85,"svg",166),o._UZ(86,"path",167),o.qZA(),o.qZA(),o.kcU(),o.TgZ(87,"span",132),o._uU(88,"Folders"),o.qZA(),o.qZA(),o.YNc(89,eQ,4,2,"li",4),o.TgZ(90,"li"),o.TgZ(91,"a",168),o.TgZ(92,"span",127),o.O4$(),o.TgZ(93,"svg",163),o._UZ(94,"path",169),o._UZ(95,"path",170),o.qZA(),o.qZA(),o.kcU(),o.TgZ(96,"abbr",131),o._uU(97,"Email Templates"),o.qZA(),o.qZA(),o.TgZ(98,"span",132),o._uU(99,"Email Templates"),o.qZA(),o.qZA(),o.qZA(),o._UZ(100,"hr",171),o.TgZ(101,"button",172),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).UsageOverviewMobile()}),o._uU(102,"Usage Overview "),o.O4$(),o.TgZ(103,"svg",68),o._UZ(104,"path",173),o.qZA(),o.qZA(),o.YNc(105,_Q,44,24,"ul",174),o.kcU(),o.TgZ(106,"button",172),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).WalletMobile()}),o._uU(107,"Wallet "),o.O4$(),o.TgZ(108,"svg",68),o._UZ(109,"path",173),o.qZA(),o.qZA(),o.YNc(110,AQ,20,10,"ul",174),o.kcU(),o.TgZ(111,"ul",175),o.TgZ(112,"li",176),o.TgZ(113,"a",177),o.O4$(),o.TgZ(114,"svg",103),o._UZ(115,"path",104),o.qZA(),o.kcU(),o._UZ(116,"span",105),o.qZA(),o.qZA(),o.TgZ(117,"li",176),o.TgZ(118,"a",178),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).billingOverview()}),o.O4$(),o.TgZ(119,"svg",68),o._UZ(120,"path",107),o.qZA(),o.kcU(),o._UZ(121,"span",105),o.qZA(),o.qZA(),o.TgZ(122,"li"),o.TgZ(123,"a",179),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).logout()}),o.O4$(),o.TgZ(124,"svg",103),o._UZ(125,"path",111),o.qZA(),o.kcU(),o._UZ(126,"span",105),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("hidden",!t.showCreateAConnectBtn)("ngClass",o.WLB(27,ZQ,t.checkAlert(),t.showDayFreeTrial||"jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId))),o.xp6(4),o.Q6J("ngIf",t.currentUser&&t.showCreateAConnectBtn),o.xp6(3),o.Q6J("ngClass",o.VKq(30,HH,"connects"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(11),o.Q6J("ngClass",o.VKq(32,HH,"history"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(12),o.Q6J("ngClass",o.VKq(34,HH,"authorizations"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(14),o.Q6J("ngClass",o.VKq(36,HH,"mcp"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(12),o.Q6J("ngClass",o.VKq(38,HH,"tools"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(9),o.Q6J("ngClass",o.VKq(40,HH,"help"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(11),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.isSubUser)),o.xp6(2),o.Q6J("ngClass",o.VKq(42,HH,"folders"==t.cstate)),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(6),o.Q6J("ngClass",o.VKq(44,kQ,t.isFolderListMenu)),o.xp6(5),o.Q6J("ngIf",t.isFolderListMenu),o.xp6(12),o.Q6J("ngClass",o.VKq(46,HH,t.mobileUsageOverview)),o.xp6(4),o.Q6J("ngIf",t.currentUser&&t.mobileUsageOverview),o.xp6(1),o.Q6J("ngClass",o.VKq(48,HH,t.mobileWallet)),o.xp6(4),o.Q6J("ngIf",t.mobileWallet),o.xp6(6),o.Q6J("innerHtml",t.translation.PROFILE,o.oJD),o.xp6(5),o.Q6J("innerHtml",t.translation.BILLING_OVERVIEW,o.oJD),o.xp6(5),o.Q6J("innerHtml",t.translation.LOG_OUT,o.oJD)}}const OQ=function(t){return{view_menu:t}};
1function MQ(t,e){if(1&t&&(o.TgZ(0,"section",118),o.YNc(1,TQ,127,50,"nav",119),o.qZA()),2&t){const t=o.oxw();o.Q6J("ngClass",o.VKq(2,OQ,!t.isMobileView&&t.isViewSide||t.showGlobalCopilot&&!t.isCustomEditorRoute)),o.xp6(1),o.Q6J("ngIf",t.showHead)}}function IQ(t,e){1&t&&(o.TgZ(0,"div",326),o._uU(1,"Loading\u2026"),o.qZA())}function SQ(t,e){1&t&&o.GkF(0)}function PQ(t,e){if(1&t&&(o.ynx(0),o.YNc(1,SQ,1,0,"ng-container",216),o.BQk()),2&t){const t=e.$implicit;o.oxw(4);const n=o.MAs(14);o.xp6(1),o.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",o.VKq(2,WH,t))}}function NQ(t,e){1&t&&(o.TgZ(0,"div",326),o._uU(1,"No folders yet"),o.qZA())}function qQ(t,e){if(1&t&&(o.ynx(0),o.YNc(1,PQ,2,4,"ng-container",214),o.YNc(2,NQ,2,0,"div",325),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.Q6J("ngForOf",t.sidebarFolderTree),o.xp6(1),o.Q6J("ngIf",0===t.sidebarFolderTree.length)}}function UQ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",324),o.YNc(1,IQ,2,0,"div",325),o.YNc(2,qQ,3,2,"ng-container",4),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.isSidebarFoldersLoading&&0===t.sidebarFolderTree.length),o.xp6(1),o.Q6J("ngIf",!t.isSidebarFoldersLoading||t.sidebarFolderTree.length>0)}}function EQ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div",327),o.TgZ(1,"a",328),o.O4$(),o.TgZ(2,"svg",329),o._UZ(3,"path",330),o.qZA(),o._uU(4," Settings "),o.qZA(),o.TgZ(5,"svg",331),o._UZ(6,"path",312),o.qZA(),o.kcU(),o.TgZ(7,"span",332),o._uU(8),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.ekj("ns-trial",t.showDayFreeTrial||"jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(8),o.Oqu(t.nsSettingsCrumb)}}function FQ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",357),o._UZ(1,"rect",358),o._UZ(2,"path",359),o.qZA())}function DQ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",360),o._UZ(1,"path",361),o.qZA())}function LQ(t,e){if(1&t&&(o.TgZ(0,"span",362),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.Oqu(t.currentUser.plan_details[0].planName)}}function JQ(t,e){if(1&t&&(o.TgZ(0,"span",363),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("Sub-account of ",t.currentUser.adminEmail,"")}}function jQ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",364),o._UZ(1,"path",365),o.qZA())}function RQ(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",364),o._UZ(1,"circle",366),o._UZ(2,"path",367),o.qZA())}function $Q(t,e){1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"a",368),o._uU(1,"Admin "),o.TgZ(2,"span",343),o.O4$(),o.TgZ(3,"svg",353),o._UZ(4,"path",369),o.qZA(),o.qZA(),o.qZA())}function BQ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"a",370),o.TgZ(1,"span"),o._uU(2,"Plans & usage"),o.TgZ(3,"span",371),o._uU(4),o.ALo(5,"number"),o.qZA(),o.qZA(),o.TgZ(6,"span",372),o.O4$(),o.TgZ(7,"svg",364),o._UZ(8,"path",373),o._UZ(9,"path",374),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw(3);o.xp6(4),o.AsE("Tasks ",o.xi3(5,2,t.calculateTaskProgress(t.currentUser),"1.0-0"),"% \xb7 Connects ",t.getConnectData(),"")}}function HQ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"button",342),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).nsOpenCopilot()}),o._uU(1,"Copilot "),o.TgZ(2,"span",375),o.TgZ(3,"kbd",376),o._uU(4,"\u2318K"),o.qZA(),o.TgZ(5,"span",377),o.O4$(),o.TgZ(6,"svg",378),o._UZ(7,"path",379),o.qZA(),o.qZA(),o.qZA(),o.qZA()}}function QQ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",333),o.TgZ(1,"div",334),o.TgZ(2,"div",335),o.TgZ(3,"span",336),o._uU(4),o.qZA(),o.TgZ(5,"button",337),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).nsCopyEmail(e)}),o.YNc(6,FQ,3,0,"svg",338),o.YNc(7,DQ,2,0,"svg",339),o.qZA(),o.qZA(),o.YNc(8,LQ,2,1,"span",340),o.YNc(9,JQ,2,1,"span",341),o.qZA(),o.TgZ(10,"button",342),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).nsToggleTheme()}),o._uU(11,"Appearance "),o.TgZ(12,"span",343),o.YNc(13,jQ,2,0,"svg",344),o.YNc(14,RQ,3,0,"svg",344),o.qZA(),o.qZA(),o.TgZ(15,"a",345),o._uU(16,"Profile & account "),o.TgZ(17,"span",343),o.O4$(),o.TgZ(18,"svg",346),o._UZ(19,"circle",347),o._UZ(20,"path",348),o.qZA(),o.qZA(),o.qZA(),o.YNc(21,$Q,5,0,"a",349),o.YNc(22,BQ,10,5,"a",350),o.YNc(23,HQ,8,0,"button",351),o.kcU(),o.TgZ(24,"a",352),o._uU(25,"Settings "),o.TgZ(26,"span",343),o.O4$(),o.TgZ(27,"svg",353),o._UZ(28,"path",354),o._UZ(29,"circle",355),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"button",356),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).logout()}
1),o._uU(31,"Log out"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(4),o.Oqu(null==t.currentUser?null:t.currentUser.email),o.xp6(1),o.ekj("done",t.nsEmailCopied),o.xp6(1),o.Q6J("ngIf",!t.nsEmailCopied),o.xp6(1),o.Q6J("ngIf",t.nsEmailCopied),o.xp6(1),o.Q6J("ngIf",(null==t.currentUser||null==t.currentUser.plan_details?null:t.currentUser.plan_details.length)&&(null==t.currentUser.plan_details[0]?null:t.currentUser.plan_details[0].planName)),o.xp6(1),o.Q6J("ngIf",(null==t.currentUser?null:t.currentUser.isSubUser)&&(null==t.currentUser?null:t.currentUser.adminEmail)),o.xp6(4),o.Q6J("ngIf",!t.nsIsDarkTheme()),o.xp6(1),o.Q6J("ngIf",t.nsIsDarkTheme()),o.xp6(7),o.Q6J("ngIf",null==t.currentUser?null:t.currentUser.isAdmin),o.xp6(1),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.isSubUser)),o.xp6(1),o.Q6J("ngIf",!t.hideGlobalCopilot||t.isCustomEditorRoute)}}function YQ(t,e){1&t&&o.GkF(0)}function zQ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",89),o.YNc(1,YQ,1,0,"ng-container",99),o.qZA()),2&t){o.oxw(3);const t=o.MAs(17);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function VQ(t,e){1&t&&o.GkF(0)}function GQ(t,e){if(1&t&&(o.O4$(),o.kcU(),o.ynx(0),o.YNc(1,VQ,1,0,"ng-container",99),o.BQk()),2&t){o.oxw(3);const t=o.MAs(19);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function WQ(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.ynx(0),o.TgZ(1,"div",380),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).nsCloseAccountPanel()}),o.qZA(),o.TgZ(2,"div",381),o.TgZ(3,"div",382),o.TgZ(4,"button",383),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).nsCloseAccountPanel()}),o.O4$(),o.TgZ(5,"svg",384),o._UZ(6,"path",385),o.qZA(),o.qZA(),o.YNc(7,zQ,2,1,"ul",228),o.YNc(8,GQ,2,1,"ng-container",4),o.qZA(),o.qZA(),o.BQk()}if(2&t){const t=o.oxw(2);o.xp6(7),o.Q6J("ngIf","usage"===t.nsAccountPanel),o.xp6(1),o.Q6J("ngIf","wallet"===t.nsAccountPanel)}}function KQ(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"aside",285),o.TgZ(2,"div",286),o.TgZ(3,"a",287),o.TgZ(4,"span",288),o.TgZ(5,"em"),o._uU(6,"by"),o.qZA(),o._uU(7," Appy Pie"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"div",289),o.TgZ(9,"a",290),o.O4$(),o.TgZ(10,"svg",291),o._UZ(11,"path",292),o.qZA(),o.kcU(),o.TgZ(12,"span"),o._uU(13,"Create Agent"),o.qZA(),o.qZA(),o.TgZ(14,"a",293),o.O4$(),o.TgZ(15,"svg",294),o._UZ(16,"rect",295),o._UZ(17,"path",296),o._UZ(18,"circle",297),o._UZ(19,"path",298),o.qZA(),o.kcU(),o.TgZ(20,"span"),o._uU(21,"AI Agent"),o.qZA(),o.qZA(),o.TgZ(22,"a",299),o.O4$(),o.TgZ(23,"svg",294),o._UZ(24,"circle",300),o._UZ(25,"circle",301),o._UZ(26,"circle",302),o._UZ(27,"path",303),o.qZA(),o.kcU(),o.TgZ(28,"span"),o._uU(29,"Connections"),o.qZA(),o.qZA(),o.TgZ(30,"a",304),o.O4$(),o.TgZ(31,"svg",294),o._UZ(32,"circle",305),o._UZ(33,"path",306),o.qZA(),o.kcU(),o.TgZ(34,"span"),o._uU(35,"Task History"),o.qZA(),o.qZA(),o.TgZ(36,"div",307),o.TgZ(37,"a",308),o.O4$(),o.TgZ(38,"svg",294),o._UZ(39,"path",309),o.qZA(),o.kcU(),o.TgZ(40,"span"),o._uU(41,"Folders"),o.qZA(),o.qZA(),o.TgZ(42,"button",310),o.NdJ("click",function(){return o.CHM(t),o.oxw().openFolderListMenu()}),o.O4$(),o.TgZ(43,"svg",311),o._UZ(44,"path",312),o.qZA(),o.qZA(),o.qZA(),o.YNc(45,UQ,3,2,"div",313),o.qZA(),o.kcU(),o._UZ(46,"app-sidebar-agents"),o.TgZ(47,"div",314),o.TgZ(48,"button",315),o.NdJ("click",function(e){return o.CHM(t),o.oxw().nsToggleProfile(e)}),o.TgZ(49,"span",316),o._uU(50),o.qZA(),o.TgZ(51,"span",317),o._uU(52),o.qZA(),o.O4$(),o.TgZ(53,"svg",318),o._UZ(54,"path",319),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(55,"button",320),o.NdJ("click",function(){return o.CHM(t),o.oxw().nsToggleCollapse()}),o.O4$(),o.TgZ(56,"svg",311),o._UZ(57,"path",321),o.qZA(),o.qZA(),o.YNc(58,EQ,9,3,"div",322),o.YNc(59,QQ,32,12,"div",323),o.YNc(60,WQ,9,2,"ng-container",4),o.BQk()}if(2&t){const t=o.oxw();o.xp6(1),o.ekj("ns-trial",t.showDayFreeTrial||"jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(8),o.ekj("on","create-agent"===t.cstate),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(5),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(8),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(8),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(6),o.ekj("on","folders"===t.cstate),o.xp6(1),o.uIk("aria-disabled","jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.xp6(5),o.ekj("open",t.isFolderListMenu),o.xp6(3),o.Q6J("ngIf",t.isFolderListMenu),o.xp6(3),o.ekj("on",t.nsProfileOpen),o.Q6J("title",null==t.currentUser?null:t.currentUser.email),o.xp6(2),o.Oqu(t.setNameLetter()),o.xp6(2),o.Oqu(null==t.currentUser?null:t.currentUser.email),o.xp6(3),o.ekj("ns-trial",t.showDayFreeTrial||"jc0fgwefcky2"===(null==t.currentUser?null:t.currentUser.planId)),o.Q6J("title",t.nsCollapsed?"Expand sidebar":"Collapse sidebar"),o.uIk("aria-label",t.nsCollapsed?"Expand sidebar":"Collapse sidebar"),o.xp6(3),o.Q6J("ngIf",t.nsSettingsCrumb),o.xp6(1),o.Q6J("ngIf",t.nsProfileOpen),o.xp6(1),o.Q6J("ngIf",t.nsAccountPanel)}}function XQ(t,e){1&t&&o._UZ(0,"router-outlet")}function tY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",386),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleGlobalCopilot()}),o.O4$(),o.TgZ(1,"svg",387),o._UZ(2,"path",379),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("ngClass",o.VKq(1,HH,t.showGlobalCopilot))}}const eY=function(){return[]};function nY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"app-appypie-copilot",388),o.NdJ("closeCopilot",function(){return o.CHM(t),o.oxw().closeGlobalCopilot()}),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("isOpen",t.showGlobalCopilot)("currentUser",t.currentUser)("currentApp",null)("connectList",o.DdM(4,eY))}}function iY(t,e){1&t&&o._UZ(0,"app-day-free-trial")}function oY(t,e){1&t&&o._UZ(0,"app-day-free-trial")}function rY(t,e){1&t&&o._UZ(0,"div",389)}function sY(t,e){1&t&&o._UZ(0,"app-loader")}const aY=function(t){return{"sidebar-expanded":t}};function cY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",394),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().$implicit;return o.oxw().toggleSidebarFolder(n._id),e.stopPropagation()}),o.O4$(),o.TgZ(1,"svg",395),o._UZ(2,"polyline",396),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw();o.Q6J("ngClass",o.VKq(1,aY,e.isSidebarFolderExpanded(t._id)))}}function lY(t,e){1&t&&o.GkF(0)}const dY=function(t,e){return{$implicit:t,depth:e}};
1function uY(t,e){if(1&t&&(o.ynx(0),o.YNc(1,lY,1,0,"ng-container",216),o.BQk()),2&t){const t=e.$implicit,n=o.oxw(2).depth;o.oxw();const i=o.MAs(14);o.xp6(1),o.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",o.WLB(2,dY,t,n+1))}}function pY(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"div"),o.YNc(1,uY,2,5,"ng-container",214),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.children)}}const hY=function(t){return{"sidebar-folder-active":t}},gY=function(t){return{"fw-semibold text-primary":t}};function fY(t,e){if(1&t&&(o.TgZ(0,"div",390),o.YNc(1,cY,3,3,"button",391),o.TgZ(2,"a",392),o.O4$(),o.TgZ(3,"svg",393),o._UZ(4,"path",164),o.qZA(),o._uU(5),o.qZA(),o.qZA(),o.YNc(6,pY,2,1,"div",4)),2&t){const t=e.$implicit,n=e.depth,i=o.oxw();o.Udp("padding-left",16*n,"px"),o.Q6J("ngClass",o.VKq(8,hY,i.activeFolderId===t._id)),o.xp6(1),o.Q6J("ngIf",t.children&&t.children.length>0),o.xp6(1),o.Q6J("routerLink","/folders/"+t._id)("ngClass",o.VKq(10,gY,i.activeFolderId===t._id)),o.xp6(3),o.hij(" ",t.folderName," "),o.xp6(1),o.Q6J("ngIf",t.children&&t.children.length>0&&i.isSidebarFolderExpanded(t._id))}}function mY(t,e){1&t&&o._UZ(0,"app-access-suspended")}function vY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",409),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).billingOverview()}),o.O4$(),o.TgZ(1,"svg",410),o._UZ(2,"path",411),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.uIk("data-tooltip","Over-limit charges: 1 Task = "+t.currentUser.customerCurrencySign+ +(null==t.planCostData?null:t.planCostData.extraTaskPrice)+" Click to learn more on billing page.")}}function bY(t,e){if(1&t&&o._UZ(0,"small",105),2&t){const t=o.oxw(3);o.Q6J("innerHtml","trialWithoutCC"!==t.currentUser.payment_status&&"trial"!==t.currentUser.payment_status||t.isBillingDateValid()?t.currentUser.used_task+" / "+(t.currentUser.plan_details[0].custom_plans&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId]&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks?t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks:t.currentUser.plan_details[0].tasks):"0 / 0",o.oJD)}}function xY(t,e){if(1&t&&o._UZ(0,"small",105),2&t){const t=o.oxw(3);o.Q6J("innerHtml",t.currentUser.used_task+" / 200",o.oJD)}}function _Y(t,e){1&t&&(o.TgZ(0,"small"),o._uU(1,"(Free Trial) "),o.qZA())}function CY(t,e){if(1&t&&(o.TgZ(0,"small"),o._uU(1),o.qZA()),2&t){const t=o.oxw(3);let e;o.xp6(1),o.hij(" (",0===t.calculateTaskProgress(t.currentUser)?"0":null==(e=t.calculateTaskProgress(t.currentUser))?null:e.toFixed(2),"%)")}}function wY(t,e){if(1&t&&(o.TgZ(0,"span",412),o.YNc(1,bY,1,1,"small",245),o.YNc(2,xY,1,1,"small",245),o.YNc(3,_Y,2,0,"small",4),o.YNc(4,CY,2,1,"small",4),o.qZA()),2&t){const t=o.oxw(2);o.Q6J("ngClass",o.VKq(5,lQ,t.currentUser.used_task>t.currentUser.plan_details[0].tasks)),o.xp6(1),o.Q6J("ngIf","trialWithoutCC"!==t.currentUser.payment_status&&"trial"!==t.currentUser.payment_status&&t.calculateTaskProgress(t.currentUser)<=100||!t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",t.calculateTaskProgress(t.currentUser)<=100)}}function yY(t,e){if(1&t&&(o.TgZ(0,"span",89),o.TgZ(1,"small",246),o._uU(2),o.TgZ(3,"small",247),o._uU(4,"(Metered)"),o.qZA(),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(2),o.hij("+",t.currentUser.used_task-t.currentUser.plan_details[0].tasks," "),o.xp6(3),o.AsE(" (",t.currentUser.customerCurrencySign,"",(null==t.planCostData?null:t.planCostData.extraTaskPrice)*(t.currentUser.used_task-t.currentUser.plan_details[0].tasks)==null?null:((null==t.planCostData?null:t.planCostData.extraTaskPrice)*(t.currentUser.used_task-t.currentUser.plan_details[0].tasks)).toFixed(4),")")}}function AY(t,e){1&t&&(o.ynx(0),o._UZ(1,"span",414),o._uU(2,"Redirecting\u2026"),o.BQk())}function ZY(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=o.oxw(3);o.xp6(1),o.hij("Unlock access to ",t.currentUser.plan_details[0].custom_plans&&t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks?t.currentUser.plan_details[0].custom_plans[t.currentUser.custom_planId].tasks:t.currentUser.plan_details[0].tasks," tasks")}}function kY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"small",413),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).unlockTrialNow()}),o.YNc(1,AY,3,0,"ng-container",4),o.YNc(2,ZY,2,1,"ng-container",4),o.qZA()}if(2&t){const t=o.oxw(2);o.ekj("unlock-disabled",t.unlockLoading),o.xp6(1),o.Q6J("ngIf",t.unlockLoading),o.xp6(1),o.Q6J("ngIf",!t.unlockLoading)}}function TY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",409),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).billingOverview()}),o.O4$(),o.TgZ(1,"svg",410),o._UZ(2,"path",411),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(3);o.uIk("data-tooltip","Over-limit charges: 1 MB Task = "+t.currentUser.customerCurrencySign+(null==t.planCostData?null:t.planCostData.mindbodyOverageCost)+" Click to learn more on billing page.")}}
1function OY(t,e){if(1&t&&(o.TgZ(0,"div",255),o.TgZ(1,"small"),o._uU(2),o.TgZ(3,"small",247),o._uU(4,"(Metered)"),o.qZA(),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(4);o.Q6J("ngClass",o.VKq(4,uQ,t.totalMindBodyHits<0)),o.xp6(2),o.hij("+",-t.totalMindBodyHits," "),o.xp6(3),o.AsE(" (",t.currentUser.customerCurrencySign,"",(null==t.planCostData?null:t.planCostData.mindbodyOverageCost)*-t.totalMindBodyHits==null?null:((null==t.planCostData?null:t.planCostData.mindbodyOverageCost)*-t.totalMindBodyHits).toFixed(4),")")}}function MY(t,e){if(1&t&&(o.TgZ(0,"div",418),o.TgZ(1,"small",419),o._uU(2),o.qZA(),o.TgZ(3,"small",254),o._uU(4),o.qZA(),o.YNc(5,OY,6,6,"div",253),o.qZA()),2&t){const t=o.oxw(3);let e;o.xp6(1),o.Q6J("ngClass",o.VKq(6,lQ,t.totalMindBodyHits<0)),o.xp6(1),o.AsE("",t.totalFreeMindBodyHits-t.totalMindBodyHits,"/",t.totalFreeMindBodyHits,""),o.xp6(1),o.Q6J("ngClass",o.VKq(8,lQ,t.totalMindBodyHits<0)),o.xp6(1),o.hij("(",0===t.getProgress()?"0":null==(e=t.getProgress())?null:e.toFixed(2),"%)"),o.xp6(1),o.Q6J("ngIf",t.totalMindBodyHits<0)}}function IY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",226),o.TgZ(1,"a",398),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeDropdown()}),o.TgZ(2,"div",221),o.TgZ(3,"span",248),o._uU(4,"API"),o.qZA(),o.qZA(),o.TgZ(5,"div",224),o.TgZ(6,"div",225),o.TgZ(7,"a",415),o._uU(8,"Mindbody Tasks"),o.qZA(),o.YNc(9,TY,3,1,"a",399),o.YNc(10,MY,6,10,"div",416),o.qZA(),o.TgZ(11,"div",229),o._UZ(12,"div",417),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(9),o.Q6J("ngIf",t.totalMindBodyHits<0),o.xp6(1),o.Q6J("ngIf",t.currentUser&&t.currentUser.plan_details[0]&&null!=t.totalFreeMindBo
1dyHits&&0!=t.totalFreeMindBodyHits&&t.currentUser.plan_details[0].planName),o.xp6(2),o.Udp("width",t.getProgress(),"%"),o.Q6J("ngClass",o.VKq(5,gQ,t.totalMindBodyHits<0))}}function SY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",420),o.TgZ(1,"button",421),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).closeDropdown()}),o._UZ(2,"img",74),o.TgZ(3,"span",422),o._uU(4),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(4),o.hij(" ",t.translation.UPGRADE_PLAN,"")}}function PY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",114),o._uU(1,"Usage Overview:"),o.qZA(),o.TgZ(2,"li",219),o.TgZ(3,"a",397),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDropdown()}),o.TgZ(4,"div",221),o.O4$(),o.TgZ(5,"svg",68),o._UZ(6,"path",222),o._UZ(7,"path",223),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"div",224),o.TgZ(9,"div",225),o._UZ(10,"span",105),o._UZ(11,"small",105),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"li",226),o.TgZ(13,"a",398),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDropdown()}),o.TgZ(14,"div",221),o.O4$(),o.TgZ(15,"svg",68),o._UZ(16,"path",232),o._UZ(17,"path",233),o._UZ(18,"path",234),o._UZ(19,"path",235),o._UZ(20,"path",236),o._UZ(21,"path",237),o._UZ(22,"path",238),o._UZ(23,"path",239),o._UZ(24,"path",240),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"div",224),o.TgZ(26,"div",225),o._UZ(27,"span",105),o.YNc(28,vY,3,1,"a",399),o.YNc(29,wY,5,7,"span",400),o.YNc(30,yY,6,3,"span",228),o.qZA(),o.TgZ(31,"div",229),o._UZ(32,"div",230),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"li",401),o.YNc(34,kY,3,4,"small",402),o.qZA(),o.YNc(35,IY,13,7,"li",231),o.TgZ(36,"li",226),o.TgZ(37,"a",403),o.NdJ("click",function(){return o.CHM(t),o.oxw().closeDropdown()}),o.TgZ(38,"div",221),o.O4$(),o.TgZ(39,"svg",68),o._UZ(40,"path",232),o._UZ(41,"path",233),o._UZ(42,"path",234),o._UZ(43,"path",235),o._UZ(44,"path",236),o._UZ(45,"path",237),o._UZ(46,"path",238),o._UZ(47,"path",239),o._UZ(48,"path",240),o.qZA(),o.qZA(),o.kcU(),o.TgZ(49,"div",404),o.TgZ(50,"div",405),o._UZ(51,"span",105),o.TgZ(52,"span",241),o._uU(53),o.qZA(),o.qZA(),o.TgZ(54,"div",406),o._UZ(55,"div",243),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(56,"li"),o._UZ(57,"a",407),o.qZA(),o.YNc(58,SY,5,1,"li",408)}if(2&t){const t=o.oxw();o.xp6(3),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(7),o.Q6J("innerHtml",t.translation.CONNECTS,o.oJD),o.xp6(1),o.Q6J("innerHtml",t.getConnectData(),o.oJD),o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(14),o.Q6J("innerHtml",t.translation.TASKS,o.oJD),o.xp6(1),o.Q6J("ngIf",t.currentUser.used_task>t.currentUser.plan_details[0].tasks),o.xp6(1),o.Q6J("ngIf",t.currentUser&&t.currentUser.plan_details[0]),o.xp6(1),o.Q6J("ngIf",t.currentUser.used_task>t.currentUser.plan_details[0].tasks),o.xp6(2),o.Udp("width",t.calculateTaskProgress(t.currentUser),"%"),o.Q6J("ngClass",o.VKq(22,gQ,t.currentUser.used_task>t.currentUser.plan_details[0].tasks)),o.xp6(2),o.Q6J("ngIf",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()),o.xp6(1),o.Q6J("ngIf",t.showMindBodyElement),o.xp6(2),o.uIk("aria-disabled","jc0fgwefcky2"===t.currentUser.planId),o.xp6(14),o.Q6J("innerHtml",t.translation.MCP_SERVERS,o.oJD),o.xp6(2),o.hij("",t.currentUser.used_mcp_quota||0,"/100"),o.xp6(2),o.Udp("width",t.currentUser.used_mcp_quota||0,"%"),o.Q6J("ngClass",o.WLB(24,xQ,(t.currentUser.used_mcp_quota||0)>=80,(t.currentUser.used_mcp_quota||0)>=90)),o.uIk("aria-valuenow",t.currentUser.used_mcp_quota||0),o.xp6(2),o.Q6J("innerHtml",t.monthlyUseResetText,o.oJD),o.xp6(1),o.Q6J("ngIf",!(null!=t.currentUser&&t.currentUser.isSubUser))}}function NY(t,e){if(1&t&&(o.TgZ(0,"span"),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.currentUserCurrencyCode,"")}}function qY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",284),o.NdJ("click",function(e){return o.CHM(t),o.oxw(3).autoCharge(e,!0)}),o._uU(1,"Edit"),o.qZA()}}function UY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"li",428),o.TgZ(1,"div",221),o._UZ(2,"img",278),o.qZA(),o.TgZ(3,"div",224),o.TgZ(4,"div",225),o.TgZ(5,"small",279),o._uU(6,"Auto Recharge "),o.YNc(7,qY,2,0,"button",280),o.qZA(),o.TgZ(8,"button",429),o.TgZ(9,"label",282),o.TgZ(10,"input",283),o.NdJ("click",function(e){return o.CHM(t),o.oxw(2).autoCharge(e)}),o.qZA(),o._UZ(11,"span"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(7),o.Q6J("ngIf",t.currentAutoChargeStatus),o.xp6(3),o.Q6J("checked",t.currentAutoChargeStatus)}}function EY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",423),o.TgZ(1,"li",114),o._uU(2,"Wallet:"),o.qZA(),o.TgZ(3,"li",424),o.TgZ(4,"div",221),o.O4$(),o.TgZ(5,"svg",68),o._UZ(6,"path",267),o._UZ(7,"path",268),o._UZ(8,"path",269),o.qZA(),o.qZA(),o.kcU(),o.TgZ(9,"div",425),o.TgZ(10,"span",426),o._uU(11,"Balance: "),o.TgZ(12,"span",272),o._uU(13),o.ALo(14,"number"),o.YNc(15,NY,2,1,"span",4),o.qZA(),o.qZA(),o.TgZ(16,"a",273),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw();return("trialWithoutCC"===n.currentUser.payment_status||"trial"===n.currentUser.payment_status)&&n.isBillingDateValid()||"jc0fgwefcky2"===n.currentUser.planId?e.preventDefault():n.addFund()}),o.TgZ(17,"span",274),o.TgZ(18,"span",275),o._uU(19,"+"),o.qZA(),o._uU(20," Add Fund"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(21,UY,12,2,"li",427),o.qZA()}if(2&t){const t=o.oxw();o.xp6(13),o.AsE("",t.currentUserBalanceSign+" ","",o.xi3(14,7,t.currentBalance,"1.2-3")||"Fetching..",""),o.xp6(2),o.Q6J("ngIf",t.currentUserCurrencyCode),o.xp6(1),o.ekj("disabled",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()||"jc0fgwefcky2"===t.currentUser.planId),o.uIk("data-tooltip",("trialWithoutCC"===t.currentUser.payment_status||"trial"===t.currentUser.payment_status)&&t.isBillingDateValid()||"jc0fgwefcky2"===t.currentUser.planId?"Subscribe now to access your wallet":"Click to add funds to your wallet"),o.xp6(5),o.Q6J("ngIf","jc0fgwefcky2"!==t.currentUser.planId&&0!==t.currentBalance&&null!==t.currentBalance)}}const FY=function(t,e){return{day_free_trialClass:t,"copilot-open":e}};let DY=(()=>{class t{constructor(t,e,n,i,o,r,s,a,c,l,d,u,p,h,g,f,m){this.translatorService=t,this.apiService=e,this.cusService=n,this.adminService=i,this.authService=o,this.router=r,this.viewRouter=s,this.customerConnectService=a,this.dataService=c,this.modalService=l,this.planService=d,this.commonservice=u,this.cookieService=p,this.renderer=h,this.themeService=g,this.folderService=f,this.shellEvents=m,this.headerId="header-navbar",this.translation={},this.cstate="dashboard",this.showCreateAConnectBtn=!0,this.pageLoaded=!1,this.pageLoaded3=!1,this.customLoader=!1,this.appyConfig=go.N,this.isProfileClicked=!1,this.exitingImpersonation=!1,this.impersonationBannerHidden="undefined"!=typeof sessionStorage&&"1"===sessionStorage.getItem("impersonationBannerHidden"),this.isMenuBarActive=!1,this.showAccessSuspended=!1,this.homeToggle="My Connects",this.imageIconSearch="Dashboard",this.searchDisplayModel="",this.testloader=!0,this.scrollbarOptions={height:"200px"},this.showHead=!0,this.isSlideClose=!1,this.isViewSide=!0,this.isWidthContainerSlide=!1,this.currentBalance=null,this.currentUserBalanceSign="",this.currentUserCurrencyCode="",this.currentAutoChargeStatus=!1,this.taskalert=!1,this.isAlertShow=!1,this.showDropdown=!1,this.mobileUsageOverview=!0,this.mobileWallet=!1,this.hideUpgradeBtn=!1,this.isFolderListMenu=!1,this.isSubfoldersListMenu=!1,this.sidebarFolderTree=[],this.sidebarExpandedFolders={},this.activeFolderId=null,this.isSidebarFoldersLoading=!1,this.showDayFreeTrial=!1,this.isSetupEditorRoute=!1,this.isCu
1stomEditorRoute=!1,this.hideGlobalCopilot=!1,this.showGlobalCopilot=!1,this.isIntelligenceSuiteMenu=!1,this.useNewShell=!0,this.nsProfileOpen=!1,this.nsCollapsed=!1,this.nsEmailCopied=!1,this.nsAccountPanel=null,this.nsLastAccountKey="",this.activeRailTip=null,this.showToast=function(t){var e=document.createElement("div");e.className="copyToast",e.textContent=t,document.body.appendChild(e),setTimeout(function(){document.body.removeChild(e)},3e3)},this.copyToClipboard=function(t){if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t);else{var e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}this.showToast("Email Id Copied!")},this.addFundInProgress=!1,this.unlockLoading=!1,this.apiService.usersLogout.subscribe(t=>{t?this.checkForAuth():this.getCurrentUser()}),this.translatorService.getTranslation("en","user").subscribe(t=>{this.translation=t}),this.displayConsoleWarning(),this.subscribeRouterEvents(),this.subscribeCopilotToggle(),this.subscribeNewShell(),this.folderService.folderChanged$.subscribe(t=>{t&&"delete"===t.action&&t._id?this.sidebarFolderTree=this.removeFolderFromTree(this.sidebarFolderTree,t._id):t&&"rename"===t.action&&t._id&&t.folderName?this.sidebarFolderTree=this.renameFolderInTree(this.sidebarFolderTree,t._id,t.folderName):t&&"refresh"===t.action?this.loadSidebarFolders():t&&t._id&&t.folderName&&(this.addFolderToSidebarTree(t),this.scrollToFolders(),this.loadSidebarFolders())}),this.apiService.accessSuspended.subscribe(t=>{t&&(this.showAccessSuspended=!0)}),this.apiService.buildVersionOfUI.subscribe(t=>{if(this.appyConfig.apiEndPoint.includes("http://localhost"))localStorage.removeItem("buildID");else if(t){const e=t;document.documentElement.outerHTML.includes(`main-es2015.${e}.js`)||document.documentElement.outerHTML.includes("main-es2015.js")?localStorage.setItem("buildID",e):this.modalService.show(WR)}})}get nsShellOn(){return this.useNewShell&&!this.isMobileView&&!!this.currentUser&&this.showHead&&(this.showCreateAConnectBtn||this.isCustomEditorRoute)&&!this.testloader}get nsTrialBannerOn(){var t;return this.useNewShell&&(this.showDayFreeTrial||"jc0fgwefcky2"===(null===(t=this.currentUser)||void 0===t?void 0:t.planId))}get nsImpersonationBannerOn(){var t,e;return this.useNewShell&&"IMPERSONATION"===(null===(t=this.currentUser)||void 0===t?void 0:t.loginType)&&!!(null===(e=this.currentUser)||void 0===e?void 0:e.impersonatedBy)&&!this.impersonationBannerHidden}get nsCrumbOn(){return this.nsShellOn&&!!this.nsSettingsCrumb}get nsIsCollapsed(){return this.nsShellOn&&this.nsCollapsed}onResize(t){this.isMobileView=t.target.innerWidth<=1200}onCopilotShortcut(t){!t.metaKey&&!t.ctrlKey||t.shiftKey||t.altKey||!t.key||"k"!==t.key.toLowerCase()||this.hideGlobalCopilot||(t.preventDefault(),this.toggleGlobalCopilot())}UsageOverviewMobile(){this.mobileUsageOverview=!this.mobileUsageOverview,this.mobileWallet=!1}WalletMobile(){this.mobileWallet=!this.mobileWallet,this.mobileUsageOverview=!1}subscribeNewShell(){try{this.nsCollapsed="1"===localStorage.getItem("ns.sidebar.collapsed")}catch(t){}this.router.events.subscribe(t=>{t instanceof ui.m2&&(this.nsProfileOpen=!1,this.nsAccountPanel=null)}),document.addEventListener("click",t=>{if(!this.isCustomEditorRoute||!this.shellEvents.editorLeave)return;const e=t.target,n=e&&e.closest?e.closest('.ns-sidebar a[href^="/"], .ns-pmenu a[href^="/"]'):null;!n||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),t.stopPropagation(),this.nsProfileOpen=!1,this.shellEvents.editorLeave(n.getAttribute("href")))},!0),this.shellEvents.action$.subscribe(t=>{"billing"===t?this.billingOverview():"addFund"===t?this.nsBuildAccountSnapshot().walletLocked||this.addFund():"unlockTrial"===t?this.unlockTrialNow():"autoRechargeToggle"===t||"autoRechargeEdit"===t?this.autoCharge({preventDefault:()=>{},stopPropagation:()=>{}},"autoRechargeEdit"===t):"refreshAccount"===t?(this.getCurrentUser(),this.getUserBalance()):this.nsOpenAccountPanel(t)})}ngDoCheck(){if(!this.useNewShell||"plans-usage"!==this.cstate||!this.currentUser)return;const t=this.nsBuildAccountSnapshot(),e=JSON.stringify(t);e!==this.nsLastAccountKey&&(this.nsLastAccountKey=e,this.shellEvents.publishAccount(t))}nsBuildAccountSnapshot(){var t,e,n,i,o,r;const s=this.currentUser||{},a=s.plan_details&&s.plan_details[0],c=s.customerCurrencySign||"",l="trialWithoutCC"===s.payment_status||"trial"===s.payment_status,d=this.isBillingDateValid(),u=this.calculateTaskProgress(s)||0,p=a&&a.custom_plans&&a.custom_plans[s.custom_planId]&&a.custom_plans[s.custom_planId].tasks,h=!!a&&s.used_task>a.tasks;let g="";a&&!h&&(!l&&u<=100||!d?g=l&&!d?"0 / 0":s.used_task+" / "+(p||a.tasks):l&&d&&(g=s.used_task+" / 200"));const f={value:g,pct:a&&!h&&u<=100?"("+(0===u?"0":u.toFixed(2))+"%)":null,over:h?"+"+(s.used_task-a.tasks):null,overCost:h?"("+c+(null===(e=(null===(t=this.planCostData)||void 0===t?void 0:t.extraTaskPrice)*(s.used_task-a.tasks))||void 0===e?void 0:e.toFixed(4))+")":null,overTip:h?"Over-limit charges: 1 Task = "+c+ +(null===(n=this.planCostData)||void 0===n?void 0:n.extraTaskPrice)+" Click to learn more on billing page.":null,bar:u,tone:h?"over":"ok"};let m=null;
1if(this.showMindBodyElement){const t=this.totalFreeMindBodyHits,e=this.totalMindBodyHits,n=!!a&&null!=t&&0!=t&&!!a.planName,s=this.getProgress();m={value:!n||e<0?"":t-e+"/"+t,pct:!n||e<0?null:"("+(0===s?"0":null==s?void 0:s.toFixed(2))+"%)",over:n&&e<0?"+"+-e:null,overCost:n&&e<0?"("+c+(null===(o=(null===(i=this.planCostData)||void 0===i?void 0:i.mindbodyOverageCost)*-e)||void 0===o?void 0:o.toFixed(4))+")":null,overTip:e<0?"Over-limit charges: 1 MB Task = "+c+(null===(r=this.planCostData)||void 0===r?void 0:r.mindbodyOverageCost)+" Click to learn more on billing page.":null,bar:s,tone:e<0?"over":"ok"}}const v=s.used_mcp_quota||0,b=a?l?d?200:0:+(p||a.tasks)||0:0,x=a&&"Unlimited"!==this.getConnectData()&&!isNaN(+a.connects)?+a.connects:null;return{planName:a&&a.planName||"",billing:"jc0fgwefcky2"===s.planId?"free":l?"trial":"yearly"===s.planPeriod?"yearly":"monthly",isSubUser:!!s.isSubUser,isFreePlan:"jc0fgwefcky2"===s.planId,tasksPct:Math.round(u),connects:this.getConnectData(),tasks:f,tasksUsed:s.used_task||0,tasksTotal:b,tasksLeft:Math.max(0,b-(s.used_task||0)),connectsUsed:s.connect_data||0,connectsLimit:x,freeTrial:!!a&&!h&&l&&d,unlockText:a&&l&&d?"Unlock access to "+(p||a.tasks)+" tasks":null,unlockLoading:!!this.unlockLoading,mindbody:m,mindbodyLeft:this.showMindBodyElement?this.totalMindBodyHits:null,mcp:{value:v+"/100",pct:null,over:null,overCost:null,overTip:null,bar:v,tone:v>=90?"danger":v>=80?"warn":"ok"},resetText:this.monthlyUseResetText||"",balance:this.currentBalance,balanceSign:this.currentUserBalanceSign||"",currencyCode:this.currentUserCurrencyCode||"",autoRecharge:!!this.currentAutoChargeStatus,showAutoRecharge:"jc0fgwefcky2"!==s.planId&&0!==this.currentBalance&&null!==this.currentBalance,walletLocked:l&&d||"jc0fgwefcky2"===s.planId}}get nsSettingsCrumb(){return{tools:"Tools",mcp:"MCP settings","team-moderator":"User management"}[this.cstate]||null}nsToggleProfile(t){t.stopPropagation(),this.nsProfileOpen=!this.nsProfileOpen,this.nsProfileOpen&&(this.getCurrentUser(),this.getUserBalance())}nsCopyEmail(t){var e;t.stopPropagation(),this.copyToClipboard(null===(e=this.currentUser)||void 0===e?void 0:e.email),this.nsEmailCopied=!0,setTimeout(()=>{this.nsEmailCopied=!1},1500)}nsOpenCopilot(){this.nsProfileOpen=!1,this.isCustomEditorRoute?this.shellEvents.editorCopilotToggle&&this.shellEvents.editorCopilotToggle():this.showGlobalCopilot=!0}nsToggleTheme(){this.themeService.toggleTheme()}nsIsDarkTheme(){return this.themeService.isDarkTheme()}nsToggleCollapse(){this.nsCollapsed=!this.nsCollapsed,this.nsProfileOpen=!1;try{localStorage.setItem("ns.sidebar.collapsed",this.nsCollapsed?"1":"0")}catch(t){}}nsOpenAccountPanel(t){this.nsProfileOpen=!1,this.nsAccountPanel=t,this.getCurrentUser(),this.getUserBalance()}nsCloseAccountPanel(){this.nsAccountPanel=null}nsCloseProfileOnOutsideClick(t){if(!this.nsProfileOpen)return;const e=t.target;
1e&&e.closest&&e.closest(".ns-pmenu, .ns-foot-btn")||(this.nsProfileOpen=!1)}toggleGlobalCopilot(){this.showGlobalCopilot=!this.showGlobalCopilot}closeGlobalCopilot(){this.showGlobalCopilot=!1}subscribeCopilotToggle(){this.dataService.copilotToggle$.subscribe(()=>{this.showGlobalCopilot=!0})}checkAlert(){var t,e,n;const i="trialWithoutCC"===(null===(t=this.currentUser)||void 0===t?void 0:t.payment_status)||"trial"===(null===(e=this.currentUser)||void 0===e?void 0:e.payment_status),o=200===(null===(n=this.currentUser)||void 0===n?void 0:n.used_task),r="connects"===window.location.pathname.split("/")[1];return i&&o&&r}ngOnInit(){this.themeService.theme$.subscribe(t=>{}),window.addEventListener("resize",this.adjustSolutionSubMenuHeight),setTimeout(function(){$(function(){$(".svgImgs").each(function(){var t=jQuery(this),e=t.prop("attributes"),n=t.attr("src");$.get(n,function(n){var i=$(n).find("svg");i=i.removeAttr("xmlns:a"),$.each(e,function(){i.attr(this.name,this.value)}),t.replaceWith(i)})})}),$(function(){$(".svgiconsubmenu").each(function(){var t=jQuery(this),e=t.prop("attributes"),n=t.attr("src");$.get(n,function(n){var i=$(n).find("svg");i=i.removeAttr("xmlns:a"),$.each(e,function(){i.attr(this.name,this.value)}),t.replaceWith(i)})})})},1e3)}adjustSolutionSubMenuHeight(){const t=document.querySelector(".dropdown-menu");if(t){const e=.9*window.innerHeight;t.style.maxHeight=`${e}px`}}ngAfterViewInit(){this.isMobileView=window.innerWidth<=1200,this.isMobileView?setTimeout(()=>{this.MobileMenubar()},1e3):this.loadJs(),this.setupRailTooltipPortal(),this.setupRailTooltipDismiss()}setupRailTooltipDismiss(){document.addEventListener("mousedown",t=>{const e=t.target;if(!e||!e.closest||!e.closest("#sidebar .nav-main a, #sidebar .connection_btn, #asideMenu .navlist a"))return;document.body.classList.add("rail-tip-suppressed");const n=()=>{document.body.classList.remove("rail-tip-suppressed"),document.removeEventListener("mousemove",n)};document.addEventListener("mousemove",n)})}setupRailTooltipPortal(){document.addEventListener("mouseover",t=>{const e=t.target;if(!e||!e.closest)return;const n=e.closest("#sidebar .nav-main > li, #sidebar .connection_btn, #asideMenu .navlist > li");if(!n)return;const i=n.querySelector(".tooltip_custom, .custom_tooltip"),o=n.getBoundingClientRect();!i||0===o.width&&0===o.height||this.activeRailTip&&this.activeRailTip.tip===i||this.showRailTip(i,n)}),this.router.events.subscribe(t=>{t instanceof ui.m2&&this.hideRailTip()})}showRailTip(t,e){this.hideRailTip();const n=e.getBoundingClientRect();this.activeRailTip={tip:t,home:t.parentElement},document.body.appendChild(t),t.style.cssText=`position:fixed;left:${n.right+12}px;top:${n.top+n.height/2}px;right:auto;transform:translateY(-50%);display:block;opacity:1;visibility:visible;z-index:100000;pointer-events:none;background:#222;color:#fff;padding:10px;border-radius:5px;font-size:12px;line-height:1;white-space:nowrap;text-align:center;box-shadow:0 4px 12px rgba(0,0,0,0.2);`;const i=()=>{this.hideRailTip(),e.removeEventListener("mouseleave",i)};e.addEventListener("mouseleave",i)}hideRailTip(){if(!this.activeRailTip)return;const{tip:t,home:e}=this.activeRailTip;t.style.cssText="",e&&e.appendChild(t),this.activeRailTip=null}toggleViewSide(){this.isViewSide=!this.isViewSide,this.isMenuBarActive=!this.isMenuBarActive,this.commonservice.isSideBarActive(this.isMenuBarActive)}checkLivechatApiResponse(){return(0,Jo.mG)(this,void 0,void 0,function*(){try{const t=Date.now(),e=yield fetch(`https://livechat-gateway-cavg9c0h.uc.gateway.dev/getdate?v=${t}`);e.ok||(console.error("[Livechat]: Rollbacking... IP Is Blocked By Google",e.status),this.removeLivechatWidget())}catch(t){console.error("[Livechat]: Rollbacking... IP Is Blocked By Google",t),this.removeLivechatWidget()}})}removeLivechatWidget(){setTimeout(()=>{const t=document.getElementById("1234567890ANAS0987654321DHEERAJ09876543211234567890");t&&t.remove();const e=document.getElementById("appyWidget");e&&e.remove()},1e4)}loadJs(){this.mobileUsageOverview=!0,this.mobileWallet=!1,this.isMobileView?this.getUserBalance():this.handleLargeScreen()}handleLargeScreen(){this.commonservice.isSideBarActive(this.isMenuBarActive)}MobileMenubar(t=5){var e=document.querySelector("#Menubarshow"),n=document.querySelector("#sidebar"),i=document.body;e?(e.addEventListener("click",function(t){t.stopPropagation(),n.classList.contains("active_leftside")?(n.classList.remove("active_leftside"),i.classList.remove("overlaybgclr")):(n.classList.add("active_leftside"),i.classList.add("overlaybgclr"))}),document.querySelectorAll(".maintabs li > a").forEach(t=>{t.addEventListener("click",function(){i.classList.remove("overlaybgclr"),n.classList.contains("active_leftside")&&(n.classList.remove("active_leftside"),$(".submenunav").hide())})}),document.querySelectorAll(".ProfileMenu li > a").forEach(t=>{t.addEventListener("click",function(){i.classList.remove("overlaybgclr"),n.classList.contains("active_leftside")&&(n.classList.remove("active_leftside"),$(".submenunav").hide())})}),document.querySelector(".mobileshoeleftactive").addEventListener("click",function(){i.classList.remove("overlaybgclr"),n.classList.contains("active_leftside")&&(n.classList.remove("active_leftside"),$(".submenunav").hide())})):t>0?setTimeout(()=>this.MobileMenubar(t-1),500):console.log('Element with id "Menubarshow" not found')}subscribeRouterEvents(){this.viewRouter.isRouted.subscribe(t=>
1{if(this.useNewShell&&t){const e=t.split("/")[1];this.isCustomEditorRoute="customeditor"===e,this.hideGlobalCopilot=this.isCustomEditorRoute||"setup-editor"===e||"setup-editor-integrate"===e,this.hideGlobalCopilot&&(this.showGlobalCopilot=!1),this.isCustomEditorRoute&&(this.cstate="customeditor")}!t||"customeditor"!==t.split("/")[1]&&"accountDisabled"!==t.split("/")[1]&&"setup-editor"!==t.split("/")[1]&&"appointment"!==t.split("/")[1]&&"setup-editor-integrate"!==t.split("/")[1]&&"starttrial"!==t.split("/")[1]&&"purchase"!==t.split("/")[1]&&"oAuth"!==t.split("/")[1]?(this.cstate=t.split("/")[1],this.showCreateAConnectBtn=!0,$(".nav-main li.active ul.submenunav").fadeIn(),this.setHome(),this.activeFolderId="folders"===this.cstate&&t.split("/")[2]?t.split("/")[2]:null):this.showCreateAConnectBtn=!1,this.hideUpgradeBtn=t&&"plans"===t.split("/")[1]})}displayConsoleWarning(){console.info("%cStop!","color: red; font-size: 50px; font-weight: bold; -webkit-text-stroke: 1px black;"),console.info('%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a feature or "hack" someone\'s account, it is a scam and will give them access to your account.',"color: black; font-size: 18px;"),console.info("%cSee https://www.appypie.com/automate for more information.","color: black; font-size: 18px;")}checkForAuth(){this.router.events.subscribe(t=>{if(t instanceof ui.m2){let t=this.router.url;const e=t.split("/")[1];this.isSetupEditorRoute="setup-editor"===e||"setup-editor-integrate"===e||"appointment"===e,this.isCustomEditorRoute="customeditor"===e,this.hideGlobalCopilot=this.isCustomEditorRoute||"setup-editor"===e||"setup-editor-integrate"===e,this.hideGlobalCopilot&&(this.showGlobalCopilot=!1),-1!==t.indexOf("/logout")?this.handleLogout():this.handleAuth(t)}})}handleLogout(){this.currentUser={}}handleAuth(t){let e=this.processUrl(t);e.includes("developer.appypieautomate.ai")&&this.redirectToUrl("https://developer.appypieautomate.ai?auth="+btoa(this.getCookieValue("APPYID"))),this.authService.login({originUrl:e}).subscribe(t=>{t&&t.redirectUrl&&this.redirectToUrl(t.redirectUrl)}),e.includes("/app-error-messages")&&(this.showHead=!1)}processUrl(t){return-1!==t.indexOf("/build-your-connect?")?"/build-your-connect/"+t.split("/build-your-connect?")[1].split("=").join("__for__"):-1!==t.indexOf("returnUrl=https:%2F%2Fdeveloper.appypieautomate.ai")||-1!==t.indexOf("returnUrl=https:%2F%2Fdeveloper.appypie.com")?"/build-your-connect/"+t.split("?")[1].split("=").join("__for__"):-1!==t.indexOf("/oAuth/authorize?")?"/oAuth/authorize/"+btoa(t.split("/oAuth/authorize?")[1]):t}redirectToUrl(t){window.open(t,"_self")}getCurrentUser(){this.cusService.getCurrentUser({}).subscribe(t=>{var e,n,i,o,r,s,a,c,l,d,u,p,h,g,f,m,v,b,x,_,C,w;let y;this.cusService.setCurrent(t),this.testloader=!1,this.currentUser=t,this.totalMindBodyHits=0,this.totalFreeMindBo
1dyHits=0,this.showMindBodyElement=!1,(null===(e=this.currentUser)||void 0===e?void 0:e.api_quota)&&null!=(null===(i=null===(n=this.currentUser)||void 0===n?void 0:n.api_quota)||void 0===i?void 0:i.k40w4oiz0jwo11f3cegggc7s_free)&&0!=(null===(r=null===(o=this.currentUser)||void 0===o?void 0:o.api_quota)||void 0===r?void 0:r.k40w4oiz0jwo11f3cegggc7s_free)&&(this.totalMindBodyHits=null===(a=null===(s=this.currentUser)||void 0===s?void 0:s.api_quota)||void 0===a?void 0:a.k40w4oiz0jwo11f3cegggc7s_left,this.totalFreeMindBodyHits=null===(l=null===(c=this.currentUser)||void 0===c?void 0:c.api_quota)||void 0===l?void 0:l.k40w4oiz0jwo11f3cegggc7s_free,this.showMindBodyElement=!0===(null===(d=this.currentUser)||void 0===d?void 0:d.isMindbodyAccountConnected)),this.profile_image_url="https://d23i99usg1q4tk.cloudfront.net/accounts/images/profile.png",y=window;const A={account:{id:null==t?void 0:t.customerId,email:null==t?void 0:t.email,created_at:Date.parse(new Date(null==t?void 0:t._created_at).toString()).toString()}};let Z=null===(p=null===(u=null==t?void 0:t.plan_details)||void 0===u?void 0:u[0])||void 0===p?void 0:p.country;this.planCostData=null==Z?void 0:Z[this.currentUser.country],y.dataLayer=y.dataLayer||[],y.dataLayer.push({identity:A}),y.dataLayer.push({context:{staging:this.appyConfig.apiEndPoint.includes("http://localhost")?"true":"false",platform:window.screen.width<1200?"mobile":"web"}}),(("trial"===(null===(h=this.currentUser)||void 0===h?void 0:h.payment_status)||"trialWithoutCC"===(null===(g=this.currentUser)||void 0===g?void 0:g.payment_status))&&(null===(f=this.currentUser)||void 0===f?void 0:f.trialEnd)&&(null===(m=this.currentUser)||void 0===m?void 0:m.trialEnd)<=(new Date).getTime()/1e3||("trial"===(null===(v=this.currentUser)||void 0===v?void 0:v.payment_status)||"trialWithoutCC"===(null===(b=this.currentUser)||void 0===b?void 0:b.payment_status))&&(null===(x=this.currentUser)||void 0===x?void 0:x.trialEnd)&&(null===(_=this.currentUser)||void 0===_?void 0:_.trialEnd)>(new Date).getTime()/1e3)&&(this.showDayFreeTrial=!0),this.monthlyUseResetText=this.isBillingDateValid()?"Usage reset on "+(null===(C=new Date(null==t?void 0:t.resetDate))||void 0===C?void 0:C.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})):"Plan Expired on "+new Date(null===(w=this.currentUser)||void 0===w?void 0:w.nextBillingDate).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),"/"===this.router.url||"customeditor"===this.router.url.split("/")[1]||"starttrial"===this.router.url.split("/")[1]||"setup-editor"===this.router.url.split("/")[1]||"appointment"===this.router.url.split("/")[1]||"setup-editor-integrate"===this.router.url.split("/")[1]||"purchase"===this.router.url.split("/")[1]||"oAuth"===this.router.url.split("/")[1]?("/"===this.router.url&&this.router.navigateByUrl("/customeditor/fresh/app/newNode"),this.showCreateAConnectBtn=!1):(this.cstate=this.router.url.split("/")[1],this.setHome(),this.showCreateAConnectBtn=!0),this.hideUpgradeBtn="plans"===this.router.url.split("/")[1],setTimeout(()=>{const t=window;t.$(function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map(function(e){return new t.bootstrap.Tooltip(e)}),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(e){return new t.bootstrap.Popover(e)})})},1e3)})}getNotification(){this.cusService.getNotification({}).subscribe(t=>{this.notification=t})}getAppsList(){this.cusService.getAppsList({}).subscribe(t=>{this.recordsSearch=t,this.appsList=t&&t.apps_list?t.apps_list:[]})}setNameLetter(){var t,e,n,i;if(!this.currentUser||"object"!=typeof this.currentUser)return"NA";let o=(null===(t=this.currentUser.firstName)||void 0===t?void 0:t.trim())||"",r=(null===(e=this.currentUser.lastName)||void 0===e?void 0:e.trim())||"";if(!o)return"NA";["NA","undefined","UNDEFINED","null","NULL"].includes(r.toUpperCase())&&(r="");const s=(null===(n=o[0])||void 0===n?void 0:n.toUpperCase())||"",a=(null===(i=r[0])||void 0===i?void 0:i.toUpperCase())||"";return a?s+a:s}clearSearchInput(){this.searchDisplayModel="",this.isTrueAction=!1}updateNotificationStatus(t){this.cusService.updateNotificationStatus(t).subscribe(t=>{})}toggleSearch(t){this.toggleBoolSearch=!1===this.toggleBoolSearch,this.toggleBoolSearch?this.SearchFilter(t):this.hideListSearch()}SearchFilter(t){if(this.isTrueAction=!0,""===this.searchDisplayModel)this.recordsSearch=this.appsList;else{const e=t.target.value.toLowerCase();let n=this.appsList.filter(t=>
1t.displayName&&t.displayName.match(new RegExp(e,"i"))||t.name&&t.name.match(new RegExp(e,"i"))||!e);n=n.map(t=>t.displayName&&t.displayName.match(new RegExp("^"+e,"i"))?(t.matchIndex=1,t):(t.matchIndex=2,t)),n.sort((t,e)=>t.matchIndex-e.matchIndex),this.recordsSearch=n}setTimeout(()=>{const t=window;t.$(function(){t.$("#slimScroll_h200").slimScroll({height:"200px"})})},200)}hideListSearch(){this.toggleBoolSearch=!1}submitContactSupport(t){}goToConnects(){this.cstate="connects",this.activeFolderId=null,this.router.navigateByUrl("/connects"),setTimeout(()=>{const t=document.querySelector("#sidebar .sidebar-content");t&&(t.scrollTop=0)},0)}logout(){this.showDropdown=!1,this.authService.logout({originUrl:this.router.url}).subscribe(t=>{this.clearCookies(["loop.flozic.ai",".flozic.ai","connectcloud.appypie.com",".appypie.com"]),t.redirectUrl&&(window.location.href=t.redirectUrl)})}clearCookies(t){document.cookie.split(";").forEach(e=>{const n=`${e.split("=")[0].trim()}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;t.forEach(t=>{document.cookie=`${n}; domain=${t}`}),document.cookie=`${n}`})}closeSupportModal(){}setHome(){this.homeToggle="dashboard"===this.cstate?"Quick Connects":"connects"===this.cstate?"My Connects":"history"===this.cstate?"Tasks Log":"authorizations"===this.cstate?"Connected Accounts":"help"===this.cstate?"Help":"plans"===this.cstate?"Pricing":"tools"===this.cstate?"My Tools":""}getSearchNameValue(t){this.searchDisplayModel="",this.imageIconSearch=t.image,this.isTrueAction=!1,this.recordsSearch=[],this.selectAppsToHeaderSearch(t)}selectAppsToHeaderSearch(t){const e=t.appId,n=this.dataService.createConnectId();this.customerConnectService.addUserConnect({customerId:this.currentUser.customerId,connectId:n,connectTitle:"",appId:e,actionName:{title:"",desc:""},index:0,status:0,connectStatus:"Draft",nodeType:"trigger",nodeStatus:"app_selected",customConnect:!0}).subscribe(t=>{t&&this.router.navigateByUrl(`/customeditor/${t.insertedId}/action/${n}`)})}hideImpersonationBanner(){this.impersonationBannerHidden=!0;try{sessionStorage.setItem("impersonationBannerHidden","1")}catch(t){}}showImpersonationBanner(){this.impersonationBannerHidden=!1;try{sessionStorage.removeItem("impersonationBannerHidden")}catch(t){}}exitImpersonation(){this.exitingImpersonation||(this.exitingImpersonation=!0,this.adminService.stopImpersonation().subscribe(t=>{this.exitingImpersonation=!1,t&&t.success?window.location.href="/connects":(alert(t&&t.msg||"Could not exit impersonation. Please sign in again."),this.handleLogout(),window.location.href="/")},t=>{this.exitingImpersonation=!1,alert("Network error \u2014 please sign in again."),console.error(t)}))}billingOverview(){var t,e;this.showDropdown=!1,"jc0fgwefcky2"!==(null===(t=this.currentUser)||void 0===t?void 0:t.planId)?(null===(e=this.currentUser)||void 0===e?void 0:e.useStripeBilling)?this.planService.createStripePortalSession({}).subscribe(t=>{t&&t.success&&t.url?window.location.href=t.url:(console.warn("Stripe portal unavailable, redirecting to plans:",t&&t.msg),this.router.navigateByUrl("/plans"))},t=>{console.error("Stripe portal request failed:",t),this.router.navigateByUrl("/plans")}):this.openLegacyBillingDashboard():this.router.navigateByUrl("/plans")}openLegacyBillingDashboard(){this.planService.billingOverview(this.currentUser).subscribe(t=>{const e=document.createElement("form");e.setAttribute("name","billingInfo"),e.setAttribute("id","billingInfo"),e.setAttribute("method","POST"),e.setAttribute("target","_blank"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/billing/dashboard`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}addFund(){var t,e;if("jc0fgwefcky2"!==(null===(t=this.currentUser)||void 0===t?void 0:t.planId))if(null===(e=this.currentUser)||void 0===e?void 0:e.useStripeBilling){if(this.addFundInProgress)return;this.modalService.show(r$,{initialState:{}}).content.onClose.subscribe(t=>
1{if(t&&t.amount){if(this.addFundInProgress)return;this.addFundInProgress=!0,this.planService.addWalletFund({amount:t.amount}).subscribe(t=>{this.addFundInProgress=!1,t&&t.success&&t.credited?(null!=t.balance&&(this.currentBalance=t.balance),this.showToast("Funds added successfully."),this.getUserBalance()):t&&t.success&&t.pending?(this.showToast(t.msg||"Payment received \u2014 your balance will update shortly."),this.getUserBalance()):t&&t.success&&t.url?window.location.href=t.url:this.showToast((null==t?void 0:t.msg)||"Could not add funds")},t=>{this.addFundInProgress=!1,this.showToast("Add funds request failed")})}})}else this.planService.billingOverview(this.currentUser).subscribe(t=>{const e=document.createElement("form");e.setAttribute("name","billingInfo"),e.setAttribute("id","billingInfo"),e.setAttribute("method","POST"),e.setAttribute("target","_blank"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/billing/dashboard`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()});else this.router.navigateByUrl("/plans")}onClick(t){"input"===t.localName||"li"===t.localName||"span"===t.localName||""===t.localvalue||(this.clearSearchInput(),event.stopPropagation())}toggleMenubar(){this.isViewSide=!this.isViewSide,this.isMenuBarActive=!this.isMenuBarActive,this.commonservice.isSideBarActive(this.isMenuBarActive)}
1getProgress(){try{return 0===this.totalFreeMindBodyHits||isNaN(this.totalMindBodyHits)||isNaN(this.totalFreeMindBodyHits)?0:(this.totalFreeMindBodyHits-this.totalMindBodyHits)/this.totalFreeMindBodyHits*100}catch(t){return console.error("Error occurred in getProgress: ",t),0}}calculateTaskProgress(t){var e,n,i,o,r,s;try{let a=null===(n=null===(e=null==t?void 0:t.plan_details)||void 0===e?void 0:e[0])||void 0===n?void 0:n.tasks;return!a||isNaN(a)?0:((null===(o=null===(i=null==t?void 0:t.plan_details)||void 0===i?void 0:i[0])||void 0===o?void 0:o.custom_plans)&&(null==t?void 0:t.custom_planId)in(null===(s=null===(r=null==t?void 0:t.plan_details)||void 0===r?void 0:r[0])||void 0===s?void 0:s.custom_plans)&&(a=t.plan_details[0].custom_plans[t.custom_planId].tasks),("trialWithoutCC"===this.currentUser.payment_status||"trial"===this.currentUser.payment_status)&&(a=200),(null==t?void 0:t.used_task)/a*100)}catch(a){return console.error("Error occurred in calculateTaskProgress: ",a),0}}calculateConnectsProgress(t){var e,n;try{return(null==t?void 0:t.connect_data)/(null===(n=null===(e=null==t?void 0:t.plan_details)||void 0===e?void 0:e[0])||void 0===n?void 0:n.connects)*100}catch(i){return console.error("Error occurred in calculateTaskConnects: ",i),0}}addDays(t){const e=new Date;return e.setDate(e.getDate()+t),e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}getCookieValue(t){const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const i=e[n].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null}getUserBalance(){this.cusService.getCustomerBlance().subscribe(t=>{var e,n,i,o;"success"===(null==t?void 0:t.status)&&(this.currentUserBalanceSign=(null===(e=null==t?void 0:t.results)||void 0===e?void 0:e.userCurrency)||"",this.currentUserCurrencyCode=(null===(n=null==t?void 0:t.results)||void 0===n?void 0:n.userCurrencyCode)||"",this.currentBalance=null===(i=null==t?void 0:t.results)||void 0===i?void 0:i.userBalance,this.currentAutoChargeStatus=1===(null===(o=null==t?void 0:t.results)||void 0===o?void 0:o.autoRechargeFlag)),this.currentBalance||(this.currentBalance=0)})}autoCharge(t,e=!1){!this.currentAutoChargeStatus||e?(t.preventDefault(),t.stopPropagation(),this.modalService.show(e$,{initialState:{currentUserBalanceSign:"Fetching..."}}).content.onClose.subscribe(t=>{t&&this.cusService.autoRechargeStatus({status:"Enable",price:t.price,threshold:t.threshold}).subscribe(t=>{"success"===(null==t?void 0:t.status)?this.currentAutoChargeStatus=!0:(this.currentAutoChargeStatus=!1,this.showToast("Failed "+(null==t?void 0:t.message)))})})):this.cusService.autoRechargeStatus({status:"Disable"}).subscribe(t=>{"success"===(null==t?void 0:t.status)?this.currentAutoChargeStatus=!1:(this.currentAutoChargeStatus=!0,this.showToast("Failed "+(null==t?void 0:t.message)))})}getAutoReCharge(){this.cusService.getRechargeStatus({}).subscribe(t=>{"success"===(null==t?void 0:t.status)?this.currentAutoChargeStatus=1===t.rechargeStatus:(this.currentAutoChargeStatus=!1,this.showToast("Failed "+t.message))})}ProfileClick(){this.showDropdown=!this.showDropdown,this.isProfileClicked=!this.isProfileClicked,this.isProfileClicked&&(setTimeout(()=>{this.adjustSolutionSubMenuHeight()},10),this.getCurrentUser(),this.getUserBalance())}closeDropdown(){this.showDropdown=!1}closeMenuOnClickOutside(t){const e=t.target,n=null!==e.closest(".userlogindetails"),i=e.matches("input.d-inline-block"),o=e.matches("button#ProfileOpenButton"),r=e.matches("button.btn.btn-default");this.showDropdown&&!n&&!i&&!o&&!r&&(this.showDropdown=!1)}upgradePlan(t,e){this.currentUser=this.cusService.GetCurrent(),this.customerInfo=this.currentUser,this.customerInfo.upgrade_plan_id=null==t?void 0:t.planId,this.customerInfo.currencyCode=null==t?void 0:t.currencyCode,this.customerInfo.countryCode=null==t?void 0:t.countryCode,localStorage.setItem("planId",null==t?void 0:t.planId);const n=JSON.stringify({planId:null==t?void 0:t.planId,currencyCode:null==t?void 0:t.currencyCode,countryCode:null==t?void 0:t.countryCode,paymentType:null==t?void 0:t.paymentType}),i=btoa(encodeURIComponent(n));this.cookieService.set("custPlan",i,1,"/");var o=localStorage.getItem("mode");"jnpl1uik645c878la4sp"==o?(this.customerInfo.keydata=this.getCookieValue("keydata"),this.customerInfo.connectAppId=o,this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>{window.location.href=t.confirmation_url})):this.planService.upgradeCommonPayment(this.customerInfo).subscribe(t=>
1{if(t&&t.confirmation_url)return void(window.location.href=t.confirmation_url);if(t&&!1===t.success)return void console.error("Upgrade checkout could not be started:",t.msg);const e=document.createElement("form");e.setAttribute("name","checkout"),e.setAttribute("id","checkout"),e.setAttribute("method","POST"),e.setAttribute("action",`${this.appyConfig.commonPaymentUrl}/index/pay`);var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","request"),n.setAttribute("value",t.message),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),e.submit()})}unlockTrialNow(){var t,e,n,i,o,r;if(this.unlockLoading)return;this.currentUser=this.cusService.GetCurrent();const s=(null===(t=this.currentUser)||void 0===t?void 0:t.planId)||(null===(i=null===(n=null===(e=this.currentUser)||void 0===e?void 0:e.plan_details)||void 0===n?void 0:n[0])||void 0===i?void 0:i.planId);!s||(this.unlockLoading=!0,this.planService.createStripeCheckoutSession({planId:s,planPeriod:"yearly",currency:null===(o=this.currentUser)||void 0===o?void 0:o.customerCurrencyCode,countryCode:null===(r=this.currentUser)||void 0===r?void 0:r.countryCode,forceCheckout:!0,noTrial:!0}).subscribe(t=>{t&&t.success&&t.url?window.location.href=t.url:(this.unlockLoading=!1,console.error("Unlock checkout could not be started:",t&&t.msg),alert(t&&t.msg||"Could not start checkout. Please try again."))},t=>{this.unlockLoading=!1,console.error("Unlock checkout request failed:",t),alert("Could not start checkout. Please try again.")}))}getConnectData(){var t;if(this.currentUser&&this.currentUser.plan_details&&this.currentUser.plan_details[0]){const e=this.currentUser.plan_details[0].connects;return 0===(null===(t=this.currentUser)||void 0===t?void 0:t.connect_data)&&"Free Plan"!==this.currentUser.plan_details[0].planName&&"Standard"!==this.currentUser.plan_details[0].planName?"Unlimited":`${this.currentUser.connect_data} / ${e}`}return""}isBillingDateValid(){var t,e;if(!(null===(t=this.currentUser)||void 0===t?void 0:t.nextBillingDate))return!1;const n=new Date;return n.setHours(0,0,0,0),new Date(null===(e=this.currentUser)||void 0===e?void 0:e.nextBillingDate)>=n}openFolderListMenu(){this.isFolderListMenu=!this.isFolderListMenu,this.isFolderListMenu&&(this.sidebarFolderTree=[],this.loadSidebarFolders())}toggleIntelligenceSuiteMenu(){this.isIntelligenceSuiteMenu=!this.isIntelligenceSuiteMenu}scrollToFolders(){setTimeout(()=>{const t=document.getElementById("sidebar");t&&(t.scrollTop=t.scrollHeight)},50)}loadSidebarFolders(){this.isSidebarFoldersLoading=!0,this.folderService.getFolderTree().subscribe(t=>{this.isSidebarFoldersLoading=!1,t&&t.success&&(this.sidebarFolderTree=t.tree||[],this.scrollToFolders())},()=>{this.isSidebarFoldersLoading=!1})}toggleSidebarFolder(t){this.sidebarExpandedFolders[t]=!this.sidebarExpandedFolders[t],this.sidebarExpandedFolders[t]&&this.scrollToFolders()}isSidebarFolderExpanded(t){return!!this.sidebarExpandedFolders[t]}addFolderToSidebarTree(t){const e=t.parentFolderId,n={_id:t._id,folderName:t.folderName,children:[]};e?(this.sidebarFolderTree=this.insertIntoTree(this.sidebarFolderTree,e,n),this.sidebarExpandedFolders[e]=!0):this.sidebarFolderTree.some(e=>e._id===t._id)||(this.sidebarFolderTree=[n,...this.sidebarFolderTree])}insertIntoTree(t,e,n){return t.map(t=>{if(t._id===e){const e=t.children||[];return e.some(t=>t._id===n._id)?t:Object.assign(Object.assign({},t),{children:[...e,n]})}return t.children&&t.children.length>0?Object.assign(Object.assign({},t),{children:this.insertIntoTree(t.children,e,n)}):t})}removeFolderFromTree(t,e){return t.filter(t=>t._id!==e).map(t=>t.children&&t.children.length>0?Object.assign(Object.assign({},t),{children:this.removeFolderFromTree(t.children,e)}):t)}renameFolderInTree(t,e,n){return t.map(t=>t._id===e?Object.assign(Object.assign({},t),{folderName:n}):t.children&&t.children.length>0?Object.assign(Object.assign({},t),{children:this.renameFolderInTree(t.children,e,n)}):t)}openSidebarCreateFolder(){this.bsModalRef=this.modalService.show(xM,{initialState:{}
1,class:"new-folder-popup modal-dialog"}),this.bsModalRef.content.onClose.subscribe(t=>{t&&this.loadSidebarFolders()})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Eo),o.Y36(co.s),o.Y36(yo),o.Y36(JE),o.Y36(uo),o.Y36(ui.F0),o.Y36(JO),o.Y36(Fo),o.Y36(DA),o.Y36(mo.tT),o.Y36(Zr),o.Y36(wo.v),o.Y36(lo.N),o.Y36(o.Qsj),o.Y36(s$),o.Y36(mM),o.Y36(JA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-root"]],hostVars:10,hostBindings:function(t,e){1&t&&o.NdJ("resize",function(t){return e.onResize(t)},!1,o.Jf7)("keydown",function(t){return e.onCopilotShortcut(t)},!1,o.evT)("click",function(t){return e.closeMenuOnClickOutside(t)},!1,o.evT),2&t&&o.ekj("ns-shell-on",e.nsShellOn)("ns-trial-on",e.nsTrialBannerOn)("ns-imp-on",e.nsImpersonationBannerOn)("ns-crumb-on",e.nsCrumbOn)("ns-collapsed",e.nsIsCollapsed)},outputs:{isSlideClose:"isSlideClose"},decls:20,vars:17,consts:[["class","impersonation-banner",4,"ngIf"],["class","impersonation-floating",3,"title","click",4,"ngIf"],["class","side-scroll header-navbar-fixed",3,"id","ngClass",4,"ngIf"],["id","Mainleftside",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"day_free_trialClass",3,"ngClass"],["type","button","class","copilot-floating-btn","data-tooltip","Copilot","aria-label","Copilot",3,"ngClass","click",4,"ngIf"],["panelSide","left",3,"isOpen","currentUser","currentApp","connectList","closeCopilot",4,"ngIf"],["class","modal fade","id","phoneNumberModal","tabindex","-1","role","dialog","aria-hidden","true",4,"ngIf"],["sidebarFolderNode",""],["nsUsageBlock",""],["nsWalletBlock",""],[1,"impersonation-banner"],[1,"impersonation-content"],["width","16","height","16","viewBox","0 0 20 20","fill","none"],["d","M10 2L3 5v5c0 4.4 2.8 8.2 7 9.2 4.2-1 7-4.8 7-9.2V5l-7-3z","stroke","white","stroke-width","1.5","stroke-linejoin","round"],[1,"impersonation-banner-actions"],["title","Hide banner (you can bring it back from the top-right corner)",1,"impersonation-hide",3,"click"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["points","18 15 12 9 6 15"],[1,"impersonation-exit",3,"disabled","click"],[1,"impersonation-floating",3,"title","click"],["width","18","height","18","viewBox","0 0 20 20","fill","none"],[1,"side-scroll","header-navbar-fixed",3,"id","ngClass"],["ui-view","header",3,"id","ngClass",4,"ngIf"],["ui-view","header",3,"id","ngClass"],["class","homeicons",3,"hidden",4,"ngIf"],["class","headertop-main",4,"ngIf"],[1,"homeicons",3,"hidden"],["class","btn p-0 cursor-default d-xl-none","type","button","id","Menubarshow","aria-label","Menu Bar Show",3,"click",4,"ngIf"],["class","d-block  d-xl-none  mobile-createapp",4,"ngIf"],["type","button","id","Menubarshow","aria-label","Menu Bar Show",1,"btn","p-0","cursor-default","d-xl-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","40","height","40","viewBox","0 0 40 40","fill","none",1,"d-inline-block"],["d","M20 20L33 20","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M6.29289 19.2929C5.90237 19.6834 5.90237 20.3166 6.29289 20.7071L12.6569 27.0711C13.0474 27.4616 13.6805 27.4616 14.0711 27.0711C14.4616 26.6805 14.4616 26.0474 14.0711 25.6569L8.41421 20L14.0711 14.3431C14.4616 13.9526 14.4616 13.3195 14.0711 12.9289C13.6805 12.5384 13.0474 12.5384 12.6569 12.9289L6.29289 19.2929ZM16 21C16.5523 21 17 20.5523 17 20C17 19.4477 16.5523 19 16 19V21ZM7 21H16V19H7V21Z","fill","CurrentColor"],["d","M6.6665 10H33.3332","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M6.6665 30H33.3332","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"d-block","d-xl-none","mobile-createapp"],["routerLink","/customeditor/fresh/app/newNode","id","createConnect","ui-sref","customEditor",1,"justify-content-center","align-items-center","rounded-pill","d-flex"],["width","22","height","22","viewBox","0 0 25 25","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","plus 1"],["id","Vector","d","M5.5 12.5H19.5","stroke","white","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M12.5 5.5V19.5","stroke","white","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"headertop-main"],[1,"inputgroup","has-search","mar-0-b","d-none","d-lg-none"],[1,"inputgroupbtn"],["type","submit",1,"btn","btnsearch","heightin-btn","fillterimg"],["aria-hidden","true","class","fa fa-search",4,"ngIf"],["type","text","autocomplete","off","id","Searchappsconnect","name","searchApp",1,"form-control","heightin-btn","active",3,"placeholder","ngModel","keyup","blur","ngModelChange","click"],["id","closeapps",1,"closeapps",3,"ngStyle"],["type","button",1,"btn","btn-default","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-times-circle-o"],["class","appsdropdown thinScroll","id","Searchappsdrop",3,"display",4,"ngIf"],[1,"nav-header","right-header"],[1,"theme-toggle-header"],[3,"variant","size","showLabel"],[1,"d-none","d-xl-inline-block"],[1,"popover_content"],["class","dropdown profile userlogindetails",4,"ngIf"],["alt","",3,"src"],["aria-hidden","true",1,"fa","fa-search"],["id","Searchappsdrop",1,"appsdropdown","thinScroll"],["class","list-unstyled",4,"ngIf"],[1,"list-unstyled"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["href","/agent/","type","link",1,"btn","d-flex","flex-column","align-items-center","justify-content-center","ai-agent-header"],[1,"d-flex","align-items-center","gap-2","justify-content-center"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M10 7V4H6.8M2 11.5H3.6M16.4 11.5H18M12.4 10.75V12.25M7.6 10.75V12.25M5.2 7H14.8C15.6837 7 16.4 7.67157 16.4 8.5V14.5C16.4 15.3284 15.6837 16 14.8 16H5.2C4.31634 16 3.6 15.3284 3.6 14.5V8.5C3.6 7.67157 4.31634 7 5.2 7Z","stroke","CurrentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],[1,"d-none","d-xl-block"],[1,"d-none","d-xl-block","ai-agent-sub"],[1,"connection_btn"],["routerLink","/plans","type","button",1,"btn","h6","upgradebtnLink"],["src","../assets/images/crownicon.svg","alt","crown","width","22","height","23",1,"mr-1"],["href","https://loopbeta.flozic.ai/agents/new","aria-label","New Interface","type","link",1,"agents-dash-link"],[1,"agents-dash-link__text"],["xmlns","http://www.w3.org/2000/svg","width","13","height","13","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"agents-dash-link__ext"],["d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"],["d","M15 3h6v6"],["d","M10 14L21 3"],["href","https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","target","_blank","data-tooltip","Book Expert Assistance","aria-label","Book Expert Assistance","type","link",1,"expert-help-link"],["d","M2.5 9.1665H5C5.44203 9.1665 5.86595 9.3421 6.17851 9.65466C6.49107 9.96722 6.66667 10.3911 6.66667 10.8332V13.3332C6.66667 13.7752 6.49107 14.1991 6.17851 14.5117C5.86595 14.8242 5.44203 14.9998 5 14.9998H4.16667C3.72464 14.9998 3.30072 14.8242 2.98816 14.5117C2.67559 14.1991 2.5 13.7752 2.5 13.3332V9.1665ZM2.5 9.1665C2.5 8.18159 2.69399 7.20632 3.0709 6.29638C3.44781 5.38644 4.00026 4.55964 4.6967 3.8632C5.39314 3.16676 6.21993 2.61432 7.12987 2.23741C8.03982 1.8605 9.01509 1.6665 10 1.6665C10.9849 1.666
15 11.9602 1.8605 12.8701 2.23741C13.7801 2.61432 14.6069 3.16676 15.3033 3.8632C15.9997 4.55964 16.5522 5.38644 16.9291 6.29638C17.306 7.20632 17.5 8.18159 17.5 9.1665M17.5 9.1665V13.3332M17.5 9.1665H15C14.558 9.1665 14.134 9.3421 13.8215 9.65466C13.5089 9.96722 13.3333 10.3911 13.3333 10.8332V13.3332C13.3333 13.7752 13.5089 14.1991 13.8215 14.5117C14.134 14.8242 14.558 14.9998 15 14.9998H15.8333C16.2754 14.9998 16.6993 14.8242 17.0118 14.5117C17.3244 14.1991 17.5 13.7752 17.5 13.3332M17.5 13.3332V14.9998C17.5 15.8839 17.1488 16.7317 16.5237 17.3569C15.8986 17.982 15.0507 18.3332 14.1667 18.3332H10","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"dropdown","profile","userlogindetails"],["id","myAccount","type","button","id","ProfileUser",1,"btn","btn-default","dropdown_toggle","overflow-hidden","rounded-circle",3,"ngClass","click"],["class","h5  login-name hiddenxs",3,"innerHtml",4,"ngIf"],["class","dropdown-menu show end-0","aria-labelledby","ProfileUser",4,"ngIf"],[1,"h5","login-name","hiddenxs",3,"innerHtml"],["aria-labelledby","ProfileUser",1,"dropdown-menu","show","end-0"],[1,""],[1,"d-flex","align-items-center","gap-2"],["class","h5  login-name hiddenxs m-0 d-none",3,"innerHtml",4,"ngIf"],[1,"d-flex","flex-column","gap-2","positoin-relative"],[1,"align-items-center","d-inline-flex","gap-1","mb-0"],[1,"username",3,"innerHTML"],[1,"badge","d-inline","end-0","font-s12","fw-normal","text-white","theme-bgcl",3,"innerHtml"],["tabindex","-1","href","javascript:void(0);",1,"user-email","f-14","lh-1","text-muted",3,"innerHtml","click"],["class","d-inline-flex align-items-center gap-1 mt-1 px-2 py-1 rounded-pill","style","background: #f0f0f5; font-size: 12px; line-height: 1;",4,"ngIf"],[1,"dropdown-divider","py-0"],[4,"ngTemplateOutlet"],[1,"profile-Mobile-info","d-flex","align-items-center","gap-2","justify-content-between","pt-3","w-100","border-top","mt-2","pb-2"],[1,"linksbill-setting","p-0"],["tabindex","-1","routerLink","/profile",1,"flex-column","gap-1","justify-content-center","align-items-center","p-2",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","21","height","20","viewBox","0 0 21 20","fill","none"],["d","M9.91659 12.5H6.16659C5.28253 12.5 4.43468 12.8512 3.80956 13.4763C3.18444 14.1014 2.83325 14.9493 2.83325 15.8333V17.5M18.1483 13.855C18.4802 13.523 18.6667 13.0728 18.6667 12.6033C18.6667 12.1339 18.4802 11.6836 18.1483 11.3517C17.8163 11.0197 17.3661 10.8332 16.8966 10.8332C16.4271 10.8332 15.9769 11.0197 15.6449 11.3517L12.3033 14.695C12.1051 14.893 11.9601 15.1378 11.8816 15.4067L11.1841 17.7983C11.1632 17.87 11.1619 17.9461 11.1805 18.0184C11.199 18.0908 11.2366 18.1568 11.2895 18.2096C11.3423 18.2624 11.4083 18.3001 11.4807 18.3186C11.553 18.3372 11.629 18.3359 11.7008 18.315L14.0924 17.6175C14.3613 17.539 14.6061 17.394 14.8041 17.1958L18.1483 13.855ZM11.9999 5.83333C11.9999 7.67428 10.5075 9.16667 8.66659 9.16667C6.82564 9.16667 5.33325 7.67428 5.33325 5.83333C5.33325 3.99238 6.82564 2.5 8.66659 2.5C10.5075 2.5 11.9999 3.99238 11.9999 5.83333Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[3,"innerHtml"],["tabindex","-1","ui-sref","billing",1,"flex-column","gap-1","justify-content-center","align-items-center","p-2",3,"click"],["d","M12.5001 10H8.33341M12.5001 6.66667H8.33341M15.8334 14.1667V4.16667C15.8334 3.72464 15.6578 3.30072 15.3453 2.98816C15.0327 2.67559 14.6088 2.5 14.1667 2.5H3.33341M3.33341 2.5C3.77544 2.5 4.19937 2.67559 4.51193 2.98816C4.82449 3.30072 5.00008 3.72464 5.00008 4.16667V15.8333C5.00008 16.2754 5.17568 16.6993 5.48824 17.0118C5.8008 17.3244 6.22472 17.5 6.66675 17.5M3.33341 2.5C2.89139 2.5 2.46746 2.67559 2.1549 2.98816C1.84234 3.30072 1.66675 3.72464 1.66675 4.16667V5.83333C1.66675 6.05435 1.75455 6.26631 1.91083 6.42259C2.06711 6.57887 2.27907 6.66667 2.50008 6.66667H5.00008M6.66675 17.5H16.6667C17.1088 17.5 17.5327 17.3244 17.8453 17.0118C18.1578 16.6993 18.3334 16.2754 18.3334 15.8333V15C18.3334 14.779 18.2456 14.567 18.0893 14.4107C17.9331 14.2545 17.7211 14.1667 17.5001 14.1667H9.16675C8.94573 14.1667 8.73377 14.2545 8.57749 14.4107C8.42121 14.567 8.33341 14.779 8.33341 15V15.8333C8.33341 16.2754 8.15782 16.6993 7.84526 17.0118C7.5327 17.3244 7.10878 17.5 6.66675 17.5Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","linksbill-setting p-0",4,"ngIf"],[1,"p-0"],["title","Logout","id","logout","tabindex","-1",1,"flex-column","gap-1","d-flex","justify-content-center","align-items-center","p-2",3,"click"],["d","M8.1665 17.5H4.83317C4.39114 17.5 3.96722 17.3244 3.65466 17.0118C3.3421 16.6993 3.1665 16.2754 3.1665 15.8333V4.16667C3.1665 3.72464 3.3421 3.30072 3.65466 2.98816C3.96722 2.67559 4.39114 2.5 4.83317 2.5H8.1665M13.9998 14.1667L18.1665 10M18.1665 10L13.9998 5.83333M18.1665 10H8.1665","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"h5","login-name","hiddenxs","m-0","d-none",3,"innerHtml"],[1,"d-inline-flex","align-items-center","gap-1","mt-1","px-2","py-1","rounded-pill",2,"background","#f0f0f5","font-size","12px","line-height","1"],[1,"text-muted"],[2,"color","#000"],["tabindex","-1","routerLink","/admin/customers","title","Admin: login as customer",1,"flex-column","gap-1","justify-content-center","align-items-center","p-2",3,"click"],["d","M10 10a3.33 3.33 0 1 0 0-6.67A3.33 3.33 0 0 0 10 10zm0 0c-3.68 0-6.67 2.24-6.67 5h13.33c0-2.76-2.98-5-6.67-5z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["id","Mainleftside",3,"ngClass"],["
1id","sidebar",3,"hidden","ngClass",4,"ngIf"],["id","sidebar",3,"hidden","ngClass"],["sidebar",""],[1,"sidebar-content"],[1,"side-content","side-content-full","d-flexnav"],["class","d-flex flex-column justify-content-center gap-3 align-items-center w-100 position-sticky top-0 z-index3 bg-white",3,"ngClass",4,"ngIf"],[1,"nav-main","maintabs","border-top","mt-3","pt-3","mb-auto"],["data-tab","My Connects","routerLink","connects",3,"ngClass"],[1,"icon-w"],["preserveAspectRatio","none","width","24px","height","20","fill","none","viewBox","0 0 24 18","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink"],["id","s-Image_29-iPhone-X","stroke","none","stroke-width","1","fill","none","fill-rule","evenodd","transform","translate(-9.000000, -153.000000)"],["d","M15.1470575,154.802949 C12.6639514,154.802949 10.6437155,156.773081 10.6437155,159.194603 C10.6437155,160.447254 11.1851553,161.578188 12.0507359,162.379022 L12.0507359,164.369992 C10.2277459,163.328716 9,161.399406 9,159.194603 C9,155.889108 11.7574971,153.2 15.1470575,153.2 L21.928918,153.2 C25.3184784,153.2 28.0759755,155.889108 28.0759755,159.194603 C28.0759755,162.500098 25.3184784,165.189312 21.928918,165.189312 L18.013259,165.189312 L18.013259,163.586363 L21.928918,163.586363 C24.4121337,163.586363 26.43226,161.616232 26.43226,159.194603 C26.43226,156.773081 24.4121337,154.802949 21.928918,154.802949 L15.1470575,154.802949 Z M29.9493737,159.030008 C31.7722541,160.071284 33,162.000594 33,164.205504 C33,167.510892 30.2425029,170.2 26.8529425,170.2 L20.071082,170.2 C16.6815216,170.2 13.9240245,167.510892 13.9240245,164.205504 C13.9240245,160.900009 16.6815216,158.210688 20.071082,158.210688 L23.986741,158.210688 L23.986741,159.813637 L20.071082,159.813637 C17.5878663,159.813637 15.56774,161.783768 15.56774,164.205504 C15.56774,166.627026 17.5878663,168.597051 20.071082,168.597051 L26.8529425,168.597051 C29.3360486,168.597051 31.3562845,166.627026 31.3562845,164.205504 C31.3562845,162.952746 30.8148447,161.821812 29.9493737,161.020978 L29.9493737,159.030008 Z","id","s-Image_29-Hotspot-Icon","fill","currentColor"],[1,"page-title"],[1,"tooltip_custom"],["data-tab","Task History","routerLink","history",3,"ngClass"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","task_history"],["id","Vector","d","M3 12C3 13.78 3.52784 15.5201 4.51677 17.0001C5.50571 18.4802 6.91131 19.6337 8.55585 20.3149C10.2004 20.9961 12.01 21.1743 13.7558 20.8271C15.5016 20.4798 17.1053 19.6226 18.364 18.364C19.6226 17.1053 20.4798 15.5016 20.8271 13.7558C21.1743 12.01 20.9961 10.2004 20.3149 8.55585C19.6337 6.91131 18.4802 5.50571 17.0001 4.51677C15.5201 3.52784 13.78 3 12 3C9.48395 3.00947 7.06897 3.99122 5.26 5.74L3 8","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M3 3V8H8","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_3","d","M12 7V12L16 14","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["data-tab","Linked Accounts","routerLink","authorizations",3,"ngClass"],["preserveAspectRatio","none","fill","CurrentColor","id","Linked_Accountss-Image_67-Layer_1","data-name","Layer 1","xmlns","http://www.w3.org/2000/svg","width","25","height","25","viewBox","0 0 64 64"],["d","M9,20a5,5,0,1,0-5-5A5,5,0,0,0,9,20Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,12Z",1,"cls-1"],["d","M9,38a5,5,0,1,0-5-5A5,5,0,0,0,9,38Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,30Z",1,"cls-1"],["d","M9,56a5,5,0,1,0-5-5A5,5,0,0,0,9,56Zm0-8a3,3,0,1,1-3,3A3,3,0,0,1,9,48Z",1,"cls-1"],["d","M59,14H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,14Z",1,"cls-1"],["d","M59,32H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,32Z",1,"cls-1"],["d","M59,50H21a1,1,0,0,0,0,2H59A1,1,0,0,0,59,50Z",1,"cls-1"],["data-tab","MCP","routerLink","mcp",3,"ngClass"],[1,"icon-w","mcpIcon"],["d","M12 2L2 7L12 12L22 7L12 2Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M2 17L12 22L22 17","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M2 12L12 17L22 12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 2V12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["data-tab","Tools","routerLink","tools",3,"ngClass"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 16 16","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M14.773 3.485l-.78-.184-2.108 2.096-1.194-1.216 2.056-2.157-.18-.792a4.42 4.42 0 0 0-1.347-.228 3.64 3.64 0 0 0-1.457.28 3.824 3.824 0 0 0-1.186.84 3.736 3.736 0 0 0-.875 1.265 3.938 3.938 0 0 0 0 2.966 335.341 335.341 0 0 0-6.173 6.234c-.21.275-.31.618-.284.963a1.403 1.403 0 0 0 .464.967c.124.135.272.247.437.328.17.075.353.118.538.127.316-.006.619-.126.854-.337 1.548-1.457 4.514-4.45 6.199-6.204.457.194.948.294 1.444.293a3.736 3.736 0 0 0 2.677-1.133 3.885 3.885 0 0 0 1.111-2.73 4.211 4.211 0 0 0-.196-1.378zM2.933 13.928a.31.31 0 0 1-.135.07.437.437 0 0 1-.149 0 .346.346 0 0 1-.144-.057.336.336 0 0 1-.114-.11c-.14-.143-.271-.415-.14-.568 1.37-1.457 4.191-4.305 5.955-6.046.1.132.21.258.328.376.118.123.245.237.38.341-1.706 1.75-4.488 4.564-5.98 5.994zm11.118-9.065c.002.765-.296 1.5-.832 2.048a2.861 2.861 0 0 1-4.007 0 2.992 2.992 
10 0 1-.635-3.137A2.748 2.748 0 0 1 10.14 2.18a2.76 2.76 0 0 1 1.072-.214h.254L9.649 3.839v.696l1.895 1.886h.66l1.847-1.816v.258zM3.24 6.688h1.531l.705.717.678-.674-.665-.678V6.01l.057-1.649-.22-.437-2.86-1.882-.591.066-.831.849-.066.599 1.838 2.918.424.215zm-.945-3.632L4.609 4.58 4.57 5.703H3.494L2.002 3.341l.293-.285zm7.105 6.96l.674-.673 3.106 3.185a1.479 1.479 0 0 1 0 2.039 1.404 1.404 0 0 1-1.549.315 1.31 1.31 0 0 1-.437-.315l-3.142-3.203.679-.678 3.132 3.194a.402.402 0 0 0 .153.105.477.477 0 0 0 .359 0 .403.403 0 0 0 .153-.105.436.436 0 0 0 .1-.153.525.525 0 0 0 .036-.184.547.547 0 0 0-.035-.184.436.436 0 0 0-.1-.153L9.4 10.016z"],["data-tab","Help","href","https://helpdesk.flozic.ai/portal/en/kb/flozic/flozic-user-guide-and-faq","target","_blank",3,"ngClass"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","id","help_svg"],["id","Help"],["id","Vector","d","M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_2","d","M12 16V12","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","Vector_3","d","M12 8H12.01","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["data-tab","Folders","routerLink","folders",1,"folders-link",3,"ngClass"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],["type","button","title","Folder",1,"btn","p-0","folderButton",3,"ngClass","click"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 512 512","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["d","M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"],["data-tab","Email Templates","href","https://mailhub.flozic.ai/","target","_blank"],["d","M3 6h18v12H3z"],["d","M3 6l9 7 9-7"],[1,"d-xl-none","border"],["type","button",1,"btn","mobile_btns","d-flex","d-xl-none","w-100","justify-content-between","align-items-center","gap-2","text-muted","font-w400","p-2","f-14","bg-white",3,"ngClass","click"],["d","M5 7.5L10 12.5L15 7.5","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","nav-main ProfileMenu mb-3 d-xl-none",4,"ngIf"],[1,"profile-Mobile-info","d-flex","align-items-center","gap-2","justify-content-between","p-2","w-100","d-xl-none","mt-2"],[1,"linksbill-setting"],["tabindex","-1","routerLink","/profile"],["tabindex","-1","ui-sref","billing",3,"click"],["id","logout","tabindex","-1",3,"click"],[1,"d-flex","flex-column","justify-content-center","gap-3","align-items-center","w-100","position-sticky","top-0","z-index3","bg-white",3,"ngClass"],[1,"align-items-center","d-flex","gap-3","justify-content-between","w-100"],["href","javascript:void(0);",1,"brandConnect",3,"click"],["class","appypie_logo light-logo","alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",4,"ngIf"],["class","appypie_logo dark-logo","alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",4,"ngIf"],["class","appypieIcon_logo","alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","35","height","35","decoding","async",4,"ngIf"],["class","appypie_logo_plus","alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",4,"ngIf"],["class","btn d-xl-none mobileshoeleftactive p-0",3,"click",4,"ngIf"],["class","w-100 connection_btn d-none d-xl-inline-block",4,"ngIf"],[1,"w-100","d-xl-none"],[1,"d-flex","flex-column","gap-2","positoin-relative","p-2","profile-
1Mobile"],[1,"align-items-center","d-inline-flex","gap-1","lh-1","mb-0","justify-content-between"],["alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",1,"appypie_logo","light-logo"],["alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",1,"appypie_logo","dark-logo"],["alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","35","height","35","decoding","async",1,"appypieIcon_logo"],["alt","Flozic","src","https://media.flozic.ai/flozic/icon/png/flozic-icon-color-1024.png","width","48","decoding","async","height","48",1,"appypie_logo_plus"],[1,"btn","d-xl-none","mobileshoeleftactive","p-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","40","height","40","viewBox","0 0 40 40","fill","none",1,""],[1,"w-100","connection_btn","d-none","d-xl-inline-block"],["routerLink","/customeditor/fresh/app/newNode","id","createConnect","ui-sref","customEditor",1,"btn","h6"],["width","25","height","25","viewBox","0 0 25 25","fill","none","xmlns","http://www.w3.org/2000/svg"],[1,"create-title","text-start"],["aria-label","tooltip",1,"tooltip_custom"],["data-tab","User Management","routerLink","team-moderator",3,"ngClass"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 640 512","height","24","width","24","xmlns","http://www.w3.org/2000/svg"],["d","M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"],[1,"tooltip_custom","user-management-tooltip"],[1,"border-bottom","folders-list-group","pb-3","ps-3"],["class","folder-skeleton",4,"ngIf"],[1,"folder-skeleton"],["class","skeleton-item",4,"ngFor","ngForOf"],[1,"skeleton-item"],[1,"skeleton-icon"],[1,"skeleton-text"],[4,"ngFor","ngForOf"],["class","text-muted ps-2 py-2","style","font-size: 13px;",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-muted","ps-2","py-2",2,"font-size","13px"],[1,"nav-main","ProfileMenu","mb-3","d-xl-none"],[1,"connectsli"],["tabindex","-1","href","javascript:void(0);",1,"gap-2"],[1,"iconbox","d-inline-flex","align-items-center","justify-content-center","rounded-circle","overflow-hidden"],["d","M8 10.4503C8.35957 10.894 8.81831 11.2612 9.34512 11.5269C9.87192 11.7926 10.4545 11.9505 11.0532 11.9901C11.652 12.0297 12.253 11.95 12.8154 11.7563C13.3779 11.5626 13.8886 11.2596 14.313 10.8677L16.8248 8.54902C17.5874 7.82019 18.0094 6.84404 17.9998 5.83081C17.9903 4.81758 17.55 3.84834 16.7738 3.13185C15.9977 2.41536 14.9477 2.00895 13.85 2.00015C12.7524 1.99134 11.6949 2.38085 10.9053 3.08478L9.46522 4.4064","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12 9.5497C11.6404 9.10597 11.1817 8.73881 10.6549 8.47313C10.1281 8.20745 9.54553 8.04946 8.94676 8.00987C8.348 7.97029 7.74701 8.05004 7.18456 8.24371C6.62212 8.43738 6.11138 8.74045 5.68697 9.13235L3.17516 11.451C2.41258 12.1798 1.99062 13.156 2.00016 14.1692C2.0097 15.1824 2.44997 16.1517 3.22616 16.8681C4.00234 17.5846 5.05233 17.991 6.14998 17.9999C7.24763 18.0087 8.30511 17.6192 9.09467 16.9152L10.5264 15.5936","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"align-items-center","d-flex","justify-content-between","flex-column","w-100"],[1,"align-items-center","d-flex","justify-content-between","w-100"],[1,"tasksli"],["src","/assets/images/tasks.svg","alt","task","width","20","height","20"],["class","",4,"ngIf"],["role","progressbar","aria-label","","aria-valuenow","","aria-valuemin","0","aria-valuemax","100",1,"progress","w-100","mt-1",2,"height","4px"],[1,"progress-bar",3,"ngClass"],["class","tasksli",4,"ngIf"],["d","M1.66663 5H4.99996","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M1.66663 8.33325H4.99996","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M1.66663 11.6667H4.99996","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M1.66663 15H4.99996","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M15 1.66675H5.00004C4.07957 1.66675 3.33337 2.41294 3.33337 3.33341V16.6667C3.33337 17.5872 4.07957 18.3334 5.00004 18.3334H15C15.9205 18.3334 16.6667 17.5872 16.6667 16.6667V3.33341C16.6667 2.41294 15.9205 1.66675 15 1.66675Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 1.66675V18.3334","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 5.83325H16.6667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 10H16.6667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.5 14.1667H16.6667","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"text-muted","small"],["role","progressbar","aria-label","MCP quota usage",1,"progress","w-100","mt-1",2,"height","4px"],["aria-valuemin","0","aria-valuemax","100",1,"progress-bar",3,"ngClass"],["class","p-2",4,"ngIf"],[3,"innerHtml",4,"ngIf"],[1,"d-flex","align-items-center","gap-1"],[2,"color","#F28322"],[1,"apiText"],["class","pull-right",4,"ngIf"],["role","progressbar","aria-label","","aria-valuenow","","aria-valuemin","0","aria-valuemax","100","id","vvvv",1,"progress","w-100","mt-1",2,"height","4px"],[1,"pull-right"],[3,"ngClass",4,"ngIf"],["class","",3,"ngClass",4,"ngIf"],[3,"ngClass"],[1,"",3,"ngClass"],[1,"p-2"],[1,"task-limit-alert"],["class","d-flex justify-content-between",4,"ngIf"],[1,"ps-1","text-end"],["tabindex","-1","type","link","ui-sref","billing","routerLink","/billing",3,"click"],[1,"d-flex","justify-content-between"],[1,"d-flex","align-content-center","gap-1"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 32 32","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["d","M 16 3 C 8.832031 3 3 8.832031 3 16 C 3 23.167969 8.832031 29 16 29 C 23.167969 29 29 23.167969 29 16 C 29 8.832031 23.167969 3 16 3 Z M 16 5 C 22.085938 5 27 9.914063 27 16 C 27 22.085938 22.085938 27 16 27 C 9.914063 27 5 22.085938 5 16 C 5 9.914063 9.914063 5 16 5 Z M 15 10 L 15 12 L 17 12 L 17 10 Z M 15 14 L 15 22 L 17 22 L 17 14 Z"],[1,"d-flex","align-content-center","gap-1","ps-3","ms-1"],[1,"balancedeti","gap-2","flex-row","p-2"],["d","M17.5 10V5.83333H4.16667C3.72464 5.83333 3.30072 5.65774 2.98816 5.34518C2.67559 5.03262 2.5 4.60869 2.5 4.16667C2.5 3.72464 2.67559 3.30072 2.98816 2.98816C3.30072 2.67559 3.72464 2.5 4.16667 2.5H15.8333V5.83333","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M2.5 4.16675V15.8334C2.5 16.2754 2.67559 16.6994 2.98816 17.0119C3.30072 17.3245 3.72464 17.5001 4.16667 17.5001H17.5V13.3334","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M15 10C14.558 10 14.1341 10.1756 13.8215 10.4882C13.509 10.8007 13.3334 11.2246 13.3334 11.6667C13.3334 12.1087 13.509 12.5326 13.8215 12.8452C14.1341 13.1577 14.558 13.3333 15 13.3333H18.3334V10H15Z","stroke","CurrentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["id","1111",1,"align-items-center","d-flex","justify-content-between","w-100"],[1,"bansize"],[1,"balnumber"],["tabindex","-1","ui-sref","add-fund",1,"custom-options-tooltip","add_fund_tooltip",3,"click"],[1,"align-items-center","blue-clr","d-inline-flex","pull-right"],[1,"fs-6"],["class","tasksli d-flex align-items-center gap-2 p-2",4,"ngIf"],[1,"tasksli","d-flex","align-items-center","gap-2","p-2"],["src","/assets/images/refresh_icon.svg","alt","Refresh","width","16","height","18"],[1,"f-14","text-black"],["type","button","class","btn editBtn p-0 ms-2 f-14 fw-semibold",3,"click",4,"ngIf"],["type","button",1,"btn","p-0"],[1,"css-input","switch-sm","switch","switch-primary","mx-0"],["type","checkbox","id","","name","login-remember-me",3,"checked","click"],["type","button",1,"btn","editBtn","p-0","ms-2","f-14","fw-semibold",3,"click"],[1,"ns-sidebar"],[1,"ns-head"],["id","nsBrand","routerLink","/create-agent","aria-label","Flozic home",1,"ns-brand"],["aria-hidden","true",1,"ns-brand-by"],[1,"ns-nav"],["routerLink","/customeditor/fresh/app/newNode",1,"ns-nav-i","ns-new"],["width","15","height","15","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","aria-hidden","true"],["d","M8 3.5v9M3.5 8h9"],["routerLink","/connects","routerLinkActive","on",1,"ns-nav-i"],["width","17","height","17","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["x","3","y","5.5","width","10","height","7.5","rx","2"],["d","M8 5.5V3.2"],["cx","8","cy","2.5","r",".7"],["d","M6 9.2h.01M10 9.2h.01","stroke-width","2"],["routerLink","/connections","routerLinkActive","on",1,"ns-nav-i"],["cx","4","cy","4","r","1.9"],["cx","12","cy","4","r","1.9"],["cx","8","cy","12","r","1.9"],["d","M5.9 4h4.2M4.9 5.7l2.2 4.6M11.1 5.7l-2.2 4.6"],["routerLink","/history","routerLinkActive","on",1,"ns-nav-i"],["cx","8","cy","8","r","5.
16"],["d","M8 5.2V8l2.1 1.5"],[1,"ns-nav-i","ns-folders"],["routerLink","/folders",1,"ns-nav-link"],["d","M2.5 4.5a1 1 0 0 1 1-1h3l1.5 1.5h4.5a1 1 0 0 1 1 1v5.5a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z"],["type","button","title","Folder","aria-label","Show folders",1,"ns-nav-chev",3,"click"],["width","12","height","12","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["d","M6 3.5 10.5 8 6 12.5"],["class","ns-ftree",4,"ngIf"],[1,"ns-foot"],["type","button",1,"ns-foot-btn",3,"title","click"],[1,"ns-av"],[1,"ns-em"],["width","14","height","14","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"ns-chev"],["d","M4.5 6.5 8 10l3.5-3.5"],["type","button",1,"ns-collapse",3,"title","click"],["d","m10 3.5-4.5 4.5L10 12.5"],["class","ns-crumb",3,"ns-trial",4,"ngIf"],["class","ns-pmenu",4,"ngIf"],[1,"ns-ftree"],["class","ns-ftree-msg",4,"ngIf"],[1,"ns-ftree-msg"],[1,"ns-crumb"],["routerLink","/settings",1,"ns-crumb-back"],["width","14","height","14","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["d","M13 8H3.5M7.5 4 3.5 8l4 4"],["width","11","height","11","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"ns-crumb-sep"],[1,"ns-crumb-cur"],[1,"ns-pmenu"],[1,"ns-pm-h"],[1,"ns-pm-e"],[1,"ns-pm-email"],["type","button","title","Copy email","aria-label","Copy email",1,"ns-pm-copy",3,"click"],["width","13","height","13","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["width","13","height","13","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["class","ns-plan",4,"ngIf"],["class","ns-subacct",4,"ngIf"],["type","button",1,"ns-prow",3,"click"],[1,"ns-pi"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",4,"ngIf"],["routerLink","/profile",1,"ns-prow"],["width","14","height","14","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.6","stroke-linecap","round"],["cx","8","cy","5.5","r","2.5"],["d","M3 13.2a5 5 0 0 1 10 0"],["class","ns-prow","routerLink","/admin/customers",4,"ngIf"],["class","ns-prow ns-two","routerLink","/plans-usage",4,"ngIf"],["type","button","class","ns-prow",3,"click",4,"ngIf"],["routerLink","/settings",1,"ns-prow"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.4","stroke-linecap","round","stroke-linejoin","round"],["d","M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"],["cx","12","cy","12","r","3"],["type","button",1,"ns-plogout",3,"click"],["width","13","height","13","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["x","5.5","y","5.5","width","8","height","8","rx","1.5"],["d","M3.5 10.5h-.5a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h6.5a1 1 0 0 1 1 1v.5"],["width","13","height","13","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["d","M3.5 8.5 6.5 11.5 12.5 4.5"],[1,"ns-plan"],[1,"ns-subacct"],["width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"],["cx","12","cy","12","r","4"],["d","M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"],["routerLink","/admin/customers",1,"ns-prow"],["d","M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"],["routerLink","/plans-usage",1,"ns-
1prow","ns-two"],[1,"ns-psub"],[1,"ns-pi","ns-crown"],["d","M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z"],["d","M5 21h14"],[1,"ns-pi-wrap"],[1,"ns-kbd"],[1,"ns-pi","ns-copilot-ic"],["width","15","height","15","viewBox","0 0 24 24","fill","currentColor","aria-hidden","true"],["d","M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"],[1,"ns-acct-overlay",3,"click"],[1,"dropdown","profile","userlogindetails","ns-acct-host"],[1,"dropdown-menu","show","ns-acct-pop"],["type","button","aria-label","Close",1,"ns-acct-x",3,"click"],["width","12","height","12","viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.7","stroke-linecap","round"],["d","M4.5 4.5l7 7M11.5 4.5l-7 7"],["type","button","data-tooltip","Copilot","aria-label","Copilot",1,"copilot-floating-btn",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","#fff"],["panelSide","left",3,"isOpen","currentUser","currentApp","connectList","closeCopilot"],["id","phoneNumberModal","tabindex","-1","role","dialog","aria-hidden","true",1,"modal","fade"],[1,"d-flex","align-items-center","gap-1","folderItem",3,"ngClass"],["type","button","title","Expand","class","btn p-0 expandButton sidebar-expand-btn",3,"ngClass","click",4,"ngIf"],[1,"d-block","text-truncate","w-100",3,"routerLink","ngClass"],["stroke","currentColor","fill","none","stroke-width","2","viewBox","0 0 24 24","stroke-linecap","round","stroke-linejoin","round","height","16","width","16","xmlns","http://www.w3.org/2000/svg"],["type","button","title","Expand",1,"btn","p-0","expandButton","sidebar-expand-btn",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","14","height","14","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["points","9 18 15 12 9 6"],["tabindex","-1","routerLink","/connects",1,"gap-2",3,"click"],["tabindex","-1","routerLink","/history",1,"gap-2",3,"click"],["class","ms-1 custom-options-tooltip over-limit w-auto","tabindex","-1","ui-sref","billing","routerLink","/billing",3,"click",4,"ngIf"],["class","d-flex align-items-center gap-1",3,"ngClass",4,"ngIf"],[1,"pt-0","unlockli"],["class","unlock d-block text-end",3,"unlock-disabled","click",4,"ngIf"],["tabindex","-1","routerLink","/mcp",1,"gap-2",3,"click"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","justify-content-between","align-items-center","w-100"],["role","progressbar","aria-label","MCP quota usage",1,"progress","mt-1",2,"height","4px"],[1,"monthlyuses","d-block","p-1","text-center","w-100",3,"innerHtml"],["class","upgrade_plan_btn",4,"ngIf"],["tabindex","-1","ui-sref","billing","routerLink","/billing",1,"ms-1","custom-options-tooltip","over-limit","w-auto",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10 2H14M14 2V6M14 2L6.66667 9.33333M12 8.66667V12.6667C12 13.0203 11.8595 13.3594 11.6095 13.6095C11.3594 13.8595 11.0203 14 10.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H7.33333","stroke","CurrentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],[1,"d-flex","align-items-center","gap-1",3,"ngClass"],[1,"unlock","d-block","text-end",3,"click"],["aria-hidden","true",1,"unlock-spinner"],["tabindex","-1","routerLink","/history",1,"m-0","mindbod-link","w-auto"],["class","pull-right d-flex align-items-center gap-1",4,"ngIf"],["id","bbbb",1,"progress-bar",3,"ngClass"],[1,"pull-right","d-flex","align-items-center","gap-1"],[3,"ngClass","innerHtml"],[1,"upgrade_plan_btn"],["routerLink","/plans","type","button",1,"btn","h6","upgradebtnLink","mobile_upgradebtnLink","w-100","text-center","justify-content-center","f-14","py-2",3,"click"],[1,"fw-semibold"],[1,"border-top","d-flex","flex-column","gap-2","mt-2","px-0","pt-2","w-100"],[1,"balancedeti","gap-2","flex-row"],["id","walletDiv",1,"align-items-center","d-flex","justify-content-between","w-100"],[1,"bansize","text-black"],["class","tasksli d-flex align-items-center gap-2",4,"ngIf"],[1,"tasksli","d-flex","align-items-center","gap-2"],["id","switchAutoCharge",1,"btn","p-0"]],template:function(t,e){1&t&&(o.YNc(0,aH,17,4,"div",0),o.YNc(1,cH,3,1,"button",1),o.YNc(2,EH,2,5,"div",2),o.YNc(3,MQ,2,4,"section",3),o.YNc(4,KQ,61,26,"ng-container",4),o.TgZ(5,"div",5),o.YNc(6,XQ,1,0,"router-outlet",4),o.qZA(),o.YNc(7,tY,3,3,"button",6),o.YNc(8,nY,1,5,"app-appypie-copilot",7),o.YNc(9,iY,1,0,"app-day-free-trial",4),o.YNc(10,oY,1,0,"app-day-free-trial",4),o.YNc(11,rY,1,0,"div",8),o.YNc(12,sY,1,0,"app-loader",4),o.YNc(13,fY,7,12,"ng-template",null,9,o.W1O),o.YNc(15,mY,1,0,"app-access-suspended",4),o.YNc(16,PY,59,27,"ng-template",null,10,o.W1O),o.YNc(18,EY,22,10,"ng-template",null,11,o.W1O)),2&t&&(o.Q6J("ngIf","IMPERSONATION"===(null==e.currentUser?null:e.currentUser.loginType)&&(null==e.currentUser?null:e.currentUser.impersonatedBy)&&!e.impersonationBannerHidden),o.xp6(1),o.Q6J("ngIf","IMPERSONATION"===(null==e.currentUser?null:e.currentUser.loginType)&&(null==e.currentUser?null:e.currentUser.impersonatedBy)&&e.impersonationBannerHidden),o.xp6(1),o.Q6J("ngIf",!e.testloader),o.xp6(1),o.Q6J("ngIf",!e.testloader),o.xp6(1),o.Q6J("ngIf",e.nsShellOn),o.xp6(1),o.Q6J("ngClass",o.WLB(14,FY,e.showDayFreeTrial||"jc0fgwefcky2"===(null==e.currentUser?null:e.currentUser.planId),e.showGlobalCopilot&&!e.isCustomEditorRoute)),o.xp6(1),o.Q6J("ngIf",e.currentUser),o.xp6(1),o.Q6J("ngIf",e.currentUser&&!e.hideGlobalCopilot),o.xp6(1),o.Q6J("ngIf",e.currentUser&&!e.hideGlobalCopilot),o.xp6(1),o.Q6J("ngIf",e.showDayFreeTrial),o.xp6(1),o.Q6J("ngIf","jc0fgwefcky2"===(null==e.currentUser?null:e.currentUser.planId)&&!e.isSetupEditorRoute),o.xp6(1),o.Q6J("ngIf",e.translation&&!e.testloader),o.xp6(1),o.Q6J("ngIf",e.testloader),o.xp6(3),o.Q6J("ngIf",e.showAccessSuspended))},directives:[to.O5,to.mk,ui.yS,Xi.Fj,Xi.JJ,Xi.On,to.PC,m$,to.sg,ui.rH,to.tP,ui.Od,iB,ui.lC,KB,rH,po,sH],pipes:[to.JJ],styles:['.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;scrollbar-width:thin;padding:.5rem 1rem;margin-top:5px;background-color:var(--dropdown-bg);border-color:var(--dropdown-border);color:var(--primary-text)}.book-expert[_ngcontent-%COMP%]{background-color:var(--card-bg);color:var(--Primary-Color);padding:6px 14px;height:auto;border-radius:8px;font-weight:500;position:relative;border-color:var(--Primary-Color);border-style:solid;border-width:1px;line-height:31px;font-size:15px}.copilot-sparkle-btn[_ngcontent-%COMP%]{background-color:var(--Primary-Color)!important;color:#fff!important;border-radius:50%!important;width:40px;height:40px;transition:transform .2s ease,box-shadow .2s ease}.copilot-sparkle-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:22px;height:22px}.copilot-sparkle-btn[_ngcontent-%COMP%]:hover, .copilot-sparkle-btn.active[_ngcontent-%COMP%]{transform:scale(1.05);box-shadow:0 2px 8px #5371ff59}.copilot-sparkle-btn[_ngcontent-%COMP%]:focus{box-shadow:none;outline:none}#Mainleftside[_ngcontent-%COMP%]   .d-flexnav[_ngcontent-%COMP%]{padding-bottom:70px!important}@media (max-height: 720px){#Mainleftside[_ngcontent-%COMP%]   #sidebar[_ngcontent-%COMP%]   .sidebar-content[_ngcontent-%COMP%]{max-height:100vh;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin}#Mainleftside[_ngcontent-%COMP%]   #sidebar[_ngcontent-%COMP%]   .d-flexnav[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], #Mainleftside[_ngcontent-%COMP%]   #sidebar[_ngcontent-%COMP%]   .d-flexnav[_ngcontent-%COMP%]   .nav-main[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{flex-shrink:0!important}}.copilot-floating-btn[_ngcontent-%COMP%]{position:fixed;left:12px;bottom:14px;width:42px;height:42px;border-radius:50%;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#5371ff 0%,#8a5cff 100%);color:#fff;box-shadow:0 6px 18px #5371ff66;cursor:pointer;z-index:1050;transition:transform .2s ease,box-shadow .2s ease,background .25s ease}.copilot-floating-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{pointer-events:none;width:20px;height:20px;transition:transform .25s ease}@property --copilot-angle{syntax: "<angle>"; initial-value: 0deg; inherits: false;}@keyframes copilot-rotate-gradient{to{--copilot-angle: 360deg}}.copilot-floating-btn[_ngcontent-%COMP%]:hover, .copilot-floating-btn.active[_ngcontent-%COMP%]{background:conic-gradient(from var(--copilot-angle),#ff7a1a 0deg,#ff3d6e 120deg,#c63cb8 200deg,#ff3d6e 280deg,#ff7a1a 360deg);animation:copilot-rotate-gradient 3s linear infinite;box-shadow:0 10px 26px #c63cb880}.copilot-floating-btn[_ngcontent-%COMP%]:hover{transform:scale(1.08)}.copilot-floating-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #5371ff59}.copilot-floating-btn[_ngcontent-%COMP%]:after{content:attr(data-tooltip);position:absolute;
1left:calc(100% + 12px);top:50%;transform:translateY(-50%) translate(-6px);background:linear-gradient(135deg,#5371ff 0%,#6f5bff 100%);color:#fff;font-size:12px;font-weight:500;letter-spacing:.2px;padding:6px 12px;border-radius:8px;white-space:nowrap;box-shadow:0 6px 18px #5371ff59;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease,visibility .18s ease}.copilot-floating-btn[_ngcontent-%COMP%]:hover:after{opacity:1;visibility:visible;transform:translateY(-50%) translate(0)}.book-expert[_ngcontent-%COMP%]:hover{background-color:var(--Primary-Color);color:var(--card-bg)}.book-expert[_ngcontent-%COMP%]:focus{box-shadow:none;outline:none}.ai-agent-header[_ngcontent-%COMP%]{background:transparent;color:#7c4dff;padding:4px 16px;height:auto;min-height:45px;border:1.5px solid #7c4dff;border-radius:8px;font-weight:500;position:relative;line-height:1.3;font-size:15px;grid-gap:2px;gap:2px}.ai-agent-header[_ngcontent-%COMP%]   .ai-agent-sub[_ngcontent-%COMP%]{font-size:10.5px;font-weight:400;line-height:1.35;text-align:center;white-space:nowrap}.ai-agent-header[_ngcontent-%COMP%]   .d-none.d-xl-block[_ngcontent-%COMP%]{background-image:linear-gradient(100deg,#7c4dff,#d946ef);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}.ai-agent-header[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .ai-agent-header[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:relative;z-index:1}.ai-agent-header[_ngcontent-%COMP%]:hover, .ai-agent-header[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 3px #7c4dff26;outline:none}.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:12.65px}.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--secondary-text)}.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover > span[_ngcontent-%COMP%]{color:currentColor}.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{color:var(--text-secondary)}.over-limit[_ngcontent-%COMP%]:after{min-width:23em;transform:translate(-36%)}@media (max-width: 1199px){.book-expert[_ngcontent-%COMP%]{background-color:var(--secondary-bg);color:var(--Primary-Color);width:36px;height:36px;border-radius:100px;padding:0}.book-expert[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{display:none}.ai-agent-header[_ngcontent-%COMP%]{width:36px;height:36px;min-height:36px;border-radius:100px;padding:0}.nav-header[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}.profile-Mobile[_ngcontent-%COMP%], .ProfileMenu[_ngcontent-%COMP%]{border-radius:8px;background:#F3F8FF}.iconbox[_ngcontent-%COMP%]{background-color:#fff}.ProfileMenu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{margin-bottom:0}.profile-Mobile-info[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;grid-gap:.5rem;gap:.5rem;color:#1d1d1d;font-size:13px;padding:0 .5rem;flex-direction:column}.profile-Mobile-info[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:#74748a}.d-flexnav[_ngcontent-%COMP%]{padding-bottom:0;padding-top:0;overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth;overscroll-behavior:auto;scrollbar-width:thin;position:relative}.profile-Mobile-info[_ngcontent-%COMP%]{background:#fff;position:sticky;bottom:0;z-index:2}.mobile_btns[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transition:transform .2s ease}.mobile_btns.active[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{transform:rotate(180deg)}li.tasksli[_ngcontent-%COMP%]   .f-14[_ngcontent-%COMP%]{font-size:13px}.task-limit-alert[_ngcontent-%COMP%]{border-radius:4px;border:1px solid #F28322;background:#FFF8F3;display:flex;padding:6px;align-items:flex-start;grid-gap:4px;gap:4px;flex-direction:column}.task-limit-alert[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px;margin:0;width:100%;line-height:16px;color:#1d1d1d}.task-limit-alert[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{color:var( --Primary-Color);font-size:12px;font-weight:400;line-height:16px;-webkit-text-decoration-line:underline;text-decoration-line:underline}}.mindbod-link[_ngcontent-%COMP%]{color:var(--text-primary)}.mindbod-link[_ngcontent-%COMP%]:hover{color:#676cfb}.editBtn[_ngcontent-%COMP%]{color:var( --Primary-Color)}.editBtn[_ngcontent-%COMP%]:hover{text-decoration:underline;color:#1d1d1d}.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   small.unlock[_ngcontent-%COMP%]{color:var( --Primary-Color)}.unlock-spinner[_ngcontent-%COMP%]{display:inline-block;width:11px;height:11px;margin-right:6px;vertical-align:-1px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;opacity:.75;animation:unlock-spin .7s linear infinite}@keyframes unlock-spin{to{transform:rotate(360deg)}}.unlock.unlock-disabled[_ngcontent-%COMP%]{opacity:.7;pointer-events:none;cursor:default}@media (prefers-reduced-motion: reduce){.unlock-spinner[_ngcontent-%COMP%]{animation-duration:1.6s}}.right-position[_ngcontent-%COMP%]:after{left:auto;right:0;min-width:20em;text-align:start;transform:translate(5px);top:100%;bottom:auto;padding:5px 10px;margin-top:10px}.right-position[_ngcontent-%COMP%]:before{display:none}.progressbar-brk[_ngcontent-%COMP%]:after, .progressbar-brk[_ngcontent-%COMP%]:before{content:"";height:8px;width:2px;background:#74748A;position:absolute;right:0;top:-2px;border-radius:0}.progressbar-brk[_ngcontent-%COMP%]:before{right:auto;left:0}.add_fund_tooltip.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:1}.add_fund_tooltip.disabled[_ngcontent-%COMP%]   .blue-clr[_ngcontent-%COMP%]{color:#bdc8ff}@media (min-width: 1200px){.add_fund_tooltip[_ngcontent-%COMP%]:after{transform:translate(-70%);min-width:12em}.add_fund_tooltip.disabled[_ngcontent-%COMP%]{pointer-events:auto;opacity:1}}.theme-toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 8px;margin:0 4px}.theme-toggle-header[_ngcontent-%COMP%]   app-theme-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}@media (max-width: 1199px){.theme-toggle-header[_ngcontent-%COMP%]{padding:0 4px;margin:0 2px}}.copilot-toggle-header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 4px}
1.btn-copilot-circle[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;border:1px solid #ccc;background:transparent;display:flex;align-items:center;justify-content:center;padding:0;color:#555;cursor:pointer;transition:all .2s ease}.btn-copilot-circle[_ngcontent-%COMP%]:hover{background:#f0f0f0;border-color:#999;color:#333}.copilot-stars[_ngcontent-%COMP%]{display:inline-flex;align-items:center;margin-left:4px}.user-management-tooltip[_ngcontent-%COMP%]{transform:translate(150px,5px);min-width:12em}.maintabs[_ngcontent-%COMP%]{overflow-x:hidden;scrollbar-width:none;scroll-behavior:smooth;overscroll-behavior-y:auto;overflow-y:auto}.maintabs.nav-main[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{margin-bottom:.25rem;padding-top:8px;padding-bottom:8px}.impersonation-banner[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:9999;background:linear-gradient(90deg,#dc2626,#b91c1c);color:#fff;padding:10px 20px;display:flex;align-items:center;justify-content:space-between;font-size:14px;box-shadow:0 2px 8px #00000026}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-content[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-content[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:600;color:#fff}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-exit[_ngcontent-%COMP%]{background:#fff;color:#b91c1c;border:none;padding:6px 14px;border-radius:4px;font-size:13px;font-weight:600;cursor:pointer}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-exit[_ngcontent-%COMP%]:hover:not([disabled]){background:#fef2f2}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-exit[disabled][_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-banner-actions[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-hide[_ngcontent-%COMP%]{background:transparent;color:#ffffffe6;border:1px solid rgba(255,255,255,.4);width:28px;height:28px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}.impersonation-banner[_ngcontent-%COMP%]   .impersonation-hide[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.15);border-color:#ffffffb3}.impersonation-floating[_ngcontent-%COMP%]{position:fixed;top:12px;right:12px;z-index:9999;width:38px;height:38px;border-radius:50%;border:2px solid #fff;background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 2px 10px #00000040;transition:transform .15s ease,box-shadow .15s ease}.impersonation-floating[_ngcontent-%COMP%]:hover{transform:scale(1.08);box-shadow:0 4px 14px #00000059}body[_ngcontent-%COMP%]:has(.impersonation-banner)   #page-container[_ngcontent-%COMP%], body[_ngcontent-%COMP%]:has(.impersonation-banner)   #page-container-customeditor[_ngcontent-%COMP%]{padding-top:40px}.agents-dash-link[_ngcontent-%COMP%]{height:auto;min-height:45px;border-radius:8px;background:#fff;background:var(--card-bg, #fff);border:1px solid #e2e5ec;border:1px solid var(--border-color, #e2e5ec);display:flex;align-items:center;grid-gap:7px;gap:7px;padding:6px 16px;line-height:31px;font-size:15px;white-space:nowrap;transition:background-color .2s ease,border-color .2s ease,color .2s ease;color:#3c4353;color:var(--primary-text, #3c4353);text-decoration:none;cursor:pointer}.agents-dash-link[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{flex-shrink:0}.agents-dash-link__text[_ngcontent-%COMP%]{font-size:15px;font-weight:500}.agents-dash-link[_ngcontent-%COMP%]:hover{background:rgba(91,108,249,.14);border-color:#5b6cf973;color:#4f61e9;color:var(--Primary-Color, #4f61e9);text-decoration:none}.expert-help-link[_ngcontent-%COMP%]{position:relative;width:42px;height:42px;border-radius:50%;background:#fff;background:var(--card-bg, #fff);border:1px solid #e2e5ec;border:1px solid var(--border-color, #e2e5ec);display:flex;align-items:center;justify-content:center;color:#3c4353;color:var(--primary-text, #3c4353);cursor:pointer;text-decoration:none;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.expert-help-link[_ngcontent-%COMP%]:hover{background:rgba(91,108,249,.14);border-color:#5b6cf973;color:#4f61e9;color:var(--Primary-Color, #4f61e9);text-decoration:none}.expert-help-link[_ngcontent-%COMP%]:after{content:attr(data-tooltip);position:absolute;top:48px;left:50%;transform:translate(-50%);background:#1f2430;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:1050}.expert-help-link[_ngcontent-%COMP%]:hover:after{opacity:1}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0f0c29,#302b63,#24243e);color:#fff;border-color:transparent;overflow:hidden}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]   .d-none.d-xl-block[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]   .d-none.d-xl-block[_ngcontent-%COMP%]{background-image:none;-webkit-background-clip:initial;background-clip:border-box;background-clip:initial;-webkit-text-fill-color:initial;color:#fff}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]   .d-none.d-xl-block.ai-agent-sub[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]   .d-none.d-xl-block.ai-agent-sub[_ngcontent-%COMP%]{color:#cfc9f2}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:before, .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:before{content:"";position:absolute;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,rgba(139,92,246,.75),transparent 65%);top:-38px;left:-18px;animation:aiAgentDrift 5s ease-in-out infinite alternate}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:after, .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;background:radial-gradient(circle,rgba(34,211,238,.5),transparent 65%);bottom:-38px;right:-14px;animation:aiAgentDrift 6s ease-in-out infinite alternate-reverse}@keyframes aiAgentDrift{to{transform:translate(22px,10px)}}.theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:hover, .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:hover, .theme-dark[_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:focus, .theme-dark   [_nghost-%COMP%]   .ai-agent-header[_ngcontent-%COMP%]:focus{color:#fff;box-shadow:0 4px 14px #594ae259}.ns-sidebar[_ngcontent-%COMP%]{position:fixed;top:0;bottom:0;left:0;z-index:20;width:256px;display:flex;flex-direction:column;background:var(--ns-panel);border-right:1px solid var(--ns-line);color:var(--ns-ink);font-family:var(--ns-sans);font-size:14px;line-height:1.45;transition:left .2s ease}.ns-sidebar.ns-trial[_ngcontent-%COMP%]{top:60px}.ns-collapsed[_nghost-%COMP%]   .ns-sidebar[_ngcontent-%COMP%]{left:-260px;visibility:hidden}.ns-head[_ngcontent-%COMP%]{padding:16px 16px 10px;flex:none}.ns-brand[_ngcontent-%COMP%]{position:relative;display:block;width:96.4px;height:34px;background:url(https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-light-2048.png) no-repeat left center / contain;filter:brightness(.72) saturate(1.8)}.ns-brand-by[_ngcontent-%COMP%]{position:absolute;
1left:37.793%;right:6.445%;top:72.992%;font:600 9px/1 var(--ns-sans);color:#c6ff3d;white-space:nowrap}.ns-brand-by[_ngcontent-%COMP%]   em[_ngcontent-%COMP%]{font-style:normal;color:#a3a3a3}.theme-dark[_nghost-%COMP%]   #nsBrand[_ngcontent-%COMP%]   .ns-brand-by[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   #nsBrand[_ngcontent-%COMP%]   .ns-brand-by[_ngcontent-%COMP%]{color:#c6ff3d!important}.theme-dark[_nghost-%COMP%]   #nsBrand[_ngcontent-%COMP%]   .ns-brand-by[_ngcontent-%COMP%]   em[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   #nsBrand[_ngcontent-%COMP%]   .ns-brand-by[_ngcontent-%COMP%]   em[_ngcontent-%COMP%]{color:#a3a3a3!important}.theme-dark[_nghost-%COMP%]   .ns-brand[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .ns-brand[_ngcontent-%COMP%]{background-image:url(https://media.flozic.ai/flozic/wordmark/png/flozic-logo-color-on-dark-2048.png);filter:none}.ns-nav[_ngcontent-%COMP%]{flex:none;display:flex;flex-direction:column;grid-gap:2px;gap:2px;padding:4px 10px 10px;border-bottom:1px solid var(--ns-line)}.ns-nav-i[_ngcontent-%COMP%], .ns-nav-link[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px;height:36px;padding:0 10px;border-radius:8px;font-size:13.5px;font-weight:600;color:var(--ns-muted);text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.ns-nav-i[_ngcontent-%COMP%]:hover, .ns-nav-link[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink);text-decoration:none}.ns-nav-i.on[_ngcontent-%COMP%], .ns-nav-i.on[_ngcontent-%COMP%]   .ns-nav-link[_ngcontent-%COMP%]{background:var(--ns-accent-soft);color:var(--ns-accent-ink)}.ns-nav-i.ns-new[_ngcontent-%COMP%]{height:34px;color:var(--ns-ink)}.ns-nav-i.ns-new[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:var(--ns-accent)}.ns-nav-i.ns-new.on[_ngcontent-%COMP%]{color:var(--ns-accent-ink)}.ns-nav-i.ns-folders[_ngcontent-%COMP%]{padding:0;grid-gap:0;gap:0}.ns-nav-i.ns-folders[_ngcontent-%COMP%]   .ns-nav-link[_ngcontent-%COMP%]{flex:1;min-width:0}.ns-nav-i.ns-folders[_ngcontent-%COMP%]   .ns-nav-link[_ngcontent-%COMP%]:hover{background:none}.ns-nav-chev[_ngcontent-%COMP%]{width:22px;height:22px;margin-right:6px;flex:none;border:0;border-radius:6px;background:none;color:var(--ns-faint);display:grid;place-items:center;cursor:pointer}.ns-nav-chev[_ngcontent-%COMP%]:hover{background:var(--ns-line);color:var(--ns-ink)}.ns-nav-chev[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transition:transform .15s}.ns-nav-chev.open[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transform:rotate(90deg)}.ns-ftree[_ngcontent-%COMP%]{max-height:220px;overflow-y:auto;padding:0 0 4px 18px}.ns-ftree[_ngcontent-%COMP%]   .folderItem[_ngcontent-%COMP%]{min-height:30px}.ns-ftree[_ngcontent-%COMP%]   .folderItem[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex!important;align-items:center;grid-gap:8px;gap:8px;height:30px;padding:0 8px;border-radius:7px;font-size:13px;font-weight:500;color:var(--ns-muted);text-decoration:none}.ns-ftree[_ngcontent-%COMP%]   .folderItem[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink)}.ns-ftree[_ngcontent-%COMP%]   .folderItem[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:14px;height:14px;flex:none}.ns-ftree[_ngcontent-%COMP%]   .sidebar-folder-active[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{background:var(--ns-accent-soft);color:var(--ns-accent-ink)!important}.ns-ftree[_ngcontent-%COMP%]   .sidebar-expand-btn[_ngcontent-%COMP%]{color:var(--ns-faint)}.ns-ftree[_ngcontent-%COMP%]   .sidebar-expand-btn.sidebar-expanded[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transform:rotate(90deg)}.ns-ftree-msg[_ngcontent-%COMP%]{padding:6px 8px;font-size:12.5px;color:var(--ns-faint)}.ns-foot[_ngcontent-%COMP%]{flex:none;padding:6px 10px;border-top:1px solid var(--ns-line)}.ns-foot-btn[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;grid-gap:8px;gap:8px;height:38px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--ns-ink);font:inherit;text-align:left;cursor:pointer}.ns-foot-btn[_ngcontent-%COMP%]:hover, .ns-foot-btn.on[_ngcontent-%COMP%]{background:var(--ns-panel-2)}.ns-av[_ngcontent-%COMP%]{width:26px;height:26px;flex:none;border-radius:50%;border:1px solid var(--ns-line-strong);background:var(--ns-accent-soft);color:var(--ns-accent-ink);font-size:11px;font-weight:700;display:grid;place-items:center}.ns-em[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1.ns-chev[_ngcontent-%COMP%]{flex:none;color:var(--ns-faint);transition:transform .15s}.ns-foot-btn.on[_ngcontent-%COMP%]   .ns-chev[_ngcontent-%COMP%]{transform:rotate(180deg)}.ns-collapse[_ngcontent-%COMP%]{position:fixed;top:15px;left:256px;z-index:21;transform:translate(-50%);width:26px;height:26px;border-radius:50%;border:1px solid var(--ns-line-strong);background:var(--ns-panel);color:var(--ns-muted);box-shadow:var(--ns-shadow);display:grid;place-items:center;cursor:pointer;transition:left .2s ease}.ns-collapse[_ngcontent-%COMP%]:hover{color:var(--ns-ink)}.ns-collapse.ns-trial[_ngcontent-%COMP%]{top:75px}.ns-collapsed[_nghost-%COMP%]   .ns-collapse[_ngcontent-%COMP%]{left:14px}.ns-collapsed[_nghost-%COMP%]   .ns-collapse[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{transform:rotate(180deg)}.ns-crumb[_ngcontent-%COMP%]{position:fixed;top:22px;left:288px;z-index:21;display:flex;align-items:center;grid-gap:6px;gap:6px;font:13px/1 var(--ns-sans);color:var(--ns-faint);transition:left .2s ease}.ns-crumb.ns-trial[_ngcontent-%COMP%]{top:82px}.ns-collapsed[_nghost-%COMP%]   .ns-crumb[_ngcontent-%COMP%]{left:70px}.ns-crumb-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:6px;gap:6px;padding:6px 10px 6px 8px;border:1px solid var(--ns-line);border-radius:99px;background:var(--ns-panel);color:var(--ns-muted);font-weight:500;text-decoration:none}.ns-crumb-back[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);border-color:var(--ns-line-strong);color:var(--ns-ink);text-decoration:none}.ns-crumb-sep[_ngcontent-%COMP%]{color:var(--ns-faint)}.ns-crumb-cur[_ngcontent-%COMP%]{font-weight:600;color:var(--ns-ink)}.ns-pmenu[_ngcontent-%COMP%]{position:fixed;left:12px;bottom:56px;z-index:990;width:232px;display:flex;flex-direction:column;grid-gap:4px;gap:4px;padding:6px;background:var(--ns-panel);border:1px solid var(--ns-line-strong);border-radius:10px;box-shadow:var(--ns-shadow);color:var(--ns-ink);font-family:var(--ns-sans)}.ns-pm-h[_ngcontent-%COMP%]{padding:8px 10px 7px;border-bottom:1px solid var(--ns-line)}.ns-pm-e[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:4px;gap:4px}.ns-pm-email[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ns-pm-copy[_ngcontent-%COMP%]{width:24px;height:24px;flex:none;border:0;border-radius:6px;background:none;color:var(--ns-faint);display:grid;place-items:center;cursor:pointer}.ns-pm-copy[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink)}.ns-pm-copy.done[_ngcontent-%COMP%]{color:var(--ns-ok)}.ns-plan[_ngcontent-%COMP%]{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:99px;background:var(--ns-accent-soft);color:var(--ns-accent-ink);font-size:11px;font-weight:600}.ns-subacct[_ngcontent-%COMP%]{display:block;margin-top:4px;font-size:11px;color:var(--ns-muted)}.ns-prow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;min-height:32px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--ns-ink);font:inherit;font-size:13px;text-align:left;text-decoration:none;cursor:pointer}.ns-prow[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink);text-decoration:none}.ns-prow.ns-two[_ngcontent-%COMP%]{padding-top:6px;padding-bottom:6px}.ns-psub[_ngcontent-%COMP%]{display:block;margin-top:3px;font-size:12px;color:var(--ns-faint);font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.ns-pi[_ngcontent-%COMP%]{width:24px;height:24px;flex:none;display:grid;place-items:center;color:var(--ns-muted)}.ns-pi-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:center;grid-gap:4px;gap:4px}.ns-kbd[_ngcontent-%COMP%]{font:500 10px var(--ns-mono);color:var(--ns-faint);background:var(--ns-panel);border:1px solid var(--ns-line);border-radius:5px;padding:1px 5px}.ns-pi.ns-copilot-ic[_ngcontent-%COMP%]{color:#7c5cf6}.ns-pi.ns-crown[_ngcontent-%COMP%]{color:var(--ns-amber)}.ns-plogout[_ngcontent-%COMP%]{padding:8px 10px;border:0;border-radius:7px;background:none;color:var(--ns-ink);font:inherit;font-size:13px;font-weight:600;text-align:left;cursor:pointer}.ns-plogout[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2)}.ns-acct-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:994;background:rgba(15,15,20,.18)}.ns-acct-host.userlogindetails[_ngcontent-%COMP%]   .dropdown-menu.ns-acct-pop[_ngcontent-%COMP%]{position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;z-index:995;width:360px;max-width:calc(100vw - 32px);max-height:80vh;overflow-y:auto;margin:0!important;padding:16px!important}.ns-acct-x[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;width:26px;height:26px;border:0;border-radius:7px;background:none;color:var(--ns-muted);display:grid;place-items:center;cursor:pointer;z-index:1}.ns-acct-x[_ngcontent-%COMP%]:hover{background:var(--ns-panel-2);color:var(--ns-ink)}']}),t})(),LY=(()=>{class t{transform(t,e){return e?t.filter(t=>{if(t){const n="string"==typeof t.name;
1if("string"==typeof t.displayName&&t.displayName.trim().match(new RegExp(e.trim(),"i"))||n&&t.name.trim().match(new RegExp(e.trim(),"i")))return t}}).sort((t,e)=>e.sortOrder-t.sortOrder):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Yjl({name:"filterApps",type:t,pure:!0}),t})();const JY=["appListContainer"],jY=["sortDropdown"];function RY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function $Y(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function BY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function HY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function QY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function YY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function zY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function VY(t,e){1&t&&(o.O4$(),o.TgZ(0,"svg",29),o._UZ(1,"path",30),o.qZA())}function GY(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"div",26),o.TgZ(1,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("all","All")}),o.TgZ(2,"span"),o._uU(3,"All"),o.qZA(),o.YNc(4,RY,2,0,"svg",28),o.qZA(),o.TgZ(5,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("popular","Most Popular")}),o.TgZ(6,"span"),o._uU(7,"Most Popular"),o.qZA(),o.YNc(8,$Y,2,0,"svg",28),o.qZA(),o.TgZ(9,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("ai-apps","AI Apps")}),o.TgZ(10,"span"),o._uU(11,"AI Apps"),o.qZA(),o.YNc(12,BY,2,0,"svg",28),o.qZA(),o.TgZ(13,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("appy-pie-apps","Appy Pie Apps")}),o.TgZ(14,"span"),o._uU(15,"Appy Pie Apps"),o.qZA(),o.YNc(16,HY,2,0,"svg",28),o.qZA(),o.TgZ(17,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("recently-added","Recently Added")}),o.TgZ(18,"span"),o._uU(19,"Recently Added"),o.qZA(),o.YNc(20,QY,2,0,"svg",28),o.qZA(),o.TgZ(21,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("upcoming","Upcoming")}),o.TgZ(22,"span"),o._uU(23,"Upcoming"),o.qZA(),o.YNc(24,YY,2,0,"svg",28),o.qZA(),o.TgZ(25,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("beta","Beta")}),o.TgZ(26,"span"),o._uU(27,"Beta"),o.qZA(),o.YNc(28,zY,2,0,"svg",28),o.qZA(),o.TgZ(29,"button",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().selectSortOption("alphabetical","Alphabetical")}),o.TgZ(30,"span"),o._uU(31,"Alphabetical"),o.qZA(),o.YNc(32,VY,2,0,"svg",28),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.ekj("active","all"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","all"===t.currentSortOption),o.xp6(1),o.ekj("active","popular"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","popular"===t.currentSortOption),o.xp6(1),o.ekj("active","ai-apps"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","ai-apps"===t.currentSortOption),o.xp6(1),o.ekj("active","appy-pie-apps"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","appy-pie-apps"===t.currentSortOption),o.xp6(1),o.ekj("active","recently-added"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","recently-added"===t.currentSortOption),o.xp6(1),o.ekj("active","upcoming"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","upcoming"===t.currentSortOption),o.xp6(1),o.ekj("active","beta"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","beta"===t.currentSortOption),o.xp6(1),o.ekj("active","alphabetical"===t.currentSortOption),o.xp6(3),o.Q6J("ngIf","alphabetical"===t.currentSortOption)}}function WY(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"li",34),o._uU(2,"App not found "),o.TgZ(3,"button",35),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).emailUs("trigger")}),o._uU(4,"Submit your app request"),o.qZA(),o.qZA(),o.BQk()}}const KY=function(t){return{"not-allowed":t}};function XY(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",38),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2).$implicit;return o.oxw(2).selectApps(e)}),o.TgZ(1,"div",39),o._UZ(2,"img",40),o.qZA(),o.TgZ(3,"p"),o._uU(4),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2).$implicit,e=o.oxw(2);o.Q6J("ngClass",o.VKq(4,KY,"AI Agent"===t.displayName&&0===e.currentApp.index)),o.xp6(2),o.s9C("src",e.appyConfig.cdnMediaPath+t.image,o.LSH),o.Q6J("alt",t.displayName),o.xp6(2),o.Oqu(t.displayName)}}
1function tz(t,e){if(1&t&&(o.TgZ(0,"li"),o.TgZ(1,"span",36),o.YNc(2,XY,5,6,"a",37),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(2),o.Q6J("ngIf","1"!=t.isSpecialApp)}}function ez(t,e){if(1&t&&(o.ynx(0),o.YNc(1,tz,3,1,"li",25),o.BQk()),2&t){const t=e.index,n=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t<=n.showUpToCount)}}const nz=function(t){return{"d-flex flex-column align-items-center justify-content-center":t}};function iz(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",31,32),o.ALo(2,"filterApps"),o.YNc(3,WY,5,0,"ng-container",25),o.ALo(4,"filterApps"),o.YNc(5,ez,2,1,"ng-container",33),o.ALo(6,"filterApps"),o.qZA()),2&t){const t=o.oxw();let e,n;o.Q6J("ngClass",o.VKq(12,nz,0===(null==(e=o.xi3(2,3,t.appList,t.seachTerm))?null:e.length))),o.xp6(3),o.Q6J("ngIf",0===(null==(n=o.xi3(4,6,t.appList,t.seachTerm))?null:n.length)),o.xp6(2),o.Q6J("ngForOf",o.xi3(6,9,t.appList,t.seachTerm))}}function oz(t,e){1&t&&(o.ynx(0),o.TgZ(1,"li",34),o._uU(2,"App not found "),o.qZA(),o.BQk())}function rz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"span",36),o.TgZ(1,"a",43),o.NdJ("click",function(){o.CHM(t);const e=o.oxw().$implicit;return o.oxw(2).selectApps(e)}),o.TgZ(2,"div",39),o._UZ(3,"img",40),o.qZA(),o.TgZ(4,"p"),o._uU(5),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.xp6(3),o.s9C("src",e.appyConfig.cdnMediaPath+t.image,o.LSH),o.Q6J("alt",t.displayName),o.xp6(2),o.Oqu(t.displayName)}}function sz(t,e){if(1&t&&(o.TgZ(0,"li"),o.YNc(1,rz,6,3,"span",42),o.qZA()),2&t){const t=e.index,n=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t<=n.showUpToCount)}}function az(t,e){if(1&t&&(o.O4$(),o.kcU(),o.TgZ(0,"ul",41),o.ALo(1,"filterApps"),o.YNc(2,oz,3,0,"ng-container",25),o.ALo(3,"filterApps"),o.YNc(4,sz,2,1,"li",33),o.ALo(5,"filterApps"),o.qZA()),2&t){const t=o.oxw();let e,n;o.Q6J("ngClass",o.VKq(12,nz,0===(null==(e=o.xi3(1,3,t.appyList,t.seachTerm))?null:e.length))),o.xp6(2),o.Q6J("ngIf",0===(null==(n=o.xi3(3,6,t.appyList,t.seachTerm))?null:n.length)),o.xp6(2),o.Q6J("ngForOf",o.xi3(5,9,t.appyList,t.seachTerm))}}function cz(t,e){if(1&t&&(o.TgZ(0,"div",44),o.O4$(),o.TgZ(1,"svg",7),o._UZ(2,"path",45),o._UZ(3,"path",46),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.ALo(6,"titlecase"),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(5),o.hij("",o.lcZ(6,1,t.currentApp.nodeType)," Event")}}function lz(t,e){1&t&&(o.TgZ(0,"div",44),o.O4$(),o.TgZ(1,"svg",7),o._UZ(2,"path",45),o._UZ(3,"path",46),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"App Account"),o.qZA(),o.qZA())}function dz(t,e){if(1&t&&(o.TgZ(0,"div",44),o.O4$(),o.TgZ(1,"svg",7),o._UZ(2,"path",45),o._UZ(3,"path",46),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.ALo(6,"titlecase"),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(5),o.hij("Set up ",o.lcZ(6,1,t.currentApp.nodeType),"")}}function uz(t,e){1&t&&o._UZ(0,"app-loader")}const pz=function(t){return{active:t}};let hz=(()=>{class t{constructor(t,e,n,i,r,s){this.customerConnectService=t,this.commonService=e,this.customerService=n,this.cdr=i,this.modalService=r,this.userGuideService=s,this.appsList=[],this.selectedApp=new o.vpe,this.beforeAppChange=new o.vpe,this.appyConfig=go.N,this.showUpToCount=20,this.seachTerm="",this.setUnSavedChanges=new o.vpe,this.appList=[],this.originalAppList=[],this.isAllApps=!0,this.isAppyPieApps=!1,this.isSortDropdownOpen=!1,this.currentSortOption="all",this.selectedSortOption="All",this.currentUser=this.customerService.GetCurrent()}ngAfterContentInit(){this.commonService.getAppsCustom(this.nodeType).subscribe(t=>{var e;t.apps_list=t.apps_list.filter(t=>"k2P4o45df5f473111E0f"!==t.appId);const n=(null===(e=this.currentUser)||void 0===e?void 0:e._created_at)?new Date(this.currentUser._created_at):null,i=new Date("2026-04-29T00:00:00");if(n&&n>=i){const e=["GoHighLevel","slack v2 dev","GoHighLevel (LeadConnector)"];t.apps_list=t.apps_list.filter(t=>!e.includes(t.displayName||t.name||""))}const o=["jlp5059wb5f473388e6f","k2P4o69wb5f473388E6g","k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","k2P4p45df5f222345E0a","khvu2jtw0k2nff756b96jtv3","janrjh1l08ex59386f8cx5lp","ki0aigsg03sg8960e34jb7xf","janrjh1l08ex59386f67g7nh","lna8nwtk00qb7189999ylsri","k2P4o69wb5f4733syncdata"],r=t=>o.includes(t);if(this.currentApp.appId&&!r(this.currentApp.appId))setTimeout(()=>{const e=t.apps_list.reduce((t,e)=>(this.currentApp.appId===e.appId?(t.unshift(e),setTimeout(()=>{"1"===localStorage.getItem("MOVE_TO_ACTION")&&(localStorage.setItem("MOVE_TO_ACTION","0"),this.selectAp
1ps(e))},10)):t.push(e),t),[]);this.appyList=e.filter(t=>r(t.appId)),this.originalAppList=[...e],this.sortApps("all"),this.appsListLength=this.appList.length+this.appyList.length,this.testloader=!1,this.pageLoaded2=!0},10);else{const e=[...t.apps_list];this.appyList=e.filter(t=>r(t.appId)),this.originalAppList=[...e],this.sortApps("all"),this.appsListLength=this.appList.length+this.appyList.length,setTimeout(()=>{this.testloader=!1,this.pageLoaded2=!0},10),this.cdr.detectChanges()}})}loadMore(){this.showUpToCount+=12,(this.showUpToCount>=this.appsListLength||this.seachTerm.length>2)&&(this.showUpToCount=this.appsListLength),setTimeout(()=>{this.appListContainer&&this.appListContainer.nativeElement.scrollTo({top:this.appListContainer.nativeElement.scrollHeight,behavior:"smooth"})},10)}filterApps(t){this.seachTerm=t.target.value,this.showUpToCount=this.seachTerm.length>3?this.appsListLength:23}selectApps(t){"AI Agent"===t.displayName&&0===this.currentApp.index||(this.beforeAppChange.emit(),this.pageLoaded2=!1,this.testloader=!0,this.hideDeleteNodeBtn=[],this.customerConnectService.getUserConnectBy_Id(this.currentApp.nodeId||null).subscribe(e=>{var n;const i=e.appId,o=""!==i&&i!==t.appId;if(this.AppData=Object.assign({appId:t.appId,image:t.image,displayName:t.displayName,connectTitle:this.connectList[0].connectTitle,nodeStatus:"app_selected"},o&&{actionName:{title:"",desc:""},auth:{},editOptions:{},test_data:{},sample_data:[],fields_error:"",connected_account_id:"",isNewApp:!0}),this.currentApp.nodeStatus="app_selected",this.connectList&&this.currentApp&&void 0!==this.currentApp.index){const e=this.connectList.findIndex(t=>t.index==this.currentApp.index);-1!==e&&(this.connectList[e]=Object.assign(Object.assign({},this.connectList[e]),{nodeStatus:"app_selected",AppData:this.AppData,displayName:t.displayName,connectTitle:this.connectList[0].connectTitle,currentAction:"action",triggerId:this.connectId,image:t.image,appId:t.appId,name:t.name,desc:t.desc}))}this.warningInfo=[],Array.isArray(this.warningInfo)&&(this.warningInfo[this.currentApp.index]=o?null:this.warningInfo[this.currentApp.index]),this.currentApp.appId&&(this.currentApp.editOptions={},this.currentApp.additionalTriggerEditOptions=null,this.currentApp.triggerEditOptions=null,this.currentApp.actionNameTitle="Event not selected",this.currentApp.sample_data=[],this.currentApp.actionNameTitle_display=null,this.connectList.find(t=>t.index==this.currentApp.index).sample_data=[]),Object.assign(this.currentApp,{image:t.image,displayName:t.displayName,triggerId:this.connectId,connectTitle:this.connectList[0].connectTitle,currentAction:"action",appId:t.appId,app_type:t.appType,actionNameTitle:"Event not selected",desc:t.desc,name:t.name,credentialUrlName:(null===(n=t.credential)||void 0===n?void 0:n.urlName)||null,_id:t._id}),this.updateNodeData(this.currentApp),this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,this.AppData).subscribe(),this.updateUserLastTouchedApp(t.appId),this.selectedApp.emit({app:t,currentApp:this.currentApp}),"trigger"===this.nodeType&&1===this.userGuideService.getCurrentStep()&&setTimeout(()=>{document.querySelectorAll(".landing-apps").forEach((e,n)=>{var i;(null===(i=e.textContent)||void 0===i?void 0:i.includes(t.displayName))&&e.classList.add("active")}),setTimeout(()=>{this.userGuideService.nextStep()},500)},100),this.testloader=!1}))}updateUserLastTouchedApp(t){this.customerService.updateLastTouchedApp({_id:this.currentUser._id,appId:t}).subscribe()}handleAllApps(){this.isAllApps=!this.isAllApps,this.isAppyPieApps=!1}handleAppyPieApps(){this.isAppyPieApps=!this.isAppyPieApps,this.isAllApps=!1}getAllChildIndices(t){const e=[],n=[t];for(;n.length>0;){let t=n.shift(),i=this.connectList.find(e=>(null==e?void 0:e.index)==t);if(i&&i.childIndex&&i.childIndex.length>0)for(let o of i.childIndex)null!=o&&(e.push(o),n.push(o))}return e}updateNodeData(t){var e;this.testloader=!0;const n=null!==(e=null==t?void 0:t.index)&&void 0!==e&&e;this.connectList.forEach(t=>{let e=t.editOptions,i=t.filterEditOptions,o=!1;if(e)try{Object.keys(e).forEach(i=>
1{let r;try{r="string"==typeof e[i]?JSON.parse(e[i]):e[i]}catch(s){r=null}if(Array.isArray(r)){const e=r.filter(t=>{if(t.realIndex===n||void 0===t.realIndex&&t.nodeIndex===n)return o=!0,!1;if(!0===t.custom){let i=[];try{i="string"==typeof t.value?JSON.parse(t.value):t.value}catch(e){i=[]}if(Array.isArray(i)){const e=i.filter(t=>t.realIndex!==n&&!(void 0===t.realIndex&&t.nodeIndex===n));t.value=JSON.stringify(e),o=!0}return!0}return!0});t.editOptions[i]=JSON.stringify(e)}})}catch(r){console.error("Error processing editOptions:",r)}if(i&&"object"==typeof i)try{Array.isArray(i)?i.forEach((t,e)=>{Array.isArray(t)&&t.forEach((t,e)=>{Object.keys(t).forEach(e=>{const i=t[e];let r=i;if("string"==typeof i)try{r=JSON.parse(i)}catch(s){console.error("Failed to parse fieldValue:",i,s),r=[]}if(Array.isArray(r)){const i=r.filter(t=>{if(t.realIndex===n||void 0===t.realIndex&&t.nodeIndex===n)return o=!0,!1;if(!0===t.custom){let i=[];try{i="string"==typeof t.value?JSON.parse(t.value):t.value}catch(e){i=[]}if(Array.isArray(i)){const e=i.filter(t=>t.realIndex!==n&&!(void 0===t.realIndex&&t.nodeIndex===n));t.value=JSON.stringify(e),o=!0}return!0}return!0});t[e]=i}})})}
1):Object.keys(i).forEach(t=>{const e=i[t];Array.isArray(e)&&e.forEach((t,e)=>{t&&"object"==typeof t&&Object.keys(t).forEach(e=>{const i=t[e];let r=i;if("string"==typeof i)try{r=JSON.parse(i)}catch(s){console.error("Failed to parse fieldValue:",i,s),r=[]}if(Array.isArray(r)){const i=r.filter(t=>{if(t.realIndex===n||void 0===t.realIndex&&t.nodeIndex===n)return o=!0,!1;if(!0===t.custom){let i=[];try{i="string"==typeof t.value?JSON.parse(t.value):t.value}catch(e){i=[]}if(Array.isArray(i)){const e=i.filter(t=>t.realIndex!==n&&!(void 0===t.realIndex&&t.nodeIndex===n));t.value=JSON.stringify(e),o=!0}return!0}return!0});t[e]=i}})})})}catch(r){console.error("Error processing filterEditOptions:",r)}if(o){t.nodeStatus="account_selected";const n=Object.assign(Object.assign({nodeStatus:"account_selected"},e&&{editOptions:t.editOptions}),i&&{filterEditOptions:t.filterEditOptions});this.customerConnectService.updateUserConnect(t.nodeId,n).subscribe({next:()=>this.testloader=!1,error:()=>this.testloader=!1})}})}toggleSortDropdown(){this.isSortDropdownOpen=!this.isSortDropdownOpen}closeSortDropdown(){this.isSortDropdownOpen=!1}onClickOutside(t){const e=t.target.closest(".sort-by-dropdown");this.isSortDropdownOpen&&!e&&this.closeSortDropdown()}selectSortOption(t,e){this.currentSortOption=t,this.selectedSortOption=e,this.sortApps(t),this.closeSortDropdown()}sortApps(t){if(!this.originalAppList||0===this.originalAppList.length)return;let e=[...this.originalAppList];switch(t){case"all":const t=["jj4204hwb5f47332lrab","ko9gnwng0nxu718999fcjz96","k3pplzjk0c7s11f3ce9la56o","k2zq0oct02js11f3ce11tsug","jnbj016d56e1c4bdkpe5","jj5i06zwb5f47312w5ez","jj5i06zwb5f4731q2fr6","ki4kr6c607qyff756berurxo","jj4204hwb5f473404457","k2P4o69wb5f4733aiagent","kznvb3ty0kp071899961lsoi","janrt1tt08q0aa7cdc9vxann","jj4204hwb5f473bk7tj9","jj4204hwb5f4731c96j1","jj4204hwb5f4739ac09v","jj3x04hwb5f473406aig","jj3x04hwb5f4732xzbip","jj5i06zwb5f47398lm2s","jno704tr56e1c4g0jt64","jnoj1ofo645c8711xm3d"],n=[],i=[];e.forEach(e=>{const o=t.indexOf(e.appId);-1!==o?n[o]=e:i.push(e)});const o=n.filter(t=>void 0!==t);this.appList=[...o,...i];break;case"popular":const r=["llm85ld40h347189996dwf86","janrt1td08q0aa7cdc9m6yee","jnoj1ofo645c87704eg6","jj3z04hwb5f4739rjm7z","janrt1sw08q0aa7cdc9c951l"],s=[],a=[];e.forEach(t=>{const e=r.indexOf(t.appId);-1!==e?s[e]=t:a.push(t)});const c=s.filter(t=>void 0!==t),l=a.sort((t,e)=>(e.rating||e.popularity||e.popularityScore||e.popular||0)-(t.rating||t.popularity||t.popularityScore||t.popular||0)),d=l.slice(0,15),u=l.slice(15);this.appList=[...d,...c,...u];break;case"alphabetical":this.appList=e.sort((t,e)=>{const n=(t.displayName||"").toLowerCase(),i=(e.displayName||"").toLowerCase();return n.localeCompare(i)});break;case"beta":this.appList=e.filter(t=>t.categoryId&&Array.isArray(t.categoryId)&&["5ffd62990ac95b387497c9dd"].some(e=>t.categoryId.includes(e)));break;case"upcoming":this.appList=e.filter(t=>t.categoryId&&Array.isArray(t.categoryId)&&["5bf4f11aa1b0a1230d5ed482"].some(e=>t.categoryId.includes(e)));break;case"recently-added":this.appList=e.sort((t,e)=>{const n=t=>{if(t.createdAt)return new Date(t.createdAt).getTime();if(t.addedDate)return new Date(t.addedDate).getTime();if(t._created_at)return new Date(t._created_at).getTime();if(t._id&&"string"==typeof t._id&&t._id.length>=8)try{return 1e3*parseInt(t._id.substring(0,8),16)}catch(e){return 0}return 0},i=n(t);return n(e)-i});break;case"ai-apps":this.appList=e.filter(t=>t.categoryId&&Array.isArray(t.categoryId)&&["6811f08da47742e7f46983a6","66ffa4b7edf853c268051466","66ffa4b7edf853c268051467"].some(e=>t.categoryId.includes(e)));break;case"appy-pie-apps":this.appList=e.filter(t=>t.categoryId&&Array.isArray(t.categoryId)&&["66ffa4b8edf853c2680514cd","66ffa4b8edf853c2680514c6"].some(e=>t.categoryId.includes(e)));break;default:this.appList=[...this.originalAppList]}this.cdr.detectChanges()}emailUs(t,e=""){var n,i,o,r,s;let a="";"trigger"===t&&e?(e=(null===(n=this.currentApp)||void 0===n?void 0:n.displayName)||"",a=(null===(i=this.currentApp)||void 0===i?void 0:i.appId)||""):"action"===t&&e&&(e=(null===(o=this.currentApp)||void 0===o?void 0:o.displayName)||"",a=(null===(r=this.currentApp)||void 0===r?void 0:r.appId)||""),this.bsModalRef=this.modalService.show(Zo,{initialState:{nodeType:this.nodeType,appName:(null===(s=this.currentApp)||void 0===s?void 0:s.displayName)||"",appId:this.currentApp.appId}
1,class:"request-modal modal-lg modal-dialog-centered modal-dialog-scrollable"})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Fo),o.Y36(wo.v),o.Y36(yo),o.Y36(o.sBO),o.Y36(mo.tT),o.Y36(LA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-select-apps"]],viewQuery:function(t,e){if(1&t&&(o.Gf(JY,5),o.Gf(jY,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.appListContainer=t.first),o.iGM(t=o.CRH())&&(e.sortDropdown=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.onClickOutside(t)},!1,o.evT)},inputs:{appsList:"appsList",currentApp:"currentApp",translation:"translation",nodeType:"nodeType",isTemplate:"isTemplate",connectId:"connectId",singleClickTemplate:"singleClickTemplate",connectList:"connectList",warningInfo:"warningInfo"},outputs:{selectedApp:"selectedApp",beforeAppChange:"beforeAppChange",setUnSavedChanges:"setUnSavedChanges"},decls:35,vars:20,consts:[[1,"chooseapps-v2","bg-white"],[1,"f-14","theme-color"],[1,"search"],[1,"inputgroup-search"],["type","text","maxlength","150",1,"form-control",3,"value","placeholder","keyup","keydown"],[1,"inputgroupappend-btn"],["type","button","id","SearchApps",1,""],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.5 16C13.0899 16 16 13.0899 16 9.5C16 5.91015 13.0899 3 9.5 3C5.91015 3 3 5.91015 3 9.5C3 13.0899 5.91015 16 9.5 16Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M17 17L16 16","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"d-flex","align-items-center","gap-2","w-100","justify-content-between"],["type","button",1,"btn","tab-buttons",3,"ngClass"],[1,"sort-by-dropdown"],["sortDropdown",""],["type","button",1,"sort-by-button",3,"click"],[1,"sort-by-label"],[1,"sort-by-value"],["xmlns","http://www.w3.org/2000/svg","width","12","height","12","viewBox","0 0 12 12","fill","none",1,"sort-by-caret"],["d","M3 4.5L6 7.5L9 4.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["class","sort-by-menu",4,"ngIf"],["class","scrollheight listingAppsList","id","listingAppsLi1",3,"ngClass",4,"ngIf"],["class","scrollheight listingAppsList",3,"ngClass",4,"ngIf"],[1,"continue","flex-shrink-0","mt-auto"],["data-track","continue with event","type","link","aria-disabled","true",1,"btn","btn-lg","w-100","mb-0","disabled"],["class","next-step",4,"ngIf"],[4,"ngIf"],[1,"sort-by-menu"],["type","button",1,"sort-option",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none"],["d","M13.3333 4L6 11.3333L2.66667 8","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["id","listingAppsLi1",1,"scrollheight","listingAppsList",3,"ngClass"],["appListContainer",""],[4,"ngFor","ngForOf"],[1,"f-14","py-3","text-center","text-danger","w-100"],["type","button",1,"btn","btn-sm","text-underline","p-0","bg-transparent","border-0","rounded-0","text-decoration-underline","w-100","text-primary",3,"click"],[1,"landing-apps"],["data-track","select application",3,"ngClass","click",4,"ngIf"],["data-track","select application",3,"ngClass","click"],[1,"service-icon-logo"],[3,"src","alt"],[1,"scrollheight","listingAppsList",3,"ngClass"],["class","landing-apps",4,"ngIf"],["data-track","select in-house application",3,"click"],[1,"next-step"],["d","M9.99996 18.3337C14.6023 18.3337 18.3333 14.6027 18.3333 10.0003C18.3333 5.39795 14.6023 1.66699 9.99996 1.66699C5.39759 1.66699 1.66663 5.39795 1.66663 10.0003C1.66663 14.6027 5.39759 18.3337 9.99996 18.3337Z","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M10 5V10L13.3333 11.6667","stroke","CurrentColor","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"h4",1),o._uU(2),o.ALo(3,"titlecase"),o.qZA(),o.TgZ(4,"div",2),o.TgZ(5,"form"),o.TgZ(6,"div",3),o.TgZ(7,"input",4),o.NdJ("keyup",function(t){return e.filterApps(t)})("keydown",function(t){return e.filterApps(t)}),o.qZA(),o.TgZ(8,"div",5),o.TgZ(9,"button",6),o.O4$(),o.TgZ(10,"svg",7),o._UZ(11,"path",8),o._UZ(12,"path",9),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(13,"div",10),o.TgZ(14,"button",11),o._uU(15,"All Apps"),o.qZA(),o.TgZ(16,"div",12,13),o.TgZ(18,"button",14),o.NdJ("click",function(){return e.toggleSortDropdown()}),o.TgZ(19,"span",15),o._uU(20,"Sort By:"),o.qZA(),o.TgZ(21,"span",16),o._uU(22),o.qZA(),o.O4$(),o.TgZ(23,"svg",17),o._UZ(24,"path",18),o.qZA(),o.qZA(),o.YNc(25,GY,33,24,"div",19),o.qZA(),o.qZA(),o.qZA(),o.YNc(26,iz,7,14,"ul",20),o.YNc(27,az,6,14,"ul",21),o.kcU(),o.TgZ(28,"div",22),o.TgZ(29,"a",23),o._uU(30,"Continue"),o.qZA(),o.qZA(),o.YNc(31,cz,7,3,"div",24),o.YNc(32,lz,6,0,"div",24),o.YNc(33,dz,7,3,"div",24),o.YNc(34,uz,1,0,"app-loader",25)),2&t&&(o.xp6(2),o.hij("Select ",o.lcZ(3,16,e.currentApp.nodeType)," App"),o.xp6(5),o.Q6J("value",e.seachTerm)("placeholder","Search for an "+e.nodeType+" app"),o.xp6(7),o.Q6J("ngClass",o.VKq(18,pz,e.isAllApps)),o.xp6(4),o.uIk("aria-expanded",e.isSortDropdownOpen)("aria-label","Sort by "+e.selectedSortOption),o.xp6(4),o.Oqu(e.selectedSortOption),o.xp6(1),o.ekj("rotate",e.isSortDropdownOpen),o.xp6(2),o.Q6J("ngIf",e.isSortDropdownOpen),o.xp6(1),o.Q6J("ngIf",e.isAllApps),o.xp6(1),o.Q6J("ngIf",e.isAppyPieApps),o.xp6(4),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[Xi._Y,Xi.JL,Xi.F,to.mk,to.O5,to.sg,po],pipes:[to.rS,LY],styles:[".text-underline[_ngcontent-%COMP%]{text-underline-offset:2px;text-underline-position:under}.landing-apps[_ngcontent-%COMP%]   .not-allowed[_ngcontent-%COMP%]{cursor:not-allowed!important}.sort-by-dropdown[_ngcontent-%COMP%]{position:relative;display:inline-block}.sort-by-button[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:8px;gap:8px;padding:8px;background:transparent;border:1px solid #D5DBE7;border-radius:6px;cursor:pointer;font-size:12px;color:#333;color:var(--primary-text, #333);transition:all .2s ease;white-space:nowrap}.sort-by-button[_ngcontent-%COMP%]:hover{border-color:#5371ff;border-color:var(--Primary-Color, #5371ff);background-color:#5371ff0d}.sort-by-label[_ngcontent-%COMP%]{color:#74748a;color:var(--theme-color, #74748A);font-weight:400}.sort-by-value[_ngcontent-%COMP%]{color:#333;color:var(--primary-text, #333);font-weight:500}.sort-by-caret[_ngcontent-%COMP%]{color:#74748a;color:var(--secondary-text, #74748A);transition:transform .2s ease;flex-shrink:0}.sort-by-caret.rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}.sort-by-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:0;min-width:180px;background:#ffffff;border:1px solid #D5DBE7;border-radius:8px;box-shadow:0 4px 12px #0000001a;z-index:1000;overflow:hidden;margin-top:4px}
1.sort-option[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 16px;background:transparent;border:none;text-align:left;cursor:pointer;font-size:14px;color:#333;color:var(--primary-text, #333);transition:background-color .15s ease;grid-gap:12px;gap:12px}.sort-option[_ngcontent-%COMP%]:hover{background-color:#5371ff0d}.sort-option.active[_ngcontent-%COMP%]{background-color:#f3f0ff;color:#5371ff;color:var(--Primary-Color, #5371ff);font-weight:500}.sort-option.active[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#5371ff;color:var(--Primary-Color, #5371ff);flex-shrink:0}.sort-option[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex:1}html.dark[_ngcontent-%COMP%]   .sort-by-button[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .sort-by-button[_ngcontent-%COMP%]{border-color:#3a3a3a;border-color:var(--border-color, #3a3a3a);color:var(--primary-text);background:#2a2a2a;background:var(--card-bg, #2a2a2a)}html.dark[_ngcontent-%COMP%]   .sort-by-menu[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .sort-by-menu[_ngcontent-%COMP%]{background:#2a2a2a;background:var(--card-bg, #2a2a2a);border-color:#3a3a3a;border-color:var(--border-color, #3a3a3a);box-shadow:0 4px 12px #0000004d}html.dark[_ngcontent-%COMP%]   .sort-option[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .sort-option[_ngcontent-%COMP%]{color:var(--primary-text)}html.dark[_ngcontent-%COMP%]   .sort-option[_ngcontent-%COMP%]:hover, .theme-dark[_ngcontent-%COMP%]   .sort-option[_ngcontent-%COMP%]:hover{background-color:#5371ff1a}html.dark[_ngcontent-%COMP%]   .sort-option.active[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .sort-option.active[_ngcontent-%COMP%]{background-color:#5371ff26;color:#5371ff;color:var(--accent-color, #5371ff)}"]}),t})();function gz(t,e){1&t&&o._UZ(0,"div",9)}function fz(t,e){if(1&t&&(o.TgZ(0,"span",10),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.description)}}function mz(t,e){if(1&t&&(o.TgZ(0,"section",11),o._UZ(1,"ngx-json-viewer",12),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw();o.xp6(1),o.Q6J("json",t.value)("expanded",e.expanded)("depth",e.depth)("_currentDepth",e._currentDepth)}}const vz=function(t){return["segment",t]},bz=function(t,e){return{"segment-main":!0,expandable:t,expanded:e}};function xz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"section",2),o.TgZ(1,"section",3),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw().toggle(e)}),o.YNc(2,gz,1,0,"div",4),o.TgZ(3,"span",5),o._uU(4),o.qZA(),o.TgZ(5,"span",6),o._uU(6,": "),o.qZA(),o.YNc(7,fz,2,1,"span",7),o.qZA(),o.YNc(8,mz,2,4,"section",8),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw();o.Q6J("ngClass",o.VKq(6,vz,"segment-type-"+t.type)),o.xp6(1),o.Q6J("ngClass",o.WLB(8,bz,n.isExpandable(t),t.expanded)),o.xp6(1),o.Q6J("ngIf",n.isExpandable(t)),o.xp6(2),o.Oqu(t.key),o.xp6(3),o.Q6J("ngIf",!t.expanded||!n.isExpandable(t)),o.xp6(1),o.Q6J("ngIf",t.expanded&&n.isExpandable(t))}}let _z=(()=>{class t{constructor(){this.expanded=!0,this.depth=-1,this._currentDepth=-1,this.segments=[]}ngOnChanges(){this.segments=[],this.json=this.decycle(this.json),this._currentDepth++,"object"==typeof this.json?Object.keys(this.json).forEach(t=>{this.segments.push(this.parseKeyValue(t,this.json[t]))}):this.segments.push(this.parseKeyValue(`(${typeof this.json})`,this.json))}isExpandable(t){return"object"===t.type||"array"===t.type}toggle(t){this.isExpandable(t)&&(t.expanded=!t.expanded)}parseKeyValue(t,e){const n={key:t,value:e,type:void 0,description:""+e,expanded:this.isExpanded()};switch(typeof n.value){case"number":n.type="number";break;case"boolean":n.type="boolean";break;case"function":n.type="function";break;case"string":n.type="string",n.description=n.value;break;case"undefined":n.type="undefined",n.description="undefined";break;case"object":null===n.value?(n.type="null",n.description="null"):Array.isArray(n.value)?(n.type="array",n.description="Array["+n.value.length+"] "+JSON.stringify(n.value)):n.value instanceof Date?n.type="date":(n.type="object",n.description="Object "+JSON.stringify(n.value))}return n}isExpanded(){return this.expanded&&!(this.depth>-1&&this._currentDepth>=this.depth)}decycle(t){const e=new WeakMap;return function t(n,i){let o,r;return"object"!=typeof n||null===n||n instanceof Boolean||n instanceof Date||n instanceof Number||n instanceof RegExp||n instanceof String?n:(o=e.get(n),void 0!==o?{$ref:o}
1:(e.set(n,i),Array.isArray(n)?(r=[],n.forEach(function(e,n){r[n]=t(e,i+"["+n+"]")})):(r={},Object.keys(n).forEach(function(e){r[e]=t(n[e],i+"["+JSON.stringify(e)+"]")})),r))}(t,"$")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["ngx-json-viewer"]],inputs:{json:"json",expanded:"expanded",depth:"depth",_currentDepth:"_currentDepth"},features:[o.TTD],decls:2,vars:1,consts:[[1,"ngx-json-viewer"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"ngClass","click"],["class","toggler",4,"ngIf"],[1,"segment-key"],[1,"segment-separator"],["class","segment-value",4,"ngIf"],["class","children",4,"ngIf"],[1,"toggler"],[1,"segment-value"],[1,"children"],[3,"json","expanded","depth","_currentDepth"]],template:function(t,e){1&t&&(o.TgZ(0,"section",0),o.YNc(1,xz,9,11,"section",1),o.qZA()),2&t&&(o.xp6(1),o.Q6J("ngForOf",e.segments))},directives:[to.sg,to.mk,to.O5,t],styles:['@charset "UTF-8";.ngx-json-viewer[_ngcontent-%COMP%]{font-family:var(--ngx-json-font-family, monospace);font-size:var(--ngx-json-font-size, 1em);width:100%;height:100%;overflow:hidden;position:relative}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]{padding:2px;margin:1px 1px 1px 12px}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]{word-wrap:break-word}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]   .toggler[_ngcontent-%COMP%]{position:absolute;margin-left:-14px;margin-top:3px;font-size:.8em;line-height:1.2em;vertical-align:middle;color:var(--ngx-json-toggler, #787878)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]   .toggler[_ngcontent-%COMP%]:after{display:inline-block;content:"\\25ba";transition:transform .1s ease-in}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]   .segment-key[_ngcontent-%COMP%]{color:var(--ngx-json-key, #4E187C);background-color:var(--ngx-json-key-bg, rgba(255, 255, 255, 0))}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]   .segment-separator[_ng
1content-%COMP%]{color:var(--ngx-json-separator, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]   .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-value, #000);background-color:var(--ngx-json-value-bg, rgba(255, 255, 255, 0))}.ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .children[_ngcontent-%COMP%]{margin-left:12px}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-string[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-string, #FF6B6B)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-number[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-number, #009688)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-boolean[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-boolean, #B938A4)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-date[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-date, #05668D)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-array[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-array, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-object[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-object, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-function[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-function, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-null[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-null, #fff)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-undefined[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{color:var(--ngx-json-undefined, #fff)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-null[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{background-color:var(--ngx-json-null-bg, red)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-undefined[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-key[_ngcontent-%COMP%]{color:var(--ngx-json-undefined-key, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-undefined[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%] > .segment-value[_ngcontent-%COMP%]{background-color:var(--ngx-json-undefined-key, #999)}.ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-object[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%], .ngx-json-viewer[_ngcontent-%COMP%]   .segment-type-array[_ngcontent-%COMP%] > .segment-main[_ngcontent-%COMP%]{white-space:nowrap}.ngx-json-viewer[_ngcontent-%COMP%]   .expanded[_ngcontent-%COMP%] > .toggler[_ngcontent-%COMP%]:after{transform:rotate(90deg)}.ngx-json-viewer[_ngcontent-%COMP%]   .expandable[_ngcontent-%COMP%], .ngx-json-viewer[_ngcontent-%COMP%]   .expandable[_ngcontent-%COMP%] > .toggler[_ngcontent-%COMP%]{cursor:pointer}']}),t})(),Cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[to.ez]]}),t})();function wz(t,e){1&t&&(o.TgZ(0,"h4"),o._uU(1,"Test"),o.qZA())}function yz(t,e){1&t&&(o.TgZ(0,"h4",16),o._uU(1,"Preview of AI Agent Output"),o.qZA())}function Az(t,e){1&t&&(o.TgZ(0,"span",17),o._UZ(1,"i",18),o.qZA())}function Zz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",19),o._UZ(1,"i",20),o._uU(2),o.TgZ(3,"a",21),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleSampleData()}),o._uU(4," View Record"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.hij(" Successfully found the record from your ",t.currentApp.displayName," Account. If you want to view it, click ")}}function kz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",19),o._UZ(1,"i",20),o._uU(2),o.TgZ(3,"a",22),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleSampleData()}),o._uU(4,"Close "),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.hij(" We are showing the latest record we found in your ",t.currentApp.displayName," Account. See if your connect is triggering from the right data ")}}function Tz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",23),o._uU(1),o.TgZ(2,"a",24),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleTestError()}),o._uU(3,"\u24d8"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.hij(" Trigger test failed with error message: ",t.connectList[0].triggerData.triggerTestFailMessage," ")}}function Oz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"p",23),o._uU(1," Oops... Something went wrong. Please try again later "),o.TgZ(2,"a",24),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleTestError()}),o._uU(3,"\u24d8"),o.qZA(),o.qZA()}}
1function Mz(t,e){if(1&t&&(o.TgZ(0,"p",23),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" No Sample record found in your ",t.currentApp.displayName," Account. ")}}function Iz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",25),o.TgZ(1,"span",26),o.O4$(),o.TgZ(2,"svg",27),o._UZ(3,"path",28),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"input",29),o.NdJ("keyup",function(e){return o.CHM(t),o.oxw(2).filterApps(e)})("keydown",function(e){return o.CHM(t),o.oxw(2).filterApps(e)}),o.qZA(),o.qZA()}}const Sz=function(t){return{display:t}};function Pz(t,e){if(1&t&&(o.TgZ(0,"div",30),o.TgZ(1,"div",31),o._UZ(2,"ngx-json-viewer",32),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngStyle",o.VKq(2,Sz,t.isContentVisible?"block":"none")),o.xp6(1),o.Q6J("json",t.sampleData)}}function Nz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",37),o.TgZ(1,"li"),o.TgZ(2,"button",38),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).skipRunTest()}),o._uU(3,"Skip Run Test"),o.qZA(),o.qZA(),o.qZA()}}function qz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",33),o.TgZ(1,"div",34),o.TgZ(2,"button",35),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).continue(!1)}),o._uU(3,"Continue"),o.qZA(),o.YNc(4,Nz,4,0,"ul",36),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("disabled",t.triggerTestFail),o.xp6(2),o.Q6J("ngIf",t.triggerTestFail&&"webhookUrl"!==t.currentApp.triggerType)}}const Uz=function(t){return{"p-0":t}};function Ez(t,e){if(1&t&&(o.TgZ(0,"div",39),o.TgZ(1,"div",40),o._UZ(2,"ngx-json-viewer",32),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngClass",o.VKq(3,Uz,"k2P4o69wb5f4733aiagent"===t.currentApp.appId))("ngStyle",o.VKq(5,Sz,t.isContentVisible?"block":"none")),o.xp6(1),o.Q6J("json",t.getStreamingJsonData())}}function Fz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"ul",37),o.TgZ(1,"li"),o.TgZ(2,"button",38),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).skipRunTest()}),o._uU(3,"Skip Run Test"),o.qZA(),o.qZA(),o.qZA()}}function Dz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",41),o.TgZ(1,"div",34),o.TgZ(2,"button",35),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).continue(!1)}),o._uU(3,"Continue"),o.qZA(),o.YNc(4,Fz,4,0,"ul",36),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Q6J("disabled",t.triggerTestFail),o.xp6(2),o.Q6J("ngIf",t.triggerTestFail&&"webhookUrl"!==t.currentApp.triggerType)}}const Lz=function(t){return{"p-0 border-0":t}};function Jz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.YNc(3,wz,2,0,"h4",1),o.YNc(4,yz,2,0,"h4",5),o.YNc(5,Az,2,0,"span",6),o.TgZ(6,"button",7),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleDisplay()}),o._UZ(7,"i",8),o.qZA(),o.qZA(),o.YNc(8,Zz,5,1,"p",9),o.YNc(9,kz,5,1,"p",9),o.YNc(10,Tz,4,1,"p",10),o.YNc(11,Oz,4,0,"p",10),o.YNc(12,Mz,2,1,"p",10),o.YNc(13,Iz,5,0,"div",11),o.YNc(14,Pz,3,4,"div",12),o.YNc(15,qz,5,2,"div",13),o.YNc(16,Ez,3,7,"div",14),o.YNc(17,Dz,5,2,"div",15),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("ngClass",o.VKq(14,Lz,"k2P4o69wb5f4733aiagent"===t.currentApp.appId)),o.xp6(3),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"===t.currentApp.appId),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(3),o.Q6J("ngIf",!t.showSampleData&&!t.noSampleData&&!t.triggerTestFail&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf",t.showSampleData&&!t.noSampleData&&!t.triggerTestFail&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf",t.triggerTestFail&&t.ToogleTestFail),o.xp6(1),o.Q6J("ngIf",t.triggerTestFail&&!t.ToogleTestFail),o.xp6(1),o.Q6J("ngIf",t.noSampleData),o.xp6(1),o.Q6J("ngIf",t.showSampleData&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf",t.showSampleData&&"k2P4o69wb5f4733aiagent"!==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","trigger"===t.nodeType),o.xp6(1),o.Q6J("ngIf",t.showSampleData&&"k2P4o69wb5f4733aiagent"==t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4o69wb5f4733aiagent"==t.currentApp.appId)}}function jz(t,e){1&t&&o._UZ(0,"app-loader")}let Rz=(()=>{class t{constructor(t,e,n,i,r){this.changeDetectorRef=t,this.customerService=e,this.customerConnectService=n,this.editOptionsService=i,this.modalService=r,this.selectedApp=new o.vpe,this.moveToNextAction=new o.vpe,this.testloader=!1,this.arrowClassName="down",this.appyConfig=go.N,this.triggerTestFail=!1,this.noSampleData=!1,this.ToogleTestFail=!1,this.showSampleData=!1,this.readyForContinue=!1,this.isShow=!0,this.seachTerm={},this.scrollbarOptions={theme:"minimal-dark",axis:"y",scrollEasing:"easeOut"},this.triggerDropDownData={},this.showAllFields=!1,this.detectChangeloader=!1,this.nestedStepsArray={},this.streamingData=[],this.isContentVisible=!0}ngOnInit(){var t,e,n,i;"k2P4o69wb5f4733aiagent"===this.currentApp.appId&&(this.showSampleData=!0,setTimeout(()=>{this.startStreaming()},500)),(null===(e=null===(t=this.connectList[0])||void 0===t?void 0:t.triggerData)||void 0===e?void 0:e.triggerTestFail)?this.triggerTestFail=!0:(null===(i=null===(n=this.currentApp.sample_data[0])||void 0===n?void 0:n.data)||void 0===i?void 0:i.length)?(this.currentApp&&!this.currentApp.canContinueRuntest&&(this.currentApp.canContinueRuntest=!0),this.sampleData=this.convertArrayToJsonObject(this.currentApp.sample_data[0].data),this.jsonData=this.sampleData):this.noSampleData=!0}filterApps(t){this.seachTerm=t.target.value,this.sampleData=this.searchObjectValues(this.jsonData,this.seachTerm)}toggleDisplay(){this.isShow=!this.isShow,this.modalService.show(rv,{initialState:{},class:"ai-mapping-modal"})}toggleSampleData(){this.showSampleData=!this.showSampleData}convertArrayToJsonObject(t){const e={};for(const n of t)if("string"==typeof n.key){const t=n.key.split(".");let i=e;for(let e=0;e<t.length-1;e++){const n=t[e];i[n]||(i[n]={}),i=i[n]}i[t[t.length-1]]=n.value}return e}searchObjectValues(t,e){if(!e)return t;const n=function t(n,i=[]){const o=[];
1for(const r in n){const s=i.concat(r);"object"==typeof n[r]&&null!==n[r]?o.push(...t(n[r],s)):"string"==typeof n[r]&&(-1!==n[r].toLowerCase().indexOf(e.toLowerCase())||-1!==r.toLowerCase().indexOf(e.toLowerCase()))&&o.push(s)}return o}(t),i={};return n.forEach(e=>{let n=t;for(const t of e)n=n[t];!function(t,e,n){let i=t;for(let o=0;o<e.length-1;o++){const t=e[o];void 0===i[t]&&(i[t]="number"==typeof e[o+1]?[]:{}),i=i[t]}i[e[e.length-1]]=n}(i,e,n)}),i}continue(t,e=!1){this.moveToNextAction.emit()}skipRunTest(){this.selectedApp.emit({callTestFunction:this.currentApp,currentApp:this.currentApp,skipRunTest:!0})}toggleTestError(){this.ToogleTestFail=!this.ToogleTestFail}startStreaming(){if(!this.sampleData)return;const t=JSON.parse(JSON.stringify(this.sampleData));this.streamingData=[],this.streamAllFields(t)}clearAllValues(t){for(const e in t)t.hasOwnProperty(e)&&("object"==typeof t[e]&&null!==t[e]?this.clearAllValues(t[e]):t[e]="")}streamAllFields(t){const e=this.flattenObject(t),n=Object.keys(e);let i=0;const o=()=>{if(i>=n.length)return;const t=n[i],r=String(e[t]),s={key:"",value:""};this.streamingData.push(s),this.streamKeyValuePair(s,t,r,()=>{i++,setTimeout(o,1)})};o()}flattenObject(t,e=""){const n={};for(const i in t)if(t.hasOwnProperty(i)){const o=e?`${e}.${i}`:i;"object"==typeof t[i]&&null!==t[i]?Object.assign(n,this.flattenObject(t[i],o)):n[o]=t[i]}return n}streamKeyValuePair(t,e,n,i){this.streamKey(t,e,()=>{this.streamValue(t,n,i)})}streamKey(t,e,n){let i=0;const o=()=>{i<e.length?(t.key+=e[i],i++,this.changeDetectorRef.detectChanges(),setTimeout(o,0)):n()};o()}streamValue(t,e,n){let i=0;const o=()=>{i<e.length?(t.value+=e[i],i++,this.changeDetectorRef.detectChanges(),setTimeout(o,0)):n()};o()}getStreamingData(){return this.streamingData}getStreamingJsonData(){const t={};return this.streamingData.forEach(e=>{const n=e.key.split(".");let i=t;for(let t=0;t<n.length-1;t++)i[n[t]]||(i[n[t]]={}),i=i[n[t]];i[n[n.length-1]]=e.value}),t}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(yo),o.Y36(Fo),o.Y36(av),o.Y36(mo.tT))},t.\u0275cmp=o.Xpm({type:t,selectors:[["setup-options"]],inputs:{currentApp:"currentApp",translation:"translation",nodeType:"nodeType",isTemplate:"isTemplate",singleClickTemplate:"singleClickTemplate",connectId:"connectId",warningInfo:"warningInfo",connectList:"connectList"},outputs:{selectedApp:"selectedApp",moveToNextAction:"moveToNextAction"},decls:2,vars:2,consts:[["class","chooseapps bg-white",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"chooseapps","bg-white",3,"ngClass"],[1,"choose-trigger-event"],[1,"guide-flex"],["class","ai-agent-testing-title",4,"ngIf"],["aria-hidden","true","aria-label","incomplate","class","icon-alertcirclefill",4,"ngIf"],["type","button","id","step_guide_Btn","tooltip","Guide","placement","top",1,"btn","step_guide",3,"click"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],["class","d-flex align-items-center gap-2 flex-wrap- flex-column text-center text-black",4,"ngIf"],["style","color: red;",4,"ngIf"],["class","choices-search px-0 bg-transparent",4,"ngIf"],["class","border jsondata my-4 rounded",4,"ngIf"],["class","continue mar-10-b normal-continue",4,"ngIf"],["class","jsondata aiagent-jsondata","style","max-height: unset;",4,"ngIf"],["class","continue mar-10-b",4,"ngIf"],[1,"ai-agent-testing-title"],["aria-hidden","true","aria-label","incomplate",1,"icon-alertcirclefill"],["aria-hidden","true",1,"fa","fa-exclamation-circle","fa-fw","fa-lg"],[1,"d-flex","align-items-center","gap-2","flex-wrap-","flex-column","text-center","text-black"],[1,"fa","fa-check-circle","fa-fw","fa-2x",2,"color","#00ad67"],[1,"fw-bold","text-primary","text-decoration-underline","flex-shrink-0",3,"click"],[1,"fw-bold","text-primary","ms-auto","flex-shrink-0",3,"click"],[2,"color","red"],[1,"info-icon",3,"click"],[1,"choices-search","px-0","bg-transparent"],[1,"svg-icon","svg-icon--search","choices-search__search-icon",2,"left","10px","top","20px"],["viewBox","0 0 512 512","width","21","height","21","fill","#d3cdcc"],["d","M435 219c0-110-89-199-199-199S37 109 37 219s89 199 199 199 199-89 199-199zM236 333c-63 0-114-51-114-114s51-114 114-114 114 51 114 114-51 114-114 114zm142 115c14 15 42 44 42 44 16 16 43 17 60 1 17-17 18-44 1-61l-95-99c-16-17-43-17-60-1-17 17-18 44-1 61 0 0 35 37 53 55z"],["placeholder","Search...","type","text",1,"formcontrol","shadow-none","ps-5",3,"keyup","keydown"],[1,"border","jsondata","my-4","rounded"],[1,"content",3,"ngStyle"],[3,"json"],[1,"continue","mar-10-b","normal-continue"],[1,"btngroup","w-100","cutomdropdown"],["type","button","data-track","continue",1,"btn","btn-lg","w-25","mr-0","border-start-0","mx-0",3,"disabled","click"],["class","dropdownmenu w-25 mx-3",4,"ngIf"],[1,"dropdownmenu","w-25","mx-3"],[1,"btn","btn-lg","conntacont-btn","w-100","mx-0",3,"click"],[1,"jsondata","aiagent-jsondata",2,"max-height","unset"],[1,"content",3,"ngClass","ngStyle"],[1,"continue","mar-10-b"]],template:function(t,e){1&t&&(o.YNc(0,Jz,18,16,"div",0),o.YNc(1,jz,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf",!e.detectChangeloader&&e.connectList&&e.connectList[0]),o.xp6(1),o.Q6J("ngIf",e.testloader||e.detectChangeloader))},directives:[to.O5,to.mk,tr,to.PC,_z,po],styles:[".data-display-container[_ngcontent-%COMP%]{border:1px solid black;padding:10px;margin-bottom:10px}textarea[_ngcontent-%COMP%]{resize:none}.jsondata[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;scroll-behavior:smooth;scrollbar-width:thin}.info-icon[_ngcontent-%COMP%]{font-size:20px;color:red;margin-left:5px}.content[_ngcontent-%COMP%]{padding:10px;overflow-y:auto;background-color:#fff;max-height:100%}.toggle-btn[_ngcontent-%COMP%]{cursor:pointer;padding:5px;background-color:#3498db;color:#fff;text-align:center}.content[_ngcontent-%COMP%]   *[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   ngx-json-viewer[_ngcontent-%COMP%]   *[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   section[_ngcontent-%COMP%]   *[_ngcontent-%COMP%], .ngx-json-viewer[_ngcontent-%COMP%]   .segment[_ngcontent-%COMP%]   .segment-main[_ngcontent-%COMP%]{font-size:14px}html.dark[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]{.data-display-container {border: 1px solid var(--border-color) !important; background: var(--card-bg) !important; color: var(--primary-text) !important;};.content {background-color: var(--card-bg) !important; color: var(--primary-text) !important;};.toggle-btn {background-color: var(--accent-color) !important; color: var(--button-primary-text) !important;};.jsondata {background: var(--secondary-bg) !important; color: var(--primary-text) !important;};.content *,.content ngx-json-viewer *,.content section *,.ngx-json-viewer .segment .segment-main {color: var(--primary-text) !important; background: inherit !important;};.info-icon {color: var(--danger-color) !important;};textarea {background: var(--input-bg) !important; color: var(--primary-text) !important; border-color: var(--input-border) !important;};textarea:focus {border-color: var(--input-focus-border) !important; background: var(--input-bg) !important;}}.ai-agent-testing-title[_ngcontent-%COMP%]{font-size:16px!important}"]}),t})();function $z(t,e){if(1&t&&o._UZ(0,"input",21),2&t){const t=o.oxw();o.Q6J("value",t.translation.TRIGGER_ACTION_ADDING_BTN_LABEL2)}}function Bz(t,e){1&t&&(o.TgZ(0,"div",22),o.TgZ(1,"div",23),o.TgZ(2,"div",24),o._UZ(3,"span"),o.qZA(),o.qZA(),o.qZA())}let Hz=(()=>{class t{constructor(t,e,n,i,o){this.formBuilder=t,this.bsModalRef=e,this.http=n,this.commonService=i,this.cusService=o,this.handleSuccessValue=0,this.captchaError=!0,this.captchaToken="",this.siteKey="6Lfee0gtAAAAAGT8yXRb1JHN5ozYunZzuxv1HuML"}ngOnInit(){this.aFormGroup=this.formBuilder.group({recaptcha:["",Xi.kI.required]}),this.onClose=new fo.xQ,this.customerInfo=this.cusService.GetCurrent(),this.feedback=this.formBuilder.group({taname:["",Xi.kI.required],message:[""]}),this.feedback.get("taname").valueChanges.subscribe(t=>{this.feedback.get("taname").setValue(this.sanitizeInput(t),{emitEvent:!1})}),this.feedback.get("message").valueChanges.subscribe(t=>{this.feedback.get("message").setValue(this.sanitizeInput(t),{emitEvent:!1})})}sendFeedback(){if(1==this.handleSuccessValue){if(this.captchaError=!0,this.feedback.invalid)return;if(this.formLoader=!0,!this.feedback.invalid){const t={nodeType:this.nodeType,customerId:this.customerInfo.customerId,email:this.customerInfo.email,appId:this.currentApp.appId,feedback_taname:this.sanitizeInput(this.feedback.value.taname),feedback_message:this.sanitizeInput(this.feedback.value.message),customerName:this.sanitizeInput(this.customerInfo.firstName+" "+this.customerInfo.lastName),captchaToken:this.captchaToken};this.commonService.sendFeedback(t).subscribe(t=>{this.formLoader=!1,this.onClose.next(!0),"success"===t.message&&(this.bsModalRef.hide(),this.feedbackOptionCls="",this.formLoader=!1)})}}else this.captchaError=!1}sanitizeInput(t){return(t=t.replace(/\b(https?:\/\/|www\.|[\w\-]+(\.[\w\-]+)+[\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])\b/g,"URL_REMOVED")).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"SCRIPT_REMOVED")}
1handleSuccess(t){this.captchaToken=t,this.handleSuccessValue=1}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Xi.qu),o.Y36(mo.UZ),o.Y36(di.eN),o.Y36(wo.v),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-email-for-event"]],decls:35,vars:12,consts:[[1,"modal-content","clearfix"],[1,"modal-header"],[1,"modal-title","float-left","text-black"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"text-black","mar-10-b",3,"innerHtml"],[1,"text-left","text-black",3,"formGroup","ngSubmit"],[1,"col-xs-12","col-sm-12","col-md-12"],[3,"innerHtml"],[1,"text-danger","push-5-l"],["type","text","formControlName","taname",1,"form-control","pad-10","heightAuto","ng-pristine","ng-untouched","ng-not-empty","ng-valid","ng-valid-required"],[1,"mar-10-b",3,"innerHtml"],["formControlName","message",1,"form-control","pad-10","heightAuto","ng-pristine","ng-untouched","ng-not-empty","ng-valid","ng-valid-required"],[1,"push-20","text-right"],[3,"formGroup"],["formControlName","recaptcha",3,"siteKey","success"],["captchaElem",""],["class","btn btn-default dark","type","submit","name","btnSubmit","id","btnSubmit",3,"value",4,"ngIf"],[1,"text-danger",3,"hidden"],["class","row block-header testLoader mar-0 pad-0",4,"ngIf"],["type","submit","name","btnSubmit","id","btnSubmit",1,"btn","btn-default","dark",3,"value"],[1,"row","block-header","testLoader","mar-0","pad-0"],[1,"col-xs-12"],[1,"loader-5","small"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"h3",2),o._uU(3),o.qZA(),o.TgZ(4,"button",3),o.NdJ("click",function(){return e.bsModalRef.hide()}),o.TgZ(5,"span",4),o._uU(6,"\xd7"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(7,"div",5),o.TgZ(8,"div"),o._UZ(9,"h5",6),o.TgZ(10,"p"),o._uU(11),o.qZA(),o.TgZ(12,"form",7),o.NdJ("ngSubmit",function(){return e.sendFeedback()}),o.TgZ(13,"div",8),o.TgZ(14,"label"),o._UZ(15,"span",9),o.TgZ(16,"span",10),o._uU(17,"*"),o.qZA(),o.qZA(),o._UZ(18,"input",11),o._UZ(19,"br"),o.TgZ(20,"label"),o.TgZ(21,"span"),o._uU(22),o.qZA(),o.qZA(),o._UZ(23,"div",12),o._UZ(24,"textarea",13),o._UZ(25,"br"),o.TgZ(26,"div",14),o.TgZ(27,"form",15),o.TgZ(28,"ngx-recaptcha2",16,17),o.NdJ("success",function(t){return e.handleSuccess(t)}),o.qZA(),o.qZA(),o._UZ(30,"br"),o.YNc(31,$z,1,1,"input",18),o.TgZ(32,"span",19),o._uU(33,"Please verify the captcha first."),o.qZA(),o.qZA(),o.YNc(34,Bz,4,0,"div",20),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(3),o.Oqu(e.translation.TRIGGER_ACTION_ADDING_FORM_HEADING),o.xp6(6),o.Q6J("innerHtml",e.translation.TRIGGER_ACTION_ADDING_FORM_HEADING1.replace("__ACTION__",e.nodeType),o.oJD),o.xp6(2),o.Oqu(e.translation.TRIGGER_ACTION_ADDING_FORM_HEADING2),o.xp6(1),o.Q6J("formGroup",e.feedback),o.xp6(3),o.Q6J("innerHtml",e.translation.TRIGGER_ACTION_ADDING_FORM_LABEL1.replace("__ACTION__",e.nodeType),o.oJD),o.xp6(7),o.Oqu(e.translation.TRIGGER_ACTION_ADDING_FORM_LABEL2),o.xp6(1),o.Q6J("innerHtml",e.translation.TRIGGER_ACTION_ADDING_FORM_LABEL3.replace("__ACTION__",e.nodeType),o.oJD),o.xp6(4),o.Q6J("formGroup",e.aFormGroup),o.xp6(1),o.Q6J("siteKey",e.siteKey),o.xp6(3),o.Q6J("ngIf",!e.formLoader),o.xp6(1),o.Q6J("hidden",e.captchaError),o.xp6(2),o.Q6J("ngIf",e.formLoader))},directives:[Xi._Y,Xi.JL,Xi.sg,Xi.Fj,Xi.JJ,Xi.u,ro,to.O5],styles:[""]}),t})();function Qz(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"(In Development)"),o.qZA())}function Yz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",28),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).select(e,"Trigger")}),o._UZ(1,"input",29),o.TgZ(2,"label",30),o._UZ(3,"div",31),o.TgZ(4,"div",32),o.TgZ(5,"span"),o._uU(6),o.YNc(7,Qz,2,0,"span",1),o.qZA(),o.TgZ(8,"p"),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("id",t._id)("checked",n.selectedValModel._id===t._id),o.xp6(1),o.Q6J("for",t._id),o.xp6(1),o.Udp("background-image","url("+n.appyConfig.cdnMediaPath+n.currentApp.image+") !important"),o.xp6(3),o.hij("",t.trigger_action_displayname," "),o.xp6(1),o.Q6J("ngIf",1!==t.status),o.xp6(2),o.hij("(",t.desc,")")}}function zz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",33),o.TgZ(1,"p",34),o._uU(2),o.TgZ(3,"a",35),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).emailUs()}),o._uU(4,"Email us now!"),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.Oqu(t.taAddingFormHeading)}}function Vz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",36),o.TgZ(1,"div",37),o.TgZ(2,"span",38),o._UZ(3,"i",39),o.qZA(),o.qZA(),o.TgZ(4,"h3",40),o._uU(5),o.qZA(),o.TgZ(6,"a",41),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).emailUs()}),o._uU(7),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(5),o.Oqu(t.translation.TRIGGER_ACTION_ADDING_THANKS),o.xp6(2),o.Oqu(t.translation.TRIGGER_ACTION_ADDING_ANOTHER_REQUEST)}}function Gz(t,e){1&t&&(o.TgZ(0,"div",42),o.O4$(),o.TgZ(1,"svg",43),o._UZ(2,"path",44),o._UZ(3,"path",45),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"App Account"),o.qZA(),o.qZA())}function Wz(t,e){1&t&&(o.TgZ(0,"div",42),o.O4$(),o.TgZ(1,"svg",43),o._UZ(2,"path",44),o._UZ(3,"path",45),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"Set up Trigger"),o.qZA(),o.qZA())}function Kz(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"h4"),o._uU(4,"Choose a Trigger Event: "),o.qZA(),o.TgZ(5,"button",5),o._UZ(6,"i",6),o.qZA(),o.qZA(),o.TgZ(7,"aside",7),o.TgZ(8,"div",8),o.TgZ(9,"span",9),o._uU(10,"GUIDE"),o.qZA(),o.TgZ(11,"button",10),o._UZ(12,"i",11),o.qZA(),o.qZA(),o.TgZ(13,"div",12),o.TgZ(14,"div",13),o.TgZ(15,"h3"),o._uU(16,"Set up your Trigger"),o.qZA(),o.TgZ(17,"div",14),o.TgZ(18,"ul"),o.TgZ(19,"li"),o._uU(20,"We support the apps you use, so you can automate your business end-to-e
1nd. "),o.qZA(),o.TgZ(21,"li"),o._uU(22,"This is what starts the Connect. Appy Pie will monitor for your trigger event. "),o.qZA(),o.qZA(),o.qZA(),o._UZ(23,"hr"),o.TgZ(24,"div",15),o.TgZ(25,"div",16),o.TgZ(26,"span"),o._UZ(27,"i",17),o.qZA(),o.TgZ(28,"h4"),o._uU(29,"Example"),o.qZA(),o.qZA(),o.TgZ(30,"div",18),o.TgZ(31,"p"),o._uU(32,"Trigger event is a possible action that the user can perform that is monitored by an application (trigger)."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"div",19),o._UZ(34,"img",20),o.qZA(),o.qZA(),o.qZA(),o.TgZ(35,"div",21),o.YNc(36,Yz,10,8,"div",22),o.YNc(37,zz,5,1,"div",23),o.YNc(38,Vz,8,2,"div",24),o.qZA(),o.qZA(),o.YNc(39,Gz,6,0,"div",25),o.YNc(40,Wz,6,0,"div",25),o.TgZ(41,"div",26),o.TgZ(42,"a",27),o.NdJ("click",function(){return o.CHM(t),o.oxw().continue()}),o._uU(43),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(36),o.Q6J("ngForOf",t.taOptions),o.xp6(1),o.Q6J("ngIf","new"==t.showFeedbackForm),o.xp6(1),o.Q6J("ngIf","success"==t.showFeedbackForm),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(2),o.ekj("disabled",!t.selectedValModel||!t.selectedValModel._id),o.xp6(1),o.Oqu(null==t.translation?null:t.translation.CONTINUE)}}function Xz(t,e){1&t&&(o.TgZ(0,"h4"),o._uU(1,"Choose an Action Event: "),o.qZA())}function tV(t,e){if(1&t&&o._UZ(0,"input",52),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.Q6J("id",t._id)("checked",e.selectedValModel._id===t._id)}}function eV(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"(In Development)"),o.qZA())}function nV(t,e){if(1&t&&(o.TgZ(0,"label",30),o._UZ(1,"div",31),o.TgZ(2,"div",32),o.TgZ(3,"span"),o._uU(4),o.YNc(5,eV,2,0,"span",1),o.qZA(),o.TgZ(6,"p"),o._uU(7),o.qZA(),o.qZA(),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.Q6J("for",t._id),o.xp6(1),o.Udp("background-image","url("+e.appyConfig.cdnMediaPath+e.currentApp.image+") !important"),o.xp6(3),o.hij("",t.trigger_action_displayname," "),o.xp6(1),o.Q6J("ngIf",1!==t.status),o.xp6(2),o.hij("(",t.desc,")")}}function iV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",28),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).select(e,"Actions")}),o.YNc(1,tV,1,2,"input",50),o.YNc(2,nV,8,6,"label",51),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.Q6J("ngIf","Splits in different flows"!==t.trigger_action_name),o.xp6(1),o.Q6J("ngIf","Splits in different flows"!==t.trigger_action_name)}}function oV(t,e){1&t&&(o.TgZ(0,"h4",53),o._uU(1,"Searches"),o.qZA())}function rV(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"(In Development)"),o.qZA())}function sV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",28),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).select(e,"Searches")}),o._UZ(1,"input",54),o.TgZ(2,"label",30),o._UZ(3,"div",31),o.TgZ(4,"div",32),o.TgZ(5,"span"),o._uU(6),o.YNc(7,rV,2,0,"span",1),o.qZA(),o.TgZ(8,"p"),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("id",t._id)("checked",n.selectedValModel._id===t._id),o.xp6(1),o.Q6J("for",t._id),o.xp6(1),o.Udp("background-image","url("+n.appyConfig.cdnMediaPath+n.currentApp.image+") !important"),o.xp6(3),o.hij("",t.trigger_action_displayname," "),o.xp6(1),o.Q6J("ngIf",1!==t.status),o.xp6(2),o.hij("(",t.desc,")")}}function aV(t,e){1&t&&(o.TgZ(0,"div",42),o.O4$(),o.TgZ(1,"svg",43),o._UZ(2,"path",44),o._UZ(3,"path",45),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"App Account"),o.qZA(),o.qZA())}function cV(t,e){1&t&&(o.TgZ(0,"div",42),o.O4$(),o.TgZ(1,"svg",43),o._UZ(2,"path",44),o._UZ(3,"path",45),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"Set up Action"),o.qZA(),o.qZA())}function lV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.YNc(3,Xz,2,0,"h4",1),o.TgZ(4,"button",5),o._UZ(5,"i",6),o.qZA(),o.qZA(),o.TgZ(6,"aside",7),o.TgZ(7,"div",8),o.TgZ(8,"span",9),o._uU(9,"GUIDE"),o.qZA(),o.TgZ(10,"button",10),o._UZ(11,"i",11),o.qZA(),o.qZA(),o.TgZ(12,"div",12),o.TgZ(13,"div",13),o.TgZ(14,"h3"),o._uU(15,"Select an action "),o.qZA(),o.TgZ(16,"div",14),o.TgZ(17,"ul"),o.TgZ(18,"li"),o._uU(19,"An action is an event your Connect performs when your trigger event occurs. "),o.qZA(),o.TgZ(20,"li"),o._uU(21,"This is performed when the C
1onnect runs. Select an Action Event from the dropdown menu. "),o.qZA(),o.TgZ(22,"li"),o._uU(23,"Connect your preferred account and follow the instructions to start your action event. "),o.qZA(),o.qZA(),o.qZA(),o._UZ(24,"hr"),o.TgZ(25,"div",15),o.TgZ(26,"div",16),o.TgZ(27,"span"),o._UZ(28,"i",17),o.qZA(),o.TgZ(29,"h4"),o._uU(30,"Example"),o.qZA(),o.qZA(),o.TgZ(31,"div",18),o.TgZ(32,"p"),o._uU(33,"Trigger event is a possible action that the user can perform that is monitored by an application (trigger)."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(34,"div",19),o._UZ(35,"img",46),o.qZA(),o.qZA(),o.qZA(),o.TgZ(36,"div",21),o.YNc(37,iV,3,2,"div",22),o.YNc(38,oV,2,0,"h4",47),o.YNc(39,sV,10,8,"div",22),o.TgZ(40,"div",33),o.TgZ(41,"p",34),o._uU(42,"Don't see an action event you need? "),o.TgZ(43,"a",35),o.NdJ("click",function(){return o.CHM(t),o.oxw().emailUs()}),o._uU(44,"Email us now!"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(45,aV,6,0,"div",25),o.YNc(46,cV,6,0,"div",25),o.TgZ(47,"div",48),o.TgZ(48,"button",49),o.NdJ("click",function(){return o.CHM(t),o.oxw().continue()}),o._uU(49),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(3),o.Q6J("ngIf",t.taOptions&&t.taOptions.action&&t.taOptions.action[0]),o.xp6(34),o.Q6J("ngForOf",null==t.taOptions?null:t.taOptions.action),o.xp6(1),o.Q6J("ngIf",t.taOptions&&t.taOptions.search&&t.taOptions.search[0]),o.xp6(1),o.Q6J("ngForOf",null==t.taOptions?null:t.taOptions.search),o.xp6(6),o.Q6J("ngIf","k2P4o45df5f473111E0f"!==t.currentApp.appId&&!1),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(2),o.Q6J("disabled",!t.selectedValModel||!t.selectedValModel._id),o.xp6(1),o.Oqu(t.translation.CONTINUE)}}function dV(t,e){1&t&&o._UZ(0,"app-loader")}let uV=(()=>{class t{constructor(t,e,n,i,r,s){this.customerConnectService=t,this.commonService=e,this.modalService=n,this.customerService=i,this.cdr=r,this.userGuideService=s,this.selectedApp=new o.vpe,this.beforeEventChange=new o.vpe,this.setUnSavedChanges=new o.vpe,this.appyConfig=go.N,this.selectedValModel={_id:null},this.showFeedbackForm="new"}ngAfterContentInit(){}ngOnInit(){setTimeout(()=>{$(document).ready(function(){$("#step_guide_Btn").on("click",function(){$("#aside_step_guide").toggleClass("d-none")}),$(".closebtn-guide").click(function(){$("#aside_step_guide").addClass("d-none")})})},200),this.getAppOptionsByAppId(),this.cdr.detectChanges()}getAppOptionsByAppId(){this.commonService.getAppOptionsByAppId(this.currentApp.appId,{type:this.nodeType}).subscribe(t=>{if(this.cdr.detectChanges(),!t.app_options)return;this.showAllTrigActions=!1;const e=t.app_options,n="trigger"===this.nodeType,i=n?"Trigger":"Action",o=n?e:e.action,r=n?[]:e.search;if(this.showMoreTrgrActionLabel=this.translation.CUSTOM_SHOW_MORE_OPTIONS.replace("__ACTION__",n?"trigger":"action"),Array.isArray(o)&&o.length>0||r.length>0){this.feedbackOptionCls="feedbackOption",this.taAddingFormHeading=this.translation.TRIGGER_ACTION_ADDING_MESSAGE2.replace("__AN__",n?"a":"an").replace("__ACTION__",this.nodeType),this.taAddingFormBtnLbl=this.translation.TRIGGER_ACTION_ADDING_FORM_HEADING3.replace("__ACTION__",this.nodeType),this.taOptions=e,this.cdr.detectChanges();const t=this.currentApp.actionNameTitle,i=(Array.isArray(o)&&o||[]).map(t=>t.trigger_action_name).indexOf(t),s=r.map(t=>t.trigger_action_name).indexOf(t);t&&"applicationChanged"!==t?-1!==i?this.select(o[i],"Actions"):-1!==s?this.select(r[s],"Searches"):this.select(o[0],"Actions"):this.select(o[0],"Actions")}else this.taAddingFormHeading=this.translation.TRIGGER_ACTION_ADDING_MESSAGE.replace("__APP_NAME__",this.currentApp.name).replace("__ACTION__",`a ${i}`),this.taAddingFormBtnLbl=this.translation.TRIGGER_ACTION_ADDING_BTN_LABEL.replace("__ACTION__",this.nodeType);this.testloader=!1,this.pageLoaded2=!0})}select(t,e){this.currentApp.canContinueRuntest=!("Searches"===e||["k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f473388E6g","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733syncdata","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","jlp5059wb5f473388e6f","janrjh1l08ex59386f67g7nh","janrjh1l08ex59386f8cx5lp"].includes(this.currentApp.appId)),this.selectedValModel=t}emailUs(){this.bsModalRef=this.modalService.show(Hz,{initialState:{nodeType:this.nodeType,translation:this.translation,currentApp:this.currentApp}}),this.bsModalRef.content.onClose.subscribe(t=>
1{t&&(this.showFeedbackForm="success")})}continue(){var t,e;if("k2P4o45df5f473111E0g"===this.currentApp.appId||"k2P4o45df5f473111E0f"===this.currentApp.appId||"k2P4o69wb5f473388E6g"===this.currentApp.appId||"k2P4o69wb5f4733delay"===this.currentApp.appId||"k2P4o69wb5f4733twowaysync"===this.currentApp.appId||"k2P4o69wb5f4733syncdata"===this.currentApp.appId||"k2P4o69wb5f4733aiagent"===this.currentApp.appId||"k2P4o69wb5f4733pdfgenerator"===this.currentApp.appId||"k2P4p45df5f222345E0a"===this.currentApp.appId||"jlp5059wb5f473388e6f"===this.currentApp.appId||"janrjh1l08ex59386f67g7nh"===this.currentApp.appId||"janrjh1l08ex59386f8cx5lp"===this.currentApp.appId||"lna8nwtk00qb7189999ylsri"===this.currentApp.appId){let t;this.customerService.getCurrentUser({}).subscribe(e=>{t=e.aiMappingCheck,1===this.currentApp.index&&("new"==this.currentApp.nodeStatus||"ta_selected"==this.currentApp.nodeStatus||"app_selected"==this.currentApp.nodeStatus)&&!t&&(this.currentApp.aiMappingStatus="true",this.modalService.show(rv,{initialState:{},class:"ai-mapping-modal"}))})}if(!(null===(t=this.selectedValModel)||void 0===t?void 0:t._id))return;this.beforeEventChange.emit();const n=null===(e=this.connectList.find(t=>t.index==this.currentApp.index))||void 0===e?void 0:e.AppData;(null==n?void 0:n.isNewApp)?(this.disableConnect(),this.updateConnectStatus("app_selected","Draft"),delete n.isNewApp,this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,n).subscribe(()=>{this.setNewEvent(),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)}),delete this.connectList.find(t=>t.index==this.currentApp.index).AppData,this.setUnSavedChanges.emit(!1)):this.setNewEvent(),2===this.userGuideService.getCurrentStep()&&setTimeout(()=>{this.userGuideService.nextStep()},500)}setNewEvent(){0===this.currentApp.index&&(this.currentApp.triggerType="webhook"===this.selectedValModel.triggerType?"webhook":"polling","webhook"===this.currentApp.triggerType?(this.currentApp.webhook_functions={subscribe:`${this.currentApp.credentialUrlName}/${this.selectedValModel.subscribeHookFunction}`},this.selectedValModel.unsubscribeHookFunction&&(this.currentApp.webhook_functions.unsubscribe=`${this.currentApp.credentialUrlName}/${this.selectedValModel.unsubscribeHookFunction}`)):"webhookUrl"===this.selectedValModel.triggerType&&(this.currentApp.triggerType="webhookUrl",this.currentApp.triggerAuth=this.selectedValModel.triggerAuth,this.currentApp.webhook_functions="NA")),this.selectedValModel.actionCat&&(this.currentApp.actionCat=this.selectedValModel.actionCat);const t="action"===this.selectedValModel.type?"actions":this.selectedValModel.type;if(this.currentApp.nodeType=t,this.nodeType=t,this.currentApp.actionNameTitle!==this.selectedValModel.trigger_action_name){this.disableConnect(),this.updateConnectStatus("ta_selected","Draft"),this.pageLoaded2=!1,this.testloader=!0;const e={nodeStatus:"ta_selected",actionName:{title:this.selectedValModel.trigger_action_name,desc:this.selectedValModel.desc,display_title:this.selectedValModel.trigger_action_displayname},nodeType:t,sample_data:[],editOptions:{},fields_error:"",triggerType:this.currentApp.triggerType,webhook_functions:this.currentApp.webhook_functions,actionCat:this.currentApp.actionCat||null};this.warningInfo[this.currentApp.index]=null,this.connectList.find(t=>t.index==this.currentApp.index)&&(this.connectList.find(t=>t.index==this.currentApp.index).sample_data=[],this.currentApp.sample_data=[]),this.customerConnectService.updateUserConnectBy_Id(this.currentApp.nodeId,e).subscribe(t=>{t&&this.emitValues(!0),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)})}else this.emitValues(!1),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0);this.testloader=!1}emitValues(t){this.connectList.forEach(t=>{var e,n;t.nodeId===this.currentApp.nodeId&&(["jlp5059wb5f473388e6f","k2P4o69wb5f473388E6g","k2P4o45df5f473111E0g","k2P4o45df5f473111E0f","k2P4o69wb5f4733delay","k2P4o69wb5f4733twowaysync","k2P4o69wb5f4733aiagent","k2P4o69wb5f4733pdfgenerator","janrjh1l08ex59386f67g7nh","janrjh1l08ex59386f8cx5lp","k2P4p45df5f222345E0a","lna8nwtk00qb7189999ylsri","k2P4o69wb5f4733syncdata"].includes(this.currentApp.appId)?(this.currentApp.actionNameTitle&&this.currentApp.actionNameTitle!==this.selectedValModel.trigger_action_name&&(this.currentApp.editOptions={},this.currentApp.additionalTriggerEditOptions=null),this.currentApp.currentAction="options"):(this.currentApp.actionNameTitle&&this.currentApp.actionNameTitle!==this.selectedValModel.trigger_action_name&&(this.currentApp.editOptions={},this.currentApp.additionalTriggerEditOptions=null),this.currentApp.currentAction="account"),this.currentApp.actionNameTitle=this.selectedValModel.trigger_action_name,this.connectList.find(t=>t.index==this.currentApp.index).actionNameTitle=this.selectedValModel.trigger_action_name,this.currentApp.actionNameTitle_display=this.selectedValModel.trigger_action_displayname,this.connectList.find(t=>t.index==this.currentApp.index).actionNameTitle_display=this.selectedValModel.trigger_action_displayname,this.currentApp.triggerEditOptions=this.selectedValModel.options,this.connectList.find(t=>t.index==this.currentApp.index).triggerEditOptions=this.selectedValModel.options,this.selectedValModel.actionCat&&(this.currentApp.actionCat=this.selectedValModel.actionCat,this.connectList.find(t=>t.index==this.currentApp.index).actionCat=this.selectedValModel.actionCat),(null===(e=this.selectedValModel.custom_form)||void 0===e?void 0:e.function)&&(this.currentApp.custom_form=this.selectedValModel.custom_form.function),this.connectList.currentState="account","Draft"===(null===(n=this.currentApp)||void 0===n?void 0:n.connectStatus)?localStorage.setItem("activeTab","draft"):localStorage.setItem("activeTab","published"),this.selectedApp.emit({action:this.selectedValModel,currentApp:this.currentApp}))})}disableConnect(){this.customerConnectService.deleteUserConnectCron(this.currentApp.connectId).subscribe({next:()=>{},error:t=>{console.error("Error deleting user connect cron:",t)}})}updateConnectStatus(t,e){this.connectList=this.connectList.map(n=>{const i=this.currentApp.index===n.index,o={connectStatus:e};return i&&(n.nodeStatus=t,this.currentApp.nodeStatus=t,this.currentApp.connectStatus=e,o.nodeStatus=t),this.customerConnectService.updateUserConnectBy_Id(n.nodeId,o).subscribe(()=>
1{i&&(n.connectStatus=e)}),n}),this.currentApp.connectStatus="Draft"}getAllChildIndices(t){const e=[],n=[t];for(;n.length>0;){let t=n.shift(),i=this.connectList.find(e=>(null==e?void 0:e.index)==t);if(i&&i.childIndex&&i.childIndex.length>0)for(let o of i.childIndex)null!=o&&(e.push(o),n.push(o))}return e}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(Fo),o.Y36(wo.v),o.Y36(mo.tT),o.Y36(yo),o.Y36(o.sBO),o.Y36(LA))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-app-event"]],inputs:{currentApp:"currentApp",translation:"translation",nodeType:"nodeType",connectId:"connectId",warningInfo:"warningInfo",isTemplate:"isTemplate",singleClickTemplate:"singleClickTemplate",connectList:"connectList"},outputs:{selectedApp:"selectedApp",beforeEventChange:"beforeEventChange",setUnSavedChanges:"setUnSavedChanges"},decls:3,vars:3,consts:[["class","bg-white border-0 chooseapps mb-0 p-0 rounded-0",4,"ngIf"],[4,"ngIf"],[1,"bg-white","border-0","chooseapps","mb-0","p-0","rounded-0"],[1,"choose-trigger-event"],[1,"guide-flex"],["type","button","id","step_guide_Btn","tooltip","Guide","placement","top",1,"btn","step_guide"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],["id","aside_step_guide",1,"aside-step-guide","d-none"],[1,"guide-menu"],[1,"mar-0-l"],["type","button","title","Close Guide",1,"btn","closebtn-guide"],["aria-hidden","true",1,"fa","fa-times-circle-o","fa-fw","fa-lg"],[1,"scroll-guide"],[1,"guide-data"],[1,"step-listing","mar-15-t"],[1,"example"],[1,"icon_exmpl"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"exmpl-desc"],[1,"screenshot_img"],["src","/assets/images/img_guide_01.png","alt","img_guide_01"],[1,"dropdown_menu_body_event","scrollheight"],["class","form-checkbox mar-10-b",3,"click",4,"ngFor","ngForOf"],["class","emailus-now",4,"ngIf"],["class","col-md-12 paddingtop50 text-center",4,"ngIf"],["class","next-step",4,"ngIf"],[1,"continue","justify-content-center"],["data-track","continue with event","type","link","aria-disabled","true",1,"btn","btn-lg","w-100","mb-0",3,"click"],[1,"form-checkbox","mar-10-b",3,"click"],["data-track","select trigger event","type","checkbox","disabled","","name","radio","value","New_Labeled",1,"form-check-input",3,"id","checked"],[1,"form-check-label",3,"for"],[1,"recipie_img_box","gmail32x32"],[1,"col-9","mar-15-l"],[1,"emailus-now"],[1,"mb-0"],["data-toggle","tooltip","data-placement","top","data-original-title","Email","href","javascript:void(0);",3,"click"],[1,"col-md-12","paddingtop50","text-center"],[1,"push-30","connect-success-header"],[1,"item","item-small","item-circle","ng-scope"],[1,"fa","fa-check","text-white","fa-1x"],[1,"push-30-t","push-20","ng-binding"],["href","javascript:void(0);","data-toggle","modal",1,"purple-clr","clrgray",3,"click"],[1,"next-step"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.99996 18.3337C14.6023 18.3337 18.3333 14.6027 18.3333 10.0003C18.3333 5.39795 14.6023 1.66699 9.99996 1.66699C5.39759 1.66699 1.66663 5.39795 1.66663 10.0003C1.66663 14.6027 5.39759 18.3337 9.99996 18.3337Z","stroke","#B2B2B2","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M10 5V10L13.3333 11.6667","stroke","#B2B2B2","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["src","/assets/images/img_guide_03.png","alt","img_guide_03"],["class","mb-1",4,"ngIf"],[1,"continue","border_top_"],["data-track","continue with event","type","button","aria-disabled","true",1,"btn","btn-lg","w-100","mb-0",3,"disabled","click"],["data-track","select action event","class","form-check-input","type","checkbox","disabled","","name","radio","value","New_Labeled",3,"id","checked",4,"ngIf"],["class","form-check-label",3,"for",4,"ngIf"],["data-track","select action event","type","checkbox","disabled","","name","radio","value","New_Labeled",1,"form-check-input",3,"id","checked"],[1,"mb-1"],["data-track","select search event","type","checkbox","disabled","","name","radio","value","New_Labeled",1,"form-check-input",3,"id","checked"]],template:function(t,e){1&t&&(o.YNc(0,Kz,44,8,"div",0),o.YNc(1,lV,50,8,"div",0),o.YNc(2,dV,1,0,"app-loader",1)),2&t&&(o.Q6J("ngIf","trigger"===e.nodeType),o.xp6(1),o.Q6J("ngIf","trigger"!==e.n
1odeType),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[to.O5,tr,to.sg,po],styles:[".choose-trigger-event[_ngcontent-%COMP%]{padding-top:12px;border-radius:0;border-top:1px solid #D5DBE7;background:#FFF;color:#74748a;font-size:12px;font-weight:400}.dropdown_menu_body_event[_ngcontent-%COMP%]{max-height:100%;height:auto}"]}),t})();const pV=["dropdownMenu"];function hV(t,e){1&t&&(o.TgZ(0,"p",30),o._uU(1,"Search for "),o.TgZ(2,"strong"),o._uU(3,"Appy Pie Automate"),o.qZA(),o._uU(4," on Shopify App Store and continue the setup."),o.qZA())}function gV(t,e){if(1&t&&(o.TgZ(0,"p",30),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij("Connect a ",t.currentApp.displayName," Account")}}function fV(t,e){if(1&t&&(o.TgZ(0,"div",26),o.TgZ(1,"div",27),o._UZ(2,"img",28),o.qZA(),o.YNc(3,hV,5,0,"p",29),o.YNc(4,gV,2,1,"p",29),o.qZA()),2&t){const t=o.oxw();o.xp6(2),o.Q6J("src",t.appyConfig.cdnMediaPath+t.currentApp.image,o.LSH),o.xp6(1),o.Q6J("ngIf","Shopify"==t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf","Shopify"!=t.currentApp.displayName)}}function mV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",51),o._uU(1,"This account is expired. Please reconnect it "),o.TgZ(2,"button",52),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).reconnectApp()}),o._uU(3," Click here!"),o.qZA(),o.qZA()}}function vV(t,e){if(1&t&&o._UZ(0,"div",53),2&t){const t=o.oxw(2);o.s9C("innerHTML",t.showReconnectError,o.oJD)}}function bV(t,e){if(1&t&&(o.TgZ(0,"span",74),o._uU(1),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Oqu(t.accountNickName)}}function xV(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"button",62),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(),i=n.$implicit,r=n.index;return o.oxw(2).deleteAccount(e,i,r)}),o.O4$(),o.TgZ(1,"svg",63),o._UZ(2,"path",75),o.qZA(),o.qZA()}}function _V(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",77),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2),i=n.$implicit,r=n.index;return o.oxw(2).deleteAccount(e,i,r)}),o._uU(1," Delete Account "),o.qZA()}}function CV(t,e){if(1&t&&(o.TgZ(0,"li"),o.YNc(1,_V,2,0,"button",76),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw(2);o.xp6(1),o.Q6J("ngIf",e.selectedAcc!=t)}}const wV=function(t){return{"text-truncate mobile-limit":t}},yV=function(t){return{show:t}};function AV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",54),o._UZ(1,"input",55),o.TgZ(2,"label",56),o.NdJ("click",function(){const e=o.CHM(t).$implicit;return o.oxw(2).selectAccount(e)}),o.TgZ(3,"div",57),o._UZ(4,"i",58),o.TgZ(5,"span",59),o._uU(6),o.qZA(),o.YNc(7,bV,2,1,"span",60),o.qZA(),o.TgZ(8,"div",61),o.TgZ(9,"button",62),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).editAccountNckName(e,n._id,n.accountNickName)}),o.O4$(),o.TgZ(10,"svg",63),o._UZ(11,"path",64),o.qZA(),o.qZA(),o.YNc(12,xV,3,0,"button",65),o.qZA(),o.kcU(),o.TgZ(13,"div",66),o.TgZ(14,"h5"),o._uU(15),o.qZA(),o.TgZ(16,"span"),o._uU(17),o.ALo(18,"date"),o.qZA(),o.qZA(),o.TgZ(19,"div",67),o.TgZ(20,"button",68),o.NdJ("click",function(e){const n=o.CHM(t).index;return o.oxw(2).toggleDropdown(n,e)}),o.O4$(),o.TgZ(21,"svg",63),o._UZ(22,"path",69),o._UZ(23,"path",70),o._UZ(24,"path",71),o.qZA(),o.qZA(),o.kcU(),o.TgZ(25,"ul",72),o.TgZ(26,"li"),o.TgZ(27,"button",73),o.NdJ("click",function(e){const n=o.CHM(t).$implicit;return o.oxw(2).editAccountNckName(e,n._id,n.accountNickName)}),o._uU(28," Edit Username "),o.qZA(),o.qZA(),o.YNc(29,CV,2,1,"li",25),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=e.$implicit,n=e.index,i=o.oxw(2);o.xp6(1),o.Q6J("checked",i.selectedAcc&&i.selectedAcc._id===t._id),o.xp6(4),o.Q6J("ngClass",o.VKq(14,wV,t.accountNickName&&""!=t.accountNickName)),o.xp6(1),o.Oqu(t.appName),o.xp6(1),o.Q6J("ngIf",t.accountNickName&&""!=t.accountNickName),o.xp6(5),o.Q6J("ngIf",i.selectedAcc!=t),o.xp6(3),o.hij("",t.accountName," "),o.xp6(2),o.AsE(" ",o.Dn7(18,10,t._created_at,"MM-dd-yyyy hh:mm a","localTimezone")," ",i.getTimeZoneAbbreviation(),""),o.xp6(8),o.Q6J("ngClass",o.VKq(16,yV,i.openDropdownIndex===n)),o.xp6(4),o.Q6J("ngIf",i.selectedAcc!=t)}}function ZV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",78),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openAuthWindow()}),o._uU(1,"Connect another account"),o.qZA()}}function kV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",79),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openAuthWindow()}),o._UZ(1,"img",80),o._uU(2," Sign in with Google Email"),o.qZA()}}const TV=function(t){return{active:t}};function OV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",31,32),o.TgZ(2,"div",33),o.NdJ("click",function(){return o.CHM(t),o.oxw().openDropdown()}),o.TgZ(3,"div",34),o._UZ(4,"div",35),o.qZA(),o.TgZ(5,"button",36),o.TgZ(6,"span",37),o.TgZ(7,"strong"),o._uU(8),o.qZA(),o.TgZ(9,"span",38),o._uU(10),o.qZA(),o.qZA(),o.qZA(),o.TgZ(11,"div",39),o._UZ(12,"i",40),o.qZA(),o.qZA(),o.YNc(13,mV,4,0,"div",41),o.YNc(14,vV,1,1,"div",42),o.TgZ(15,"div",43),o.TgZ(16,"div",44),o.TgZ(17,"h2",45),o._uU(18,"Account:"),o.qZA(),o.qZA(),o.TgZ(19,"div",46),o.YNc(20,AV,30,18,"div",47),o.qZA(),o.TgZ(21,"div",48),o.NdJ("click",function(){return o.CHM(t),o.oxw().openDropdown()}),o.YNc(22,ZV,2,0,"button",49),o.YNc(23,kV,3,0,"button",50),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(2),o.Q6J("ngClass",o.VKq(11,TV,t.dropDownOpen)),o.xp6(2),o.Udp("background-image","url("+t.appyConfig.cdnMediaPath+t.currentApp.image
1+") !important"),o.xp6(4),o.Oqu(t.currentApp.displayName),o.xp6(2),o.hij(" - ",t.selectedAcc&&t.selectedAcc.accountName," "),o.xp6(3),o.Q6J("ngIf",t.showReconnect&&!t.showReconnectError),o.xp6(1),o.Q6J("ngIf",t.showReconnect&&t.showReconnectError),o.xp6(1),o.Q6J("ngClass",o.VKq(13,TV,t.dropDownOpen)),o.xp6(5),o.Q6J("ngForOf",t.triggerConnectAccountList),o.xp6(2),o.Q6J("ngIf",!(t.currentApp.categoryId&&t.currentApp.categoryId.includes("5a3132e0f1002accb40d100d"))),o.xp6(1),o.Q6J("ngIf",t.currentApp.categoryId&&t.currentApp.categoryId.includes("5a3132e0f1002accb40d100d"))}}function MV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",81),o.NdJ("click",function(){return o.CHM(t),o.oxw().gotoDemeProvider()}),o._uU(1,"Request a demo"),o.qZA()}}function IV(t,e){if(1&t&&(o.TgZ(0,"div",82),o.O4$(),o.TgZ(1,"svg",83),o._UZ(2,"path",84),o._UZ(3,"path",85),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5),o.ALo(6,"titlecase"),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(5),o.hij("Set up ",o.lcZ(6,1,t.currentApp.nodeType),"")}}function SV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",86),o.TgZ(1,"button",87),o.NdJ("click",function(){return o.CHM(t),o.oxw().continue()}),o._uU(2,"Continue"),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.Q6J("disabled",t.showReconnect)}}function PV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",86),o.TgZ(1,"div",88),o.TgZ(2,"button",89),o.NdJ("click",function(){return o.CHM(t),o.oxw().continue()}),o._uU(3,"Continue"),o.qZA(),o.TgZ(4,"ul",90),o.TgZ(5,"li"),o.TgZ(6,"button",91),o.NdJ("click",function(){return o.CHM(t),o.oxw().continue(!0)}),o._uU(7,"Skip Run Test"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(2),o.Q6J("disabled",t.showReconnect),o.xp6(4),o.Q6J("disabled",t.showReconnect)}}function NV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",94),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openAuthWindow()}),o._uU(1,"Add an Account"),o.qZA()}}function qV(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",95),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).openAuthWindow()}),o._UZ(1,"img",80),o._uU(2," Sign in with Google"),o.qZA()}}function UV(t,e){if(1&t&&(o.TgZ(0,"div",86),o.YNc(1,NV,2,0,"button",92),o.YNc(2,qV,3,0,"button",93),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngIf",!(t.currentApp.categoryId&&t.currentApp.categoryId.includes("5a3132e0f1002accb40d100d"))),o.xp6(1),o.Q6J("ngIf",t.currentApp.categoryId&&t.currentApp.categoryId.includes("5a3132e0f1002accb40d100d"))}}function EV(t,e){1&t&&o._UZ(0,"app-loader")}let FV=(()=>{class t{constructor(t,e,n,i,r,s,a,c,l){this.apiService=t,this.cusService=e,this.customerConnectService=n,this.commonService=i,this.modalService=r,this.cookieService=s,this.customerService=a,this.cdr=c,this.router=l,this.selectedApp=new o.vpe,this.beforeAccountChange=new o.vpe,this.closeSetupOption=new o.vpe,this.appyConfig=go.N,this.accountChanged=!1,this.dropDownOpen=!1,this.openDropdownIndex=null,this.showToast=function(t){var e=document.createElement("div");e.className="copyToast",e.textContent=t,document.body.appendChild(e),setTimeout(function(){document.body.removeChild(e)},2e3)},this.currentUser=this.cusService.GetCurrent()}ngOnInit(){try{this.commonService.getApp(this.currentApp.appId).subscribe(t=>{var e;this.currentAppDetail=t,this.currentApp.categoryId=null===(e=t.app_detail)||void 0===e?void 0:e.categoryId}),this.isPublicUser=this.apiService.isPublicEmail(this.currentUser.email)}catch(t){}setTimeout(()=>{this.getConnectedAccounts();const t=window;t.$(function(){const e=$("#account_dropmenu");t.$(document).mouseup(t=>{!e.is(t.target)&&0===e.has(t.target).length&&e.removeClass("active")}),t.$("#ShowButtton_acnt_dropmenu").on("click",t=>{e.toggleClass("active")})}),$(document).ready(function(){$("#step_guide_Btn").on("click",function(){$("#aside_step_guide").toggleClass("d-none")}),$(".closebtn-guide").click(function(){$("#aside_step_guide").addClass("d-none")})})},200),this.testloader=!1}gotoDemeProvider(){window.open("https://calendly.com/d/cnsb-yh8-y2j/integration-specialist-team","_blank")}editAccountNckName(t,e,n){t.stopPropagation(),this.showEditNicknameModal(e,n)}getAccountNickNames(){return this.triggerConnectAccountList.map(t=>t.accountNickName).filter(t=>void 0!==t)}showEditNicknameModal(t,e){const n=this.getAccountNickNames();this.bsModalRef=this.modalService.show(Co,{initialState:{accountId:t,accountNickName:e,accountNickNames:n,translation:this.translation,modelTitle:"Edit Account Nickname",modelContent:"You can add a personalized nickname for your existing account"}}),this.bsModalRef.content.onClose.subscribe(t=>this.updateAccountNickName(t))}updateAccountNickName(t){this.customerConnectService.updateConnectedAccountNickName(t).subscribe(t=>{"success"==t.message&&this.getConnectedAccounts()})}toggleDropdown(t,e){e.stopPropagation(),this.openDropdownIndex=this.openDropdownIndex===t?null:t}openDropdown(){this.dropDownOpen=!this.dropDownOpen}selectAccount(t){this.selectedAcc!=t&&(this.connectList.find(t=>t.index==this.currentApp.index).sample_data=[]),this.selectedAcc=t,this.dropDownOpen=!1,this.readAuth()}onDocumentClick(t){this.dropdownMenu&&this.dropdownMenu.nativeElement.contains(t.target)||(this.dropDownOpen=!1)}readAuth(){this.testloader=!1,this.customerConnectService.readAuth(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),this.currentApp.appId,this.selectedAcc._id,this.currentApp.nodeId,this.currentUser.customerId||this.cookieService.get("
1customerId")).subscribe(t=>{this.testloader=!1,"Success"===t.message||"success"===t.message||"SUCCESS"===t.message?(this.showReconnect=!1,this.showReconnectError=null):-1!==t.message.indexOf("success_with_error___")?(this.showReconnectError=t.message.split("success_with_error___")[1],this.showReconnect=!0):(this.showReconnect=!0,this.showReconnectError=null),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)})}getConnectedAccounts(t=!1){this.testloader=!0,this.customerConnectService.getUserConnectedAccountByAppId(this.currentApp.appId).subscribe(e=>{var n;if(!e.userConnectedAccount||0===e.userConnectedAccount.length)return this.testloader=!1,void setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0);const i=e.userConnectedAccount,o={};i.forEach(t=>{const e=t.accountName||"#";o[e]=(o[e]||0)+1,o[e]>1&&(t.accountName=`${t.accountName||""} #${o[e]}`)}),this.selectedAcc=t?i[0]:(null===(n=this.currentApp.auth)||void 0===n?void 0:n.authId)&&i.find(t=>this.currentApp.auth.authId===t._id)||i[0];const r=i.filter(t=>t._id!==this.selectedAcc._id);this.triggerConnectAccountList=[this.selectedAcc,...r],this.readAuth();const s=this.currentApp.auth||{};Object.keys(s).length>0&&(this.triggerAuth=s),this.subTitle=this.translation.CUSTOM_SELECT_ACCOUNT.replace("__APPNAME__",this.currentApp.name),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)})}getTimeZoneAbbreviation(){var t;const e=new Date;return(null===(t=new Intl.DateTimeFormat("en",{timeZoneName:"short"}).formatToParts(e).find(t=>"timeZoneName"===t.type))||void 0===t?void 0:t.value)||""}openAuthWindow(){const{appId:t,nodeId:e}=this.currentApp,n="_authWindowPop";if("jnpl1uik645c878la4sp"===t)localStorage.setItem("shopifyReturnTriggerNodeId",this.currentApp.nodeId||""),localStorage.setItem("shopifyReturnConnectId",this.connectId||""),window.open("https://apps.shopify.com/appypie-connect");else{const i=this.currentAppDetail.app_detail.credential.urlName;localStorage.setItem("userConnectId",e),localStorage.setItem("connectAppId",t);const o=window.open(`${this.appyConfig.apiEndPoint}app/auth/${i}?id=${t}`,n,"width=1050,height=700");localStorage.setItem("window_name",n),localStorage.setItem("closepopup","false"),this.checkChild(o,n)}}reconnectApp(){const{appId:t,nodeId:e}=this.currentApp,n="_reconnWindowPop";if("jnpl1uik645c878la4sp"===t)window.open("https://apps.shopify.com/appypie-connect");else{localStorage.removeItem("connectedAccId"),localStorage.removeItem("connectAppId");const i=this.currentAppDetail.app_detail.credential.urlName,{_id:o}=this.selectedAcc,r=`${this.appyConfig.apiEndPoint}app/auth/${i}?id=${t}`;localStorage.setItem("userConnectId",e),localStorage.setItem("connectAppId",t),localStorage.setItem("connectedAccId",o),document.cookie=`connectedAccId=${o}`;const s=window.open(r,"_authWindowPop","width=1050,height=700");localStorage.setItem("window_name",n),localStorage.setItem("closepopup","false"),this.checkChild(s,n)}}checkChild(t,e){const n=setInterval(()=>{t.closed&&(clearInterval(n),"_reconnWindowPop"!==e?(this.selectedAcc=null,this.getConnectedAccounts(!0),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)):(this.readAuth(),setTimeout(()=>{this.selectedApp.emit({triggerButtonCentering:!0,currentApp:this.currentApp})},0)))},200)}continue(t=!1){var e;if(this.setUpOptionMenu=!0,this.cdr.detectChanges(),this.customerService.getCurrentUser({}).subscribe(t=>{t&&1===this.currentApp.index&&("new"==this.currentApp.nodeStatus||"ta_selected"==this.currentApp.nodeStatus||"app_selected"==this.currentApp.nodeStatus)&&!t.aiMappingCheck&&this.modalService.show(rv,{initialState:{},class:"ai-mapping-modal"})}),this.selectedAcc._id!==this.currentApp.connected_account_id&&(this.accountChanged=!0,this.currentApp.currentAction="overview",this.updateConnectStatusAndStatus(this.currentApp.nodeStatus,"Draft",0)),!this.showReconnect)if(this.beforeAccountChange.emit(),this.currentApp.auth&&this.currentApp.auth.authId&&this.currentApp.auth.authId!==this.selectedAcc._id&&(this.currentApp.additionalTriggerEditOptions=null,this.currentApp.triggerEditOptions&&this.currentApp.triggerEditOptions.map(t=>(t.dropdownOption=null,t))),this.selectedAcc.authId=this.selectedAcc._id,this.connectList.find(t=>t.index==this.currentApp.index).authId=this.selectedAcc._id,this.connectList.find(t=>t.index==this.currentApp.index).connected_account_id=this.selectedAcc._id,this.currentApp.connected_account_id=this.selectedAcc._id,this.selectedAcc.userEmail=this.selectedAcc.accountName?this.selectedAcc.accountName:"",this.singleClickTemplate){let e=!0;if(this.currentApp.triggerEditOptions.forEach(t=>{t.required&&"false"!==t.required&&(!this.currentApp.editOptions||!this.currentApp.editOptions[t.name])&&(e=!1)}),t)return void this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,callTestFunction:this.currentApp,currentApp:this.currentApp,skipRunTest:!0});e?"trigger"===this.currentApp.nodeType?this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,callTestFunction:"noformhere",currentApp:this.currentApp}):(this.currentApp.currentAction="overview",this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,currentApp:this.currentApp})):(this.currentApp.currentAction="options",this.currentApp.connected_account_id=this.selectedAcc._id,this.connectList.find(t=>t.index==this.currentApp.index).connected_account_id=this.selectedAcc._id,this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,currentApp:this.currentApp}),this.connectList.currentState="options",this.connectList.find(t=>t.index==this.currentApp.index).currentAction="options")}else{if(t)return void this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,callTestFunction:this.currentApp,currentApp:this.currentApp,skipRunTest:!0});0!==this.currentApp.triggerEditOptions.length||"webhookUrl"===this.currentApp.triggerType||"trigger"!==this.currentApp.nodeType||this.currentApp.custom_form?(this.currentApp.currentAction="options",this.currentApp.connected_account_id=this.selectedAcc._id,this.connectList.find(t=>t.index==this.currentApp.index).connected_account_id=this.selectedAcc._id,this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,currentApp:this.currentApp,openSetupOptions:!0,isSkipRunTest:!1}),this.router.navigateByUrl(`/customeditor/${this.currentApp.nodeId}/${this.currentApp.currentAction}/${this.currentApp.triggerId}`),this.connectList.currentState="options",this.connectList.find(t=>t.index==this.currentApp.index).currentAction="options"):this.selectedApp.emit({auth:this.selectedAcc,triggerConnectAccountList:this.triggerConnectAccountList,callTestFunction:"noformhere",currentApp:this.currentApp})}"Draft"===(null===(e=this.currentApp)||void 0===e?void 0:e.connectStatus)?localStorage.setItem("activeTab","draft"):localStorage.setItem("activeTab","published")}continueTest(){this.selectedApp.emit({callTestFunction:this.currentApp.actionNameTitle,currentApp:this.currentApp})}isOption(){return!!(this.currentApp&&this.currentApp.triggerEditOptions&&(this.currentApp.triggerEditOptions.length>0||"webhookUrl"===this.currentApp.triggerType))}updateConnectStatus(t,e){this.connectList=this.connectList.map(n=>{let i={nodeStatus:null,connectStatus:e};return this.currentApp.index==n.index?(n.nodeStatus=t,this.currentApp.nodeStatus=t,this.currentApp.connectStatus=e,i.nodeStatus=t):delete i.nodeStatus,this.customerConnectService.updateUserConnectBy_Id(n.nodeId,i).subscribe(()=>{this.currentApp.index==n.index&&(n.connectStatus=e)}),n}),localStorage.setItem("activeTab","draft"),this.currentApp.connectStatus="Draft"}updateConnectStatusAndStatus(t,e,n){this.connectList=this.connectList.map(i=>{let o={nodeStatus:null,connectStatus:e,status:n};return this.currentApp.index==i.index?(i.nodeStatus=t,this.currentApp.nodeStatus=t,this.currentApp.connectStatus=e,o.nodeStatus=t,this.currentApp.status=n):delete o.nodeStatus,this.customerConnectService.updateUserConnectBy_Id(i.nodeId,o).subscribe(()=>{this.currentApp.index==i.index&&(i.connectStatus=e,i.status=n)}),i}),localStorage.setItem("activeTab","draft"),this.currentApp.connectStatus="Draft"}deleteAccount(t,e,n){t.stopPropagation(),this.customerConnectService.getConnectByAccId(e._id).subscribe(t=>{const i=this.translation.REMOVE_ACCOUNT;var o=this.translation.AUTH_REMOVE;t.activeCount>0?(o=this.translation.AUTH_REMOVE_FALSE,o=this.translation.AUTH_REMOVE_FALSE.replace(new RegExp("{Account_Name}","g"),e.accountName).replace(new RegExp("{Count}","g"),t.activeCount)):o=o.replace(new RegExp("{Account_Name}","g"),e.accountName),this.bsModalRef=this.modalService.show(bo,{initialState:{modelTitle:i,modelContent:o,modelConnectId:{id:e._id,index:n},translation:this.translation,modelConnectCount:t.activeCount}}),this.bsModalRef.content.onClose.subscribe(t=>{this.customerConnectService.disconnectApp(t.id).subscribe(e=>{e&&"OK"==e.message&&(this.triggerConnectAccountList.splice(t.index,1),this.getConnectedAccounts())}),this.bsModalRef.content.onClose.subscribe(t=>{this.customerConnectService.disconnectApp(t.id).subscribe(e=>{e&&"OK"==e.message&&(this.triggerConnectAccountList.splice(t.index,1),this.getConnectedAccounts())})})})})}getAllChildIndices(t){const e=[],n=[t];for(;n.length>0;){let t=n.shift(),i=this.connectList.find(e=>(null==e?void 0:e.index)==t);if(i&&i.childIndex&&i.childIndex.length>0)for(let o of i.childIndex)null!=o&&(e.push(o),n.push(o))}return e}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(co.s),o.Y36(yo),o.Y36(Fo),o.Y36(wo.v),o.Y36(mo.tT),o.Y36(lo.N),o.Y36(yo),o.Y36(o.sBO),o.Y36(ui.F0))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-app-account"]],viewQuery:function(t,e){if(1&t&&o.Gf(pV,5),2&t){let t;o.iGM(t=o.CRH())&&(e.dropdownMenu=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.onDocumentClick(t)},!1,o.evT)},inputs:{currentApp:"currentApp",translation:"translation",nodeType:"nodeType",connectId:"connectId",isTemplate:"isTemplate",singleClickTemplate:"singleClickTemplate",warningInfo:"warningInfo",connectList:"connectList"},outputs:{selectedApp:"selectedApp",beforeAccountChange:"beforeAccountChange",closeSetupOption:"closeSetupOption"}
vendor: 4,373 bytes, line 1
1,decls:44,vars:8,consts:[[1,"chooseapps","bg-white","px-0","border-top","border-0","px-0","rounded-0"],[1,"choose-trigger-event"],[1,"guide-flex"],["type","button","id","step_guide_Btn","tooltip","Guide","placement","top",1,"btn","step_guide"],["aria-hidden","true",1,"fa","fa-question-circle","fa-fw"],["id","aside_step_guide",1,"aside-step-guide","d-none"],[1,"guide-menu"],[1,"mar-0-l"],["type","button","title","Close Guide",1,"btn","closebtn-guide"],["aria-hidden","true",1,"fa","fa-times-circle-o","fa-fw","fa-lg"],[1,"scroll-guide"],[1,"guide-data"],[1,"step-listing","mar-15-t"],[1,"example"],[1,"icon_exmpl"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"exmpl-desc"],[1,"screenshot_img"],["src","/assets/images/img_guide_02.png","alt","img_guide_02"],["class","mar-10-b sample-accont",4,"ngIf"],["class","Dropdown_buttonWrap mar-10-b",4,"ngIf"],[1,"text-center"],["class","text-decoration-underline fw-bold","style","color: #5371FF;",3,"click",4,"ngIf"],["class","next-step",4,"ngIf"],["class","continue mt-auto",4,"ngIf"],[4,"ngIf"],[1,"mar-10-b","sample-accont"],[1,"service-icon-logo"],["alt","Gmail",3,"src"],["class","mb-0",4,"ngIf"],[1,"mb-0"],[1,"Dropdown_buttonWrap","mar-10-b"],["dropdownMenu",""],["role","presentation","id","ShowButtton_acnt_dropmenu",1,"keyInput",3,"ngClass","click"],[1,"input_icon","icon-before"],[1,"imgapps-icon","gmail32x32"],["type","button","aria-expanded","false","aria-haspopup","true","aria-label","",1,"Input_Val_Button"],[1,"Dropdown_buttonText"],["id","Gmailadd"],[1,"input_icon","icon-after"],["aria-hidden","true",1,"fa","fa-sort","fa-fw","fa-lg"],["class","tokenerror-msg mar-15-t",4,"ngIf"],["class","tokenerror-msg mar-15-t",3,"innerHTML",4,"ngIf"],["id","account_dropmenu",1,"account-selected","dropdown_menu",3,"ngClass"],[1,"dropdown_menu_header","d-flex","align-items-center","justify-content-between","w-100","gap-3","info-wrap","position-sticky","top-0","w-100"],[1,"theme-color","fw-semibold","mb-0"],[1,"dropdown_menu_body","scrollheight"],["class","form-checkbox mar-10-b",4,"ngFor","ngForOf"],[1,"continue","text-center","justify-content-center","dropdown_menu_footer",3,"click"],["type","button","data-track","connect an-other account","class","btn btn-lg w-50 account-connect",3,"click",4,"ngIf"],["type","button","data-track","connect an-other account","class","btn google-btn",3,"click",4,"ngIf"],[1,"tokenerror-msg","mar-15-t"],["type","button",3,"click"],[1,"tokenerror-msg","mar-15-t",3,"innerHTML"],[1,"form-checkbox","mar-10-b"],["data-track","select account","type","checkbox","name","radio","id","account#1","disabled","","value","New_Attachment",1,"form-check-input",3,"checked"],["for","account#1",1,"form-check-label",3,"click"],[1,"private","mar-5-b","d-flex","align-items-center","gap-2","flex-wrap"],[1,"si","si-lock"],[3,"ngClass"],["class","badge badge-account text-truncate",4,"ngIf"],[1,"delete-account"],["type","button",1,"btn","border-0","bg-transparent","p-2",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none"],["d","M15 5.00003L19 9.00003M17 3.00003C17.2547 2.69906 17.5697 2.45408 17.925 2.28071C18.2803 2.10733 18.6681 2.00936 19.0636 1.99304C19.4592 1.97672 19.8538 2.04241 20.2224 2.18591C20.5909 2.32942 20.9254 2.5476 21.2043 2.82655C21.4833 3.10549 21.7006 3.43909 21.8425 3.80607C21.9845 4.17305 22.0478 4.56536 22.0286 4.95801C22.0094 5.35065 21.908 5.73501 21.7309 6.08659C21.5538 6.43817 21.3049 6.74926 21 7.00003L7.5 20.5L2 22L3.5 16.5L17 3.00003Z","stroke","#5371FF","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","btn border-0 bg-transparent p-2","type","button",3,"click",4,"ngIf"],[1,"gmail-left"],[1,"dropdown","d-md-none","position-absolute","top-0","end-0","mt-2"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","bg-transparent","border-0","dropdown-toggle","p-1",3,"click"],["d","M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M12 20C12.5
1523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z","stroke","CurrentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"dropdown-menu","mobile-editnickname",3,"ngClass"],["type","button",1,"btn","border-0","bg-transparent","p-2","dropdown-item",3,"click"],[1,"badge","badge-account","text-truncate"],["d","M3 6H21M19 6V20C19 21 18 22 17 22H7C6 22 5 21 5 20V6M8 6V4C8 3 9 2 10 2H14C15 2 16 3 16 4V6M10 11V17M14 11V17","stroke","#F03630","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["class","btn border-0 bg-transparent p-2 dropdown-item text-danger","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","border-0","bg-transparent","p-2","dropdown-item","text-danger",3,"click"],["type","button","data-track","connect an-other account",1,"btn","btn-lg","w-50","account-connect",3,"click"],["type","button","data-track","connect an-other account",1,"btn","google-btn",3,"click"],["src","/assets/images/google-icon.png","alt","google","width","40","height","40"],[1,"text-decoration-underline","fw-bold",2,"color","#5371FF",3,"click"],[1,"next-step"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.99996 18.3337C14.6023 18.3337 18.3333 14.6027 18.3333 10.0003C18.3333 5.39795 14.6023 1.66699 9.99996 1.66699C5.39759 1.66699 1.66663 5.39795 1.66663 10.0003C1.66663 14.6027 5.39759 18.3337 9.99996 18.3337Z","stroke","#B2B2B2","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],["d","M10 5V10L13.3333 11.6667","stroke","#B2B2B2","stroke-width","1.2","stroke-linecap","round","stroke-linejoin","round"],[1,"continue","mt-auto"],["data-track","continue with account","type","button",1,"btn","btn-lg","w-100","mb-0",3,"disabled","click"],[1,"btngroup","w-100","cutomdropdown"],["type","button","data-track","continue",1,"btn","btn-lg","w-100","mr-0","border-start-0",3,"disabled","click"],[1,"dropdownmenu","w-100"],[1,"btn","btn-lg","conntacont-btn","w-100",3,"disabled","click"],["type","button","data-track","connect an-other account","class","btn btn-lg mb-0 w-100",3,"click",4,"ngIf"],["type","button","class","btn google-btn mb-0","data-track","connect an-other account",3,"click",4,"ngIf"],["type","button","data-track","connect an-other account",1,"btn","btn-lg","mb-0","w-100",3,"click"],["type","button","data-track","connect an-other account",1,"btn","google-btn","mb-0",3,"click"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"h4"),o._uU(4,"Connect Account:"),o.qZA(),o.TgZ(5,"button",3),o._UZ(6,"i",4),o.qZA(),o.qZA(),o.TgZ(7,"aside",5),o.TgZ(8,"div",6),o.TgZ(9,"span",7),o._uU(10,"GUIDE"),o.qZA(),o.TgZ(11,"button",8),o._UZ(12,"i",9),o.qZA(),o.qZA(),o.TgZ(13,"div",10),o.TgZ(14,"div",11),o.TgZ(15,"h3"),o._uU(16,"Choose your app account"),o.qZA(),o.TgZ(17,"div",12),o.TgZ(18,"ul"),o.TgZ(19,"li"),o._uU(20,"Click Connect an account and follow the instructions to connect your app to Appy Pie. "),o.qZA(),o.TgZ(21,"li"),o._uU(22,"Your selected account is active, so click continue to finish with your Trigger."),o.qZA(),o.qZA(),o.qZA(),o._UZ(23,"hr"),o.TgZ(24,"div",13),o.TgZ(25,"div",14),o.TgZ(26,"span"),o._UZ(27,"i",15),o.qZA(),o.TgZ(28,"h4"),o._uU(29,"Example"),o.qZA(),o.qZA(),o.TgZ(30,"div",16),o.TgZ(31,"p"),o._uU(32,"Your account gives you access to helpful features like Autofill, personalized recommendations, and much more."),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(33,"div",17),o._UZ(34,"img",18),o.qZA(),o.qZA(),o.qZA(),o.YNc(35,fV,5,3,"div",19),o.YNc(36,OV,24,15,"div",20),o.TgZ(37,"div",21),o.YNc(38,MV,2,0,"a",22),o.qZA(),o.qZA(),o.qZA(),o.YNc(39,IV,7,3,"div",23),o.YNc(40,SV,3,1,"div",24),o.YNc(41,PV,8,2,"div",24),o.YNc(42,UV,3,2,"div",24),o.YNc(43,EV,1,0,"app-loader",25)),2&t&&(o.xp6(35),o.Q6J("ngIf",!e.triggerConnectAccountList),o.xp6(1),o.Q6J("ngIf",e.triggerConnectAccountList),o.xp6(2),o.Q6J("ngIf",!e.isPublicUser),o.xp6(1),o.Q6J("ngIf",!1),o.xp6(1),o.Q6J("ngIf",e.triggerConnectAccountList&&(e.isOption()||"trigger"!==e.currentApp.nodeType)),o.xp6(1),o.Q6J("ngIf",e.triggerConnectAccountList&&!e.isOption()&&"trigger"===e.currentApp.nodeType&&"webhookUrl"!==e.currentApp.triggerType),o.xp6(1),o.Q6J("ngIf",!e.triggerConnectAccountList),o.xp6(1),o.Q6J("ngIf",e.testloader))},directives:[tr,to.O5,to.mk,to.sg,po],pipes:[to.uU,to.rS],styles:[".modal-content{position:relative;display:flex;flex-direction:column;width:100%;padding:15px;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:15px;outline:0}.badge-account{border-radius:40px;background:#E6F1FF;color:#5371ff;font-size:12px;font-weight:600;max-width:290px;flex:1 1 auto;text-align:start;width:100%}.dropdown-menu.mobile-editnickname{border-radius:10px;border:1px solid #B5CDE6;background:#FAFDFF;display:none;min-width:10em}.dropdown-menu.mobile-editnickname .btn{color:#0f1035;text-align:center;font-size:12px;font-weight:400}.dropdown-menu.mobile-editnickname>li{border:0}.dropdown-menu.mobile-editnickname>
1li:not(:first-child){border-top:0px solid #B5CDE6}.dropdown-menu.mobile-editnickname>li:not(:last-child){border-bottom:1px solid #B5CDE6}#account_dropmenu .dropdown_menu_header{display:none!important}.continue .btn.account-connect{width:399px!important}@media (max-width:767px){.badge-account{max-width:80px}}\n"],encapsulation:2}),t})(),DV=(()=>{let t=class{constructor(t){this.zone=t}initScrollbar(t,e){const n=this.getElement(t);this.zone.runOutsideAngular(()=>n.mCustomScrollbar(e)),n.length>0&&"BODY"===n[0].tagName&&(n[0].style.position="absolute",n[0].style.overflow="auto",n[0].style.height="100vh",n[0].style.width="100vw")}scrollTo(t,e,n){this.zone.runOutsideAngular(()=>this.getElement(t).mCustomScrollbar("scrollTo",e,n))}update(t){this.zone.runOutsideAngular(()=>this.getElement(t).mCustomScrollbar("update"))}stop(t){this.zone.runOutsideAngular(()=>this.getElement(t).mCustomScrollbar("stop"))}disable(t,e){this.zone.runOutsideAngular(()=>this.getElement(t).mCustomScrollbar("disable",!!e))}destroy(t){this.zone.runOutsideAngular(()=>this.getElement(t).mCustomScrollbar("destroy"))}getElement(t){if("string"==typeof t||"object"==typeof t&&t instanceof HTMLElement)return $(t);if(t instanceof jQuery||"jquery"in Object(t))return t;throw Error(`Unsupported element type in MalihuScrollbarService: ${t}`)}};return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.R0b))},t.\u0275prov=o.Yz7({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();var LV;let JV=LV=class{static forRoot(){return{ngModule:LV,providers:[DV]}}static forChild(){return{ngModule:LV}}};function jV(){return"undefined"!=typeof window&&void 0!==window.document}function RV(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function $V(t){switch(t.length){case 0:return new lc;case 1:return t[0];default:return new dc(t)}}function BV(t,e,n,i,o={},r={}){const s=[],a=[];let c=-1,l=null;if(i.forEach(t=>{const n=t.offset,i=n==c,d=i&&l||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,s),a){case"!":a=o[n];break;case Xa:a=r[n];break;default:a=e.normalizeStyleValue(n,i,a,s)}d[i]=a}),i||a.push(d),l=d,c=n}),s.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${s.join(t)}`)}return a}function HV(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&QV(n,"start",t)));break;case"done":t.onDone(()=>i(n&&QV(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&QV(n,"destroy",t)))}}function QV(t,e,n){const i=n.totalTime,o=YV(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),r=t._data;return null!=r&&(o._data=r),o}function YV(t,e,n,i,o="",r=0,s){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:o,totalTime:r,disabled:!!s}}function zV(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function VV(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}JV.\u0275fac=function(t){return new(t||JV)},JV.\u0275mod=o.oAB({type:JV}),JV.\u0275inj=o.cJS({});let GV=(t,e)=>!1,WV=(t,e)=>!1,KV=(t,e,n)=>[];const XV=RV();(XV||"undefined"!=typeof Element)&&(GV=jV()?(t,e)=>{for(;e&&e!==document.documentElement;){if(e===t)return!0;e=e.parentNode||e.host}return!1}:(t,e)=>t.contains(e),WV=(()=>{if(XV||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):WV}})(),KV=(t,e,n)=>{let i=[];if(n){const n=t.querySelectorAll(e);for(let t=0;t<n.length;t++)i.push(n[t])}else{const n=t.querySelector(e);n&&i.push(n)}return i});let tG=null,eG=!1;function nG(t){tG||(tG=("undefined"!=typeof document?document.body:null)||{},eG=!!tG.style&&"WebkitAppearance"in tG.style);let e=!0;return tG.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in tG.style,!e&&eG&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in tG.style)),e}const iG=WV,oG=GV,rG=KV;function sG(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let aG=(()=>{class t{validateStyleProperty(t){return nG(t)}matchesElement(t,e){return iG(t,e)}containsElement(t,e){return oG(t,e)}query(t,e,n){return rG(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,o,r=[],s){return new lc(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})(),cG=(()=>{class t{}return t.NOOP=new aG,t})();const lG="ng-enter",dG="ng-leave",uG="ng-trigger",pG=".ng-trigger",hG="ng-animating",gG=".ng-animating";function fG(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:mG(parseFloat(e[1]),e[2])}function mG(t,e){return"s"===e?1e3*t:t}function vG(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,o=0,r="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}
1" is invalid.`),{duration:0,delay:0,easing:""};i=mG(parseFloat(n[1]),n[2]);const s=n[3];null!=s&&(o=mG(parseFloat(s),n[4]));const a=n[5];a&&(r=a)}else i=t;if(!n){let n=!1,r=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),o<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(r,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:o,easing:r}}(t,e,n)}function bG(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function xG(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else bG(t,n);return n}function _G(t,e,n){return n?e+":"+n+";":""}function CG(t){let e="";for(let n=0;n<t.style.length;n++){const i=t.style.item(n);e+=_G(0,i,t.style.getPropertyValue(i))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=_G(0,SG(n),t.style[n]));t.setAttribute("style",e)}function wG(t,e,n){t.style&&(Object.keys(e).forEach(i=>{const o=IG(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[o]),t.style[o]=e[i]}),RV()&&CG(t))}function yG(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=IG(e);t.style[n]=""}),RV()&&CG(t))}function AG(t){return Array.isArray(t)?1==t.length?t[0]:nc(t):t}const ZG=new RegExp("{{\\s*(.+?)\\s*}}","g");function kG(t){let e=[];
1if("string"==typeof t){let n;for(;n=ZG.exec(t);)e.push(n[1]);ZG.lastIndex=0}return e}function TG(t,e,n){const i=t.toString(),o=i.replace(ZG,(t,i)=>{let o=e[i];return e.hasOwnProperty(i)||(n.push(`Please provide a value for the animation param ${i}`),o=""),o.toString()});return o==i?t:o}function OG(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const MG=/-+([a-z0-9])/g;function IG(t){return t.replace(MG,(...t)=>t[1].toUpperCase())}function SG(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function PG(t,e){return 0===t||0===e}function NG(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let r=e[0],s=[];if(i.forEach(t=>{r.hasOwnProperty(t)||s.push(t),r[t]=n[t]}),s.length)for(var o=1;o<e.length;o++){let n=e[o];s.forEach(function(e){n[e]=UG(t,e)})}}return e}function qG(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function UG(t,e){return window.getComputedStyle(t)[e]}function EG(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const o=i[1],r=i[2],s=i[3];e.push(LG(o,s));"<"==r[0]&&!("*"==o&&"*"==s)&&e.push(LG(s,o))}(t,n,e)):n.push(t),n}const FG=new Set(["true","1"]),DG=new Set(["false","0"]);function LG(t,e){const n=FG.has(t)||DG.has(t),i=FG.has(e)||DG.has(e);return(o,r)=>{let s="*"==t||t==o,a="*"==e||e==r;return!s&&n&&"boolean"==typeof o&&(s=o?FG.has(t):DG.has(t)),!a&&i&&"boolean"==typeof r&&(a=r?FG.has(e):DG.has(e)),s&&a}}const JG=new RegExp("s*:selfs*,?","g");function jG(t,e,n){return new RG(t).build(e,n)}class RG{constructor(t){this._driver=t}build(t,e){const n=new $G(e);return this._resetContextStyleTimingState(n),qG(this,AG(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const o=[],r=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,o.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const o=this.visitTransition(t,e);n+=o.queryCount,i+=o.depCount,r.push(o)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:o,transitions:r,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const o=new Set,r=i||{};if(n.styles.forEach(t=>{if(BG(t)){const e=t;Object.keys(e).forEach(t=>{kG(e[t]).forEach(t=>{r.hasOwnProperty(t)||o.add(t)})})}}),o.size){const n=OG(o.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=qG(this,AG(t.animation),e);return{type:1,matchers:EG(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:HG(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>qG(this,t,e)),options:HG(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const o=t.steps.map(t=>{e.currentTime=n;const o=qG(this,t,e);return i=Math.max(i,e.currentTime),o});return e.currentTime=i,{type:3,steps:o,options:HG(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return QG(vG(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=QG(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||vG(i,e),QG(n.duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let i,o=t.styles?t.styles:ic({});if(5==o.type)i=this.visitKeyframes(o,e);else{let o=t.styles,r=!1;if(!o){r=!0;const t={};n.easing&&(t.easing=n.easing),o=ic(t)}e.currentTime+=n.duration+n.delay;const s=this.visitStyle(o,e);s.isEmptyStep=r,i=s}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);
1return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==Xa?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,o=null;return n.forEach(t=>{if(BG(t)){const e=t,n=e.easing;if(n&&(o=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:o,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,o=e.currentTime;n&&o>0&&(o-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const r=e.collectedStyles[e.currentQuerySelector],s=r[n];let a=!0;s&&(o!=i&&o>=s.startTime&&i<=s.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${s.startTime}ms" and "${s.endTime}ms" is also being animated in a parallel animation between the times of "${o}ms" and "${i}ms"`),a=!1),o=s.startTime),a&&(r[n]={startTime:o,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},o=kG(t);o.length&&o.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const o=[];let r=!1,s=!1,a=0;const c=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let c=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(BG(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(BG(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),l=0;return null!=c&&(i++,l=n.offset=c),s=s||l<0||l>1,r=r||l<a,a=l,o.push(l),n});s&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),r&&e.errors.push("Please ensure that all keyframe offsets are in order");const l=t.steps.length;let d=0;i>0&&i<l?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(d=1/(l-1));const u=l-1,p=e.currentTime,h=e.currentAnimateTimings,g=h.duration;return c.forEach((t,i)=>{const r=d>0?i==u?1:d*i:o[i],s=r*g;e.currentTime=p+h.delay+s,h.duration=s,this._validateStyleAst(t,e),t.offset=r,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:qG(this,AG(t.animation),e),options:HG(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:HG(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:HG(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[o,r]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(JG,"")),t=t.replace(/@\*/g,pG).replace(/@\w+/g,t=>pG+"-"+t.substr(1)).replace(/:animating/g,gG),[t,e]}(t.selector);e.currentQuerySelector=n.length?n+" "+o:o,zV(e.collectedStyles,e.currentQuerySelector,{});const s=qG(this,AG(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:r,animation:s,originalSelector:t.selector,options:HG(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:vG(t.timings,e.errors,!0);return{type:12,animation:qG(this,AG(t.animation),e),timings:n,options:null}}}class $G{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function BG(t){return!Array.isArray(t)&&"object"==typeof t}function HG(t){return t?(t=bG(t)).params&&(t.params=function(t){return t?bG(t):null}(t.params)):t={},t}function QG(t,e,n){return{duration:t,delay:e,easing:n}}function YG(t,e,n,i,o,r,s=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:o,delay:r,totalTime:o+r,easing:s,subTimeline:a}}class zG{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const VG=new RegExp(":enter","g"),GG=new RegExp(":leave","g");function WG(t,e,n,i,o,r={},s={},a,c,l=[]){return(new KG).buildKeyframes(t,e,n,i,o,r,s,a,c,l)}class KG{buildKeyframes(t,e,n,i,o,r,s,a,c,l=[]){c=c||new zG;const d=new tW(t,e,c,i,o,l,[]);d.options=a,d.currentTimeline.setStyles([r],null,d.errors,a),qG(this,n,d);const u=d.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(s).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([s],null,d.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[YG(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}
vendor: 3,154 bytes, line 1
1visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),o=e.currentTimeline.currentTime,r=this._visitSubInstructions(n,i,i.options);o!=r&&e.transformIntoNewTimeline(r)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const o=null!=n.duration?fG(n.duration):null,r=null!=n.delay?fG(n.delay):null;return 0!==o&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,o,r);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),qG(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const o=t.options;if(o&&(o.params||o.delay)&&(i=e.createSubContext(o),i.transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=XG);const t=fG(o.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>qG(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?fG(t.options.delay):0;t.steps.forEach(r=>{const s=e.createSubContext(t.options);o&&s.delayNextStep(o),qG(this,r,s),i=Math.max(i,s.currentTimeline.currentTime),n.push(s.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return vG(e.params?TG(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(n.duration),this.visitStyle(o,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const o=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(o):n.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,o=n.duration,r=e.createSubContext().currentTimeline;r.easing=n.easing,t.styles.forEach(t=>{r.forwardTime((t.offset||0)*o),r.setStyles(t.styles,t.easing,e.errors,e.options),r.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(r),e.transformIntoNewTimeline(i+o),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?fG(i.delay):0;o&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=XG);let r=n;const s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=s.length;let a=null;
1s.forEach((n,i)=>{e.currentQueryIndex=i;const s=e.createSubContext(t.options,n);o&&s.delayNextStep(o),n===e.element&&(a=s.currentTimeline),qG(this,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),r=Math.max(r,s.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(r),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,o=t.timings,r=Math.abs(o.duration),s=r*(e.currentQueryTotal-1);let a=r*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}const c=e.currentTimeline;a&&c.delayNextStep(a);const l=c.currentTime;qG(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-l+(i.startTime-n.currentTimeline.startTime)}}const XG={};class tW{constructor(t,e,n,i,o,r,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=o,this.errors=r,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=XG,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new eW(this._driver,e,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=fG(n.duration)),null!=n.delay&&(i.delay=fG(n.delay));const o=n.params;if(o){let t=i.params;t||(t=this.options.params={}),Object.keys(o).forEach(n=>{(!e||!t.hasOwnProperty(n))&&(t[n]=TG(o[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,o=new tW(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=XG,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},o=new nW(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,o,r){let s=[];if(i&&s.push(this.element),t.length>0){t=(t=t.replace(VG,"."+this._enterClassName)).replace(GG,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),s.push(...e)}return!o&&0==s.length&&r.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),s}}class eW{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pe
1ndingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new eW(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||Xa,this._currentKeyframe[t]=Xa}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const o=i&&i.params||{},r=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]=Xa})):xG(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(r).forEach(t=>{const e=TG(r[t],o,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:Xa),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((o,r)=>{const s=xG(o,!0);Object.keys(s).forEach(n=>{const i=s[n];"!"==i?t.add(n):i==Xa&&e.add(n)}),n||(s.offset=r/this.duration),i.push(s)});const o=t.size?OG(t.values()):[],r=e.size?OG(e.values()):[];if(n){const t=i[0],e=bG(t);t.offset=0,e.offset=1,i=[t,e]}return YG(this.element,i,o,r,this.duration,this.startTime,this.easing,!1)}}class nW extends eW{constructor(t,e,n,i,o,r,s=!1){super(t,e,r.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],r=n+e,s=e/r,a=xG(t[0],!1);a.offset=0,o.push(a);const c=xG(t[0],!1);c.offset=iW(s),o.push(c);const l=t.length-1;for(let i=1;i<=l;i++){let s=xG(t[i],!1);s.offset=iW((e+s.offset*n)/r),o.push(s)}n=r,e=0,i="",t=o}return YG(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function iW(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class oW{}class rW extends oW{normalizePropertyName(t,e){return IG(t)}normalizeStyleValue(t,e,n,i){let o="";const r=n.toString().trim();if(sW[e]&&0!==n&&"0"!==n)if("number"==typeof n)o="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return r+o}}const sW=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function aW(t,e,n,i,o,r,s,a,c,l,d,u,p){return{type:0,element:t,triggerName:e,isRemovalTransition:o,fromState:n,fromStyles:r,toState:i,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:p}}const cW={};class lW{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,o){return t.some(t=>t(e,n,i,o))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],o=this._stateStyles[t],r=i?i.buildStyles(e,n):{};return o?o.buildStyles(e,n):r}build(t,e,n,i,o,r,s,a,c,l){const d=[],u=this.ast.options&&this.ast.options.params||cW,p=this.buildStyles(n,s&&s.params||cW,d),h=a&&a.params||cW,g=this.buildStyles(i,h,d),f=new Set,m=new Map,v=new Map,b="void"===i,x={params:Object.assign(Object.assign({},u),h)},_=l?[]:WG(t,e,this.ast.animation,o,r,p,g,x,c,d);let C=0;if(_.forEach(t=>{C=Math.max(t.duration+t.delay,C)}),d.length)return aW(e,this._triggerName,n,i,b,p,g,[],[],m,v,C,d);_.forEach(t=>{const n=t.element,i=zV(m,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const o=zV(v,n,{});t.postStyleProps.forEach(t=>o[t]=!0),n!==e&&f.add(n)});const w=OG(f.values());return aW(e,this._triggerName,n,i,b,p,g,_,w,m,v,C)}}class dW{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n={},i=bG(this.defaultParams);
1return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const o=t;Object.keys(o).forEach(t=>{let r=o[t];r.length>1&&(r=TG(r,i,e));const s=this.normalizer.normalizePropertyName(t,e);r=this.normalizer.normalizeStyleValue(t,s,r,e),n[s]=r})}}),n}}class uW{constructor(t,e,n){this.name=t,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new dW(t.style,t.options&&t.options.params||{},n)}),pW(this.states,"true","1"),pW(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new lW(t,e,this.states))}),this.fallbackTransition=function(t,e,n){return new lW(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},e)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(o=>o.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function pW(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const hW=new zG;class gW{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=jG(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,o=BV(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],o=this._animations[t];let r;const s=new Map;if(o?(r=WG(this._driver,e,o,lG,dG,{},{},n,hW,i),r.forEach(t=>{const e=zV(s,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),r=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);s.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,Xa)})});const a=$V(r.map(t=>{const e=s.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,i){const o=YV(e,"","","");return HV(this._getPlayer(t),n,o,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const o=this._getPlayer(t);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const fW="ng-animate-queued",mW="ng-animate-disabled",vW=".ng-animate-disabled",bW=[],xW={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},_W={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},CW="__ng_removed";class wW{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){const e=bG(t);delete e.value,this.options=e}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const yW="void",AW=new wW(yW);class ZW{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"
1+t,NW(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if(!function(t){return"start"==t||"done"==t}(n))throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);const o=zV(this._elementListeners,t,[]),r={name:e,phase:n,callback:i};o.push(r);const s=zV(this._engine.statesByElement,t,{});return s.hasOwnProperty(e)||(NW(t,uG),NW(t,uG+"-"+e),s[e]=AW),()=>{this._engine.afterFlush(()=>{const t=o.indexOf(r);t>=0&&o.splice(t,1),this._triggers[e]||delete s[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const o=this._getTrigger(e),r=new TW(this.id,e,t);let s=this._engine.statesByElement.get(t);s||(NW(t,uG),NW(t,uG+"-"+e),this._engine.statesByElement.set(t,s={}));let a=s[e];const c=new wW(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&c.absorbOptions(a.options),s[e]=c,a||(a=AW),c.value!==yW&&a.value===c.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,c.params)){const e=[],n=o.matchStyles(a.value,a.params,e),i=o.matchStyles(c.value,c.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{yG(t,n),wG(t,i)})}return}const l=zV(this._engine.playersByElement,t,[]);l.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let d=o.matchTransition(a.value,c.value,t,c.params),u=!1;if(!d){if(!i)return;d=o.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:a,toState:c,player:r,isFallbackTransition:u}),u||(NW(t,fW),r.onStart(()=>{qW(t,fW)})),r.onDone(()=>{let e=this.players.indexOf(r);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(r);t>=0&&n.splice(t,1)}}),this.players.push(r),l.push(r),r}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,pG,!0);n.forEach(t=>{if(t[CW])return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const o=this._engine.statesByElement.get(t);if(o){const r=[];if(Object.keys(o).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,yW,i);n&&r.push(n)}}),r.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&$V(r).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),n=this._engine.statesByElement.get(t);if(e&&n){const i=new Set;e.forEach(e=>{const o=e.name;if(i.has(o))return;i.add(o);const r=this._triggers[o].fallbackTransition,s=n[o]||AW,a=new wW(yW),c=new TW(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:r,fromState:s,toState:a,player:c,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t[CW];(!i||i===xW)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){NW(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const o=n.element,r=this._elementListeners.get(o);
1r&&r.forEach(e=>{if(e.name==n.triggerName){const i=YV(o,n.triggerName,n.fromState.value,n.toState.value);i._data=t,HV(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class kW{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new ZW(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let o=n;o>=0;o--)if(this.driver.containsElement(this._namespaceList[o].hostElement,e)){this._namespaceList.splice(o+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const o=n[t[i]].namespaceId;if(o){const t=this._fetchNamespace(o);t&&e.add(t)}}}return e}trigger(t,e,n,i){if(OW(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!OW(e))return;const o=e[CW];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),NW(t,mW)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),qW(t,mW))}removeNode(t,e,n,i){if(OW(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e[CW]={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,o){return OW(e)?this._fetchNamespace(t).listen(e,n,i,o):()=>{}}_buildInstruction(t,e,n,i,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,pG,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,gG,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return $V(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[CW];if(e&&e.setForRemoval){if(t[CW]=xW,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,vW)&&this.markElementAsDisabled(t,!1),this.driver.query(t,vW,!0).forEac
vendor: 2,290 bytes, line 1
1h(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)NW(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?$V(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new zG,i=[],o=new Map,r=[],s=new Map,a=new Map,c=new Map,l=new Set;this.disabledNodes.forEach(t=>{l.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)l.add(e[n])});const d=this.bodyNode,u=Array.from(this.statesByElement.keys()),p=SW(u,this.collectedEnterElements),h=new Map;let g=0;p.forEach((t,e)=>{const n=lG+g++;h.set(e,n),t.forEach(t=>NW(t,n))});const f=[],m=new Set,v=new Set;for(let I=0;I<this.collectedLeaveElements.length;I++){const t=this.collectedLeaveElements[I],e=t[CW];e&&e.setForRemoval&&(f.push(t),m.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>m.add(t)):v.add(t))}const b=new Map,x=SW(u,Array.from(m));x.forEach((t,e)=>{const n=dG+g++;b.set(e,n),t.forEach(t=>NW(t,n))}),t.push(()=>{p.forEach((t,e)=>{const n=h.get(e);t.forEach(t=>qW(t,n))}),x.forEach((t,e)=>{const n=b.get(e);t.forEach(t=>qW(t,n))}),f.forEach(t=>{this.processLeaveNode(t)})});const _=[],C=[];for(let I=this._namespaceList.length-1;I>=0;I--)this._namespaceList[I].drainQueuedTransitions(e).forEach(t=>{const e=t.player,o=t.element;if(_.push(e),this.collectedEnterElements.length){const t=o[CW];if(t&&t.setForMove)return void e.destroy()}
1const l=!d||!this.driver.containsElement(d,o),u=b.get(o),p=h.get(o),g=this._buildInstruction(t,n,p,u,l);if(g.errors&&g.errors.length)C.push(g);else{if(l)return e.onStart(()=>yG(o,g.fromStyles)),e.onDestroy(()=>wG(o,g.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>yG(o,g.fromStyles)),e.onDestroy(()=>wG(o,g.toStyles)),void i.push(e);g.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(o,g.timelines),r.push({instruction:g,player:e,element:o}),g.queriedElements.forEach(t=>zV(s,t,[]).push(e)),g.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),g.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=c.get(e);i||c.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(C.length){const t=[];C.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),_.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,y=new Map;r.forEach(t=>{const e=t.element;n.has(e)&&(y.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}
vendor: 1,102 bytes, line 1
1),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{zV(w,e,[]).push(t),t.destroy()})});const A=f.filter(t=>FW(t,a,c)),Z=new Map;IW(Z,this.driver,v,c,Xa).forEach(t=>{FW(t,a,c)&&A.push(t)});const k=new Map;p.forEach((t,e)=>{IW(k,this.driver,new Set(t),a,"!")}),A.forEach(t=>{const e=Z.get(t),n=k.get(t);Z.set(t,Object.assign(Object.assign({},e),n))});const T=[],O=[],M={};r.forEach(t=>{const{element:e,player:r,instruction:s}=t;if(n.has(e)){if(l.has(e))return r.onDestroy(()=>wG(e,s.toStyles)),r.disabled=!0,r.overrideTotalTime(s.totalTime),void i.push(r);let t=M;if(y.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=y.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>y.set(e,t))}const n=this._buildAnimation(r.namespaceId,s,w,o,k,Z);if(r.setRealPlayer(n),t===M)T.push(r);else{const e=this.playersByElement.get(t);e&&e.length&&(r.parentPlayer=$V(e)),i.push(r)}}else yG(e,s.fromStyles),r.onDestroy(()=>wG(e,s.toStyles)),O.push(r),l.has(e)&&i.push(r)}),O.forEach(t=>{const e=o.get(t.element);if(e&&e.length){const n=$V(e);t.setRealPlayer(n)}}
1),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let I=0;I<f.length;I++){const t=f[I],e=t[CW];if(qW(t,dG),e&&e.hasAnimation)continue;let n=[];if(s.size){let e=s.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,gG,!0);for(let t=0;t<i.length;t++){let e=s.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?UW(this,t,i):this.processLeaveNode(t)}return f.length=0,T.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),T}elementContainsData(t,e){let n=!1;const i=e[CW];return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,o){let r=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(r=e)}else{const e=this.playersByElement.get(t);if(e){const t=!o||o==yW;e.forEach(e=>{e.queued||!t&&e.triggerName!=i||r.push(e)})}}return(n||i)&&(r=r.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),r}_beforeAnimationBuild(t,e,n){const i=e.element,o=e.isRemovalTransition?void 0:t,r=e.isRemovalTransition?void 0:e.triggerName;for(const s of e.timelines){const t=s.element,a=t!==i,c=zV(n,t,[]);this._getPreviousPlayers(t,a,o,r,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),c.push(t)})}yG(i,e.fromStyles)}_buildAnimation(t,e,n,i,o,r){const s=e.triggerName,a=e.element,c=[],l=new Set,d=new Set,u=e.timelines.map(e=>{const u=e.element;l.add(u);const p=u[CW];if(p&&p.removedBeforeQueried)return new lc(e.duration,e.delay);const h=u!==a,g=function(t){const e=[];return EW(t,e),e}((n.get(u)||bW).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),f=o.get(u),m=r.get(u),v=BV(0,this._normalizer,0,e.keyframes,f,m),b=this._buildPlayer(e,v,g);if(e.subTimeline&&i&&d.add(u),h){const e=new TW(t,s,u);e.setRealPlayer(b),c.push(e)}return b});c.forEach(t=>{zV(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),l.forEach(t=>NW(t,hG));const p=$V(u);return p.onDestroy(()=>{l.forEach(t=>qW(t,hG)),wG(a,e.toStyles)}),d.forEach(t=>{zV(i,t,[]).push(p)}),p}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new lc(t.duration,t.delay)}}class TW{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new lc,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEac
1h(e=>{this._queuedCallbacks[e].forEach(n=>HV(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){zV(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function OW(t){return t&&1===t.nodeType}function MW(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function IW(t,e,n,i,o){const r=[];n.forEach(t=>r.push(MW(t)));const s=[];i.forEach((n,i)=>{const r={};n.forEach(t=>{const n=r[t]=e.computeStyle(i,t,o);(!n||0==n.length)&&(i[CW]=_W,s.push(i))}),t.set(i,r)});let a=0;return n.forEach(t=>MW(t,r[a++])),s}function SW(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),o=new Map;function r(t){if(!t)return 1;let e=o.get(t);if(e)return e;const s=t.parentNode;return e=n.has(s)?s:i.has(s)?1:r(s),o.set(t,e),e}return e.forEach(t=>{const e=r(t);1!==e&&n.get(e).push(t)}),n}const PW="$$classes";function NW(t,e){if(t.classList)t.classList.add(e);else{let n=t[PW];n||(n=t[PW]={}),n[e]=!0}}function qW(t,e){if(t.classList)t.classList.remove(e);else{let n=t[PW];n&&delete n[e]}}function UW(t,e,n){$V(n).onDone(()=>t.processLeaveNode(e))}function EW(t,e){for(let n=0;n<t.length;n++){const i=t[n];i instanceof dc?EW(i.players,e):e.push(i)}}function FW(t,e,n){const i=n.get(t);if(!i)return!1;let o=e.get(t);return o?i.forEach(t=>o.add(t)):e.set(t,i),n.delete(t),!0}class DW{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new kW(t,e,n),this._timelineEngine=new gW(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,o){const r=t+"-"+i;let s=this._triggerCache[r];if(!s){const t=[],e=jG(this._driver,o,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);s=function(t,e,n){return new uW(t,e,n)}(i,e,this._normalizer),this._triggerCache[r]=s}this._transitionEngine.registerTrigger(e,i,s)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,o]=VV(n);this._timelineEngine.command(t,e,o,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,o){if("@"==n.charAt(0)){const[t,i]=VV(n);return this._timelineEngine.listen(t,e,i,o)}return this._transitionEngine.listen(t,e,n,i,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function LW(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=jW(e[0]),e.length>1&&(i=jW(e[e.length-1]))):e&&(n=jW(e)),n||i?new JW(t,n,i):null}let JW=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o={}),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&wG(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(wG(this._element,this._initialStyles),this._endStyles&&(wG(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(yG(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(yG(this._element,this._endStyles),this._endStyles=null),wG(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function jW(t){let e=null;const n=Object.keys(t);for(let i=0;i<n.length;i++){const o=n[i];
1RW(o)&&(e=e||{},e[o]=t[o])}return e}function RW(t){return"display"===t||"position"===t}const $W="animation",BW="animationend";class HW{constructor(t,e,n,i,o,r,s){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=o,this._fillMode=r,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){(function(t,e){const n=WW(t,"").trim();let i=0;n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++;return n}(n)+1,e=`${n}, ${e}`),GW(t,"",e)})(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),VW(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){QW(this._element,this._name,"paused")}resume(){QW(this._element,this._name,"running")}setPosition(t){const e=YW(this._element,this._name);this._position=t*this._duration,GW(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),VW(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=WW(t,"").split(","),i=zW(n,e);i>=0&&(n.splice(i,1),GW(t,"",n.join(",")))}(this._element,this._name))}}function QW(t,e,n){GW(t,"PlayState",n,YW(t,e))}function YW(t,e){const n=WW(t,"");return n.indexOf(",")>0?zW(n.split(","),e):zW([n],e)}function zW(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function VW(t,e,n){n?t.removeEventListener(BW,e):t.addEventListener(BW,e)}function GW(t,e,n,i){const o=$W+e;if(null!=i){const e=t.style[o];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[o]=n}function WW(t,e){return t.style[$W+e]||""}class KW{constructor(t,e,n,i,o,r,s,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=o,this._finalStyles=s,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=r||"linear",this.totalTime=i+o,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new HW(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:UG(this.element,n))})}this.currentSnapshot=t}}class XW extends lc{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=sG(e)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEac
1h(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class tK{constructor(){this._count=0}validateStyleProperty(t){return nG(t)}matchesElement(t,e){return iG(t,e)}containsElement(t,e){return oG(t,e)}query(t,e,n){return rG(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>sG(t));let i=`@keyframes ${e} {\n`,o="";n.forEach(t=>{o=" ";const e=parseFloat(t.offset);i+=`${o}${100*e}% {\n`,o+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${o}animation-timing-function: ${n};\n`));default:return void(i+=`${o}${e}: ${n};\n`)}}),i+=`${o}}\n`}),i+="}\n";const r=document.createElement("style");return r.textContent=i,r}animate(t,e,n,i,o,r=[],s){const a=r.filter(t=>t instanceof KW),c={};PG(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const l=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"==n||"easing"==n||(e[n]=t[n])})}),e}(e=NG(t,e,c));if(0==n)return new XW(t,l);const d="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,d,e);(function(t){var e;const n=null===(e=t.getRootNode)||void 0===e?void 0:e.call(t);return"undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot?n:document.head})(t).appendChild(u);const p=LW(t,e),h=new KW(t,e,d,n,i,o,l,p);return h.onDestroy(()=>function(t){t.parentNode.removeChild(t)}(u)),h}}class eK{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:UG(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class nK{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(iK().toString()),this._cssKeyframesDriver=new tK}validateStyleProperty(t){return nG(t)}matchesElement(t,e){return iG(t,e)}containsElement(t,e){return oG(t,e)}query(t,e,n){return rG(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,o,r=[],s){if(!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,o,r);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};o&&(a.easing=o);const c={},l=r.filter(t=>t instanceof eK);PG(n,i)&&l.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const d=LW(t,e=NG(t,e=e.map(t=>xG(t,!1)),c));return new eK(t,e,a,d)}}function iK(){return jV()&&Element.prototype.animate||{}}let oK=(()=>
1{class t extends Ka{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:o.ifc.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?nc(t):t;return aK(this._renderer,null,e,"register",[n]),new rK(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.FYo),o.LFG(to.K0))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();class rK extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new sK(this._id,t,e||{},this._renderer)}}class sK{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return aK(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function aK(t,e,n,i,o){return t.setProperty(e,`@@${n}:${i}`,o)}const cK="@.disabled";let lK=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new dK("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,o=e.id+"-"+this._currentId;this._currentId++,this.engine.register(o,t);const r=e=>{Array.isArray(e)?e.forEach(r):this.engine.registerTrigger(i,o,t,e.name,e)};return e.data.animation.forEach(r),new uK(this,o,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(o.FYo),o.LFG(DW),o.LFG(o.R0b))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();class dK{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,i=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&e==cK?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class uK extends dK{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&e==cK?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if("@"==e.charAt(0)){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let o=e.substr(1),r="";return"@"!=o.charAt(0)&&([o,r]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}
1(o)),this.engine.listen(this.namespaceId,i,o,r,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let pK=(()=>{class t extends DW{constructor(t,e,n){super(t.body,e,n)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(to.K0),o.LFG(cG),o.LFG(oW))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac}),t})();const hK=new o.OlP("AnimationModuleType"),gK=[{provide:Ka,useClass:oK},{provide:oW,useFactory:function(){return new rW}},{provide:DW,useClass:pK},{provide:o.FYo,useFactory:function(t,e,n){return new lK(t,e,n)},deps:[i.se,DW,o.R0b]}],fK=[{provide:cG,useFactory:function(){return"function"==typeof iK()?new nK:new tK}},{provide:hK,useValue:"BrowserAnimations"},...gK],mK=[{provide:cG,useClass:aG},{provide:hK,useValue:"NoopAnimations"},...gK];let vK=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?mK:fK}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({providers:fK,imports:[i.b2]}),t})();function bK(t,e){1&t&&(o.TgZ(0,"span",10),o._uU(1,"(Optional)"),o.qZA())}function xK(t,e){if(1&t&&(o.ynx(0),o._UZ(1,"span",15),o.BQk()),2&t){const t=o.oxw().$implicit,e=o.oxw(3);o.xp6(1),o.Udp("background-image","url("+(e.connectList[t.realIndex]?e.appyConfig.cdnMediaPath+e.connectList[t.realIndex].image:null!=t.nodeIndex&&null!=t.nodeIndex?e.appyConfig.cdnMediaPath+e.connectList[t.nodeIndex].image:e.appyConfig.cdnMediaPath+e.currentApp.image)+")")}}function _K(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",16),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw().index,i=o.oxw(2).index;return o.oxw().onViewMoreClicked(e,i.toString()+n.toString())}),o._uU(1,"View More"),o.qZA()}}const CK=function(t,e){return{"selectedname selected-itemdropdwn":t,"position-relative text-type ":e}};function wK(t,e){if(1&t&&(o.TgZ(0,"span",11),o.YNc(1,xK,2,2,"ng-container",12),o.ynx(2),o._UZ(3,"label",13),o.YNc(4,_K,2,0,"button",14),o.BQk(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2),r=i.index,s=i.$implicit,a=o.oxw();o.Q6J("ngClass",o.WLB(5,CK,a.shouldDisplaySelected(t),!a.shouldDisplaySelected(t))),o.xp6(1),o.Q6J("ngIf",a.shouldDisplayImage(t)),o.xp6(2),o.Q6J("id","Option-"+r.toString()+n.toString())("innerHTML",a.getDisplayLabel(t,s.name),o.oJD),o.xp6(1),o.Q6J("ngIf",a.IsViewMore(a.getDisplayLabel(t,s.name)))}}function yK(t,e){if(1&t&&(o.TgZ(0,"div",5),o.TgZ(1,"span",6),o._uU(2),o.YNc(3,bK,2,0,"span",7),o.qZA(),o.TgZ(4,"div",8),o.YNc(5,wK,5,8,"span",9),o.qZA(),o.qZA()),2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw();o.Q6J("id","menu-drop"+e),o.xp6(2),o.hij("",n.label," "),o.xp6(1),o.Q6J("ngIf","true"!=n.required),o.xp6(2),o.Q6J("ngForOf",i.editOptions[n.name])}}function AK(t,e){if(1&t&&(o.TgZ(0,"label"),o._uU(1),o.qZA()),2&t){const t=o.oxw(3).$implicit;o.xp6(1),o.Oqu("filter-continue-if"!=t.type?"Custom Record Properties (Key:Value)":t.name)}}function ZK(t,e){1&t&&(o.TgZ(0,"span",10),o._uU(1,"(Optional)"),o.qZA())}function kK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",16),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(2).index;return o.oxw().onViewMoreClicked(e,r.toString()+i.toString()+n.toString())}),o._uU(1,"View More"),o.qZA()}}const TK=function(t){return{nothighlightbox:t}};function OK(t,e){if(1&t&&(o.TgZ(0,"span",31),o.TgZ(1,"label",32),o._uU(2),o.qZA(),o.YNc(3,kK,2,0,"button",14),o.qZA()),2&t){const t=o.oxw().index,e=o.oxw(2),n=e.$implicit,i=e.index,r=o.oxw(2).index,s=o.oxw();o.Q6J("ngClass",o.VKq(4,TK,!n.value[t].value&&0===t)),o.xp6(1),o.Q6J("id","Option-"+r.toString()+i.toString()+t.toString()),o.xp6(1),o.hij(" ",n.value[t].value," "),o.xp6(1),o.Q6J("ngIf",s.IsViewMore(n.value[t].value))}}function MK(t,e){1&t&&(o.TgZ(0,"span",35),o._uU(1,"\xa0"),o.qZA())}function IK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",16),o.NdJ("click",function(e){o.CHM(t);const n=o.oxw(2).index,i=o.oxw(2).index,r=o.oxw(2).index;return o.oxw().onViewMoreClicked(e,r.toString()+i.toString()+n.toString())}),o._uU(1,"View More"),o.qZA()}}function SK(t,e){if(1&t&&(o.TgZ(0,"span"),o.YNc(1,MK,2,0,"span",33),o.TgZ(2,"span",34),o._UZ(3,"span",15),o._UZ(4,"label",13),o.YNc(5,IK,2,0,"button",14),o.qZA(),o.qZA()),2&t){const t=o.oxw(),e=t.index,n=t.$implicit,i=o.oxw(2),r=i.$implicit,s=i.index,a=o.oxw(2).index,c=o.oxw();o.xp6(1),o.Q6J("ngIf",0===e||"label"===r.value[e-1].type),o.xp6(2),o.Udp("background-image","url("+c.appyConfig.cdnMediaPath+((null==c.connectList[n.realIndex]?null:c.
1connectList[n.realIndex].image)||(null==c.connectList[n.nodeIndex]?null:c.connectList[n.nodeIndex].image))+")"),o.xp6(1),o.Q6J("id","Option-"+a.toString()+s.toString()+e.toString())("innerHTML",c.getCustomValue(n),o.oJD),o.xp6(1),o.Q6J("ngIf",c.IsViewMore(c.getCustomValue(n)))}}const PK=function(t){return{maxWidthIfsingletextField:t}};function NK(t,e){if(1&t&&(o.TgZ(0,"span",11),o.YNc(1,OK,4,6,"span",30),o.YNc(2,SK,6,6,"span",12),o.qZA()),2&t){const t=e.$implicit,n=o.oxw(2).$implicit;o.Q6J("ngClass",o.VKq(3,PK,1==n.value.length)),o.xp6(1),o.Q6J("ngIf","text"===t.type),o.xp6(1),o.Q6J("ngIf","label"===t.type)}}function qK(t,e){if(1&t&&(o.TgZ(0,"div",29),o.YNc(1,NK,3,5,"span",9),o.qZA()),2&t){const t=o.oxw().$implicit;o.xp6(1),o.Q6J("ngForOf",t.value)}}function UK(t,e){if(1&t&&(o.TgZ(0,"div",19),o.YNc(1,AK,2,1,"label",12),o.TgZ(2,"div",20),o.TgZ(3,"div",21),o.TgZ(4,"label",22),o._uU(5),o.qZA(),o.YNc(6,ZK,2,0,"span",7),o.qZA(),o.TgZ(7,"div",23),o.TgZ(8,"div",24),o.TgZ(9,"div",25),o.TgZ(10,"label",26),o._uU(11),o.qZA(),o.TgZ(12,"div",27),o.YNc(13,qK,2,1,"div",28),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&t){const t=e.$implicit,n=e.index,i=o.oxw(2).$implicit,r=o.oxw();o.xp6(1),o.Q6J("ngIf",0===n),o.xp6(4),o.Oqu(r.sliceKey(t.key[0].value)),o.xp6(1),o.Q6J("ngIf","true"!=i.required),o.xp6(5),o.Oqu(null==i.selectedOption?null:i.selectedOption.disp_val),o.xp6(2),o.Q6J("ngIf",t&&t.value&&t.value[0])}}function EK(t,e){if(1&t&&(o.TgZ(0,"div",17),o.YNc(1,UK,14,5,"div",18),o.qZA()),2&t){const t=o.oxw().$implicit,e=o.oxw();o.xp6(1),o.Q6J("ngForOf",e.dynamicAppField[t.name])}}function FK(t,e){if(1&t&&(o.TgZ(0,"div",2),o.YNc(1,yK,6,4,"div",3),o.YNc(2,EK,2,1,"div",4),o.qZA()),2&t){const t=e.$implicit,n=o.oxw();o.xp6(1),o.Q6J("ngIf",n.editOptions&&n.editOptions[t.name]&&n.editOptions[t.name].length>0&&n.isEmpty(n.editOptions[t.name],t.name)),o.xp6(1),o.Q6J("ngIf","text"!==t.type&&"textarea"!==t.type&&"select"!==t.type&&n.dynamicAppField&&n.dynamicAppField[t.name])}}function DK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",39),o.TgZ(1,"div",40),o._UZ(2,"input",41),o.qZA(),o.TgZ(3,"div",42),o.TgZ(4,"a",43),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.CopyToClipboard("https://pubhooks.appypie.com/connect/standard/"+e.currentApp.triggerId+"/"+e.currentApp.appId+"/"+e.customer.customerId)}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.s9C("value","https://pubhooks.appypie.com/connect/standard/"+t.currentApp.triggerId+"/"+t.currentApp.appId+"/"+t.customer.customerId),o.xp6(2),o.Q6J("innerHTML",t.translation.COPY_TO_CLICKBOARD,o.oJD)}}function LK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",39),o.TgZ(1,"div",40),o._UZ(2,"input",41),o.qZA(),o.TgZ(3,"div",42),o.TgZ(4,"a",43),o.NdJ("click",function(){o.CHM(t);const e=o.oxw(2);return e.CopyToClipboard("https://hooks.appypie.com/connect/standard/"+e.currentApp.triggerId+"/"+e.currentApp.appId+"/"+e.customer.customerId)}),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(2),o.s9C("value","https://hooks.appypie.com/connect/standard/"+t.currentApp.triggerId+"/"+t.currentApp.appId+"/"+t.customer.customerId),o.xp6(2),o.Q6J("innerHTML",t.translation.COPY_TO_CLICKBOARD,o.oJD)}}function JK(t,e){if(1&t&&(o.TgZ(0,"div",36),o.TgZ(1,"div",37),o.TgZ(2,"p"),o._uU(3,"Set this webhook URL in "),o.TgZ(4,"strong"),o._uU(5),o.qZA(),o.qZA(),o.YNc(6,DK,5,2,"div",38),o.YNc(7,LK,5,2,"div",38),o.qZA(),o.qZA()),2&t){const t=o.oxw();o.xp6(5),o.Oqu("k2P4p45df5f222345E0a"==t.currentApp.appId?"your application":t.currentApp.displayName),o.xp6(1),o.Q6J("ngIf","k2P4p45df5f222345E0a"===t.currentApp.appId),o.xp6(1),o.Q6J("ngIf","k2P4p45df5f222345E0a"!==t.currentApp.appId)}}let jK=(()=>{class t{constructor(t,e,n,i){this.changeDetectorRef=t,this.customerService=e,this.customerConnectService=n,this.editOptionsService=i,this.filterEditOptions={},this.selectedApp=new o.vpe,this.testloader=!1,this.arrowClassName="down",this.appyConfig=go.N,this.readyForContinue=!1,this.isShow=!0,this.dynamicAppField={},this.additionalTriggerEditOptions=[],this.seachTerm={},this.scrollbarOptions={theme:"minimal-dark",axis:"y",scrollEasing:"easeOut"},this.triggerDropDownData={},this.showAllFields=!1,this.ANDORFilter=[[{keyData:[{type:"text",key:"",value:""}],filterType:[],searchData:[{type:"text",key:"",value:""}]}
1]],this.showFilterOptions=[{value:"contains",disp_val:"(Text) Contains"},{value:"doesnotcontains",disp_val:"(Text) Does not contain"},{value:"exacltymatch",disp_val:"(Text) Exactly matches"},{value:"doesnotexactlymatch",disp_val:"(Text) Should not exactly match"},{value:"startwith",disp_val:"(Text) Starts with"},{value:"doesnotstartwith",disp_val:"(Text) Does not start with"},{value:"endwith",disp_val:"(Text) Ends with"},{value:"doesnotendwith",disp_val:"(Text) Does not end with"},{value:"greaterthan",disp_val:"(Number) Greater than"},{value:"lessthan",disp_val:"(Number) Less than"},{value:"equalsto",disp_val:"(Number) Equals to"},{value:"notequalsto",disp_val:"(Number) Not equals to"},{value:"after",disp_val:"(Date/time) After"},{value:"before",disp_val:"(Date/time) Before"},{value:"equals",disp_val:"(Date/time) Equals"},{value:"beforeCurrentDate",disp_val:"(Date/time) Before Current DateTime"},{value:"afterCurrentDate",disp_val:"(Date/time) After Current DateTime"},{value:"istrue",disp_val:"(Boolean) Is true"},{value:"isfalse",disp_val:"(Boolean) Is false"},{value:"exists",disp_val:"Exists"},{value:"doesnotexists",disp_val:"Does not exist"},{value:"isempty",disp_val:"Is empty"},{value:"isnotempty",disp_val:"Is not empty"}],this.detectChangeloader=!1,this.nestedStepsArray={}}toggleDisplay(){this.isShow=!this.isShow}ngOnInit(){this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions,this.currentApp&&!this.currentApp.canContinueRuntest&&(this.currentApp.canContinueRuntest=!0)}ngAfterContentInit(){var t;if(this.customer=this.customerService.GetCurrent(),"trigger"===this.nodeType&&(this.showAllFields=!0),this.currentApp.additionalTriggerEditOptions?this.showAllFields=!0:this.currentApp.additionalTriggerEditOptions=[],this.currentApp.filterEditOptions&&this.currentApp.filterEditOptions[0]&&this.currentApp.filterEditOptions[0][0]&&(this.ANDORFilter=this.currentApp.filterEditOptions,this.ANDORFilter.forEach((t,e)=>{t.forEach((t,n)=>{t.keyData&&"string"==typeof t.keyData&&(this.ANDORFilter[e][n].keyData=JSON.parse(t.keyData)),t.filterType&&"string"==typeof t.filterType&&(this.ANDORFilter[e][n].filterType=JSON.parse(t.filterType)),t.searchData&&"string"==typeof t.searchData&&(this.ANDORFilter[e][n].searchData=JSON.parse(t.searchData))})})),this.dynamicAppField.fields=null!==(t=this.dynamicAppField.fields)&&void 0!==t?t:[],this.ANDORFilter.forEach(t=>{t.forEach(t=>{if(t=JSON.parse(JSON.stringify(t)),Array.isArray(t.filterType)&&t.filterType.length>0){const e=t.filterType[0];e.value=e.display_value,Array.isArray(t.searchData)?t.searchData.unshift(e):(t.searchData=[],t.searchData[0]=e)}t.keyData[0].value=t.keyData.map(t=>t.value).join(", "),this.dynamicAppField.fields.push({key:t.keyData,value:t.searchData})})}),this.editOptions={},this.currentApp.editOptions)if("trigger"===this.currentApp.nodeType)Object.keys(this.currentApp.editOptions).forEach(t=>{!t.includes("__disp")&&!this.currentApp.triggerEditOptions.some(e=>e.name===t)&&(this.currentApp.editOptions[t+"__disp"]?(this.editOptions[t]=[{}],this.editOptions[t][0][t]=this.currentApp.editOptions[t],this.editOptions[t][0][t+"__disp"]=this.currentApp.editOptions[t+"__disp"]):this.currentApp.editOptions[t+"__nestedStepsArray"]?this.nestedStepsArray[t]=this.currentApp.editOptions[t+"__nestedStepsArray"]:this.editOptions[t]=[{type:"text",key:"",value:this.currentApp.editOptions[t]}])}),this.triggerDropDownData=this.currentApp.editOptions,this.currentApp.triggerEditOptions.forEach(t=>{(this.currentApp.editOptions[t.name]||this.currentApp.editOptions[t.name+"__disp"])&&("text"===t.type||"textarea"===t.type?this.editOptions[t.name]=[{type:"text",key:"",value:this.currentApp.editOptions[t.name]}]:"select"===t.type?this.currentApp.editOptions[t.name+"__disp"]?(this.editOptions[t.name]=[{}],this.editOptions[t.name][0][t.name]=this.currentApp.editOptions[t.name],this.editOptions[t.name][0][t.name+"__disp"]=this.currentApp.editOptions[t.name+"__disp"]):this.editOptions[t.name]=[{type:"text",value:this.currentApp.editOptions[t.name],key:""}]:"nestedSelect"===t.type&&(this.currentApp.editOptions[t.name+"__nestedStepsArray"]&&(this.nestedStepsArray[t.name]=this.currentApp.editOptions[t.name+"__nestedStepsArray"]),this.currentApp.editOptions[t.name+"__disp"]?(this.editOptions[t.name]=[{}],this.editOptions[t.name][0][t.name]=this.currentApp.editOptions[t.name],this.editOptions[t.name][0][t.name+"__disp"]=this.currentApp.editOptions[t.name+"__disp"]):this.editOptions[t.name]=[{type:"text",value:[{type:"text",key:"",value:this.currentApp.editOptions[t.name]}],display_value:"Use a Custom value (Advanced)",key:"",custom:!0}]))});else{let t={},e=!0;
1Object.keys(this.currentApp.editOptions).forEach(n=>{t[n]="string"==typeof this.currentApp.editOptions[n]?JSON.parse(this.currentApp.editOptions[n]):this.currentApp.editOptions[n],t[n][0]&&t[n][0].nestedStepsArray&&(this.nestedStepsArray||(this.nestedStepsArray={}),this.nestedStepsArray[n]=t[n][0].nestedStepsArray),t[n][0]&&t[n][0].custom?t[n][0].value&&"string"==typeof t[n][0].value&&(t[n][0].value=JSON.parse(t[n][0].value),this.triggerDropDownData[n]=t[n][0].value[0].value):t[n][0]&&t[n][0].value&&(this.triggerDropDownData[n]=t[n][0].value),t[n][0]&&t[n].forEach(t=>{var n;"label"===t.type&&this.connectList[t.nodeIndex]&&(null===(n=this.connectList[t.nodeIndex].sample_data)||void 0===n?void 0:n[0])&&(this.connectList[t.nodeIndex].sample_data[0].data.find(e=>{if(e.key===t.key)return!0})||(e=!1))})}),this.editOptions=t,this.editOptions=this.replaceCustomValues(this.editOptions),e||this.selectedApp.emit({allTriggerFound:"false"})}this.currentApp.triggerEditOptions&&this.loadDynamicFieldsIfExist(),this.currentApp.custom_form&&this.loadCustomFormFieldsOfUser(this.currentApp.custom_form)}atobLoacl(t){return btoa(t)}loadCustomFormFieldsOfUser(t){this.testloader=!0,this.currentApp.triggerEditOptions=this.currentApp.triggerEditOptions.filter(e=>{if(e.custom_form_function!==t+"CustomForm")return e}),this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),t+"CustomForm",this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,this.triggerDropDownData).subscribe(e=>{this.testloader=!1,e=e.map(e=>(e.options&&e.options[0]&&(e.dropdownOption=e.options),e.custom_form_function=t+"CustomForm",e)),this.currentApp.triggerEditOptions=this.currentApp.triggerEditOptions.concat(e),this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions.concat(this.currentApp.additionalTriggerEditOptions)})}loadDynamicFieldsIfExist(){this.currentApp.triggerEditOptions.forEach((t,e)=>{"text"!==t.type&&"textarea"!==t.type&&"select"!==t.type&&"filter-continue-if"!==t.type?this.loadDynamicAppField(t.name):"text"===t.type||"textarea"===t.type?this.editOptions[t.name]||(this.editOptions[t.name]=[{type:"text",key:"",value:""}]):(t.options&&t.options[0]&&(this.currentApp.triggerEditOptions[e].dropdownOption=t.options),this.editOptions[t.name]&&t.changefunction&&this.callChangeFunction(t,1)),this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions.concat(this.currentApp.additionalTriggerEditOptions)})}callChangeFunction(t,e){this.testloader=!0,this.currentApp.additionalTriggerEditOptions&&this.currentApp.additionalTriggerEditOptions[0]&&(this.currentApp.additionalTriggerEditOptions=this.currentApp.additionalTriggerEditOptions.filter(e=>{if(e.changeFuncName!==t.changefunction+"ChangeFunction")return e})),(!this.currentApp.additionalTriggerEditOptions||!this.currentApp.additionalTriggerEditOptions[0])&&(this.currentApp.additionalTriggerEditOptions=[]);let n=this.triggerDropDownData;n=0==e?{}:this.triggerDropDownData,this.editOptionsService.optionsSelectData(this.currentApp.credentialUrlName?this.currentApp.credentialUrlName:this.currentApp.name.split(" ").join("").toLowerCase(),t.changefunction+"ChangeFunction",this.currentApp.appId,this.currentApp.auth,this.currentApp.nodeId,this.currentApp.triggerId,n).subscribe(t=>{this.testloader=!1,t=t.map(t=>(t.options&&t.options[0]&&(t.dropdownOption=t.options),t)),this.currentApp.additionalTriggerEditOptions=this.currentApp.additionalTriggerEditOptions.concat(t),this.currentApp.additionalTriggerEditOptions.forEach((t,e)=>{"text"!==t.type&&"textarea"!==t.type&&"select"!==t.type&&"filter-continue-if"!==t.type?this.loadDynamicAppField(t.name):"text"===t.type||"textarea"===t.type?this.editOptions[t.name]||(this.editOptions[t.name]=[{type:"text",key:"",value:""}]):(t.options&&t.options[0]&&(this.currentApp.additionalTriggerEditOptions[e].dropdownOption=t.options),this.editOptions[t.name]&&t.changefunction&&this.callChangeFunction(t,1)),this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions.concat(this.currentApp.additionalTriggerEditOptions)}),this.showAllFields=!0}),this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions.concat(this.currentApp.additionalTriggerEditOptions)}loadDynamicAppField(t){var e;let n;this.testloader=!0,n=[],this.currentApp.filterEditOptions&&this.currentApp.filterEditOptions[t]&&this.currentApp.filterEditOptions[t].forEach((t,e)=>{let i;i={key:"",value:""},i.key="string"==typeof t.key?JSON.parse(t.key):t.key,i.value="string"==typeof t.value?JSON.parse(t.value):t.value,n.push(i)}),this.dynamicAppField||(this.dynamicAppField={}),this.dynamicAppField[t]=n.length>0?n:[{key:[{type:"text",key:"",value:""}],value:[{type:"text",key:"",value:""}]}],this.dynamicAppField[t]=this.dynamicAppField[t].filter(t=>0!==t.key.length&&0!==t.value.length&&!!(""!==t.key[0].value||t.value[0]&&""!==t.value[0].value));for(let i=0;i<this.dynamicAppField[t].length;i++)if(0!==this.dynamicAppField[t][i].value.length)for(let n=0;n<this.dynamicAppField[t][i].value.length;n++)(""===(null===(e=this.dynamicAppField[t][i].value[n].value)||void 0===e?void 0:e.trim())||null==this.dynamicAppField[t][i].value[n].key&&null==this.dynamicAppField[t][i].value[n].value)&&(this.dynamicAppField[t][i].value.splice(n,1),n--);this.additionalTriggerEditOptions=this.currentApp.triggerEditOptions.concat(this.currentApp.additionalTriggerEditOptions)}isString(t){return"string"==typeof t}replaceCustomValues(t){for(const e in t)Array.isArray(t[e])&&t[e].forEach((n,i)=>{n.custom&&Array.isArray(n.value)&&(t[e]=n.value)});return t}shouldDisplaySelected(t){return null!=t.nodeIndex||null!=t.display_value}shouldDisplayImage(t){return null!=t.nodeIndex||null!=t.display_value}getDisplayLabel(t,e){return null!=t.display_value||null!=t[e+"__disp"]?this.sliceValue(t.display_value?t.display_value:t[e+"__disp"]):t.value?this.sliceValue(t.key)?"<b>"+this.capitalizeFLOf(this.sliceValue(t.key))+"</b> '"+this.sliceValue(t.value)+"'":this.sliceValue(t.value):"<b>"+this.capitalizeFLOf(this.sliceValue(t.key))+"</b>"}capitalizeFLOf(t){return t.replace(/\./g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}sliceValue(t){return"string"==typeof t?t.slice(0,300):String(t)}getCustomValue(t){if(t&&t.hasOwnProperty("type")&&("label"===t.type||"text"===t.type)){if(t.value&&"string"==typeof t.value)return this.sliceValue(t.key)?"<b>"+this.capitalizeFLOf(this.sliceValue(t.key))+"</b> '"+this.sliceValue(t.value)+"'":this.sliceValue(t.value);if("string"==typeof t.key)return"<b>"+this.capitalizeFLOf(this.sliceValue(t.key))+"</b> '"}return""}IsViewMore(t){return t.length>80}isEmpty(t,e){try{let i=!1;for(let o=0;o<t.length;o++){var n=this.getDisplayLabel(t[o],e);""===n.trim()||"<b></b>"===n.trim()?this.editOptions[e].splice(o,1):i=!0}return i}catch(i){return!1}}CopyToClipboard(t){let e;e=document.createElement("textarea"),e.style.position="fixed",e.style.left="0",e.style.top="0",e.
1style.opacity="0",e.value=t,document.body.appendChild(e),e.focus(),e.select(),document.execCommand("copy"),document.body.removeChild(e),this.readyForContinue=!0}onViewMoreClicked(t,e){const n=document.getElementById(`Option-${e}`),i=t.target;"block"===n.style.display?(n.classList.remove("openview"),n.style.display="-webkit-box",i&&(i.textContent="View More")):(n.classList.add("openview"),n.style.display="block",i&&(i.textContent="View Less"))}sliceKey(t){return"string"==typeof t&&t.length>30?t.slice(0,20)+"...":String(t)}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(o.sBO),o.Y36(yo),o.Y36(Fo),o.Y36(av))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-preview-options"]],inputs:{currentApp:"currentApp",translation:"translation",nodeType:"nodeType",isTemplate:"isTemplate",singleClickTemplate:"singleClickTemplate",connectId:"connectId",warningInfo:"warningInfo",connectList:"connectList"},outputs:{selectedApp:"selectedApp"},decls:2,vars:2,consts:[["class","w-100 my-1",4,"ngFor","ngForOf"],["class","col-xs-12 push-5-t",4,"ngIf"],[1,"w-100","my-1"],["class","d-flex flex-wrap gap-2 py-1 align-items-start flex-column border-bottom justify-content-between preview-menu w-100",3,"id",4,"ngIf"],["id","duplicateColume",4,"ngIf"],[1,"d-flex","flex-wrap","gap-2","py-1","align-items-start","flex-column","border-bottom","justify-content-between","preview-menu","w-100",3,"id"],[1,"selected_value_","selected-value-preview_","fw-bold",2,"flex","1"],["class","fw-normal","style","color: #AEAFB2;",4,"ngIf"],["id","selected_value",1,"selected_value_","d-flex","flex-wrap","justify-content-end",2,"flex","1"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"fw-normal",2,"color","#AEAFB2"],[3,"ngClass"],[4,"ngIf"],[1,"choice-label",3,"id","innerHTML"],["class","btn-link btn",3,"click",4,"ngIf"],[1,"imgapps-icon","slack32x32"],[1,"btn-link","btn",3,"click"],["id","duplicateColume"],["class","w-100 border-bottom py-1",4,"ngFor","ngForOf"],[1,"w-100","border-bottom","py-1"],[1,"datafirebase_items","d-flex","flex-wrap","gap-3","align-items-center","justify-content-between","preview-menu","w-100"],[1,"input"],[1,"formcontrol-valclass"],[1,"listingitems"],[1,"keyclass"],[1,"pretty-textbox"],[1,"valueclass"],[1,"form_control"],["id","selected_value",4,"ngIf"],["id","selected_value"],["class","position-relative text-type normaltext-filed",3,"ngClass",4,"ngIf"],[1,"position-relative","text-type","normaltext-filed",3,"ngClass"],[1,"choice-label",3,"id"],["class","whitespace-to-addinputbox d-none",4,"ngIf"],[1,"selectedname","selected-itemdropdwn"],[1,"whitespace-to-addinputbox","d-none"],[1,"col-xs-12","push-5-t"],[1,"connect-directions"],["class","table-wrapper fill",4,"ngIf"],[1,"table-wrapper","fill"],[1,"table-cell","pad-10-r","pad-10-b"],["type","text","readonly","","name","ipnURL","id","ipnURL",1,"form-control","pad-10","heightAuto",3,"value"],[1,"table-cell","pad-10-r","pad-10-b","vcenter"],[1,"btn","btn-default",3,"innerHTML","click"]],template:function(t,e){1&t&&(o.YNc(0,FK,3,2,"div",0),o.YNc(1,JK,8,3,"div",1)),2&t&&(o.Q6J("ngForOf",e.additionalTriggerEditOptions),o.xp6(1),o.Q6J("ngIf","webhookUrl"===e.currentApp.triggerType))},directives:[to.sg,to.O5,to.mk],styles:["webkit-user-select.maxWidthIfsingletextField[_ngcontent-%COMP%]{width:100%!important}.menu-preview[_ngcontent-%COMP%]{justify-content:flex-end!important}.selected-value-preview[_ngcontent-%COMP%]{width:20%!important;min-width:20%!important}.preview-menu[_ngcontent-%COMP%]   .selected-itemdropdwn[_ngcontent-%COMP%]{border-radius:6px!important;border:1px solid #9FC5E4!important;background-color:#f2f9ff;grid-template-columns:30px 1fr!important;max-width:510px;display:inline-flex!important;grid-gap:4px;gap:4px}.preview-menu[_ngcontent-%COMP%]   .selected-itemdropdwn[_ngcontent-%COMP%]   label.choice-label[_ngcontent-%COMP%]{flex:1;-webkit-line-clamp:1}.preview-menu[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%]{border-radius:6px;border:1px solid #9FC5E4;background:#F2F9FF;grid-template-columns:1fr;text-align:center;max-width:510px;min-width:inherit!important;width:unset!important;display:flex}.preview-menu[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%] > label.choice-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap;max-width:510px;word-break:break-word;width:100%;min-width:unset!important;text-align:left;font-size:13px;font-weight:400;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;-webkit-user-select:auto}.btn-link.btn[_ngcontent-%COMP%]{font-size:12px;color:#4d6dff;padding:2px 3px;margin-top:auto;width:90px}.normaltext-filed[_ngcontent-%COMP%]{display:grid;min-width:unset;max-width:510px;grid-template-columns:1fr 80px!important;width:100%}.choice-label.openview[_ngcontent-%COMP%]{white-space:inherit!important}@media (max-width: 767px){.preview-menu[_ngcontent-%COMP%]   #selected_value[_ngcontent-%COMP%]{flex:auto!important}.preview-menu[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%]{display:grid}.btn-link.btn[_ngcontent-%COMP%]{text-align:start}}.theme-dark[_ngcontent-%COMP%]   .preview-menu[_ngcontent-%COMP%]   .text-type[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]   .preview-menu[_ngcontent-%COMP%]   .selected-itemdropdwn[_ngcontent-%COMP%]{background:#0c1117!important}"]}),t})();const RK=["dropdown"],$K=function(t){return{active:t}};function BK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",2),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(1,"div",3),o.TgZ(2,"div",4),o.TgZ(3,"h2",5),o._uU(4,"Flow Branch"),o.qZA(),o.TgZ(5,"button",6),o.NdJ("click",function(){return o.CHM(t),o.oxw().handleCloseFlowBranch()}),o.O4$(),o.TgZ(6,"svg",7),o._UZ(7,"path",8),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(8,"div",9),o.TgZ(9,"div",10),o.TgZ(10,"div",11),o.TgZ(11,"span",12),o._uU(12,"Flow Rule"),o.qZA(),o.TgZ(13,"button",13),o.NdJ("click",function(){return o.CHM(t),o.oxw().handleToggleDropMenu()}),o.TgZ(14,"span",14),o._uU(15,"Custom Rules"),o.qZA(),o.TgZ(16,"span",15),o.O4$(),o.TgZ(17,"svg",16),o._UZ(18,"path",17),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(19,"div",18),o.TgZ(20,"span",12),o._uU(21,"Only Continue If"),o.qZA(),o.TgZ(22,"div",19),o.NdJ("click",function(){return o.CHM(t),o.oxw().handleToggleDropMenuMultiple()}),o.TgZ(23,"span",20),o._UZ(24,"img",21),o.qZA(),o.TgZ(25,"span",22),o._uU(26,"Choose Field..."),o.qZA(),o.TgZ(27,"span",15),o.O4$(),o.TgZ(28,"svg",16),o._UZ(29,"path",17),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(30,"div",23),o.TgZ(31,"span",20),o._UZ(32,"img",21),o.qZA(),o.TgZ(33,"span",22),o._uU(34,"Choose Condition..."),o.qZA(),o.TgZ(35,"span",15),o.O4$(),o.TgZ(36,"svg",16),o._UZ(37,"path",17),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(38,"div",23),o._UZ(39,"div",24),o.TgZ(40,"span",15),o.O4$(),o.TgZ(41,"svg",25),o._UZ(42,"path",26),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(43,"div",27),o.TgZ(44,"span",12),o._uU(45,"Add"),o.qZA(),o.TgZ(46,"div",19),o.NdJ("click",function(){return o.CHM(t),o.oxw().handleToggleDropMenuMultiple()}),o.TgZ(47,"span",20),o._UZ(48,"img",21),o.qZA(),o.TgZ(49,"span",22),o._uU(50,"Choose Field..."),o.qZA(),o.TgZ(51,"span",15),o.O4$(),o.TgZ(52,"svg",16),o._UZ(53,"path",17),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(54,"div",23),o.TgZ(55,"span",20),o._UZ(56,"img",21),o.qZA(),o.TgZ(57,"span",22),o._uU(58,"Choose Condition..."),o.qZA(),o.TgZ(59,"span",15),o.O4$(),o.TgZ(60,"svg",16),o._UZ(61,"path",17),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(62,"div",23),o._UZ(63,"div",24),o.TgZ(64,"span",15),o.O4$(),o.TgZ(65,"svg",25),o._UZ(66,"path",26),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.kcU(),o.TgZ(67,"div",28),o.TgZ(68,"button",29),o.O4$(),o.TgZ(69,"svg",30),o._UZ(70,"path",26),o.qZA(),o._uU(71," ADD "),o.qZA(),o.kcU(),o.TgZ(72,"button",29),o.O4$(),o.TgZ(73,"svg",30),o._UZ(74,"path",26),o.qZA(),o._uU(75," OR "),o.qZA(),o.qZA(),o.kcU(),o.TgZ(76,"div",31),o.TgZ(77,"a",32),o._uU(78,"Continue"),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(13),o.Q6J("ngClass",o.VKq(3,$K,t.showDropMenu)),o.xp6(9),o.Q6J("ngClass",o.VKq(5,$K,t.showDropMenuMultiple)),o.xp6(24),o.Q6J("ngClass",o.VKq(7,$K,t.showDropMenuMultiple))}}function HK(t,e){1&t&&(o.TgZ(0,"p",43),o._uU(1,"Note 1: Flow Contains a \u201cFallback\u201d branch, can't add \u201cAlways Run\u201d branch with \u201cFallback\u201d branch. "),o._UZ(2,"br"),o._uU(3," Note 2: Flow already contain \u201cFallback\u201d branch."),o.qZA())}function QK(t,e){1&t&&(o.TgZ(0,"div",33,34),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o.TgZ(4,"h2",5),o._uU(5,"Flow Rule:"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(6,"div",35),o.TgZ(7,"ul",36),o.TgZ(8,"li",37),o.TgZ(9,"span",38),o.O4$(),o.TgZ(10,"svg",39),o._UZ(11,"path",40),o.qZA(),o.qZA(),o._uU(12," Custom Rules "),o.qZA(),o.kcU(),o.TgZ(13,"li",41),o.TgZ(14,"span",38),o.O4$(),o.TgZ(15,"svg",39),o._UZ(16,"path",40),o.qZA(),o.qZA(),o._uU(17," Always Run"),o.qZA(),o.kcU(),o.TgZ(18,"li",41),o.TgZ(19,"span",38),o.O4$(),o.TgZ(20,"svg",39),o._UZ(21,"path",40),o.qZA(),o.qZA(),o._uU(22," Fallback"),o.qZA(),o.qZA(),o.kcU(),o.TgZ(23,"div",42),o.TgZ(24,"p",43),o._uU(25,"Note: Flow Contains a \u201cAlways Run\u201d branch, \u201cfallback\u201d would not run."),o.qZA(),o.YNc(26,HK,4,0,"p",44),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.xp6(26),o.Q6J("ngIf",!1))}const YK=function(t){return{open:t}};function zK(t,e){if(1&t){const t=o.EpF();o.O4$(),o.kcU(),o.TgZ(0,"ul",58),o.TgZ(1,"li",59),o.TgZ(2,"span",20),o._UZ(3,"img",60),o.qZA(),o.TgZ(4,"span",22),o._uU(5,"Attachment Body Attachment Id"),o.qZA(),o.TgZ(6,"span",61),o._uU(7,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"),o.qZA(),o.TgZ(8,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleText()}),o._uU(9),o.qZA(),o.qZA(),o.TgZ(10,"li",59),o.TgZ(11,"span",20),o._UZ(12,"img",60),o.qZA(),o.TgZ(13,"span",22),o._uU(14,"Attachment Body Attachment Id"),o.qZA(),o.TgZ(15,"span",61),o._uU(16,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"),o.qZA(),o.TgZ(17,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleText()}),o._uU(18),o.qZA(),o.qZA(),o.TgZ(19,"li",59),o.TgZ(20,"span",20),o._UZ(21,"img",60),o.qZA(),o.TgZ(22,"span",22),o._uU(23,"Attachment Body Attachment Id"),o.qZA(),o.TgZ(24,"span",61),o._uU(25,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"),o.qZA(),o.TgZ(26,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleText()}),o._uU(27),o.qZA(),o.qZA(),o.TgZ(28,"li",59),o.TgZ(29,"span",20),o._UZ(30,"img",60),o.qZA(),o.TgZ(31,"span",22),o._uU(32,"Attachment Body Attachment Id"),o.qZA(),o.TgZ(33,"span",61),o._uU(34,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"),o.qZA(),o.TgZ(35,"button",62),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).toggleText()}),o._uU(36),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(6),o.Q6J("ngClass",o.VKq(8,YK,t.isExpanded)),o.xp6(3),o.Oqu(t.isExpanded?"Less":"More"),o.xp6(6),o.Q6J("ngClass",o.VKq(10,YK,t.isExpanded)),o.xp6(3),o.Oqu(t.isExpanded?"Less":"More"),o.xp6(6),o.Q6J("ngClass",o.VKq(12,YK,t.isExpanded)),o.xp6(3),o.Oqu(t.isExpanded?"Less":"More"),o.xp6(6),o.Q6J("ngClass",o.VKq(14,YK,t.isExpanded)),o.xp6(3),o.Oqu(t.isExpanded?"Less":"More")}}const VK=function(t){return{show:t}};function GK(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",33,34),o.NdJ("click",function(t){return t.stopPropagation()}),o.TgZ(2,"div",3),o.TgZ(3,"div",4),o.TgZ(4,"h2",5),o._uU(5,"Choose Field:"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(6,"div",45),o.TgZ(7,"div",46),o._UZ(8,"input",47),o.O4$(),o.TgZ(9,"svg",48),o._UZ(10,"path",49),o._UZ(11,"path",50),o.qZA(),o.qZA(),o.kcU(),o.TgZ(12,"ul",51),o.TgZ(13,"li",52),o.TgZ(14,"div",53),o.NdJ("click",function(){return o.CHM(t),o.oxw().toggleCollapse()}),o.TgZ(15,"span",20),o._UZ(16,"img",54),o.qZA(),o.TgZ(17,"span",55),o._uU(18,"New Attachment"),o.qZA(),o.TgZ(19,"span",56),o.O4$(),o.TgZ(20,"svg",16),o._UZ(21,"path",17),o.qZA(),o.qZA(),o.qZA(),o.YNc(22,zK,37,16,"ul",57),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(14),o.Q6J("ngClass",o.VKq(2,VK,t.toggleCollapseMenu)),o.xp6(8),o.Q6J("ngIf",t.toggleCollapseMenu)}}let WK=(()=>{class t{constructor(){this.showDropMenu=!1,this.showDropMenuMultiple=!1,this.toggleCollapseMenu=!1,this.isExpanded=!1,this.isFlowBranch=!0}ngOnInit(){}handleCloseFlowBranch(){this.isFlowBranch=!1}toggleText(){this.isExpanded=!this.isExpanded}toggleCollapse(){this.toggleCollapseMenu=!this.toggleCollapseMenu}handleToggleDropMenu(){this.showDropMenu=!this.showDropMenu,this.showDropMenuMultiple=!1}handleToggleDropMenuMultiple(){this.showDropMenuMultiple=!this.showDropMenuMultiple,this.showDropMenu=!1}closeMenuOnClickOutside(t){setTimeout(()=>{if(!this.dropdown||!this.dropdown.nativeElement)return;const e=this.dropdown.nativeElement.contains(t.target);(this.showDropMenu||this.showDropMenuMultiple)&&!e&&(this.showDropMenu=!1,this.showDropMenuMultiple=!1)})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-flow-branch-addor"]],viewQuery:function(t,e){if(1&t&&o.Gf(RK,5),2&t){let t;o.iGM(t=o.CRH())&&(e.dropdown=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",function(t){return e.closeMenuOnClickOutside(t)},!1,o.evT)},decls:3,vars:3,consts:[["class","custom-landing-page dropdown",3,"click",4,"ngIf"],["class","dropdown-menu mainDropDown show p-0",3,"click",4,"ngIf"],[1,"custom-landing-page","dropdown",3,"click"],[1,"d-flex","align-items-center","justify-content-between","w-100","gap-3","info-wrap","position-sticky","top-0","w-100"],[1,"d-flex","align-items-center","gap-3","justify-content-between","w-100","flow-cardheader"],[1,"theme-color","fw-semibold","mb-0"],["type","button",1,"btn","p-0","bg-transparent","border-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","24","height","25","viewBox","0 0 24 25","fill","none"],["d","M18 6.5L6 18.5M6 6.5L18 18.5","stroke","black","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"flow-card-body","scrollheight"],[1,"menuflow"],[1,"dropflow-wrap","d-flex","flex-column","gap-12","border-b"],[1,"label"],["type","button",1,"btn","flow-selected","dropdown-toggle",3,"ngClass","click"],[1,"text-truncate"],[1,"arrowDown"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","viewBox","0 0 24 24","fill","none"],["d","M6 9L12 15L18 9","stroke","black","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"dropflow-wrap","d-flex","flex-column","gap-12","mb-0"],[1,"flow-selected",3,"ngClass","click"],[1,"appImg"],["src","https://mediaconnect.appypie.com/media/icons/128x128/gmail.png","alt","","width","20","height","20"],[1,"appName","text-truncate"],[1,"flow-selected"],["contenteditable","true","data-placeholder","Enter text or insert data...",1,"form-control","contenteditable_text"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","d","M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z","clip-rule","evenodd"],[1,"dropflow-wrap","d-flex","flex-column","gap-12","mb-0","pb-0"],[1,"d-flex","align-items-center","gap-12"],["type","button",1,"btn","add_or_Button"],["stroke","currentColor","fill","currentColor","stroke-width","0","viewBox","0 0 20 20","aria-hidden","true","height","1em","width","1em","xmlns","http://www.w3.org/2000/svg"],[1,"continue","border_top","mt-0"],["data-track","continue with event","type","link","aria-disabled","true",1,"btn","btn-lg","w-100","mb-0"],[1,"dropdown-menu","mainDropDown","show","p-0",3,"click"],["dropdown",""],[1,"p-12"],[1,"listMenu-group"],[1,"active"],[1,"selectIcon"],["xmlns","http://www.w3.org/2000/svg","width","22","height","22","viewBox","0 0 24 24","fill","none"],["d","M8.99997 16.
11701L4.82997 12.0001L3.40997 13.4101L8.99997 19.0001L21 7.00009L19.59 5.59009L8.99997 16.1701Z","fill","#1D1D1D"],[1,""],[1,"alert-warning-theme"],[1,"mb-0"],["class","mb-0",4,"ngIf"],[1,"bg-white","p-12","d-flex","flex-column","gap-12","rounded-start","rounded-end"],[1,"searchapp"],["type","text","placeholder","Search",1,"form-control"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M17.5 17.5001L13.9166 13.9167","stroke","#1D1D1D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"listMenuMultiple-group","scrollheight"],[1,"toggleCollapse"],[1,"btn","w-100","d-flex","align-items-center","gap-2","p-0",3,"ngClass","click"],["src","https://mediaconnect.appypie.com/media/icons/128x128/gmail.png","alt","","width","30","height","30"],[1,"appName","text-truncate","fw-normal"],[1,"rotate"],["class","childlistMenuMultiple d-flex flex-column gap-1 ps-2 pt-2 pe-1",4,"ngIf"],[1,"childlistMenuMultiple","d-flex","flex-column","gap-1","ps-2","pt-2","pe-1"],[1,"listed-apps"],["src","https://mediaconnect.appypie.com/media/icons/128x128/gmail.png","alt","","width","15","height","15"],[1,"textInfo","text-truncate",3,"ngClass"],["type","button",1,"btn","MoreLess",3,"click"]],template:function(t,e){1&t&&(o.YNc(0,BK,79,9,"div",0),o.YNc(1,QK,27,1,"div",1),o.YNc(2,GK,23,4,"div",1)),2&t&&(o.Q6J("ngIf",e.isFlowBranch),o.xp6(1),o.Q6J("ngIf",e.showDropMenu),o.xp6(1),o.Q6J("ngIf",e.showDropMenuMultiple))},directives:[to.O5,to.mk],styles:[".p-12[_ngcontent-%COMP%]{padding:var(--cc-fontSize-12)}.flow-card-body[_ngcontent-%COMP%]{padding:var(--cc-fontSize-12);display:flex;flex-direction:column;grid-gap:var(--cc-fontSize-12);gap:var(--cc-fontSize-12);position:relative;max-height:76vh;min-height:1px;border-radius:0 0 8px 8px}.dropflow-wrap[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{display:flex;margin-bottom:0;font-size:var(--cc-fontSize-14);color:var(--cc-text-color);font-weight:600}.flow-selected[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #C7C8CA;display:flex;height:auto;padding:10px 12px;align-items:center;grid-gap:10px;gap:10px;align-self:stretch;color:var(--cc-text-color);width:100%;cursor:pointer;justify-content:space-between;font-weight:400;font-size:var(--cc-fontSize-14)}.namevalue[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;flex:1 0 0;overflow:hidden;color:var(--cc-text-color);text-overflow:ellipsis;font-size:var(--cc-fontSize-14);font-weight:400}.dropflow-wrap[_ngcontent-%COMP%]{padding-bottom:var(--cc-fontSize-12);margin-bottom:var(--cc-fontSize-12)}.border-b[_ngcontent-%COMP%]{border-bottom:1px solid #C7C8CA!important}.add_or_Button[_ngcontent-%COMP%]{color:var(--cc-text-color);font-size:var(--cc-fontSize-14);font-weight:500;line-height:20px;display:flex;padding:6px 12px;justify-content:center;align-items:center;grid-gap:4px;gap:4px;border-radius:4px;border:1px solid var(--Primary-Color);background:#F3F8FF}.flow-selected[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{color:var(--cc-text-color);font-size:var(--cc-fontSize-14);font-weight:400;border:0;outline:none;box-shadow:none;padding:0;border-radius:0}.flow-selected[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]::-moz-placeholder{color:var(--text-secondary)}.flow-selected[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]::placeholder{color:var(--text-secondary)}.flow-selected[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{border-color:#fff;background-color:#fff;box-shadow:none}.gap-12[_ngcontent-%COMP%]{grid-gap:var(--cc-fontSize-12);gap:var(--cc-fontSize-12)}.listMenu-group[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{display:flex;padding:8px var(--cc-fontSize-14);justify-content:flex-start;align-items:center;grid-gap:6px;gap:6px;align-self:stretch;border-radius:8px;background:#fff;white-space:nowrap;font-size:var(--cc-fontSize-14);color:var(--cc-text-color);font-weight:400;line-height:24px;
1cursor:pointer}.listMenu-group[_ngcontent-%COMP%] > li.active[_ngcontent-%COMP%], .listMenu-group[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:hover{background:#DAECFE}.arrowDown[_ngcontent-%COMP%], .rotate[_ngcontent-%COMP%]{transition:all .3s ease}.flow-selected.active[_ngcontent-%COMP%]   .arrowDown[_ngcontent-%COMP%], .toggleCollapse[_ngcontent-%COMP%]   .show[_ngcontent-%COMP%]   .rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}.selectIcon[_ngcontent-%COMP%]{opacity:0;visibility:hidden;display:inline-block}.listMenu-group[_ngcontent-%COMP%] > li.active[_ngcontent-%COMP%]   .selectIcon[_ngcontent-%COMP%], .listMenu-group[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:hover   .selectIcon[_ngcontent-%COMP%]{opacity:1;visibility:visible}.mainDropDown[_ngcontent-%COMP%]{min-width:unset;max-width:400px;width:100%;top:90px;left:500px}.flow-selected.active[_ngcontent-%COMP%]{border:1.5px solid var(--Primary-Color);background:#F6F9FF}.appName[_ngcontent-%COMP%]{flex:1}.appImg[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:20px;height:auto;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.listMenuMultiple-group[_ngcontent-%COMP%]{background-color:#f6f9ff;padding:8px;display:flex;flex-direction:column;grid-gap:8px;gap:8px}.listMenuMultiple-group[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   .appName[_ngcontent-%COMP%]{text-align:start}.childlistMenuMultiple[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex;align-items:baseline;flex-wrap:wrap}.listMenuMultiple-group[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > .appName[_ngcontent-%COMP%]{color:var(--cc-text-color);font-size:var(--cc-fontSize-14);margin:0 8px;font-weight:400;line-height:20px;flex:0 0 auto}.listMenuMultiple-group[_ngcontent-%COMP%]   .textInfo[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-secondary);text-overflow:ellipsis;font-size:var(--cc-fontSize-12);font-weight:400;line-height:18px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;white-space:normal}.listMenuMultiple-group[_ngcontent-%COMP%]   .open[_ngcontent-%COMP%]{-webkit-line-clamp:inherit;flex:auto}.MoreLess[_ngcontent-%COMP%]{overflow:hidden;color:var(--Primary-Color);text-overflow:ellipsis;font-size:var(--cc-fontSize-14);font-weight:500;line-height:20px;letter-spacing:.5px;-webkit-text-decoration-line:underline;text-decoration-line:underline;-webkit-text-decoration-style:solid;text-decoration-style:solid;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font;padding:0}.listed-apps[_ngcontent-%COMP%] > .appImg[_ngcontent-%COMP%]{width:15px}.searchapp[_ngcontent-%COMP%]{display:flex;height:40px;padding:10px 12px;align-items:center;align-self:stretch;border-radius:4px;border:1px solid var(--Primary-Color);background:#FFF;color:var(--text-secondary);font-size:var(--cc-fontSize-14);font-weight:400;line-height:20px}.searchapp[_ngcontent-%COMP%] > .form-control[_ngcontent-%COMP%]{background:#FFF;color:var(--cc-text-color);font-size:var(--cc-fontSize-14);font-weight:400;line-height:20px;border:0;padding:0}.alert-warning-theme[_ngcontent-%COMP%]{border-radius:4px;border:1px solid #FFD153;background:#FFFAF3;display:flex;padding:6px 12px;align-items:center;grid-gap:4px;gap:4px;color:var(--cc-text-color);font-size:var(--cc-fontSize-12);font-weight:400;line-height:20px;margin:0;margin-top:var(--cc-fontSize-12)}.contenteditable_text[_ngcontent-%COMP%]:empty:before{content:attr(data-placeholder);color:gray;pointer-events:none}html.dark[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%]{.flow-card-body {background: var(--card-bg) !important; color: var(--primary-text) !important;};.dropflow-wrap .label {color: var(--primary-text) !important;};.flow-selected {border: 1px solid var(--border-color) !important; background: var(--secondary-bg) !important; color: var(--primary-text) !important;};.namevalue {color: var(--primary-text) !important;};.border-b {border-bottom: 1px solid var(--border-color) !important;};.add_or_Button {color: var(--accent-color) !important; border: 1px solid var(--accent-color) !important; background: var(--tertiary-bg) !important;};.add_or_Button:hover {background: var(--accent-color) !important; color: var(--button-primary-text) !important;};.flow-selected .form-control {color: var(--primary-text) !important; background: transparent !important;};.flow-selected .form-control::-moz-placeholder {color: var(--muted-text) !important;};.flow-selected .form-control::placeholder {color: var(--muted-text) !important;};.flow-selected .form-control:focus {border-color: var(--input-focus-border) !important; background-color: var(--input-bg) !important;}}"]}),t})();const KK=["tooltip"];
1function XK(t,e){if(1&t&&(o.TgZ(0,"span",13),o.TgZ(1,"span",14),o.O4$(),o.TgZ(2,"svg",15),o._UZ(3,"path",16),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"span",17),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(5),o.Oqu(null==t.currentStepData?null:t.currentStepData.title)}}function tX(t,e){if(1&t&&(o.TgZ(0,"span",13),o.TgZ(1,"span",18),o.O4$(),o.TgZ(2,"svg",19),o._UZ(3,"path",20),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"span",17),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(5),o.Oqu(null==t.currentStepData?null:t.currentStepData.title)}}function eX(t,e){if(1&t&&(o.TgZ(0,"span",13),o.TgZ(1,"span",21),o.O4$(),o.TgZ(2,"svg",19),o._UZ(3,"path",22),o.qZA(),o.qZA(),o.kcU(),o.TgZ(4,"span",17),o._uU(5),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(5),o.Oqu(null==t.currentStepData?null:t.currentStepData.title)}}function nX(t,e){if(1&t&&(o.TgZ(0,"span",13),o.TgZ(1,"span",23),o.O4$(),o.TgZ(2,"svg",19),o._UZ(3,"path",24),o._UZ(4,"path",25),o.qZA(),o.qZA(),o.kcU(),o.TgZ(5,"span",17),o._uU(6),o.qZA(),o.qZA()),2&t){const t=o.oxw(2);o.xp6(6),o.Oqu(null==t.currentStepData?null:t.currentStepData.title)}}function iX(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",31),o.NdJ("click",function(){return o.CHM(t),o.oxw(3).previousStep()}),o.O4$(),o.TgZ(1,"svg",29),o._UZ(2,"path",32),o.qZA(),o.kcU(),o.TgZ(3,"span"),o._uU(4,"Back"),o.qZA(),o.qZA()}}const oX=function(t){return{"ms-auto justify-content-end":t}};function rX(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",26),o.YNc(1,iX,5,0,"button",27),o.TgZ(2,"button",28),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).nextStep()}),o.TgZ(3,"span"),o._uU(4,"Next"),o.qZA(),o.O4$(),o.TgZ(5,"svg",29),o._UZ(6,"path",30),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",1!==t.currentStep),o.xp6(1),o.Q6J("ngClass",o.VKq(2,oX,1===t.currentStep))}}function sX(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",26),o.TgZ(1,"button",33),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).previousStep()}),o.O4$(),o.TgZ(2,"svg",29),o._UZ(3,"path",32),o.qZA(),o.kcU(),o.TgZ(4,"span"),o._uU(5,"Back"),o.qZA(),o.qZA(),o.TgZ(6,"button",34),o.NdJ("click",function(){return o.CHM(t),o.oxw(2).goToFirstStep()}),o.TgZ(7,"span"),o._uU(8,"Get Started"),o.qZA(),o.O4$(),o.TgZ(9,"svg",29),o._UZ(10,"path",35),o.qZA(),o.qZA(),o.qZA()}}function aX(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",1),o.TgZ(1,"div",2,3),o.TgZ(3,"button",4),o.NdJ("click",function(){return o.CHM(t),o.oxw().skipGuide()}),o.O4$(),o.TgZ(4,"svg",5),o._UZ(5,"path",6),o.qZA(),o.qZA(),o.kcU(),o.TgZ(6,"div",7),o.TgZ(7,"h3",8),o.YNc(8,XK,6,1,"span",9),o.YNc(9,tX,6,1,"span",9),o.YNc(10,eX,6,1,"span",9),o.YNc(11,nX,7,1,"span",9),o.qZA(),o.TgZ(12,"p",10),o._uU(13),o.qZA(),o.qZA(),o.TgZ(14,"div",11),o.YNc(15,rX,7,4,"div",12),o.YNc(16,sX,11,0,"div",12),o.qZA(),o.qZA(),o.qZA()}if(2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngClass","position-"+((null==t.currentStepData?null:t.currentStepData.position)||"bottom")),o.xp6(7),o.Q6J("ngIf",1===t.currentStep),o.xp6(1),o.Q6J("ngIf",2===t.currentStep),o.xp6(1),o.Q6J("ngIf",3===t.currentStep),o.xp6(1),o.Q6J("ngIf",4===t.currentStep),o.xp6(2),o.Oqu(null==t.currentStepData?null:t.currentStepData.description),o.xp6(2),o.Q6J("ngIf",t.currentStep<t.totalSteps),o.xp6(1),o.Q6J("ngIf",t.currentStep===t.totalSteps)}}let cX=(()=>{class t{constructor(t,e,n,i){this.userGuideService=t,this.router=e,this.cdr=n,this.customerService=i,this.currentStep=0,this.currentStepData=null,this.isActive=!1,this.isCompleted=!1,this.totalSteps=4,this.progress=0,this.subscriptions=[],this.highlightElement=null,this.overlayElement=null,this.keyDownHandler=this.handleKeyDown.bind(this)}showGuideContent(){this.createOverlay(),1===this.currentStep?this.startStepChecker():setTimeout(()=>{this.highlightCurrentStep(),this.startStepChecker()},50)}ngOnInit(){this.subscriptions.push(this.userGuideService.currentStep$.subscribe(t=>{0!==t&&(this.currentStep=t,this.totalSteps=this.userGuideService.getTotalSteps(),this.currentStepData=this.userGuideService.getCurrentStepData(),this.progress=this.userGuideService.getProgress(),this.isActive&&this.currentStepData&&(1===t?setTimeout(()=>this.highlightCurrentStep(),600):setTimeout(()=>this.highlightCurrentStep(),50)),this.cdr.detectChanges())})),document.addEventListener("keydown",this.keyDownHandler),this.subscriptions.push(this.userGuideService.isActive$.subscribe(t=>{this.isActive=t,t?this.isMainLoaderVisible()?setTimeout(()=>{this.isMainLoaderVisible()||this.showGuideContent()},300):setTimeout(()=>{this.showGuideContent()},300):(this.stopStepChecker(),this.removeHighlight(),this.removeOverlay()),this.cdr.detectChanges()})),this.subscriptions.push(this.userGuideService.isCompleted$.subscribe(t=>{this.isCompleted=t,this.cdr.detectChanges()})),!this.isCompleted&&!localStorage.getItem("userGuideDisabled")&&(this.isOldUser()||this.checkAutoStart()),this.subscriptions.push(this.router.events.pipe((0,hi.h)(t=>t instanceof ui.m2)).subscribe(()=>{this.isActive&&setTimeout(()=>this.highlightCurrentStep(),300)}))}ngAfterViewInit(){this.isActive&&setTimeout(()=>this.highlightCurrentStep(),200),this.cdr.detectChanges()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.stopStepChecker(),this.removeHighlight(),document.removeEventListener("keydown",this.keyDownHandler)}handleKeyDown(t){if(this.isActive){if("Escape"===t.key)return this.skipGuide(),void t.preventDefault();"ArrowRight"===t.key||"ArrowDown"===t.key?this.currentStep<this.totalSteps&&(this.nextStep(),t.preventDefault()):("ArrowLeft"===t.key||"ArrowUp"===t.key)&&this.currentStep>1&&(this.previousStep(),t.preventDefault())}}isMainLoaderVisible(){if(document.querySelector("app-loader"))return!0;const t=document.getElementById("loader");if(t){const e=window.getComputedStyle(t);
1if("none"!==e.display&&"hidden"!==e.visibility&&"0"!==e.opacity)return!0}return!1}waitForLoaderToComplete(t,e=100,n=0){n>=e?setTimeout(()=>{t()},500):this.isMainLoaderVisible()?setTimeout(()=>{this.waitForLoaderToComplete(t,e,n+1)},100):setTimeout(()=>{this.isMainLoaderVisible()?this.waitForLoaderToComplete(t,e,n+1):t()},500)}isOldUser(){try{const t=this.customerService.GetCurrent();if(!t||!t._created_at)return!0;const e=new Date(t._created_at),n=new Date;return Math.floor((n.getTime()-e.getTime())/864e5)>1}catch(t){return console.warn("[UserGuide] Error checking user age:",t),!0}}checkAutoStart(){const t=localStorage.getItem("userGuideDisabled");if("true"===t||this.isOldUser())return;const e=localStorage.getItem("userGuideCompleted"),n=sessionStorage.getItem("userGuideStarted"),i=this.router.url.includes("/customeditor");!e&&!n&&i&&!t&&this.waitForLoaderToComplete(()=>{const t=this.router.url.includes("/customeditor"),e=!localStorage.getItem("userGuideCompleted"),n=!sessionStorage.getItem("userGuideStarted"),i="true"!==localStorage.getItem("userGuideDisabled");t&&e&&n&&i&&!this.isActive&&(this.startGuide(),sessionStorage.setItem("userGuideStarted","true"))})}startGuide(){this.isOldUser()||(this.userGuideService.isCompleted()&&this.userGuideService.resetGuide(),localStorage.removeItem("userGuideDisabled"),this.userGuideService.startGuide())}nextStep(){if(this.tooltipElement){const t=this.tooltipElement.nativeElement;t.style.display="none",t.style.visibility="hidden"}this.userGuideService.nextStep()}previousStep(){if(this.tooltipElement){const t=this.tooltipElement.nativeElement;t.style.display="none",t.style.visibility="hidden"}this.userGuideService.previousStep()}goToFirstStep(){this.userGuideService.completeGuide(),this.removeOverlay()}skipGuide(){this.userGuideService.skipGuide(),this.removeOverlay(),localStorage.setItem("userGuideDisabled","true")}isStepActionCompleted(t){switch(t){case"welcome_intro":default:return!0;case"select_trigger_app":return null!==document.querySelector('.landing-apps.active, .trigger-app-list.active, [data-app-selected="true"]');case"navigate_history":return this.router.url.includes("/history")}}showActionRequiredMessage(){}highlightCurrentStep(){var t,e,n,i,o;if(!this.currentStepData)return void console.warn("[UserGuide] No current step data available");this.removeHighlight();const r=this.currentStepData.selector.split(",").map(t=>t.trim());let s=null;if(1===this.currentStep&&"select_trigger_app"===(null===(t=this.currentStepData)||void 0===t?void 0:t.action)){const t=this.getSelectedTriggerAppName(),i=this.getSelectedTriggerEventName(),o=this.getSelectedActionAppName(),r=this.getSelectedActionEventName(),a=this.isTriggerAppSelected(),c=this.isTriggerEventSelected(),l=this.isActionAppSelected();if(this.isActionEventSelected(),a){if(a){if(c){let e=t;if(i&&(e=`${t} - ${i}`),l){let t=o||"your action app";r&&(t=`${o} - ${r}`),this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect."}else this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect."}else if(l){let e=o||"your action app";r&&(e=`${o} - ${r}`),this.currentStepData.description=`You've selected ${t} as your trigger app and ${e} as your action.\nTriggers decide when your automation starts.\nSelect a trigger event for ${t} from the list below to continue.`}else this.currentStepData.description=`You've selected ${t} as your trigger app.\nTriggers decide when your automation starts.\nSelect a trigger event for ${t} from the list below to continue.`;if(a){const t=document.querySelector("h2.theme-color.fw-semibold");if(t&&"Trigger Details"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())){const e=t.closest(".info-wrap, .flex-grow-1");s=e&&e instanceof HTMLElement?e:t,this.currentStepData.position="left",this.getSelectedTriggerAppName(),this.getSelectedTriggerEventName(),this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect.",console.log("[UserGuide] Found Trigger Details heading, positioning modal to the left")}else{const t=document.querySelectorAll(".trigger-event");for(const e of Array.from(t)){const t=e.querySelector("span");if(t&&"Trigger application:"===(null===(n=t.textContent)||void 0===n?void 0:n.trim())){s=e,this.currentStepData.position="left",this.get
1SelectedTriggerAppName(),this.getSelectedTriggerEventName(),this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect.",console.log("[UserGuide] Found trigger application section, positioning modal to the left");break}}}if(!s){const t=document.querySelector(".trigger-event .change-btn, .trgrevent-change .change-btn, a.btn.change-btn");if(t&&t instanceof HTMLElement){const e=t.closest(".trigger-event");s=e&&e instanceof HTMLElement?e:t,this.currentStepData.position="left",this.getSelectedTriggerAppName(),this.getSelectedTriggerEventName(),this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect.",console.log("[UserGuide] Found Change button, positioning modal to the left")}}if(!s){const t=document.querySelector(".trigger-event");t&&t instanceof HTMLElement&&(s=t,this.currentStepData.position="left",this.getSelectedTriggerAppName(),this.getSelectedTriggerEventName(),this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect.",console.log("[UserGuide] Found trigger-event section (fallback), positioning modal to the left"))}s||console.warn("[UserGuide] Trigger app is selected but could not find target element for positioning")}}}else this.currentStepData.description="Triggers define when your automation starts.\n\nSelect a trigger app from the right panel to begin building your Connect."}if(3===this.currentStep&&"activate_connect"===(null===(i=this.currentStepData)||void 0===i?void 0:i.action)&&(this.currentStepData.description=this.isConnectAlreadyActive()?"Great! Your Connect is already active and running.\n\nYour workflow is currently live and will execute automatically based on your trigger settings. You can manage the status using the dropdown menu.":'Once your trigger and actions are configured, click "Activate Connect" to make your automation live.\n\nYour workflow will now run automatically based on your trigger settings.'),!s)if(2===this.currentStep&&"add_action"===(null===(o=this.currentStepData)||void 0===o?void 0:o.action)){const t=document.querySelectorAll('.node-plusbtn, .center-btn, button[data-tooltip="Add New Step"], #add-new-step-button, .btn-primary.rounded-circle.node-plusbtn');t.length>0&&(s=t[t.length-1])}else for(const a of r){const t=document.querySelector(a);if(t&&t instanceof HTMLElement){s=t;break}}if(s)this.highlightElement=s,this.overlayElement||this.createOverlay(),!1!==this.currentStepData.highlight&&(this.highlightElement.style.position="relative",this.highlightElement.style.zIndex="10000",this.highlightElement.classList.add("guide-highlight"),this.scrollToElement(this.highlightElement)),setTimeout(()=>this.positionTooltip(),100);else{let t=0;const e=8,n=()=>{t++,t<e?setTimeout(()=>{let t=null;for(const e of r){const n=document.querySelector(e);if(n&&n instanceof HTMLElement){t=n;break}}t?this.highlightCurrentStep():n()},1===this.currentStep?350:500):this.showTooltipInCenter()};n()}}showTooltipInCenter(){if(!this.tooltipElement)return void console.warn("[UserGuide] Tooltip element not found");const t=this.tooltipElement.nativeElement;t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.display="block",t.style.visibility="visible"}createOverlay(){const t=document.querySelector(".guide-overlay");t&&t.remove();const e=document.createElement("div");e.className="guide-overlay",document.body.appendChild(e),this.overlayElement=e,e.addEventListener("click",t=>{t.stopPropagation()}),e.style.display="block",e.style.opacity="1",e.style.background="rgba(0, 0, 0, 0.75)"}removeHighlight(){this.highlightElement&&(this.highlightElement.classList.remove("guide-highlight"),this.highlightElement.style.zIndex="",this.highlightElement=null)}removeOverlay(){this.overlayElement&&(this.overlayElement.remove(),this.overlayElement=null)}scrollToElement(t){const e=t.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop;window.scrollTo({top:e.top+n-100,behavior:"smooth"})}positionTooltip(){var t,e,n;if(!this.tooltipElement)return;const i=this.tooltipElement.nativeElement;let o=(null===(t=this.currentStepData)||void 0===t?void 0:t.position)||"bottom";if(1===this.currentStep&&"select_trigger_app"===(null===(e=this.currentStepData)||void 0===e?void 0:e.action)){const t=this.isTriggerAppSelected(),e=this.isTriggerActionSelected();t&&e&&this.currentStepData.position&&(o=this.currentStepData.position)}if("center"===o)return i.style.top="50%",i.style.left="50%",i.style.transform="translate(-50%, -50%)",i.style.display="block",void(i.style.visibility="visible");if(!this.highlightElement)return;const r=this.highlightElement.getBoundingClientRect();i.style.display="block",i.style.visibility="hidden",i.style.top="-9999px",i.style.left="-9999px";const s=i.getBoundingClientRect(),a=16;let c=0,l=0;
1switch(o){case"top":c=r.top-s.height-30,l=r.left+r.width/2-s.width/2;break;case"bottom":c=r.bottom+30,l=r.left+r.width/2-s.width/2;break;case"left":c=1===this.currentStep&&"select_trigger_app"===(null===(n=this.currentStepData)||void 0===n?void 0:n.action)?r.top+70:r.top+r.height/2-s.height/2,l=r.left-s.width-20;break;case"right":c=r.top+r.height/2-s.height/2,l=r.right+20}const d=window.innerHeight-s.height-a,u=window.innerWidth-s.width-a;c=Math.max(16,Math.min(c,d)),l=Math.max(16,Math.min(l,u)),c+s.height>window.innerHeight-a&&(c=Math.max(16,window.innerHeight-s.height-a)),l+s.width>window.innerWidth-a&&(l=Math.max(16,window.innerWidth-s.width-a)),l<16&&(l=16),c<16&&(c=16),i.style.top=`${c}px`,i.style.left=`${l}px`,i.style.visibility="visible",i.style.transform="none",requestAnimationFrame(()=>{i.style.opacity="1"})}startStepChecker(){this.checkInterval=setInterval(()=>{var t;(null===(t=this.currentStepData)||void 0===t?void 0:t.action)&&"navigate_history"===this.currentStepData.action&&this.router.url.includes("/history")&&setTimeout(()=>this.userGuideService.nextStep(),1e3)},500)}stopStepChecker(){this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null)}onTriggerAppSelected(){var t;
11===this.currentStep&&"select_trigger_app"===(null===(t=this.currentStepData)||void 0===t?void 0:t.action)&&setTimeout(()=>this.userGuideService.nextStep(),500)}isTriggerAppSelected(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Trigger application:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const n of t){const t=n.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return!0}}}const e=document.querySelector(".trigger-event");if(e){const t=e.querySelector("h5");if(t&&t.textContent){const e=t.textContent.trim();if(""!==e&&"Event not selected"!==e&&!e.includes("applicationChanged"))return!0}}return!1}isTriggerEventSelected(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Trigger Event:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const e of t){const t=e.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return!0}}}return!1}isActionAppSelected(){var t,e;const n=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Action application:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(n.length>0)for(const o of n){const t=o.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return!0}}}const i=document.querySelectorAll(".node-item, .f-node, [fNode]");for(const o of Array.from(i)){const n=o.querySelector("h2");if(n&&("Action"===(null===(t=n.textContent)||void 0===t?void 0:t.trim())||(null===(e=n.textContent)||void 0===e?void 0:e.includes("Action")))){const t=o.textContent||"";if(t.includes("Select Action Event")||t.length>50)return!0}}return!1}isActionEventSelected(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Action Event:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const e of t){const t=e.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return!0}}}return!1}isTriggerActionSelected(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Trigger Event:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const e of t){const t=e.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return!0}}}return!1}getSelectedTriggerAppName(){var t;const e=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Trigger application:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(e.length>0)for(const o of e){const t=o.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return t}}}const n=document.querySelector(".trigger-event");if(n){const t=n.querySelector("h5");if(t&&t.textContent){const e=t.textContent.trim();if(""!==e&&"Event not selected"!==e&&!e.includes("applicationChanged"))return e}}const i=document.querySelectorAll(".node-item, .f-node, [fNode]");for(const o of Array.from(i)){const e=o.querySelector("h2");if(e&&"Trigger"===(null===(t=e.textContent)||void 0===t?void 0:t.trim())){const t=(o.textContent||"").match(/(MailChimp|NetSuite|Google Sheets|Slack|Zapier|Microsoft|Salesforce|HubSpot|Shopify|WordPress|WooCommerce|Stripe|PayPal|QuickBooks|Xero|Asana|Trello|Monday|Airtable|Notion|Dropbox|OneDrive|Gmail|Outlook|LinkedIn|Facebook|Twitter|Instagram|YouTube|TikTok|Pinterest|Snapchat|Discord|Telegram|WhatsApp|Zoom|Teams|Skype|Calendly|Typeform|JotForm|Wufoo|SurveyMonkey|Eventbrite|Meetup|Uber|Lyft|DoorDash|Grubhub|Postmates|Amazon|eBay|Etsy|Square|SquareSpace|Wix|Weebly|Squarespace|BigCommerce|Magento|PrestaShop|OpenCart|Volusion|3dcart|BigCartel|Ecwid|Shift4Shop|Sellfy|Gumroad|SendOwl|Paddle|Chargebee|Recurly|Stripe|PayPal|Braintree|Authorize\.net|Square|2Checkout|Adyen|Klarna|Afterpay|Sezzle|Affirm|Splitit|Quadpay|Zip|PayBright|PayPal Credit|Amazon Pay|Google Pay|Apple Pay|Samsung Pay|Microsoft Pay|Venmo|Zelle|Cash App|Square Cash|Payoneer|Skrill|Neteller|Paysafecard|ecoPayz|AstroPay|Perfect Money|Payeer|AdvCash|WebMoney|Qiwi|Yandex Money|Alipay|WeChat Pay|UnionPay|JCB|Discover|Diners Club|American Express|Visa|Mastercard|Maestro|Cirrus|Electron|Visa Electron|Visa Debit|Visa Credit|Mastercard Debit|Mastercard Credit|Amex|Diners|Discover|JCB|UnionPay|Alipay|WeChat Pay|PayPal|Str
1ipe|Square|2Checkout|Adyen|Klarna|Afterpay|Sezzle|Affirm|Splitit|Quadpay|Zip|PayBright|PayPal Credit|Amazon Pay|Google Pay|Apple Pay|Samsung Pay|Microsoft Pay|Venmo|Zelle|Cash App|Square Cash|Payoneer|Skrill|Neteller|Paysafecard|ecoPayz|AstroPay|Perfect Money|Payeer|AdvCash|WebMoney|Qiwi|Yandex Money|Alipay|WeChat Pay|UnionPay|JCB|Discover|Diners Club|American Express|Visa|Mastercard|Maestro|Cirrus|Electron|Visa Electron|Visa Debit|Visa Credit|Mastercard Debit|Mastercard Credit|Amex|Diners|Discover|JCB|UnionPay|Alipay|WeChat Pay)/i);if(t)return t[0]}}return null}getSelectedActionAppName(){var t,e;const n=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Action application:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(n.length>0)for(const o of n){const t=o.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return t}}}const i=document.querySelectorAll(".node-item, .f-node, [fNode]");for(const o of Array.from(i)){const n=o.querySelector("h2");if(n&&("Action"===(null===(t=n.textContent)||void 0===t?void 0:t.trim())||(null===(e=n.textContent)||void 0===e?void 0:e.includes("Action")))){const t=(o.textContent||"").split("\n").map(t=>t.trim()).filter(t=>t.length>0);for(const e of t)if("Action"!==e&&!e.includes("Select")&&!e.includes("Event")&&!e.includes("Add Notes")&&!e.includes("...")&&e.length>2&&e.length<50)return e}}return null}getSelectedTriggerEventName(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Trigger Event:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const e of t){const t=e.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return t}}}return null}isConnectAlreadyActive(){var t,e;try{const n=document.querySelector(".dropdown.ms-2.ms-lg-3");if(n&&(null===(t=n.textContent)||void 0===t?void 0:t.includes("Active")))return!0;const i=document.querySelector("#dropdownMenuButton.btn.dropdown-toggle.bg-transparent");if(i){const t=i.closest(".dropdown");if(t){const e=t.textContent||"";if(e.includes("Active")&&!e.includes("InActive"))return!0}}const o=document.querySelector(".dropdown-menu .dotpill.dotactive");if(o){const t=o.closest("li");if(t&&(null===(e=t.textContent)||void 0===e?void 0:e.includes("Active")))return!0}const r=document.querySelector("button.active_agent_Button");if(r){const t=r.closest(".position-relative");if(t){const e=window.getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility){const t=document.querySelector(".dropdown.ms-2.ms-lg-3");if(t){const e=window.getComputedStyle(t);if("none"!==e.display&&"hidden"!==e.visibility)return!0}}}}return!1}catch(n){return console.warn("[UserGuide] Error checking connect active status:",n),!1}}getSelectedActionEventName(){const t=Array.from(document.querySelectorAll("span")).filter(t=>{var e;return"Action Event:"===(null===(e=t.textContent)||void 0===e?void 0:e.trim())});if(t.length>0)for(const e of t){const t=e.closest(".trigger-event");if(t){const e=t.querySelector("h5");if(e&&e.textContent){const t=e.textContent.trim();if(""!==t&&"Event not selected"!==t&&!t.includes("applicationChanged"))return t}}}return null}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(LA),o.Y36(ui.F0),o.Y36(o.sBO),o.Y36(yo))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-user-guide"]],viewQuery:function(t,e){if(1&t&&o.Gf(KK,5),2&t){let t;o.iGM(t=o.CRH())&&(e.tooltipElement=t.first)}},decls:1,vars:1,consts:[["class","user-guide-container","role","dialog","aria-labelledby","guide-title","aria-describedby","guide-description","aria-modal","true",4,"ngIf"],["role","dialog","aria-labelledby","guide-title","aria-describedby","guide-description","aria-modal","true",1,"user-guide-container"],["role","tooltip",1,"guide-tooltip",3,"ngClass"],["tooltip",""],["type","button","aria-label","Close guide","title","Close",1,"guide-close-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 24 24","fill","none","aria-hidden","true"],["d","M18 6L6 18M6 6L18 18","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"guide-tooltip-body"],["id","guide-title",1,"guide-title"],["class","guide-title-with-icon",4,"ngIf"],["id","guide-description",1,"guide-description"],[1,"guide-tooltip-footer"],["class","guide-navigation-buttons",4,"ngIf"],[1,"guide-title-with-icon"],[1,"guide-step-icon","guide-step-icon-trigger"],["stroke","currentColor","fill","none","stroke-width","0","viewBox","0 0 15 15","height","20","width","20","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.8 1L2.74967 0.99997C2.52122 0.999752 2.32429 0.999564 2.14983 1.04145C1.60136 1.17312 1.17312 1.60136 1.04145 2.14983C0.999564 2.32429 0.999752 2.52122 0.99997 2.74967L1 2.8V5.2L0.99997 5.25033C0.999752 5.47878 0.999564 5.67572 1.04145 5.85017C1.17312 6.39864 1.60136 6.82688 2.14983 6.95856C2.32429 7.00044 2.52122 7.00025 2.74967 7.00003L2.8 7H5.2L5.25033 7.00003C5.47878 7.00025 5.67572 7.00044 5.85017 6.95856C6.39864 6.82688 6.82688 6.39864 6.95856 5.85017C7.00044 5.67572 7.00025 5.47878 7.00003 5.25033L7 5.2V2.8L7.00003 2.74967C7.00025 2.52122 7.00044 2.32429 6.95856 2.14983C6.82688 1.60136 6.39864 1.17312 5.85017 1.04145C5.67572 0.999564 5.47878 0.999752 5.25033 0.99997L5.2 1H2.8ZM2.38328 2.01382C2.42632 2.00348 2.49222 2 2.8 2H5.2C5.50779 2 5.57369 2.00348 5.61672 2.01382C5.79955 2.05771 5.94229 2.20045 5.98619 2.38328C5.99652 2.42632 6 2.49222 6 2.8V5.2C6 5.50779 5.99652 5.57369 5.98619 5.61672C5.94229 5.79955 5.79955 5.94229 5.61672 5.98619C5.57369 5.99652 5.50779 6 5.2 6H2.8C2.49222 6 2.42632 5.99652 2.38328 5.98619C2.20045 5.94229 2.05771 5.79955 2.01382 5.61672C2.00348 5.57369 2 5.50779 2 5.2V2.8C2 2.49222 2.00348 2.42632 2.01382 2.38328C2.05771 2.20045 2.20045 2.05771 2.38328 2.01382ZM9.8 1L9.74967 0.99997C9.52122 0.999752 9.32429 0.999564 9.14983 1.04145C8.60136 1.17312 8.17312 1.60136 8.04145 2.14983C7.99956 2.32429 7.99975 2.52122 7.99997 2.74967L8 2.8V5.2L7.99997 5.25033C7.99975 5.47878 7.99956 5.67572 8.04145 5.85017C8.17312 6.39864 8.60136 6.82688 9.14983 6.95856C9.32429 7.00044 9.52122 7.00025 9.74967 7.00003L9.8 7H12.2L12.2503 7.00003C12.4788 7.00025 12.6757 7.00044 12.8502 6.95856C13.3986 6.82688 13.8269 6.39864 13.9586 5.85017C14.0004 5.67572 14.0003 5.47878 14 5.25033L14 5.2V2.8L14 2.74967C14.0003 2.52122 14.0004 2.32429 13.9586 2.14983C13.8269 1.60136 13.3986 1.17312 12.8502 1.04145C12.6757 0.999564 12.4788 0.999752 12.2503 0.99997L12.2 1H9.8ZM9.38328 2.01382C9.42632 2.00348 9.49222 2 9.8 2H12.2C12.5078 2 12.5737 2.00348 12.6167 2.01382C12.7995 2.05771 12.9423 2.20045 12.9862 2.38328C12.9965 2.42632 13 2.49222 13 2.8V5.2C13 5.50779 12.9965 5.57369 12.9862 5.61672C12.9423 5.79955 12.7995 5.94229 12.6167 5.98619C12.5737 5.99652 12.5078 6 12.2 
16H9.8C9.49222 6 9.42632 5.99652 9.38328 5.98619C9.20045 5.94229 9.05771 5.79955 9.01382 5.61672C9.00348 5.57369 9 5.50779 9 5.2V2.8C9 2.49222 9.00348 2.42632 9.01382 2.38328C9.05771 2.20045 9.20045 2.05771 9.38328 2.01382ZM2.74967 7.99997L2.8 8H5.2L5.25033 7.99997C5.47878 7.99975 5.67572 7.99956 5.85017 8.04145C6.39864 8.17312 6.82688 8.60136 6.95856 9.14983C7.00044 9.32429 7.00025 9.52122 7.00003 9.74967L7 9.8V12.2L7.00003 12.2503C7.00025 12.4788 7.00044 12.6757 6.95856 12.8502C6.82688 13.3986 6.39864 13.8269 5.85017 13.9586C5.67572 14.0004 5.47878 14.0003 5.25033 14L5.2 14H2.8L2.74967 14C2.52122 14.0003 2.32429 14.0004 2.14983 13.9586C1.60136 13.8269 1.17312 13.3986 1.04145 12.8502C0.999564 12.6757 0.999752 12.4788 0.99997 12.2503L1 12.2V9.8L0.99997 9.74967C0.999752 9.52122 0.999564 9.32429 1.04145 9.14983C1.17312 8.60136 1.60136 8.17312 2.14983 8.04145C2.32429 7.99956 2.52122 7.99975 2.74967 7.99997ZM2.8 9C2.49222 9 2.42632 9.00348 2.38328 9.01382C2.20045 9.05771 2.05771 9.20045 2.01382 9.38328C2.00348 9.42632 2 9.49222 2 9.8V12.2C2 12.5078 2.00348 12.5737 2.01382 12.6167C2.05771 12.7995 2.20045 12.9423 2.38328 12.9862C2.42632 12.9965 2.49222 13 2.8 13H5.2C5.50779 13 5.57369 12.9965 5.61672 12.9862C5.79955 12.9423 5.94229 12.7995 5.98619 12.6167C5.99652 12.5737 6 12.5078 6 12.2V9.8C6 9.49222 5.99652 9.42632 5.98619 9.38328C5.94229 9.20045 5.79955 9.05771 5.61672 9.01382C5.57369 9.00348 5.50779 9 5.2 9H2.8ZM9.8 8L9.74967 7.99997C9.52122 7.99975 9.32429 7.99956 9.14983 8.04145C8.60136 8.17312 8.17312 8.60136 8.04145 9.14983C7.99956 9.32429 7.99975 9.52122 7.99997 9.74967L8 9.8V12.2L7.99997 12.2503C7.99975 12.4788 7.99956 12.6757 8.04145 12.8502C8.17312 13.3986 8.60136 13.8269 9.14983 13.9586C9.32429 14.0004 9.52122 14.0003 9.74967 14L9.8 14H12.2L12.2503 14C12.4788 14.0003 12.6757 14.0004 12.8502 13.9586C13.3986 13.8269 13.8269 13.3986 13.9586 12.8502C14.0004 12.6757 14.0003 12.4788 14 12.2503L14 12.2V9.8L14 9.74967C14.0003 9.52122 14.0004 9.32429 13.9586 9.14983C13.8269 8.60136 13.3986 8.17312 12.8502 8.04145C12.6757 7.99956 12.4788 7.99975 12.2503 7.99997L12.2 8H9.8ZM9.38328 9.01382C9.42632 9.00348 9.49222 9 9.8 9H12.2C12.5078 9 12.5737 9.00348 12.6167 9.01382C12.7995 9.05771 12.9423 9.20045 12.9862 9.38328C12.9965 9.42632 13 9.49222 13 9.8V12.2C13 12.5078 12.9965 12.5737 12.9862 12.6167C12.9423 12.7995 12.7995 12.9423 12.6167 12.9862C12.5737 12.9965 12.5078 13 12.2 13H9.8C9.49222 13 9.42632 12.9965 9.38328 12.9862C9.20045 12.9423 9.05771 12.7995 9.01382 12.6167C9.00348 12.5737 9 12.5078 9 12.2V9.8C9 9.49222 9.00348 9.42632 9.01382 9.38328C9.05771 9.20045 9.20045 9.05771 9.38328 9.01382Z","fill","currentColor"],[1,"guide-title-text"],[1,"guide-step-icon","guide-step-icon-action"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","viewBox","0 0 20 20","fill","none"],["d","M10 3.33333V16.6667M3.33333 10H16.6667","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"guide-step-icon","guide-step-icon-activate"],["d","M16.6667 5L7.5 14.1667L3.33333 10","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"guide-step-icon","guide-step-icon-history"],["d","M10 18.3333C14.6024 18.3333 18.3333 14.6024 18.3333 10C18.3333 5.39763 14.6024 1.66667 10 1.66667C5.39763 1.66667 1.66667 5.39763 1.66667 10C1.66667 14.6024 5.39763 18.3333 10 18.3333Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M10 5V10L13.3333 11.6667","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"guide-navigation-buttons"],["type","button","class","guide-btn guide-btn-secondary p-0","aria-label","Go back",3,"click",4,"ngIf"],["type","button","aria-label","Continue to next step",1,"guide-btn","guide-btn-primary",3,"ngClass","click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16","fill","none","aria-hidden","true"],["d","M6 4L10 8L6 12","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","button","aria-label","Go back",1,"guide-btn","guide-btn-secondary","p-0",3,"click"],["d","M10 12L6 8L10 4","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["type","button","aria-label","Go back",1,"guide-btn","guide-btn-secondary",3,"click"],["type","button","aria-label","Get started",1,"guide-btn","guide-btn-primary",3,"click"],["d","M13.3333 4L6 11.3333L2.66667 8","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,e){1&t&&o.YNc(0,aX,17,8,"div",0),2&t&&o.Q6J("ngIf",e.isActive&&e.currentStep>0)},directives:[to.O5,to.mk],styles:['.guide-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);z-index:9998;pointer-events:auto;backdrop-filter:blur(2px);animation:overlayFadeIn .3s ease-out;opacity:1}@keyframes overlayFadeIn{0%{opacity:0;background:rgba(0,0,0,0)}to{opacity:1;background:rgba(0,0,0,.75)}}.guide-highlight[_ngcontent-%COMP%]{position:relative;z-index:10000!important;background:#fff!important;box-shadow:0 0 0 4px #5371ff80,0 0 0 8px #5371ff4d,0 0 20px #5371ff66!important;border-radius:8px!important;animation:guide-pulse 2s ease-in-out infinite;pointer-events:auto!important}@keyframes guide-pulse{0%,to{box-shadow:0 0 0 4px #5371ff80,0 0 0 8px #5371ff4d,0 0 20px #5371ff66}50%{box-shadow:0 0 0 6px #5371ff99,0 0 0 12px #5371ff66,0 0 30px #5371ff99}}.user-guide-container[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;pointer-events:auto;background-color:#0009}.guide-tooltip[_ngcontent-%COMP%]{position:fixed;background:#ffffff;border-radius:12px;box-shadow:0 8px 32px #00000040,0 0 0 1px #0000001a;max-width:420px;min-width:340px;pointer-events:auto;z-index:10001;display:none;visibility:hidden;animation:guide-fadeIn .3s ease-out;color:#1d1d1d;padding:0;overflow:visible;border:1px solid rgba(255,255,255,.2)}
1.guide-tooltip.position-top[_ngcontent-%COMP%], .guide-tooltip.position-bottom[_ngcontent-%COMP%], .guide-tooltip.position-left[_ngcontent-%COMP%], .guide-tooltip.position-right[_ngcontent-%COMP%]{overflow:visible}.guide-tooltip.position-center[_ngcontent-%COMP%]{top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;max-width:480px;min-width:380px}.guide-tooltip[style*="display: block"][_ngcontent-%COMP%]{visibility:visible}@keyframes guide-fadeIn{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.guide-tooltip[_ngcontent-%COMP%]{opacity:0;transform:translateY(-6px);transition:opacity .25s ease-out,transform .25s ease-out}.guide-tooltip[style*="display: block"][_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.guide-tooltip[style*="display: block"][_ngcontent-%COMP%]:after{display:block!important;visibility:visible!important;opacity:1!important}.guide-close-btn[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;background:transparent;border:none;padding:4px;cursor:pointer;color:#74748a;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s ease;width:24px;height:24px;z-index:1}.guide-close-btn[_ngcontent-%COMP%]:hover{background:#f5f5f5;color:#1d1d1d}.guide-close-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #5371FF;outline-offset:2px}.guide-tooltip-body[_ngcontent-%COMP%]{padding:20px 20px 16px;border-top-left-radius:12px;border-top-right-radius:12px}.guide-tooltip.position-center[_ngcontent-%COMP%]   .guide-tooltip-body[_ngcontent-%COMP%]{text-align:center;padding:32px 32px 24px;border-top-left-radius:12px;border-top-right-radius:12px}.guide-tooltip.position-center[_ngcontent-%COMP%]   .guide-tooltip-footer[_ngcontent-%COMP%]{padding:0 32px 32px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.guide-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1d1d1d;margin:0 0 12px;line-height:1.4;letter-spacing:-.01em}.guide-title-with-icon[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:12px;gap:12px}.guide-step-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;flex-shrink:0}.guide-step-icon[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:20px;height:20px}.guide-step-icon-trigger[_ngcontent-%COMP%]{background:#F3F0FF;color:#5371ff}.guide-step-icon-action[_ngcontent-%COMP%]{background:#E6F3FF;color:#5371ff}.guide-step-icon-activate[_ngcontent-%COMP%]{background:#E6F7E6;color:#22c55e}.guide-step-icon-history[_ngcontent-%COMP%]{background:#FFF4E6;color:#f59e0b}.guide-title-text[_ngcontent-%COMP%]{flex:1}.guide-tooltip.position-center[_ngcontent-%COMP%]   .guide-title[_ngcontent-%COMP%]{font-size:22px;text-align:center;margin-bottom:16px;font-weight:700}.guide-description[_ngcontent-%COMP%]{font-size:13px;color:#4a5568;margin:0;line-height:1.4;font-weight:400;white-space:pre-line}.guide-tooltip-footer[_ngcontent-%COMP%]{padding:0 24px 24px;display:flex;justify-content:center;grid-gap:12px;gap:12px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.guide-tooltip.position-center[_ngcontent-%COMP%]   .guide-tooltip-footer[_ngcontent-%COMP%]{padding:0 32px 32px}.guide-welcome-buttons[_ngcontent-%COMP%], .guide-navigation-buttons[_ngcontent-%COMP%]{display:flex;grid-gap:12px;gap:12px;width:100%;justify-content:space-between}.guide-btn[_ngcontent-%COMP%]{flex:0 0 auto;padding:10px 24px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;outline:none;min-height:40px;display:flex;align-items:center;justify-content:center;grid-gap:8px;gap:8px}.guide-btn[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{flex-shrink:0;width:16px;height:16px}.guide-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block}.guide-btn-primary[_ngcontent-%COMP%]{background:#5371FF;color:#fff;box-shadow:0 2px 8px #5371ff40}.guide-btn-primary[_ngcontent-%COMP%]:hover{background:#4560E6;transform:translateY(-1px);box-shadow:0 4px 12px #5371ff59}.guide-btn-primary[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{color:#fff}.guide-btn-primary[_ngcontent-%COMP%]:active{transform:translateY(0)}.guide-btn-secondary[_ngcontent-%COMP%]{background:transparent;color:#74748a;border:none}.guide-btn-secondary[_ngcontent-%COMP%]:hover{background:transparent;color:#1d1d1d}.guide-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #5371FF;outline-offset:2px}.guide-got-it-btn[_ngcontent-%COMP%]{background:#f5f5f5;color:#1d1d1d;border:none;border-radius:6px;padding:10px 24px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;min-width:80px;outline:none}.guide-got-it-btn[_ngcontent-%COMP%]:hover{background:#e6e6e6;transform:translateY(-1px)}.guide-got-it-btn[_ngcontent-%COMP%]:active{transform:translateY(0)}.guide-got-it-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #5371FF;outline-offset:2px}.guide-tooltip.position-bottom[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-10px;left:50%;transform:translate(-50%);width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #ffffff;filter:drop-shadow(0 -2px 4px rgba(0,0,0,.2));z-index:10002;pointer-events:none}.guide-tooltip.position-top[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-10px;left:50%;transform:translate(-50%);width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #ffffff;filter:drop-shadow(0 2px 4px rgba(0,0,0,.2));z-index:10002;pointer-events:none}.guide-tooltip.position-left[_ngcontent-%COMP%]:after{content:"";position:absolute;right:-10px;top:50%;transform:translateY(-50%);width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #ffffff;filter:drop-shadow(2px 0 4px rgba(0,0,0,.2));z-index:10002;pointer-events:none}.guide-tooltip.position-right[_ngcontent-%COMP%]:after{content:"";position:absolute;
1left:-10px;top:50%;transform:translateY(-50%);width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #ffffff;filter:drop-shadow(-2px 0 4px rgba(0,0,0,.2));z-index:10002;pointer-events:none}.guide-tooltip.position-center[_ngcontent-%COMP%]:after{display:none!important}.guide-tooltip[_ngcontent-%COMP%]:after{display:block!important;visibility:visible!important;opacity:1!important}@media (max-width: 768px){.guide-tooltip[_ngcontent-%COMP%]{max-width:calc(100% - 32px);min-width:auto;left:16px!important;right:16px!important;max-height:calc(100vh - 32px);overflow-y:auto}.guide-tooltip-body[_ngcontent-%COMP%]{padding:16px 16px 12px}.guide-tooltip-footer[_ngcontent-%COMP%]{padding:0 16px 16px}.guide-title[_ngcontent-%COMP%]{font-size:15px}.guide-description[_ngcontent-%COMP%]{font-size:12px}.guide-got-it-btn[_ngcontent-%COMP%]{width:100%;padding:12px 24px}}@media (prefers-contrast: high){.guide-tooltip[_ngcontent-%COMP%]{border:2px solid #000}.guide-btn-primary[_ngcontent-%COMP%]{border:2px solid #5371FF}}@media (prefers-reduced-motion: reduce){.guide-tooltip[_ngcontent-%COMP%]{animation:none}.guide-highlight[_ngcontent-%COMP%]{animation:none}.guide-btn[_ngcontent-%COMP%]{transition:none}}.guide-highlight[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{pointer-events:none!important}']}),t})(),lX=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t,bootstrap:[DY]}),t.\u0275inj=o.cJS({providers:[mo.UZ,hc,{provide:o.qLn,useValue:_i({showDialog:!1})},{provide:ki,deps:[ui.F0]},{provide:o.ip1,useFactory:()=>()=>{},deps:[ki],multi:!0}],imports:[[i.b2,di.JF,GR,Xi.UX,Xi.u5,_c,ao,vK,mo.zk.forRoot(),JV.forRoot(),er.forRoot(),Cz,Wa,tv]]}),t})();o.B6R(LO,[to.O5,to.mk,m$,WK,Wm,wf,Bm,jm,zm,Xm,to.sg,Bh,zh,Rh,to.PC,Op,vp,Ep,Ip,Xi.Fj,Xi.nD,Xi.JJ,Xi.On,Xi.YN,Xi.Kr,hz,jK,Rz,FV,uV,FA,tr,hN,po,cX,KB],[]),go.N.sentryDsn&&function(t){const e=Object.assign({defaultIntegrations:ze().filter(t=>"TryCatch"!==t.name)},t);mt(e,"angular-ivy"),function(){const t=o.q4F&&o.q4F.major?parseInt(o.q4F.major,10):void 0;t&&(t<12&&fi&&s.kg.warn(`This Sentry SDK does not officially support Angular ${t}.`,"This SDK only supports Angular 12 and above.","If you're using Angular 10 or 11, please use `@sentry/angular` instead.","Otherwise, please consider upgrading your Angular version."),(0,r.v)("angular",{version:t}))}(),Ve(e)}({dsn:go.N.sentryDsn,environment:go.N.sentryEnv,tunnel:"/sentry-tunnel",integrations:[new class{constructor(t){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,function(){const t=(0,u.cu)();!t.__SENTRY__||(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=qi),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Ni),Mi||(Mi=!0,se(Ii),le(Ii)))}(),_n&&(this._hasSetTracePropagationTargets=!(!t||!t.tracePropagationTargets&&!t.tracingOrigins)),this.options=ht(ht({},Gi),t),void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=Qi(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&function(t,e){if(ji()&&vt.Z1){const n=function(t,e){return function(t){return ei("inp",t,ti,Yn)}(({metric:n})=>{if(void 0===n.value)return;const i=n.entries.find(t=>t.duration===n.value&&void 0!==Yi[t.name]),o=(0,r.s3)();if(!i||!o)return;const a=Yi[i.name],c=o.getOptions(),l=Li(vt.Z1+i.startTime),d=Li(n.value),u=void 0!==i.interactionId?t[i.interactionId]:void 0;if(void 0===u)return;const{routeName:p,parentContext:h,activeTransaction:g,user:f,replayId:m}=u,v=void 0!==f?f.email||f.id||f.ip_address:void 0,b=void 0!==g?g.getProfileId():void 0,x=new an({startTimestamp:l,endTimestamp:l+d,op:`ui.interaction.${a}`,name:(0,zt.Rt)(i.target),attributes:ht(ht(ht({release:c.release,environment:c.environment,transaction:p},void 0!==v&&""!==v?{user:v}:{}),void 0!==b?{profile_id:b}:{}),void 0!==m?{replay_id:m}:{}),exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),_=function(t,e,n){if(!cn(e))return!1;let i;return i=void 0!==t&&"function"==typeof e.tracesSampler?e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:ht(ht({},t.data),t.attributes),location:wn.location}):void 0!==t&&void 0!==t.sampled?t.sampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1,Pi(i)?!0===i?n:!1===i?0:i*n:(_n&&s.kg.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}(h,c,e);
1if(_&&Math.random()<_){const t=x?function(t,e){const n={sent_at:(new Date).toISOString()};return e&&(n.dsn=M(e)),K(n,t.map(Ei))}([x],o.getDsn()):void 0,e=o&&o.getTransport();e&&t&&e.send(t).then(null,t=>{_n&&s.kg.error("Error while sending interaction:",t)})}})}(t,e);return()=>{n()}}}(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&zn("longtask",({entries:t})=>{for(const e of t){const t=Ti();if(!t)return;const n=Li(vt.Z1+e.startTime),i=Li(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}}),this.options._experiments.enableInteractions&&zn("event",({entries:t})=>{for(const e of t){const t=Ti();if(!t)return;if("click"===e.name){const n=Li(vt.Z1+e.startTime),i=Li(e.duration),o={description:(0,zt.Rt)(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i},r=(0,zt.iY)(e.target);r&&(o.attributes={"ui.component_name":r}),t.startChild(o)}}}),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,e){this._getCurrentHub=e;const n=e().getClient(),i=n&&n.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:r,startTransactionOnPageLoad:a,markBackgroundTransactions:c,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:u,enableHTTPTimings:p,_experiments:h}=this.options,g=i&&i.tracePropagationTargets,f=g||this.options.tracePropagationTargets;_n&&this._hasSetTracePropagationTargets&&g&&s.kg.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},a,r),c&&(wn.document?wn.document.addEventListener("visibilitychange",()=>{const t=Ti();if(wn.document.hidden&&t){const e="cancelled",{op:n,status:i}=(0,We.XU)(t);_n&&s.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),i||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}}):_n&&s.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),h.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),si({traceFetch:l,traceXHR:d,tracePropagationTargets:f,shouldCreateSpanForRequest:u,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(_n&&s.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const e=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:i,finalTimeout:o,heartbeatInterval:r}=this.options,a="pageload"===t.op;let c;if(a){const e=a?Wi("sentry-trace"):"",n=a?Wi("baggage"):void 0,{traceId:i,dsc:o,parentSpanId:r,sampled:s}=(0,bn.pT)(e,n);c=Ji(ht({traceId:i,parentSpanId:r,parentSampled:s},t),{metadata:Ji(ht({},t.metadata),{dynamicSamplingContext:o}),trimEnd:!0})}else c=ht({trimEnd:!0},t);const l="function"==typeof n?n(c):c,d=void 0===l?Ji(ht({},c),{sampled:!1}):l;d.metadata=d.name!==c.name?Ji(ht({},d.metadata),{source:"custom"}):d.metadata,this._latestRoute.name=d.name,this._latestRoute.context=d,!1===d.sampled&&_n&&s.kg.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),_n&&s.kg.log(`[Tracing] Starting ${d.op} transaction on scope`);const{location:u}=wn,p=Ui(e,d,i,o,!0,{location:u},r,a);return a&&wn.document&&(wn.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(wn.document.readyState)&&p.sendAutoFinishSignal()}),["interactive","complete"].includes(wn.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=ji();if(!e||!wn.performance.getEntries||!vt.Z1)return;_n&&s.kg.log("[Tracing] Adding & adjusting spans using Performance API");const n=Li(vt.Z1),i=e.getEntries(),{op:o,start_timestamp:r}=(0,We.XU)(t);if(i.slice(Bi).forEach(e=>{const i=Li(e.startTime),o=Li(e.duration);if(!("navigation"===t.op&&r&&n+i<r))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>
1{zi(t,e,i,n)}),zi(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),zi(t,e,"fetch",n,"cache","domainLookupStart"),zi(t,e,"domainLookup",n,"DNS"),function(t,e,n){e.responseEnd&&(Di(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Li(e.requestStart),endTimestamp:n+Li(e.responseEnd)}),Di(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Li(e.responseStart),endTimestamp:n+Li(e.responseEnd)}))}(t,e,n)}(t,e,n);break;case"mark":case"paint":case"measure":{!function(t,e,n,i,o){const r=o+n;Di(t,{description:e.name,endTimestamp:r+i,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:r})}(t,e,i,o,n);const r=Mn(),a=e.startTime<r.firstHiddenTime;"first-paint"===e.name&&a&&(_n&&s.kg.log("[Measurements] Adding FP"),Hi.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&a&&(_n&&s.kg.log("[Measurements] Adding FCP"),Hi.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":!function(t,e,n,i,o,r){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const s=Wt(n),a={};Vi(a,e,"transferSize","http.response_transfer_size"),Vi(a,e,"encodedBodySize","http.response_content_length"),Vi(a,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus),s.protocol&&(a["url.scheme"]=s.protocol.split(":").pop()),s.host&&(a["server.address"]=s.host),a["url.same_origin"]=n.includes(wn.location.origin);const c=r+i,l=c+o;Di(t,{description:n.replace(wn.location.origin,""),endTimestamp:l,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}(t,e,e.name,i,o,n)}}),Bi=Math.max(i.length-1,0),function(t){const e=wn.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Fi(n.rtt)&&(Hi["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Fi(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Fi(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===o){(function(t){const e=yn();if(!e)return;const{responseStart:n,requestStart:i}=e;i<=n&&(_n&&s.kg.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-i,unit:"millisecond"})})(Hi),["fcp","fp","lcp"].forEach(t=>{if(!Hi[t]||!r||n>=r)return;const e=Hi[t].value,i=n+Li(e),o=Math.abs(1e3*(i-r));_n&&s.kg.log(`[Measurements] Normalized ${t} from ${e} to ${o} (${o-e})`),Hi[t].value=o});const e=Hi["mark.fid"];e&&Hi.fid&&(Di(t,{description:"first input delay",endTimestamp:e.value+Li(Hi.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:e.value}),delete Hi["mark.fid"]),"fcp"in Hi||delete Hi.cls,Object.keys(Hi).forEach(t=>{!function(t,e,n){const i=Ti();i&&i.setMeasurement(t,e,n)}(t,Hi[t].value,Hi[t].unit)}),function(t){Ri&&(_n&&s.kg.log("[Measurements] Adding LCP Data"),Ri.element&&t.setTag("lcp.element",(0,zt.Rt)(Ri.element)),Ri.id&&t.setTag("lcp.id",Ri.id),Ri.url&&t.setTag("lcp.url",Ri.url.trim().slice(0,200)),t.setTag("lcp.size",Ri.size)),$i&&$i.sources&&(_n&&s.kg.log("[Measurements] Adding CLS Data"),$i.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,(0,zt.Rt)(e.node))))}(t)}Ri=void 0,$i=void 0,Hi={}}(t)}),p}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,o="ui.action.click",r=Ti();if(r&&r.op&&["navigation","pageload"].includes(r.op))return void(_n&&s.kg.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub)return void(_n&&s.kg.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`));if(!this._latestRoute.name)return void(_n&&s.kg.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:c}=wn,l={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[Ke]:this._latestRoute.context?Ki(this._latestRoute.context):"url"}};t=Ui(a,l,e,n,!0,{location:c},i)};["click"].forEach(t=>{wn.document&&addEventListener(t,e,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:t})=>{const e=(0,r.s3)(),n=void 0!==e&&void 0!==e.getIntegrationByName?e.getIntegrationByName("Replay"):void 0,i=void 0!==n?n.getReplayId():void 0,o=Ti(),s=(0,r.nZ)(),a=void 0!==s?s.getUser():void 0;t.forEach(t=>{if("duration"in t){const e=t.interactionId;if(void 0===e)return;const n=this._interactionIdToRouteNameMapping[e],r=t.duration,s=t.startTime,c=Object.keys(this._interactionIdToRouteNameMapping),l=c.length>0?c.reduce((t,e)=>this._interactionIdToRouteNameMapping[t].duration<this._interactionIdToRouteNameMapping[e].duration?t:e):void 0;if("first-input"===t.entryType&&c.map(t=>this._interactionIdToRouteNameMapping[t]).some(t=>t.duration===r&&t.startTime===s)||!e)return;if(n)n.duration=Math.max(n.duration,r);else if(c.length<10||void 0===l||r>this._interactionIdToRouteNameMapping[l].duration){const t=this._latestRoute.name,n=this._latestRoute.context;t&&n&&(l&&Object.keys(this._interactionIdToRouteNameMapping).length>=10&&delete this._interactionIdToRouteNameMapping[l],this._interactionIdToRouteNameMapping[e]={routeName:t,duration:r,parentContext:n,user:a,activeTransaction:o,replayId:i,startTime:s})}}})};zn("event",t),zn("first-input",t)}}({routingInstrumentation:function(t,e=!0,n=!0){wi=!0,yi=t,Ai=n,e&&Tt&&Tt.location&&t({name:Tt.location.pathname,op:"pageload",origin:"auto.pageload.angular",attributes:{[Ke]:"url"}})}})],tracesSampleRate:.1,denyUrls:[/\/widget\/buildone\.js/]}),go.N.production&&(0,o.G48)(),i.q6().bootstrapModule(lX).catch(t=>console.error(t))},2321:function(t,e,n){"use strict";function i(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;
1a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s}function o(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function r(t,e,n,i){return new(n||(n=Promise))(function(o,r){function s(t){try{c(i.next(t))}catch(e){r(e)}}function a(t){try{c(i.throw(t))}catch(e){r(e)}}function c(t){t.done?o(t.value):function(t){return t instanceof n?t:new n(function(e){e(t)})}(t.value).then(s,a)}c((i=i.apply(t,e||[])).next())})}n.d(e,{gn:function(){return i},w6:function(){return o},mG:function(){return r}}),"function"==typeof SuppressedError&&SuppressedError}},function(t){t(t.s=4033)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.