| Current Path : /home/chauffn/vuzelia/2023/media/plg_convertformstools_conditionallogic/js/ |
| Current File : /home/chauffn/vuzelia/2023/media/plg_convertformstools_conditionallogic/js/builder.js |
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e,n){var r,o,i,c,u,a,l,f,s,p={}.toString;function y(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}r=n(1),o=n(2),i=n(3),c=n(4),u=n(5),a=function(t){return t},l=y((function(t,e){return p.call(e).slice(8,-1)===t})),f=y((function(t,e){var n,r=[];for(n=0;n<t;++n)r.push(e);return r})),c.empty=o.empty,c.slice=o.slice,c.take=o.take,c.drop=o.drop,c.splitAt=o.splitAt,c.takeWhile=o.takeWhile,c.dropWhile=o.dropWhile,c.span=o.span,c.breakStr=o.breakList,(s={Func:r,List:o,Obj:i,Str:c,Num:u,id:a,isType:l,replicate:f}).each=o.each,s.map=o.map,s.filter=o.filter,s.compact=o.compact,s.reject=o.reject,s.partition=o.partition,s.find=o.find,s.head=o.head,s.first=o.first,s.tail=o.tail,s.last=o.last,s.initial=o.initial,s.empty=o.empty,s.reverse=o.reverse,s.difference=o.difference,s.intersection=o.intersection,s.union=o.union,s.countBy=o.countBy,s.groupBy=o.groupBy,s.fold=o.fold,s.foldl=o.foldl,s.fold1=o.fold1,s.foldl1=o.foldl1,s.foldr=o.foldr,s.foldr1=o.foldr1,s.unfoldr=o.unfoldr,s.andList=o.andList,s.orList=o.orList,s.any=o.any,s.all=o.all,s.unique=o.unique,s.uniqueBy=o.uniqueBy,s.sort=o.sort,s.sortWith=o.sortWith,s.sortBy=o.sortBy,s.sum=o.sum,s.product=o.product,s.mean=o.mean,s.average=o.average,s.concat=o.concat,s.concatMap=o.concatMap,s.flatten=o.flatten,s.maximum=o.maximum,s.minimum=o.minimum,s.maximumBy=o.maximumBy,s.minimumBy=o.minimumBy,s.scan=o.scan,s.scanl=o.scanl,s.scan1=o.scan1,s.scanl1=o.scanl1,s.scanr=o.scanr,s.scanr1=o.scanr1,s.slice=o.slice,s.take=o.take,s.drop=o.drop,s.splitAt=o.splitAt,s.takeWhile=o.takeWhile,s.dropWhile=o.dropWhile,s.span=o.span,s.breakList=o.breakList,s.zip=o.zip,s.zipWith=o.zipWith,s.zipAll=o.zipAll,s.zipAllWith=o.zipAllWith,s.at=o.at,s.elemIndex=o.elemIndex,s.elemIndices=o.elemIndices,s.findIndex=o.findIndex,s.findIndices=o.findIndices,s.apply=r.apply,s.curry=r.curry,s.flip=r.flip,s.fix=r.fix,s.over=r.over,s.split=c.split,s.join=c.join,s.lines=c.lines,s.unlines=c.unlines,s.words=c.words,s.unwords=c.unwords,s.chars=c.chars,s.unchars=c.unchars,s.repeat=c.repeat,s.capitalize=c.capitalize,s.camelize=c.camelize,s.dasherize=c.dasherize,s.values=i.values,s.keys=i.keys,s.pairsToObj=i.pairsToObj,s.objToPairs=i.objToPairs,s.listsToObj=i.listsToObj,s.objToLists=i.objToLists,s.max=u.max,s.min=u.min,s.negate=u.negate,s.abs=u.abs,s.signum=u.signum,s.quot=u.quot,s.rem=u.rem,s.div=u.div,s.mod=u.mod,s.recip=u.recip,s.pi=u.pi,s.tau=u.tau,s.exp=u.exp,s.sqrt=u.sqrt,s.ln=u.ln,s.pow=u.pow,s.sin=u.sin,s.tan=u.tan,s.cos=u.cos,s.acos=u.acos,s.asin=u.asin,s.atan=u.atan,s.atan2=u.atan2,s.truncate=u.truncate,s.round=u.round,s.ceiling=u.ceiling,s.floor=u.floor,s.isItNaN=u.isItNaN,s.even=u.even,s.odd=u.odd,s.gcd=u.gcd,s.lcm=u.lcm,s.VERSION="1.1.2",t.exports=s},function(t,e){var n,r,o,i,c,u,a=[].slice,l={}.toString;function f(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}n=f((function(t,e){return t.apply(null,e)})),r=function(t){return f(t)},o=f((function(t,e,n){return t(n,e)})),i=function(t){return function(e){return function(){return t(e(e)).apply(null,arguments)}}((function(e){return function(){return t(e(e)).apply(null,arguments)}}))},c=f((function(t,e,n,r){return t(e(n),e(r))})),u=function(t){var e;return e={},function(){var n,r,o;return n=a.call(arguments),r=function(){var t,e,r,i=[];for(t=0,r=(e=n).length;t<r;++t)o=e[t],i.push(o+l.call(o).slice(8,-1));return i}().join(""),e[r]=r in e?e[r]:t.apply(null,n)}},t.exports={curry:r,flip:o,fix:i,apply:n,over:c,memoize:u}},function(t,e){var n,r,o,i,c,u,a,l,f,s,p,y,d,h,m,b,v,g,O,_,E,R,j,w,S,T,x,C,P,N,k,A,D,I,L,B,M,q,W,H,z,U,F,G,V,K,J,Q,Y,Z,$,X,tt,et,nt,rt,ot,it,ct,ut,at,lt,ft,st,pt,yt,dt,ht,mt,bt={}.toString,vt=[].slice;function gt(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}function Ot(t,e){for(var n=-1,r=e.length>>>0;++n<r;)if(t===e[n])return!0;return!1}function _t(t){return!t}n=gt((function(t,e){var n,r;for(n=0,r=e.length;n<r;++n)t(e[n]);return e})),r=gt((function(t,e){var n,r,o,i=[];for(n=0,r=e.length;n<r;++n)o=e[n],i.push(t(o));return i})),o=function(t){var e,n,r,o=[];for(e=0,n=t.length;e<n;++e)(r=t[e])&&o.push(r);return o},i=gt((function(t,e){var n,r,o,i=[];for(n=0,r=e.length;n<r;++n)t(o=e[n])&&i.push(o);return i})),c=gt((function(t,e){var n,r,o,i=[];for(n=0,r=e.length;n<r;++n)t(o=e[n])||i.push(o);return i})),u=gt((function(t,e){var n,r,o,i,c;for(n=[],r=[],o=0,i=e.length;o<i;++o)(t(c=e[o])?n:r).push(c);return[n,r]})),a=gt((function(t,e){var n,r,o;for(n=0,r=e.length;n<r;++n)if(t(o=e[n]))return o})),l=f=function(t){return t[0]},s=function(t){if(t.length)return t.slice(1)},p=function(t){return t[t.length-1]},y=function(t){if(t.length)return t.slice(0,-1)},d=function(t){return!t.length},h=function(t){return t.concat().reverse()},m=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;n<r;++n)Ot(o=t[n],e)||e.push(o);return e},b=gt((function(t,e){var n,r,o,i,c,u=[];for(n=[],r=0,o=e.length;r<o;++r)Ot(c=t(i=e[r]),n)||(n.push(c),u.push(i));return u})),v=g=gt((function(t,e,n){var r,o;for(r=0,o=n.length;r<o;++r)e=t(e,n[r]);return e})),O=_=gt((function(t,e){return v(t,e[0],e.slice(1))})),E=gt((function(t,e,n){var r;for(r=n.length-1;r>=0;--r)e=t(n[r],e);return e})),R=gt((function(t,e){return E(t,e[e.length-1],e.slice(0,-1))})),j=gt((function(t,e){var n,r,o;for(n=[],r=e;null!=(o=t(r));)n.push(o[0]),r=o[1];return n})),w=function(t){return[].concat.apply([],t)},S=gt((function(t,e){var n;return[].concat.apply([],function(){var r,o,i,c=[];for(r=0,i=(o=e).length;r<i;++r)n=o[r],c.push(t(n));return c}())})),T=function(t){var e;return[].concat.apply([],function(){var n,r,o,i=[];for(n=0,o=(r=t).length;n<o;++n)e=r[n],"Array"===bt.call(e).slice(8,-1)?i.push(T(e)):i.push(e);return i}())},x=function(t){var e,n,r,o,i,c,u;e=vt.call(arguments,1),n=[];t:for(r=0,o=t.length;r<o;++r){for(i=t[r],c=0,u=e.length;c<u;++c)if(Ot(i,e[c]))continue t;n.push(i)}return n},C=function(t){var e,n,r,o,i,c,u;e=vt.call(arguments,1),n=[];t:for(r=0,o=t.length;r<o;++r){for(i=t[r],c=0,u=e.length;c<u;++c)if(!Ot(i,e[c]))continue t;n.push(i)}return n},P=function(){var t,e,n,r,o,i,c,u;for(e=[],n=0,r=(t=vt.call(arguments)).length;n<r;++n)for(i=0,c=(o=t[n]).length;i<c;++i)Ot(u=o[i],e)||e.push(u);return e},N=gt((function(t,e){var n,r,o,i;for(n={},r=0,o=e.length;r<o;++r)(i=t(e[r]))in n?n[i]+=1:n[i]=1;return n})),k=gt((function(t,e){var n,r,o,i,c;for(n={},r=0,o=e.length;r<o;++r)(c=t(i=e[r]))in n?n[c].push(i):n[c]=[i];return n})),A=function(t){var e,n;for(e=0,n=t.length;e<n;++e)if(!t[e])return!1;return!0},D=function(t){var e,n;for(e=0,n=t.length;e<n;++e)if(t[e])return!0;return!1},I=gt((function(t,e){var n,r;for(n=0,r=e.length;n<r;++n)if(t(e[n]))return!0;return!1})),L=gt((function(t,e){var n,r;for(n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0})),B=function(t){return t.concat().sort((function(t,e){return t>e?1:t<e?-1:0}))},M=gt((function(t,e){return e.concat().sort(t)})),q=gt((function(t,e){return e.concat().sort((function(e,n){return t(e)>t(n)?1:t(e)<t(n)?-1:0}))})),W=function(t){var e,n,r;for(e=0,n=0,r=t.length;n<r;++n)e+=t[n];return e},H=function(t){var e,n,r;for(e=1,n=0,r=t.length;n<r;++n)e*=t[n];return e},z=U=function(t){var e,n,r;for(e=0,n=0,r=t.length;n<r;++n)e+=t[n];return e/t.length},F=function(t){var e,n,r,o,i;for(e=t[0],n=0,o=(r=t.slice(1)).length;n<o;++n)(i=r[n])>e&&(e=i);return e},G=function(t){var e,n,r,o,i;for(e=t[0],n=0,o=(r=t.slice(1)).length;n<o;++n)(i=r[n])<e&&(e=i);return e},V=gt((function(t,e){var n,r,o,i,c;for(n=e[0],r=0,i=(o=e.slice(1)).length;r<i;++r)t(c=o[r])>t(n)&&(n=c);return n})),K=gt((function(t,e){var n,r,o,i,c;for(n=e[0],r=0,i=(o=e.slice(1)).length;r<i;++r)t(c=o[r])<t(n)&&(n=c);return n})),J=Q=gt((function(t,e,n){var r,o;return r=e,[e].concat(function(){var e,i,c,u=[];for(e=0,c=(i=n).length;e<c;++e)o=i[e],u.push(r=t(r,o));return u}())})),Y=Z=gt((function(t,e){if(e.length)return J(t,e[0],e.slice(1))})),$=gt((function(t,e,n){return n=n.concat().reverse(),J(t,e,n).reverse()})),X=gt((function(t,e){if(e.length)return e=e.concat().reverse(),J(t,e[0],e.slice(1)).reverse()})),tt=gt((function(t,e,n){return n.slice(t,e)})),et=gt((function(t,e){return t<=0?e.slice(0,0):e.slice(0,t)})),nt=gt((function(t,e){return t<=0?e:e.slice(t)})),rt=gt((function(t,e){return[et(t,e),nt(t,e)]})),ot=gt((function(t,e){var n,r;if(!(n=e.length))return e;for(r=0;r<n&&t(e[r]);)r+=1;return e.slice(0,r)})),it=gt((function(t,e){var n,r;if(!(n=e.length))return e;for(r=0;r<n&&t(e[r]);)r+=1;return e.slice(r)})),ct=gt((function(t,e){return[ot(t,e),it(t,e)]})),ut=gt((function(t,e){return ct(function(){var t=arguments;return function(){var e,n;for(n=t[0].apply(this,arguments),e=1;e<t.length;++e)n=t[e](n);return n}}(t,_t),e)})),at=gt((function(t,e){var n,r,o,i,c,u;for(n=[],r=e.length,o=0,i=t.length;o<i&&(c=o,u=t[o],c!==r);++o)n.push([u,e[c]]);return n})),lt=gt((function(t,e,n){var r,o,i,c,u,a;for(r=[],o=n.length,i=0,c=e.length;i<c&&(u=i,a=e[i],u!==o);++i)r.push(t(a,n[u]));return r})),ft=function(){var t,e,n,r,o,i,c,u,a,l=[];for(e=void 0,n=0,r=(t=vt.call(arguments)).length;n<r;++n)e<=(i=(o=t[n]).length)||(e=i);for(n=0;n<e;++n){for(c=n,u=[],a=0,r=t.length;a<r;++a)o=t[a],u.push(o[c]);l.push(u)}return l},st=function(t){var e,n,r,o,i,c,u,a=[];for(n=void 0,r=0,o=(e=vt.call(arguments,1)).length;r<o;++r)n<=(c=(i=e[r]).length)||(n=c);for(r=0;r<n;++r)u=r,a.push(t.apply(null,l()));return a;function l(){var t,n,r,o=[];for(t=0,r=(n=e).length;t<r;++t)i=n[t],o.push(i[u]);return o}},pt=gt((function(t,e){return t<0?e[e.length+t]:e[t]})),yt=gt((function(t,e){var n,r,o;for(n=0,r=e.length;n<r;++n)if(o=n,e[n]===t)return o})),dt=gt((function(t,e){var n,r,o,i=[];for(n=0,r=e.length;n<r;++n)o=n,e[n]===t&&i.push(o);return i})),ht=gt((function(t,e){var n,r,o;for(n=0,r=e.length;n<r;++n)if(o=n,t(e[n]))return o})),mt=gt((function(t,e){var n,r,o,i=[];for(n=0,r=e.length;n<r;++n)o=n,t(e[n])&&i.push(o);return i})),t.exports={each:n,map:r,filter:i,compact:o,reject:c,partition:u,find:a,head:l,first:f,tail:s,last:p,initial:y,empty:d,reverse:h,difference:x,intersection:C,union:P,countBy:N,groupBy:k,fold:v,fold1:O,foldl:g,foldl1:_,foldr:E,foldr1:R,unfoldr:j,andList:A,orList:D,any:I,all:L,unique:m,uniqueBy:b,sort:B,sortWith:M,sortBy:q,sum:W,product:H,mean:z,average:U,concat:w,concatMap:S,flatten:T,maximum:F,minimum:G,maximumBy:V,minimumBy:K,scan:J,scan1:Y,scanl:Q,scanl1:Z,scanr:$,scanr1:X,slice:tt,take:et,drop:nt,splitAt:rt,takeWhile:ot,dropWhile:it,span:ct,breakList:ut,zip:at,zipWith:lt,zipAll:ft,zipAllWith:st,at:pt,elemIndex:yt,elemIndices:dt,findIndex:ht,findIndices:mt}},function(t,e){var n,r,o,i,c,u,a,l,f,s,p,y,d,h;function m(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}n=function(t){var e,n,r=[];for(e in t)n=t[e],r.push(n);return r},r=function(t){var e,n=[];for(e in t)n.push(e);return n},o=function(t){var e,n,r,o={};for(e=0,n=t.length;e<n;++e)o[(r=t[e])[0]]=r[1];return o},i=function(t){var e,n,r=[];for(e in t)n=t[e],r.push([e,n]);return r},c=m((function(t,e){var n,r,o,i={};for(n=0,r=t.length;n<r;++n)o=n,i[t[n]]=e[o];return i})),u=function(t){var e,n,r,o;for(r in e=[],n=[],t)o=t[r],e.push(r),n.push(o);return[e,n]},a=function(t){var e;for(e in t)return!1;return!0},l=m((function(t,e){var n;for(n in e)t(e[n]);return e})),f=m((function(t,e){var n,r,o={};for(n in e)r=e[n],o[n]=t(r);return o})),s=function(t){var e,n,r={};for(e in t)(n=t[e])&&(r[e]=n);return r},p=m((function(t,e){var n,r,o={};for(n in e)t(r=e[n])&&(o[n]=r);return o})),y=m((function(t,e){var n,r,o={};for(n in e)t(r=e[n])||(o[n]=r);return o})),d=m((function(t,e){var n,r,o,i;for(o in n={},r={},e)(t(i=e[o])?n:r)[o]=i;return[n,r]})),h=m((function(t,e){var n,r;for(n in e)if(t(r=e[n]))return r})),t.exports={values:n,keys:r,pairsToObj:o,objToPairs:i,listsToObj:c,objToLists:u,empty:a,each:l,map:f,filter:p,compact:s,reject:y,partition:d,find:h}},function(t,e){var n,r,o,i,c,u,a,l,f,s,p,y,d;function h(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}n=h((function(t,e){return e.split(t)})),r=h((function(t,e){return e.join(t)})),o=function(t){return t.length?t.split("\n"):[]},i=function(t){return t.join("\n")},c=function(t){return t.length?t.split(/[ ]+/):[]},u=function(t){return t.join(" ")},a=function(t){return t.split("")},l=function(t){return t.join("")},f=function(t){return t.split("").reverse().join("")},s=h((function(t,e){var n,r;for(n="",r=0;r<t;++r)n+=e;return n})),p=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},y=function(t){return t.replace(/[-_]+(.)?/g,(function(t,e){return(null!=e?e:"").toUpperCase()}))},d=function(t){return t.replace(/([^-A-Z])([A-Z]+)/g,(function(t,e,n){return e+"-"+(n.length>1?n:n.toLowerCase())})).replace(/^([A-Z]+)/,(function(t,e){return e.length>1?e+"-":e.toLowerCase()}))},t.exports={split:n,join:r,lines:o,unlines:i,words:c,unwords:u,chars:a,unchars:l,reverse:f,repeat:s,capitalize:p,camelize:y,dasherize:d}},function(t,e){var n,r,o,i,c,u,a,l,f,s,p,y,d,h,m,b,v,g,O,_,E,R,j,w,S,T,x,C,P,N,k,A;function D(t,e){var n;return function r(o){return t.length>1?function(){var i=o?o.concat():[];return n=e&&n||this,i.push.apply(i,arguments)<t.length&&arguments.length?r.call(n,i):t.apply(n,i)}:t}()}n=D((function(t,e){return t>e?t:e})),r=D((function(t,e){return t<e?t:e})),o=function(t){return-t},i=Math.abs,c=function(t){return t<0?-1:t>0?1:0},u=D((function(t,e){return~~(t/e)})),a=D((function(t,e){return t%e})),l=D((function(t,e){return Math.floor(t/e)})),f=D((function(t,e){var n;return(t%(n=e)+n)%n})),s=function(t){return 1/t},y=2*(p=Math.PI),d=Math.exp,h=Math.sqrt,m=Math.log,b=D((function(t,e){return Math.pow(t,e)})),v=Math.sin,g=Math.tan,O=Math.cos,_=Math.asin,E=Math.acos,R=Math.atan,j=D((function(t,e){return Math.atan2(t,e)})),w=function(t){return~~t},S=Math.round,T=Math.ceil,x=Math.floor,C=function(t){return t!=t},P=function(t){return t%2==0},N=function(t){return t%2!=0},k=D((function(t,e){var n;for(t=Math.abs(t),e=Math.abs(e);0!==e;)n=t%e,t=e,e=n;return t})),A=D((function(t,e){return Math.abs(Math.floor(t/k(t,e)*e))})),t.exports={max:n,min:r,negate:o,abs:i,signum:c,quot:u,rem:a,div:l,mod:f,recip:s,pi:p,tau:y,exp:d,sqrt:h,ln:m,pow:b,sin:v,tan:g,cos:O,acos:E,asin:_,atan:R,atan2:j,truncate:w,round:S,ceiling:T,floor:x,isItNaN:C,even:P,odd:N,gcd:k,lcm:A}},function(t,e,n){"use strict";n.r(e);var r={getRandomID:function(){return Math.random().toString(36).substr(2,9)},text:function(t){return Joomla.JText._("PLG_CONVERTFORMSTOOLS_CONDITIONALLOGIC_"+t)}};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}function a(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(f,React.Component);var e,n,o,a=u(f);function f(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),s(l(e=a.call(this,t)),"modelRules",(function(t){return{addGroup:function(){var n=e.state.conditions,o=n[t].rules,i=s({},r.getRandomID(),s({},r.getRandomID(),{}));o=Object.assign(o,i),e.setState({conditions:n})},add:function(n){var o=e.state.conditions,i=o[t].rules,c=s({},r.getRandomID(),{});i[n]=Object.assign(i[n],c),e.setState({conditions:o})},delete:function(n,r){var o=e.state.conditions,i=o[t].rules;delete i[n][r],!Object.keys(i[n]).length&&delete i[n],e.setState({conditions:o})},update:function(n,r,o){var i=e.state.conditions,c=i[t].rules[r][o];Object.assign(c,s({},n.target.name,n.target.value)),e.setState({conditions:i})}}})),s(l(e),"model",(function(t){return{add:function(n){var o=e.state.conditions,i=s({},r.getRandomID(),{});o[n][t]=Object.assign(o[n][t]||{},i),e.setState({conditions:o})},update:function(n,r,o){var i=e.state.conditions,c=i[o][t][r],u=Object.assign(c,s({},n.target.name,n.target.value));i[o][t][r]=u,e.setState({conditions:i})},delete:function(n,r){var o=e.state.conditions;delete o[r][t][n],e.setState({conditions:o})}}})),s(l(e),"modelCondition",{add:function(){var t=r.getRandomID(),n=s({},t,{label:r.text("NEW_CONDITION"),rules:s({},r.getRandomID(),s({},r.getRandomID(),{})),actions:s({},r.getRandomID(),{})}),o=Object.assign(e.state.conditions,n);e.setState({conditions:o}),e.modelCondition.show(t)},delete:function(t){var n=e.state.conditions;delete n[t],e.setState({conditions:n})},update:function(t,n,r){var o=e.state.conditions;o[t][n]=r,e.setState({conditions:o})},getActive:function(){var t=Object.keys(e.state.conditions);if(t)return t.includes(e.state.active_condition)?e.state.active_condition:t[0]},show:function(t){e.setState({active_condition:t})},copy:function(t){var n=r.getRandomID(),o=JSON.parse(JSON.stringify(e.state.conditions[t]));o.label=o.label+" (2)";var i=s({},n,o),c=Object.assign(e.state.conditions,i);e.setState({conditions:c}),e.modelCondition.show(n)}}),e.state={conditions:{},el:null,form_fields:null,active_condition:null},e.builder=$builder.get(0),e}return e=f,(n=[{key:"componentDidUpdate",value:function(){this.state.el.value=JSON.stringify(this.state.conditions)}},{key:"getFields",value:function(){return ConvertFormsBuilder.FieldsHelper.getFieldsArray()}},{key:"componentDidMount",value:function(){var t=this;this.setState({el:this.props.el,conditions:this.props.el.value?JSON.parse(this.props.el.value):{},form_fields:this.getFields()}),this.builder.addEventListener("fields.update",(function(){t.setState({form_fields:t.getFields()})}))}}])&&i(e.prototype,n),o&&i(e,o),f}();function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O(t);if(e){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(c,React.Component);var e,n,o,i=b(c);function c(){var t;d(this,c);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return _(g(t=i.call.apply(i,[this].concat(n))),"blur",(function(){t.props.condition.label||t.setLabel(r.text("NEW_CONDITION"))})),t}return e=c,(n=[{key:"render",value:function(){var t=this,e="conditionNav "+(this.props.active==this.props.id?"active":"");return React.createElement("div",{className:e},React.createElement("input",{type:"text",name:"label",placeholder:r.text("ENTER_TITLE"),value:this.props.condition.label,onBlur:this.blur,onFocus:function(){return t.props.modelCondition.show(t.props.id)},onChange:function(e){return t.props.modelCondition.update(t.props.id,"label",e.target.value)}}),React.createElement("div",{className:"toolbar"},React.createElement("button",{className:"cf-icon-cancel",onClick:function(){return t.props.modelCondition.delete(t.props.id)},title:r.text("DELETE_CONDITION")}),React.createElement("button",{className:"cf-icon-copy",onClick:function(){return t.props.modelCondition.copy(t.props.id)},title:r.text("COPY_CONDITION")})))}}])&&h(e.prototype,n),o&&h(e,o),c}();function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=C(t);if(e){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){if(e&&("object"===R(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&S(t,e)}(c,React.Component);var e,n,o,i=T(c);function c(){return j(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"getFields",value:function(){return this.props.inputsOnly?this.props.form_fields.filter((function(t){return!!t.name&&t})):this.props.form_fields}},{key:"render",value:function(){var t=this.getFields();return React.createElement("select",{name:"field",value:this.props.value,onChange:this.props.onChange,className:"fieldName"},React.createElement("option",{value:""},"- ",r.text("SELECT_FIELD")," -"),t&&t.map((function(t){return React.createElement("option",{key:t.id,"data-type":t.type,value:t.id},t.label)})))}}])&&w(e.prototype,n),o&&w(e,o),c}();function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){H(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=W(t);if(e){var o=W(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return q(t)}function q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function H(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(c,React.Component);var e,n,o,i=B(c);function c(){var t;D(this,c);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return H(q(t=i.call.apply(i,[this].concat(n))),"getOptions",(function(){if(!t.props.selected_field)return{};var e={show_field:r.text("SHOW_FIELD"),hide_field:r.text("HIDE_FIELD")},n={change_value:r.text("CHANGE_VALUE")},o={select_option:r.text("SELECT_OPTION"),deselect_option:r.text("DESELECT_OPTION"),show_option:r.text("SHOW_OPTION"),hide_option:r.text("HIDE_OPTION")};switch(t.props.selected_field.type){case"dropdown":delete o.deselect_option;break;case"hidden":return n}return t.props.selected_field.options?A(A({},e),o):(t.props.selected_field.name&&(e=A(A({},e),n)),e)})),t}return e=c,(n=[{key:"render",value:function(){var t=this.getOptions();return React.createElement("select",{name:"trigger",onChange:this.props.onChange,value:this.props.value,className:"trigger"},React.createElement("option",{value:""},"- ",r.text("SELECT_ACTION")," -"),Object.keys(t).map((function(e){return React.createElement("option",{key:e,value:e},t[e])})))}}])&&I(e.prototype,n),o&&I(e,o),c}();function U(t){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V(t,e){return(V=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function K(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Q(t);if(e){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return J(this,n)}}function J(t,e){if(e&&("object"===U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Q(t){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&V(t,e)}(c,React.Component);var e,n,o,i=K(c);function c(){return F(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){return this.props.selected_field&&this.props.selected_field.options?React.createElement("select",{className:"fieldValue",name:"arg",onChange:this.props.onChange,value:this.props.value||""},React.createElement("option",{value:""},"- ",r.text("SELECT_OPTION")," -"),this.props.selected_field.options.map((function(t){return React.createElement("option",{key:t.value,value:t.value},t.label)}))):React.createElement("input",{type:"text",name:"arg",placeholder:r.text("ENTER_VALUE"),onChange:this.props.onChange,value:this.props.value||"",className:"fieldValue"})}}])&&G(e.prototype,n),o&&G(e,o),c}();function Z(t){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tt(t,e){return(tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function et(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rt(t);if(e){var o=rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nt(this,n)}}function nt(t,e){if(e&&("object"===Z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ot=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&tt(t,e)}(c,React.Component);var e,n,o,i=et(c);function c(){return $(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=this,e=this.props.form_fields.find((function(e){return e.id==t.props.action.field}));return React.createElement("div",{className:"action options"},React.createElement(P,{value:this.props.action.field,form_fields:this.props.form_fields,onChange:this.props.onChange}),this.props.action.field&&React.createElement(z,{value:this.props.action.trigger,selected_field:e,onChange:this.props.onChange}),this.props.action.trigger&&!["show_field","hide_field"].includes(this.props.action.trigger)&&React.createElement(Y,{value:this.props.action.arg,selected_field:e,onChange:this.props.onChange}),React.createElement("span",{className:"clb-btns"},React.createElement("button",{className:"cf-icon-cancel",title:r.text("DELETE_ACTION"),onClick:this.props.onDelete})))}}])&&X(e.prototype,n),o&&X(e,o),c}();function it(t){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],c=!0,u=!1;try{for(n=n.call(t);!(c=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{c||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ut(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ut(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ft(t,e){return(ft=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function st(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yt(t);if(e){var o=yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pt(this,n)}}function pt(t,e){if(e&&("object"===it(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yt(t){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ft(t,e)}(c,React.Component);var e,n,o,i=st(c);function c(){return at(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=this,e=this.props.actions?Object.entries(this.props.actions).length:0;return React.createElement("div",{className:"actions"},e>0&&Object.entries(this.props.actions).map((function(e){var n=ct(e,2),r=n[0],o=n[1];return React.createElement(ot,{key:r,action:o,form_fields:t.props.form_fields,onAdd:function(){return t.props.model.add(t.props.condition_id)},onChange:function(e){return t.props.model.update(e,r,t.props.condition_id)},onDelete:function(){return t.props.model.delete(r,t.props.condition_id)}})})),React.createElement("button",{className:"cf-btn cf-icon-plus",title:r.text("ADD_ACTION"),onClick:function(){return t.props.model.add(t.props.condition_id)}}))}}])&<(e.prototype,n),o&<(e,o),c}();n(0);function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){wt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ot(t,e){return(Ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _t(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jt(t);if(e){var o=jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Et(this,n)}}function Et(t,e){if(e&&("object"===ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Rt(t)}function Rt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jt(t){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function wt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var St=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ot(t,e)}(c,React.Component);var e,n,o,i=_t(c);function c(){var t;vt(this,c);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return wt(Rt(t=i.call.apply(i,[this].concat(n))),"getOptions",(function(){if(!t.props.selected_field)return{};var e={empty:r.text("EMPTY"),equals:r.text("EQUALS"),selected:r.text("HAS_SELECTED"),contains:r.text("CONTAINS"),starts_with:r.text("STARTS_WITH"),ends_with:r.text("ENDS_WITH"),regex:r.text("REGEX"),not_empty:r.text("NOT_EMPTY"),not_equals:r.text("NOT_EQUALS"),not_selected:r.text("NOT_SELECTED"),not_contains:r.text("NOT_CONTAIN"),not_start_swith:r.text("NOT_START_WITH"),not_ends_with:r.text("NOT_END_WITH"),not_regex:r.text("NOT_REGEX"),less_than:r.text("LESS_THAN"),less_equals:r.text("LESS_THAN_EQUAL"),greater_than:r.text("GREATER_THAN"),greater_equals:r.text("GREATER_THAN_EQUAL")},n={total_checked_equals:r.text("TOTAL_CHECKED_EQUAL"),total_checked_less_than:r.text("TOTAL_CHECKED_LESS"),total_checked_less_equals:r.text("TOTAL_CHECKED_LESS_THAN_OR"),total_checked_greater_than:r.text("TOTAL_CHECKED_GREATER"),total_checked_greater_equals:r.text("TOTAL_CHECKED_GREATER_THAN_OR")};switch(t.props.selected_field.type){case"email":delete e.less_than,delete e.less_equals,delete e.greater_than,delete e.greater_equals;break;case"checkbox":e=bt(bt({},e),n);break;case"termsofservice":return{is_checked:r.text("IS_CHECKED"),not_checked:r.text("NOT_CHECKED")};case"dropdown":case"radio":delete e.selected,delete e.not_selected}return t.props.selected_field.options?(delete e.contains,delete e.not_contains):(delete e.selected,delete e.not_selected),e})),t}return e=c,(n=[{key:"render",value:function(){var t=this.getOptions();return React.createElement("select",{name:"comparator",onChange:this.props.onChange,value:this.props.value,className:"operator"},React.createElement("option",{value:""},"- ",r.text("SELECT_OPERATOR")," -"),Object.keys(t).map((function(e){return React.createElement("option",{key:e,value:e},t[e])})))}}])&>(e.prototype,n),o&>(e,o),c}();function Tt(t){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=At(t);if(e){var o=At(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kt(this,n)}}function kt(t,e){if(e&&("object"===Tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function At(t){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pt(t,e)}(c,React.Component);var e,n,o,i=Nt(c);function c(){return xt(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=this,e=this.props.form_fields.find((function(e){return e.id==t.props.rule.field}));return React.createElement("div",{className:"rule options"},React.createElement(P,{value:this.props.rule.field,form_fields:this.props.form_fields,onChange:this.props.onChange,inputsOnly:"true"}),this.props.rule.field&&React.createElement(St,{value:this.props.rule.comparator,selected_field:e,onChange:this.props.onChange}),this.props.rule.comparator&&!["is_checked","not_checked","empty","not_empty"].includes(this.props.rule.comparator)&&React.createElement(Y,{value:this.props.rule.arg,selected_field:this.props.rule.comparator.includes("selected")||["equals","not_equals"].includes(this.props.rule.comparator)?e:"",onChange:this.props.onChange}),React.createElement("span",{className:"clb-btns"},React.createElement("button",{className:"cf-icon-cancel",title:r.text("DELETE_RULE"),onClick:this.props.onDelete})))}}])&&Ct(e.prototype,n),o&&Ct(e,o),c}();function It(t){return(It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mt(t,e){return(Mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ht(t);if(e){var o=Ht(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wt(this,n)}}function Wt(t,e){if(e&&("object"===It(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ht(t){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Mt(t,e)}(c,React.Component);var e,n,o,i=qt(c);function c(){return Lt(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=this,e=this.props.rules,n=this.props.model(this.props.condition_id);return React.createElement("div",{className:"rules"},Object.keys(e).map((function(o,i){return React.createElement("div",{className:"ruleGroup",key:o},Object.keys(e[o]).map((function(r){return React.createElement(Dt,{key:r,rule:e[o][r],condition:t.props.condition,form_fields:t.props.form_fields,onChange:function(t){return n.update(t,o,r)},onDelete:function(){return n.delete(o,r)}})})),React.createElement("button",{className:"cf-btn cf-icon-plus add-rule",title:r.text("ADD_RULE"),onClick:function(){return n.add(o)}}),Object.keys(e).length==i+1&&React.createElement("button",{style:{marginLeft:"3px"},className:"cf-btn cf-icon-plus add-rule-group",title:r.text("ADD_RULE_GROUP"),onClick:function(){return n.addGroup(t.props.condition_id)}}," ",r.text("ADD_RULE_GROUP")))})),0==Object.keys(e).length&&React.createElement("button",{className:"cf-btn cf-icon-plus",title:r.text("ADD_RULE"),onClick:function(){return n.addGroup(t.props.condition_id)}}))}}])&&Bt(e.prototype,n),o&&Bt(e,o),c}();function Ut(t){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vt(t,e){return(Vt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Yt(t);if(e){var o=Yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jt(this,n)}}function Jt(t,e){if(e&&("object"===Ut(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Qt(t)}function Qt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yt(t){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vt(t,e)}(c,React.Component);var e,n,o,i=Kt(c);function c(){var t;Ft(this,c);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Zt(Qt(t=i.call.apply(i,[this].concat(n))),"getFieldsUsedInRules",(function(){var e=[];return Object.values(t.props.condition.rules).forEach((function(t){Object.values(t).forEach((function(t){var n=parseInt(t.field);t.field&&!e.includes(n)&&e.push(n)}))})),e})),Zt(Qt(t),"getValidFieldsForActions",(function(){var e=t.getFieldsUsedInRules();return t.props.form_fields.filter((function(t){return!e.includes(t.id)}))})),t}return e=c,(n=[{key:"render",value:function(){var t=this.props.condition,e="condition "+(this.props.active==this.props.id?"active":""),n=this.getValidFieldsForActions();return React.createElement("div",{className:e},React.createElement("div",{className:"conditionSection rules"},React.createElement("h3",null,r.text("RULES_ALIAS")),React.createElement(zt,{rules:t.rules,condition:t,condition_id:this.props.id,model:this.props.modelRule,form_fields:this.props.form_fields})),React.createElement("div",{className:"conditionSection actions"},React.createElement("h3",null,r.text("ACTIONS_ALIAS")),React.createElement(dt,{actions:t.actions,condition_id:this.props.id,model:this.props.modelAction,form_fields:n})),React.createElement("div",{className:"conditionSection actionselse"},React.createElement("h3",null,r.text("CONDITION_ELSE")),React.createElement(dt,{actions:t.else,condition_id:this.props.id,model:this.props.modelActionElse,form_fields:n})))}}])&&Gt(e.prototype,n),o&&Gt(e,o),c}();function Xt(t){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function te(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],c=!0,u=!1;try{for(n=n.call(t);!(c=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{c||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ee(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oe(t,e){return(oe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ie(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ue(t);if(e){var o=ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(t,e){if(e&&("object"===Xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ue(t){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ae=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&oe(t,e)}(c,t);var e,n,o,i=ie(c);function c(){return ne(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=this,e=this.modelCondition.getActive(),n="clb "+(e?"":"clb-empty");return React.createElement("div",{className:n},React.createElement("div",{className:"clb-left"},React.createElement("div",{className:"conditionNavList"},Object.entries(this.state.conditions).map((function(n){var r=te(n,2),o=r[0],i=r[1];return React.createElement(E,{key:o,id:o,active:e,condition:i,modelCondition:t.modelCondition})}))),!e&&React.createElement("div",null,React.createElement("div",null,r.text("NO_CONDITIONS")),React.createElement("div",{className:"cf-icon-unhappy"})),React.createElement("button",{className:"cf-btn cf-icon-plus",onClick:this.modelCondition.add}," ",r.text("ADD_CONDITION"))),React.createElement("div",{className:"clb-right"},React.createElement("div",{className:"conditions"},Object.entries(this.state.conditions).map((function(n){var r=te(n,2),o=r[0],i=r[1];return React.createElement($t,{key:o,id:o,active:e,modelCondition:t.modelCondition,modelRule:t.modelRules,modelAction:t.model("actions"),modelActionElse:t.model("else"),condition:i,form_fields:t.state.form_fields})})))))}}])&&re(e.prototype,n),o&&re(e,o),c}(p);function le(t){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function se(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pe(t,e){return(pe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ye(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=he(t);if(e){var o=he(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}function de(t,e){if(e&&("object"===le(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function he(t){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var me=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pe(t,e)}(c,t);var e,n,o,i=ye(c);function c(){return fe(this,c),i.apply(this,arguments)}return e=c,(n=[{key:"render",value:function(){var t=Object.keys(this.state.conditions)[0],e=this.state.conditions[t];return React.createElement("div",{className:"conditions"},!t&&React.createElement("div",null,React.createElement("div",null,r.text("NO_CONDITIONS")),React.createElement("div",{className:"cf-icon-unhappy"}),React.createElement("button",{className:"cf-btn cf-icon-plus",onClick:this.modelCondition.add}," ",r.text("ADD_CONDITION"))),t&&React.createElement("div",{class:"conditionSection"},React.createElement(zt,{rules:e.rules,condition:e,condition_id:t,model:this.modelRules,form_fields:this.state.form_fields})))}}])&&se(e.prototype,n),o&&se(e,o),c}(p);document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".clstart").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),ReactDOM.render(React.createElement(ae,{el:t.target.nextElementSibling}),document.getElementById("clb-root"))}))})),document.querySelectorAll(".clb").forEach((function(t){ReactDOM.render(React.createElement(me,{el:t.querySelector("input")}),t.querySelector("div"))}))}))}]);