impaktapps-ui-builder 0.0.274 → 0.0.275
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/impaktapps-ui-builder.es.js +5 -1
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/services/getNavigationHistory.ts +6 -1
|
@@ -24,5 +24,5 @@ __p += '`),H&&(b+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+b+`return __p
|
|
27
|
-
}`;var D=rl(function(){return k(s,I+"return "+b).apply(i,u)});if(D.source=b,hi(D))throw D;return D}function ug(e){return U(e).toLowerCase()}function cg(e){return U(e).toUpperCase()}function pg(e,t,n){if(e=U(e),e&&(n||t===i))return po(e);if(!e||!(t=ye(t)))return e;var r=Ee(e),a=Ee(t),s=fo(r,a),u=go(r,a)+1;return lt(r,s,u).join("")}function fg(e,t,n){if(e=U(e),e&&(n||t===i))return e.slice(0,mo(e)+1);if(!e||!(t=ye(t)))return e;var r=Ee(e),a=go(r,Ee(t))+1;return lt(r,0,a).join("")}function dg(e,t,n){if(e=U(e),e&&(n||t===i))return e.replace(hr,"");if(!e||!(t=ye(t)))return e;var r=Ee(e),a=fo(r,Ee(t));return lt(r,a).join("")}function gg(e,t){var n=al,r=ll;if(Y(t)){var a="separator"in t?t.separator:a;n="length"in t?E(t.length):n,r="omission"in t?ye(t.omission):r}e=U(e);var s=e.length;if(At(e)){var u=Ee(e);s=u.length}if(n>=s)return e;var p=n-Ft(r);if(p<1)return r;var d=u?lt(u,0,p).join(""):e.slice(0,p);if(a===i)return d+r;if(u&&(p+=d.length-p),mi(a)){if(e.slice(p).search(a)){var y,v=d;for(a.global||(a=Er(a.source,U(Di.exec(a))+"g")),a.lastIndex=0;y=a.exec(v);)var b=y.index;d=d.slice(0,b===i?p:b)}}else if(e.indexOf(ye(a),p)!=p){var C=d.lastIndexOf(a);C>-1&&(d=d.slice(0,C))}return d+r}function hg(e){return e=U(e),e&&Ll.test(e)?e.replace(Ti,Gs):e}var mg=Wt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),bi=ia("toUpperCase");function nl(e,t,n){return e=U(e),t=n?i:t,t===i?Os(e)?qs(e):Fs(e):e.match(t)||[]}var rl=P(function(e,t){try{return he(e,i,t)}catch(n){return hi(n)?n:new T(n)}}),yg=Ze(function(e,t){return Ce(t,function(n){n=Ne(n),qe(e,n,di(e[n],e))}),e});function vg(e){var t=e==null?0:e.length,n=B();return e=t?K(e,function(r){if(typeof r[1]!="function")throw new Se(w);return[n(r[0]),r[1]]}):[],P(function(r){for(var a=-1;++a<t;){var s=e[a];if(he(s[0],this,r))return he(s[1],this,r)}})}function bg(e){return Gu(Ie(e,q))}function _i(e){return function(){return e}}function _g(e,t){return e==null||e!==e?t:e}var xg=aa(),wg=aa(!0);function de(e){return e}function xi(e){return Wo(typeof e=="function"?e:Ie(e,q))}function Cg(e){return Oo(Ie(e,q))}function Sg(e,t){return ko(e,Ie(t,q))}var Lg=P(function(e,t){return function(n){return nn(n,e,t)}}),Ig=P(function(e,t){return function(n){return nn(e,n,t)}});function wi(e,t,n){var r=te(t),a=On(t,r);n==null&&!(Y(t)&&(a.length||!r.length))&&(n=t,t=e,e=this,a=On(t,te(t)));var s=!(Y(n)&&"chain"in n)||!!n.chain,u=Xe(e);return Ce(a,function(p){var d=t[p];e[p]=d,u&&(e.prototype[p]=function(){var y=this.__chain__;if(s||y){var v=e(this.__wrapped__),b=v.__actions__=ce(this.__actions__);return b.push({func:d,args:arguments,thisArg:e}),v.__chain__=y,v}return d.apply(e,tt([this.value()],arguments))})}),e}function Bg(){return re._===this&&(re._=Vs),this}function Ci(){}function Ag(e){return e=E(e),P(function(t){return Uo(t,e)})}var Fg=ei(K),Tg=ei(ao),Rg=ei(Lr);function il(e){return li(e)?Ir(Ne(e)):ac(e)}function Eg(e){return function(t){return e==null?i:mt(e,t)}}var Dg=sa(),Pg=sa(!0);function Si(){return[]}function Li(){return!1}function Mg(){return{}}function Wg(){return""}function Hg(){return!0}function Og(e,t){if(e=E(e),e<1||e>je)return[];var n=Oe,r=oe(e,Oe);t=B(t),e-=Oe;for(var a=Fr(r,t);++n<e;)t(n);return a}function kg(e){return R(e)?K(e,Ne):ve(e)?[e]:ce(Sa(U(e)))}function Ug(e){var t=++Xs;return U(e)+t}var Ng=$n(function(e,t){return e+t},0),zg=ti("ceil"),Gg=$n(function(e,t){return e/t},1),$g=ti("floor");function Kg(e){return e&&e.length?Hn(e,de,Ur):i}function qg(e,t){return e&&e.length?Hn(e,B(t,2),Ur):i}function Yg(e){return uo(e,de)}function Zg(e,t){return uo(e,B(t,2))}function Jg(e){return e&&e.length?Hn(e,de,$r):i}function Xg(e,t){return e&&e.length?Hn(e,B(t,2),$r):i}var Qg=$n(function(e,t){return e*t},1),Vg=ti("round"),jg=$n(function(e,t){return e-t},0);function eh(e){return e&&e.length?Ar(e,de):0}function th(e,t){return e&&e.length?Ar(e,B(t,2)):0}return l.after=Cf,l.ary=Ma,l.assign=cd,l.assignIn=Ja,l.assignInWith=rr,l.assignWith=pd,l.at=fd,l.before=Wa,l.bind=di,l.bindAll=yg,l.bindKey=Ha,l.castArray=Mf,l.chain=Ea,l.chunk=Gc,l.compact=$c,l.concat=Kc,l.cond=vg,l.conforms=bg,l.constant=_i,l.countBy=jp,l.create=dd,l.curry=Oa,l.curryRight=ka,l.debounce=Ua,l.defaults=gd,l.defaultsDeep=hd,l.defer=Sf,l.delay=Lf,l.difference=qc,l.differenceBy=Yc,l.differenceWith=Zc,l.drop=Jc,l.dropRight=Xc,l.dropRightWhile=Qc,l.dropWhile=Vc,l.fill=jc,l.filter=tf,l.flatMap=of,l.flatMapDeep=af,l.flatMapDepth=lf,l.flatten=Aa,l.flattenDeep=ep,l.flattenDepth=tp,l.flip=If,l.flow=xg,l.flowRight=wg,l.fromPairs=np,l.functions=wd,l.functionsIn=Cd,l.groupBy=sf,l.initial=ip,l.intersection=op,l.intersectionBy=ap,l.intersectionWith=lp,l.invert=Ld,l.invertBy=Id,l.invokeMap=cf,l.iteratee=xi,l.keyBy=pf,l.keys=te,l.keysIn=fe,l.map=Qn,l.mapKeys=Ad,l.mapValues=Fd,l.matches=Cg,l.matchesProperty=Sg,l.memoize=jn,l.merge=Td,l.mergeWith=Xa,l.method=Lg,l.methodOf=Ig,l.mixin=wi,l.negate=er,l.nthArg=Ag,l.omit=Rd,l.omitBy=Ed,l.once=Bf,l.orderBy=ff,l.over=Fg,l.overArgs=Af,l.overEvery=Tg,l.overSome=Rg,l.partial=gi,l.partialRight=Na,l.partition=df,l.pick=Dd,l.pickBy=Qa,l.property=il,l.propertyOf=Eg,l.pull=pp,l.pullAll=Ta,l.pullAllBy=fp,l.pullAllWith=dp,l.pullAt=gp,l.range=Dg,l.rangeRight=Pg,l.rearg=Ff,l.reject=mf,l.remove=hp,l.rest=Tf,l.reverse=pi,l.sampleSize=vf,l.set=Md,l.setWith=Wd,l.shuffle=bf,l.slice=mp,l.sortBy=wf,l.sortedUniq=Cp,l.sortedUniqBy=Sp,l.split=og,l.spread=Rf,l.tail=Lp,l.take=Ip,l.takeRight=Bp,l.takeRightWhile=Ap,l.takeWhile=Fp,l.tap=$p,l.throttle=Ef,l.thru=Xn,l.toArray=qa,l.toPairs=Va,l.toPairsIn=ja,l.toPath=kg,l.toPlainObject=Za,l.transform=Hd,l.unary=Df,l.union=Tp,l.unionBy=Rp,l.unionWith=Ep,l.uniq=Dp,l.uniqBy=Pp,l.uniqWith=Mp,l.unset=Od,l.unzip=fi,l.unzipWith=Ra,l.update=kd,l.updateWith=Ud,l.values=kt,l.valuesIn=Nd,l.without=Wp,l.words=nl,l.wrap=Pf,l.xor=Hp,l.xorBy=Op,l.xorWith=kp,l.zip=Up,l.zipObject=Np,l.zipObjectDeep=zp,l.zipWith=Gp,l.entries=Va,l.entriesIn=ja,l.extend=Ja,l.extendWith=rr,wi(l,l),l.add=Ng,l.attempt=rl,l.camelCase=Kd,l.capitalize=el,l.ceil=zg,l.clamp=zd,l.clone=Wf,l.cloneDeep=Of,l.cloneDeepWith=kf,l.cloneWith=Hf,l.conformsTo=Uf,l.deburr=tl,l.defaultTo=_g,l.divide=Gg,l.endsWith=qd,l.eq=Pe,l.escape=Yd,l.escapeRegExp=Zd,l.every=ef,l.find=nf,l.findIndex=Ia,l.findKey=md,l.findLast=rf,l.findLastIndex=Ba,l.findLastKey=yd,l.floor=$g,l.forEach=Da,l.forEachRight=Pa,l.forIn=vd,l.forInRight=bd,l.forOwn=_d,l.forOwnRight=xd,l.get=yi,l.gt=Nf,l.gte=zf,l.has=Sd,l.hasIn=vi,l.head=Fa,l.identity=de,l.includes=uf,l.indexOf=rp,l.inRange=Gd,l.invoke=Bd,l.isArguments=bt,l.isArray=R,l.isArrayBuffer=Gf,l.isArrayLike=pe,l.isArrayLikeObject=X,l.isBoolean=$f,l.isBuffer=st,l.isDate=Kf,l.isElement=qf,l.isEmpty=Yf,l.isEqual=Zf,l.isEqualWith=Jf,l.isError=hi,l.isFinite=Xf,l.isFunction=Xe,l.isInteger=za,l.isLength=tr,l.isMap=Ga,l.isMatch=Qf,l.isMatchWith=Vf,l.isNaN=jf,l.isNative=ed,l.isNil=nd,l.isNull=td,l.isNumber=$a,l.isObject=Y,l.isObjectLike=J,l.isPlainObject=un,l.isRegExp=mi,l.isSafeInteger=rd,l.isSet=Ka,l.isString=nr,l.isSymbol=ve,l.isTypedArray=Ot,l.isUndefined=id,l.isWeakMap=od,l.isWeakSet=ad,l.join=sp,l.kebabCase=Jd,l.last=Ae,l.lastIndexOf=up,l.lowerCase=Xd,l.lowerFirst=Qd,l.lt=ld,l.lte=sd,l.max=Kg,l.maxBy=qg,l.mean=Yg,l.meanBy=Zg,l.min=Jg,l.minBy=Xg,l.stubArray=Si,l.stubFalse=Li,l.stubObject=Mg,l.stubString=Wg,l.stubTrue=Hg,l.multiply=Qg,l.nth=cp,l.noConflict=Bg,l.noop=Ci,l.now=Vn,l.pad=Vd,l.padEnd=jd,l.padStart=eg,l.parseInt=tg,l.random=$d,l.reduce=gf,l.reduceRight=hf,l.repeat=ng,l.replace=rg,l.result=Pd,l.round=Vg,l.runInContext=f,l.sample=yf,l.size=_f,l.snakeCase=ig,l.some=xf,l.sortedIndex=yp,l.sortedIndexBy=vp,l.sortedIndexOf=bp,l.sortedLastIndex=_p,l.sortedLastIndexBy=xp,l.sortedLastIndexOf=wp,l.startCase=ag,l.startsWith=lg,l.subtract=jg,l.sum=eh,l.sumBy=th,l.template=sg,l.times=Og,l.toFinite=Qe,l.toInteger=E,l.toLength=Ya,l.toLower=ug,l.toNumber=Fe,l.toSafeInteger=ud,l.toString=U,l.toUpper=cg,l.trim=pg,l.trimEnd=fg,l.trimStart=dg,l.truncate=gg,l.unescape=hg,l.uniqueId=Ug,l.upperCase=mg,l.upperFirst=bi,l.each=Da,l.eachRight=Pa,l.first=Fa,wi(l,function(){var e={};return ke(l,function(t,n){N.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=h,Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Ce(["drop","take"],function(e,t){W.prototype[e]=function(n){n=n===i?1:ee(E(n),0);var r=this.__filtered__&&!t?new W(this):this.clone();return r.__filtered__?r.__takeCount__=oe(n,r.__takeCount__):r.__views__.push({size:oe(n,Oe),type:e+(r.__dir__<0?"Right":"")}),r},W.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ce(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Bi||n==pl;W.prototype[e]=function(a){var s=this.clone();return s.__iteratees__.push({iteratee:B(a,3),type:n}),s.__filtered__=s.__filtered__||r,s}}),Ce(["head","last"],function(e,t){var n="take"+(t?"Right":"");W.prototype[e]=function(){return this[n](1).value()[0]}}),Ce(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[n](1)}}),W.prototype.compact=function(){return this.filter(de)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=P(function(e,t){return typeof e=="function"?new W(this):this.map(function(n){return nn(n,e,t)})}),W.prototype.reject=function(e){return this.filter(er(B(e)))},W.prototype.slice=function(e,t){e=E(e);var n=this;return n.__filtered__&&(e>0||t<0)?new W(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=E(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(Oe)},ke(W.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=l[r?"take"+(t=="last"?"Right":""):t],s=r||/^find/.test(t);!a||(l.prototype[t]=function(){var u=this.__wrapped__,p=r?[1]:arguments,d=u instanceof W,y=p[0],v=d||R(u),b=function(M){var H=a.apply(l,tt([M],p));return r&&C?H[0]:H};v&&n&&typeof y=="function"&&y.length!=1&&(d=v=!1);var C=this.__chain__,I=!!this.__actions__.length,A=s&&!C,D=d&&!I;if(!s&&v){u=D?u:new W(this);var F=e.apply(u,p);return F.__actions__.push({func:Xn,args:[b],thisArg:i}),new Le(F,C)}return A&&D?e.apply(this,p):(F=this.thru(b),A?r?F.value()[0]:F.value():F)})}),Ce(["pop","push","shift","sort","splice","unshift"],function(e){var t=wn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(r&&!this.__chain__){var s=this.value();return t.apply(R(s)?s:[],a)}return this[n](function(u){return t.apply(R(u)?u:[],a)})}}),ke(W.prototype,function(e,t){var n=l[t];if(n){var r=n.name+"";N.call(Dt,r)||(Dt[r]=[]),Dt[r].push({name:t,func:n})}}),Dt[Gn(i,ut).name]=[{name:"wrapper",func:i}],W.prototype.clone=gu,W.prototype.reverse=hu,W.prototype.value=mu,l.prototype.at=Kp,l.prototype.chain=qp,l.prototype.commit=Yp,l.prototype.next=Zp,l.prototype.plant=Xp,l.prototype.reverse=Qp,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Vp,l.prototype.first=l.prototype.head,Jt&&(l.prototype[Jt]=Jp),l},Tt=Ys();pt?((pt.exports=Tt)._=Tt,xr._=Tt):re._=Tt}).call(commonjsGlobal)})(lodash,lodash.exports);var _=lodash.exports;const ComponentSchema={type:"object",properties:{layout:{type:"array",items:{type:"object",properties:{key:{type:"string"},value:{type:"string"}}}},value:{type:"array",items:{type:"object",properties:{label:{type:"string"},value:{type:"string"}}}},columns:{type:"array",items:{type:"object",properties:{header:{type:"string"},accessorKey:{type:"string"},widgetType:{type:"string"}}}},events:{type:"array",items:{type:"object",properties:{eventType:{type:"string"},configType:{type:"string"}}}},sectionLabels:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}}}},componentBasicUiSchema={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{rowSpacing:1,header:!0},defaultStyle:!0},elements:[{type:"Control",scope:"#/properties/Component",options:{widget:"Box"},config:{layout:{xs:12,sm:12,md:2},main:{heading:"Component"},style:{float:"left"}}},{type:"Control",scope:"#/properties/pageName",options:{widget:"Box"},config:{layout:{xs:7,sm:7,md:9},main:{heading:" "},style:{float:"right",width:"auto",fontSize:"12px",color:"gray",paddingTop:"10px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:{xs:2,sm:2,md:.5},main:{icon:"BackIcon",styleDefault:!0,size:"small",onClick:"backHandler",tooltipMessage:"Back"},style:{float:"right"}}}]},{type:"TabLayout",config:{main:{tabLabels:["Core"],defaultStyle:!0,id:"component"}},elements:[{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Type",options:[{label:"Select",value:"Select"},{label:"Date",value:"Date"},{label:"CheckBox",value:"CheckBox"},{label:"Table",value:"Table"},{label:"Array",value:"Array"},{label:"Container",value:"WrapperSection"},{label:"Tabs",value:"TabSection"},{label:"Text",value:"Text"},{label:"Text Area",value:"TextArea"},{label:"Button",value:"Button"},{label:"Card",value:"card"},{label:"Rank",value:"Rank"},{label:"SpeedoMeter",value:"SpeedoMeter"},{label:"ProgressBar",value:"ProgressBar"},{label:"Graph",value:"Graph"},{label:"Label",value:"Box"},{label:"Upload File",value:"UploadFile"},{label:"Download File",value:"DownloadFile"},{label:"Empty Box",value:"EmptyBox"},{label:"ProgressBar Card",value:"ProgressBarCard"},{label:"Rank Card",value:"RankCard"},{label:"Runner Boy Progress Bar",value:"RunnerBoyProgressBar"},{label:"Slider",value:"Slider"},{label:"Timer",value:"Timer"},{label:"MultipleSelect",value:"MultipleSelect"},{label:"LeaderBoard",value:"LeaderBoard"}]}}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Name",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Label",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:6,lg:6}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Screen Size",options:[{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]}]},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:8,lg:8}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:3,lg:3},main:{name:"Save",startIcon:"ApproveIcon",variant:"contained",color:"info",type:"text",onClick:"saveHandler",size:"small"},style:{marginBottom:"8px",float:"right"}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6}]};var buildConfig=o=>{const c=_.cloneDeep(o);let i={};return c.pageName&&delete c.pageName,c.eventsSelected&&delete c.eventsSelected,(c.type==="Table"||c.type==="WrapperSection"||c.type==="TabSection")&&(i.elements=c.elements||[],c.elements&&delete c.elements),i.events=c.events||[],c.events&&delete c.events,i={...c,...i},i};const createLayoutFormat=o=>{let c={};return o.map(i=>{c[i.key]=+i.value}),c},getNavigationHistory=(o,c)=>{if(c){let i=o.name;const h=c.split("."),x=[];return h.map((S,w)=>{if(w===0){x.push(S);return}x.push(`${x[w-1]}.${S}`)}),x.map(S=>{const w=_.get(o,S);i=i+` > ${(w==null?void 0:w.name)||(w==null?void 0:w.eventType)}`}),{pageName:i}}},saveFormdataInLocalStorage=(o,c)=>{let i;if(c){const h=getFormdataFromLocalStorage();i=_.set(h,c,buildConfig(o))}else i=buildConfig(o);return localStorage.setItem("pageFormdata",JSON.stringify(i)),i},getFormdataFromLocalStorage=o=>{const c=localStorage.getItem("pageFormdata")?JSON.parse(localStorage.getItem("pageFormdata")):void 0;let i;return o&&(i=_.get(c,o),i={...i,...getNavigationHistory(c,o)}),i||(i=getNavigationHistory(c,o)),i||c},CoreSection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Type",type:"text",options:[{label:"Select",value:"Select"},{label:"Date",value:"Date"},{label:"CheckBox",value:"CheckBox"},{label:"Table",value:"Table"},{label:"Array",value:"Array"},{label:"Container",value:"WrapperSection"},{label:"Tabs",value:"TabSection"},{label:"Text",value:"Text"},{label:"Text Area",value:"TextArea"},{label:"Button",value:"Button"},{label:"Card",value:"card"},{label:"Rank",value:"Rank"},{label:"SpeedoMeter",value:"SpeedoMeter"},{label:"ProgressBar",value:"ProgressBar"},{label:"Graph",value:"Graph"},{label:"Label",value:"Box"},{label:"Upload File",value:"UploadFile"},{label:"Download File",value:"DownloadFile"},{label:"Empty Box",value:"EmptyBox"},{label:"ProgressBar Card",value:"ProgressBarCard"},{label:"Rank Card",value:"RankCard"},{label:"Runner Boy Progress Bar",value:"RunnerBoyProgressBar"},{label:"Slider",value:"Slider"},{label:"Timer",value:"Timer"},{label:"MultipleSelect",value:"MultipleSelect"},{label:"LeaderBoard",value:"LeaderBoard"}]}}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Name"}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Label"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:6,lg:6}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Screen Size",options:[{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]},OptionArray={type:"Control",scope:"#/properties/value",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Label"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},EventSection={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{divider:!0},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/programType",options:{widget:"Box"},config:{layout:8,main:{heading:"Event Table"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"eventAddHandler",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event Type"},{accessorKey:"Handler",header:"Handler"},{accessorKey:"Edit_Approve_Records",header:"Edit Widget",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{color:"info",size:"small",icon:"EditIcon",tooltipMessage:"Edit This Record",onClick:"eventEditHandler"},style:{color:"#3949ab"}}}},{accessorKey:"Reject_Records",header:"Delete",widget:{type:"Control",scope:"#/properties/RejectButton",accessorKeyName:"Reject_Records",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",tooltipMessage:"Reject This Record",onClick:"deleteEvent"}}}}]}]}]},getInputField=(o,c)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c}}}),getRadioInputField=(o,c,i)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"RadioInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c,options:i}}}),getTextArea=(o,c,i,h)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"TextArea"},config:{layout:h||12,style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px"}},main:{heading:c,minRows:8,hideButton:i}}}),getSelectField=(o,c,i)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c,type:"text",options:i}}}),GraphSection={type:"HorizontalLayout",elements:[]},buildPropertiesSection=function(o){let c=_.cloneDeep(GraphSection);if(o==="SpeedoMeter"||o==="RankCard"||o==="Timer")c.elements=[getInputField("rank","Rank"),getInputField("image","Image Url"),getInputField("title","Card Title"),getInputField("description","Card Description")];else if(o==="LeaderBoard")c.elements=[getInputField("valueLabel","Value Label"),getInputField("firstImage","First Image url"),getInputField("secondImage","Second Image url"),getInputField("thirdImage","Third Image url"),getTextArea("functionCode","Write Compare Code",!1)];else if(o==="CardSlider"){const i=getInputField("heading","Heading"),h=getInputField("iconName","Icon Name");c.elements=[i,h]}else if(o==="ProgressBar"||o==="ProgressBarCard"){const i=getInputField("heading","Heading"),h=getInputField("bottomLabel_1","First BottomLabel"),x=getInputField("bottomLabel_2","Second BottomLabel"),S=getInputField("bottomLabel_3","Third BottomLabel");c.elements=[i,h,x,S]}else if(o==="card")c.elements=[getInputField("url","Image Url"),getInputField("label","Label"),getInputField("description","Description")];else if(o==="Box"){const i=getInputField("value","Value");c.elements=[getSelectField("graphType","Label Type",[{label:"URL",value:"url"},{label:"Heading",value:"heading"}]),i]}else if(o==="Button"){const i=getInputField("color","Color"),h=getInputField("size","Size"),x=getInputField("iconName","Icon Name");c.elements=[getSelectField("buttonType","Button Type",[{label:"Button With Text",value:"Button"},{label:"Button With Icon",value:"IconButton"},{label:"Button With Icon and Text",value:"ButtonWithIconAndText"}]),x,h,i]}else if(o==="Graph"){const i=getInputField("height","Height"),h=getInputField("heading","Heading"),x=getInputField("leftLabel","Left Label"),S=getInputField("bottomLabel","Bottom Label"),w=getRadioInputField("legendHide","Legend Hide",["YES","No"]);c.elements=[h,i,getSelectField("graphType","Graph Type",[{label:"Bar Graph",value:"BarGraph"},{label:"Stack Bar Graph",value:"StackBarGraph"},{label:"Pie Graph",value:"PieGraph"},{label:"Horizontal Bar Graph",value:"HorizontalBarGraph"}]),x,S,w]}else o==="WrapperSection"?c.elements=[getRadioInputField("divider","Divider",["YES","No"]),getRadioInputField("heading","Page Heading",["YES","No"])]:o==="TabSection"&&(c.elements=[{type:"Control",scope:"#/properties/sectionLabels",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Labels for Tab"}}}]}}}]);return c},StyleSection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/style",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:12,lg:12},style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px"}},main:{heading:"JSON Style",minRows:8,hideButton:!0}}}]},TableSection={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/programType",options:{widget:"Box"},config:{layout:8,main:{heading:"Components Table"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"widgetAddClickHandler",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/elements",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"name",header:"Name"},{accessorKey:"type",header:"Type"},{header:"Edit Record",field:"Reject_Records",flex:1,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"EditIcon",color:"primary",onClick:"editComponents",tooltipMessage:"Reject This Record"}}}},{header:"Delete",field:"Reject_Records",flex:1,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",onClick:"deleteComponents",tooltipMessage:"Reject This Record"}}}}]}]}]},ValueTab={type:"HorizontalLayout",elements:[OptionArray]},sectionLabels={Select:["Core","Value","style","Event"],MultipleSelect:["Core","Value","style","Event"],Table:["Core","Components","style","Event"],LeaderBoard:["Core","Components","Properties","style","Event"],WrapperSection:["Core","Components","Properties","style"],TabSection:["Core","Components","Properties","style"],SpeedoMeter:["Core","Properties","style","Event"],card:["Core","Properties","style","Event"],UploadFile:["Core","style","Event"],Graph:["Core","Properties","style","Event"],DownloadFile:["Core","style","Event"],Box:["Core","Properties","style","Event"],Properties:["Core","Properties","style","Event"],ProgressBarCard:["Core","Properties","style","Event"],RankCard:["Core","Properties","style","Event"],Slider:["Core","Components","Properties","style","Event"],Timer:["Core","Properties","style","Event"],Rank:["Core","Properties","style","Event"],Button:["Core","Properties","style","Event"],Array:["Core","Components"]},refreshPage=(o,c)=>{var h;const i=_.cloneDeep(componentBasicUiSchema);if(o){const x={Core:CoreSection,Value:ValueTab,style:StyleSection,Event:EventSection,Components:TableSection,Properties:buildPropertiesSection(o)},S=(h=sectionLabels[o])==null?void 0:h.map(w=>x[w]);i.elements[1].config.main.tabLabels=sectionLabels[o]||["Core","style","Event"],i.elements[1].elements=S||[CoreSection,StyleSection,EventSection]}c.setUiSchema(i)};var Component=(o,c)=>({setPage:async function(){const i=await this.getFormdata();o.setFormdata(i);const h=this.getSchema();o.setSchema(h),this.refreshPage(i==null?void 0:i.type,o)},refreshPage,getFormdata:async function(){var h;const i=(h=o.searchParams)==null?void 0:h.get("path");return getFormdataFromLocalStorage(i)},getSchema:function(){return ComponentSchema},saveHandler:async function(){var h;const i=(h=o.searchParams)==null?void 0:h.get("path");saveFormdataInLocalStorage(o.formData,i),o.navigate(-1),o.setNotify({SuccessMessage:"Save Successfully",Success:!0})},onChange:function(){var i,h,x,S;((i=o==null?void 0:o.formData)==null?void 0:i.type)!==((h=o==null?void 0:o.newData)==null?void 0:h.type)&&((x=o==null?void 0:o.newData)==null?void 0:x.type)!==void 0&&this.refreshPage((S=o==null?void 0:o.newData)==null?void 0:S.type,o)},editComponents:async function(){var S,w,O;const i=c.path.split(".")[1],h=(S=o.searchParams)==null?void 0:S.get("path"),x=(w=o.searchParams)==null?void 0:w.get("id");if(saveFormdataInLocalStorage(o.formData,h),h){const ne=`${(O=o.searchParams)==null?void 0:O.get("path")}.elements[${i}]`;o.searchParams.set("path",ne),o.setSearchParams(o.searchParams),this.setPage()}else o.navigate(`/Component?path=${`elements[${i}]`}&id=${x}`)},deleteComponents:async function(){var w;const i=(w=o.searchParams)==null?void 0:w.get("path"),h=c.path.split(".")[1];o.formData.elements.splice(h,1);const x=saveFormdataInLocalStorage(o.formData,i),S=i?_.get(x,i):x;o.setFormdata(S)},deleteEvent:async function(){var S;const i=(S=o.searchParams)==null?void 0:S.get("path"),h=c.path.split(".")[1];o.formData.events.splice(h,1);const x=saveFormdataInLocalStorage(o.formData,i);o.setFormdata(_.get(x,i))},widgetAddClickHandler:async function(){var x;Array.isArray(o.formData.elements)||(o.formData.elements=[]);const i=(x=o.searchParams)==null?void 0:x.get("path");saveFormdataInLocalStorage(o.formData,i);const h=`${i}.elements[${o.formData.elements.length}]`;o.searchParams.set("path",h),o.setSearchParams(o.searchParams),this.setPage()},eventEditHandler:async function(){var w,O;const i=c.path.split(".")[1],h=(w=o.searchParams)==null?void 0:w.get("path"),x=(O=o.searchParams)==null?void 0:O.get("id");saveFormdataInLocalStorage(o.formData,h);const S=`${h}.events[${i}]`;o.navigate(`/ComponentEvents?path=${S}&id=${x}`)},eventAddHandler:async function(){var S,w;const i=(S=o.searchParams)==null?void 0:S.get("path"),h=(w=o.searchParams)==null?void 0:w.get("id");Array.isArray(o.formData.events)||(o.formData.events=[]),saveFormdataInLocalStorage(o.formData,i);const x=`${i}.events[${o.formData.events.length}]`;o.navigate(`/ComponentEvents?path=${x}&id=${h}`)},backHandler:function(){o.navigate(-1)}}),pageMaster=o=>{const{store:c,dynamicData:i,config:h,submitHandler:x}=o;return{setPage:async function(){const S=await this.getFormdata();c.setFormdata(S);const w=await this.getUiSchema(),O=await this.getSchema();c.setSchema(O),c.setUiSchema(w)},getFormdata:async function(){var w;(w=c.searchParams)==null||w.get("id");const S=getFormdataFromLocalStorage();return S||(saveFormdataInLocalStorage(h),h)},getUiSchema:async function(){return PageMasterUiSchema},getSchema:()=>PageMasterSchema,backHandler:()=>{localStorage.removeItem("pageFormdata"),c.navigate("/PageMasterRecords")},onAddClickHandler:async function(){var O;const S=(O=c.searchParams)==null?void 0:O.get("id");Array.isArray(c.formData.elements)||(c.formData.elements=[]);const w=saveFormdataInLocalStorage(c.formData);c.navigate(`/Component?path=${`elements[${w==null?void 0:w.elements.length}]`}&id=${S}`)},submitPageHandler:async function(){x(c,o.service).then(S=>{localStorage.removeItem("pageFormdata"),c.navigate(-1),c.setNotify({SuccessMessage:"Submit Successfully",Success:!0})})},Edit_Components:Component(c,i).editComponents,Delete_Components:Component(c,i).deleteComponents,eventAddHandler:async function(){var O;const S=(O=c.searchParams)==null?void 0:O.get("id");Array.isArray(c.formData.events)||(c.formData.events=[]),saveFormdataInLocalStorage(c.formData);const w=`events[${c.formData.events.length}]`;c.navigate(`/ComponentEvents?path=${w}&id=${S}`)},editEvent:async function(){var Z;const S=i.path.split(".")[1],w=(Z=c.searchParams)==null?void 0:Z.get("id");saveFormdataInLocalStorage(c.formData);const O=`events[${S}]`;c.navigate(`/ComponentEvents?path=${O}&id=${w}`)},deleteEvent:async function(){const S=i.path.split(".")[1];c.formData.events.splice(S,1);const w=saveFormdataInLocalStorage(c.formData);c.setFormdata(w)}}};const EventSchema={type:"object",properties:{headers:{type:"array",items:{type:"object",properties:{headers_key:{type:"string"},headers_value:{type:"string"}}}},refreshElements:{type:"array",items:{type:"object",properties:{value:{type:"string"}}}},body:{type:"array",items:{type:"object",properties:{body_key:{type:"string"},body_value:{type:"string"}}}}}},EventUiSchema={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{rowSpacing:1,header:!0},defaultStyle:!0},elements:[{type:"Control",scope:"#/properties/Component",options:{widget:"Box"},config:{layout:{xs:12,sm:12,md:2},main:{heading:"Component"},style:{float:"left"}}},{type:"Control",scope:"#/properties/pageName",options:{widget:"Box"},config:{layout:{xs:7,sm:7,md:9},main:{heading:" "},style:{float:"right",width:"auto",fontSize:"12px",color:"gray",paddingTop:"10px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:{xs:2,sm:2,md:.5},main:{icon:"BackIcon",styleDefault:!0,size:"small",onClick:"backHandler",tooltipMessage:"Back"},style:{float:"right"}}}]},{type:"TabLayout",config:{main:{tabLabels:["Core","Response Event"],defaultStyle:!0,id:"event"}},elements:[{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/eventType",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Event Type",type:"text",options:[{label:"Click Event",value:"onClick"},{label:"Load Event",value:"onLoad"},{label:"Change Event",value:"onChange"},{label:"Success",value:"Success"},{label:"Fail",value:"Fail"}]}}},getSelectField("Handler","Handler",[{label:"Custom",value:"custom"},{label:"Api",value:"api"},{label:"Inbuilt Function",value:"inBuiltFunction"},{label:"Refresh",value:"refresh"}])]},{type:"WrapperLayout",config:{main:{divider:!0},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/heading",options:{widget:"Box"},config:{layout:8,main:{heading:"Response Event"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/AddButton",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"addEvent",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event Type"},{accessorKey:"Handler",header:"Handler"},{accessorKey:"Edit_Approve_Records",header:"Edit Widget",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{color:"info",size:"small",icon:"EditIcon",tooltipMessage:"Edit This Record",onClick:"editEvent"},style:{color:"#3949ab"}}}},{accessorKey:"Reject_Records",header:"Delete",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",tooltipMessage:"Reject This Record",onClick:"deleteEvent"}}}}]}]}]},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:8,lg:8}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:3,lg:3},main:{name:"Save",startIcon:"ApproveIcon",variant:"contained",color:"info",type:"text",onClick:"saveHandler",size:"small"},style:{marginBottom:"8px",float:"right"}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6}]},APISection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/method",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Method",type:"text",options:[{label:"Get",value:"get"},{label:"Post",value:"post"},{label:"Delete",value:"delete"},{label:"Put",value:"put"}]}}},{type:"Control",scope:"#/properties/path",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Path",type:"text",multiple:!1,options:[]}}},{type:"Control",scope:"#/properties/headers",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},{type:"Control",scope:"#/properties/body",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},getTextArea("apiBody","Transformer",!0,12)]},refreshSectionUiSchema={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/refreshElements",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]};var event=(o,c)=>({setPage:async function(){const i=await this.getFormData();o.setFormdata(i);const h=await this.getSchema();o.setSchema(h),this.refreshPage(i.Handler,o)},refreshPage:(i,h)=>{const x=_.cloneDeep(EventUiSchema);i&&(i==="custom"?x.elements[1].elements[0].elements[2]=getTextArea("eventCode","Write Custom Code",!1):i==="api"?x.elements[1].elements[0].elements[2]=APISection:i==="inBuiltFunction"?(x.elements[1].elements[0].elements[2]=getSelectField("inBuiltFunctionType","Function Name",[{label:"RankProvider",value:"RankProvider"},{label:"Download File",value:"downloadFile"}]),x.elements[1].elements[0].elements[3]=getTextArea("funcParametersCode","Write Custom Code for Functions Parameter",!0,{xs:12,sm:12,md:6})):i==="refresh"&&(x.elements[1].elements[0].elements[2]=refreshSectionUiSchema)),h.setUiSchema(x)},getFormData:Component(o,c).getFormdata,getUiSchema:async function(){return EventUiSchema},getSchema:async()=>EventSchema,onChange:function(){var i,h,x;((i=o==null?void 0:o.formData)==null?void 0:i.Handler)!==((h=o==null?void 0:o.newData)==null?void 0:h.Handler)&&((x=o==null?void 0:o.newData)==null?void 0:x.Handler)!==void 0&&this.refreshPage(o.newData.Handler||o.formdata.Handler,o)},saveHandler:Component(o,c).saveHandler,addEvent:async function(){var x,S,w;const i=(x=o.searchParams)==null?void 0:x.get("path");Array.isArray(o.formData.events)||(o.formData.events=[]),saveFormdataInLocalStorage(o.formData,i);const h=`${i}.events[${(w=(S=o.formData)==null?void 0:S.events)==null?void 0:w.length}]`;o.searchParams.set("path",h),o.setSearchParams(o.searchParams),this.setPage()},editEvent:async function(){var S;const i=c.path.split(".")[1],h=(S=o.searchParams)==null?void 0:S.get("path");saveFormdataInLocalStorage(o.formData,h);const x=`${h}.events[${i}]`;o.searchParams.set("path",x),o.setSearchParams(o.searchParams),this.setPage()},deleteEvent:Component(o,c).deleteEvent,backHandler:function(){o.navigate(-1)}});const downloadFile$1=o=>{const c=o.name.split("."),i=o.data,h=window.atob(i);let x;x=new File([h],c[c.length-1]);const S=URL.createObjectURL(x),w=document.createElement("a");w.href=c[c.length-1]==="pdf"?"data:application/octet-stream;base64,"+i:S,w.download=`${o.name}`,document.body.appendChild(w),w.click(),URL.revokeObjectURL(S),document.body.removeChild(w)},executeEvents=async(o,c,i,h,x,S,w,O,Z)=>{let ne=[],V=null;if(o.eventType==="onLoad"){const{response:q,events:ge}=await executetOnLoadEvent(o,c,i,h,x,S,w,O,Z);V=q,ne=ge}else{const{response:q,events:ge}=await executeEventsHandler(o,c,i,h,x,S,w,O,Z);V=q,ne=ge}if((ne==null?void 0:ne.length)>0)for(const q of ne)await executeEvents(q,c,i,h,x,S,w,O,V)},executetOnLoadEvent=async(o,c,i,h,x,S,w,O,Z)=>{try{const{response:ne}=await executeEventsHandler(o,c,i,h,x,S,w,O,Z),V=o==null?void 0:o.events.filter(ge=>ge.eventType==="Success"),q=V.length>0?V:[{Handler:"mergeFormdata",eventType:"Success",type:o.type}];return{response:ne,events:q}}catch{const V=o==null?void 0:o.events.filter(ge=>ge.eventType==="Fail"),q=V.length>0?V:[];return{response:void 0,events:q}}};async function executeEventsHandler(o,c,i,h,x,S,w,O,Z){if(o.Handler==="api")return await executeApiEventHandler(o,c,i,h,x,S);if(o.Handler==="inBuiltFunction")return await executeInBuiltFunctionHandler(o,c,i,h,x,S,w,Z);if(o.Handler==="custom")return await executeCustomHandler(o,c,i,h,x,S,w,Z);if(o.Handler==="refresh")return await executeRefreshHandler(o,c,i,h,x,S,w,Z,O);if(o.Handler==="mergeFormdata")return await mergeFormdata(Z,c,o,i)}async function executeRefreshHandler(o,c,i,h,x,S,w,O,Z){const ne=getRefreshElements(o,Z);for(const V of ne)for(const q of Z.onLoad[V])await executeEvents(q,V,i,h,x,S,w);return{response:void 0,events:void 0}}async function executeApiEventHandler(o,c,i,h,x,S,w,O){const Z={...x==null?void 0:x.payload},ne={"X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"},{body:V,headers:q}=await buildApiPayload(o,Z,ne,i,h,x);let ge;return ge=await S[o.method](o.path,V,q&&{headers:q}),{response:ge,events:o==null?void 0:o.events}}async function executeInBuiltFunctionHandler(refreshHandlerConfig,componentName,store,dynamicData,userValue,service,serviceHolder,parentEventOutput){let parameter={};if(refreshHandlerConfig.funcParametersCode){const makeFunc=eval(refreshHandlerConfig.funcParametersCode);parameter=makeFunc(store,dynamicData,userValue,parentEventOutput,service)}return serviceHolder[refreshHandlerConfig.inBuiltFunctionType](parameter),{response:void 0,events:refreshHandlerConfig==null?void 0:refreshHandlerConfig.events}}async function executeCustomHandler(customHandlerConfig,componentName,store,dynamicData,userValue,service,serviceHolder,parentEventOutput){const makeFunc=eval(customHandlerConfig.eventCode);return makeFunc(store,dynamicData,userValue,parentEventOutput,service),{response:void 0,events:customHandlerConfig==null?void 0:customHandlerConfig.events}}async function mergeFormdata(o,c,i,h){return i.type==="Select"&&!(_.isEmpty(o)&&o)?h.setSchema(x=>({...x,properties:{...x.properties,[c]:{enum:o.data}}})):i.type==="page"?h.setFormdata(x=>({...x,...o==null?void 0:o.data})):o&&h.setFormdata(x=>({...x,[c]:o.data})),{response:void 0,events:void 0}}const buildBodyFormat=(o,c,i)=>{const h={...i==null?void 0:i.payload};return o.map(x=>{var S,w;if((S=x==null?void 0:x.value)!=null&&S.startsWith("$userValue")){const O=x.value.substring(11);h[x.key]=_.get(i,O)}else if((w=x==null?void 0:x.value)!=null&&w.startsWith("$")){const O=x.value.substring(1);h[x.key]=_.get(c,O)}else h[x.key]=x.value}),h},buildHeadersFormat=o=>{const c={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"};return o.map(i=>{c[i.key]=i.value}),c};async function buildApiPayload(compConfig,body,headers,store,dynamicData,userValue,service){var o,c;if(compConfig!=null&&compConfig.headers&&(headers={headers:buildHeadersFormat(compConfig.headers)}),compConfig.body&&(body={...buildBodyFormat(compConfig.body,store.newData||((c=(o=store==null?void 0:store.ctx)==null?void 0:o.core)==null?void 0:c.data)||store.formData,userValue)}),compConfig.apiBody){const makeFunc=eval(compConfig.apiBody),data=await makeFunc(store,dynamicData,userValue,body);body=data}return{body,headers}}function getRefreshElements(o,c){var h;let i=[];return((h=o==null?void 0:o.refreshElements)==null?void 0:h.length)>0?i=o.refreshElements.map(x=>x.value):c!=null&&c.onLoad&&(i=Object.keys(c==null?void 0:c.onLoad)),i}let compType,eventGroups={};const notifyUiSchema={type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},extractEvents=o=>{function c(i){i.events&&i.events.forEach(h=>{i.type&&(compType=i.type),eventGroups[h.eventType]||(eventGroups[h.eventType]={}),eventGroups[h.eventType][i.name]||(eventGroups[h.eventType][i.name]=[]),eventGroups[h.eventType][i.name].push({...h,type:compType})})}return c(o),o!=null&&o.elements&&o.elements.forEach(extractEvents),eventGroups};var service=o=>({setPage:async function(){o.store.setFormdata({}),eventGroups={},eventGroups=extractEvents(o.config),await executeEvents({Handler:"refresh",eventType:"onPageRefresh"},"all",o.store,o.dynamicData,o.userValue,o.service,this,eventGroups),o.uiSchema.elements.push(notifyUiSchema),o.store.setUiSchema(o.uiSchema)},onClick:async function(){var i;const c=((i=o.dynamicData)==null?void 0:i.tableButtonPath)||o.dynamicData.path.split(".")[0];for(const h of eventGroups==null?void 0:eventGroups.onClick[c])await executeEvents(h,c,o.store,o.dynamicData,o.userValue,o.service,this,eventGroups)},onChange:async function(){if(eventGroups.onChange){const c=Object.keys(eventGroups.onChange);Promise.all(c.map(async i=>{var h,x;if(((h=o.store)==null?void 0:h.formData[i])!==o.store.newData[i]&&((x=o.store)==null?void 0:x.newData[i])!==void 0)for(const S of eventGroups.onChange[i])await executeEvents(S,i,o.store,o.dynamicData,o.userValue,o.service,this,eventGroups)}))}},downloadFile:downloadFile$1}),emptyBox={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:12,sm:12,md:5.5,lg:5.5},main:{},style:{}}},leaderBoard={type:"WrapperLayout",config:{main:{rowSpacing:3,header:!0,label:"LeaderBoard",divider:!0},wrapperStyle:{position:"relative",width:"100%",height:1e3}},elements:[{type:"Control",scope:"#/properties/leaderBoard/properties/firstImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"90px",md:"60px"},left:{xs:"calc(50% - 50px)",sm:"calc(50% - 50px)",md:"calc(50% - 100px)"},width:{xs:"100px",sm:"100px",md:"200px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"100px",sm:"100px",md:"200px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/secondImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"160px",md:"130px"},left:{xs:"calc(25% - 45px)",sm:"calc(25% - 45px)",md:"calc(25% - 90px)"},width:{xs:"80px",sm:"80px",md:"180px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"80px",sm:"80px",md:"180px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/thirdImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"160px",md:"130px"},left:{xs:"calc(75% - 42.5px)",sm:"calc(75% - 42.5px)",md:"calc(75% - 85px)"},width:{xs:"80px",sm:"80px",md:"180px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"80px",sm:"80px",md:"180px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/firstName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"190px",md:"270px"},fontSize:{xs:"12px",md:"20px"},left:"calc(50% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%",zIndex:7},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/secondName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"240px",md:"320px"},fontSize:{xs:"12px",md:"20px"},left:"calc(25% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%"},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/thirdName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"240px",md:"320px"},fontSize:{xs:"12px",md:"20px"},left:"calc(75% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%"},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/econd",config:{main:{heading:"2"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"225px",md:"280px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(25% - 12px)",md:"calc(25% - 16px)"},width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/first",config:{main:{heading:"1"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"175px",md:"230px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(50% - 12px)",md:"calc(50% - 16px)"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/third",config:{main:{heading:"3"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"225px",md:"280px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(75% - 12px)",md:"calc(75% - 16px)"},width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/table",options:{widget:"Table"},elements:[],config:{style:{tableHeadstyle:{fontWeight:900,background:"rgb(179, 198, 255)"},position:"absolute",top:{xs:"300px",sm:"300px",md:"390px",lg:"390px"},border:"2px solid rgb(179, 198, 255)",width:"95%",left:"2.5%"},main:{disableAction:!0,disableSelection:!0}}}]};const buildLeaderBoard=o=>{const c=_.cloneDeep(leaderBoard);if(o.elements){const i=o.elements.map((h,x)=>h.type?{...{widget:buildUiSchema(h),accessorKey:h.name,header:h.label||h.name}}:{accessorKey:h.name,header:h.label||h.name});c.elements[9].elements=i}return o.name&&(c.elements[0].scope=`#/properties/${o.name}/properties/firstImage`,c.elements[3].scope=`#/properties/${o.name}/properties/firstName`,c.elements[1].scope=`#/properties/${o.name}/properties/secondImage`,c.elements[4].scope=`#/properties/${o.name}/properties/secondName`,c.elements[2].scope=`#/properties/${o.name}/properties/thirdImage`,c.elements[5].scope=`#/properties/${o.name}/properties/thirdName`,c.elements[9].scope=`#/properties/${o.name}/properties/table`),o.firstImage&&(c.elements[0].config.main.url=o.firstImage),o.secondImage&&(c.elements[1].config.main.url=o.secondImage),o.secondImage&&(c.elements[2].config.main.url=o.thirdImage),o.layout&&(c.config.layout=o.layout),c};var progressBar={type:"Control",scope:"#/properties/pbc_progress",options:{widget:"ProgressBar"},config:{layout:6,main:{developOnlyProgresBar:!1,bottomLabel_3:"Remaining",heading:"PBC Details"}}};const buildProgressBarCard=(o,c)=>{const i=_.cloneDeep(progressBar);return i.scope=c,o.heading&&(i.config.main.heading=o.heading),o.bottomLabel_3&&(i.config.main.bottomLabel_3=o.bottomLabel_3),o.bottomLabel_2&&(i.config.main.bottomLabel_2=o.bottomLabel_2),o.bottomLabel_1&&(i.elements[0].config.main.bottomLabel_1=o.bottomLabel_1),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i},buildProgressBar=(o,c)=>{const i=_.cloneDeep(progressBar);return i.scope=c,o.layout&&(i.config.layout=o.layout),i.config.main.heading=o.heading,o.bottomLabel_3&&(i.config.main.bottomLabel_3=o.bottomLabel_3),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.bottomLabel_2&&(i.config.main.bottomLabel_2=o.bottomLabel_2),o.bottomLabel_1&&(i.config.main.bottomLabel_1=o.bottomLabel_1),i},BarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:"Bar Graph",bottomLabel:"Name of Employe",numTicks:6,leftLabel:"Value in lakhs",axisLeft:!0,axisBottom:!0,hideTicks:!1,hideLeftAxisLine:!1,hideBottomAxisLine:!1,bottomAxisWidth:"10px",legend:{labelColor:"green",legendTitle:"",direction:"row",align:"none"}},style:{containerStyle:{width:"100%",height:300},headerStyle:{},tooltipStyle:{},labelStyle:{margin:{left:80,bottom:20},leftLabelOffset:50,bottomLabelOffset:10},barStyle:{color:{firstBarColor:"#6c5efb",secondBarColor:"#3f51b5"}},legendStyle:{legend:{lineHeight:"0.9em",fontSize:"8px",fontFamily:"arial",padding:"10px 10px",width:"30%",display:"flex",justifyContent:"center",border:"1px solid rgba(255, 255, 255, 0.3)",borderRadius:" 8px",marginRight:"auto"},legendTitle:{fontSize:"10px",marginBottom:"10px",fontWeight:"100"}}}}},PieGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:"Incentive Branch category wise",type:"PieGraph",bottomLabel:"Name of Employe",leftLabel:"Value",axisLeft:!0,axisBottom:!0,legendAvailable:!0,legend:{labelColor:"green",legendTitle:"Branches",direction:"row",align:"right"}},style:{containerStyle:{height:"340"},headerStyle:{},tooltipStyle:{backgroundColor:"black",width:"80px"},labelStyle:{},legendStyle:{legend:{},legendTitle:{}},pieStyle:{}}}},HorizontalBarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:" ",type:"HorizontalBarGraph",bottomLabel:" ",leftLabel:"Value",axisLeft:!1,axisBottom:!0,hideBottomTicks:!1,hideLeftTicks:!1,hideLeftAxisLine:!0,hideBottomAxisLine:!1,bottomAxisWidth:"10px"},style:{containerStyle:{width:"100%"},headerStyle:{},tooltipStyle:{},labelStyle:{},barStyle:{color:"#6c5efb"}}}},buildHorizontalBarGraph=(o,c)=>{const i=_.cloneDeep(HorizontalBarGraph);return o.layout&&(i.config.layout=o.layout),i.scope=c,i.config.main.header=o.heading,o.barColor&&(i.config.barStyle.color=o.barColor),o.containerBackground&&(i.config.containerStyle.background=o.containerBackground),o.height&&(i.config.containerStyle.height=o.height),o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),i};var SpeedoMeter={type:"Control",scope:"#/properties/emptyBox",options:{widget:"SpeedoMeter"},config:{layout:12,main:{currentValueText:"",customSegmentLabels:{},data:{maxValue:1e5,value:5e4,minValue:0}},style:{segmentColors:[],ringWidth:57,needleHeightRatio:.7,needleColor:"#3f51b5",startColor:"red",textColor:"black",segments:5,endColor:"green",containerStyle:{background:"white",padding:"20px",borderRadius:"20px",display:"flex",flexDirection:"column",margin:"auto",justifyContent:"center",fontFamily:"Roboto",fontWeight:500},headerStyle:{textAlign:"left",width:"100%",paddingBottom:"20px"}}}};const buildSpeedoMeter=(o,c)=>{const i=_.cloneDeep(SpeedoMeter);return i.scope=c,o.layout&&(i.config.layout=o.layout),o.heading&&(i.config.main.header=o.heading),o.currentValueText&&(i.config.main.currentValueText=o.currentValueText),o.customSegmentLabels&&(i.config.main.customSegmentLabels=o.customSegmentLabels),o.data&&(i.config.main.data=o.data),o.needleColor&&(i.config.style.needleColor=o.needleColor),o.segments&&(i.config.style.segments=o.segments),o.endColor&&(i.config.style.endColor=o.endColor),o.startColor&&(i.config.style.startColor=o.startColor),o.segmentColors&&(i.config.style.segmentColors=o.segmentColors),i},buildPieGraph=(o,c)=>{const i=_.cloneDeep(PieGraph);return o.layout&&(i.config.layout=o.layout),o.containerBackground&&(i.config.style.containerStyle.background=o.containerBackground),o.height&&(i.config.style.containerStyle.height=o.height),o.legendAvailabe&&(i.config.main.legendAvailabe=o.legendAvailabe!=="YES"),i.scope=c,i.config.main.header=o.heading,o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),o.tooltipDataKey&&(i.config.main.tooltipDataKey=o.tooltipDataKey),i},buildStackbarGraph=(o,c)=>{const i=_.cloneDeep(BarGraph);return o.layout&&(i.config.layout=o.layout),o.legendHide&&(i.config.main.legendAvailable=!1),i.config.main.type=o.graphType,i.config.main.header=o.heading,o.barColor&&(i.config.barStyle.color=o.barColor),o.containerBackground&&(i.config.containerStyle.background=o.containerBackground),o.height&&(i.config.style.containerStyle.height=o.height),o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),i.scope=c,i};var RunnerBoyProgressBar={type:"Control",scope:"#/properties/path",options:{widget:"RunnerBoyProgressBar"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const RunnerBoyProgressbar=(o,c)=>{const i=_.cloneDeep(RunnerBoyProgressBar);return i.scope=c,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var Tabsection={type:"TabLayout",config:{main:{id:"groupMaster",tabLabels:["default"],layout:12}},elements:[]};const buildTabSection=(o,c)=>{const i=_.cloneDeep(Tabsection);return o.sectionLabels&&(i.config.main.tabLabels=o.sectionLabels.map(h=>h.label)),i.config.main.id=o.name,i};var WrapperSection={type:"WrapperLayout",config:{main:{label:"Default Label",divider:!0},defaultStyle:!0},elements:[]};const buildWrapperSection=(o,c)=>{const i=_.cloneDeep(WrapperSection);return i.config.main.label=o.label,i.config.main.divider=!!o.divider,i.config.main.header=!!o.heading,i};var TextInputField={type:"Control",scope:"#/properties/text",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:""},style:{}}};const buildTextField=(o,c)=>{const i=_.cloneDeep(TextInputField);return i.config.main.label=o.label,o.style&&(i.config.style=JSON.parse(o.style)),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.config.main.errorMessage=`${o.name} is empty or invalid`,i.scope=c,i};var SelectInputField={type:"Control",scope:"#/properties/select",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"text"}}};const buildSelect=(o,c)=>{const i=_.cloneDeep(SelectInputField);if(i.config.main.label=o.label,o.value){const h=o.value.map(x=>({label:x.label,value:x.value}));i.config.main.options=h}return o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.scope=c,i};var Button={type:"Control",scope:"#/properties/button",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{name:"Compare",variant:"contained",color:"info",type:"text",startIcon:"",icon:"",onClick:"onClick",size:"large"},style:{}}};const buildButton=(o,c)=>{const i=_.cloneDeep(Button);return o.buttonType&&(i.options.widget=o.buttonType==="IconButton"?"IconButton":"Button",o.buttonType==="ButtonWithIconAndText"?i.config.main.startIcon=o.iconName:i.config.main.icon=o.iconName),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.scope=c,o.style&&(i.config.style=JSON.parse(o.style)),o.size&&(i.config.main.size=o.size),o.color&&(i.config.main.size=o.color),i.config.main.name=o.label,i};var Table={type:"Control",scope:"#/properties/ApproveRecords",options:{widget:"Table"},elements:[],config:{main:{allRowData:[],columns:{dataColumns:[],actionColumns:[]}}}};const buildTable=(o,c)=>{const i=_.cloneDeep(Table);return i.scope=c,o.style&&(i.config.style=JSON.parse(o.style)),i.config.main.label=o.label,i};var Box={type:"Control",scope:"#/properties/emptyBox",options:{widget:"Box"},config:{layout:12,main:{},style:{}}};const buildLabel=(o,c)=>{const i=_.cloneDeep(Box);return i.scope=c,i.config.main.heading=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i},uploadFile={type:"Control",scope:"#/properties/attachment",config:{main:{label:"AttachmentFile",onClick:"onClick",required:!0,errorMessage:"Attachment File is not uploaded"},style:{backgroundColor:"none"},layout:{lg:5.5,md:5.5,sm:11,xs:11}},options:{widget:"UploadFile"}},downloadFile={type:"Control",scope:"#/properties/downloadAttachment",config:{main:{onClick:"onClick",required:!1},style:{backgroundColor:"none"},layout:{lg:5.5,md:5.5,sm:11,xs:11}},options:{widget:"DownloadFile"}},buildUploadFile=(o,c)=>{const i=_.cloneDeep(uploadFile);return i.scope=c,i.config.main.label=o.label,o.layout&&(i.config.layout=o.layout),o.layout&&(uploadFile.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=o.style),o.required&&(i.config.main.required=!0),i.config.main.errorMessage=o.errorMessage,i},buildDownloadFile=(o,c)=>{const i=_.cloneDeep(downloadFile);return i.scope=c,o.layout&&(i.config.layout=o.layout),o.style&&(i.config.style=o.style),o.required&&(i.config.main.required=!0),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.errorMessage&&(i.config.main.errorMessage=o.errorMessage),i};var Card={type:"WrapperLayout",config:{main:{rowSpacing:.5},style:{wrapperStyle:{position:"relative",color:"white",height:{xs:"120px",md:"160px"},width:"100%",textAlign:"left",background:"#3f51b5",borderRadius:"20px"}},layout:{xs:12,sm:12,md:6,lg:6}},elements:[{type:"Control",scope:"#/properties/programType",config:{main:{heading:"$5000.00"},style:{position:"absolute",left:"10%",top:"15%",color:"#f5effc",height:"80px",display:"flex",fontSize:{xs:"24px",md:"32px"},alignItems:"center",background:"inherit",justifyContent:"flex-start"},layout:5},options:{widget:"Box"}},{type:"Control",scope:"#/properties/programType",config:{main:{url:"$"},style:{color:"#f5effc",objectFit:"contain",position:"absolute",top:"10px",right:"10px",height:"80%",width:"35%",display:"flex",fontSize:"34px",alignItems:"center",background:"inherit",padding:"20px",justifyContent:"left"},layout:5},options:{widget:"Image"}},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"Total Earnings"},style:{position:"absolute",top:"calc(60%)",alignItems:"center",color:"#8999e8",fontSize:"16px",left:"10%",background:"inherit",justifyContent:"center"},layout:12},options:{widget:"Box"}}]};const buildCard=(o,c)=>{const i=_.cloneDeep(Card);return o.style&&(i.config.style=JSON.parse(o.style)),i.elements[0].scope=`#/properties/${o.name.replace(/ /g,"")}/value`,i.elements[1].scope=`#/properties/${o.name.replace(/ /g,"")}/url`,i.elements[2].scope=`#/properties/${o.name.replace(/ /g,"")}/description`,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.elements[0].config.main.heading=o.label,i.elements[1].config.main.url=o.url,i.elements[2].config.main.heading=o.description,i};var DateInputField={type:"Control",scope:"#/properties/date",options:{widget:"DateInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"date"}}};const buildDate=(o,c)=>{const i=_.cloneDeep(DateInputField);return i.config.main.label=o.label,i.config.main.errorMessage=`${o.name} is empty or invalid`,i.scope=c,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var RankCard={type:"Control",scope:"#/properties/path",options:{widget:"RankCard"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildRankCard=(o,c)=>{const i=_.cloneDeep(RankCard);return i.scope=c,o.image&&(i.config.main.url=o.image),o.title&&(i.config.main.title=o.title),o.description&&(i.config.main.description=o.description),o.rank&&(i.config.main.rank=`#${o.rank}`),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var RollAndDice={type:"Control",scope:"#/properties/path",options:{widget:"RollAndDice"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildRollAndDice=(o,c)=>{const i=_.cloneDeep(RollAndDice);return o.name&&(i.scope=c),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var Timer={type:"Control",scope:"#/properties/timer",options:{widget:"Timer"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{},style:{digitContainer:{borderRadius:"4px",textShawdow:"none",width:"22%"},container:{backgroundColor:"#FFFFFF",borderRadius:"18px"},containerLabelColor:{color:"red"}}}};const buildTimer=(o,c)=>{const i=_.cloneDeep(Timer);return i.scope=c,o.label&&(i.config.main.label=o.label),o.layout&&(i.config.layout=o.layout),i};var MultipleSelect={type:"Control",scope:"#/properties/path",options:{widget:"MultipleSelect"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"text",multiple:!0,variant:"standard",options:[]}}};const buildMultiSelect=(o,c)=>{var h;const i=_.cloneDeep(MultipleSelect);return i.scope=c,o.label&&(i.config.main.label=o.label),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.config.main.options=(h=o.value)!=null?h:[],i},buildBasicUiSchema=o=>({type:"HorizontalLayout",pageName:`${o.name}`,elements:[]}),TextArea={type:"Control",scope:"#/properties/textarea",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:5.5,lg:5.5},style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px",background:"white",color:"black"}},main:{heading:"TextArea",minRows:4,hideButton:!0}}},buildTextArea=(o,c)=>{const i=_.cloneDeep(TextArea);return i.config.main.heading=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i.scope=c,i};var cardSlider={type:"Control",scope:"#/properties/path",options:{widget:"Slider"},elements:[],config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildSlider=(o,c)=>{const i=_.cloneDeep(cardSlider);return o.name&&(i.scope=c),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i},Checkbox={type:"Control",scope:"#/properties/username1",layout:12,options:{widget:"CheckBox"},config:{main:{label:"Welcome to Hyperform"}}},buildCheckbox=(o,c)=>{const i=_.cloneDeep(Checkbox);return i.scope=c,i.config.main.label=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i},buildUiSchema=o=>{let c={};const i=`#/properties/${o.name}`;switch(o.type){case"RunnerBoyProgressBar":c=RunnerBoyProgressbar(o,i);break;case"TabSection":c=buildTabSection(o);break;case"WrapperSection":c=buildWrapperSection(o);break;case"Text":c=buildTextField(o,i);break;case"TextArea":c=buildTextArea(o,i);break;case"Date":c=buildDate(o,i);break;case"Select":c=buildSelect(o,i);break;case"Button":c=buildButton(o,i);break;case"Table":c=buildTable(o,i);break;case"Box":c=buildLabel(o,i);break;case"CheckBox":c=buildCheckbox(o,i);break;case"UploadFile":c=buildUploadFile(o,i);break;case"DownloadFile":c=buildDownloadFile(o,i);break;case"EmptyBox":const h=_.cloneDeep(emptyBox);o.layout&&(h.config.layout=o.layout),c=h;break;case"card":c=buildCard(o);break;case"Graph":switch(o.graphType){case"BarGraph":case"StackBarGraph":c=buildStackbarGraph(o,i);break;case"LineGraph":c=buildPieGraph(o,i);break;case"PieGraph":c=buildPieGraph(o,i);break;case"HorizontalBarGraph":c=buildHorizontalBarGraph(o,i);break}break;case"ProgressBar":c=buildProgressBar(o,i);break;case"SpeedoMeter":c=buildSpeedoMeter(o,i);break;case"ProgressBarCard":c=buildProgressBarCard(o,i);break;case"RankCard":c=buildRankCard(o,i);break;case"Rank":c=buildRollAndDice(o,i);break;case"Slider":c=buildSlider(o,i);break;case"Timer":c=buildTimer(o,i);break;case"MultipleSelect":c=buildMultiSelect(o,i);break;case"LeaderBoard":c=buildLeaderBoard(o);break;default:c=buildBasicUiSchema(o)}if(o!=null&&o.elements){if((o==null?void 0:o.type)==="LeaderBoard")return c;o.type=="Table"?c.elements=o.elements.map((h,x)=>h.type?{accessorKey:h.name,header:h.label||h.name,widget:buildUiSchema(h)}:{accessorKey:h.name,header:h.label||h.name}):c.elements=o.elements.map((h,x)=>buildUiSchema(h))}return c};var clearLocalStorage=()=>{localStorage.removeItem("pageFormdata")};exports.buildConfig=buildConfig,exports.buildUiSchema=buildUiSchema,exports.clearPreviousCache=clearLocalStorage,exports.pageMaster=pageMaster,exports.pageMasterComponents=Component,exports.pageMasterEvents=event,exports.pageService=service,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
27
|
+
}`;var D=rl(function(){return k(s,I+"return "+b).apply(i,u)});if(D.source=b,hi(D))throw D;return D}function ug(e){return U(e).toLowerCase()}function cg(e){return U(e).toUpperCase()}function pg(e,t,n){if(e=U(e),e&&(n||t===i))return po(e);if(!e||!(t=ye(t)))return e;var r=Ee(e),a=Ee(t),s=fo(r,a),u=go(r,a)+1;return lt(r,s,u).join("")}function fg(e,t,n){if(e=U(e),e&&(n||t===i))return e.slice(0,mo(e)+1);if(!e||!(t=ye(t)))return e;var r=Ee(e),a=go(r,Ee(t))+1;return lt(r,0,a).join("")}function dg(e,t,n){if(e=U(e),e&&(n||t===i))return e.replace(hr,"");if(!e||!(t=ye(t)))return e;var r=Ee(e),a=fo(r,Ee(t));return lt(r,a).join("")}function gg(e,t){var n=al,r=ll;if(Y(t)){var a="separator"in t?t.separator:a;n="length"in t?E(t.length):n,r="omission"in t?ye(t.omission):r}e=U(e);var s=e.length;if(At(e)){var u=Ee(e);s=u.length}if(n>=s)return e;var p=n-Ft(r);if(p<1)return r;var d=u?lt(u,0,p).join(""):e.slice(0,p);if(a===i)return d+r;if(u&&(p+=d.length-p),mi(a)){if(e.slice(p).search(a)){var y,v=d;for(a.global||(a=Er(a.source,U(Di.exec(a))+"g")),a.lastIndex=0;y=a.exec(v);)var b=y.index;d=d.slice(0,b===i?p:b)}}else if(e.indexOf(ye(a),p)!=p){var C=d.lastIndexOf(a);C>-1&&(d=d.slice(0,C))}return d+r}function hg(e){return e=U(e),e&&Ll.test(e)?e.replace(Ti,Gs):e}var mg=Wt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),bi=ia("toUpperCase");function nl(e,t,n){return e=U(e),t=n?i:t,t===i?Os(e)?qs(e):Fs(e):e.match(t)||[]}var rl=P(function(e,t){try{return he(e,i,t)}catch(n){return hi(n)?n:new T(n)}}),yg=Ze(function(e,t){return Ce(t,function(n){n=Ne(n),qe(e,n,di(e[n],e))}),e});function vg(e){var t=e==null?0:e.length,n=B();return e=t?K(e,function(r){if(typeof r[1]!="function")throw new Se(w);return[n(r[0]),r[1]]}):[],P(function(r){for(var a=-1;++a<t;){var s=e[a];if(he(s[0],this,r))return he(s[1],this,r)}})}function bg(e){return Gu(Ie(e,q))}function _i(e){return function(){return e}}function _g(e,t){return e==null||e!==e?t:e}var xg=aa(),wg=aa(!0);function de(e){return e}function xi(e){return Wo(typeof e=="function"?e:Ie(e,q))}function Cg(e){return Oo(Ie(e,q))}function Sg(e,t){return ko(e,Ie(t,q))}var Lg=P(function(e,t){return function(n){return nn(n,e,t)}}),Ig=P(function(e,t){return function(n){return nn(e,n,t)}});function wi(e,t,n){var r=te(t),a=On(t,r);n==null&&!(Y(t)&&(a.length||!r.length))&&(n=t,t=e,e=this,a=On(t,te(t)));var s=!(Y(n)&&"chain"in n)||!!n.chain,u=Xe(e);return Ce(a,function(p){var d=t[p];e[p]=d,u&&(e.prototype[p]=function(){var y=this.__chain__;if(s||y){var v=e(this.__wrapped__),b=v.__actions__=ce(this.__actions__);return b.push({func:d,args:arguments,thisArg:e}),v.__chain__=y,v}return d.apply(e,tt([this.value()],arguments))})}),e}function Bg(){return re._===this&&(re._=Vs),this}function Ci(){}function Ag(e){return e=E(e),P(function(t){return Uo(t,e)})}var Fg=ei(K),Tg=ei(ao),Rg=ei(Lr);function il(e){return li(e)?Ir(Ne(e)):ac(e)}function Eg(e){return function(t){return e==null?i:mt(e,t)}}var Dg=sa(),Pg=sa(!0);function Si(){return[]}function Li(){return!1}function Mg(){return{}}function Wg(){return""}function Hg(){return!0}function Og(e,t){if(e=E(e),e<1||e>je)return[];var n=Oe,r=oe(e,Oe);t=B(t),e-=Oe;for(var a=Fr(r,t);++n<e;)t(n);return a}function kg(e){return R(e)?K(e,Ne):ve(e)?[e]:ce(Sa(U(e)))}function Ug(e){var t=++Xs;return U(e)+t}var Ng=$n(function(e,t){return e+t},0),zg=ti("ceil"),Gg=$n(function(e,t){return e/t},1),$g=ti("floor");function Kg(e){return e&&e.length?Hn(e,de,Ur):i}function qg(e,t){return e&&e.length?Hn(e,B(t,2),Ur):i}function Yg(e){return uo(e,de)}function Zg(e,t){return uo(e,B(t,2))}function Jg(e){return e&&e.length?Hn(e,de,$r):i}function Xg(e,t){return e&&e.length?Hn(e,B(t,2),$r):i}var Qg=$n(function(e,t){return e*t},1),Vg=ti("round"),jg=$n(function(e,t){return e-t},0);function eh(e){return e&&e.length?Ar(e,de):0}function th(e,t){return e&&e.length?Ar(e,B(t,2)):0}return l.after=Cf,l.ary=Ma,l.assign=cd,l.assignIn=Ja,l.assignInWith=rr,l.assignWith=pd,l.at=fd,l.before=Wa,l.bind=di,l.bindAll=yg,l.bindKey=Ha,l.castArray=Mf,l.chain=Ea,l.chunk=Gc,l.compact=$c,l.concat=Kc,l.cond=vg,l.conforms=bg,l.constant=_i,l.countBy=jp,l.create=dd,l.curry=Oa,l.curryRight=ka,l.debounce=Ua,l.defaults=gd,l.defaultsDeep=hd,l.defer=Sf,l.delay=Lf,l.difference=qc,l.differenceBy=Yc,l.differenceWith=Zc,l.drop=Jc,l.dropRight=Xc,l.dropRightWhile=Qc,l.dropWhile=Vc,l.fill=jc,l.filter=tf,l.flatMap=of,l.flatMapDeep=af,l.flatMapDepth=lf,l.flatten=Aa,l.flattenDeep=ep,l.flattenDepth=tp,l.flip=If,l.flow=xg,l.flowRight=wg,l.fromPairs=np,l.functions=wd,l.functionsIn=Cd,l.groupBy=sf,l.initial=ip,l.intersection=op,l.intersectionBy=ap,l.intersectionWith=lp,l.invert=Ld,l.invertBy=Id,l.invokeMap=cf,l.iteratee=xi,l.keyBy=pf,l.keys=te,l.keysIn=fe,l.map=Qn,l.mapKeys=Ad,l.mapValues=Fd,l.matches=Cg,l.matchesProperty=Sg,l.memoize=jn,l.merge=Td,l.mergeWith=Xa,l.method=Lg,l.methodOf=Ig,l.mixin=wi,l.negate=er,l.nthArg=Ag,l.omit=Rd,l.omitBy=Ed,l.once=Bf,l.orderBy=ff,l.over=Fg,l.overArgs=Af,l.overEvery=Tg,l.overSome=Rg,l.partial=gi,l.partialRight=Na,l.partition=df,l.pick=Dd,l.pickBy=Qa,l.property=il,l.propertyOf=Eg,l.pull=pp,l.pullAll=Ta,l.pullAllBy=fp,l.pullAllWith=dp,l.pullAt=gp,l.range=Dg,l.rangeRight=Pg,l.rearg=Ff,l.reject=mf,l.remove=hp,l.rest=Tf,l.reverse=pi,l.sampleSize=vf,l.set=Md,l.setWith=Wd,l.shuffle=bf,l.slice=mp,l.sortBy=wf,l.sortedUniq=Cp,l.sortedUniqBy=Sp,l.split=og,l.spread=Rf,l.tail=Lp,l.take=Ip,l.takeRight=Bp,l.takeRightWhile=Ap,l.takeWhile=Fp,l.tap=$p,l.throttle=Ef,l.thru=Xn,l.toArray=qa,l.toPairs=Va,l.toPairsIn=ja,l.toPath=kg,l.toPlainObject=Za,l.transform=Hd,l.unary=Df,l.union=Tp,l.unionBy=Rp,l.unionWith=Ep,l.uniq=Dp,l.uniqBy=Pp,l.uniqWith=Mp,l.unset=Od,l.unzip=fi,l.unzipWith=Ra,l.update=kd,l.updateWith=Ud,l.values=kt,l.valuesIn=Nd,l.without=Wp,l.words=nl,l.wrap=Pf,l.xor=Hp,l.xorBy=Op,l.xorWith=kp,l.zip=Up,l.zipObject=Np,l.zipObjectDeep=zp,l.zipWith=Gp,l.entries=Va,l.entriesIn=ja,l.extend=Ja,l.extendWith=rr,wi(l,l),l.add=Ng,l.attempt=rl,l.camelCase=Kd,l.capitalize=el,l.ceil=zg,l.clamp=zd,l.clone=Wf,l.cloneDeep=Of,l.cloneDeepWith=kf,l.cloneWith=Hf,l.conformsTo=Uf,l.deburr=tl,l.defaultTo=_g,l.divide=Gg,l.endsWith=qd,l.eq=Pe,l.escape=Yd,l.escapeRegExp=Zd,l.every=ef,l.find=nf,l.findIndex=Ia,l.findKey=md,l.findLast=rf,l.findLastIndex=Ba,l.findLastKey=yd,l.floor=$g,l.forEach=Da,l.forEachRight=Pa,l.forIn=vd,l.forInRight=bd,l.forOwn=_d,l.forOwnRight=xd,l.get=yi,l.gt=Nf,l.gte=zf,l.has=Sd,l.hasIn=vi,l.head=Fa,l.identity=de,l.includes=uf,l.indexOf=rp,l.inRange=Gd,l.invoke=Bd,l.isArguments=bt,l.isArray=R,l.isArrayBuffer=Gf,l.isArrayLike=pe,l.isArrayLikeObject=X,l.isBoolean=$f,l.isBuffer=st,l.isDate=Kf,l.isElement=qf,l.isEmpty=Yf,l.isEqual=Zf,l.isEqualWith=Jf,l.isError=hi,l.isFinite=Xf,l.isFunction=Xe,l.isInteger=za,l.isLength=tr,l.isMap=Ga,l.isMatch=Qf,l.isMatchWith=Vf,l.isNaN=jf,l.isNative=ed,l.isNil=nd,l.isNull=td,l.isNumber=$a,l.isObject=Y,l.isObjectLike=J,l.isPlainObject=un,l.isRegExp=mi,l.isSafeInteger=rd,l.isSet=Ka,l.isString=nr,l.isSymbol=ve,l.isTypedArray=Ot,l.isUndefined=id,l.isWeakMap=od,l.isWeakSet=ad,l.join=sp,l.kebabCase=Jd,l.last=Ae,l.lastIndexOf=up,l.lowerCase=Xd,l.lowerFirst=Qd,l.lt=ld,l.lte=sd,l.max=Kg,l.maxBy=qg,l.mean=Yg,l.meanBy=Zg,l.min=Jg,l.minBy=Xg,l.stubArray=Si,l.stubFalse=Li,l.stubObject=Mg,l.stubString=Wg,l.stubTrue=Hg,l.multiply=Qg,l.nth=cp,l.noConflict=Bg,l.noop=Ci,l.now=Vn,l.pad=Vd,l.padEnd=jd,l.padStart=eg,l.parseInt=tg,l.random=$d,l.reduce=gf,l.reduceRight=hf,l.repeat=ng,l.replace=rg,l.result=Pd,l.round=Vg,l.runInContext=f,l.sample=yf,l.size=_f,l.snakeCase=ig,l.some=xf,l.sortedIndex=yp,l.sortedIndexBy=vp,l.sortedIndexOf=bp,l.sortedLastIndex=_p,l.sortedLastIndexBy=xp,l.sortedLastIndexOf=wp,l.startCase=ag,l.startsWith=lg,l.subtract=jg,l.sum=eh,l.sumBy=th,l.template=sg,l.times=Og,l.toFinite=Qe,l.toInteger=E,l.toLength=Ya,l.toLower=ug,l.toNumber=Fe,l.toSafeInteger=ud,l.toString=U,l.toUpper=cg,l.trim=pg,l.trimEnd=fg,l.trimStart=dg,l.truncate=gg,l.unescape=hg,l.uniqueId=Ug,l.upperCase=mg,l.upperFirst=bi,l.each=Da,l.eachRight=Pa,l.first=Fa,wi(l,function(){var e={};return ke(l,function(t,n){N.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=h,Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),Ce(["drop","take"],function(e,t){W.prototype[e]=function(n){n=n===i?1:ee(E(n),0);var r=this.__filtered__&&!t?new W(this):this.clone();return r.__filtered__?r.__takeCount__=oe(n,r.__takeCount__):r.__views__.push({size:oe(n,Oe),type:e+(r.__dir__<0?"Right":"")}),r},W.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ce(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Bi||n==pl;W.prototype[e]=function(a){var s=this.clone();return s.__iteratees__.push({iteratee:B(a,3),type:n}),s.__filtered__=s.__filtered__||r,s}}),Ce(["head","last"],function(e,t){var n="take"+(t?"Right":"");W.prototype[e]=function(){return this[n](1).value()[0]}}),Ce(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[n](1)}}),W.prototype.compact=function(){return this.filter(de)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=P(function(e,t){return typeof e=="function"?new W(this):this.map(function(n){return nn(n,e,t)})}),W.prototype.reject=function(e){return this.filter(er(B(e)))},W.prototype.slice=function(e,t){e=E(e);var n=this;return n.__filtered__&&(e>0||t<0)?new W(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=E(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(Oe)},ke(W.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=l[r?"take"+(t=="last"?"Right":""):t],s=r||/^find/.test(t);!a||(l.prototype[t]=function(){var u=this.__wrapped__,p=r?[1]:arguments,d=u instanceof W,y=p[0],v=d||R(u),b=function(M){var H=a.apply(l,tt([M],p));return r&&C?H[0]:H};v&&n&&typeof y=="function"&&y.length!=1&&(d=v=!1);var C=this.__chain__,I=!!this.__actions__.length,A=s&&!C,D=d&&!I;if(!s&&v){u=D?u:new W(this);var F=e.apply(u,p);return F.__actions__.push({func:Xn,args:[b],thisArg:i}),new Le(F,C)}return A&&D?e.apply(this,p):(F=this.thru(b),A?r?F.value()[0]:F.value():F)})}),Ce(["pop","push","shift","sort","splice","unshift"],function(e){var t=wn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(r&&!this.__chain__){var s=this.value();return t.apply(R(s)?s:[],a)}return this[n](function(u){return t.apply(R(u)?u:[],a)})}}),ke(W.prototype,function(e,t){var n=l[t];if(n){var r=n.name+"";N.call(Dt,r)||(Dt[r]=[]),Dt[r].push({name:t,func:n})}}),Dt[Gn(i,ut).name]=[{name:"wrapper",func:i}],W.prototype.clone=gu,W.prototype.reverse=hu,W.prototype.value=mu,l.prototype.at=Kp,l.prototype.chain=qp,l.prototype.commit=Yp,l.prototype.next=Zp,l.prototype.plant=Xp,l.prototype.reverse=Qp,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Vp,l.prototype.first=l.prototype.head,Jt&&(l.prototype[Jt]=Jp),l},Tt=Ys();pt?((pt.exports=Tt)._=Tt,xr._=Tt):re._=Tt}).call(commonjsGlobal)})(lodash,lodash.exports);var _=lodash.exports;const ComponentSchema={type:"object",properties:{layout:{type:"array",items:{type:"object",properties:{key:{type:"string"},value:{type:"string"}}}},value:{type:"array",items:{type:"object",properties:{label:{type:"string"},value:{type:"string"}}}},columns:{type:"array",items:{type:"object",properties:{header:{type:"string"},accessorKey:{type:"string"},widgetType:{type:"string"}}}},events:{type:"array",items:{type:"object",properties:{eventType:{type:"string"},configType:{type:"string"}}}},sectionLabels:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}}}},componentBasicUiSchema={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{rowSpacing:1,header:!0},defaultStyle:!0},elements:[{type:"Control",scope:"#/properties/Component",options:{widget:"Box"},config:{layout:{xs:12,sm:12,md:2},main:{heading:"Component"},style:{float:"left"}}},{type:"Control",scope:"#/properties/pageName",options:{widget:"Box"},config:{layout:{xs:7,sm:7,md:9},main:{heading:" "},style:{float:"right",width:"auto",fontSize:"12px",color:"gray",paddingTop:"10px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:{xs:2,sm:2,md:.5},main:{icon:"BackIcon",styleDefault:!0,size:"small",onClick:"backHandler",tooltipMessage:"Back"},style:{float:"right"}}}]},{type:"TabLayout",config:{main:{tabLabels:["Core"],defaultStyle:!0,id:"component"}},elements:[{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Type",options:[{label:"Select",value:"Select"},{label:"Date",value:"Date"},{label:"CheckBox",value:"CheckBox"},{label:"Table",value:"Table"},{label:"Array",value:"Array"},{label:"Container",value:"WrapperSection"},{label:"Tabs",value:"TabSection"},{label:"Text",value:"Text"},{label:"Text Area",value:"TextArea"},{label:"Button",value:"Button"},{label:"Card",value:"card"},{label:"Rank",value:"Rank"},{label:"SpeedoMeter",value:"SpeedoMeter"},{label:"ProgressBar",value:"ProgressBar"},{label:"Graph",value:"Graph"},{label:"Label",value:"Box"},{label:"Upload File",value:"UploadFile"},{label:"Download File",value:"DownloadFile"},{label:"Empty Box",value:"EmptyBox"},{label:"ProgressBar Card",value:"ProgressBarCard"},{label:"Rank Card",value:"RankCard"},{label:"Runner Boy Progress Bar",value:"RunnerBoyProgressBar"},{label:"Slider",value:"Slider"},{label:"Timer",value:"Timer"},{label:"MultipleSelect",value:"MultipleSelect"},{label:"LeaderBoard",value:"LeaderBoard"}]}}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Name",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Label",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:6,lg:6}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Screen Size",options:[{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]}]},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:8,lg:8}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:3,lg:3},main:{name:"Save",startIcon:"ApproveIcon",variant:"contained",color:"info",type:"text",onClick:"saveHandler",size:"small"},style:{marginBottom:"8px",float:"right"}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6}]};var buildConfig=o=>{const c=_.cloneDeep(o);let i={};return c.pageName&&delete c.pageName,c.eventsSelected&&delete c.eventsSelected,(c.type==="Table"||c.type==="WrapperSection"||c.type==="TabSection")&&(i.elements=c.elements||[],c.elements&&delete c.elements),i.events=c.events||[],c.events&&delete c.events,i={...c,...i},i};const createLayoutFormat=o=>{let c={};return o.map(i=>{c[i.key]=+i.value}),c},getNavigationHistory=(o,c)=>{if(c){let i=o.name;const h=c.split("."),x=[];return h.map((S,w)=>{if(w===0){x.push(S);return}x.push(`${x[w-1]}.${S}`)}),x.map(S=>{const w=_.get(o,S);w?i=i+` > ${(w==null?void 0:w.name)||(w==null?void 0:w.eventType)}`:i=i+" > NewComponent"}),{pageName:i}}},saveFormdataInLocalStorage=(o,c)=>{let i;if(c){const h=getFormdataFromLocalStorage();i=_.set(h,c,buildConfig(o))}else i=buildConfig(o);return localStorage.setItem("pageFormdata",JSON.stringify(i)),i},getFormdataFromLocalStorage=o=>{const c=localStorage.getItem("pageFormdata")?JSON.parse(localStorage.getItem("pageFormdata")):void 0;let i;return o&&(i=_.get(c,o),i={...i,...getNavigationHistory(c,o)}),i||(i=getNavigationHistory(c,o)),i||c},CoreSection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Type",type:"text",options:[{label:"Select",value:"Select"},{label:"Date",value:"Date"},{label:"CheckBox",value:"CheckBox"},{label:"Table",value:"Table"},{label:"Array",value:"Array"},{label:"Container",value:"WrapperSection"},{label:"Tabs",value:"TabSection"},{label:"Text",value:"Text"},{label:"Text Area",value:"TextArea"},{label:"Button",value:"Button"},{label:"Card",value:"card"},{label:"Rank",value:"Rank"},{label:"SpeedoMeter",value:"SpeedoMeter"},{label:"ProgressBar",value:"ProgressBar"},{label:"Graph",value:"Graph"},{label:"Label",value:"Box"},{label:"Upload File",value:"UploadFile"},{label:"Download File",value:"DownloadFile"},{label:"Empty Box",value:"EmptyBox"},{label:"ProgressBar Card",value:"ProgressBarCard"},{label:"Rank Card",value:"RankCard"},{label:"Runner Boy Progress Bar",value:"RunnerBoyProgressBar"},{label:"Slider",value:"Slider"},{label:"Timer",value:"Timer"},{label:"MultipleSelect",value:"MultipleSelect"},{label:"LeaderBoard",value:"LeaderBoard"}]}}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Name"}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{label:"Label"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:6,lg:6}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Screen Size",options:[{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]},OptionArray={type:"Control",scope:"#/properties/value",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Label"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},EventSection={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{divider:!0},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/programType",options:{widget:"Box"},config:{layout:8,main:{heading:"Event Table"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"eventAddHandler",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event Type"},{accessorKey:"Handler",header:"Handler"},{accessorKey:"Edit_Approve_Records",header:"Edit Widget",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{color:"info",size:"small",icon:"EditIcon",tooltipMessage:"Edit This Record",onClick:"eventEditHandler"},style:{color:"#3949ab"}}}},{accessorKey:"Reject_Records",header:"Delete",widget:{type:"Control",scope:"#/properties/RejectButton",accessorKeyName:"Reject_Records",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",tooltipMessage:"Reject This Record",onClick:"deleteEvent"}}}}]}]}]},getInputField=(o,c)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c}}}),getRadioInputField=(o,c,i)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"RadioInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c,options:i}}}),getTextArea=(o,c,i,h)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"TextArea"},config:{layout:h||12,style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px"}},main:{heading:c,minRows:8,hideButton:i}}}),getSelectField=(o,c,i)=>({type:"Control",scope:`#/properties/${o}`,options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:c,type:"text",options:i}}}),GraphSection={type:"HorizontalLayout",elements:[]},buildPropertiesSection=function(o){let c=_.cloneDeep(GraphSection);if(o==="SpeedoMeter"||o==="RankCard"||o==="Timer")c.elements=[getInputField("rank","Rank"),getInputField("image","Image Url"),getInputField("title","Card Title"),getInputField("description","Card Description")];else if(o==="LeaderBoard")c.elements=[getInputField("valueLabel","Value Label"),getInputField("firstImage","First Image url"),getInputField("secondImage","Second Image url"),getInputField("thirdImage","Third Image url"),getTextArea("functionCode","Write Compare Code",!1)];else if(o==="CardSlider"){const i=getInputField("heading","Heading"),h=getInputField("iconName","Icon Name");c.elements=[i,h]}else if(o==="ProgressBar"||o==="ProgressBarCard"){const i=getInputField("heading","Heading"),h=getInputField("bottomLabel_1","First BottomLabel"),x=getInputField("bottomLabel_2","Second BottomLabel"),S=getInputField("bottomLabel_3","Third BottomLabel");c.elements=[i,h,x,S]}else if(o==="card")c.elements=[getInputField("url","Image Url"),getInputField("label","Label"),getInputField("description","Description")];else if(o==="Box"){const i=getInputField("value","Value");c.elements=[getSelectField("graphType","Label Type",[{label:"URL",value:"url"},{label:"Heading",value:"heading"}]),i]}else if(o==="Button"){const i=getInputField("color","Color"),h=getInputField("size","Size"),x=getInputField("iconName","Icon Name");c.elements=[getSelectField("buttonType","Button Type",[{label:"Button With Text",value:"Button"},{label:"Button With Icon",value:"IconButton"},{label:"Button With Icon and Text",value:"ButtonWithIconAndText"}]),x,h,i]}else if(o==="Graph"){const i=getInputField("height","Height"),h=getInputField("heading","Heading"),x=getInputField("leftLabel","Left Label"),S=getInputField("bottomLabel","Bottom Label"),w=getRadioInputField("legendHide","Legend Hide",["YES","No"]);c.elements=[h,i,getSelectField("graphType","Graph Type",[{label:"Bar Graph",value:"BarGraph"},{label:"Stack Bar Graph",value:"StackBarGraph"},{label:"Pie Graph",value:"PieGraph"},{label:"Horizontal Bar Graph",value:"HorizontalBarGraph"}]),x,S,w]}else o==="WrapperSection"?c.elements=[getRadioInputField("divider","Divider",["YES","No"]),getRadioInputField("heading","Page Heading",["YES","No"])]:o==="TabSection"&&(c.elements=[{type:"Control",scope:"#/properties/sectionLabels",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Labels for Tab"}}}]}}}]);return c},StyleSection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/style",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:12,lg:12},style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px"}},main:{heading:"JSON Style",minRows:8,hideButton:!0}}}]},TableSection={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/programType",options:{widget:"Box"},config:{layout:8,main:{heading:"Components Table"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"widgetAddClickHandler",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/elements",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"name",header:"Name"},{accessorKey:"type",header:"Type"},{header:"Edit Record",field:"Reject_Records",flex:1,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"EditIcon",color:"primary",onClick:"editComponents",tooltipMessage:"Reject This Record"}}}},{header:"Delete",field:"Reject_Records",flex:1,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",onClick:"deleteComponents",tooltipMessage:"Reject This Record"}}}}]}]}]},ValueTab={type:"HorizontalLayout",elements:[OptionArray]},sectionLabels={Select:["Core","Value","style","Event"],MultipleSelect:["Core","Value","style","Event"],Table:["Core","Components","style","Event"],LeaderBoard:["Core","Components","Properties","style","Event"],WrapperSection:["Core","Components","Properties","style"],TabSection:["Core","Components","Properties","style"],SpeedoMeter:["Core","Properties","style","Event"],card:["Core","Properties","style","Event"],UploadFile:["Core","style","Event"],Graph:["Core","Properties","style","Event"],DownloadFile:["Core","style","Event"],Box:["Core","Properties","style","Event"],Properties:["Core","Properties","style","Event"],ProgressBarCard:["Core","Properties","style","Event"],RankCard:["Core","Properties","style","Event"],Slider:["Core","Components","Properties","style","Event"],Timer:["Core","Properties","style","Event"],Rank:["Core","Properties","style","Event"],Button:["Core","Properties","style","Event"],Array:["Core","Components"]},refreshPage=(o,c)=>{var h;const i=_.cloneDeep(componentBasicUiSchema);if(o){const x={Core:CoreSection,Value:ValueTab,style:StyleSection,Event:EventSection,Components:TableSection,Properties:buildPropertiesSection(o)},S=(h=sectionLabels[o])==null?void 0:h.map(w=>x[w]);i.elements[1].config.main.tabLabels=sectionLabels[o]||["Core","style","Event"],i.elements[1].elements=S||[CoreSection,StyleSection,EventSection]}c.setUiSchema(i)};var Component=(o,c)=>({setPage:async function(){const i=await this.getFormdata();o.setFormdata(i);const h=this.getSchema();o.setSchema(h),this.refreshPage(i==null?void 0:i.type,o)},refreshPage,getFormdata:async function(){var h;const i=(h=o.searchParams)==null?void 0:h.get("path");return getFormdataFromLocalStorage(i)},getSchema:function(){return ComponentSchema},saveHandler:async function(){var h;const i=(h=o.searchParams)==null?void 0:h.get("path");saveFormdataInLocalStorage(o.formData,i),o.navigate(-1),o.setNotify({SuccessMessage:"Save Successfully",Success:!0})},onChange:function(){var i,h,x,S;((i=o==null?void 0:o.formData)==null?void 0:i.type)!==((h=o==null?void 0:o.newData)==null?void 0:h.type)&&((x=o==null?void 0:o.newData)==null?void 0:x.type)!==void 0&&this.refreshPage((S=o==null?void 0:o.newData)==null?void 0:S.type,o)},editComponents:async function(){var S,w,O;const i=c.path.split(".")[1],h=(S=o.searchParams)==null?void 0:S.get("path"),x=(w=o.searchParams)==null?void 0:w.get("id");if(saveFormdataInLocalStorage(o.formData,h),h){const ne=`${(O=o.searchParams)==null?void 0:O.get("path")}.elements[${i}]`;o.searchParams.set("path",ne),o.setSearchParams(o.searchParams),this.setPage()}else o.navigate(`/Component?path=${`elements[${i}]`}&id=${x}`)},deleteComponents:async function(){var w;const i=(w=o.searchParams)==null?void 0:w.get("path"),h=c.path.split(".")[1];o.formData.elements.splice(h,1);const x=saveFormdataInLocalStorage(o.formData,i),S=i?_.get(x,i):x;o.setFormdata(S)},deleteEvent:async function(){var S;const i=(S=o.searchParams)==null?void 0:S.get("path"),h=c.path.split(".")[1];o.formData.events.splice(h,1);const x=saveFormdataInLocalStorage(o.formData,i);o.setFormdata(_.get(x,i))},widgetAddClickHandler:async function(){var x;Array.isArray(o.formData.elements)||(o.formData.elements=[]);const i=(x=o.searchParams)==null?void 0:x.get("path");saveFormdataInLocalStorage(o.formData,i);const h=`${i}.elements[${o.formData.elements.length}]`;o.searchParams.set("path",h),o.setSearchParams(o.searchParams),this.setPage()},eventEditHandler:async function(){var w,O;const i=c.path.split(".")[1],h=(w=o.searchParams)==null?void 0:w.get("path"),x=(O=o.searchParams)==null?void 0:O.get("id");saveFormdataInLocalStorage(o.formData,h);const S=`${h}.events[${i}]`;o.navigate(`/ComponentEvents?path=${S}&id=${x}`)},eventAddHandler:async function(){var S,w;const i=(S=o.searchParams)==null?void 0:S.get("path"),h=(w=o.searchParams)==null?void 0:w.get("id");Array.isArray(o.formData.events)||(o.formData.events=[]),saveFormdataInLocalStorage(o.formData,i);const x=`${i}.events[${o.formData.events.length}]`;o.navigate(`/ComponentEvents?path=${x}&id=${h}`)},backHandler:function(){o.navigate(-1)}}),pageMaster=o=>{const{store:c,dynamicData:i,config:h,submitHandler:x}=o;return{setPage:async function(){const S=await this.getFormdata();c.setFormdata(S);const w=await this.getUiSchema(),O=await this.getSchema();c.setSchema(O),c.setUiSchema(w)},getFormdata:async function(){var w;(w=c.searchParams)==null||w.get("id");const S=getFormdataFromLocalStorage();return S||(saveFormdataInLocalStorage(h),h)},getUiSchema:async function(){return PageMasterUiSchema},getSchema:()=>PageMasterSchema,backHandler:()=>{localStorage.removeItem("pageFormdata"),c.navigate("/PageMasterRecords")},onAddClickHandler:async function(){var O;const S=(O=c.searchParams)==null?void 0:O.get("id");Array.isArray(c.formData.elements)||(c.formData.elements=[]);const w=saveFormdataInLocalStorage(c.formData);c.navigate(`/Component?path=${`elements[${w==null?void 0:w.elements.length}]`}&id=${S}`)},submitPageHandler:async function(){x(c,o.service).then(S=>{localStorage.removeItem("pageFormdata"),c.navigate(-1),c.setNotify({SuccessMessage:"Submit Successfully",Success:!0})})},Edit_Components:Component(c,i).editComponents,Delete_Components:Component(c,i).deleteComponents,eventAddHandler:async function(){var O;const S=(O=c.searchParams)==null?void 0:O.get("id");Array.isArray(c.formData.events)||(c.formData.events=[]),saveFormdataInLocalStorage(c.formData);const w=`events[${c.formData.events.length}]`;c.navigate(`/ComponentEvents?path=${w}&id=${S}`)},editEvent:async function(){var Z;const S=i.path.split(".")[1],w=(Z=c.searchParams)==null?void 0:Z.get("id");saveFormdataInLocalStorage(c.formData);const O=`events[${S}]`;c.navigate(`/ComponentEvents?path=${O}&id=${w}`)},deleteEvent:async function(){const S=i.path.split(".")[1];c.formData.events.splice(S,1);const w=saveFormdataInLocalStorage(c.formData);c.setFormdata(w)}}};const EventSchema={type:"object",properties:{headers:{type:"array",items:{type:"object",properties:{headers_key:{type:"string"},headers_value:{type:"string"}}}},refreshElements:{type:"array",items:{type:"object",properties:{value:{type:"string"}}}},body:{type:"array",items:{type:"object",properties:{body_key:{type:"string"},body_value:{type:"string"}}}}}},EventUiSchema={type:"HorizontalLayout",elements:[{type:"WrapperLayout",config:{main:{rowSpacing:1,header:!0},defaultStyle:!0},elements:[{type:"Control",scope:"#/properties/Component",options:{widget:"Box"},config:{layout:{xs:12,sm:12,md:2},main:{heading:"Component"},style:{float:"left"}}},{type:"Control",scope:"#/properties/pageName",options:{widget:"Box"},config:{layout:{xs:7,sm:7,md:9},main:{heading:" "},style:{float:"right",width:"auto",fontSize:"12px",color:"gray",paddingTop:"10px"}}},{type:"Control",scope:"#/properties/Back_Button",options:{widget:"IconButton"},config:{layout:{xs:2,sm:2,md:.5},main:{icon:"BackIcon",styleDefault:!0,size:"small",onClick:"backHandler",tooltipMessage:"Back"},style:{float:"right"}}}]},{type:"TabLayout",config:{main:{tabLabels:["Core","Response Event"],defaultStyle:!0,id:"event"}},elements:[{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/eventType",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Event Type",type:"text",options:[{label:"Click Event",value:"onClick"},{label:"Load Event",value:"onLoad"},{label:"Change Event",value:"onChange"},{label:"Success",value:"Success"},{label:"Fail",value:"Fail"}]}}},getSelectField("Handler","Handler",[{label:"Custom",value:"custom"},{label:"Api",value:"api"},{label:"Inbuilt Function",value:"inBuiltFunction"},{label:"Refresh",value:"refresh"}])]},{type:"WrapperLayout",config:{main:{divider:!0},wrapperStyle:{border:"1px solid gray"}},elements:[{type:"Control",scope:"#/properties/heading",options:{widget:"Box"},config:{layout:8,main:{heading:"Response Event"},style:{fontFamily:"Roboto",fontWeight:"500",paddingLeft:"-10px",fontSize:"20px"}}},{type:"Control",scope:"#/properties/AddButton",options:{widget:"IconButton"},config:{layout:3,main:{icon:"AddIcon",styleDefault:!0,size:"small",onClick:"addEvent",tooltipMessage:"Back"},style:{float:"right"}}},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event Type"},{accessorKey:"Handler",header:"Handler"},{accessorKey:"Edit_Approve_Records",header:"Edit Widget",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{color:"info",size:"small",icon:"EditIcon",tooltipMessage:"Edit This Record",onClick:"editEvent"},style:{color:"#3949ab"}}}},{accessorKey:"Reject_Records",header:"Delete",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"RejectIcon",color:"error",tooltipMessage:"Reject This Record",onClick:"deleteEvent"}}}}]}]}]},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:11,sm:11,md:8,lg:8}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:3,lg:3},main:{name:"Save",startIcon:"ApproveIcon",variant:"contained",color:"info",type:"text",onClick:"saveHandler",size:"small"},style:{marginBottom:"8px",float:"right"}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6}]},APISection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/method",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Method",type:"text",options:[{label:"Get",value:"get"},{label:"Post",value:"post"},{label:"Delete",value:"delete"},{label:"Put",value:"put"}]}}},{type:"Control",scope:"#/properties/path",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Path",type:"text",multiple:!1,options:[]}}},{type:"Control",scope:"#/properties/headers",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},{type:"Control",scope:"#/properties/body",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}},getTextArea("apiBody","Transformer",!0,12)]},refreshSectionUiSchema={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/refreshElements",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"Value"}}}]}}}]};var event=(o,c)=>({setPage:async function(){const i=await this.getFormData();o.setFormdata(i);const h=await this.getSchema();o.setSchema(h),this.refreshPage(i.Handler,o)},refreshPage:(i,h)=>{const x=_.cloneDeep(EventUiSchema);i&&(i==="custom"?x.elements[1].elements[0].elements[2]=getTextArea("eventCode","Write Custom Code",!1):i==="api"?x.elements[1].elements[0].elements[2]=APISection:i==="inBuiltFunction"?(x.elements[1].elements[0].elements[2]=getSelectField("inBuiltFunctionType","Function Name",[{label:"RankProvider",value:"RankProvider"},{label:"Download File",value:"downloadFile"}]),x.elements[1].elements[0].elements[3]=getTextArea("funcParametersCode","Write Custom Code for Functions Parameter",!0,{xs:12,sm:12,md:6})):i==="refresh"&&(x.elements[1].elements[0].elements[2]=refreshSectionUiSchema)),h.setUiSchema(x)},getFormData:Component(o,c).getFormdata,getUiSchema:async function(){return EventUiSchema},getSchema:async()=>EventSchema,onChange:function(){var i,h,x;((i=o==null?void 0:o.formData)==null?void 0:i.Handler)!==((h=o==null?void 0:o.newData)==null?void 0:h.Handler)&&((x=o==null?void 0:o.newData)==null?void 0:x.Handler)!==void 0&&this.refreshPage(o.newData.Handler||o.formdata.Handler,o)},saveHandler:Component(o,c).saveHandler,addEvent:async function(){var x,S,w;const i=(x=o.searchParams)==null?void 0:x.get("path");Array.isArray(o.formData.events)||(o.formData.events=[]),saveFormdataInLocalStorage(o.formData,i);const h=`${i}.events[${(w=(S=o.formData)==null?void 0:S.events)==null?void 0:w.length}]`;o.searchParams.set("path",h),o.setSearchParams(o.searchParams),this.setPage()},editEvent:async function(){var S;const i=c.path.split(".")[1],h=(S=o.searchParams)==null?void 0:S.get("path");saveFormdataInLocalStorage(o.formData,h);const x=`${h}.events[${i}]`;o.searchParams.set("path",x),o.setSearchParams(o.searchParams),this.setPage()},deleteEvent:Component(o,c).deleteEvent,backHandler:function(){o.navigate(-1)}});const downloadFile$1=o=>{const c=o.name.split("."),i=o.data,h=window.atob(i);let x;x=new File([h],c[c.length-1]);const S=URL.createObjectURL(x),w=document.createElement("a");w.href=c[c.length-1]==="pdf"?"data:application/octet-stream;base64,"+i:S,w.download=`${o.name}`,document.body.appendChild(w),w.click(),URL.revokeObjectURL(S),document.body.removeChild(w)},executeEvents=async(o,c,i,h,x,S,w,O,Z)=>{let ne=[],V=null;if(o.eventType==="onLoad"){const{response:q,events:ge}=await executetOnLoadEvent(o,c,i,h,x,S,w,O,Z);V=q,ne=ge}else{const{response:q,events:ge}=await executeEventsHandler(o,c,i,h,x,S,w,O,Z);V=q,ne=ge}if((ne==null?void 0:ne.length)>0)for(const q of ne)await executeEvents(q,c,i,h,x,S,w,O,V)},executetOnLoadEvent=async(o,c,i,h,x,S,w,O,Z)=>{try{const{response:ne}=await executeEventsHandler(o,c,i,h,x,S,w,O,Z),V=o==null?void 0:o.events.filter(ge=>ge.eventType==="Success"),q=V.length>0?V:[{Handler:"mergeFormdata",eventType:"Success",type:o.type}];return{response:ne,events:q}}catch{const V=o==null?void 0:o.events.filter(ge=>ge.eventType==="Fail"),q=V.length>0?V:[];return{response:void 0,events:q}}};async function executeEventsHandler(o,c,i,h,x,S,w,O,Z){if(o.Handler==="api")return await executeApiEventHandler(o,c,i,h,x,S);if(o.Handler==="inBuiltFunction")return await executeInBuiltFunctionHandler(o,c,i,h,x,S,w,Z);if(o.Handler==="custom")return await executeCustomHandler(o,c,i,h,x,S,w,Z);if(o.Handler==="refresh")return await executeRefreshHandler(o,c,i,h,x,S,w,Z,O);if(o.Handler==="mergeFormdata")return await mergeFormdata(Z,c,o,i)}async function executeRefreshHandler(o,c,i,h,x,S,w,O,Z){const ne=getRefreshElements(o,Z);for(const V of ne)for(const q of Z.onLoad[V])await executeEvents(q,V,i,h,x,S,w);return{response:void 0,events:void 0}}async function executeApiEventHandler(o,c,i,h,x,S,w,O){const Z={...x==null?void 0:x.payload},ne={"X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"},{body:V,headers:q}=await buildApiPayload(o,Z,ne,i,h,x);let ge;return ge=await S[o.method](o.path,V,q&&{headers:q}),{response:ge,events:o==null?void 0:o.events}}async function executeInBuiltFunctionHandler(refreshHandlerConfig,componentName,store,dynamicData,userValue,service,serviceHolder,parentEventOutput){let parameter={};if(refreshHandlerConfig.funcParametersCode){const makeFunc=eval(refreshHandlerConfig.funcParametersCode);parameter=makeFunc(store,dynamicData,userValue,parentEventOutput,service)}return serviceHolder[refreshHandlerConfig.inBuiltFunctionType](parameter),{response:void 0,events:refreshHandlerConfig==null?void 0:refreshHandlerConfig.events}}async function executeCustomHandler(customHandlerConfig,componentName,store,dynamicData,userValue,service,serviceHolder,parentEventOutput){const makeFunc=eval(customHandlerConfig.eventCode);return makeFunc(store,dynamicData,userValue,parentEventOutput,service),{response:void 0,events:customHandlerConfig==null?void 0:customHandlerConfig.events}}async function mergeFormdata(o,c,i,h){return i.type==="Select"&&!(_.isEmpty(o)&&o)?h.setSchema(x=>({...x,properties:{...x.properties,[c]:{enum:o.data}}})):i.type==="page"?h.setFormdata(x=>({...x,...o==null?void 0:o.data})):o&&h.setFormdata(x=>({...x,[c]:o.data})),{response:void 0,events:void 0}}const buildBodyFormat=(o,c,i)=>{const h={...i==null?void 0:i.payload};return o.map(x=>{var S,w;if((S=x==null?void 0:x.value)!=null&&S.startsWith("$userValue")){const O=x.value.substring(11);h[x.key]=_.get(i,O)}else if((w=x==null?void 0:x.value)!=null&&w.startsWith("$")){const O=x.value.substring(1);h[x.key]=_.get(c,O)}else h[x.key]=x.value}),h},buildHeadersFormat=o=>{const c={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"};return o.map(i=>{c[i.key]=i.value}),c};async function buildApiPayload(compConfig,body,headers,store,dynamicData,userValue,service){var o,c;if(compConfig!=null&&compConfig.headers&&(headers={headers:buildHeadersFormat(compConfig.headers)}),compConfig.body&&(body={...buildBodyFormat(compConfig.body,store.newData||((c=(o=store==null?void 0:store.ctx)==null?void 0:o.core)==null?void 0:c.data)||store.formData,userValue)}),compConfig.apiBody){const makeFunc=eval(compConfig.apiBody),data=await makeFunc(store,dynamicData,userValue,body);body=data}return{body,headers}}function getRefreshElements(o,c){var h;let i=[];return((h=o==null?void 0:o.refreshElements)==null?void 0:h.length)>0?i=o.refreshElements.map(x=>x.value):c!=null&&c.onLoad&&(i=Object.keys(c==null?void 0:c.onLoad)),i}let compType,eventGroups={};const notifyUiSchema={type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},extractEvents=o=>{function c(i){i.events&&i.events.forEach(h=>{i.type&&(compType=i.type),eventGroups[h.eventType]||(eventGroups[h.eventType]={}),eventGroups[h.eventType][i.name]||(eventGroups[h.eventType][i.name]=[]),eventGroups[h.eventType][i.name].push({...h,type:compType})})}return c(o),o!=null&&o.elements&&o.elements.forEach(extractEvents),eventGroups};var service=o=>({setPage:async function(){o.store.setFormdata({}),eventGroups={},eventGroups=extractEvents(o.config),await executeEvents({Handler:"refresh",eventType:"onPageRefresh"},"all",o.store,o.dynamicData,o.userValue,o.service,this,eventGroups),o.uiSchema.elements.push(notifyUiSchema),o.store.setUiSchema(o.uiSchema)},onClick:async function(){var i;const c=((i=o.dynamicData)==null?void 0:i.tableButtonPath)||o.dynamicData.path.split(".")[0];for(const h of eventGroups==null?void 0:eventGroups.onClick[c])await executeEvents(h,c,o.store,o.dynamicData,o.userValue,o.service,this,eventGroups)},onChange:async function(){if(eventGroups.onChange){const c=Object.keys(eventGroups.onChange);Promise.all(c.map(async i=>{var h,x;if(((h=o.store)==null?void 0:h.formData[i])!==o.store.newData[i]&&((x=o.store)==null?void 0:x.newData[i])!==void 0)for(const S of eventGroups.onChange[i])await executeEvents(S,i,o.store,o.dynamicData,o.userValue,o.service,this,eventGroups)}))}},downloadFile:downloadFile$1}),emptyBox={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:12,sm:12,md:5.5,lg:5.5},main:{},style:{}}},leaderBoard={type:"WrapperLayout",config:{main:{rowSpacing:3,header:!0,label:"LeaderBoard",divider:!0},wrapperStyle:{position:"relative",width:"100%",height:1e3}},elements:[{type:"Control",scope:"#/properties/leaderBoard/properties/firstImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"90px",md:"60px"},left:{xs:"calc(50% - 50px)",sm:"calc(50% - 50px)",md:"calc(50% - 100px)"},width:{xs:"100px",sm:"100px",md:"200px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"100px",sm:"100px",md:"200px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/secondImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"160px",md:"130px"},left:{xs:"calc(25% - 45px)",sm:"calc(25% - 45px)",md:"calc(25% - 90px)"},width:{xs:"80px",sm:"80px",md:"180px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"80px",sm:"80px",md:"180px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/thirdImage",config:{main:{url:"https://my.alfred.edu/zoom/_images/foster-lake.jpg"},containerStyle:{objectFit:"cover",position:"absolute",top:{xs:"160px",md:"130px"},left:{xs:"calc(75% - 42.5px)",sm:"calc(75% - 42.5px)",md:"calc(75% - 85px)"},width:{xs:"80px",sm:"80px",md:"180px"},border:"5px solid rgb(179, 198, 255)",height:{xs:"80px",sm:"80px",md:"180px"},borderRadius:"50%"},style:{objectFit:"cover",width:"100%",height:"100%",borderRadius:"50%"},layout:6},options:{widget:"Image"}},{type:"Control",scope:"#/properties/leaderBoard/properties/firstName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"190px",md:"270px"},fontSize:{xs:"12px",md:"20px"},left:"calc(50% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%",zIndex:7},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/secondName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"240px",md:"320px"},fontSize:{xs:"12px",md:"20px"},left:"calc(25% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%"},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/thirdName",config:{main:{heading:"Satendra Raghav"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",color:"black",top:{xs:"240px",md:"320px"},fontSize:{xs:"12px",md:"20px"},left:"calc(75% - 90px)",width:"180px",fontWeight:"bold",borderRadius:"50%"},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/econd",config:{main:{heading:"2"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"225px",md:"280px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(25% - 12px)",md:"calc(25% - 16px)"},width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/first",config:{main:{heading:"1"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"175px",md:"230px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(50% - 12px)",md:"calc(50% - 16px)"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/third",config:{main:{heading:"3"},style:{objectFit:"cover",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",textShadow:"2px 2px 5px #5065C7",background:"green",color:"white",top:{xs:"225px",md:"280px"},fontSize:{xs:"12px",md:"16px"},left:{xs:"calc(75% - 12px)",md:"calc(75% - 16px)"},width:{xs:"20px",md:"40px"},border:{xs:"2px solid rgb(179, 198, 255)",md:"5px solid rgb(179, 198, 255)"},height:{xs:"20px",md:"40px"},"@keyframes rotateAnimation":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},animation:"rotateAnimation 4s infinite",borderRadius:"50%",zIndex:5},layout:6},options:{widget:"Box"}},{type:"Control",scope:"#/properties/leaderBoard/properties/table",options:{widget:"Table"},elements:[],config:{style:{tableHeadstyle:{fontWeight:900,background:"rgb(179, 198, 255)"},position:"absolute",top:{xs:"300px",sm:"300px",md:"390px",lg:"390px"},border:"2px solid rgb(179, 198, 255)",width:"95%",left:"2.5%"},main:{disableAction:!0,disableSelection:!0}}}]};const buildLeaderBoard=o=>{const c=_.cloneDeep(leaderBoard);if(o.elements){const i=o.elements.map((h,x)=>h.type?{...{widget:buildUiSchema(h),accessorKey:h.name,header:h.label||h.name}}:{accessorKey:h.name,header:h.label||h.name});c.elements[9].elements=i}return o.name&&(c.elements[0].scope=`#/properties/${o.name}/properties/firstImage`,c.elements[3].scope=`#/properties/${o.name}/properties/firstName`,c.elements[1].scope=`#/properties/${o.name}/properties/secondImage`,c.elements[4].scope=`#/properties/${o.name}/properties/secondName`,c.elements[2].scope=`#/properties/${o.name}/properties/thirdImage`,c.elements[5].scope=`#/properties/${o.name}/properties/thirdName`,c.elements[9].scope=`#/properties/${o.name}/properties/table`),o.firstImage&&(c.elements[0].config.main.url=o.firstImage),o.secondImage&&(c.elements[1].config.main.url=o.secondImage),o.secondImage&&(c.elements[2].config.main.url=o.thirdImage),o.layout&&(c.config.layout=o.layout),c};var progressBar={type:"Control",scope:"#/properties/pbc_progress",options:{widget:"ProgressBar"},config:{layout:6,main:{developOnlyProgresBar:!1,bottomLabel_3:"Remaining",heading:"PBC Details"}}};const buildProgressBarCard=(o,c)=>{const i=_.cloneDeep(progressBar);return i.scope=c,o.heading&&(i.config.main.heading=o.heading),o.bottomLabel_3&&(i.config.main.bottomLabel_3=o.bottomLabel_3),o.bottomLabel_2&&(i.config.main.bottomLabel_2=o.bottomLabel_2),o.bottomLabel_1&&(i.elements[0].config.main.bottomLabel_1=o.bottomLabel_1),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i},buildProgressBar=(o,c)=>{const i=_.cloneDeep(progressBar);return i.scope=c,o.layout&&(i.config.layout=o.layout),i.config.main.heading=o.heading,o.bottomLabel_3&&(i.config.main.bottomLabel_3=o.bottomLabel_3),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.bottomLabel_2&&(i.config.main.bottomLabel_2=o.bottomLabel_2),o.bottomLabel_1&&(i.config.main.bottomLabel_1=o.bottomLabel_1),i},BarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:"Bar Graph",bottomLabel:"Name of Employe",numTicks:6,leftLabel:"Value in lakhs",axisLeft:!0,axisBottom:!0,hideTicks:!1,hideLeftAxisLine:!1,hideBottomAxisLine:!1,bottomAxisWidth:"10px",legend:{labelColor:"green",legendTitle:"",direction:"row",align:"none"}},style:{containerStyle:{width:"100%",height:300},headerStyle:{},tooltipStyle:{},labelStyle:{margin:{left:80,bottom:20},leftLabelOffset:50,bottomLabelOffset:10},barStyle:{color:{firstBarColor:"#6c5efb",secondBarColor:"#3f51b5"}},legendStyle:{legend:{lineHeight:"0.9em",fontSize:"8px",fontFamily:"arial",padding:"10px 10px",width:"30%",display:"flex",justifyContent:"center",border:"1px solid rgba(255, 255, 255, 0.3)",borderRadius:" 8px",marginRight:"auto"},legendTitle:{fontSize:"10px",marginBottom:"10px",fontWeight:"100"}}}}},PieGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:"Incentive Branch category wise",type:"PieGraph",bottomLabel:"Name of Employe",leftLabel:"Value",axisLeft:!0,axisBottom:!0,legendAvailable:!0,legend:{labelColor:"green",legendTitle:"Branches",direction:"row",align:"right"}},style:{containerStyle:{height:"340"},headerStyle:{},tooltipStyle:{backgroundColor:"black",width:"80px"},labelStyle:{},legendStyle:{legend:{},legendTitle:{}},pieStyle:{}}}},HorizontalBarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{main:{header:" ",type:"HorizontalBarGraph",bottomLabel:" ",leftLabel:"Value",axisLeft:!1,axisBottom:!0,hideBottomTicks:!1,hideLeftTicks:!1,hideLeftAxisLine:!0,hideBottomAxisLine:!1,bottomAxisWidth:"10px"},style:{containerStyle:{width:"100%"},headerStyle:{},tooltipStyle:{},labelStyle:{},barStyle:{color:"#6c5efb"}}}},buildHorizontalBarGraph=(o,c)=>{const i=_.cloneDeep(HorizontalBarGraph);return o.layout&&(i.config.layout=o.layout),i.scope=c,i.config.main.header=o.heading,o.barColor&&(i.config.barStyle.color=o.barColor),o.containerBackground&&(i.config.containerStyle.background=o.containerBackground),o.height&&(i.config.containerStyle.height=o.height),o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),i};var SpeedoMeter={type:"Control",scope:"#/properties/emptyBox",options:{widget:"SpeedoMeter"},config:{layout:12,main:{currentValueText:"",customSegmentLabels:{},data:{maxValue:1e5,value:5e4,minValue:0}},style:{segmentColors:[],ringWidth:57,needleHeightRatio:.7,needleColor:"#3f51b5",startColor:"red",textColor:"black",segments:5,endColor:"green",containerStyle:{background:"white",padding:"20px",borderRadius:"20px",display:"flex",flexDirection:"column",margin:"auto",justifyContent:"center",fontFamily:"Roboto",fontWeight:500},headerStyle:{textAlign:"left",width:"100%",paddingBottom:"20px"}}}};const buildSpeedoMeter=(o,c)=>{const i=_.cloneDeep(SpeedoMeter);return i.scope=c,o.layout&&(i.config.layout=o.layout),o.heading&&(i.config.main.header=o.heading),o.currentValueText&&(i.config.main.currentValueText=o.currentValueText),o.customSegmentLabels&&(i.config.main.customSegmentLabels=o.customSegmentLabels),o.data&&(i.config.main.data=o.data),o.needleColor&&(i.config.style.needleColor=o.needleColor),o.segments&&(i.config.style.segments=o.segments),o.endColor&&(i.config.style.endColor=o.endColor),o.startColor&&(i.config.style.startColor=o.startColor),o.segmentColors&&(i.config.style.segmentColors=o.segmentColors),i},buildPieGraph=(o,c)=>{const i=_.cloneDeep(PieGraph);return o.layout&&(i.config.layout=o.layout),o.containerBackground&&(i.config.style.containerStyle.background=o.containerBackground),o.height&&(i.config.style.containerStyle.height=o.height),o.legendAvailabe&&(i.config.main.legendAvailabe=o.legendAvailabe!=="YES"),i.scope=c,i.config.main.header=o.heading,o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),o.tooltipDataKey&&(i.config.main.tooltipDataKey=o.tooltipDataKey),i},buildStackbarGraph=(o,c)=>{const i=_.cloneDeep(BarGraph);return o.layout&&(i.config.layout=o.layout),o.legendHide&&(i.config.main.legendAvailable=!1),i.config.main.type=o.graphType,i.config.main.header=o.heading,o.barColor&&(i.config.barStyle.color=o.barColor),o.containerBackground&&(i.config.containerStyle.background=o.containerBackground),o.height&&(i.config.style.containerStyle.height=o.height),o.bottomLabel&&(i.config.main.bottomLabel=o.bottomLabel),o.leftLabel&&(i.config.main.leftLabel=o.leftLabel),i.scope=c,i};var RunnerBoyProgressBar={type:"Control",scope:"#/properties/path",options:{widget:"RunnerBoyProgressBar"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const RunnerBoyProgressbar=(o,c)=>{const i=_.cloneDeep(RunnerBoyProgressBar);return i.scope=c,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var Tabsection={type:"TabLayout",config:{main:{id:"groupMaster",tabLabels:["default"],layout:12}},elements:[]};const buildTabSection=(o,c)=>{const i=_.cloneDeep(Tabsection);return o.sectionLabels&&(i.config.main.tabLabels=o.sectionLabels.map(h=>h.label)),i.config.main.id=o.name,i};var WrapperSection={type:"WrapperLayout",config:{main:{label:"Default Label",divider:!0},defaultStyle:!0},elements:[]};const buildWrapperSection=(o,c)=>{const i=_.cloneDeep(WrapperSection);return i.config.main.label=o.label,i.config.main.divider=!!o.divider,i.config.main.header=!!o.heading,i};var TextInputField={type:"Control",scope:"#/properties/text",options:{widget:"InputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:""},style:{}}};const buildTextField=(o,c)=>{const i=_.cloneDeep(TextInputField);return i.config.main.label=o.label,o.style&&(i.config.style=JSON.parse(o.style)),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.config.main.errorMessage=`${o.name} is empty or invalid`,i.scope=c,i};var SelectInputField={type:"Control",scope:"#/properties/select",options:{widget:"SelectInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"text"}}};const buildSelect=(o,c)=>{const i=_.cloneDeep(SelectInputField);if(i.config.main.label=o.label,o.value){const h=o.value.map(x=>({label:x.label,value:x.value}));i.config.main.options=h}return o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.scope=c,i};var Button={type:"Control",scope:"#/properties/button",options:{widget:"Button"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{name:"Compare",variant:"contained",color:"info",type:"text",startIcon:"",icon:"",onClick:"onClick",size:"large"},style:{}}};const buildButton=(o,c)=>{const i=_.cloneDeep(Button);return o.buttonType&&(i.options.widget=o.buttonType==="IconButton"?"IconButton":"Button",o.buttonType==="ButtonWithIconAndText"?i.config.main.startIcon=o.iconName:i.config.main.icon=o.iconName),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.scope=c,o.style&&(i.config.style=JSON.parse(o.style)),o.size&&(i.config.main.size=o.size),o.color&&(i.config.main.size=o.color),i.config.main.name=o.label,i};var Table={type:"Control",scope:"#/properties/ApproveRecords",options:{widget:"Table"},elements:[],config:{main:{allRowData:[],columns:{dataColumns:[],actionColumns:[]}}}};const buildTable=(o,c)=>{const i=_.cloneDeep(Table);return i.scope=c,o.style&&(i.config.style=JSON.parse(o.style)),i.config.main.label=o.label,i};var Box={type:"Control",scope:"#/properties/emptyBox",options:{widget:"Box"},config:{layout:12,main:{},style:{}}};const buildLabel=(o,c)=>{const i=_.cloneDeep(Box);return i.scope=c,i.config.main.heading=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i},uploadFile={type:"Control",scope:"#/properties/attachment",config:{main:{label:"AttachmentFile",onClick:"onClick",required:!0,errorMessage:"Attachment File is not uploaded"},style:{backgroundColor:"none"},layout:{lg:5.5,md:5.5,sm:11,xs:11}},options:{widget:"UploadFile"}},downloadFile={type:"Control",scope:"#/properties/downloadAttachment",config:{main:{onClick:"onClick",required:!1},style:{backgroundColor:"none"},layout:{lg:5.5,md:5.5,sm:11,xs:11}},options:{widget:"DownloadFile"}},buildUploadFile=(o,c)=>{const i=_.cloneDeep(uploadFile);return i.scope=c,i.config.main.label=o.label,o.layout&&(i.config.layout=o.layout),o.layout&&(uploadFile.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=o.style),o.required&&(i.config.main.required=!0),i.config.main.errorMessage=o.errorMessage,i},buildDownloadFile=(o,c)=>{const i=_.cloneDeep(downloadFile);return i.scope=c,o.layout&&(i.config.layout=o.layout),o.style&&(i.config.style=o.style),o.required&&(i.config.main.required=!0),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.errorMessage&&(i.config.main.errorMessage=o.errorMessage),i};var Card={type:"WrapperLayout",config:{main:{rowSpacing:.5},style:{wrapperStyle:{position:"relative",color:"white",height:{xs:"120px",md:"160px"},width:"100%",textAlign:"left",background:"#3f51b5",borderRadius:"20px"}},layout:{xs:12,sm:12,md:6,lg:6}},elements:[{type:"Control",scope:"#/properties/programType",config:{main:{heading:"$5000.00"},style:{position:"absolute",left:"10%",top:"15%",color:"#f5effc",height:"80px",display:"flex",fontSize:{xs:"24px",md:"32px"},alignItems:"center",background:"inherit",justifyContent:"flex-start"},layout:5},options:{widget:"Box"}},{type:"Control",scope:"#/properties/programType",config:{main:{url:"$"},style:{color:"#f5effc",objectFit:"contain",position:"absolute",top:"10px",right:"10px",height:"80%",width:"35%",display:"flex",fontSize:"34px",alignItems:"center",background:"inherit",padding:"20px",justifyContent:"left"},layout:5},options:{widget:"Image"}},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"Total Earnings"},style:{position:"absolute",top:"calc(60%)",alignItems:"center",color:"#8999e8",fontSize:"16px",left:"10%",background:"inherit",justifyContent:"center"},layout:12},options:{widget:"Box"}}]};const buildCard=(o,c)=>{const i=_.cloneDeep(Card);return o.style&&(i.config.style=JSON.parse(o.style)),i.elements[0].scope=`#/properties/${o.name.replace(/ /g,"")}/value`,i.elements[1].scope=`#/properties/${o.name.replace(/ /g,"")}/url`,i.elements[2].scope=`#/properties/${o.name.replace(/ /g,"")}/description`,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.elements[0].config.main.heading=o.label,i.elements[1].config.main.url=o.url,i.elements[2].config.main.heading=o.description,i};var DateInputField={type:"Control",scope:"#/properties/date",options:{widget:"DateInputField"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"date"}}};const buildDate=(o,c)=>{const i=_.cloneDeep(DateInputField);return i.config.main.label=o.label,i.config.main.errorMessage=`${o.name} is empty or invalid`,i.scope=c,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var RankCard={type:"Control",scope:"#/properties/path",options:{widget:"RankCard"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildRankCard=(o,c)=>{const i=_.cloneDeep(RankCard);return i.scope=c,o.image&&(i.config.main.url=o.image),o.title&&(i.config.main.title=o.title),o.description&&(i.config.main.description=o.description),o.rank&&(i.config.main.rank=`#${o.rank}`),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var RollAndDice={type:"Control",scope:"#/properties/path",options:{widget:"RollAndDice"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildRollAndDice=(o,c)=>{const i=_.cloneDeep(RollAndDice);return o.name&&(i.scope=c),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i};var Timer={type:"Control",scope:"#/properties/timer",options:{widget:"Timer"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{},style:{digitContainer:{borderRadius:"4px",textShawdow:"none",width:"22%"},container:{backgroundColor:"#FFFFFF",borderRadius:"18px"},containerLabelColor:{color:"red"}}}};const buildTimer=(o,c)=>{const i=_.cloneDeep(Timer);return i.scope=c,o.label&&(i.config.main.label=o.label),o.layout&&(i.config.layout=o.layout),i};var MultipleSelect={type:"Control",scope:"#/properties/path",options:{widget:"MultipleSelect"},config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{label:"",type:"text",multiple:!0,variant:"standard",options:[]}}};const buildMultiSelect=(o,c)=>{var h;const i=_.cloneDeep(MultipleSelect);return i.scope=c,o.label&&(i.config.main.label=o.label),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i.config.main.options=(h=o.value)!=null?h:[],i},buildBasicUiSchema=o=>({type:"HorizontalLayout",pageName:`${o.name}`,elements:[]}),TextArea={type:"Control",scope:"#/properties/textarea",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:5.5,lg:5.5},style:{containerStyle:{borderRadius:"20px"},headerContainerStyle:{},textAreaStyle:{borderRadius:"20px",padding:"20px",background:"white",color:"black"}},main:{heading:"TextArea",minRows:4,hideButton:!0}}},buildTextArea=(o,c)=>{const i=_.cloneDeep(TextArea);return i.config.main.heading=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i.scope=c,i};var cardSlider={type:"Control",scope:"#/properties/path",options:{widget:"Slider"},elements:[],config:{layout:{xs:11,sm:11,md:5.5,lg:5.5},main:{}}};const buildSlider=(o,c)=>{const i=_.cloneDeep(cardSlider);return o.name&&(i.scope=c),o.layout&&(i.config.layout=createLayoutFormat(o.layout)),i},Checkbox={type:"Control",scope:"#/properties/username1",layout:12,options:{widget:"CheckBox"},config:{main:{label:"Welcome to Hyperform"}}},buildCheckbox=(o,c)=>{const i=_.cloneDeep(Checkbox);return i.scope=c,i.config.main.label=o.label,o.layout&&(i.config.layout=createLayoutFormat(o.layout)),o.style&&(i.config.style=JSON.parse(o.style)),i},buildUiSchema=o=>{let c={};const i=`#/properties/${o.name}`;switch(o.type){case"RunnerBoyProgressBar":c=RunnerBoyProgressbar(o,i);break;case"TabSection":c=buildTabSection(o);break;case"WrapperSection":c=buildWrapperSection(o);break;case"Text":c=buildTextField(o,i);break;case"TextArea":c=buildTextArea(o,i);break;case"Date":c=buildDate(o,i);break;case"Select":c=buildSelect(o,i);break;case"Button":c=buildButton(o,i);break;case"Table":c=buildTable(o,i);break;case"Box":c=buildLabel(o,i);break;case"CheckBox":c=buildCheckbox(o,i);break;case"UploadFile":c=buildUploadFile(o,i);break;case"DownloadFile":c=buildDownloadFile(o,i);break;case"EmptyBox":const h=_.cloneDeep(emptyBox);o.layout&&(h.config.layout=o.layout),c=h;break;case"card":c=buildCard(o);break;case"Graph":switch(o.graphType){case"BarGraph":case"StackBarGraph":c=buildStackbarGraph(o,i);break;case"LineGraph":c=buildPieGraph(o,i);break;case"PieGraph":c=buildPieGraph(o,i);break;case"HorizontalBarGraph":c=buildHorizontalBarGraph(o,i);break}break;case"ProgressBar":c=buildProgressBar(o,i);break;case"SpeedoMeter":c=buildSpeedoMeter(o,i);break;case"ProgressBarCard":c=buildProgressBarCard(o,i);break;case"RankCard":c=buildRankCard(o,i);break;case"Rank":c=buildRollAndDice(o,i);break;case"Slider":c=buildSlider(o,i);break;case"Timer":c=buildTimer(o,i);break;case"MultipleSelect":c=buildMultiSelect(o,i);break;case"LeaderBoard":c=buildLeaderBoard(o);break;default:c=buildBasicUiSchema(o)}if(o!=null&&o.elements){if((o==null?void 0:o.type)==="LeaderBoard")return c;o.type=="Table"?c.elements=o.elements.map((h,x)=>h.type?{accessorKey:h.name,header:h.label||h.name,widget:buildUiSchema(h)}:{accessorKey:h.name,header:h.label||h.name}):c.elements=o.elements.map((h,x)=>buildUiSchema(h))}return c};var clearLocalStorage=()=>{localStorage.removeItem("pageFormdata")};exports.buildConfig=buildConfig,exports.buildUiSchema=buildUiSchema,exports.clearPreviousCache=clearLocalStorage,exports.pageMaster=pageMaster,exports.pageMasterComponents=Component,exports.pageMasterEvents=event,exports.pageService=service,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
28
28
|
//# sourceMappingURL=impaktapps-ui-builder.umd.js.map
|