impaktapps-ui-builder 0.0.101-alpha.97 → 0.0.101-alpha.99
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.
|
@@ -24,5 +24,5 @@ __p += '`),G&&(w+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+w+`return __p
|
|
27
|
-
}`;var O=pl(function(){return q(p,T+"return "+w).apply(i,c)});if(O.source=w,wi(O))throw O;return O}function pm(e){return J(e).toLowerCase()}function um(e){return J(e).toUpperCase()}function cm(e,t,r){if(e=J(e),e&&(r||t===i))return vo(e);if(!e||!(t=Ae(t)))return e;var o=We(e),a=We(t),p=bo(o,a),c=xo(o,a)+1;return ht(o,p,c).join("")}function dm(e,t,r){if(e=J(e),e&&(r||t===i))return e.slice(0,Co(e)+1);if(!e||!(t=Ae(t)))return e;var o=We(e),a=xo(o,We(t))+1;return ht(o,0,a).join("")}function fm(e,t,r){if(e=J(e),e&&(r||t===i))return e.replace(wr,"");if(!e||!(t=Ae(t)))return e;var o=We(e),a=bo(o,We(t));return ht(o,a).join("")}function mm(e,t){var r=Ve,o=gn;if(ne(t)){var a="separator"in t?t.separator:a;r="length"in t?H(t.length):r,o="omission"in t?Ae(t.omission):o}e=J(e);var p=e.length;if(Dt(e)){var c=We(e);p=c.length}if(r>=p)return e;var f=r-Pt(o);if(f<1)return o;var g=c?ht(c,0,f).join(""):e.slice(0,f);if(a===i)return g+o;if(c&&(f+=g.length-f),_i(a)){if(e.slice(f).search(a)){var S,C=g;for(a.global||(a=zr(a.source,J(Oi.exec(a))+"g")),a.lastIndex=0;S=a.exec(C);)var w=S.index;g=g.slice(0,w===i?f:w)}}else if(e.indexOf(Ae(a),f)!=f){var F=g.lastIndexOf(a);F>-1&&(g=g.slice(0,F))}return g+o}function gm(e){return e=J(e),e&&Il.test(e)?e.replace(Mi,Ws):e}var ym=$t(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Fi=ua("toUpperCase");function sl(e,t,r){return e=J(e),t=r?i:t,t===i?Hs(e)?Ks(e):Ts(e):e.match(t)||[]}var pl=z(function(e,t){try{return Ee(e,i,t)}catch(r){return wi(r)?r:new M(r)}}),hm=it(function(e,t){return De(t,function(r){r=Ze(r),nt(e,r,Si(e[r],e))}),e});function vm(e){var t=e==null?0:e.length,r=R();return e=t?te(e,function(o){if(typeof o[1]!="function")throw new Pe(h);return[r(o[0]),o[1]]}):[],z(function(o){for(var a=-1;++a<t;){var p=e[a];if(Ee(p[0],this,o))return Ee(p[1],this,o)}})}function bm(e){return Wp(Me(e,L))}function Ai(e){return function(){return e}}function xm(e,t){return e==null||e!==e?t:e}var Sm=da(),Cm=da(!0);function Ie(e){return e}function Ti(e){return Uo(typeof e=="function"?e:Me(e,L))}function wm(e){return Go(Me(e,L))}function _m(e,t){return Yo(e,Me(t,L))}var Im=z(function(e,t){return function(r){return sn(r,e,t)}}),Em=z(function(e,t){return function(r){return sn(e,r,t)}});function Li(e,t,r){var o=ce(t),a=Vn(t,o);r==null&&!(ne(t)&&(a.length||!o.length))&&(r=t,t=e,e=this,a=Vn(t,ce(t)));var p=!(ne(r)&&"chain"in r)||!!r.chain,c=at(e);return De(a,function(f){var g=t[f];e[f]=g,c&&(e.prototype[f]=function(){var S=this.__chain__;if(p||S){var C=e(this.__wrapped__),w=C.__actions__=Ce(this.__actions__);return w.push({func:g,args:arguments,thisArg:e}),C.__chain__=S,C}return g.apply(e,ct([this.value()],arguments))})}),e}function Fm(){return de._===this&&(de._=Qs),this}function Bi(){}function Am(e){return e=H(e),z(function(t){return Ko(t,e)})}var Tm=si(te),Lm=si(fo),Bm=si(Dr);function ul(e){return gi(e)?Pr(Ze(e)):au(e)}function Rm(e){return function(t){return e==null?i:It(e,t)}}var Dm=ma(),Pm=ma(!0);function Ri(){return[]}function Di(){return!1}function km(){return{}}function Mm(){return""}function Nm(){return!0}function Hm(e,t){if(e=H(e),e<1||e>pt)return[];var r=qe,o=me(e,qe);t=R(t),e-=qe;for(var a=Nr(o,t);++r<e;)t(r);return a}function Om(e){return N(e)?te(e,Ze):Te(e)?[e]:Ce(La(J(e)))}function zm(e){var t=++Xs;return J(e)+t}var $m=jn(function(e,t){return e+t},0),Um=pi("ceil"),Wm=jn(function(e,t){return e/t},1),Gm=pi("floor");function Ym(e){return e&&e.length?Kn(e,Ie,qr):i}function Km(e,t){return e&&e.length?Kn(e,R(t,2),qr):i}function Vm(e){return yo(e,Ie)}function qm(e,t){return yo(e,R(t,2))}function Jm(e){return e&&e.length?Kn(e,Ie,Qr):i}function Xm(e,t){return e&&e.length?Kn(e,R(t,2),Qr):i}var Zm=jn(function(e,t){return e*t},1),Qm=pi("round"),jm=jn(function(e,t){return e-t},0);function eg(e){return e&&e.length?Mr(e,Ie):0}function tg(e,t){return e&&e.length?Mr(e,R(t,2)):0}return l.after=Cd,l.ary=$a,l.assign=uf,l.assignIn=tl,l.assignInWith=dr,l.assignWith=cf,l.at=df,l.before=Ua,l.bind=Si,l.bindAll=hm,l.bindKey=Wa,l.castArray=Pd,l.chain=Ha,l.chunk=Wu,l.compact=Gu,l.concat=Yu,l.cond=vm,l.conforms=bm,l.constant=Ai,l.countBy=jc,l.create=ff,l.curry=Ga,l.curryRight=Ya,l.debounce=Ka,l.defaults=mf,l.defaultsDeep=gf,l.defer=wd,l.delay=_d,l.difference=Ku,l.differenceBy=Vu,l.differenceWith=qu,l.drop=Ju,l.dropRight=Xu,l.dropRightWhile=Zu,l.dropWhile=Qu,l.fill=ju,l.filter=td,l.flatMap=id,l.flatMapDeep=od,l.flatMapDepth=ad,l.flatten=Pa,l.flattenDeep=ec,l.flattenDepth=tc,l.flip=Id,l.flow=Sm,l.flowRight=Cm,l.fromPairs=nc,l.functions=Cf,l.functionsIn=wf,l.groupBy=ld,l.initial=ic,l.intersection=oc,l.intersectionBy=ac,l.intersectionWith=lc,l.invert=If,l.invertBy=Ef,l.invokeMap=pd,l.iteratee=Ti,l.keyBy=ud,l.keys=ce,l.keysIn=_e,l.map=ar,l.mapKeys=Af,l.mapValues=Tf,l.matches=wm,l.matchesProperty=_m,l.memoize=sr,l.merge=Lf,l.mergeWith=nl,l.method=Im,l.methodOf=Em,l.mixin=Li,l.negate=pr,l.nthArg=Am,l.omit=Bf,l.omitBy=Rf,l.once=Ed,l.orderBy=cd,l.over=Tm,l.overArgs=Fd,l.overEvery=Lm,l.overSome=Bm,l.partial=Ci,l.partialRight=Va,l.partition=dd,l.pick=Df,l.pickBy=rl,l.property=ul,l.propertyOf=Rm,l.pull=cc,l.pullAll=Ma,l.pullAllBy=dc,l.pullAllWith=fc,l.pullAt=mc,l.range=Dm,l.rangeRight=Pm,l.rearg=Ad,l.reject=gd,l.remove=gc,l.rest=Td,l.reverse=bi,l.sampleSize=hd,l.set=kf,l.setWith=Mf,l.shuffle=vd,l.slice=yc,l.sortBy=Sd,l.sortedUniq=wc,l.sortedUniqBy=_c,l.split=om,l.spread=Ld,l.tail=Ic,l.take=Ec,l.takeRight=Fc,l.takeRightWhile=Ac,l.takeWhile=Tc,l.tap=Gc,l.throttle=Bd,l.thru=or,l.toArray=Qa,l.toPairs=il,l.toPairsIn=ol,l.toPath=Om,l.toPlainObject=el,l.transform=Nf,l.unary=Rd,l.union=Lc,l.unionBy=Bc,l.unionWith=Rc,l.uniq=Dc,l.uniqBy=Pc,l.uniqWith=kc,l.unset=Hf,l.unzip=xi,l.unzipWith=Na,l.update=Of,l.updateWith=zf,l.values=Gt,l.valuesIn=$f,l.without=Mc,l.words=sl,l.wrap=Dd,l.xor=Nc,l.xorBy=Hc,l.xorWith=Oc,l.zip=zc,l.zipObject=$c,l.zipObjectDeep=Uc,l.zipWith=Wc,l.entries=il,l.entriesIn=ol,l.extend=tl,l.extendWith=dr,Li(l,l),l.add=$m,l.attempt=pl,l.camelCase=Yf,l.capitalize=al,l.ceil=Um,l.clamp=Uf,l.clone=kd,l.cloneDeep=Nd,l.cloneDeepWith=Hd,l.cloneWith=Md,l.conformsTo=Od,l.deburr=ll,l.defaultTo=xm,l.divide=Wm,l.endsWith=Kf,l.eq=Ye,l.escape=Vf,l.escapeRegExp=qf,l.every=ed,l.find=nd,l.findIndex=Ra,l.findKey=yf,l.findLast=rd,l.findLastIndex=Da,l.findLastKey=hf,l.floor=Gm,l.forEach=Oa,l.forEachRight=za,l.forIn=vf,l.forInRight=bf,l.forOwn=xf,l.forOwnRight=Sf,l.get=Ii,l.gt=zd,l.gte=$d,l.has=_f,l.hasIn=Ei,l.head=ka,l.identity=Ie,l.includes=sd,l.indexOf=rc,l.inRange=Wf,l.invoke=Ff,l.isArguments=At,l.isArray=N,l.isArrayBuffer=Ud,l.isArrayLike=we,l.isArrayLikeObject=oe,l.isBoolean=Wd,l.isBuffer=vt,l.isDate=Gd,l.isElement=Yd,l.isEmpty=Kd,l.isEqual=Vd,l.isEqualWith=qd,l.isError=wi,l.isFinite=Jd,l.isFunction=at,l.isInteger=qa,l.isLength=ur,l.isMap=Ja,l.isMatch=Xd,l.isMatchWith=Zd,l.isNaN=Qd,l.isNative=jd,l.isNil=tf,l.isNull=ef,l.isNumber=Xa,l.isObject=ne,l.isObjectLike=re,l.isPlainObject=mn,l.isRegExp=_i,l.isSafeInteger=nf,l.isSet=Za,l.isString=cr,l.isSymbol=Te,l.isTypedArray=Wt,l.isUndefined=rf,l.isWeakMap=of,l.isWeakSet=af,l.join=sc,l.kebabCase=Jf,l.last=He,l.lastIndexOf=pc,l.lowerCase=Xf,l.lowerFirst=Zf,l.lt=lf,l.lte=sf,l.max=Ym,l.maxBy=Km,l.mean=Vm,l.meanBy=qm,l.min=Jm,l.minBy=Xm,l.stubArray=Ri,l.stubFalse=Di,l.stubObject=km,l.stubString=Mm,l.stubTrue=Nm,l.multiply=Zm,l.nth=uc,l.noConflict=Fm,l.noop=Bi,l.now=lr,l.pad=Qf,l.padEnd=jf,l.padStart=em,l.parseInt=tm,l.random=Gf,l.reduce=fd,l.reduceRight=md,l.repeat=nm,l.replace=rm,l.result=Pf,l.round=Qm,l.runInContext=m,l.sample=yd,l.size=bd,l.snakeCase=im,l.some=xd,l.sortedIndex=hc,l.sortedIndexBy=vc,l.sortedIndexOf=bc,l.sortedLastIndex=xc,l.sortedLastIndexBy=Sc,l.sortedLastIndexOf=Cc,l.startCase=am,l.startsWith=lm,l.subtract=jm,l.sum=eg,l.sumBy=tg,l.template=sm,l.times=Hm,l.toFinite=lt,l.toInteger=H,l.toLength=ja,l.toLower=pm,l.toNumber=Oe,l.toSafeInteger=pf,l.toString=J,l.toUpper=um,l.trim=cm,l.trimEnd=dm,l.trimStart=fm,l.truncate=mm,l.unescape=gm,l.uniqueId=zm,l.upperCase=ym,l.upperFirst=Fi,l.each=Oa,l.eachRight=za,l.first=ka,Li(l,function(){var e={};return Je(l,function(t,r){Z.call(l.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),l.VERSION=d,De(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),De(["drop","take"],function(e,t){W.prototype[e]=function(r){r=r===i?1:pe(H(r),0);var o=this.__filtered__&&!t?new W(this):this.clone();return o.__filtered__?o.__takeCount__=me(r,o.__takeCount__):o.__views__.push({size:me(r,qe),type:e+(o.__dir__<0?"Right":"")}),o},W.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),De(["filter","map","takeWhile"],function(e,t){var r=t+1,o=r==Yt||r==bn;W.prototype[e]=function(a){var p=this.clone();return p.__iteratees__.push({iteratee:R(a,3),type:r}),p.__filtered__=p.__filtered__||o,p}}),De(["head","last"],function(e,t){var r="take"+(t?"Right":"");W.prototype[e]=function(){return this[r](1).value()[0]}}),De(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[r](1)}}),W.prototype.compact=function(){return this.filter(Ie)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new W(this):this.map(function(r){return sn(r,e,t)})}),W.prototype.reject=function(e){return this.filter(pr(R(e)))},W.prototype.slice=function(e,t){e=H(e);var r=this;return r.__filtered__&&(e>0||t<0)?new W(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(t=H(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(qe)},Je(W.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=l[o?"take"+(t=="last"?"Right":""):t],p=o||/^find/.test(t);!a||(l.prototype[t]=function(){var c=this.__wrapped__,f=o?[1]:arguments,g=c instanceof W,S=f[0],C=g||N(c),w=function($){var G=a.apply(l,ct([$],f));return o&&F?G[0]:G};C&&r&&typeof S=="function"&&S.length!=1&&(g=C=!1);var F=this.__chain__,T=!!this.__actions__.length,D=p&&!F,O=g&&!T;if(!p&&C){c=O?c:new W(this);var P=e.apply(c,f);return P.__actions__.push({func:or,args:[w],thisArg:i}),new ke(P,F)}return D&&O?e.apply(this,f):(P=this.thru(w),D?o?P.value()[0]:P.value():P)})}),De(["pop","push","shift","sort","splice","unshift"],function(e){var t=Bn[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var p=this.value();return t.apply(N(p)?p:[],a)}return this[r](function(c){return t.apply(N(c)?c:[],a)})}}),Je(W.prototype,function(e,t){var r=l[t];if(r){var o=r.name+"";Z.call(Ht,o)||(Ht[o]=[]),Ht[o].push({name:t,func:r})}}),Ht[Qn(i,ie).name]=[{name:"wrapper",func:i}],W.prototype.clone=mp,W.prototype.reverse=gp,W.prototype.value=yp,l.prototype.at=Yc,l.prototype.chain=Kc,l.prototype.commit=Vc,l.prototype.next=qc,l.prototype.plant=Xc,l.prototype.reverse=Zc,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Qc,l.prototype.first=l.prototype.head,en&&(l.prototype[en]=Jc),l},kt=Vs();xt?((xt.exports=kt)._=kt,Tr._=kt):de._=kt}).call(commonjsGlobal)})(lodash,lodash.exports);var _=lodash.exports;const ComponentSchema={type:"object",properties:{type:{oneOf:[{title:"Masked Aadhar Card",const:"AadharcardText"},{title:"Array",const:"Array"},{title:"Button",const:"Button"},{title:"Data Card",const:"card"},{title:"Check Box",const:"CheckBox"},{title:"Container",const:"WrapperSection"},{title:"Data Grid",const:"DataGrid"},{title:"Date",const:"Date"},{title:"Time Stamp",const:"DateTime"},{title:"Download",const:"DownloadFile"},{title:"Empty Box",const:"EmptyBox"},{title:"File Handler",const:"FileInput"},{title:"Graph",const:"Graph"},{title:"Input Slider",const:"InputSlider"},{title:"Label",const:"Box"},{title:"Leaderboard",const:"LeaderBoard"},{title:"Multi-Select Dropdown",const:"MultipleSelect"},{title:"Pan Card Masked",const:"PanCardText"},{title:"Pop Up",const:"PopUp"},{title:"Progress Bar",const:"ProgressBar"},{title:"Progress Bar Card",const:"ProgressBarCard"},{title:"Dropdown",const:"Select"},{title:"Slider",const:"Slider"},{title:"Speedometer",const:"SpeedoMeter"},{title:"Stepper Container",const:"Stepper"},{title:"Radio",const:"Radio"},{title:"Rank",const:"Rank"},{title:"Rank Card",const:"RankCard"},{title:"Runner Boy",const:"RunnerBoyProgressBar"},{title:"Table",const:"Table"},{title:"Tabs",const:"TabSection"},{title:"Text",const:"Text"},{title:"Text Area",const:"TextArea"},{title:"Timer",const:"Timer"},{title:"Upload",const:"UploadFile"},{title:"Tree ",const:"TreeMap"},{title:"Column Group",const:"ColumnGroup"},{title:"Thought of the day",const:"Thought"},{title:"Pdf Viewer",const:"PdfViewer"}]},columnFormat:{oneOf:[{title:"Date Column",const:"date"},{title:"DateTime Column",const:"dateTime"},{title:"Amount Column",const:"amount"}]},orientation:{oneOf:[{title:"Horizontal",const:"horizontal"},{title:"Vertical",const:"vertical"}]},method:{type:"string",oneOf:[{title:"Get",const:"get"},{title:"Post",const:"post"},{title:"Delete",const:"delete"},{title:"Put",const:"put"}]},layout:{type:"array",items:{type:"object",properties:{key:{type:"string",oneOf:[{title:"Extra Small",const:"xs"},{title:"Small",const:"sm"},{title:"Medium",const:"md"},{title:"Large",const:"lg"}]},value:{}}}},cardLayout:{type:"array",items:{type:"object",properties:{key:{type:"string",oneOf:[{title:"Extra Small",const:"xs"},{title:"Small",const:"sm"},{title:"Medium",const:"md"},{title:"Large",const:"lg"}]},value:{}}}},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"}}}},Table_Download_Keys_Name:{type:"array",items:{type:"object",properties:{KeyName:{type:"string"}}}},sizeHolder:{type:"array",items:{type:"object",properties:{keyName:{type:"string"},value:{type:"string"}}}},enableColumnFilter:{type:"array",items:{type:"object",properties:{keyName:{type:"string"}}}},filteringOptions:{oneOf:[{const:"fuzzy",title:"Fuzzy"},{const:"contains",title:"Contain"},{const:"startsWith",title:"Starts with"},{const:"endsWith",title:"Ends with"},{const:"equals",title:"Equals"},{const:"notEquals",title:"Not Equals"},{const:"between",title:"Between"},{const:"betweenInclusive",title:"Between inclusive"},{const:"greaterThan",title:"Greater than"},{const:"greaterThanOrEqualTo",title:"Greater than or equal to"},{const:"lessThan",title:"Less than"},{const:"lessThanOrEqualTo",title:"Less than or equal to"}]},legendLabels:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}},pieArcColors:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}},InputFormatingAndMasking:{type:"array",items:{type:"object",properties:{formatElement:{type:"string"}}}},validation:{type:"array",items:{type:"object",properties:{componentName:{type:"string"},validationType:{type:"string",oneOf:[{const:"required",title:"Required"},{const:"minLength",title:"Minimum Length"},{const:"maxLength",title:"Maximum Length"},{const:"pattern",title:"Pattern"}]},validationValue:{type:"string"}}}},buttonType:{type:"string",oneOf:[{title:"Button",const:"Button"},{title:"IconButton",const:"IconButton"},{title:"HybridButton",const:"ButtonWithIconAndText"}]},defaultStyle:{type:"string",oneOf:[{title:"Apply Default Style",const:"true"},{title:"No Style",const:"false"}]},graphType:{type:"string",oneOf:[{title:"Bar Graph",const:"BarGraph"},{title:"Stack Bar Graph",const:"StackBarGraph"},{title:"Line Graph",const:"LineGraph"},{title:"Pie Graph",const:"PieGraph"},{title:"Horizontal Bar Graph",const:"HorizontalBarGraph"},{title:"Stack Horizontal Bar Graph",const:"HorizontalStackBarGraph"}]},iconName:{type:"string",oneOf:[{title:"Search Icon",const:"SearchIcon"},{title:"Edit Icon",const:"EditIcon"},{title:"Add Icon",const:"AddIcon"},{title:"Send Icon",const:"SendIcon"},{title:"Approve Icon",const:"ApproveIcon"},{title:"RejectIcon",const:"RejectIcon"},{title:"Back Icon",const:"BackIcon"},{title:"Back Icon Second ",const:"BackIcon2"},{title:"Pending Icon",const:"PendingIcon"},{title:"View Icon",const:"ViewIcon"},{title:"Notification Icon",const:"NotificationIcon"},{title:"Person Icon",const:"PersonIcon"},{title:"Report Icon",const:"ReportIcon"},{title:"Error Icon",const:"ErrorIcon"},{title:"Refresh Icon",const:"RefreshIcon"},{title:"Download Icon",const:"DownloadIcon"},{title:"Exception Icon",const:"ExceptionIcon"}]},color:{type:"string",oneOf:[{title:"Primary",const:"primary"},{title:"Secondary",const:"secondary"},{title:"Error",const:"error"},{title:"Success",const:"success"},{title:"Info",const:"info"}]},pageName:{path:[]},name:{type:"string"},label:{type:"string"},RemoveItemButton:{disabled:!0}},required:["name"]},componentBasicUiSchema=n=>{var i;return{type:"HorizontalLayout",heading:"Page-Component",elements:[{type:"TabLayout",config:{main:{tabLabels:["Core"],id:"component"},style:{TabPanelStyle:{padding:0}},TabsStyle:{marginBottom:"3px",paddingBottom:"4px",boxShadow:"0px 3px 4px #afafaf80","& .MuiTabs-indicator":{bottom:"6px"}}},elements:[{type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Type"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:0,md:0,lg:0}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:"Component ID",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Label",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:0,lg:3}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",options:{widget:"Array"},config:{layout:12,main:{label:"Layout",childElementLabel:"Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:0,sm:0,md:4,lg:4}},options:{widget:"EmptyBox"}}]}]}]},{type:"WrapperLayout",config:{main:{gap:"8px"}},elements:[{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Ok",variant:"contained",type:"text",onClick:"okHandler",size:"medium"}}},{type:"Control",scope:"#/properties/btnSubmit",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Save & Exit",variant:"contained",type:"text",onClick:"saveHandler",size:"medium"}}},{type:"Control",scope:"#/properties/EmptyBox",config:{layout:{xs:4,sm:7,md:8,lg:9}},options:{widget:"EmptyBox"}}]},{type:"Control",scope:"#/properties/popUpComponentSection",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Component ?"},style:{"&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteCompButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",variant:"contained",type:"text",onClick:"deletePopUpComponent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteCompButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteComponents",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/popUpEventSection",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText1",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Event ?"},style:{fontSize:"20px","&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",variant:"contained",type:"text",onClick:"deletePopUpEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/pageName",options:{widget:"Breadcrumb"},config:{layout:12,main:{},style:{paddingLeft:n.spacing(3),color:n.palette.grey[600],fontSize:"10px",position:"fixed",bottom:"24px",borderBottom:`1px solid ${n.palette.common.black}29`,borderTop:`1px solid ${n.palette.common.black}29`,backgroundColor:n.palette.background.default}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},{type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:10,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((i=n==null?void 0:n.palette)==null?void 0:i.text.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:0,width:"fit-content",left:"50%",position:"relative",margin:"revert",flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}}]}]}},CoreSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Type",type:"text"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:0,md:0,lg:0}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:"Component ID",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Label",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:0,lg:3}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",options:{widget:"Array"},config:{layout:12,main:{label:"Layout",childElementLabel:"Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:0,sm:0,md:4,lg:4}},options:{widget:"EmptyBox"}}]}]},EventSection=n=>({type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"eventAddHandler",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Event",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event's Type",type:"string",size:300},{accessorKey:"Handler",header:"Handler",type:"string",size:200},{accessorKey:"Edit_Approve_Records",header:"Edit",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{size:"small",icon:"TableEditIcon",tooltipMessage:"Edit This Record",onClick:"eventEditHandler"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{accessorKey:"Reject_Records",header:"Delete",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",accessorKeyName:"Reject_Records",options:{widget:"IconButton"},config:{main:{icon:"Bin",tooltipMessage:"Reject This Record",onClick:"deletePopUpEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Event",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Copy_Event",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",tooltipMessage:"Reject This Record",styleDefault:!0}}}}]}]}),emptyBox$1=(n,s)=>s!==void 0?{type:"Control",scope:`#/properties/${n}`,options:{widget:"EmptyBox"},config:{layout:s}}:{type:"Control",scope:"#/properties/empty",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}},cardLayout={type:"Control",scope:"#/properties/cardLayout",options:{widget:"Array"},config:{layout:12,main:{label:"Card Layout",childElementLabel:"Card Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},emptyBox$1("cardEmpty")]},getArrayControl=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"Array"},config:{layout:12,main:{label:i,childElementLabel:i},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:`#/properties/${s}`,options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:i||"Labels for Tab"}}},emptyBox$1("ArrayControlEmpty1",{xs:6,sm:6,md:8,lg:8})]}),sizeHolder=getArrayControl("sizeHolder","keyName","Component Name");sizeHolder.elements[1]={type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Size"}}},sizeHolder.elements[2]=emptyBox$1("sizeHolderempty");const getInputField=(n,s)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:s}}}),getRadioInputField=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"RadioInputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:s,options:i}}}),buildWrapper=(n,s)=>({type:"WrapperLayout",config:{main:{label:n||"Details",isAccordion:!0}},elements:s||[]}),getTextArea=(n,s,i,d)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"TextArea"},config:{layout:d||12,main:{label:s,minRows:8,hideButton:i,enableCodeEditor:!0}}}),getSelectField=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:s,type:"text"}}}),getMultiSelectField=(n,s)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"MultipleSelect"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{multiple:!0,label:s,options:[]}}}),BaseSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[]},buildPropertiesSection=function(n){let s=_.cloneDeep(BaseSection);switch(n){case"TreeMap":s.elements=[getSelectField("orientation","orientation"),getInputField("linkType","linkType"),getInputField("graphHeight","Graph Height"),getInputField("graphWidth","Graph Width"),getInputField("graphZoomHeight","Zoom Height"),emptyBox$1("TreeEmpty",{xs:6,sm:6,md:4,lg:4})];break;case"InputSlider":s.elements=[getInputField("max","Max Limit"),getInputField("step","Step"),getInputField("min","Min Limit"),emptyBox$1("InputSliderEmpty1",{xs:6,sm:0,md:0,lg:0}),getRadioInputField("limitToMax","Applly Max. Limit",["YES","NO"]),emptyBox$1("InputSliderEmpty2",{xs:0,sm:0,md:8,lg:8})];break;case"DataGrid":s.elements=[getRadioInputField("divider","Use Header divider",["YES","NO"]),getInputField("elevation","Card Elevation"),getInputField("height","Grid height"),getInputField("justifyContent","justifyContent"),emptyBox$1("DataGridEmpty1",{xs:6,sm:0,md:4,lg:4}),emptyBox$1("DataGridEmpty1",{xs:0,sm:0,md:4,lg:4}),cardLayout];break;case"Stepper":s.elements=[getRadioInputField("resetButton","Reset Button",["YES","NO"]),getRadioInputField("defaultButtonAvailable","Use Default Buttons ",["YES","NO"]),getInputField("resetText","Reset Text"),getInputField("completeText","Complete Text"),getSelectField("orientation","Orientation Type"),emptyBox$1("Stepper",{xs:6,sm:6,md:4,lg:4}),getArrayControl("sectionLabels","label")];break;case"PopUp":s.elements=[getRadioInputField("fullScreen","FullScreen",["YES","NO"]),getRadioInputField("fullWidth","FullWidth",["YES","NO"]),getInputField("maxWidth","Max. Width"),emptyBox$1("PopUpEmpty",{xs:6,sm:6,md:0,lg:0})];break;case"Text":s.elements=[getInputField("placeholder","Placeholder"),getRadioInputField("multiline","Multiline",["YES","NO"]),emptyBox$1("TextEmpty1",{xs:0,sm:0,md:4,lg:4}),getArrayControl("InputFormatingAndMasking","formatElement","Format Element")];break;case"TextArea":s.elements=[getInputField("placeholder","Placeholder"),getRadioInputField("enableCodeEditor","Enable Code Editor",["YES","NO"]),getInputField("codeEditorLanguage","Enter Code Language"),emptyBox$1("TextEmpty1",{xs:0,sm:0,md:0,lg:3})];break;case"SpeedoMeter":s.elements=[getInputField("segments","Segments Count"),getInputField("heading","Container Heading"),getInputField("heading","Container Heading"),getInputField("speedoCaption","Speedometer Caption"),getInputField("width","Speedometer Width"),emptyBox$1("SpeedoMeterEmpty1",{xs:6,sm:6,md:4,lg:4})];break;case"RankCard":s.elements=[getInputField("rank","Rank"),getInputField("height","Height"),emptyBox$1("RankCardEmpty1",{xs:0,sm:0,md:4,lg:4})];break;case"LeaderBoard":s.elements=[getInputField("firstImage","First Image url"),getInputField("secondImage","Second Image url"),getInputField("thirdImage","Third Image url"),getInputField("nameKey","Key for Name"),getInputField("imageKey","Key for Image"),getInputField("scoreKey","Key for comparing parameter"),emptyBox$1("LeaderBoardEmpty1",{xs:6,sm:6,md:0,lg:0})];break;case"CardSlider":s.elements=[getInputField("heading","Heading"),getInputField("iconName","Icon Name")];break;case"ProgressBar":case"ProgressBarCard":s.elements=[getInputField("heading","Heading"),getInputField("bottomLabel_1","First BottomLabel"),getInputField("bottomLabel_2","Second BottomLabel"),getInputField("bottomLabel_3","Third BottomLabel"),emptyBox$1("ProgressBarCardEmpty1"),emptyBox$1("ProgressBarCardEmpty2")];break;case"card":s.elements=[getInputField("url","Image Url"),getInputField("label","Label"),getInputField("titleIcon","Unicode of Icon for title"),getInputField("description","Description"),emptyBox$1("cardEmpty",{xs:0,sm:0,md:8,lg:8})];break;case"Button":s.elements=[getSelectField("buttonType","Button Type"),getSelectField("iconName","Icon Name"),getSelectField("color","Color"),getInputField("tooltipMessage","Tooltip Message"),getSelectField("defaultStyle","Default Style"),emptyBox$1("ButtonEmpty1",{xs:6,sm:6,md:4,lg:4})];break;case"Graph":s.elements=[getInputField("height","Height"),getInputField("heading","Heading"),getSelectField("graphType","Graph Type"),getInputField("leftLabel","Left Label"),getInputField("bottomLabel","Bottom Label"),emptyBox$1("GraphEmpty1",{xs:6,sm:0,md:0,lg:0}),getRadioInputField("legendHide","Legend Hide",["YES","No"]),getInputField("yAxisValue","Y-AxisValue"),getInputField("xAxisValue","X-AxisValue"),getRadioInputField("bottomAxisAngle","Bottom Axis Angled",["YES","No"]),getInputField("leftMargin","Left Margin"),emptyBox$1("GraphEmpty1",{xs:6,sm:0,md:8,lg:6}),getArrayControl("legendLabels","label"),getArrayControl("pieArcColors","color")];break;case"WrapperSection":s.elements=[getRadioInputField("divider","Divider",["YES","No"]),getRadioInputField("isAccordion","Accordion",["YES","No"]),getRadioInputField("defaultStyle","Default Style",["YES","No"]),getInputField("rowSpacing","Row Spacing"),emptyBox$1("WrapperSectionEmpty1",{xs:6,sm:0,md:4,lg:4}),emptyBox$1("WrapperSectionEmpty2")];break;case"TabSection":s.elements=[getRadioInputField("verticalOrientation","Vertical Orientation",["YES","NO"]),getRadioInputField("lazyLoad","Lazy Load",["YES","NO"]),emptyBox$1("TabEmpty"),getArrayControl("sectionLabels","label")];break;case"Table":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),getRadioInputField("SelectionAvailable","Row Selection",["YES","NO"]),getRadioInputField("ColumnResizingAvailable","ColumnResizing ",["YES","NO"]),getRadioInputField("DragAvailable","Row Dragging",["YES","NO"]),getRadioInputField("downloadAllData","Download All Data",["YES","NO"]),getRadioInputField("disableGlobalSearch","Disable Global Search",["YES","NO"]),getRadioInputField("disableColumnFilter","Disable Column Filter",["YES","NO"]),getRadioInputField("disableSorting","Disable Sorting",["YES","NO"]),getRadioInputField("disableEditColumn","Disable Edit Column",["YES","NO"]),getRadioInputField("disableFullScreenToggle","Disable Full Screen",["YES","NO"]),getRadioInputField("disableDensityToggle","Disable Density Toggle",["YES","NO"]),getRadioInputField("disableDownloadFile","Disable Download File",["YES","NO"]),getRadioInputField("disablePagination","Disable Pagination",["YES","NO"]),getInputField("selectKey","Selection Key"),getMultiSelectField("filteringOptions","Filtering Options"),buildWrapper("Tree Table Properties",[getRadioInputField("enableRowMovement","Row Rearrangement",["YES","NO"]),getRadioInputField("enableExpanding","Row Expanding",["YES","NO"]),getRadioInputField("paginateExpandedRows","Multi Page Expansion",["YES","NO"]),getRadioInputField("treeStructure","Flat Tree Structure",["YES","NO"]),emptyBox$1("LazyLoadingTableEmpty2"),emptyBox$1("LazyLoadingTableEmpty3")]),getArrayControl("Table_Download_Keys_Name","KeyName","Table Key Name"),sizeHolder,getArrayControl("enableColumnFilter","keyName","Component Name")];break;case"Radio":s.elements=[getArrayControl("sectionLabels","label","Options Of Radio")];break;case"Select":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),getRadioInputField("freeSolo","FreeSolo",["YES","NO"]),emptyBox$1("SelectEmpty")];break;case"MultipleSelect":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),emptyBox$1("MultipleSelectEmpty1",{xs:0,sm:6,md:4,lg:4}),emptyBox$1("MultipleSelectEmpty2")];break;case"Thought":s.elements=[getTextArea("thought","Today's thought",!1)];break}return s},StyleSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/style",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:12,lg:12},style:{"& .MuiFormLabel-root:not(.MuiInputLabel-shrink)":{}},main:{heading:"JSON Style",minRows:8,hideButton:!0}}}]},TableSection=n=>({type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/elements",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"widgetAddClickHandler",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Component",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"name",header:"Name",type:"string",size:300},{accessorKey:"type",header:"Type",type:"string",size:200},{header:"Edit Record",field:"Reject_Records",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"TableEditIcon",size:"small",onClick:"editComponents",tooltipMessage:"Reject This Record"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Delete",field:"Reject_Records",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"Bin",onClick:"deletePopUpComponent",tooltipMessage:"Reject This Record"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Component",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Copy_Component",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",styleDefault:!0,disabled:!1}}}}]}]}),ValueTab={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/value",options:{widget:"Array"},config:{layout:12,main:{label:"Value",childElementLabel:"Value"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Label"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]}]},ValidationSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/validation",options:{widget:"Array"},config:{layout:12,main:{label:"Validation",childElementLabel:"Validation"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/validationType",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Validation Type"}}},{type:"Control",scope:"#/properties/validationValue",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Validation Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]}]};var buildConfig=n=>{const s=_.cloneDeep(n);let i={};return s.pageName&&delete s.pageName,s.eventsSelected&&delete s.eventsSelected,(s.type==="Table"||s.type==="WrapperSection"||s.type==="TabSection")&&(i.elements=s.elements||[],s.elements&&delete s.elements),i.events=s.events||[],s.events&&delete s.events,i={...s,...i},i};const createLayoutFormat=n=>{if(_.isEmpty(n))return{xs:12,sm:12,md:12,lg:12};let s={xs:12,sm:12,md:6,lg:6};return n.map(i=>{s[i.key||"xs"]=+i.value||5.5}),s},flatObjectValueInArray=(n=[])=>{if(n.length<1)return;const s=Object.keys(n[0])[0];return n.map(d=>d[s])},clearFromSessionStorage=()=>{sessionStorage.removeItem("pageFormdata")},getNavigationHistory=(n,s)=>{if(s){let i=n.name;const d=s.split("."),y=[];return d.map((u,h)=>{if(h===0){y.push(u);return}y.push(`${y[h-1]}.${u}`)}),y.map(u=>{const h=_.get(n,u);h?i=i+` > ${(h==null?void 0:h.name)||(h==null?void 0:h.eventType)}`:i=i+" > NewComponent"}),{pageName:i}}},saveFormdataInSessionStorage=(n,s)=>{let i;if(s){const d=getFormdataFromSessionStorage();i=_.set(d,s,buildConfig(n))}else i=buildConfig(n);return sessionStorage.setItem("pageFormdata",JSON.stringify(i)),i},getFormdataFromSessionStorage=n=>{const s=sessionStorage.getItem("pageFormdata")?JSON.parse(sessionStorage.getItem("pageFormdata")):void 0;let i;return n&&(i=_.get(s,n),i={...i,...getNavigationHistory(s,n)}),i||(i=getNavigationHistory(s,n)),i||s};async function saveHandler(n,s,i){var u,h;(u=n.searchParams)==null||u.get("id");const d=(h=n.searchParams)==null?void 0:h.get("path");saveFormdataInSessionStorage(n.ctx.core.data,d);const y=JSON.parse(sessionStorage.getItem("pageFormdata"));if(_.isEmpty(n.ctx.core.errors))try{const b=await i(n,s,y);navigateHandler(n,!0,"/PageMasterRecords")}catch{navigateHandler(n,!1)}}const navigateHandler=(n,s,i)=>{s?(sessionStorage.removeItem("pageFormdata"),n.navigate(i||-1),n.setNotify({SuccessMessage:"Submit Successfully",Success:!0})):(n.setValidation("ValidateAndShow"),n.setNotify({Fail:!0,FailMessage:"Errors on Page"}))};function okHandler(n){var i;const s=(i=n.searchParams)==null?void 0:i.get("path");_.isEmpty(n.ctx.core.errors)?(saveFormdataInSessionStorage(n.ctx.core.data,s),n.navigate(-1),n.setNotify({SuccessMessage:"Save Successfully",Success:!0})):(n.setValidation("ValidateAndShow"),n.setNotify({Fail:!0,FailMessage:"Errors on Page"}))}const sectionLabels={Select:["Core","Properties","Value","Events","Style","Validation"],MultipleSelect:["Core","Properties","Value","Events","Style","Validation"],Table:["Core","Components","Properties","Events","Style","Validation"],LeaderBoard:["Core","Components","Properties","Events","Style","Validation"],WrapperSection:["Core","Components","Properties","Style","Validation"],TabSection:["Core","Components","Properties","Style","Validation"],SpeedoMeter:["Core","Properties","Events","Style","Validation"],card:["Core","Properties","Events","Style","Validation"],UploadFile:["Core","Events","Style","Validation"],Graph:["Core","Properties","Events","Style","Validation"],DownloadFile:["Core","Events","Style","Validation"],Box:["Core","Events","Style","Validation"],Properties:["Core","Properties","Events","Style","Validation"],ProgressBarCard:["Core","Properties","Events","Style","Validation"],RankCard:["Core","Properties","Events","Style","Validation"],Slider:["Core","Components","Events","Style","Validation"],Timer:["Core","Events","Style","Validation"],Rank:["Core","Events","Style","Validation"],Button:["Core","Properties","Events","Style","Validation"],Array:["Core","Components","Validation"],Radio:["Core","Properties","Events","Style","Validation"],Text:["Core","Properties","Events","Style","Validation"],TextArea:["Core","Properties","Events","Style","Validation"],PopUp:["Core","Components","Properties","Style"],Stepper:["Core","Components","Properties","Events","Style"],DataGrid:["Core","Components","Properties","Events","Style"],InputSlider:["Core","Properties","Events","Style","Validation"],TreeMap:["Core","Components","Properties","Events","Style"],ColumnGroup:["Core","Components"],Thought:["Core","Properties","Events","Style","Validation"]};function refreshPage(n,s){var I,E;const i=_.cloneDeep(componentBasicUiSchema(s.theme.myTheme)),d=JSON.parse(sessionStorage.getItem("pageFormdata"));if(n){const B={Core:CoreSection,Value:ValueTab,Style:StyleSection,Events:EventSection(s.theme.myTheme),Components:TableSection(s.theme.myTheme),Properties:buildPropertiesSection(n),Validation:ValidationSection},L=(I=sectionLabels[n])==null?void 0:I.map(Y=>B[Y]);i.elements[0].config.main.tabLabels=sectionLabels[n]||["Core","Style","Events","Validation"],i.elements[0].elements=L||[CoreSection,StyleSection,EventSection(s.theme.myTheme),ValidationSection]}const y=(E=s.searchParams)==null?void 0:E.get("path"),u=y.lastIndexOf("."),h=y.slice(0,u),b=_.get(d,h);(b==null?void 0:b.type)==="Table"&&(i.elements[0].elements[0].elements[4]={type:"Control",scope:"#/properties/columnFormat",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Column Format"}}},i.elements[0].elements[0].elements[6]={type:"Control",scope:"#/properties/filteringOptions",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Filter Mode",multiple:!0}}},i.elements[0].elements[0].elements[5]={type:"Control",scope:"#/properties/enableFilter",options:{widget:"RadioInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Enable Filter",options:["Yes","No"]}}},i.elements[0].elements[0].elements[7]={type:"Control",scope:"#/properties/enableSorting",options:{widget:"RadioInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Enable Sorting",options:["Yes","No"]}}},i.elements[0].elements[0].elements[8]={type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:8,lg:3}},options:{widget:"EmptyBox"}}),sessionStorage.getItem("copiedConfig")&&this.ElementPathSetter(i),s.setUiSchema(i)}var Component=(n,s,i,d)=>({setPage:async function(){const y=await this.getFormdata();n.setFormdata(y);const u=this.getSchema();n.setSchema(u),this.refreshPage(y==null?void 0:y.type,n)},refreshPage,getFormdata:function(){var u;const y=(u=n.searchParams)==null?void 0:u.get("path");return getFormdataFromSessionStorage(y)},getSchema:function(){var E,B,L;const y=_.cloneDeep(ComponentSchema);sessionStorage.getItem("copiedConfig")&&(y.properties.RemoveItemButton.disabled=!1);const u=JSON.parse(sessionStorage.getItem("pageFormdata")),h=(E=n.searchParams)==null?void 0:E.get("path"),b=(B=n.searchParams)==null?void 0:B.get("id");let I=[{label:(L=u.name)!=null?L:"NewPage",path:`/PageMaster${b?`?id=${b}`:""}`}];if(h){const Y=h.split("."),k=[];Y.map((X,K)=>{if(K===0){k.push(X);return}k.push(`${k[K-1]}.${X}`)}),k.map(X=>{const K=_.get(u,X);I.push({label:(K==null?void 0:K.name)||(K==null?void 0:K.eventType)||"NewComponent",path:`/Component?path=${X}${b?`&id=${b}`:""}`})})}return y.properties.pageName.path=I,y},okHandler:()=>okHandler(n),saveHandler:async()=>await saveHandler(n,d,i),onChange:function(){var y,u,h,b;((y=n==null?void 0:n.formData)==null?void 0:y.type)!==((u=n==null?void 0:n.newData)==null?void 0:u.type)&&((h=n==null?void 0:n.newData)==null?void 0:h.type)!==void 0&&this.refreshPage((b=n==null?void 0:n.newData)==null?void 0:b.type,n)},editComponents:function(){var b,I,E;const y=s.path.split(".")[1],u=(b=n.searchParams)==null?void 0:b.get("path"),h=(I=n.searchParams)==null?void 0:I.get("id");if(saveFormdataInSessionStorage(n.ctx.core.data,u),u){const L=`${(E=n.searchParams)==null?void 0:E.get("path")}.elements[${y}]`;n.searchParams.set("path",L),n.setSearchParams(n.searchParams),this.setPage()}else n.navigate(`/Component?path=${`elements[${y}]`}&id=${h}`)},deleteComponents:function(y=!0){var E;const u=(E=n.searchParams)==null?void 0:E.get("path"),h=sessionStorage.getItem("rowId");n.formData.elements.splice(h,1);const b=saveFormdataInSessionStorage(n.ctx.core.data,u),I=u?_.get(b,u):b;n.setFormdata(I),y&&n.updateDialog("popUpComponentSection"),sessionStorage.removeItem("rowId")},deleteEvent:function(y=!0){var I;const u=(I=n.searchParams)==null?void 0:I.get("path"),h=sessionStorage.getItem("rowId");n.formData.events.splice(h,1);const b=saveFormdataInSessionStorage(n.ctx.core.data,u);n.setFormdata(_.get(b,u)),y&&n.updateDialog("popUpEventSection"),sessionStorage.removeItem("rowId")},widgetAddClickHandler:function(){var h;Array.isArray(n.formData.elements)||(n.formData.elements=[]);const y=(h=n.searchParams)==null?void 0:h.get("path");saveFormdataInSessionStorage(n.ctx.core.data,y);const u=`${y}.elements[${n.formData.elements.length}]`;n.searchParams.set("path",u),n.setSearchParams(n.searchParams),this.setPage()},eventEditHandler:function(){var I,E;const y=s.path.split(".")[1],u=(I=n.searchParams)==null?void 0:I.get("path"),h=(E=n.searchParams)==null?void 0:E.get("id");saveFormdataInSessionStorage(n.ctx.core.data,u);const b=`${u}.events[${y}]`;n.navigate(`/ComponentEvents?path=${b}&id=${h}`)},eventAddHandler:function(){var b,I;const y=(b=n.searchParams)==null?void 0:b.get("path"),u=(I=n.searchParams)==null?void 0:I.get("id");Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,y);const h=`${y}.events[${n.formData.events.length}]`;n.navigate(`/ComponentEvents?path=${h}&id=${u}`)},backHandler:function(){n.navigate(-1)},deletePopUpComponent:function(){const y=s.path.split(".")[1];sessionStorage.setItem("rowId",y),n.updateDialog("popUpComponentSection")},deletePopUpEvent:function(){const y=s.path.split(".")[1];sessionStorage.setItem("rowId",y),n.updateDialog("popUpEventSection")},copyPasteElement:function(y,u=this.setPage.bind(this)){var I;const[h,b]=(I=s.path.split(".").pop())==null?void 0:I.split("_");h==="Copy"?this.CopyElement(y,b):this.PasteElement(u,b)},CopyElement:function(y=n,u){var Y;const h=lodash.exports.cloneDeep(y.schema),b=lodash.exports.cloneDeep(y.uiSchema);h.properties.RemoveItemButton.disabled=!1;const I=s.path.split(".")[1],E=(Y=n.searchParams)==null?void 0:Y.get("path"),B=this.elementPathHandler(E,I,u),L=getFormdataFromSessionStorage(B);this.ElementPathSetter(b,L),sessionStorage.setItem("copiedConfig",JSON.stringify(L)),n.setSchema(h),n.setUiSchema(b)},PasteElement:function(y,u){var Y;if(!sessionStorage.getItem("copiedConfig")){n.setNotify({FailMessage:"No item has been copied.",Fail:!0});return}const h=(Y=n.searchParams)==null?void 0:Y.get("path");Array.isArray(n.formData.elements)||(n.formData.elements=[]),Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,h);const b=getFormdataFromSessionStorage(h),I=u==="Component"?b.elements.length:b.events.length,E=this.elementPathHandler(h,I,u),B=JSON.parse(sessionStorage.getItem("copiedConfig")),L={Events:" The Events cannot be integrated into the component section.",Component:"The component cannot be integrated into the Events section."};B.Handler&&u==="Component"?n.setNotify({FailMessage:L.Events,Fail:!0}):B.name&&u==="Events"?n.setNotify({FailMessage:L.Component,Fail:!0}):(saveFormdataInSessionStorage(B,E),y())},RemoveItemButton:function(y=n){const u=lodash.exports.cloneDeep(y.schema),h=lodash.exports.cloneDeep(y.uiSchema);u.properties.RemoveItemButton.disabled=!0,h.elements[2].elements[1].config.main.heading="No element copied",sessionStorage.removeItem("copiedConfig"),n.setSchema(u),n.setUiSchema(h)},elementPathHandler:function(y,u,h){return h==="Component"?y?`${y}.elements[${u}]`:`elements[${u}]`:y?`${y}.events[${u}]`:`events[${u}]`},ElementPathSetter:function(y,u){var b,I,E,B,L,Y,k,X,K,U,ie,ue,V,ye,le,he,ve,ze,Qe,Ve,gn,yn,hn,Yt,vn,bn;const h=u||JSON.parse(sessionStorage.getItem("copiedConfig"));(Y=(L=(B=(E=(I=(b=y==null?void 0:y.elements)==null?void 0:b[1])==null?void 0:I.elements)==null?void 0:E[0])==null?void 0:B.config)==null?void 0:L.main)!=null&&Y.headerIcons?y.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.name}`:(ye=(V=(ue=(ie=(U=(K=(X=(k=y==null?void 0:y.elements)==null?void 0:k[0])==null?void 0:X.elements)==null?void 0:K[1])==null?void 0:U.elements)==null?void 0:ie[0])==null?void 0:ue.config)==null?void 0:V.main)!=null&&ye.headerIcons&&(y.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.name}`),(Ve=(Qe=(ze=(ve=(he=(le=y==null?void 0:y.elements)==null?void 0:le[1])==null?void 0:he.elements)==null?void 0:ve[1])==null?void 0:ze.config)==null?void 0:Qe.main)!=null&&Ve.headerIcons?y.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Event: ${h.eventType}`:(bn=(vn=(Yt=(hn=(yn=(gn=y==null?void 0:y.elements)==null?void 0:gn[0])==null?void 0:yn.elements)==null?void 0:hn[1])==null?void 0:Yt.config)==null?void 0:vn.main)!=null&&bn.headerIcons&&(y.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.name}`)}}),pageMaster=n=>{const{store:s,dynamicData:i,submitHandler:d,service:y}=n;return{setPage:async function(){const u=await this.getFormdata();s.setFormdata(u);const h=await this.getUiSchema(),b=await this.getSchema();s.setSchema(b),s.setUiSchema(h)},getFormdata:async function(){var I;const u=(I=s.searchParams)==null?void 0:I.get("id"),h=await n.pageConfigProvider(u),b=getFormdataFromSessionStorage();return b||(saveFormdataInSessionStorage(h),h)},getUiSchema:function(){const u=_.cloneDeep(PageMasterUiSchema(s.theme.myTheme));return sessionStorage.getItem("copiedConfig")&&Component(s,i,d,y).ElementPathSetter(u),u},getSchema:()=>{const u=_.cloneDeep(PageMasterSchema);return sessionStorage.getItem("copiedConfig")&&(u.properties.RemoveItemButton.disabled=!1),u},backHandler:()=>{sessionStorage.removeItem("pageFormdata"),s.navigate("/PageMasterRecords")},onAddClickHandler:function(){var b;const u=(b=s.searchParams)==null?void 0:b.get("id");Array.isArray(s.formData.elements)||(s.formData.elements=[]);const h=saveFormdataInSessionStorage(s.ctx.core.data);u?s.navigate(`/Component?path=${`elements[${h==null?void 0:h.elements.length}]`}&id=${u}`):s.navigate(`/Component?path=${`elements[${h==null?void 0:h.elements.length}]`}`)},saveHandler:async()=>await saveHandler(s,y,d),Edit_Components:Component(s,i,d,y).editComponents,Delete_Components:async function(){await Component(s,i,d,y).deleteComponents(!1),s.updateDialog("popUpPageMasterComponent")},eventAddHandler:function(){var b;const u=(b=s.searchParams)==null?void 0:b.get("id");Array.isArray(s.formData.events)||(s.formData.events=[]),saveFormdataInSessionStorage(s.ctx.core.data);const h=`events[${s.formData.events.length}]`;s.navigate(`/ComponentEvents?path=${h}&id=${u}`)},editEvent:function(){var I;const u=i.path.split(".")[1],h=(I=s.searchParams)==null?void 0:I.get("id");saveFormdataInSessionStorage(s.ctx.core.data);const b=`events[${u}]`;s.navigate(`/ComponentEvents?path=${b}&id=${h}`)},deleteEvent:function(){const u=sessionStorage.getItem("rowId");s.formData.events.splice(u,1);const h=saveFormdataInSessionStorage(s.ctx.core.data);s.setFormdata(h),s.updateDialog("popUpPageMasterEvent"),sessionStorage.removeItem("rowId")},deletePopUpComponent:function(){const u=i.path.split(".")[1];sessionStorage.setItem("rowId",u),s.updateDialog("popUpPageMasterComponent")},deletePopUpEvent:function(){const u=i.path.split(".")[1];sessionStorage.setItem("rowId",u),s.updateDialog("popUpPageMasterEvent")},copyPasteElement:function(){Component(s,i,d,y).copyPasteElement(s,this.setPage.bind(this))},RemoveItemButton:function(){Component(s,i,d,y).RemoveItemButton(s)}}};const EventSchema={type:"object",properties:{headers:{type:"array",items:{type:"object",properties:{headers_key:{type:"string"},headers_value:{type:"string"}}}},method:{type:"string",oneOf:[{title:"Get",const:"get"},{title:"Post",const:"post"},{title:"Delete",const:"delete"},{title:"Put",const:"put"}]},refreshElements:{type:"array",items:{type:"object",properties:{value:{type:"string"}}}},eventType:{type:"string",oneOf:[{title:"Click",const:"onClick"},{title:"Load",const:"onLoad"},{title:"Change",const:"onChange"},{title:"Mount",const:"onMount"},{title:"Success",const:"Success"},{title:"Start",const:"onStart"},{title:"Cell Render",const:"onCellRenderer"},{title:"Upload",const:"onUpload"},{title:"Back",const:"onBack"},{title:"Next",const:"onNext"},{title:"Row Movement",const:"onRowMovement"},{title:"Download",const:"onDownload"},{title:"Fail",const:"Fail"}]},Handler:{type:"string",oneOf:[{title:"Custom",const:"custom"},{title:"API",const:"api"},{title:"Inbuilt Function",const:"inBuiltFunction"},{title:"Refresh",const:"refresh"}]},inBuiltFunctionType:{type:"string",oneOf:[{title:"RankProvider",const:"RankProvider"},{title:"Download File",const:"downloadFile"},{title:"Download",const:"download"}]},body:{type:"array",items:{type:"object",properties:{body_key:{type:"string"},body_value:{type:"string"}}}},RemoveItemButton:{disabled:!0},pageName:{path:[{label:"defaultLabel",path:"defaultPath"}]}},required:["eventType","Handler"]},EventUiSchema=n=>{var i;return{type:"HorizontalLayout",heading:"Page-Events",elements:[{type:"TabLayout",config:{main:{tabLabels:["Core","Response Events"],id:"event"},style:{TabPanelStyle:{padding:0}},TabsStyle:{marginBottom:"3px",paddingBottom:"4px",boxShadow:"0px 3px 4px #afafaf80","& .MuiTabs-indicator":{bottom:"6px"}}},elements:[{type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/eventType",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Event's Type",type:"text"}}},getSelectField("Handler","Handler"),{type:"Control",scope:"#/properties/EmptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:6}}}]},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"addEvent",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Event",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event's Type",size:300,type:"string"},{accessorKey:"Handler",header:"Handler",size:200,type:"string"},{accessorKey:"Edit_Approve_Records",header:"Edit",type:"action",size:150,widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{size:"small",icon:"TableEditIcon",tooltipMessage:"Edit This Record",onClick:"editEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{accessorKey:"Reject_Records",header:"Delete",type:"action",size:150,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"Bin",tooltipMessage:"Reject This Record",onClick:"deletePopUpEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Event",type:"action",size:150,widget:{type:"Control",scope:"#/properties/Copy_Event",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",styleDefault:!0}}}}]}]},{type:"WrapperLayout",config:{main:{gap:"8px"}},elements:[{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Ok",variant:"contained",type:"text",onClick:"okHandler",size:"medium"}}},{type:"Control",scope:"#/properties/btnSubmit",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Save & Exit",variant:"contained",type:"text",onClick:"saveHandler",size:"medium"}}},{type:"Control",scope:"#/properties/EmptyBox",config:{layout:{xs:4,sm:7,md:8,lg:9}},options:{widget:"EmptyBox"}}]},{type:"Control",scope:"#/properties/popUpEvent",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Event ?"},style:{fontSize:"20px","&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",startIcon:"ApproveIcon",variant:"contained",type:"text",onClick:"deletePopUpEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/pageName",options:{widget:"Breadcrumb"},config:{layout:12,main:{},style:{paddingLeft:n.spacing(3),color:n.palette.grey[600],fontSize:"10px",position:"fixed",bottom:"24px",borderBottom:`1px solid ${n.palette.common.black}29`,borderTop:`1px solid ${n.palette.common.black}29`,backgroundColor:n.palette.background.default}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},{type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:10,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((i=n==null?void 0:n.palette)==null?void 0:i.text.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:0,width:"fit-content",left:"50%",position:"relative",margin:"revert",flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}}]}]}},APISection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/method",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Method",type:"text"}}},{type:"Control",scope:"#/properties/path",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Path",type:"text",multiple:!1,options:[]}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:6}}},{type:"Control",scope:"#/properties/headers",options:{widget:"Array"},config:{layout:12,main:{label:"Headers",childElementLabel:"Headers"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]},{type:"Control",scope:"#/properties/body",options:{widget:"Array"},config:{layout:12,main:{label:"Body",childElementLabel:"Body"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]},getTextArea("apiBody","Transformer",!0,12)]},refreshSectionUiSchema={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/refreshElements",options:{widget:"Array"},config:{layout:12,main:{label:"Refresh Elements",childElementLabel:"Refresh Elements"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:8,lg:8},main:{}}}]}]};var event=(n,s,i,d,y)=>({setPage:async function(){const u=await this.getFormData();n.setFormdata(u);const h=await this.getSchema();console.log("SettingSchema>>",h),n.setSchema(h),this.refreshPage(u.Handler,n)},refreshPage:(u,h)=>{var k,X,K;const b=_.cloneDeep(EventUiSchema(h.theme.myTheme)),I=_.cloneDeep(EventSchema);u&&(u==="custom"?(b.elements[0].elements[0].elements[2]=getRadioInputField("isSync","Run in Sync",["Yes","No"]),b.elements[0].elements[0].elements[3]={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:0,lg:3},main:{},style:{}}},b.elements[0].elements[0].elements[4]=getTextArea("eventCode","Write Custom Code",!1),I.required=["eventType","Handler","eventCode"]):u==="api"?(b.elements[0].elements[0].elements[2]=emptyBox$1("emptyBox",{xs:0,sm:0,md:4,lg:6}),b.elements[0].elements[0].elements[3]=APISection,I.required=["eventType","Handler","method","path"]):u==="inBuiltFunction"?(b.elements[0].elements[0].elements[2]=getSelectField("inBuiltFunctionType","Function Name"),b.elements[0].elements[0].elements[3]={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:0,lg:3},main:{},style:{}}},b.elements[0].elements[0].elements[4]=getTextArea("funcParametersCode","Write Custom Code for Functions Parameter",!0),I.required=["eventType","Handler","inBuiltFunctionType"]):u==="refresh"&&(b.elements[0].elements[0].elements[2]=emptyBox$1("emptyBox",{xs:0,sm:0,md:4,lg:6}),b.elements[0].elements[0].elements[3]=refreshSectionUiSchema,I.properties.refreshElements.required=["value"],I.properties.refreshElements.items.required=["value"],I.required=["eventType","Handler","refreshElements"])),y&&(I.properties.inBuiltFunctionType.oneOf=[...I.properties.inBuiltFunctionType.oneOf,...y]),sessionStorage.getItem("copiedConfig")&&(Component(h,s,i,d).ElementPathSetter(b),I.properties.RemoveItemButton.disabled=!1);const E=JSON.parse(sessionStorage.getItem("pageFormdata")),B=(k=h.searchParams)==null?void 0:k.get("path"),L=(X=h.searchParams)==null?void 0:X.get("id");let Y=[{label:(K=E.name)!=null?K:"NewPage",path:`/PageMaster${L?`?id=${L}`:""}`}];if(B){const U=B.split("."),ie=[];U.map((ue,V)=>{if(V===0){ie.push(ue);return}ie.push(`${ie[V-1]}.${ue}`)}),ie.map(ue=>{const V=_.get(E,ue);Y.push({label:(V==null?void 0:V.name)||(V==null?void 0:V.eventType)||"NewComponent",path:V!=null&&V.eventType?`/ComponentEvents?path=${ue}${L?`&id=${L}`:""}`:`/Component?path=${ue}${L?`&id=${L}`:""}`})})}I.properties.pageName.path=Y,h.setSchema(I),h.setUiSchema(b)},getFormData:Component(n,s,i,d).getFormdata,getUiSchema:function(){return EventUiSchema},getSchema:()=>{var B,L,Y;const u=_.cloneDeep(EventSchema);sessionStorage.getItem("copiedConfig")&&(u.properties.RemoveItemButton.disabled=!1);const h=JSON.parse(sessionStorage.getItem("pageFormdata")),b=(B=n.searchParams)==null?void 0:B.get("path"),I=(L=n.searchParams)==null?void 0:L.get("id");let E=[{label:(Y=h.name)!=null?Y:"NewPage",path:`/PageMaster${I?`?id=${I}`:""}`}];if(b){const k=b.split("."),X=[];k.map((K,U)=>{if(U===0){X.push(K);return}X.push(`${X[U-1]}.${K}`)}),X.map(K=>{const U=_.get(h,K);E.push({label:(U==null?void 0:U.name)||(U==null?void 0:U.eventType)||"NewComponent",path:U!=null&&U.eventType?`/ComponentEvents?path=${K}${I?`&id=${I}`:""}`:`/Component?path=${K}${I?`&id=${I}`:""}`})})}return u.properties.pageName.path=_.cloneDeep(E),u},okHandler:()=>okHandler(n),saveHandler:async()=>await saveHandler(n,d,i),onChange:function(){var u,h,b;((u=n==null?void 0:n.formData)==null?void 0:u.Handler)!==((h=n==null?void 0:n.newData)==null?void 0:h.Handler)&&((b=n==null?void 0:n.newData)==null?void 0:b.Handler)!==void 0&&this.refreshPage(n.newData.Handler||n.formdata.Handler,n)},addEvent:function(){var b,I,E;const u=(b=n.searchParams)==null?void 0:b.get("path");Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,u);const h=`${u}.events[${(E=(I=n.formData)==null?void 0:I.events)==null?void 0:E.length}]`;n.searchParams.set("path",h),n.setSearchParams(n.searchParams),this.setPage()},editEvent:function(){var I;const u=s.path.split(".")[1],h=(I=n.searchParams)==null?void 0:I.get("path");saveFormdataInSessionStorage(n.ctx.core.data,h);const b=`${h}.events[${u}]`;n.searchParams.set("path",b),n.setSearchParams(n.searchParams),this.setPage()},deleteEvent:async function(){await Component(n,s,i,d).deleteEvent(!1),n.updateDialog("popUpEvent")},backHandler:function(){n.navigate(-1)},deletePopUpEvent:function(){const u=s.path.split(".")[1];sessionStorage.setItem("rowId",u),n.updateDialog("popUpEvent")},copyPasteElement:function(){Component(n,s,i,d).copyPasteElement(n,this.setPage.bind(this))},RemoveItemButton:function(){Component(n,s,i,d).RemoveItemButton(n)}});const downloadFile$1=n=>{const s=n.name.split("."),i=n.data,d=window.atob(i);let y;y=new File([d],s[s.length-1]);const u=URL.createObjectURL(y),h=document.createElement("a");h.href=s[s.length-1]==="pdf"?"data:application/octet-stream;base64,"+i:u,h.download=`${n.name}`,document.body.appendChild(h),h.click(),URL.revokeObjectURL(u),document.body.removeChild(h)},doDownload=(n,s)=>{let i=`${s.defaults.baseURL}/${n.path}`;n!=null&&n.params&&Object.keys(n==null?void 0:n.params).map((u,h)=>{i=i+`${h===0?"?":"&"}${u}=${n==null?void 0:n.params[u]}`});const d=document.createElement("a");d.href=i,document.body.appendChild(d),d.click(),d.parentNode.removeChild(d)},executeEvents=n=>{var y,u,h;let s=[],i=null;if(n.config.isSync!=="Yes")return shouldEventExecute(n).then(b=>{if(!b)throw new Error("onStart Event not allow to run Parent Events");return executeEventsHandler(n)}).then(b=>{var E;i=b,s=(E=n.config)==null?void 0:E.events.filter(B=>B.eventType==="Success")}).catch(b=>{var B,L;const I=(L=(B=n.config)==null?void 0:B.events)==null?void 0:L.filter(Y=>Y.eventType==="Fail");s=(I==null?void 0:I.length)>0?I:[]}).then(()=>{if((s==null?void 0:s.length)>0)return s.reduce((b,I)=>b.then(()=>executeEvents({...n,config:I,parentEventOutput:i})),Promise.resolve())}).then(()=>i);if(!shouldEventExecute(n))return{response:void 0,events:void 0};try{i=executeEventsHandler(n),s=(y=n.config)==null?void 0:y.events.filter(E=>E.eventType==="Success")}catch{const b=(h=(u=n.config)==null?void 0:u.events)==null?void 0:h.filter(E=>E.eventType==="Fail");s=(b==null?void 0:b.length)>0?b:[]}if((s==null?void 0:s.length)>0)for(const b of s)executeEvents({...n,config:b,parentEventOutput:i});return i};function executeEventsHandler(n){var s,i,d;if(n.config.Handler==="api")return executeApiRequest(n);if(n.config.Handler==="inBuiltFunction")return executeInBuiltFunctionHandler(n);if(n.config.Handler==="custom")return executeCustomHandler(n);if(n.config.Handler==="refresh")return executeRefreshHandler(n);if(n.config.Handler==="mergeFormdata")return mergeFormdata(n.parentEventOutput,n.componentName,n.config,n.store,n.service,n.formDataHolder);if(n.config.Handler==="onBackHandler")return(s=n.store.functionParameters)==null?void 0:s.handleBack();if(n.config.Handler==="onNextHandler")return(i=n.store.functionParameters)==null?void 0:i.handleNext();if(n.config.Handler==="onResetHandler")return(d=n.store.functionParameters)==null?void 0:d.handleReset()}function getRefreshElements(n,s){var d;let i=[];return((d=n==null?void 0:n.refreshElements)==null?void 0:d.length)>0?i=n.refreshElements.map(y=>y.value):s!=null&&s.onLoad&&(i=Object.keys(s==null?void 0:s.onLoad)),i}async function executeRefreshHandler(n){const s=getRefreshElements(n.config,n.eventGroups);return Promise.allSettled(s.map(i=>{const d=n.eventGroups.onLoad[i];return d?Promise.allSettled(d.map(y=>executeEvents({...n,config:y,componentName:i}))):Promise.resolve()}))}function executeApiRequest(n){var y;const s={...(y=n.userValue)==null?void 0:y.payload},i={"X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"},d=buildApiPayload(n.config,s,i,n.store,n.dynamicData,n.userValue,n.service);return n.service[n.config.method](n.config.path,d.body,{headers:d.headers}).then(u=>u)}function executeInBuiltFunctionHandler(params){let parameter={};if(params.config.funcParametersCode){const makeFunc=eval(params.config.funcParametersCode);parameter=makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service),params.serviceHolder[params.config.inBuiltFunctionType](parameter,params.service)}else params.serviceHolder[params.config.inBuiltFunctionType](params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service)}function executeCustomHandler(params){const makeFunc=eval(params.config.eventCode);return params.config.isSync!=="Yes"?makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service,params.componentName).then(n=>n):makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service,params.componentName)}function mergeFormdata(n,s,i,d,y,u){var h,b,I;i.type==="Select"&&(n==null?void 0:n.data)?_.isEmpty(n==null?void 0:n.data)||d.setSchema(E=>{var B;return{...E,properties:{...E.properties,[s]:{...(B=E.properties)==null?void 0:B[s],oneOf:n.data}}}}):i.type==="MultipleSelect"&&(n==null?void 0:n.data)?_.isEmpty(n==null?void 0:n.data)||d.setSchema(E=>{var B;return{...E,properties:{...E.properties,[s]:{...(B=E.properties)==null?void 0:B[s],type:"array",items:{oneOf:n==null?void 0:n.data}}}}}):i.type==="page"?_.isEmpty(n==null?void 0:n.data)&&(n==null?void 0:n.data)||(d.newData={...d.newData,...n==null?void 0:n.data},d.setFormdata(E=>({...E,...n==null?void 0:n.data}))):i.type==="Table"&&i.lazyLoading?n&&(n==null?void 0:n.data)&&(u[s]=(h=n.data)==null?void 0:h.data,u[`${s}_RowCount`]=(I=(b=n.data)==null?void 0:b.meta)==null?void 0:I.totalRowCount,d.setFormdata(E=>({...E,...u}))):n&&(u[s]=n.data,d.setFormdata(E=>({...E,...u})))}const buildBodyFormat=(n,s,i,d)=>{let y={...i==null?void 0:i.payload};return n.map(u=>{var h,b,I,E,B;if(typeof(u==null?void 0:u.value)!="string")y[u.key]=u.value;else if((h=u==null?void 0:u.value)!=null&&h.startsWith("$userValue")){const L=u.value.substring(11);y[u.key]=_.get(i,L)}else if((b=u==null?void 0:u.value)!=null&&b.startsWith("$urlParams")){const L=u.value.substring(11),Y=(I=d==null?void 0:d.searchParams)==null?void 0:I.get(L);y[u.key]=Y}else if((E=u==null?void 0:u.value)!=null&&E.startsWith("$local")){const L=u.value.substring(7),Y=JSON.parse(sessionStorage.getItem(L)||'""');y[u.key]=Y}else if((B=u==null?void 0:u.value)!=null&&B.startsWith("$")){const L=u.value.substring(1);y[u.key]=_.get(s,L)}else(u==null?void 0:u.value)==="*"&&(u==null?void 0:u.key)==="*"?y={...y,...s}:(u==null?void 0:u.value)==="*"?y[u.key]=s:y[u.key]=u.value}),y},buildHeadersFormat=n=>{const s={"X-Requested-With":"XMLHttpRequest"};return n.map(i=>{s[i.key]=i.value}),s};function shouldEventExecute(n){var i,d,y;const s=(d=(i=n.config)==null?void 0:i.events)==null?void 0:d.filter(u=>u.eventType==="onStart");return(s==null?void 0:s.length)>0?((y=s[0])==null?void 0:y.isSync)!=="Yes"?executeEventsHandler({...n,config:s[0]}).then(u=>u):executeEventsHandler({...n,config:s[0]}):n.config.isSync!=="Yes"?Promise.resolve(!0):!0}function buildApiPayload(compConfig,body,headers,store,dynamicData,userValue,service){var n,s;compConfig!=null&&compConfig.headers&&(headers=buildHeadersFormat(compConfig.headers)),compConfig.body&&(body={...buildBodyFormat(compConfig.body,store.newData||((s=(n=store==null?void 0:store.ctx)==null?void 0:n.core)==null?void 0:s.data)||store.formData,userValue,store)});const promiseChain={body,headers};if(compConfig.apiBody){const makeFunc=eval(compConfig.apiBody);return{body:makeFunc(store,dynamicData,userValue,promiseChain.body),headers:promiseChain.headers}}return promiseChain}let compType,eventGroups={};const notifyUiSchema={type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6};let pageData=!1;const extractEvents=n=>{function s(i){i.events&&i.events.forEach(d=>{var u;i.type&&(compType=i.type),eventGroups[d.eventType]||(eventGroups[d.eventType]={}),eventGroups[d.eventType][i.name]||(eventGroups[d.eventType][i.name]=[]);const y=(u=d==null?void 0:d.events)==null?void 0:u.find(h=>h.eventType==="Success");!y&&d.eventType==="onLoad"&&(d.events||(d.events=[]),d.events.push({Handler:"mergeFormdata",eventType:"Success",type:compType,lazyLoading:n.lazyLoading==="YES"})),!y&&(d.eventType==="onBack"||d.eventType==="onNext"||d.eventType==="onReset")&&(d.events||(d.events=[]),d.events.push({Handler:`${d.eventType}Handler`,eventType:"Success",type:compType,lazyLoading:n.lazyLoading==="YES"})),eventGroups[d.eventType][i.name].push({...d,type:compType})})}return s(n),n!=null&&n.elements&&n.elements.forEach(extractEvents),eventGroups};var service=n=>{eventGroups={};const s={};pageData&&!lodash.exports.isEmpty(pageData)&&typeof pageData=="object"&&(eventGroups=extractEvents(pageData==null?void 0:pageData.config));let i={config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,serviceHolder:{downloadFile:downloadFile$1,download:doDownload,...n.functionsProvider},eventGroups,functionsProvider:n.functionsProvider,formDataHolder:s};return{setPage:async function(){var E,B,L,Y,k,X,K,U,ie,ue,V,ye,le;n.store.setFormdata({}),n.store.newData={};const d=sessionStorage.getItem("pagemasterMetaData");d?pageData=JSON.parse(d):(pageData=await n.pageDataProvider(),sessionStorage.setItem("pagemasterMetaData",JSON.stringify({schema:pageData==null?void 0:pageData.schema,uiSchema:pageData==null?void 0:pageData.uiSchema,config:pageData==null?void 0:pageData.config})));const y=pageData==null?void 0:pageData.config,u=pageData==null?void 0:pageData.uiSchema,h=new CustomEvent("pageNameChanged",{detail:{pageName:y.label}});window.dispatchEvent(h);const b=(B=(E=n==null?void 0:n.store)==null?void 0:E.theme)==null?void 0:B.myTheme;u.elements.push({type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:0,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((Y=(L=b==null?void 0:b.palette)==null?void 0:L.text)==null?void 0:Y.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:2,width:"fit-content",left:"50%",position:"relative",margin:0,flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}},{type:"Control",scope:"#/properties/FooterBackIcon",options:{widget:"Box"},config:{main:{iconName:"PrevIcon",onClick:"backHandler",width:"fit-content"},style:{fill:(X=(k=b==null?void 0:b.palette)==null?void 0:k.primary)==null?void 0:X.main,width:20,height:0,top:0,right:{xs:"12px",sm:"84px"},position:"absolute",fontSize:"12px",cursor:"pointer",":hover":{fill:(U=(K=b==null?void 0:b.palette)==null?void 0:K.primary)==null?void 0:U.dark},marginRight:"20px"}}},{type:"Control",scope:"#/properties/FooterBackHandlerText",options:{widget:"Box"},config:{main:{heading:"Previous Page",onClick:"backHandler"},style:{display:{xs:"none",sm:"flex"},textAlign:"left",lineHeight:1,height:0,width:"fit-content",color:(ue=(ie=b==null?void 0:b.palette)==null?void 0:ie.primary)==null?void 0:ue.main,fontSize:"12px",cursor:"pointer",marginLeft:"2px",top:3,right:"12px",position:"absolute",":hover":{color:(ye=(V=b==null?void 0:b.palette)==null?void 0:V.primary)==null?void 0:ye.dark},marginRight:"4px"}}}]});const I=(le=pageData==null?void 0:pageData.schema)!=null?le:{type:"object",properties:{}};eventGroups=extractEvents(y),i={config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,functionsProvider:n.functionsProvider,serviceHolder:this,eventGroups,formDataHolder:s},await executeRefreshHandler({config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,serviceHolder:this,eventGroups,formDataHolder:{}}),n.store.setSchema(he=>({...I,...he,properties:{...I.properties,...he.properties}})),u.elements.push(notifyUiSchema),n.store.setUiSchema(u)},onCellRenderer:d=>{var y,u,h,b;if(eventGroups.onCellRenderer){let I={};const E=((y=n.dynamicData)==null?void 0:y.tableButtonPath)||((h=(u=n==null?void 0:n.dynamicData)==null?void 0:u.path)==null?void 0:h.split(".")[0]);for(const B of(b=eventGroups==null?void 0:eventGroups.onCellRenderer)==null?void 0:b[E])i.store.functionParameters=d,I=executeEvents({...i,config:B,componentName:E});return I}return{}},onClick:function(){this.callHandler("onClick")},onMount:function(){this.callHandler("onMount")},onFileDownload:function(){this.callHandler("onDownload")},onFileUpload:function(){this.callHandler("onUpload")},backHandler:function(){n.store.navigate(-1)},onRowMovement:async function(d){const y=[{key:"direction",value:d.rowMovement.direction},{key:"movedRowId",value:d.rowMovement.movedRowId},{key:"targetRowId",value:d.rowMovement.targetRowId||[]}];await this.callExecuteEvents({path:d==null?void 0:d.path},y,"onRowMovement");const u=await this.callExecuteEvents({path:d==null?void 0:d.path},y,"onLoad");return u==null?void 0:u.data},onPaginationChange:async function(d){var h;const y=[{key:"size",value:d.pagination.pageSize},{key:"pageIndex",value:d.pagination.pageIndex},{key:"sorting",value:d.sorting||[]},{key:"filters",value:d.columnFilters||[]},{key:"globalFilter",value:(h=d.globalFilter)!=null?h:""}],u=await this.callExecuteEvents(d,y,"onLoad");return u==null?void 0:u.data},getSelectOptions:async function(d){if(d.serachValue!==""&&d.serachValue!==void 0){const y=[{key:"searchValue",value:d.serachValue},{key:"currentValue",value:d.currentValue}],u=await this.callExecuteEvents(d,y);return u==null?void 0:u.data}},onChange:async function(){if(eventGroups.onChange){const d=Object.keys(eventGroups.onChange);Promise.all(d.map(async y=>{var u,h;if(((u=n.store)==null?void 0:u.formData[y])!==n.store.newData[y]&&((h=n.store)==null?void 0:h.newData[y])!==void 0)for(const b of eventGroups.onChange[y])await executeEvents({...i,config:b,componentName:y})}))}},callExecuteEvents:async function(d,y,u){var b,I;let h;for(const E of(b=eventGroups==null?void 0:eventGroups[u])==null?void 0:b[d.path]){E.body?E.body=[...E.body,...y]:E.body=y;const B=(I=E==null?void 0:E.events)==null?void 0:I.filter(L=>L.Handler!=="mergeFormdata");E.events=B!=null?B:[],h=await executeEvents({...i,config:E,componentName:d.path})}return h},onBack:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onBack",d),((h=eventGroups==null?void 0:eventGroups.onBack)==null?void 0:h[y])===void 0&&(d==null||d.handleBack())},onNext:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onNext",d),((h=eventGroups==null?void 0:eventGroups.onNext)==null?void 0:h[y])===void 0&&(d==null||d.handleNext())},onReset:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onReset",d),((h=eventGroups==null?void 0:eventGroups.onReset)==null?void 0:h[y])===void 0&&(d==null||d.handleReset())},callHandler:async function(d,y){var h,b,I;const u=((h=n.dynamicData)==null?void 0:h.tableButtonPath)||n.dynamicData.path.split(".")[0];((b=eventGroups==null?void 0:eventGroups[d])==null?void 0:b[u])!==void 0&&Promise.all((I=eventGroups==null?void 0:eventGroups[d])==null?void 0:I[u].map(E=>{i.store.functionParameters=y,executeEvents({...i,config:E,componentName:u})}))},downloadFile:downloadFile$1,download:doDownload,...n.functionsProvider}},leaderBoard={type:"Control",scope:"#/properties/path",options:{widget:"LeaderBoard"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{}}};const buildLeaderBoard=n=>{const s=_.cloneDeep(leaderBoard);if(n.elements){const i=n.elements.map((d,y)=>d.type?{...{widget:buildUiSchema(d),accessorKey:d.name,header:d.label||d.name}}:{accessorKey:d.name,header:d.label||d.name});s.elements=i}return s.config.main.label=n.label,n.name&&(s.scope=`#/properties/${n.name}`),n.firstImage&&(s.config.main.firstImage=n.firstImage),n.secondImage&&(s.config.main.secondImage=n.secondImage),n.thirdImage&&(s.config.main.thirdImage=n.thirdImage),n.nameKey&&(s.config.main.nameKey=n.nameKey),n.imageKey&&(s.config.main.imageKey=n.imageKey),n.scoreKey&&(s.config.main.scoreKey=n.scoreKey),n.layout&&(s.config.layout=createLayoutFormat(n.layout)),n.style&&(s.config.style=JSON.parse(n.style)),s};var progressBar={type:"Control",scope:"#/properties/pbc_progress",options:{widget:"ProgressBar"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{developOnlyProgresBar:!1,bottomLabel_3:"Remaining",heading:"PBC Details"}}};const buildProgressBarCard=(n,s)=>{const i=_.cloneDeep(progressBar);return i.scope=s,n.heading&&(i.config.main.heading=n.heading),n.bottomLabel_3&&(i.config.main.bottomLabel_3=n.bottomLabel_3),n.bottomLabel_2&&(i.config.main.bottomLabel_2=n.bottomLabel_2),n.bottomLabel_1&&(i.elements[0].config.main.bottomLabel_1=n.bottomLabel_1),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},buildProgressBar=(n,s)=>{const i=_.cloneDeep(progressBar);return i.scope=s,n.layout&&(i.config.layout=n.layout),i.config.main.heading=n.label,n.bottomLabel_3&&(i.config.main.bottomLabel_3=n.bottomLabel_3),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.bottomLabel_2&&(i.config.main.bottomLabel_2=n.bottomLabel_2),n.bottomLabel_1&&(i.config.main.bottomLabel_1=n.bottomLabel_1),i},BarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"BarGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},barStyle:{}}}},PieGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"PieGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},pieStyle:{}}}},LineGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"LineGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},lineStyle:{}}}},HorizontalBarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"HorizontalBarGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},barStyle:{}}}},buildHorizontalBarGraph=(n,s)=>{const i=_.cloneDeep(HorizontalBarGraph);return i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.type=n.graphType,i.scope=s,i.config.main.header=n.heading,n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.barStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),i};var SpeedoMeter={type:"Control",scope:"#/properties/emptyBox",options:{widget:"SpeedoMeter"},config:{layout:{xs:12,sm:12,md:11.7,lg:11.7},width:350,segments:"5",main:{currentValueText:"Your Score",customSegmentLabels:[],data:{maxValue:1e5,value:5e4,minValue:0}},style:{segmentColors:[],ringWidth:57,needleHeightRatio:.7,needleColor:"#3f51b5",startColor:"red",textColor:"black",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=(n,s)=>{const i=_.cloneDeep(SpeedoMeter);if(i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.heading&&(i.config.main.header=n.heading),n.segments&&(i.config.main.segments=n.segments),n.style){const d=JSON.parse(n.style);d!=null&&d.style&&(i.config.style={...i.config.style,...d.style}),d!=null&&d.containerStyle&&(i.config.style.containerStyle={...i.config.style.containerStyle,...d.containerStyle})}return n.width&&(i.config.main.width=n.width),n.speedoCaption&&(i.config.main.currentValueText=n.speedoCaption),n.data&&(i.config.main.data=n.data),n.needleColor&&(i.config.style.needleColor=n.needleColor),n.segments&&(i.config.style.segments=n.segments),n.endColor&&(i.config.style.endColor=n.endColor),n.startColor&&(i.config.style.startColor=n.startColor),n.segmentColors&&(i.config.style.segmentColors=n.segmentColors),i},buildPieGraph=(n,s)=>{const i=_.cloneDeep(PieGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.height&&(i.config.style.containerStyle.height=n.height),n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),i.scope=s,i.config.main.header=n.heading,n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.pieArcColors&&(i.config.style.pieStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),i},buildStackbarGraph=(n,s)=>{var d;const i=_.cloneDeep(BarGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.legendHide&&(i.config.main.legendAvailable=n.legendHide,i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),i.config.main.type=(d=n==null?void 0:n.graphType)!=null?d:"BarGraph",i.config.main.header=n.heading,n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.barStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),i.scope=s,i};var RunnerBoyProgressBar={type:"Control",scope:"#/properties/path",options:{widget:"RunnerBoyProgressBar"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{}}};const RunnerBoyProgressbar=(n,s)=>{const i=_.cloneDeep(RunnerBoyProgressBar);return i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var Tabsection={type:"TabLayout",config:{main:{id:"groupMaster",tabLabels:["default"],layout:12}},elements:[]};const buildTabSection=(n,s)=>{const i=_.cloneDeep(Tabsection);return i.scope=s,n.lazyLoad&&(i.config.main.lazyLoad=n.lazyLoad==="YES"),n.orientation&&(i.config.main.orientation=n.orientation==="YES"?"vertical":"horizontal"),n.sectionLabels&&(i.config.main.tabLabels=n.sectionLabels.map(d=>d.label)),i.config.main.id=n.name,i};var WrapperSection={type:"WrapperLayout",config:{main:{rowSpacing:3,divider:!0,label:"Default Label"},defaultStyle:!0},elements:[]};const buildWrapperSection=(n,s)=>{const i=_.cloneDeep(WrapperSection);return i.scope=s,i.config.main.label=n.label,i.config.main.divider=n.divider==="YES",i.config.main.isAccordion=n.isAccordion!=="No",n.defaultStyle&&(i.config.defaultStyle=n.defaultStyle==="YES"),n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var TextInputField={type:"Control",scope:"#/properties/text",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:""},style:{}}};const buildTextField=(n,s)=>{const i=_.cloneDeep(TextInputField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.multiline&&(i.config.main.multiline=n.multiline==="YES"),n.InputFormatingAndMasking&&(i.config.main.formatStrArray=n.InputFormatingAndMasking.map(d=>d.formatElement)),n.placeholder&&(i.config.main.placeholder=n.placeholder),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i};var SelectInputField={type:"Control",scope:"#/properties/select",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"",type:"text",freeSole:!1}}};const buildSelect=(n,s)=>{const i=_.cloneDeep(SelectInputField);return i.config.main.label=n.label,n.value&&(i.config.main.options=n.value),n.freeSolo&&(i.config.main.freeSolo=n.freeSolo==="YES"),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.scope=s,i};var Button={type:"Control",scope:"#/properties/button",options:{widget:"Button"},config:{layout:3,main:{name:"Compare",variant:"contained",type:"text",startIcon:"",styleDefault:!1,icon:"",onClick:"onClick",size:"small"},style:{}}};const buildButton=(n,s)=>{const i=_.cloneDeep(Button);return n.buttonType&&(i.options.widget=n.buttonType==="IconButton"?"IconButton":"Button",n.buttonType==="ButtonWithIconAndText"?i.config.main.startIcon=n.iconName:i.config.main.icon=n.iconName),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.tooltipMessage&&(i.config.main.tooltipMessage=n.tooltipMessage),n.defaultStyle&&(n.buttonType==="IconButton"?i.config.main.styleDefault=n.defaultStyle==="true":i.config.main.enableDefaultStyle=n.defaultStyle!=="true"),i.scope=s,n.style&&(i.config.style=JSON.parse(n.style)),n.size&&(i.config.main.size=n.size),n.color&&(i.config.main.color=n.color),n.label&&(i.config.main.name=n.label),i};var Table={type:"Control",scope:"#/properties/ApproveRecords",options:{widget:"Table"},elements:[],config:{main:{onMount:"onMount",enableExpandAll:!0,allRowData:[],downloadAllData:!1,columns:{dataColumns:[],actionColumns:[]}}}};const buildTable=(n,s)=>{const i=_.cloneDeep(Table);return i.scope=s,n.style&&(i.config.style=JSON.parse(n.style)),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),n.enableRowMovement&&(i.config.main.enableRowMovement=n.enableRowMovement==="YES"),n.enableExpanding&&(i.config.main.enableExpanding=n.enableExpanding==="YES"),n.enableExpandAll&&(i.config.main.enableExpandAll=n.enableExpandAll==="YES"),n.paginateExpandedRows&&(i.config.main.paginateExpandedRows=n.paginateExpandedRows==="YES"),n.treeStructure&&(i.config.main.treeStructure=n.treeStructure==="YES"?"flatTreeMap":!1),n.SelectionAvailable&&(i.config.main.Selection=n.SelectionAvailable==="YES"),n.ColumnResizingAvailable&&(i.config.main.disableColumnResizing=n.ColumnResizingAvailable!=="YES"),n.DragAvailable&&(i.config.main.enableDrag=n.DragAvailable==="YES"),n.downloadAllData&&(i.config.main.downloadAllData=n.downloadAllData==="YES"),n.disableGlobalSearch&&(i.config.main.disableGlobalSearch=n.disableGlobalSearch==="YES"),n.disableColumnFilter&&(i.config.main.disableColumnFilter=n.disableColumnFilter==="YES"),n.disableSorting&&(i.config.main.disableSorting=n.disableSorting==="YES"),n.disableEditColumn&&(i.config.main.disableEditColumn=n.disableEditColumn==="YES"),n.disableFullScreenToggle&&(i.config.main.disableFullScreenToggle=n.disableFullScreenToggle==="YES"),n.disableDensityToggle&&(i.config.main.disableDensityToggle=n.disableDensityToggle==="YES"),n.disableDownloadFile&&(i.config.main.disableDownloadFile=n.disableDownloadFile==="YES"),n.disablePagination&&(i.config.main.disablePagination=n.disablePagination==="YES"),n.Table_Download_Keys_Name&&(i.config.main.TableDownloadKeysName=n.Table_Download_Keys_Name.map(d=>d.KeyName)),n.selectKey&&(i.config.main.selectKey=n.selectKey),i},Box={type:"Control",scope:"#/properties/emptyBox",options:{widget:"Box"},config:{layout:12,main:{},style:{}}},buildLabel=(n,s)=>{const i=_.cloneDeep(Box);return i.scope=s,i.config.main.heading=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.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:{xs:6,sm:6,md:4,lg:4}},options:{widget:"UploadFile"}},downloadFile={type:"Control",scope:"#/properties/downloadAttachment",config:{main:{onClick:"onClick",required:!1},style:{backgroundColor:"none"},layout:{xs:12,sm:6,md:4,lg:4}},options:{widget:"DownloadFile"}},buildUploadFile=(n,s)=>{const i=_.cloneDeep(uploadFile);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=n.style),n.required&&(i.config.main.required=!0),i.config.main.errorMessage=n.errorMessage,i},buildDownloadFile=(n,s)=>{const i=_.cloneDeep(downloadFile);return i.scope=s,n.layout&&(i.config.layout=n.layout),n.style&&(i.config.style=n.style),n.required&&(i.config.main.required=!0),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.errorMessage&&(i.config.main.errorMessage=n.errorMessage),i};function Card(n){return{type:"WrapperLayout",config:{main:{},wrapperStyle:{position:"relative",top:"50%",transform:"translateY(-50%)"},componentsBoxStyle:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1)",flexDirection:"row",flexWrap:"nowrap",width:"100% !important",background:"transparent",border:`1.5px solid ${n.palette.primary.light}`,borderRadius:"8px",padding:"0px 4px",height:"100%",alignItems:"center",marginLeft:"0px","&: hover":{background:`${n.palette.primary.main}`,border:"1.5px solid black","& p":{color:"white"}}},layout:{xs:12,sm:12,md:6,lg:6}},elements:[{type:"HorizontalLayout",config:{layout:8},elements:[{type:"WrapperLayout",config:{main:{columnSpacing:0,gap:0},wrapperStyle:{background:"transparent"},componentsBoxStyle:{flexDirection:"column",flexWrap:"nowrap",width:"100%",height:"inherit",background:"transparent",borderRadius:"0px"},layout:12},elements:[{type:"WrapperLayout",config:{main:{columnSpacing:0,gap:0},wrapperStyle:{background:"transparent"},componentsBoxStyle:{flexDirection:"row",flexWrap:"nowrap",width:"100%",height:"0",background:"transparent",borderRadius:"0px",marginLeft:"-10px",marginTop:"-8px",justifyContent:"start",position:"relative"},layout:12},elements:[{type:"Control",scope:"#/properties/programType",config:{main:{heading:""},style:{color:"black",display:"flex",fontSize:{xs:"24px",md:"28px"},fontWeight:"bold",background:"inherit",justifyContent:"flex-start",width:"auto",margin:"-8px",height:0}},options:{widget:"Box"}},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"5000.00"},style:{color:"black",display:"flex",fontSize:{xs:"24px",md:"28px"},fontWeight:"bold",background:"inherit",justifyContent:"flex-start",width:"auto",margin:"-8px",position:"absolute",left:"8px"}},options:{widget:"Box"}}]},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"Total Earnings"},style:{color:"black",fontSize:"16px",justifyContent:"center",textWrap:"wrap",background:"inherit",width:"calc(100%+8px)",margin:"-8px",marginTop:{xs:"0px",md:"12px"},lineHeight:"1"},layout:12},options:{widget:"Box"}}]}]},{type:"Control",scope:"#/properties/programType",config:{main:{url:"https://www.svgrepo.com/show/500606/loading.svg"},style:{containerStyle:{height:"100%",display:"flex",justifyContent:"end"},imageStyle:{width:"unset",fontSize:"none",padding:"4px",margin:"0px 0px 0px 8px",height:"64px"}},layout:4},options:{widget:"Image"}}]}}const buildCard=(config,componentScope,store)=>{const card=_.cloneDeep(Card(store.theme.myTheme));return config.style&&(card.config.wrapperStyle=JSON.parse(config.style)),card.elements[0].elements[0].elements[0].elements[1].scope=`#/properties/${config.name}/properties/value`,card.elements[1].scope=`#/properties/${config.name}/properties/url`,card.elements[0].elements[0].elements[1].scope=`#/properties/${config.name}/properties/description`,config.layout&&(card.config.layout=createLayoutFormat(config.layout)),config!=null&&config.titleIcon&&(card.elements[0].elements[0].elements[0].elements[0].config.main.heading=eval(`'\\${config.titleIcon}'`),card.elements[0].elements[0].elements[0].elements[1].config.style.left="24px"),config.label&&(card.elements[0].elements[0].elements[0].elements[1].config.main.heading=config.label),config.url&&(card.elements[1].config.main.url=config.url),config.description&&(card.elements[0].elements[0].elements[1].config.main.heading=config.description),card};var DateInputField={type:"Control",scope:"#/properties/date",options:{widget:"DateInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"",type:"date"}}};const DateTime={type:"Control",scope:"#/properties/date",options:{widget:"DateTimeInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"DateTime",type:"date"}}},buildDate=(n,s)=>{const i=_.cloneDeep(DateInputField);return i.config.main.label=n.label,i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},buildDateTime=(n,s)=>{const i=_.cloneDeep(DateTime);return i.config.main.label=n.label,i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var RankCard={type:"Control",scope:"#/properties/path",options:{widget:"RankCard"},config:{layout:{xs:12,sm:6,md:6,lg:6},main:{}}};const buildRankCard=(n,s)=>{const i=_.cloneDeep(RankCard);return i.scope=s,n.rank&&(i.config.main.rank=`${n.rank}`),n.height&&(i.config.main.height=`${n.height}px`),n.layout&&(i.config.layout=createLayoutFormat(n.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=(n,s)=>{const i=_.cloneDeep(RollAndDice);return n.name&&(i.scope=s),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var Timer={type:"Control",scope:"#/properties/timer",options:{widget:"Timer"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{},style:{}}};const buildTimer=(n,s)=>{const i=_.cloneDeep(Timer);return i.scope=s,n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var MultipleSelect={type:"Control",scope:"#/properties/path",options:{widget:"MultipleSelect"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"",type:"text",multiple:!0,variant:"standard",options:[]}}};const buildMultiSelect=(n,s)=>{const i=_.cloneDeep(MultipleSelect);return i.scope=s,n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.value&&(i.config.main.options=n.value),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),i},buildBasicUiSchema=n=>({type:"HorizontalLayout",pageName:n.name,name:n.name,accessorKey:n.name,heading:n.label||n.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=(n,s)=>{const i=_.cloneDeep(TextArea);return i.config.main.heading=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),n.placeholder&&(i.config.main.placeholder=n.placeholder),n.enableCodeEditor&&(i.config.main.enableCodeEditor=n.enableCodeEditor==="YES"),n.codeEditorLanguage&&(i.config.main.codeEditorLanguage=n.codeEditorLanguage),i.scope=s,i};var cardSlider={type:"Control",scope:"#/properties/path",options:{widget:"Slider"},elements:[],config:{layout:12,main:{}}};const buildSlider=(n,s)=>{const i=_.cloneDeep(cardSlider);return n.name&&(i.scope=s),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},Checkbox={type:"Control",scope:"#/properties/username1",layout:12,options:{widget:"CheckBox"},config:{main:{label:"Welcome to Hyperform"}}},buildCheckbox=(n,s)=>{const i=_.cloneDeep(Checkbox);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},buildLineGraph=(n,s)=>{const i=_.cloneDeep(LineGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.header=n.heading,n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.yAxisValue&&(i.config.main.yAxisValue=n.yAxisValue),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.lineStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),i.scope=s,i},RadioUiSchema={type:"Control",scope:"#/properties/invoiceEnabled",options:{widget:"RadioInputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Enabled",options:["YES","NO"],errorMessage:"Enabled is not marked as YES or NO"}}},buildRadio=(n,s)=>{const i=_.cloneDeep(RadioUiSchema);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.sectionLabels&&(i.config.main.options=n.sectionLabels.map(d=>d.label||d.Options)),n.style&&(i.config.style=JSON.parse(n.style)),i};var emptyBox={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:4,md:4,lg:4},main:{},style:{}}};const buildEmptyBox=(n,s)=>{const i=_.cloneDeep(emptyBox);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},ArrayUiSchema={type:"Control",scope:"#/properties/adjustments",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[]}}},buildArray=(n,s)=>{const i=_.cloneDeep(ArrayUiSchema);return i.scope=s,i},TextField={type:"Control",scope:"#/properties/AAdhar",layout:12,options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Adhaar Card",formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],placeholder:"XXXX XXXX XXXX"}}},buildAdhaarField=(n,s)=>{const i=_.cloneDeep(TextField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i},PanField={type:"Control",scope:"#/properties/pan",layout:12,options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Pan Card",placeholder:"AAAAA0000A",formatStrArray:["A","A","A","A","A","9","9","9","9","A"]}}},buildPanField=(n,s)=>{const i=_.cloneDeep(PanField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i},FileInput={type:"Control",scope:"#/properties/docAggrementCopy",options:{widget:"FileInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{required:!1,onUpload:"onFileUpload",onDownload:"onFileDownload",label:"Aggrement Copy"},style:{backgroundColor:"none"}}},buildFileInput=(n,s)=>{const i=_.cloneDeep(FileInput);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},Stepper={type:"Control",scope:"#/properties/Stepper",options:{widget:"Stepper"},config:{main:{steps:[{label:"First"},{label:"Second"},{label:"Third"}],resetButton:!1,resetText:"Reset",orientation:"vertical"}},elements:[]},buildStepper=(n,s)=>{const i=_.cloneDeep(Stepper);return i.scope=s,i.config.main.resetButton=n.resetButton==="YES",n.defaultButtonAvailable&&(i.config.main.defaultButtonAvailable=n.defaultButtonAvailable==="YES"),i.config.main.resetText=n.resetText||"ResetData",i.config.main.completeText=n.completeText||"Complete Text",i.config.main.orientation=n.orientation||"horizontal",n.sectionLabels&&(i.config.main.steps=n.sectionLabels.map((d,y)=>({label:d.label,id:y}))),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},PopUP={type:"Control",scope:"#/properties/text",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{label:"PopUp",fullScreen:!1,fullWidth:!1,maxWidth:!1,alignItems:!1,spacing:2},style:{}}},buildPopUp=(n,s)=>{const i=_.cloneDeep(PopUP);return i.scope=s,i.config.main.title=n.label,i.config.main.fullScreen=n.fullScreen==="YES",i.config.main.fullWidth=n.fullWidth==="YES",i.config.main.maxWidth=n.maxWidth||!1,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(PopUP.config.style=JSON.parse(n.style)),i},dataGrid={type:"Control",scope:"#/properties/dataGrid",layout:12,options:{widget:"DataGrid"},elements:[],config:{main:{elevation:0,useWrapper:!1},style:{}}},buildDataGrid=(n,s)=>{const i=_.cloneDeep(dataGrid);return i.scope=s,n.elevation&&(i.config.main.elevation=+n.elevation),i.config.main.divider=n.divider!=="NO",n.height&&(i.config.main.height=`${n.height}px`),n.justifyContent&&(i.config.main.justifyContent=n.justifyContent),n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.cardLayout&&(i.config.cardLayout=createLayoutFormat(n.cardLayout)),n.style&&(i.config.style=JSON.parse(n.style)),i},InputSlider={type:"Control",scope:"#/properties/inputSlider",options:{widget:"InputSlider"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{limitToMax:!1,max:1e4,step:1e3,min:0,label:"Slider"}}},buildInputSlider=(n,s)=>{const i=_.cloneDeep(InputSlider);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.limitToMax&&(i.config.main.limitToMax=n.limitToMax==="YES"),n.max&&(i.config.main.max=n.max),n.step&&(i.config.main.step=n.step),n.min&&(i.config.main.min=n.min),n.style&&(i.config.main.defaultStyle=JSON.parse(n.style)),i},TreeMap={type:"Control",scope:"#/properties/TreeMap2",config:{main:{layout:"cartsian",orientation:"vertical",header:"Territory Hierarchy",linkType:"step",graphHeight:"500px"},style:{BoxStyle:{borderRadius:"5px"}}},options:{widget:"TreeMap"},elements:[]},buildTreeMap=(n,s)=>{const i=_.cloneDeep(TreeMap);return i.scope=s,n.label&&(i.config.main.header=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.orientation&&(i.config.main.orientation=n.orientation),n.linkType&&(i.config.main.linkType=n.linkType),n.graphHeight&&(i.config.main.graphHeight=n.graphHeight),n.graphWidth&&(i.config.main.graphWidth=n.graphWidth),n.graphZoomHeight&&(i.config.main.graphZoomHeight=n.graphZoomHeight),n.graphZoomWidth&&(i.config.main.graphZoomWidth=n.graphZoomWidth),n.style&&(i.config.style=JSON.parse(n.style)),i};var Thought={type:"Control",scope:"#/properties/path",options:{widget:"Thought"},config:{layout:{xs:11.5,sm:11.5,md:8,lg:8},main:{}}};const buildThoughtOfTheDay=(n,s)=>{const i=_.cloneDeep(Thought);return i.scope=s,n.thought&&(i.config.main.thought=`${n.thought}`),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.label&&(i.config.main.label=n.label),n.style&&(i.config.style=JSON.parse(n.style)),i};var pdfViewer={type:"Control",scope:"#/properties/pdfviewer",options:{widget:"PdfViewer"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"PDF"}}};const buildPdfViewer=n=>{const s=_.cloneDeep(pdfViewer);return s.config.main.label=n.label,n.name&&(s.scope=`#/properties/${n.name}`),n.layout&&(s.config.layout=createLayoutFormat(n.layout)),n.label&&(s.config.main.title=n.label),n.style&&(s.config.style=JSON.parse(n.style)),s};exports.schema={type:"object",properties:{},required:[]};function buildRule(n,s,i){var d,y,u,h,b,I,E,B,L,Y;i?(u=(y=(d=exports.schema.properties)==null?void 0:d[s])==null?void 0:y.items)!=null&&u.properties&&((E=(I=(b=(h=exports.schema.properties)==null?void 0:h[s])==null?void 0:b.items)==null?void 0:I.properties)!=null&&E[n.name]||(exports.schema.properties[s].items.properties[n.name]={},n.type==="Select"&&((B=n.value)==null?void 0:B.length)>0?exports.schema.properties[s].items.properties[n.name]={oneOf:n.value.map(k=>({const:k.value,title:k.label}))}:n.type==="MultipleSelect"&&((L=n.value)==null?void 0:L.length)>0&&(exports.schema.properties[s].items.properties[n.name]={items:{oneOf:n.value.map(k=>({const:k.value,title:k.label}))}}))):(n.type==="Select"||n.type==="MultipleSelect")&&((Y=n.value)==null?void 0:Y.length)>0&&(n.type==="Select"?exports.schema.properties[n.name]={oneOf:n.value.map(k=>({const:k.value,title:k.label}))}:n.type==="MultipleSelect"&&(exports.schema.properties[n.name]={items:{oneOf:n.value.map(k=>({const:k.value,title:k.label}))}})),n.validation&&n.validation.forEach(k=>{var X,K,U,ie,ue,V,ye,le,he,ve,ze,Qe;s?(U=(K=(X=exports.schema.properties)==null?void 0:X[s])==null?void 0:K.items)!=null&&U.properties&&((ye=(V=(ue=(ie=exports.schema.properties)==null?void 0:ie[s])==null?void 0:ue.items)==null?void 0:V.properties)!=null&&ye[n.name]||(exports.schema.properties[s].items.properties[n.name]={},n.type==="Select"||((le=n.value)==null?void 0:le.length)>0?exports.schema.properties[s].items.properties[n.name]={oneOf:n.value.map(Ve=>({const:Ve.value,title:Ve.label}))}:(n.type==="MultipleSelect"||((he=n.value)==null?void 0:he.length)>0)&&(exports.schema.properties[s].items.properties[n.name]={items:{oneOf:n.value.map(Ve=>({const:Ve.value,title:Ve.label}))}})),k.validationType==="required"?(Qe=(ze=(ve=exports.schema.properties)==null?void 0:ve[s])==null?void 0:ze.items)==null||Qe.required.push(n.name):(exports.schema.properties[s].items.properties[n.name].type="string",exports.schema.properties[s].items.properties[n.name][k.validationType]=isNaN(k.validationValue)?k.validationValue:Number(k.validationValue))):(exports.schema.properties[n.name]||(exports.schema.properties[n.name]={}),k.validationType==="required"?exports.schema.required.push(n.name):(exports.schema.properties[n.name].type="string",exports.schema.properties[n.name][k.validationType]=isNaN(k.validationValue)?k.validationValue:Number(k.validationValue)))})}const buildSchema=(n,s,i)=>(buildRule(n,s,i),n!=null&&n.elements&&(n.type=="Table"||n.type=="Array"?(exports.schema.properties[n.name]||(exports.schema.properties[n.name]={type:"array",items:{type:"object",properties:{},required:[]}}),n.elements.map((d,y)=>{buildSchema(d,n.name,n.type==="Array")})):n.elements.map((d,y)=>{buildSchema(d)})),exports.schema),buildUiSchema=(n,s)=>{let i={};const d=`#/properties/${n.name}`;switch(n.type){case"TreeMap":i=buildTreeMap(n,d);break;case"DateTime":i=buildDateTime(n,d);break;case"InputSlider":i=buildInputSlider(n,d);break;case"DataGrid":i=buildDataGrid(n,d);break;case"Stepper":i=buildStepper(n,d);break;case"PopUp":i=buildPopUp(n,d);break;case"FileInput":i=buildFileInput(n,d);break;case"AadharcardText":i=buildAdhaarField(n,d);break;case"PanCardText":i=buildPanField(n,d);break;case"TabSection":i=buildTabSection(n,d);break;case"RunnerBoyProgressBar":i=RunnerBoyProgressbar(n,d);break;case"WrapperSection":i=buildWrapperSection(n,d);break;case"Text":i=buildTextField(n,d);break;case"TextArea":i=buildTextArea(n,d);break;case"Date":i=buildDate(n,d);break;case"Select":i=buildSelect(n,d);break;case"Radio":i=buildRadio(n,d);break;case"Button":i=buildButton(n,d);break;case"Table":i=buildTable(n,d);break;case"Array":i=buildArray(n,d);break;case"Box":i=buildLabel(n,d);break;case"CheckBox":i=buildCheckbox(n,d);break;case"UploadFile":i=buildUploadFile(n,d);break;case"DownloadFile":i=buildDownloadFile(n,d);break;case"EmptyBox":i=buildEmptyBox(n);break;case"card":i=buildCard(n,d,s);break;case"Graph":switch(n.graphType){case"BarGraph":case"StackBarGraph":i=buildStackbarGraph(n,d);break;case"LineGraph":i=buildLineGraph(n,d);break;case"PieGraph":i=buildPieGraph(n,d);break;case"HorizontalBarGraph":case"HorizontalStackBarGraph":i=buildHorizontalBarGraph(n,d);break;default:i=buildStackbarGraph(n,d);break}break;case"ProgressBar":i=buildProgressBar(n,d);break;case"SpeedoMeter":i=buildSpeedoMeter(n,d);break;case"ProgressBarCard":i=buildProgressBarCard(n,d);break;case"RankCard":i=buildRankCard(n,d);break;case"Rank":i=buildRollAndDice(n,d);break;case"Slider":i=buildSlider(n,d);break;case"Timer":i=buildTimer(n,d);break;case"ColumnGroup":i={accessorKey:n.name,header:n.label||n.name,elements:[]};break;case"MultipleSelect":i=buildMultiSelect(n,d);break;case"LeaderBoard":i=buildLeaderBoard(n);break;case"Thought":i=buildThoughtOfTheDay(n,d);break;case"PdfViewer":i=buildPdfViewer(n);break;default:exports.schema={type:"object",properties:{},required:[]},i=buildBasicUiSchema(n)}if(n!=null&&n.elements){if((n==null?void 0:n.type)==="LeaderBoard")return i;if(n.type=="ColumnGroup"){const y={};n.sizeHolder&&n.sizeHolder.map((u,h)=>{y[u.keyName]=u.value}),i.elements=n.elements.map((u,h)=>({accessorKey:u.name,header:u.label||u.name,size:y[u.name]||180,type:u.columnFormat,elements:u.type=="ColumnGroup"?u.elements.map(b=>buildUiSchema(b,s)):[]}))}else if(n.type=="Table"){const y={};n.sizeHolder&&n.sizeHolder.map((u,h)=>{y[u.keyName]=u.value}),i.elements=n.elements.map((u,h)=>u.type?{accessorKey:u.name,header:u.label||u.name,size:y[u.name]||180,type:u.columnFormat,widget:u.type!="ColumnGroup"?buildUiSchema(u,s):void 0,elements:u.type=="ColumnGroup"?u.elements.map(b=>buildUiSchema(b,s)):[],columnFilterModeOptions:u.filteringOptions,enableColumnFilter:u.enableFilter==="Yes",enableSorting:u.enableSorting==="Yes"}:{accessorKey:u.name,type:u.columnFormat,header:u.label||u.name,size:y[u.name]||180,columnFilterModeOptions:u.filteringOptions,enableColumnFilter:u.enableFilter==="Yes",enableSorting:u.enableSorting==="Yes"})}else n.type=="Array"?i.options.detail.elements=n.elements.map((y,u)=>buildUiSchema(y,s)):i.elements=n.elements.map((y,u)=>buildUiSchema(y,s))}return i};exports.buildConfig=buildConfig,exports.buildSchema=buildSchema,exports.buildUiSchema=buildUiSchema,exports.clearFromSessionStorage=clearFromSessionStorage,exports.pageMaster=pageMaster,exports.pageMasterComponents=Component,exports.pageMasterEvents=event,exports.pageService=service,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
27
|
+
}`;var O=pl(function(){return q(p,T+"return "+w).apply(i,c)});if(O.source=w,wi(O))throw O;return O}function pm(e){return J(e).toLowerCase()}function um(e){return J(e).toUpperCase()}function cm(e,t,r){if(e=J(e),e&&(r||t===i))return vo(e);if(!e||!(t=Ae(t)))return e;var o=We(e),a=We(t),p=bo(o,a),c=xo(o,a)+1;return ht(o,p,c).join("")}function dm(e,t,r){if(e=J(e),e&&(r||t===i))return e.slice(0,Co(e)+1);if(!e||!(t=Ae(t)))return e;var o=We(e),a=xo(o,We(t))+1;return ht(o,0,a).join("")}function fm(e,t,r){if(e=J(e),e&&(r||t===i))return e.replace(wr,"");if(!e||!(t=Ae(t)))return e;var o=We(e),a=bo(o,We(t));return ht(o,a).join("")}function mm(e,t){var r=Ve,o=gn;if(ne(t)){var a="separator"in t?t.separator:a;r="length"in t?H(t.length):r,o="omission"in t?Ae(t.omission):o}e=J(e);var p=e.length;if(Dt(e)){var c=We(e);p=c.length}if(r>=p)return e;var f=r-Pt(o);if(f<1)return o;var g=c?ht(c,0,f).join(""):e.slice(0,f);if(a===i)return g+o;if(c&&(f+=g.length-f),_i(a)){if(e.slice(f).search(a)){var S,C=g;for(a.global||(a=zr(a.source,J(Oi.exec(a))+"g")),a.lastIndex=0;S=a.exec(C);)var w=S.index;g=g.slice(0,w===i?f:w)}}else if(e.indexOf(Ae(a),f)!=f){var F=g.lastIndexOf(a);F>-1&&(g=g.slice(0,F))}return g+o}function gm(e){return e=J(e),e&&Il.test(e)?e.replace(Mi,Ws):e}var ym=$t(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Fi=ua("toUpperCase");function sl(e,t,r){return e=J(e),t=r?i:t,t===i?Hs(e)?Ks(e):Ts(e):e.match(t)||[]}var pl=z(function(e,t){try{return Ee(e,i,t)}catch(r){return wi(r)?r:new M(r)}}),hm=it(function(e,t){return De(t,function(r){r=Ze(r),nt(e,r,Si(e[r],e))}),e});function vm(e){var t=e==null?0:e.length,r=R();return e=t?te(e,function(o){if(typeof o[1]!="function")throw new Pe(h);return[r(o[0]),o[1]]}):[],z(function(o){for(var a=-1;++a<t;){var p=e[a];if(Ee(p[0],this,o))return Ee(p[1],this,o)}})}function bm(e){return Wp(Me(e,L))}function Ai(e){return function(){return e}}function xm(e,t){return e==null||e!==e?t:e}var Sm=da(),Cm=da(!0);function Ie(e){return e}function Ti(e){return Uo(typeof e=="function"?e:Me(e,L))}function wm(e){return Go(Me(e,L))}function _m(e,t){return Yo(e,Me(t,L))}var Im=z(function(e,t){return function(r){return sn(r,e,t)}}),Em=z(function(e,t){return function(r){return sn(e,r,t)}});function Li(e,t,r){var o=ce(t),a=Vn(t,o);r==null&&!(ne(t)&&(a.length||!o.length))&&(r=t,t=e,e=this,a=Vn(t,ce(t)));var p=!(ne(r)&&"chain"in r)||!!r.chain,c=at(e);return De(a,function(f){var g=t[f];e[f]=g,c&&(e.prototype[f]=function(){var S=this.__chain__;if(p||S){var C=e(this.__wrapped__),w=C.__actions__=Ce(this.__actions__);return w.push({func:g,args:arguments,thisArg:e}),C.__chain__=S,C}return g.apply(e,ct([this.value()],arguments))})}),e}function Fm(){return de._===this&&(de._=Qs),this}function Bi(){}function Am(e){return e=H(e),z(function(t){return Ko(t,e)})}var Tm=si(te),Lm=si(fo),Bm=si(Dr);function ul(e){return gi(e)?Pr(Ze(e)):au(e)}function Rm(e){return function(t){return e==null?i:It(e,t)}}var Dm=ma(),Pm=ma(!0);function Ri(){return[]}function Di(){return!1}function km(){return{}}function Mm(){return""}function Nm(){return!0}function Hm(e,t){if(e=H(e),e<1||e>pt)return[];var r=qe,o=me(e,qe);t=R(t),e-=qe;for(var a=Nr(o,t);++r<e;)t(r);return a}function Om(e){return N(e)?te(e,Ze):Te(e)?[e]:Ce(La(J(e)))}function zm(e){var t=++Xs;return J(e)+t}var $m=jn(function(e,t){return e+t},0),Um=pi("ceil"),Wm=jn(function(e,t){return e/t},1),Gm=pi("floor");function Ym(e){return e&&e.length?Kn(e,Ie,qr):i}function Km(e,t){return e&&e.length?Kn(e,R(t,2),qr):i}function Vm(e){return yo(e,Ie)}function qm(e,t){return yo(e,R(t,2))}function Jm(e){return e&&e.length?Kn(e,Ie,Qr):i}function Xm(e,t){return e&&e.length?Kn(e,R(t,2),Qr):i}var Zm=jn(function(e,t){return e*t},1),Qm=pi("round"),jm=jn(function(e,t){return e-t},0);function eg(e){return e&&e.length?Mr(e,Ie):0}function tg(e,t){return e&&e.length?Mr(e,R(t,2)):0}return l.after=Cd,l.ary=$a,l.assign=uf,l.assignIn=tl,l.assignInWith=dr,l.assignWith=cf,l.at=df,l.before=Ua,l.bind=Si,l.bindAll=hm,l.bindKey=Wa,l.castArray=Pd,l.chain=Ha,l.chunk=Wu,l.compact=Gu,l.concat=Yu,l.cond=vm,l.conforms=bm,l.constant=Ai,l.countBy=jc,l.create=ff,l.curry=Ga,l.curryRight=Ya,l.debounce=Ka,l.defaults=mf,l.defaultsDeep=gf,l.defer=wd,l.delay=_d,l.difference=Ku,l.differenceBy=Vu,l.differenceWith=qu,l.drop=Ju,l.dropRight=Xu,l.dropRightWhile=Zu,l.dropWhile=Qu,l.fill=ju,l.filter=td,l.flatMap=id,l.flatMapDeep=od,l.flatMapDepth=ad,l.flatten=Pa,l.flattenDeep=ec,l.flattenDepth=tc,l.flip=Id,l.flow=Sm,l.flowRight=Cm,l.fromPairs=nc,l.functions=Cf,l.functionsIn=wf,l.groupBy=ld,l.initial=ic,l.intersection=oc,l.intersectionBy=ac,l.intersectionWith=lc,l.invert=If,l.invertBy=Ef,l.invokeMap=pd,l.iteratee=Ti,l.keyBy=ud,l.keys=ce,l.keysIn=_e,l.map=ar,l.mapKeys=Af,l.mapValues=Tf,l.matches=wm,l.matchesProperty=_m,l.memoize=sr,l.merge=Lf,l.mergeWith=nl,l.method=Im,l.methodOf=Em,l.mixin=Li,l.negate=pr,l.nthArg=Am,l.omit=Bf,l.omitBy=Rf,l.once=Ed,l.orderBy=cd,l.over=Tm,l.overArgs=Fd,l.overEvery=Lm,l.overSome=Bm,l.partial=Ci,l.partialRight=Va,l.partition=dd,l.pick=Df,l.pickBy=rl,l.property=ul,l.propertyOf=Rm,l.pull=cc,l.pullAll=Ma,l.pullAllBy=dc,l.pullAllWith=fc,l.pullAt=mc,l.range=Dm,l.rangeRight=Pm,l.rearg=Ad,l.reject=gd,l.remove=gc,l.rest=Td,l.reverse=bi,l.sampleSize=hd,l.set=kf,l.setWith=Mf,l.shuffle=vd,l.slice=yc,l.sortBy=Sd,l.sortedUniq=wc,l.sortedUniqBy=_c,l.split=om,l.spread=Ld,l.tail=Ic,l.take=Ec,l.takeRight=Fc,l.takeRightWhile=Ac,l.takeWhile=Tc,l.tap=Gc,l.throttle=Bd,l.thru=or,l.toArray=Qa,l.toPairs=il,l.toPairsIn=ol,l.toPath=Om,l.toPlainObject=el,l.transform=Nf,l.unary=Rd,l.union=Lc,l.unionBy=Bc,l.unionWith=Rc,l.uniq=Dc,l.uniqBy=Pc,l.uniqWith=kc,l.unset=Hf,l.unzip=xi,l.unzipWith=Na,l.update=Of,l.updateWith=zf,l.values=Gt,l.valuesIn=$f,l.without=Mc,l.words=sl,l.wrap=Dd,l.xor=Nc,l.xorBy=Hc,l.xorWith=Oc,l.zip=zc,l.zipObject=$c,l.zipObjectDeep=Uc,l.zipWith=Wc,l.entries=il,l.entriesIn=ol,l.extend=tl,l.extendWith=dr,Li(l,l),l.add=$m,l.attempt=pl,l.camelCase=Yf,l.capitalize=al,l.ceil=Um,l.clamp=Uf,l.clone=kd,l.cloneDeep=Nd,l.cloneDeepWith=Hd,l.cloneWith=Md,l.conformsTo=Od,l.deburr=ll,l.defaultTo=xm,l.divide=Wm,l.endsWith=Kf,l.eq=Ye,l.escape=Vf,l.escapeRegExp=qf,l.every=ed,l.find=nd,l.findIndex=Ra,l.findKey=yf,l.findLast=rd,l.findLastIndex=Da,l.findLastKey=hf,l.floor=Gm,l.forEach=Oa,l.forEachRight=za,l.forIn=vf,l.forInRight=bf,l.forOwn=xf,l.forOwnRight=Sf,l.get=Ii,l.gt=zd,l.gte=$d,l.has=_f,l.hasIn=Ei,l.head=ka,l.identity=Ie,l.includes=sd,l.indexOf=rc,l.inRange=Wf,l.invoke=Ff,l.isArguments=At,l.isArray=N,l.isArrayBuffer=Ud,l.isArrayLike=we,l.isArrayLikeObject=oe,l.isBoolean=Wd,l.isBuffer=vt,l.isDate=Gd,l.isElement=Yd,l.isEmpty=Kd,l.isEqual=Vd,l.isEqualWith=qd,l.isError=wi,l.isFinite=Jd,l.isFunction=at,l.isInteger=qa,l.isLength=ur,l.isMap=Ja,l.isMatch=Xd,l.isMatchWith=Zd,l.isNaN=Qd,l.isNative=jd,l.isNil=tf,l.isNull=ef,l.isNumber=Xa,l.isObject=ne,l.isObjectLike=re,l.isPlainObject=mn,l.isRegExp=_i,l.isSafeInteger=nf,l.isSet=Za,l.isString=cr,l.isSymbol=Te,l.isTypedArray=Wt,l.isUndefined=rf,l.isWeakMap=of,l.isWeakSet=af,l.join=sc,l.kebabCase=Jf,l.last=He,l.lastIndexOf=pc,l.lowerCase=Xf,l.lowerFirst=Zf,l.lt=lf,l.lte=sf,l.max=Ym,l.maxBy=Km,l.mean=Vm,l.meanBy=qm,l.min=Jm,l.minBy=Xm,l.stubArray=Ri,l.stubFalse=Di,l.stubObject=km,l.stubString=Mm,l.stubTrue=Nm,l.multiply=Zm,l.nth=uc,l.noConflict=Fm,l.noop=Bi,l.now=lr,l.pad=Qf,l.padEnd=jf,l.padStart=em,l.parseInt=tm,l.random=Gf,l.reduce=fd,l.reduceRight=md,l.repeat=nm,l.replace=rm,l.result=Pf,l.round=Qm,l.runInContext=m,l.sample=yd,l.size=bd,l.snakeCase=im,l.some=xd,l.sortedIndex=hc,l.sortedIndexBy=vc,l.sortedIndexOf=bc,l.sortedLastIndex=xc,l.sortedLastIndexBy=Sc,l.sortedLastIndexOf=Cc,l.startCase=am,l.startsWith=lm,l.subtract=jm,l.sum=eg,l.sumBy=tg,l.template=sm,l.times=Hm,l.toFinite=lt,l.toInteger=H,l.toLength=ja,l.toLower=pm,l.toNumber=Oe,l.toSafeInteger=pf,l.toString=J,l.toUpper=um,l.trim=cm,l.trimEnd=dm,l.trimStart=fm,l.truncate=mm,l.unescape=gm,l.uniqueId=zm,l.upperCase=ym,l.upperFirst=Fi,l.each=Oa,l.eachRight=za,l.first=ka,Li(l,function(){var e={};return Je(l,function(t,r){Z.call(l.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),l.VERSION=d,De(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),De(["drop","take"],function(e,t){W.prototype[e]=function(r){r=r===i?1:pe(H(r),0);var o=this.__filtered__&&!t?new W(this):this.clone();return o.__filtered__?o.__takeCount__=me(r,o.__takeCount__):o.__views__.push({size:me(r,qe),type:e+(o.__dir__<0?"Right":"")}),o},W.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),De(["filter","map","takeWhile"],function(e,t){var r=t+1,o=r==Yt||r==bn;W.prototype[e]=function(a){var p=this.clone();return p.__iteratees__.push({iteratee:R(a,3),type:r}),p.__filtered__=p.__filtered__||o,p}}),De(["head","last"],function(e,t){var r="take"+(t?"Right":"");W.prototype[e]=function(){return this[r](1).value()[0]}}),De(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[r](1)}}),W.prototype.compact=function(){return this.filter(Ie)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=z(function(e,t){return typeof e=="function"?new W(this):this.map(function(r){return sn(r,e,t)})}),W.prototype.reject=function(e){return this.filter(pr(R(e)))},W.prototype.slice=function(e,t){e=H(e);var r=this;return r.__filtered__&&(e>0||t<0)?new W(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(t=H(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(qe)},Je(W.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=l[o?"take"+(t=="last"?"Right":""):t],p=o||/^find/.test(t);!a||(l.prototype[t]=function(){var c=this.__wrapped__,f=o?[1]:arguments,g=c instanceof W,S=f[0],C=g||N(c),w=function($){var G=a.apply(l,ct([$],f));return o&&F?G[0]:G};C&&r&&typeof S=="function"&&S.length!=1&&(g=C=!1);var F=this.__chain__,T=!!this.__actions__.length,D=p&&!F,O=g&&!T;if(!p&&C){c=O?c:new W(this);var P=e.apply(c,f);return P.__actions__.push({func:or,args:[w],thisArg:i}),new ke(P,F)}return D&&O?e.apply(this,f):(P=this.thru(w),D?o?P.value()[0]:P.value():P)})}),De(["pop","push","shift","sort","splice","unshift"],function(e){var t=Bn[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var p=this.value();return t.apply(N(p)?p:[],a)}return this[r](function(c){return t.apply(N(c)?c:[],a)})}}),Je(W.prototype,function(e,t){var r=l[t];if(r){var o=r.name+"";Z.call(Ht,o)||(Ht[o]=[]),Ht[o].push({name:t,func:r})}}),Ht[Qn(i,ie).name]=[{name:"wrapper",func:i}],W.prototype.clone=mp,W.prototype.reverse=gp,W.prototype.value=yp,l.prototype.at=Yc,l.prototype.chain=Kc,l.prototype.commit=Vc,l.prototype.next=qc,l.prototype.plant=Xc,l.prototype.reverse=Zc,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Qc,l.prototype.first=l.prototype.head,en&&(l.prototype[en]=Jc),l},kt=Vs();xt?((xt.exports=kt)._=kt,Tr._=kt):de._=kt}).call(commonjsGlobal)})(lodash,lodash.exports);var _=lodash.exports;const ComponentSchema={type:"object",properties:{type:{oneOf:[{title:"Masked Aadhar Card",const:"AadharcardText"},{title:"Array",const:"Array"},{title:"Button",const:"Button"},{title:"Data Card",const:"card"},{title:"Check Box",const:"CheckBox"},{title:"Container",const:"WrapperSection"},{title:"Data Grid",const:"DataGrid"},{title:"Date",const:"Date"},{title:"Time Stamp",const:"DateTime"},{title:"Download",const:"DownloadFile"},{title:"Empty Box",const:"EmptyBox"},{title:"File Handler",const:"FileInput"},{title:"Graph",const:"Graph"},{title:"Input Slider",const:"InputSlider"},{title:"Label",const:"Box"},{title:"Leaderboard",const:"LeaderBoard"},{title:"Multi-Select Dropdown",const:"MultipleSelect"},{title:"Pan Card Masked",const:"PanCardText"},{title:"Pop Up",const:"PopUp"},{title:"Progress Bar",const:"ProgressBar"},{title:"Progress Bar Card",const:"ProgressBarCard"},{title:"Dropdown",const:"Select"},{title:"Slider",const:"Slider"},{title:"Speedometer",const:"SpeedoMeter"},{title:"Stepper Container",const:"Stepper"},{title:"Radio",const:"Radio"},{title:"Rank",const:"Rank"},{title:"Rank Card",const:"RankCard"},{title:"Runner Boy",const:"RunnerBoyProgressBar"},{title:"Table",const:"Table"},{title:"Tabs",const:"TabSection"},{title:"Text",const:"Text"},{title:"Text Area",const:"TextArea"},{title:"Timer",const:"Timer"},{title:"Upload",const:"UploadFile"},{title:"Tree ",const:"TreeMap"},{title:"Column Group",const:"ColumnGroup"},{title:"Thought of the day",const:"Thought"},{title:"Pdf Viewer",const:"PdfViewer"}]},columnFormat:{oneOf:[{title:"Date Column",const:"date"},{title:"DateTime Column",const:"dateTime"},{title:"Amount Column",const:"amount"}]},orientation:{oneOf:[{title:"Horizontal",const:"horizontal"},{title:"Vertical",const:"vertical"}]},method:{type:"string",oneOf:[{title:"Get",const:"get"},{title:"Post",const:"post"},{title:"Delete",const:"delete"},{title:"Put",const:"put"}]},layout:{type:"array",items:{type:"object",properties:{key:{type:"string",oneOf:[{title:"Extra Small",const:"xs"},{title:"Small",const:"sm"},{title:"Medium",const:"md"},{title:"Large",const:"lg"}]},value:{}}}},cardLayout:{type:"array",items:{type:"object",properties:{key:{type:"string",oneOf:[{title:"Extra Small",const:"xs"},{title:"Small",const:"sm"},{title:"Medium",const:"md"},{title:"Large",const:"lg"}]},value:{}}}},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"}}}},Table_Download_Keys_Name:{type:"array",items:{type:"object",properties:{KeyName:{type:"string"}}}},sizeHolder:{type:"array",items:{type:"object",properties:{keyName:{type:"string"},value:{type:"string"}}}},enableColumnFilter:{type:"array",items:{type:"object",properties:{keyName:{type:"string"}}}},filteringOptions:{oneOf:[{const:"fuzzy",title:"Fuzzy"},{const:"contains",title:"Contain"},{const:"startsWith",title:"Starts with"},{const:"endsWith",title:"Ends with"},{const:"equals",title:"Equals"},{const:"notEquals",title:"Not Equals"},{const:"between",title:"Between"},{const:"betweenInclusive",title:"Between inclusive"},{const:"greaterThan",title:"Greater than"},{const:"greaterThanOrEqualTo",title:"Greater than or equal to"},{const:"lessThan",title:"Less than"},{const:"lessThanOrEqualTo",title:"Less than or equal to"}]},legendLabels:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}},pieArcColors:{type:"array",items:{type:"object",properties:{label:{type:"string"}}}},InputFormatingAndMasking:{type:"array",items:{type:"object",properties:{formatElement:{type:"string"}}}},validation:{type:"array",items:{type:"object",properties:{componentName:{type:"string"},validationType:{type:"string",oneOf:[{const:"required",title:"Required"},{const:"minLength",title:"Minimum Length"},{const:"maxLength",title:"Maximum Length"},{const:"pattern",title:"Pattern"}]},validationValue:{type:"string"}}}},buttonType:{type:"string",oneOf:[{title:"Button",const:"Button"},{title:"IconButton",const:"IconButton"},{title:"HybridButton",const:"ButtonWithIconAndText"}]},defaultStyle:{type:"string",oneOf:[{title:"Apply Default Style",const:"true"},{title:"No Style",const:"false"}]},graphType:{type:"string",oneOf:[{title:"Bar Graph",const:"BarGraph"},{title:"Stack Bar Graph",const:"StackBarGraph"},{title:"Line Graph",const:"LineGraph"},{title:"Pie Graph",const:"PieGraph"},{title:"Horizontal Bar Graph",const:"HorizontalBarGraph"},{title:"Stack Horizontal Bar Graph",const:"HorizontalStackBarGraph"}]},iconName:{type:"string",oneOf:[{title:"Search Icon",const:"SearchIcon"},{title:"Edit Icon",const:"EditIcon"},{title:"Add Icon",const:"AddIcon"},{title:"Send Icon",const:"SendIcon"},{title:"Approve Icon",const:"ApproveIcon"},{title:"RejectIcon",const:"RejectIcon"},{title:"Back Icon",const:"BackIcon"},{title:"Back Icon Second ",const:"BackIcon2"},{title:"Pending Icon",const:"PendingIcon"},{title:"View Icon",const:"ViewIcon"},{title:"Notification Icon",const:"NotificationIcon"},{title:"Person Icon",const:"PersonIcon"},{title:"Report Icon",const:"ReportIcon"},{title:"Error Icon",const:"ErrorIcon"},{title:"Refresh Icon",const:"RefreshIcon"},{title:"Download Icon",const:"DownloadIcon"},{title:"Exception Icon",const:"ExceptionIcon"}]},color:{type:"string",oneOf:[{title:"Primary",const:"primary"},{title:"Secondary",const:"secondary"},{title:"Error",const:"error"},{title:"Success",const:"success"},{title:"Info",const:"info"}]},pageName:{path:[]},name:{type:"string"},label:{type:"string"},RemoveItemButton:{disabled:!0}},required:["name"]},componentBasicUiSchema=n=>{var i;return{type:"HorizontalLayout",heading:"Page-Component",elements:[{type:"TabLayout",config:{main:{tabLabels:["Core"],id:"component"},style:{TabPanelStyle:{padding:0}},TabsStyle:{marginBottom:"3px",paddingBottom:"4px",boxShadow:"0px 3px 4px #afafaf80","& .MuiTabs-indicator":{bottom:"6px"}}},elements:[{type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Type"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:0,md:0,lg:0}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:"Component ID",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Label",options:[],color:"secondary",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:0,lg:3}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",options:{widget:"Array"},config:{layout:12,main:{label:"Layout",childElementLabel:"Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:0,sm:0,md:4,lg:4}},options:{widget:"EmptyBox"}}]}]}]},{type:"WrapperLayout",config:{main:{gap:"8px"}},elements:[{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Ok",variant:"contained",type:"text",onClick:"okHandler",size:"medium"}}},{type:"Control",scope:"#/properties/btnSubmit",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Save & Exit",variant:"contained",type:"text",onClick:"saveHandler",size:"medium"}}},{type:"Control",scope:"#/properties/EmptyBox",config:{layout:{xs:4,sm:7,md:8,lg:9}},options:{widget:"EmptyBox"}}]},{type:"Control",scope:"#/properties/popUpComponentSection",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Component ?"},style:{"&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteCompButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",variant:"contained",type:"text",onClick:"deletePopUpComponent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteCompButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteComponents",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/popUpEventSection",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText1",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Event ?"},style:{fontSize:"20px","&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",variant:"contained",type:"text",onClick:"deletePopUpEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/pageName",options:{widget:"Breadcrumb"},config:{layout:12,main:{},style:{paddingLeft:n.spacing(3),color:n.palette.grey[600],fontSize:"10px",position:"fixed",bottom:"24px",borderBottom:`1px solid ${n.palette.common.black}29`,borderTop:`1px solid ${n.palette.common.black}29`,backgroundColor:n.palette.background.default}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},{type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:10,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((i=n==null?void 0:n.palette)==null?void 0:i.text.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:0,width:"fit-content",left:"50%",position:"relative",margin:"revert",flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}}]}]}},CoreSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/type",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Type",type:"text"}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:0,md:0,lg:0}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/name",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:"Component ID",required:!0}}},{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Label",required:!0}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:0,lg:3}},options:{widget:"EmptyBox"}},{type:"Control",scope:"#/properties/layout",options:{widget:"Array"},config:{layout:12,main:{label:"Layout",childElementLabel:"Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},{type:"Control",scope:"#/properties/proc",config:{layout:{xs:0,sm:0,md:4,lg:4}},options:{widget:"EmptyBox"}}]}]},EventSection=n=>({type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"eventAddHandler",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Event",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event's Type",type:"string",size:300},{accessorKey:"Handler",header:"Handler",type:"string",size:200},{accessorKey:"Edit_Approve_Records",header:"Edit",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{size:"small",icon:"TableEditIcon",tooltipMessage:"Edit This Record",onClick:"eventEditHandler"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{accessorKey:"Reject_Records",header:"Delete",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",accessorKeyName:"Reject_Records",options:{widget:"IconButton"},config:{main:{icon:"Bin",tooltipMessage:"Reject This Record",onClick:"deletePopUpEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Event",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Copy_Event",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",tooltipMessage:"Reject This Record",styleDefault:!0}}}}]}]}),emptyBox$1=(n,s)=>s!==void 0?{type:"Control",scope:`#/properties/${n}`,options:{widget:"EmptyBox"},config:{layout:s}}:{type:"Control",scope:"#/properties/empty",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}},cardLayout={type:"Control",scope:"#/properties/cardLayout",options:{widget:"Array"},config:{layout:12,main:{label:"Card Layout",childElementLabel:"Card Layout"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Screen Size"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value",type:"number",helperText:"Number should be in range of 0 to 12",errorMessage:"Number Can't be greater than 12 and can't be less than 0."}}},emptyBox$1("cardEmpty")]},getArrayControl=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"Array"},config:{layout:12,main:{label:i,childElementLabel:i},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:`#/properties/${s}`,options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:i||"Labels for Tab"}}},emptyBox$1("ArrayControlEmpty1",{xs:6,sm:6,md:8,lg:8})]}),sizeHolder=getArrayControl("sizeHolder","keyName","Component Name");sizeHolder.elements[1]={type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Size"}}},sizeHolder.elements[2]=emptyBox$1("sizeHolderempty");const getInputField=(n,s)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:s}}}),getRadioInputField=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"RadioInputField"},config:{layout:{xs:12,sm:6,md:4,lg:3},main:{label:s,options:i}}}),buildWrapper=(n,s)=>({type:"WrapperLayout",config:{main:{label:n||"Details",isAccordion:!0}},elements:s||[]}),getTextArea=(n,s,i,d)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"TextArea"},config:{layout:d||12,main:{label:s,minRows:8,hideButton:i,enableCodeEditor:!0}}}),getSelectField=(n,s,i)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:s,type:"text"}}}),getMultiSelectField=(n,s)=>({type:"Control",scope:`#/properties/${n}`,options:{widget:"MultipleSelect"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{multiple:!0,label:s,options:[]}}}),BaseSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[]},buildPropertiesSection=function(n){let s=_.cloneDeep(BaseSection);switch(n){case"TreeMap":s.elements=[getSelectField("orientation","orientation"),getInputField("linkType","linkType"),getInputField("graphHeight","Graph Height"),getInputField("graphWidth","Graph Width"),getInputField("graphZoomHeight","Zoom Height"),emptyBox$1("TreeEmpty",{xs:6,sm:6,md:4,lg:4})];break;case"InputSlider":s.elements=[getInputField("max","Max Limit"),getInputField("step","Step"),getInputField("min","Min Limit"),emptyBox$1("InputSliderEmpty1",{xs:6,sm:0,md:0,lg:0}),getRadioInputField("limitToMax","Applly Max. Limit",["YES","NO"]),emptyBox$1("InputSliderEmpty2",{xs:0,sm:0,md:8,lg:8})];break;case"DataGrid":s.elements=[getRadioInputField("divider","Use Header divider",["YES","NO"]),getInputField("elevation","Card Elevation"),getInputField("height","Grid height"),getInputField("justifyContent","justifyContent"),emptyBox$1("DataGridEmpty1",{xs:6,sm:0,md:4,lg:4}),emptyBox$1("DataGridEmpty1",{xs:0,sm:0,md:4,lg:4}),cardLayout];break;case"Stepper":s.elements=[getRadioInputField("resetButton","Reset Button",["YES","NO"]),getRadioInputField("defaultButtonAvailable","Use Default Buttons ",["YES","NO"]),getInputField("resetText","Reset Text"),getInputField("completeText","Complete Text"),getSelectField("orientation","Orientation Type"),emptyBox$1("Stepper",{xs:6,sm:6,md:4,lg:4}),getArrayControl("sectionLabels","label")];break;case"PopUp":s.elements=[getRadioInputField("fullScreen","FullScreen",["YES","NO"]),getRadioInputField("fullWidth","FullWidth",["YES","NO"]),getInputField("maxWidth","Max. Width"),emptyBox$1("PopUpEmpty",{xs:6,sm:6,md:0,lg:0})];break;case"Text":s.elements=[getInputField("placeholder","Placeholder"),getRadioInputField("multiline","Multiline",["YES","NO"]),emptyBox$1("TextEmpty1",{xs:0,sm:0,md:4,lg:4}),getArrayControl("InputFormatingAndMasking","formatElement","Format Element")];break;case"TextArea":s.elements=[getInputField("placeholder","Placeholder"),getRadioInputField("enableCodeEditor","Enable Code Editor",["YES","NO"]),getInputField("codeEditorLanguage","Enter Code Language"),emptyBox$1("TextEmpty1",{xs:0,sm:0,md:0,lg:3})];break;case"SpeedoMeter":s.elements=[getInputField("segments","Segments Count"),getInputField("heading","Container Heading"),getInputField("heading","Container Heading"),getInputField("speedoCaption","Speedometer Caption"),getInputField("width","Speedometer Width"),emptyBox$1("SpeedoMeterEmpty1",{xs:6,sm:6,md:4,lg:4})];break;case"RankCard":s.elements=[getInputField("rank","Rank"),getInputField("height","Height"),emptyBox$1("RankCardEmpty1",{xs:0,sm:0,md:4,lg:4})];break;case"LeaderBoard":s.elements=[getInputField("firstImage","First Image url"),getInputField("secondImage","Second Image url"),getInputField("thirdImage","Third Image url"),getInputField("nameKey","Key for Name"),getInputField("imageKey","Key for Image"),getInputField("scoreKey","Key for comparing parameter"),emptyBox$1("LeaderBoardEmpty1",{xs:6,sm:6,md:0,lg:0})];break;case"CardSlider":s.elements=[getInputField("heading","Heading"),getInputField("iconName","Icon Name")];break;case"ProgressBar":case"ProgressBarCard":s.elements=[getInputField("heading","Heading"),getInputField("bottomLabel_1","First BottomLabel"),getInputField("bottomLabel_2","Second BottomLabel"),getInputField("bottomLabel_3","Third BottomLabel"),emptyBox$1("ProgressBarCardEmpty1"),emptyBox$1("ProgressBarCardEmpty2")];break;case"card":s.elements=[getInputField("url","Image Url"),getInputField("label","Label"),getInputField("titleIcon","Unicode of Icon for title"),getInputField("description","Description"),emptyBox$1("cardEmpty",{xs:0,sm:0,md:8,lg:8})];break;case"Button":s.elements=[getSelectField("buttonType","Button Type"),getSelectField("iconName","Icon Name"),getSelectField("color","Color"),getInputField("tooltipMessage","Tooltip Message"),getSelectField("defaultStyle","Default Style"),emptyBox$1("ButtonEmpty1",{xs:6,sm:6,md:4,lg:4})];break;case"Graph":s.elements=[getInputField("height","Height"),getInputField("heading","Heading"),getSelectField("graphType","Graph Type"),getInputField("leftLabel","Left Label"),getInputField("bottomLabel","Bottom Label"),emptyBox$1("GraphEmpty1",{xs:6,sm:0,md:0,lg:0}),getRadioInputField("legendHide","Legend Hide",["YES","No"]),getInputField("yAxisValue","Y-AxisValue"),getInputField("xAxisValue","X-AxisValue"),getRadioInputField("bottomAxisAngle","Bottom Axis Angled",["YES","No"]),getInputField("leftMargin","Left Margin"),emptyBox$1("GraphEmpty1",{xs:6,sm:0,md:8,lg:6}),getArrayControl("legendLabels","label"),getArrayControl("pieArcColors","color")];break;case"WrapperSection":s.elements=[getRadioInputField("divider","Divider",["YES","No"]),getRadioInputField("isAccordion","Accordion",["YES","No"]),getRadioInputField("defaultStyle","Default Style",["YES","No"]),getInputField("rowSpacing","Row Spacing"),emptyBox$1("WrapperSectionEmpty1",{xs:6,sm:0,md:4,lg:4}),emptyBox$1("WrapperSectionEmpty2")];break;case"TabSection":s.elements=[getRadioInputField("verticalOrientation","Vertical Orientation",["YES","NO"]),getRadioInputField("lazyLoad","Lazy Load",["YES","NO"]),emptyBox$1("TabEmpty"),getArrayControl("sectionLabels","label")];break;case"Table":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),getRadioInputField("SelectionAvailable","Row Selection",["YES","NO"]),getRadioInputField("ColumnResizingAvailable","ColumnResizing ",["YES","NO"]),getRadioInputField("DragAvailable","Row Dragging",["YES","NO"]),getRadioInputField("downloadAllData","Download All Data",["YES","NO"]),getRadioInputField("disableGlobalSearch","Disable Global Search",["YES","NO"]),getRadioInputField("disableColumnFilter","Disable Column Filter",["YES","NO"]),getRadioInputField("disableSorting","Disable Sorting",["YES","NO"]),getRadioInputField("disableEditColumn","Disable Edit Column",["YES","NO"]),getRadioInputField("disableFullScreenToggle","Disable Full Screen",["YES","NO"]),getRadioInputField("disableDensityToggle","Disable Density Toggle",["YES","NO"]),getRadioInputField("disableDownloadFile","Disable Download File",["YES","NO"]),getRadioInputField("disablePagination","Disable Pagination",["YES","NO"]),getInputField("selectKey","Selection Key"),getMultiSelectField("filteringOptions","Filtering Options"),buildWrapper("Tree Table Properties",[getRadioInputField("enableRowMovement","Row Rearrangement",["YES","NO"]),getRadioInputField("enableExpanding","Row Expanding",["YES","NO"]),getRadioInputField("paginateExpandedRows","Multi Page Expansion",["YES","NO"]),getRadioInputField("treeStructure","Flat Tree Structure",["YES","NO"]),emptyBox$1("LazyLoadingTableEmpty2"),emptyBox$1("LazyLoadingTableEmpty3")]),getArrayControl("Table_Download_Keys_Name","KeyName","Table Key Name"),sizeHolder,getArrayControl("enableColumnFilter","keyName","Component Name")];break;case"Radio":s.elements=[getArrayControl("sectionLabels","label","Options Of Radio")];break;case"Select":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),getRadioInputField("freeSolo","FreeSolo",["YES","NO"]),emptyBox$1("SelectEmpty")];break;case"MultipleSelect":s.elements=[getRadioInputField("lazyLoading","Lazy Loading",["YES","NO"]),emptyBox$1("MultipleSelectEmpty1",{xs:0,sm:6,md:4,lg:4}),emptyBox$1("MultipleSelectEmpty2")];break;case"Thought":s.elements=[getTextArea("thought","Today's thought",!1)];break}return s},StyleSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/style",options:{widget:"TextArea"},config:{layout:{xs:12,sm:12,md:12,lg:12},style:{"& .MuiFormLabel-root:not(.MuiInputLabel-shrink)":{}},main:{heading:"JSON Style",minRows:8,hideButton:!0}}}]},TableSection=n=>({type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/elements",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"widgetAddClickHandler",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Component",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"name",header:"Name",type:"string",size:300},{accessorKey:"type",header:"Type",type:"string",size:200},{header:"Edit Record",field:"Reject_Records",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"TableEditIcon",size:"small",onClick:"editComponents",tooltipMessage:"Reject This Record"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Delete",field:"Reject_Records",size:150,type:"action",widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"Bin",onClick:"deletePopUpComponent",tooltipMessage:"Reject This Record"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Component",size:150,type:"action",widget:{type:"Control",scope:"#/properties/Copy_Component",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",styleDefault:!0,disabled:!1}}}}]}]}),ValueTab={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/value",options:{widget:"Array"},config:{layout:12,main:{label:"Value",childElementLabel:"Value"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/label",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Label"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]}]},ValidationSection={type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/validation",options:{widget:"Array"},config:{layout:12,main:{label:"Validation",childElementLabel:"Validation"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/validationType",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Validation Type"}}},{type:"Control",scope:"#/properties/validationValue",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Validation Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]}]};var buildConfig=n=>{const s=_.cloneDeep(n);let i={};return s.pageName&&delete s.pageName,s.eventsSelected&&delete s.eventsSelected,(s.type==="Table"||s.type==="WrapperSection"||s.type==="TabSection")&&(i.elements=s.elements||[],s.elements&&delete s.elements),i.events=s.events||[],s.events&&delete s.events,i={...s,...i},i};const createLayoutFormat=n=>{if(_.isEmpty(n))return{xs:12,sm:12,md:12,lg:12};let s={xs:12,sm:12,md:6,lg:6};return n.map(i=>{s[i.key||"xs"]=+i.value||5.5}),s},flatObjectValueInArray=(n=[])=>{if(n.length<1)return;const s=Object.keys(n[0])[0];return n.map(d=>d[s])},clearFromSessionStorage=()=>{sessionStorage.removeItem("pageFormdata")},getNavigationHistory=(n,s)=>{if(s){let i=n.name;const d=s.split("."),y=[];return d.map((u,h)=>{if(h===0){y.push(u);return}y.push(`${y[h-1]}.${u}`)}),y.map(u=>{const h=_.get(n,u);h?i=i+` > ${(h==null?void 0:h.name)||(h==null?void 0:h.eventType)}`:i=i+" > NewComponent"}),{pageName:i}}},saveFormdataInSessionStorage=(n,s)=>{let i;if(s){const d=getFormdataFromSessionStorage();i=_.set(d,s,buildConfig(n))}else i=buildConfig(n);return sessionStorage.setItem("pageFormdata",JSON.stringify(i)),i},getFormdataFromSessionStorage=n=>{const s=sessionStorage.getItem("pageFormdata")?JSON.parse(sessionStorage.getItem("pageFormdata")):void 0;let i;return n&&(i=_.get(s,n),i={...i,...getNavigationHistory(s,n)}),i||(i=getNavigationHistory(s,n)),i||s};async function saveHandler(n,s,i){var u,h;(u=n.searchParams)==null||u.get("id");const d=(h=n.searchParams)==null?void 0:h.get("path");saveFormdataInSessionStorage(n.ctx.core.data,d);const y=JSON.parse(sessionStorage.getItem("pageFormdata"));if(_.isEmpty(n.ctx.core.errors))try{const b=await i(n,s,y);navigateHandler(n,!0,"/PageMasterRecords")}catch{navigateHandler(n,!1)}}const navigateHandler=(n,s,i)=>{s?(sessionStorage.removeItem("pageFormdata"),n.navigate(i||-1),n.setNotify({SuccessMessage:"Submit Successfully",Success:!0})):(n.setValidation("ValidateAndShow"),n.setNotify({Fail:!0,FailMessage:"Errors on Page"}))};function okHandler(n){var i;const s=(i=n.searchParams)==null?void 0:i.get("path");_.isEmpty(n.ctx.core.errors)?(saveFormdataInSessionStorage(n.ctx.core.data,s),n.navigate(-1),n.setNotify({SuccessMessage:"Save Successfully",Success:!0})):(n.setValidation("ValidateAndShow"),n.setNotify({Fail:!0,FailMessage:"Errors on Page"}))}const sectionLabels={Select:["Core","Properties","Value","Events","Style","Validation"],MultipleSelect:["Core","Properties","Value","Events","Style","Validation"],Table:["Core","Components","Properties","Events","Style","Validation"],LeaderBoard:["Core","Components","Properties","Events","Style","Validation"],WrapperSection:["Core","Components","Properties","Style","Validation"],TabSection:["Core","Components","Properties","Style","Validation"],SpeedoMeter:["Core","Properties","Events","Style","Validation"],card:["Core","Properties","Events","Style","Validation"],UploadFile:["Core","Events","Style","Validation"],Graph:["Core","Properties","Events","Style","Validation"],DownloadFile:["Core","Events","Style","Validation"],Box:["Core","Events","Style","Validation"],Properties:["Core","Properties","Events","Style","Validation"],ProgressBarCard:["Core","Properties","Events","Style","Validation"],RankCard:["Core","Properties","Events","Style","Validation"],Slider:["Core","Components","Events","Style","Validation"],Timer:["Core","Events","Style","Validation"],Rank:["Core","Events","Style","Validation"],Button:["Core","Properties","Events","Style","Validation"],Array:["Core","Components","Validation"],Radio:["Core","Properties","Events","Style","Validation"],Text:["Core","Properties","Events","Style","Validation"],TextArea:["Core","Properties","Events","Style","Validation"],PopUp:["Core","Components","Properties","Style"],Stepper:["Core","Components","Properties","Events","Style"],DataGrid:["Core","Components","Properties","Events","Style"],InputSlider:["Core","Properties","Events","Style","Validation"],TreeMap:["Core","Components","Properties","Events","Style"],ColumnGroup:["Core","Components"],Thought:["Core","Properties","Events","Style","Validation"]};function refreshPage(n,s){var I,E;const i=_.cloneDeep(componentBasicUiSchema(s.theme.myTheme)),d=JSON.parse(sessionStorage.getItem("pageFormdata"));if(n){const B={Core:CoreSection,Value:ValueTab,Style:StyleSection,Events:EventSection(s.theme.myTheme),Components:TableSection(s.theme.myTheme),Properties:buildPropertiesSection(n),Validation:ValidationSection},L=(I=sectionLabels[n])==null?void 0:I.map(Y=>B[Y]);i.elements[0].config.main.tabLabels=sectionLabels[n]||["Core","Style","Events","Validation"],i.elements[0].elements=L||[CoreSection,StyleSection,EventSection(s.theme.myTheme),ValidationSection]}const y=(E=s.searchParams)==null?void 0:E.get("path"),u=y.lastIndexOf("."),h=y.slice(0,u),b=_.get(d,h);(b==null?void 0:b.type)==="Table"&&(i.elements[0].elements[0].elements[4]={type:"Control",scope:"#/properties/columnFormat",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Column Format"}}},i.elements[0].elements[0].elements[6]={type:"Control",scope:"#/properties/filteringOptions",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Filter Mode",multiple:!0}}},i.elements[0].elements[0].elements[5]={type:"Control",scope:"#/properties/enableFilter",options:{widget:"RadioInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Enable Filter",options:["Yes","No"]}}},i.elements[0].elements[0].elements[7]={type:"Control",scope:"#/properties/enableSorting",options:{widget:"RadioInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Enable Sorting",options:["Yes","No"]}}},i.elements[0].elements[0].elements[8]={type:"Control",scope:"#/properties/proc",config:{layout:{xs:6,sm:6,md:8,lg:3}},options:{widget:"EmptyBox"}}),sessionStorage.getItem("copiedConfig")&&this.ElementPathSetter(i),s.setUiSchema(i)}var Component=(n,s,i,d)=>({setPage:async function(){const y=await this.getFormdata();n.setFormdata(y);const u=this.getSchema();n.setSchema(u),this.refreshPage(y==null?void 0:y.type,n)},refreshPage,getFormdata:function(){var u;const y=(u=n.searchParams)==null?void 0:u.get("path");return getFormdataFromSessionStorage(y)},getSchema:function(){var E,B,L;const y=_.cloneDeep(ComponentSchema);sessionStorage.getItem("copiedConfig")&&(y.properties.RemoveItemButton.disabled=!1);const u=JSON.parse(sessionStorage.getItem("pageFormdata")),h=(E=n.searchParams)==null?void 0:E.get("path"),b=(B=n.searchParams)==null?void 0:B.get("id");let I=[{label:(L=u.name)!=null?L:"NewPage",path:`/PageMaster${b?`?id=${b}`:""}`}];if(h){const Y=h.split("."),k=[];Y.map((X,K)=>{if(K===0){k.push(X);return}k.push(`${k[K-1]}.${X}`)}),k.map(X=>{const K=_.get(u,X);I.push({label:(K==null?void 0:K.name)||(K==null?void 0:K.eventType)||"NewComponent",path:`/Component?path=${X}${b?`&id=${b}`:""}`})})}return y.properties.pageName.path=I,y},okHandler:()=>okHandler(n),saveHandler:async()=>await saveHandler(n,d,i),onChange:function(){var y,u,h,b;((y=n==null?void 0:n.formData)==null?void 0:y.type)!==((u=n==null?void 0:n.newData)==null?void 0:u.type)&&((h=n==null?void 0:n.newData)==null?void 0:h.type)!==void 0&&this.refreshPage((b=n==null?void 0:n.newData)==null?void 0:b.type,n)},editComponents:function(){var b,I,E;const y=s.path.split(".")[1],u=(b=n.searchParams)==null?void 0:b.get("path"),h=(I=n.searchParams)==null?void 0:I.get("id");if(saveFormdataInSessionStorage(n.ctx.core.data,u),u){const L=`${(E=n.searchParams)==null?void 0:E.get("path")}.elements[${y}]`;n.searchParams.set("path",L),n.setSearchParams(n.searchParams),this.setPage()}else n.navigate(`/Component?path=${`elements[${y}]`}&id=${h}`)},deleteComponents:function(y=!0){var E;const u=(E=n.searchParams)==null?void 0:E.get("path"),h=sessionStorage.getItem("rowId");n.formData.elements.splice(h,1);const b=saveFormdataInSessionStorage(n.ctx.core.data,u),I=u?_.get(b,u):b;n.setFormdata(I),y&&n.updateDialog("popUpComponentSection"),sessionStorage.removeItem("rowId")},deleteEvent:function(y=!0){var I;const u=(I=n.searchParams)==null?void 0:I.get("path"),h=sessionStorage.getItem("rowId");n.formData.events.splice(h,1);const b=saveFormdataInSessionStorage(n.ctx.core.data,u);n.setFormdata(_.get(b,u)),y&&n.updateDialog("popUpEventSection"),sessionStorage.removeItem("rowId")},widgetAddClickHandler:function(){var h;Array.isArray(n.formData.elements)||(n.formData.elements=[]);const y=(h=n.searchParams)==null?void 0:h.get("path");saveFormdataInSessionStorage(n.ctx.core.data,y);const u=`${y}.elements[${n.formData.elements.length}]`;n.searchParams.set("path",u),n.setSearchParams(n.searchParams),this.setPage()},eventEditHandler:function(){var I,E;const y=s.path.split(".")[1],u=(I=n.searchParams)==null?void 0:I.get("path"),h=(E=n.searchParams)==null?void 0:E.get("id");saveFormdataInSessionStorage(n.ctx.core.data,u);const b=`${u}.events[${y}]`;n.navigate(`/ComponentEvents?path=${b}&id=${h}`)},eventAddHandler:function(){var b,I;const y=(b=n.searchParams)==null?void 0:b.get("path"),u=(I=n.searchParams)==null?void 0:I.get("id");Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,y);const h=`${y}.events[${n.formData.events.length}]`;n.navigate(`/ComponentEvents?path=${h}&id=${u}`)},backHandler:function(){n.navigate(-1)},deletePopUpComponent:function(){const y=s.path.split(".")[1];sessionStorage.setItem("rowId",y),n.updateDialog("popUpComponentSection")},deletePopUpEvent:function(){const y=s.path.split(".")[1];sessionStorage.setItem("rowId",y),n.updateDialog("popUpEventSection")},copyPasteElement:function(y,u=this.setPage.bind(this)){var I;const[h,b]=(I=s.path.split(".").pop())==null?void 0:I.split("_");h==="Copy"?this.CopyElement(y,b):this.PasteElement(u,b)},CopyElement:function(y=n,u){var Y;const h=lodash.exports.cloneDeep(y.schema),b=lodash.exports.cloneDeep(y.uiSchema);h.properties.RemoveItemButton.disabled=!1;const I=s.path.split(".")[1],E=(Y=n.searchParams)==null?void 0:Y.get("path"),B=this.elementPathHandler(E,I,u),L=getFormdataFromSessionStorage(B);this.ElementPathSetter(b,L),sessionStorage.setItem("copiedConfig",JSON.stringify(L)),n.setNotify({SuccessMessage:`Copied ${u} successfully`,Success:!0}),n.setSchema(h),n.setUiSchema(b)},PasteElement:function(y,u){var Y;if(!sessionStorage.getItem("copiedConfig")){n.setNotify({FailMessage:"No item has been copied.",Fail:!0});return}const h=(Y=n.searchParams)==null?void 0:Y.get("path");Array.isArray(n.formData.elements)||(n.formData.elements=[]),Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,h);const b=getFormdataFromSessionStorage(h),I=u==="Component"?b.elements.length:b.events.length,E=this.elementPathHandler(h,I,u),B=JSON.parse(sessionStorage.getItem("copiedConfig")),L={Events:" The Events cannot be integrated into the component section.",Component:"The component cannot be integrated into the Events section."};B.Handler&&u==="Component"?n.setNotify({FailMessage:L.Events,Fail:!0}):B.name&&u==="Events"?n.setNotify({FailMessage:L.Component,Fail:!0}):(saveFormdataInSessionStorage(B,E),y())},RemoveItemButton:function(y=n){const u=lodash.exports.cloneDeep(y.schema),h=lodash.exports.cloneDeep(y.uiSchema);u.properties.RemoveItemButton.disabled=!0,h.elements[2].elements[1].config.main.heading="No element copied",sessionStorage.removeItem("copiedConfig"),n.setSchema(u),n.setUiSchema(h)},elementPathHandler:function(y,u,h){return h==="Component"?y?`${y}.elements[${u}]`:`elements[${u}]`:y?`${y}.events[${u}]`:`events[${u}]`},ElementPathSetter:function(y,u){var b,I,E,B,L,Y,k,X,K,U,ie,ue,V,ye,le,he,ve,ze,Qe,Ve,gn,yn,hn,Yt,vn,bn;const h=u||JSON.parse(sessionStorage.getItem("copiedConfig"));(Y=(L=(B=(E=(I=(b=y==null?void 0:y.elements)==null?void 0:b[1])==null?void 0:I.elements)==null?void 0:E[0])==null?void 0:B.config)==null?void 0:L.main)!=null&&Y.headerIcons?y.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.name}`:(ye=(V=(ue=(ie=(U=(K=(X=(k=y==null?void 0:y.elements)==null?void 0:k[0])==null?void 0:X.elements)==null?void 0:K[1])==null?void 0:U.elements)==null?void 0:ie[0])==null?void 0:ue.config)==null?void 0:V.main)!=null&&ye.headerIcons&&(y.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.name}`),(Ve=(Qe=(ze=(ve=(he=(le=y==null?void 0:y.elements)==null?void 0:le[1])==null?void 0:he.elements)==null?void 0:ve[1])==null?void 0:ze.config)==null?void 0:Qe.main)!=null&&Ve.headerIcons?y.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Event: ${h.eventType}`:(bn=(vn=(Yt=(hn=(yn=(gn=y==null?void 0:y.elements)==null?void 0:gn[0])==null?void 0:yn.elements)==null?void 0:hn[1])==null?void 0:Yt.config)==null?void 0:vn.main)!=null&&bn.headerIcons&&(y.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage=`Copied Component: ${h.eventType}`)}}),pageMaster=n=>{const{store:s,dynamicData:i,submitHandler:d,service:y}=n;return{setPage:async function(){const u=await this.getFormdata();s.setFormdata(u);const h=await this.getUiSchema(),b=await this.getSchema();s.setSchema(b),s.setUiSchema(h)},getFormdata:async function(){var I;const u=(I=s.searchParams)==null?void 0:I.get("id"),h=await n.pageConfigProvider(u),b=getFormdataFromSessionStorage();return b||(saveFormdataInSessionStorage(h),h)},getUiSchema:function(){const u=_.cloneDeep(PageMasterUiSchema(s.theme.myTheme));return sessionStorage.getItem("copiedConfig")&&Component(s,i,d,y).ElementPathSetter(u),u},getSchema:()=>{const u=_.cloneDeep(PageMasterSchema);return sessionStorage.getItem("copiedConfig")&&(u.properties.RemoveItemButton.disabled=!1),u},backHandler:()=>{sessionStorage.removeItem("pageFormdata"),s.navigate("/PageMasterRecords")},onAddClickHandler:function(){var b;const u=(b=s.searchParams)==null?void 0:b.get("id");Array.isArray(s.formData.elements)||(s.formData.elements=[]);const h=saveFormdataInSessionStorage(s.ctx.core.data);u?s.navigate(`/Component?path=${`elements[${h==null?void 0:h.elements.length}]`}&id=${u}`):s.navigate(`/Component?path=${`elements[${h==null?void 0:h.elements.length}]`}`)},saveHandler:async()=>await saveHandler(s,y,d),Edit_Components:Component(s,i,d,y).editComponents,Delete_Components:async function(){await Component(s,i,d,y).deleteComponents(!1),s.updateDialog("popUpPageMasterComponent")},eventAddHandler:function(){var b;const u=(b=s.searchParams)==null?void 0:b.get("id");Array.isArray(s.formData.events)||(s.formData.events=[]),saveFormdataInSessionStorage(s.ctx.core.data);const h=`events[${s.formData.events.length}]`;s.navigate(`/ComponentEvents?path=${h}&id=${u}`)},editEvent:function(){var I;const u=i.path.split(".")[1],h=(I=s.searchParams)==null?void 0:I.get("id");saveFormdataInSessionStorage(s.ctx.core.data);const b=`events[${u}]`;s.navigate(`/ComponentEvents?path=${b}&id=${h}`)},deleteEvent:function(){const u=sessionStorage.getItem("rowId");s.formData.events.splice(u,1);const h=saveFormdataInSessionStorage(s.ctx.core.data);s.setFormdata(h),s.updateDialog("popUpPageMasterEvent"),sessionStorage.removeItem("rowId")},deletePopUpComponent:function(){const u=i.path.split(".")[1];sessionStorage.setItem("rowId",u),s.updateDialog("popUpPageMasterComponent")},deletePopUpEvent:function(){const u=i.path.split(".")[1];sessionStorage.setItem("rowId",u),s.updateDialog("popUpPageMasterEvent")},copyPasteElement:function(){Component(s,i,d,y).copyPasteElement(s,this.setPage.bind(this))},RemoveItemButton:function(){Component(s,i,d,y).RemoveItemButton(s)}}};const EventSchema={type:"object",properties:{headers:{type:"array",items:{type:"object",properties:{headers_key:{type:"string"},headers_value:{type:"string"}}}},method:{type:"string",oneOf:[{title:"Get",const:"get"},{title:"Post",const:"post"},{title:"Delete",const:"delete"},{title:"Put",const:"put"}]},refreshElements:{type:"array",items:{type:"object",properties:{value:{type:"string"}}}},eventType:{type:"string",oneOf:[{title:"Click",const:"onClick"},{title:"Load",const:"onLoad"},{title:"Change",const:"onChange"},{title:"Mount",const:"onMount"},{title:"Success",const:"Success"},{title:"Start",const:"onStart"},{title:"Cell Render",const:"onCellRenderer"},{title:"Upload",const:"onUpload"},{title:"Back",const:"onBack"},{title:"Next",const:"onNext"},{title:"Row Movement",const:"onRowMovement"},{title:"Download",const:"onDownload"},{title:"Fail",const:"Fail"}]},Handler:{type:"string",oneOf:[{title:"Custom",const:"custom"},{title:"API",const:"api"},{title:"Inbuilt Function",const:"inBuiltFunction"},{title:"Refresh",const:"refresh"}]},inBuiltFunctionType:{type:"string",oneOf:[{title:"RankProvider",const:"RankProvider"},{title:"Download File",const:"downloadFile"},{title:"Download",const:"download"}]},body:{type:"array",items:{type:"object",properties:{body_key:{type:"string"},body_value:{type:"string"}}}},RemoveItemButton:{disabled:!0},pageName:{path:[{label:"defaultLabel",path:"defaultPath"}]}},required:["eventType","Handler"]},EventUiSchema=n=>{var i;return{type:"HorizontalLayout",heading:"Page-Events",elements:[{type:"TabLayout",config:{main:{tabLabels:["Core","Response Events"],id:"event"},style:{TabPanelStyle:{padding:0}},TabsStyle:{marginBottom:"3px",paddingBottom:"4px",boxShadow:"0px 3px 4px #afafaf80","& .MuiTabs-indicator":{bottom:"6px"}}},elements:[{type:"WrapperLayout",config:{main:{label:" ",gap:"8px"}},elements:[{type:"Control",scope:"#/properties/eventType",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Event's Type",type:"text"}}},getSelectField("Handler","Handler"),{type:"Control",scope:"#/properties/EmptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:6}}}]},{type:"Control",scope:"#/properties/events",options:{widget:"Table"},config:{main:{headerIcons:{elements:[{widget:{type:"Control",scope:"#/properties/New_Record",options:{widget:"IconButton"},config:{main:{onClick:"addEvent",size:"small",icon:"TableAddIcon",iconLabel:"Add",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}},{widget:{type:"Control",scope:"#/properties/Paste_Event",options:{widget:"IconButton"},config:{main:{onClick:"copyPasteElement",size:"small",icon:"TablePaste",iconLabel:"Paste",styleDefault:!0},style:{mt:"6px",color:"inherit",fill:"inherit","&:hover":{color:"inherit",fill:"inherit"}}}}}]},disableAction:!0,disableSelection:!0,enableDrag:!0}},elements:[{accessorKey:"eventType",header:"Event's Type",size:300,type:"string"},{accessorKey:"Handler",header:"Handler",size:200,type:"string"},{accessorKey:"Edit_Approve_Records",header:"Edit",type:"action",size:150,widget:{type:"Control",scope:"#/properties/Edit_Records",options:{widget:"IconButton"},config:{main:{size:"small",icon:"TableEditIcon",tooltipMessage:"Edit This Record",onClick:"editEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{accessorKey:"Reject_Records",header:"Delete",type:"action",size:150,widget:{type:"Control",scope:"#/properties/RejectButton",options:{widget:"IconButton"},config:{main:{icon:"Bin",tooltipMessage:"Reject This Record",onClick:"deletePopUpEvent"},style:{fill:n.palette.primary.main,"& :hover":{fill:n.palette.primary.dark}}}}},{header:"Copy",field:"Copy_Event",type:"action",size:150,widget:{type:"Control",scope:"#/properties/Copy_Event",options:{widget:"IconButton"},config:{main:{icon:"FileCopyIcon",onClick:"copyPasteElement",styleDefault:!0}}}}]}]},{type:"WrapperLayout",config:{main:{gap:"8px"}},elements:[{type:"Control",scope:"#/properties/btn",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Ok",variant:"contained",type:"text",onClick:"okHandler",size:"medium"}}},{type:"Control",scope:"#/properties/btnSubmit",options:{widget:"Button"},config:{layout:{xs:4,sm:2.5,md:2,lg:1.5},main:{name:"Save & Exit",variant:"contained",type:"text",onClick:"saveHandler",size:"medium"}}},{type:"Control",scope:"#/properties/EmptyBox",config:{layout:{xs:4,sm:7,md:8,lg:9}},options:{widget:"EmptyBox"}}]},{type:"Control",scope:"#/properties/popUpEvent",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"WARNING!"},style:{}},elements:[{type:"Control",scope:"#/properties/popupText",options:{widget:"Box"},config:{layout:11,main:{heading:"Are you sure you want to delete this Event ?"},style:{fontSize:"20px","&.MuiTypography-root":{padding:"0px 20px",textAlign:"center",lineHeight:"1.2",fontWeight:"normal",fontSize:"18px",marginBottom:n.spacing(5)}}}},{type:"WrapperLayout",config:{layout:11,main:{}},elements:[{type:"Control",scope:"#/properties/CancelDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"No",startIcon:"ApproveIcon",variant:"contained",type:"text",onClick:"deletePopUpEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,left:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.primary.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,borderRight:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,boxShadow:"none"}}}},{type:"Control",scope:"#/properties/ConfirmDeleteEventButton",options:{widget:"Button"},config:{layout:6,main:{name:"Yes",variant:"contained",color:"error",type:"text",onClick:"deleteEvent",size:"large"},style:{position:"absolute",padding:"8px 0px",fontSize:"16px",bottom:0,right:0,width:"50%",borderRadius:0,boxShadow:0,backgroundColor:"transparent",color:n.palette.error.main,borderTop:`0.5px solid ${n.palette.grey[600]}`,"&:hover":{color:n.palette.error.contrastText,backgroundColor:n.palette.error.main,boxShadow:"none"}}}}]}]},{type:"Control",scope:"#/properties/pageName",options:{widget:"Breadcrumb"},config:{layout:12,main:{},style:{paddingLeft:n.spacing(3),color:n.palette.grey[600],fontSize:"10px",position:"fixed",bottom:"24px",borderBottom:`1px solid ${n.palette.common.black}29`,borderTop:`1px solid ${n.palette.common.black}29`,backgroundColor:n.palette.background.default}}},{type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6},{type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:10,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((i=n==null?void 0:n.palette)==null?void 0:i.text.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:0,width:"fit-content",left:"50%",position:"relative",margin:"revert",flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}}]}]}},APISection={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/method",options:{widget:"SelectInputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Method",type:"text"}}},{type:"Control",scope:"#/properties/path",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:3},main:{label:"Path",type:"text",multiple:!1,options:[]}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:6}}},{type:"Control",scope:"#/properties/headers",options:{widget:"Array"},config:{layout:12,main:{label:"Headers",childElementLabel:"Headers"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]},{type:"Control",scope:"#/properties/body",options:{widget:"Array"},config:{layout:12,main:{label:"Body",childElementLabel:"Body"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/key",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Key"}}},{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:0,md:4,lg:4}}}]},getTextArea("apiBody","Transformer",!0,12)]},refreshSectionUiSchema={type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/refreshElements",options:{widget:"Array"},config:{layout:12,main:{label:"Refresh Elements",childElementLabel:"Refresh Elements"},style:{marginLeft:"-24px",marginBottom:"24px !important",labelStyle:{marginLeft:"24px"},detailsStyle:{marginLeft:"24px"}}},elements:[{type:"Control",scope:"#/properties/value",options:{widget:"InputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"Value"}}},{type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:8,lg:8},main:{}}}]}]};var event=(n,s,i,d,y)=>({setPage:async function(){const u=await this.getFormData();n.setFormdata(u);const h=await this.getSchema();console.log("SettingSchema>>",h),n.setSchema(h),this.refreshPage(u.Handler,n)},refreshPage:(u,h)=>{var k,X,K;const b=_.cloneDeep(EventUiSchema(h.theme.myTheme)),I=_.cloneDeep(EventSchema);u&&(u==="custom"?(b.elements[0].elements[0].elements[2]=getRadioInputField("isSync","Run in Sync",["Yes","No"]),b.elements[0].elements[0].elements[3]={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:0,lg:3},main:{},style:{}}},b.elements[0].elements[0].elements[4]=getTextArea("eventCode","Write Custom Code",!1),I.required=["eventType","Handler","eventCode"]):u==="api"?(b.elements[0].elements[0].elements[2]=emptyBox$1("emptyBox",{xs:0,sm:0,md:4,lg:6}),b.elements[0].elements[0].elements[3]=APISection,I.required=["eventType","Handler","method","path"]):u==="inBuiltFunction"?(b.elements[0].elements[0].elements[2]=getSelectField("inBuiltFunctionType","Function Name"),b.elements[0].elements[0].elements[3]={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:6,sm:6,md:0,lg:3},main:{},style:{}}},b.elements[0].elements[0].elements[4]=getTextArea("funcParametersCode","Write Custom Code for Functions Parameter",!0),I.required=["eventType","Handler","inBuiltFunctionType"]):u==="refresh"&&(b.elements[0].elements[0].elements[2]=emptyBox$1("emptyBox",{xs:0,sm:0,md:4,lg:6}),b.elements[0].elements[0].elements[3]=refreshSectionUiSchema,I.properties.refreshElements.required=["value"],I.properties.refreshElements.items.required=["value"],I.required=["eventType","Handler","refreshElements"])),y&&(I.properties.inBuiltFunctionType.oneOf=[...I.properties.inBuiltFunctionType.oneOf,...y]),sessionStorage.getItem("copiedConfig")&&(Component(h,s,i,d).ElementPathSetter(b),I.properties.RemoveItemButton.disabled=!1);const E=JSON.parse(sessionStorage.getItem("pageFormdata")),B=(k=h.searchParams)==null?void 0:k.get("path"),L=(X=h.searchParams)==null?void 0:X.get("id");let Y=[{label:(K=E.name)!=null?K:"NewPage",path:`/PageMaster${L?`?id=${L}`:""}`}];if(B){const U=B.split("."),ie=[];U.map((ue,V)=>{if(V===0){ie.push(ue);return}ie.push(`${ie[V-1]}.${ue}`)}),ie.map(ue=>{const V=_.get(E,ue);Y.push({label:(V==null?void 0:V.name)||(V==null?void 0:V.eventType)||"NewComponent",path:V!=null&&V.eventType?`/ComponentEvents?path=${ue}${L?`&id=${L}`:""}`:`/Component?path=${ue}${L?`&id=${L}`:""}`})})}I.properties.pageName.path=Y,h.setSchema(I),h.setUiSchema(b)},getFormData:Component(n,s,i,d).getFormdata,getUiSchema:function(){return EventUiSchema},getSchema:()=>{var B,L,Y;const u=_.cloneDeep(EventSchema);sessionStorage.getItem("copiedConfig")&&(u.properties.RemoveItemButton.disabled=!1);const h=JSON.parse(sessionStorage.getItem("pageFormdata")),b=(B=n.searchParams)==null?void 0:B.get("path"),I=(L=n.searchParams)==null?void 0:L.get("id");let E=[{label:(Y=h.name)!=null?Y:"NewPage",path:`/PageMaster${I?`?id=${I}`:""}`}];if(b){const k=b.split("."),X=[];k.map((K,U)=>{if(U===0){X.push(K);return}X.push(`${X[U-1]}.${K}`)}),X.map(K=>{const U=_.get(h,K);E.push({label:(U==null?void 0:U.name)||(U==null?void 0:U.eventType)||"NewComponent",path:U!=null&&U.eventType?`/ComponentEvents?path=${K}${I?`&id=${I}`:""}`:`/Component?path=${K}${I?`&id=${I}`:""}`})})}return u.properties.pageName.path=_.cloneDeep(E),u},okHandler:()=>okHandler(n),saveHandler:async()=>await saveHandler(n,d,i),onChange:function(){var u,h,b;((u=n==null?void 0:n.formData)==null?void 0:u.Handler)!==((h=n==null?void 0:n.newData)==null?void 0:h.Handler)&&((b=n==null?void 0:n.newData)==null?void 0:b.Handler)!==void 0&&this.refreshPage(n.newData.Handler||n.formdata.Handler,n)},addEvent:function(){var b,I,E;const u=(b=n.searchParams)==null?void 0:b.get("path");Array.isArray(n.formData.events)||(n.formData.events=[]),saveFormdataInSessionStorage(n.ctx.core.data,u);const h=`${u}.events[${(E=(I=n.formData)==null?void 0:I.events)==null?void 0:E.length}]`;n.searchParams.set("path",h),n.setSearchParams(n.searchParams),this.setPage()},editEvent:function(){var I;const u=s.path.split(".")[1],h=(I=n.searchParams)==null?void 0:I.get("path");saveFormdataInSessionStorage(n.ctx.core.data,h);const b=`${h}.events[${u}]`;n.searchParams.set("path",b),n.setSearchParams(n.searchParams),this.setPage()},deleteEvent:async function(){await Component(n,s,i,d).deleteEvent(!1),n.updateDialog("popUpEvent")},backHandler:function(){n.navigate(-1)},deletePopUpEvent:function(){const u=s.path.split(".")[1];sessionStorage.setItem("rowId",u),n.updateDialog("popUpEvent")},copyPasteElement:function(){Component(n,s,i,d).copyPasteElement(n,this.setPage.bind(this))},RemoveItemButton:function(){Component(n,s,i,d).RemoveItemButton(n)}});const downloadFile$1=n=>{const s=n.name.split("."),i=n.data,d=window.atob(i);let y;y=new File([d],s[s.length-1]);const u=URL.createObjectURL(y),h=document.createElement("a");h.href=s[s.length-1]==="pdf"?"data:application/octet-stream;base64,"+i:u,h.download=`${n.name}`,document.body.appendChild(h),h.click(),URL.revokeObjectURL(u),document.body.removeChild(h)},doDownload=(n,s)=>{let i=`${s.defaults.baseURL}/${n.path}`;n!=null&&n.params&&Object.keys(n==null?void 0:n.params).map((u,h)=>{i=i+`${h===0?"?":"&"}${u}=${n==null?void 0:n.params[u]}`});const d=document.createElement("a");d.href=i,document.body.appendChild(d),d.click(),d.parentNode.removeChild(d)},executeEvents=n=>{var y,u,h;let s=[],i=null;if(n.config.isSync!=="Yes")return shouldEventExecute(n).then(b=>{if(!b)throw new Error("onStart Event not allow to run Parent Events");return executeEventsHandler(n)}).then(b=>{var E;i=b,s=(E=n.config)==null?void 0:E.events.filter(B=>B.eventType==="Success")}).catch(b=>{var B,L;const I=(L=(B=n.config)==null?void 0:B.events)==null?void 0:L.filter(Y=>Y.eventType==="Fail");s=(I==null?void 0:I.length)>0?I:[]}).then(()=>{if((s==null?void 0:s.length)>0)return s.reduce((b,I)=>b.then(()=>executeEvents({...n,config:I,parentEventOutput:i})),Promise.resolve())}).then(()=>i);if(!shouldEventExecute(n))return{response:void 0,events:void 0};try{i=executeEventsHandler(n),s=(y=n.config)==null?void 0:y.events.filter(E=>E.eventType==="Success")}catch{const b=(h=(u=n.config)==null?void 0:u.events)==null?void 0:h.filter(E=>E.eventType==="Fail");s=(b==null?void 0:b.length)>0?b:[]}if((s==null?void 0:s.length)>0)for(const b of s)executeEvents({...n,config:b,parentEventOutput:i});return i};function executeEventsHandler(n){var s,i,d;if(n.config.Handler==="api")return executeApiRequest(n);if(n.config.Handler==="inBuiltFunction")return executeInBuiltFunctionHandler(n);if(n.config.Handler==="custom")return executeCustomHandler(n);if(n.config.Handler==="refresh")return executeRefreshHandler(n);if(n.config.Handler==="mergeFormdata")return mergeFormdata(n.parentEventOutput,n.componentName,n.config,n.store,n.service,n.formDataHolder);if(n.config.Handler==="onBackHandler")return(s=n.store.functionParameters)==null?void 0:s.handleBack();if(n.config.Handler==="onNextHandler")return(i=n.store.functionParameters)==null?void 0:i.handleNext();if(n.config.Handler==="onResetHandler")return(d=n.store.functionParameters)==null?void 0:d.handleReset()}function getRefreshElements(n,s){var d;let i=[];return((d=n==null?void 0:n.refreshElements)==null?void 0:d.length)>0?i=n.refreshElements.map(y=>y.value):s!=null&&s.onLoad&&(i=Object.keys(s==null?void 0:s.onLoad)),i}async function executeRefreshHandler(n){const s=getRefreshElements(n.config,n.eventGroups);return Promise.allSettled(s.map(i=>{const d=n.eventGroups.onLoad[i];return d?Promise.allSettled(d.map(y=>executeEvents({...n,config:y,componentName:i}))):Promise.resolve()}))}function executeApiRequest(n){var y;const s={...(y=n.userValue)==null?void 0:y.payload},i={"X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"},d=buildApiPayload(n.config,s,i,n.store,n.dynamicData,n.userValue,n.service);return n.service[n.config.method](n.config.path,d.body,{headers:d.headers}).then(u=>u)}function executeInBuiltFunctionHandler(params){let parameter={};if(params.config.funcParametersCode){const makeFunc=eval(params.config.funcParametersCode);parameter=makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service),params.serviceHolder[params.config.inBuiltFunctionType](parameter,params.service)}else params.serviceHolder[params.config.inBuiltFunctionType](params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service)}function executeCustomHandler(params){const makeFunc=eval(params.config.eventCode);return params.config.isSync!=="Yes"?makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service,params.componentName).then(n=>n):makeFunc(params.store,params.dynamicData,params.userValue,params.parentEventOutput,params.service,params.componentName)}function mergeFormdata(n,s,i,d,y,u){var h,b,I;i.type==="Select"&&(n==null?void 0:n.data)?_.isEmpty(n==null?void 0:n.data)||d.setSchema(E=>{var B;return{...E,properties:{...E.properties,[s]:{...(B=E.properties)==null?void 0:B[s],oneOf:n.data}}}}):i.type==="MultipleSelect"&&(n==null?void 0:n.data)?_.isEmpty(n==null?void 0:n.data)||d.setSchema(E=>{var B;return{...E,properties:{...E.properties,[s]:{...(B=E.properties)==null?void 0:B[s],type:"array",items:{oneOf:n==null?void 0:n.data}}}}}):i.type==="page"?_.isEmpty(n==null?void 0:n.data)&&(n==null?void 0:n.data)||(d.newData={...d.newData,...n==null?void 0:n.data},d.setFormdata(E=>({...E,...n==null?void 0:n.data}))):i.type==="Table"&&i.lazyLoading?n&&(n==null?void 0:n.data)&&(u[s]=(h=n.data)==null?void 0:h.data,u[`${s}_RowCount`]=(I=(b=n.data)==null?void 0:b.meta)==null?void 0:I.totalRowCount,d.setFormdata(E=>({...E,...u}))):n&&(u[s]=n.data,d.setFormdata(E=>({...E,...u})))}const buildBodyFormat=(n,s,i,d)=>{let y={...i==null?void 0:i.payload};return n.map(u=>{var h,b,I,E,B;if(typeof(u==null?void 0:u.value)!="string")y[u.key]=u.value;else if((h=u==null?void 0:u.value)!=null&&h.startsWith("$userValue")){const L=u.value.substring(11);y[u.key]=_.get(i,L)}else if((b=u==null?void 0:u.value)!=null&&b.startsWith("$urlParams")){const L=u.value.substring(11),Y=(I=d==null?void 0:d.searchParams)==null?void 0:I.get(L);y[u.key]=Y}else if((E=u==null?void 0:u.value)!=null&&E.startsWith("$local")){const L=u.value.substring(7),Y=JSON.parse(sessionStorage.getItem(L)||'""');y[u.key]=Y}else if((B=u==null?void 0:u.value)!=null&&B.startsWith("$")){const L=u.value.substring(1);y[u.key]=_.get(s,L)}else(u==null?void 0:u.value)==="*"&&(u==null?void 0:u.key)==="*"?y={...y,...s}:(u==null?void 0:u.value)==="*"?y[u.key]=s:y[u.key]=u.value}),y},buildHeadersFormat=n=>{const s={"X-Requested-With":"XMLHttpRequest"};return n.map(i=>{s[i.key]=i.value}),s};function shouldEventExecute(n){var i,d,y;const s=(d=(i=n.config)==null?void 0:i.events)==null?void 0:d.filter(u=>u.eventType==="onStart");return(s==null?void 0:s.length)>0?((y=s[0])==null?void 0:y.isSync)!=="Yes"?executeEventsHandler({...n,config:s[0]}).then(u=>u):executeEventsHandler({...n,config:s[0]}):n.config.isSync!=="Yes"?Promise.resolve(!0):!0}function buildApiPayload(compConfig,body,headers,store,dynamicData,userValue,service){var n,s;compConfig!=null&&compConfig.headers&&(headers=buildHeadersFormat(compConfig.headers)),compConfig.body&&(body={...buildBodyFormat(compConfig.body,store.newData||((s=(n=store==null?void 0:store.ctx)==null?void 0:n.core)==null?void 0:s.data)||store.formData,userValue,store)});const promiseChain={body,headers};if(compConfig.apiBody){const makeFunc=eval(compConfig.apiBody);return{body:makeFunc(store,dynamicData,userValue,promiseChain.body),headers:promiseChain.headers}}return promiseChain}let compType,eventGroups={};const notifyUiSchema={type:"Control",scope:"#/properties/notify",options:{widget:"Notify"},layout:6};let pageData=!1;const extractEvents=n=>{function s(i){i.events&&i.events.forEach(d=>{var u;i.type&&(compType=i.type),eventGroups[d.eventType]||(eventGroups[d.eventType]={}),eventGroups[d.eventType][i.name]||(eventGroups[d.eventType][i.name]=[]);const y=(u=d==null?void 0:d.events)==null?void 0:u.find(h=>h.eventType==="Success");!y&&d.eventType==="onLoad"&&(d.events||(d.events=[]),d.events.push({Handler:"mergeFormdata",eventType:"Success",type:compType,lazyLoading:n.lazyLoading==="YES"})),!y&&(d.eventType==="onBack"||d.eventType==="onNext"||d.eventType==="onReset")&&(d.events||(d.events=[]),d.events.push({Handler:`${d.eventType}Handler`,eventType:"Success",type:compType,lazyLoading:n.lazyLoading==="YES"})),eventGroups[d.eventType][i.name].push({...d,type:compType})})}return s(n),n!=null&&n.elements&&n.elements.forEach(extractEvents),eventGroups};var service=n=>{eventGroups={};const s={};pageData&&!lodash.exports.isEmpty(pageData)&&typeof pageData=="object"&&(eventGroups=extractEvents(pageData==null?void 0:pageData.config));let i={config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,serviceHolder:{downloadFile:downloadFile$1,download:doDownload,...n.functionsProvider},eventGroups,functionsProvider:n.functionsProvider,formDataHolder:s};return{setPage:async function(){var E,B,L,Y,k,X,K,U,ie,ue,V,ye,le;n.store.setFormdata({}),n.store.newData={};const d=sessionStorage.getItem("pagemasterMetaData");d?pageData=JSON.parse(d):(pageData=await n.pageDataProvider(),sessionStorage.setItem("pagemasterMetaData",JSON.stringify({schema:pageData==null?void 0:pageData.schema,uiSchema:pageData==null?void 0:pageData.uiSchema,config:pageData==null?void 0:pageData.config})));const y=pageData==null?void 0:pageData.config,u=pageData==null?void 0:pageData.uiSchema,h=new CustomEvent("pageNameChanged",{detail:{pageName:y.label}});window.dispatchEvent(h);const b=(B=(E=n==null?void 0:n.store)==null?void 0:E.theme)==null?void 0:B.myTheme;u.elements.push({type:"HorizontalLayout",config:{main:{direction:"row"},style:{flexDirection:"row",position:"absolute",bottom:0,height:"fit-content",overflow:"hidden",zIndex:1e3,width:"inherit"}},elements:[{type:"Control",scope:"#/properties/FooterText",options:{widget:"Box"},config:{main:{heading:"Copywriter@ACT21.IO"},style:{color:((Y=(L=b==null?void 0:b.palette)==null?void 0:L.text)==null?void 0:Y.disabled)||"#AFAFAF",fontSize:"11px",textAlign:"center",lineHeight:2,width:"fit-content",left:"50%",position:"relative",margin:0,flexGrow:1,height:0,transform:"translate(-50%, 0%)"}}},{type:"Control",scope:"#/properties/FooterBackIcon",options:{widget:"Box"},config:{main:{iconName:"PrevIcon",onClick:"backHandler",width:"fit-content"},style:{fill:(X=(k=b==null?void 0:b.palette)==null?void 0:k.primary)==null?void 0:X.main,width:20,height:0,top:0,right:{xs:"12px",sm:"84px"},position:"absolute",fontSize:"12px",cursor:"pointer",":hover":{fill:(U=(K=b==null?void 0:b.palette)==null?void 0:K.primary)==null?void 0:U.dark},marginRight:"20px"}}},{type:"Control",scope:"#/properties/FooterBackHandlerText",options:{widget:"Box"},config:{main:{heading:"Previous Page",onClick:"backHandler"},style:{display:{xs:"none",sm:"flex"},textAlign:"left",lineHeight:1,height:0,width:"fit-content",color:(ue=(ie=b==null?void 0:b.palette)==null?void 0:ie.primary)==null?void 0:ue.main,fontSize:"12px",cursor:"pointer",marginLeft:"2px",top:3,right:"12px",position:"absolute",":hover":{color:(ye=(V=b==null?void 0:b.palette)==null?void 0:V.primary)==null?void 0:ye.dark},marginRight:"4px"}}}]});const I=(le=pageData==null?void 0:pageData.schema)!=null?le:{type:"object",properties:{}};eventGroups=extractEvents(y),i={config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,functionsProvider:n.functionsProvider,serviceHolder:this,eventGroups,formDataHolder:s},await executeRefreshHandler({config:{},componentName:"",store:n.store,dynamicData:n.dynamicData,userValue:n.userValue,service:n.service,serviceHolder:this,eventGroups,formDataHolder:{}}),n.store.setSchema(he=>({...I,...he,properties:{...I.properties,...he.properties}})),u.elements.push(notifyUiSchema),n.store.setUiSchema(u)},onCellRenderer:d=>{var y,u,h,b;if(eventGroups.onCellRenderer){let I={};const E=((y=n.dynamicData)==null?void 0:y.tableButtonPath)||((h=(u=n==null?void 0:n.dynamicData)==null?void 0:u.path)==null?void 0:h.split(".")[0]);for(const B of(b=eventGroups==null?void 0:eventGroups.onCellRenderer)==null?void 0:b[E])i.store.functionParameters=d,I=executeEvents({...i,config:B,componentName:E});return I}return{}},onClick:function(){this.callHandler("onClick")},onMount:function(){this.callHandler("onMount")},onFileDownload:function(){this.callHandler("onDownload")},onFileUpload:function(){this.callHandler("onUpload")},backHandler:function(){n.store.navigate(-1)},onRowMovement:async function(d){const y=[{key:"direction",value:d.rowMovement.direction},{key:"movedRowId",value:d.rowMovement.movedRowId},{key:"targetRowId",value:d.rowMovement.targetRowId||[]}];await this.callExecuteEvents({path:d==null?void 0:d.path},y,"onRowMovement");const u=await this.callExecuteEvents({path:d==null?void 0:d.path},y,"onLoad");return u==null?void 0:u.data},onPaginationChange:async function(d){var h;const y=[{key:"size",value:d.pagination.pageSize},{key:"pageIndex",value:d.pagination.pageIndex},{key:"sorting",value:d.sorting||[]},{key:"filters",value:d.columnFilters||[]},{key:"globalFilter",value:(h=d.globalFilter)!=null?h:""}],u=await this.callExecuteEvents(d,y,"onLoad");return u==null?void 0:u.data},getSelectOptions:async function(d){if(d.serachValue!==""&&d.serachValue!==void 0){const y=[{key:"searchValue",value:d.serachValue},{key:"currentValue",value:d.currentValue}],u=await this.callExecuteEvents(d,y);return u==null?void 0:u.data}},onChange:async function(){if(eventGroups.onChange){const d=Object.keys(eventGroups.onChange);Promise.all(d.map(async y=>{var u,h;if(((u=n.store)==null?void 0:u.formData[y])!==n.store.newData[y]&&((h=n.store)==null?void 0:h.newData[y])!==void 0)for(const b of eventGroups.onChange[y])await executeEvents({...i,config:b,componentName:y})}))}},callExecuteEvents:async function(d,y,u){var b,I;let h;for(const E of(b=eventGroups==null?void 0:eventGroups[u])==null?void 0:b[d.path]){E.body?E.body=[...E.body,...y]:E.body=y;const B=(I=E==null?void 0:E.events)==null?void 0:I.filter(L=>L.Handler!=="mergeFormdata");E.events=B!=null?B:[],h=await executeEvents({...i,config:E,componentName:d.path})}return h},onBack:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onBack",d),((h=eventGroups==null?void 0:eventGroups.onBack)==null?void 0:h[y])===void 0&&(d==null||d.handleBack())},onNext:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onNext",d),((h=eventGroups==null?void 0:eventGroups.onNext)==null?void 0:h[y])===void 0&&(d==null||d.handleNext())},onReset:async function(d){var u,h;const y=((u=n.dynamicData)==null?void 0:u.tableButtonPath)||n.dynamicData.path.split(".")[0];await this.callHandler("onReset",d),((h=eventGroups==null?void 0:eventGroups.onReset)==null?void 0:h[y])===void 0&&(d==null||d.handleReset())},callHandler:async function(d,y){var h,b,I;const u=((h=n.dynamicData)==null?void 0:h.tableButtonPath)||n.dynamicData.path.split(".")[0];((b=eventGroups==null?void 0:eventGroups[d])==null?void 0:b[u])!==void 0&&Promise.all((I=eventGroups==null?void 0:eventGroups[d])==null?void 0:I[u].map(E=>{i.store.functionParameters=y,executeEvents({...i,config:E,componentName:u})}))},downloadFile:downloadFile$1,download:doDownload,...n.functionsProvider}},leaderBoard={type:"Control",scope:"#/properties/path",options:{widget:"LeaderBoard"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{}}};const buildLeaderBoard=n=>{const s=_.cloneDeep(leaderBoard);if(n.elements){const i=n.elements.map((d,y)=>d.type?{...{widget:buildUiSchema(d),accessorKey:d.name,header:d.label||d.name}}:{accessorKey:d.name,header:d.label||d.name});s.elements=i}return s.config.main.label=n.label,n.name&&(s.scope=`#/properties/${n.name}`),n.firstImage&&(s.config.main.firstImage=n.firstImage),n.secondImage&&(s.config.main.secondImage=n.secondImage),n.thirdImage&&(s.config.main.thirdImage=n.thirdImage),n.nameKey&&(s.config.main.nameKey=n.nameKey),n.imageKey&&(s.config.main.imageKey=n.imageKey),n.scoreKey&&(s.config.main.scoreKey=n.scoreKey),n.layout&&(s.config.layout=createLayoutFormat(n.layout)),n.style&&(s.config.style=JSON.parse(n.style)),s};var progressBar={type:"Control",scope:"#/properties/pbc_progress",options:{widget:"ProgressBar"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{developOnlyProgresBar:!1,bottomLabel_3:"Remaining",heading:"PBC Details"}}};const buildProgressBarCard=(n,s)=>{const i=_.cloneDeep(progressBar);return i.scope=s,n.heading&&(i.config.main.heading=n.heading),n.bottomLabel_3&&(i.config.main.bottomLabel_3=n.bottomLabel_3),n.bottomLabel_2&&(i.config.main.bottomLabel_2=n.bottomLabel_2),n.bottomLabel_1&&(i.elements[0].config.main.bottomLabel_1=n.bottomLabel_1),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},buildProgressBar=(n,s)=>{const i=_.cloneDeep(progressBar);return i.scope=s,n.layout&&(i.config.layout=n.layout),i.config.main.heading=n.label,n.bottomLabel_3&&(i.config.main.bottomLabel_3=n.bottomLabel_3),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.bottomLabel_2&&(i.config.main.bottomLabel_2=n.bottomLabel_2),n.bottomLabel_1&&(i.config.main.bottomLabel_1=n.bottomLabel_1),i},BarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"BarGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},barStyle:{}}}},PieGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"PieGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},pieStyle:{}}}},LineGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"LineGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},lineStyle:{}}}},HorizontalBarGraph={type:"Control",scope:"#/properties/graph",options:{widget:"Graph"},config:{layout:{xs:12,sm:12,md:12,lg:6},main:{type:"HorizontalBarGraph",legendLabels:null},style:{containerStyle:{},labelStyle:{margin:{}},barStyle:{}}}},buildHorizontalBarGraph=(n,s)=>{const i=_.cloneDeep(HorizontalBarGraph);return i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.type=n.graphType,i.scope=s,i.config.main.header=n.heading,n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.barStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),i};var SpeedoMeter={type:"Control",scope:"#/properties/emptyBox",options:{widget:"SpeedoMeter"},config:{layout:{xs:12,sm:12,md:11.7,lg:11.7},width:350,segments:"5",main:{currentValueText:"Your Score",customSegmentLabels:[],data:{maxValue:1e5,value:5e4,minValue:0}},style:{segmentColors:[],ringWidth:57,needleHeightRatio:.7,needleColor:"#3f51b5",startColor:"red",textColor:"black",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=(n,s)=>{const i=_.cloneDeep(SpeedoMeter);if(i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.heading&&(i.config.main.header=n.heading),n.segments&&(i.config.main.segments=n.segments),n.style){const d=JSON.parse(n.style);d!=null&&d.style&&(i.config.style={...i.config.style,...d.style}),d!=null&&d.containerStyle&&(i.config.style.containerStyle={...i.config.style.containerStyle,...d.containerStyle})}return n.width&&(i.config.main.width=n.width),n.speedoCaption&&(i.config.main.currentValueText=n.speedoCaption),n.data&&(i.config.main.data=n.data),n.needleColor&&(i.config.style.needleColor=n.needleColor),n.segments&&(i.config.style.segments=n.segments),n.endColor&&(i.config.style.endColor=n.endColor),n.startColor&&(i.config.style.startColor=n.startColor),n.segmentColors&&(i.config.style.segmentColors=n.segmentColors),i},buildPieGraph=(n,s)=>{const i=_.cloneDeep(PieGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.height&&(i.config.style.containerStyle.height=n.height),n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),i.scope=s,i.config.main.header=n.heading,n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.pieArcColors&&(i.config.style.pieStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),i},buildStackbarGraph=(n,s)=>{var d;const i=_.cloneDeep(BarGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.legendHide&&(i.config.main.legendAvailable=n.legendHide,i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),i.config.main.type=(d=n==null?void 0:n.graphType)!=null?d:"BarGraph",i.config.main.header=n.heading,n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.barStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),i.scope=s,i};var RunnerBoyProgressBar={type:"Control",scope:"#/properties/path",options:{widget:"RunnerBoyProgressBar"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{}}};const RunnerBoyProgressbar=(n,s)=>{const i=_.cloneDeep(RunnerBoyProgressBar);return i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var Tabsection={type:"TabLayout",config:{main:{id:"groupMaster",tabLabels:["default"],layout:12}},elements:[]};const buildTabSection=(n,s)=>{const i=_.cloneDeep(Tabsection);return i.scope=s,n.lazyLoad&&(i.config.main.lazyLoad=n.lazyLoad==="YES"),n.orientation&&(i.config.main.orientation=n.orientation==="YES"?"vertical":"horizontal"),n.sectionLabels&&(i.config.main.tabLabels=n.sectionLabels.map(d=>d.label)),i.config.main.id=n.name,i};var WrapperSection={type:"WrapperLayout",config:{main:{rowSpacing:3,divider:!0,label:"Default Label"},defaultStyle:!0},elements:[]};const buildWrapperSection=(n,s)=>{const i=_.cloneDeep(WrapperSection);return i.scope=s,i.config.main.label=n.label,i.config.main.divider=n.divider==="YES",i.config.main.isAccordion=n.isAccordion!=="No",n.defaultStyle&&(i.config.defaultStyle=n.defaultStyle==="YES"),n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var TextInputField={type:"Control",scope:"#/properties/text",options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:""},style:{}}};const buildTextField=(n,s)=>{const i=_.cloneDeep(TextInputField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.multiline&&(i.config.main.multiline=n.multiline==="YES"),n.InputFormatingAndMasking&&(i.config.main.formatStrArray=n.InputFormatingAndMasking.map(d=>d.formatElement)),n.placeholder&&(i.config.main.placeholder=n.placeholder),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i};var SelectInputField={type:"Control",scope:"#/properties/select",options:{widget:"SelectInputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"",type:"text",freeSole:!1}}};const buildSelect=(n,s)=>{const i=_.cloneDeep(SelectInputField);return i.config.main.label=n.label,n.value&&(i.config.main.options=n.value),n.freeSolo&&(i.config.main.freeSolo=n.freeSolo==="YES"),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.scope=s,i};var Button={type:"Control",scope:"#/properties/button",options:{widget:"Button"},config:{layout:3,main:{name:"Compare",variant:"contained",type:"text",startIcon:"",styleDefault:!1,icon:"",onClick:"onClick",size:"small"},style:{}}};const buildButton=(n,s)=>{const i=_.cloneDeep(Button);return n.buttonType&&(i.options.widget=n.buttonType==="IconButton"?"IconButton":"Button",n.buttonType==="ButtonWithIconAndText"?i.config.main.startIcon=n.iconName:i.config.main.icon=n.iconName),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.tooltipMessage&&(i.config.main.tooltipMessage=n.tooltipMessage),n.defaultStyle&&(n.buttonType==="IconButton"?i.config.main.styleDefault=n.defaultStyle==="true":i.config.main.enableDefaultStyle=n.defaultStyle!=="true"),i.scope=s,n.style&&(i.config.style=JSON.parse(n.style)),n.size&&(i.config.main.size=n.size),n.color&&(i.config.main.color=n.color),n.label&&(i.config.main.name=n.label),i};var Table={type:"Control",scope:"#/properties/ApproveRecords",options:{widget:"Table"},elements:[],config:{main:{onMount:"onMount",enableExpandAll:!0,allRowData:[],downloadAllData:!1,columns:{dataColumns:[],actionColumns:[]}}}};const buildTable=(n,s)=>{const i=_.cloneDeep(Table);return i.scope=s,n.style&&(i.config.style=JSON.parse(n.style)),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),n.enableRowMovement&&(i.config.main.enableRowMovement=n.enableRowMovement==="YES"),n.enableExpanding&&(i.config.main.enableExpanding=n.enableExpanding==="YES"),n.enableExpandAll&&(i.config.main.enableExpandAll=n.enableExpandAll==="YES"),n.paginateExpandedRows&&(i.config.main.paginateExpandedRows=n.paginateExpandedRows==="YES"),n.treeStructure&&(i.config.main.treeStructure=n.treeStructure==="YES"?"flatTreeMap":!1),n.SelectionAvailable&&(i.config.main.Selection=n.SelectionAvailable==="YES"),n.ColumnResizingAvailable&&(i.config.main.disableColumnResizing=n.ColumnResizingAvailable!=="YES"),n.DragAvailable&&(i.config.main.enableDrag=n.DragAvailable==="YES"),n.downloadAllData&&(i.config.main.downloadAllData=n.downloadAllData==="YES"),n.disableGlobalSearch&&(i.config.main.disableGlobalSearch=n.disableGlobalSearch==="YES"),n.disableColumnFilter&&(i.config.main.disableColumnFilter=n.disableColumnFilter==="YES"),n.disableSorting&&(i.config.main.disableSorting=n.disableSorting==="YES"),n.disableEditColumn&&(i.config.main.disableEditColumn=n.disableEditColumn==="YES"),n.disableFullScreenToggle&&(i.config.main.disableFullScreenToggle=n.disableFullScreenToggle==="YES"),n.disableDensityToggle&&(i.config.main.disableDensityToggle=n.disableDensityToggle==="YES"),n.disableDownloadFile&&(i.config.main.disableDownloadFile=n.disableDownloadFile==="YES"),n.disablePagination&&(i.config.main.disablePagination=n.disablePagination==="YES"),n.Table_Download_Keys_Name&&(i.config.main.TableDownloadKeysName=n.Table_Download_Keys_Name.map(d=>d.KeyName)),n.selectKey&&(i.config.main.selectKey=n.selectKey),i},Box={type:"Control",scope:"#/properties/emptyBox",options:{widget:"Box"},config:{layout:12,main:{},style:{}}},buildLabel=(n,s)=>{const i=_.cloneDeep(Box);return i.scope=s,i.config.main.heading=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.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:{xs:6,sm:6,md:4,lg:4}},options:{widget:"UploadFile"}},downloadFile={type:"Control",scope:"#/properties/downloadAttachment",config:{main:{onClick:"onClick",required:!1},style:{backgroundColor:"none"},layout:{xs:12,sm:6,md:4,lg:4}},options:{widget:"DownloadFile"}},buildUploadFile=(n,s)=>{const i=_.cloneDeep(uploadFile);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=n.style),n.required&&(i.config.main.required=!0),i.config.main.errorMessage=n.errorMessage,i},buildDownloadFile=(n,s)=>{const i=_.cloneDeep(downloadFile);return i.scope=s,n.layout&&(i.config.layout=n.layout),n.style&&(i.config.style=n.style),n.required&&(i.config.main.required=!0),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.errorMessage&&(i.config.main.errorMessage=n.errorMessage),i};function Card(n){return{type:"WrapperLayout",config:{main:{},wrapperStyle:{position:"relative",top:"50%",transform:"translateY(-50%)"},componentsBoxStyle:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1)",flexDirection:"row",flexWrap:"nowrap",width:"100% !important",background:"transparent",border:`1.5px solid ${n.palette.primary.light}`,borderRadius:"8px",padding:"0px 4px",height:"100%",alignItems:"center",marginLeft:"0px","&: hover":{background:`${n.palette.primary.main}`,border:"1.5px solid black","& p":{color:"white"}}},layout:{xs:12,sm:12,md:6,lg:6}},elements:[{type:"HorizontalLayout",config:{layout:8},elements:[{type:"WrapperLayout",config:{main:{columnSpacing:0,gap:0},wrapperStyle:{background:"transparent"},componentsBoxStyle:{flexDirection:"column",flexWrap:"nowrap",width:"100%",height:"inherit",background:"transparent",borderRadius:"0px"},layout:12},elements:[{type:"WrapperLayout",config:{main:{columnSpacing:0,gap:0},wrapperStyle:{background:"transparent"},componentsBoxStyle:{flexDirection:"row",flexWrap:"nowrap",width:"100%",height:"0",background:"transparent",borderRadius:"0px",marginLeft:"-10px",marginTop:"-8px",justifyContent:"start",position:"relative"},layout:12},elements:[{type:"Control",scope:"#/properties/programType",config:{main:{heading:""},style:{color:"black",display:"flex",fontSize:{xs:"24px",md:"28px"},fontWeight:"bold",background:"inherit",justifyContent:"flex-start",width:"auto",margin:"-8px",height:0}},options:{widget:"Box"}},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"5000.00"},style:{color:"black",display:"flex",fontSize:{xs:"24px",md:"28px"},fontWeight:"bold",background:"inherit",justifyContent:"flex-start",width:"auto",margin:"-8px",position:"absolute",left:"8px"}},options:{widget:"Box"}}]},{type:"Control",scope:"#/properties/programType",config:{main:{heading:"Total Earnings"},style:{color:"black",fontSize:"16px",justifyContent:"center",textWrap:"wrap",background:"inherit",width:"calc(100%+8px)",margin:"-8px",marginTop:{xs:"0px",md:"12px"},lineHeight:"1"},layout:12},options:{widget:"Box"}}]}]},{type:"Control",scope:"#/properties/programType",config:{main:{url:"https://www.svgrepo.com/show/500606/loading.svg"},style:{containerStyle:{height:"100%",display:"flex",justifyContent:"end"},imageStyle:{width:"unset",fontSize:"none",padding:"4px",margin:"0px 0px 0px 8px",height:"64px"}},layout:4},options:{widget:"Image"}}]}}const buildCard=(config,componentScope,store)=>{const card=_.cloneDeep(Card(store.theme.myTheme));return config.style&&(card.config.wrapperStyle=JSON.parse(config.style)),card.elements[0].elements[0].elements[0].elements[1].scope=`#/properties/${config.name}/properties/value`,card.elements[1].scope=`#/properties/${config.name}/properties/url`,card.elements[0].elements[0].elements[1].scope=`#/properties/${config.name}/properties/description`,config.layout&&(card.config.layout=createLayoutFormat(config.layout)),config!=null&&config.titleIcon&&(card.elements[0].elements[0].elements[0].elements[0].config.main.heading=eval(`'\\${config.titleIcon}'`),card.elements[0].elements[0].elements[0].elements[1].config.style.left="24px"),config.label&&(card.elements[0].elements[0].elements[0].elements[1].config.main.heading=config.label),config.url&&(card.elements[1].config.main.url=config.url),config.description&&(card.elements[0].elements[0].elements[1].config.main.heading=config.description),card};var DateInputField={type:"Control",scope:"#/properties/date",options:{widget:"DateInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"",type:"date"}}};const DateTime={type:"Control",scope:"#/properties/date",options:{widget:"DateTimeInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"DateTime",type:"date"}}},buildDate=(n,s)=>{const i=_.cloneDeep(DateInputField);return i.config.main.label=n.label,i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},buildDateTime=(n,s)=>{const i=_.cloneDeep(DateTime);return i.config.main.label=n.label,i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var RankCard={type:"Control",scope:"#/properties/path",options:{widget:"RankCard"},config:{layout:{xs:12,sm:6,md:6,lg:6},main:{}}};const buildRankCard=(n,s)=>{const i=_.cloneDeep(RankCard);return i.scope=s,n.rank&&(i.config.main.rank=`${n.rank}`),n.height&&(i.config.main.height=`${n.height}px`),n.layout&&(i.config.layout=createLayoutFormat(n.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=(n,s)=>{const i=_.cloneDeep(RollAndDice);return n.name&&(i.scope=s),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var Timer={type:"Control",scope:"#/properties/timer",options:{widget:"Timer"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{},style:{}}};const buildTimer=(n,s)=>{const i=_.cloneDeep(Timer);return i.scope=s,n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i};var MultipleSelect={type:"Control",scope:"#/properties/path",options:{widget:"MultipleSelect"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{label:"",type:"text",multiple:!0,variant:"standard",options:[]}}};const buildMultiSelect=(n,s)=>{const i=_.cloneDeep(MultipleSelect);return i.scope=s,n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.value&&(i.config.main.options=n.value),n.lazyLoading&&(i.config.main.lazyLoading=n.lazyLoading==="YES"),i},buildBasicUiSchema=n=>({type:"HorizontalLayout",pageName:n.name,name:n.name,accessorKey:n.name,heading:n.label||n.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=(n,s)=>{const i=_.cloneDeep(TextArea);return i.config.main.heading=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),n.placeholder&&(i.config.main.placeholder=n.placeholder),n.enableCodeEditor&&(i.config.main.enableCodeEditor=n.enableCodeEditor==="YES"),n.codeEditorLanguage&&(i.config.main.codeEditorLanguage=n.codeEditorLanguage),i.scope=s,i};var cardSlider={type:"Control",scope:"#/properties/path",options:{widget:"Slider"},elements:[],config:{layout:12,main:{}}};const buildSlider=(n,s)=>{const i=_.cloneDeep(cardSlider);return n.name&&(i.scope=s),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},Checkbox={type:"Control",scope:"#/properties/username1",layout:12,options:{widget:"CheckBox"},config:{main:{label:"Welcome to Hyperform"}}},buildCheckbox=(n,s)=>{const i=_.cloneDeep(Checkbox);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},buildLineGraph=(n,s)=>{const i=_.cloneDeep(LineGraph);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.header=n.heading,n.height&&(i.config.style.containerStyle.height=n.height),n.leftMargin&&(i.config.style.labelStyle.margin={left:n.leftMargin}),n.bottomLabel&&(i.config.main.bottomLabel=n.bottomLabel),n.yAxisValue&&(i.config.main.yAxisValue=n.yAxisValue),n.xAxisValue&&(i.config.main.xAxisValue=n.xAxisValue),n.leftLabel&&(i.config.main.leftLabel=n.leftLabel),n.legendHide&&(i.config.main.legendAvailable=n.legendHide!=="YES"),n.bottomAxisAngle&&(i.config.main.bottomAxisAngle=n.bottomAxisAngle==="YES"),n.legendLabels&&(i.config.main.legendLabels=flatObjectValueInArray(n.legendLabels)),n.pieArcColors&&(i.config.style.lineStyle.colorRange=flatObjectValueInArray(n.pieArcColors)),i.scope=s,i},RadioUiSchema={type:"Control",scope:"#/properties/invoiceEnabled",options:{widget:"RadioInputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Enabled",options:["YES","NO"],errorMessage:"Enabled is not marked as YES or NO"}}},buildRadio=(n,s)=>{const i=_.cloneDeep(RadioUiSchema);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.sectionLabels&&(i.config.main.options=n.sectionLabels.map(d=>d.label||d.Options)),n.style&&(i.config.style=JSON.parse(n.style)),i};var emptyBox={type:"Control",scope:"#/properties/emptyBox",options:{widget:"EmptyBox"},config:{layout:{xs:0,sm:4,md:4,lg:4},main:{},style:{}}};const buildEmptyBox=(n,s)=>{const i=_.cloneDeep(emptyBox);return n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i},ArrayUiSchema={type:"Control",scope:"#/properties/adjustments",layout:11.5,options:{detail:{type:"HorizontalLayout",elements:[]}}},buildArray=(n,s)=>{const i=_.cloneDeep(ArrayUiSchema);return i.scope=s,i},TextField={type:"Control",scope:"#/properties/AAdhar",layout:12,options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Adhaar Card",formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],placeholder:"XXXX XXXX XXXX"}}},buildAdhaarField=(n,s)=>{const i=_.cloneDeep(TextField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i},PanField={type:"Control",scope:"#/properties/pan",layout:12,options:{widget:"InputField"},config:{layout:{xs:12,sm:6,md:4,lg:4},main:{label:"Pan Card",placeholder:"AAAAA0000A",formatStrArray:["A","A","A","A","A","9","9","9","9","A"]}}},buildPanField=(n,s)=>{const i=_.cloneDeep(PanField);return i.config.main.label=n.label,n.style&&(i.config.style=JSON.parse(n.style)),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),i.config.main.errorMessage=`${n.name} is empty or invalid`,i.scope=s,i},FileInput={type:"Control",scope:"#/properties/docAggrementCopy",options:{widget:"FileInputField"},config:{layout:{xs:6,sm:6,md:4,lg:4},main:{required:!1,onUpload:"onFileUpload",onDownload:"onFileDownload",label:"Aggrement Copy"},style:{backgroundColor:"none"}}},buildFileInput=(n,s)=>{const i=_.cloneDeep(FileInput);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},Stepper={type:"Control",scope:"#/properties/Stepper",options:{widget:"Stepper"},config:{main:{steps:[{label:"First"},{label:"Second"},{label:"Third"}],resetButton:!1,resetText:"Reset",orientation:"vertical"}},elements:[]},buildStepper=(n,s)=>{const i=_.cloneDeep(Stepper);return i.scope=s,i.config.main.resetButton=n.resetButton==="YES",n.defaultButtonAvailable&&(i.config.main.defaultButtonAvailable=n.defaultButtonAvailable==="YES"),i.config.main.resetText=n.resetText||"ResetData",i.config.main.completeText=n.completeText||"Complete Text",i.config.main.orientation=n.orientation||"horizontal",n.sectionLabels&&(i.config.main.steps=n.sectionLabels.map((d,y)=>({label:d.label,id:y}))),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(i.config.style=JSON.parse(n.style)),i},PopUP={type:"Control",scope:"#/properties/text",options:{widget:"PopUp"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{label:"PopUp",fullScreen:!1,fullWidth:!1,maxWidth:!1,alignItems:!1,spacing:2},style:{}}},buildPopUp=(n,s)=>{const i=_.cloneDeep(PopUP);return i.scope=s,i.config.main.title=n.label,i.config.main.fullScreen=n.fullScreen==="YES",i.config.main.fullWidth=n.fullWidth==="YES",i.config.main.maxWidth=n.maxWidth||!1,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.style&&(PopUP.config.style=JSON.parse(n.style)),i},dataGrid={type:"Control",scope:"#/properties/dataGrid",layout:12,options:{widget:"DataGrid"},elements:[],config:{main:{elevation:0,useWrapper:!1},style:{}}},buildDataGrid=(n,s)=>{const i=_.cloneDeep(dataGrid);return i.scope=s,n.elevation&&(i.config.main.elevation=+n.elevation),i.config.main.divider=n.divider!=="NO",n.height&&(i.config.main.height=`${n.height}px`),n.justifyContent&&(i.config.main.justifyContent=n.justifyContent),n.label&&(i.config.main.label=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.cardLayout&&(i.config.cardLayout=createLayoutFormat(n.cardLayout)),n.style&&(i.config.style=JSON.parse(n.style)),i},InputSlider={type:"Control",scope:"#/properties/inputSlider",options:{widget:"InputSlider"},config:{layout:{xs:12,sm:12,md:6,lg:6},main:{limitToMax:!1,max:1e4,step:1e3,min:0,label:"Slider"}}},buildInputSlider=(n,s)=>{const i=_.cloneDeep(InputSlider);return i.scope=s,i.config.main.label=n.label,n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.limitToMax&&(i.config.main.limitToMax=n.limitToMax==="YES"),n.max&&(i.config.main.max=n.max),n.step&&(i.config.main.step=n.step),n.min&&(i.config.main.min=n.min),n.style&&(i.config.main.defaultStyle=JSON.parse(n.style)),i},TreeMap={type:"Control",scope:"#/properties/TreeMap2",config:{main:{layout:"cartsian",orientation:"vertical",header:"Territory Hierarchy",linkType:"step",graphHeight:"500px"},style:{BoxStyle:{borderRadius:"5px"}}},options:{widget:"TreeMap"},elements:[]},buildTreeMap=(n,s)=>{const i=_.cloneDeep(TreeMap);return i.scope=s,n.label&&(i.config.main.header=n.label),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.orientation&&(i.config.main.orientation=n.orientation),n.linkType&&(i.config.main.linkType=n.linkType),n.graphHeight&&(i.config.main.graphHeight=n.graphHeight),n.graphWidth&&(i.config.main.graphWidth=n.graphWidth),n.graphZoomHeight&&(i.config.main.graphZoomHeight=n.graphZoomHeight),n.graphZoomWidth&&(i.config.main.graphZoomWidth=n.graphZoomWidth),n.style&&(i.config.style=JSON.parse(n.style)),i};var Thought={type:"Control",scope:"#/properties/path",options:{widget:"Thought"},config:{layout:{xs:11.5,sm:11.5,md:8,lg:8},main:{}}};const buildThoughtOfTheDay=(n,s)=>{const i=_.cloneDeep(Thought);return i.scope=s,n.thought&&(i.config.main.thought=`${n.thought}`),n.layout&&(i.config.layout=createLayoutFormat(n.layout)),n.label&&(i.config.main.label=n.label),n.style&&(i.config.style=JSON.parse(n.style)),i};var pdfViewer={type:"Control",scope:"#/properties/pdfviewer",options:{widget:"PdfViewer"},config:{layout:{xs:12,sm:12,md:12,lg:12},main:{title:"PDF"}}};const buildPdfViewer=n=>{const s=_.cloneDeep(pdfViewer);return s.config.main.label=n.label,n.name&&(s.scope=`#/properties/${n.name}`),n.layout&&(s.config.layout=createLayoutFormat(n.layout)),n.label&&(s.config.main.title=n.label),n.style&&(s.config.style=JSON.parse(n.style)),s};exports.schema={type:"object",properties:{},required:[]};function buildRule(n,s,i){var d,y,u,h,b,I,E,B,L,Y;i?(u=(y=(d=exports.schema.properties)==null?void 0:d[s])==null?void 0:y.items)!=null&&u.properties&&((E=(I=(b=(h=exports.schema.properties)==null?void 0:h[s])==null?void 0:b.items)==null?void 0:I.properties)!=null&&E[n.name]||(exports.schema.properties[s].items.properties[n.name]={},n.type==="Select"&&((B=n.value)==null?void 0:B.length)>0?exports.schema.properties[s].items.properties[n.name]={oneOf:n.value.map(k=>({const:k.value,title:k.label}))}:n.type==="MultipleSelect"&&((L=n.value)==null?void 0:L.length)>0&&(exports.schema.properties[s].items.properties[n.name]={items:{oneOf:n.value.map(k=>({const:k.value,title:k.label}))}}))):(n.type==="Select"||n.type==="MultipleSelect")&&((Y=n.value)==null?void 0:Y.length)>0&&(n.type==="Select"?exports.schema.properties[n.name]={oneOf:n.value.map(k=>({const:k.value,title:k.label}))}:n.type==="MultipleSelect"&&(exports.schema.properties[n.name]={items:{oneOf:n.value.map(k=>({const:k.value,title:k.label}))}})),n.validation&&n.validation.forEach(k=>{var X,K,U,ie,ue,V,ye,le,he,ve,ze,Qe;s?(U=(K=(X=exports.schema.properties)==null?void 0:X[s])==null?void 0:K.items)!=null&&U.properties&&((ye=(V=(ue=(ie=exports.schema.properties)==null?void 0:ie[s])==null?void 0:ue.items)==null?void 0:V.properties)!=null&&ye[n.name]||(exports.schema.properties[s].items.properties[n.name]={},n.type==="Select"||((le=n.value)==null?void 0:le.length)>0?exports.schema.properties[s].items.properties[n.name]={oneOf:n.value.map(Ve=>({const:Ve.value,title:Ve.label}))}:(n.type==="MultipleSelect"||((he=n.value)==null?void 0:he.length)>0)&&(exports.schema.properties[s].items.properties[n.name]={items:{oneOf:n.value.map(Ve=>({const:Ve.value,title:Ve.label}))}})),k.validationType==="required"?(Qe=(ze=(ve=exports.schema.properties)==null?void 0:ve[s])==null?void 0:ze.items)==null||Qe.required.push(n.name):(exports.schema.properties[s].items.properties[n.name].type="string",exports.schema.properties[s].items.properties[n.name][k.validationType]=isNaN(k.validationValue)?k.validationValue:Number(k.validationValue))):(exports.schema.properties[n.name]||(exports.schema.properties[n.name]={}),k.validationType==="required"?exports.schema.required.push(n.name):(exports.schema.properties[n.name].type="string",exports.schema.properties[n.name][k.validationType]=isNaN(k.validationValue)?k.validationValue:Number(k.validationValue)))})}const buildSchema=(n,s,i)=>(buildRule(n,s,i),n!=null&&n.elements&&(n.type=="Table"||n.type=="Array"?(exports.schema.properties[n.name]||(exports.schema.properties[n.name]={type:"array",items:{type:"object",properties:{},required:[]}}),n.elements.map((d,y)=>{buildSchema(d,n.name,n.type==="Array")})):n.elements.map((d,y)=>{buildSchema(d)})),exports.schema),buildUiSchema=(n,s)=>{let i={};const d=`#/properties/${n.name}`;switch(n.type){case"TreeMap":i=buildTreeMap(n,d);break;case"DateTime":i=buildDateTime(n,d);break;case"InputSlider":i=buildInputSlider(n,d);break;case"DataGrid":i=buildDataGrid(n,d);break;case"Stepper":i=buildStepper(n,d);break;case"PopUp":i=buildPopUp(n,d);break;case"FileInput":i=buildFileInput(n,d);break;case"AadharcardText":i=buildAdhaarField(n,d);break;case"PanCardText":i=buildPanField(n,d);break;case"TabSection":i=buildTabSection(n,d);break;case"RunnerBoyProgressBar":i=RunnerBoyProgressbar(n,d);break;case"WrapperSection":i=buildWrapperSection(n,d);break;case"Text":i=buildTextField(n,d);break;case"TextArea":i=buildTextArea(n,d);break;case"Date":i=buildDate(n,d);break;case"Select":i=buildSelect(n,d);break;case"Radio":i=buildRadio(n,d);break;case"Button":i=buildButton(n,d);break;case"Table":i=buildTable(n,d);break;case"Array":i=buildArray(n,d);break;case"Box":i=buildLabel(n,d);break;case"CheckBox":i=buildCheckbox(n,d);break;case"UploadFile":i=buildUploadFile(n,d);break;case"DownloadFile":i=buildDownloadFile(n,d);break;case"EmptyBox":i=buildEmptyBox(n);break;case"card":i=buildCard(n,d,s);break;case"Graph":switch(n.graphType){case"BarGraph":case"StackBarGraph":i=buildStackbarGraph(n,d);break;case"LineGraph":i=buildLineGraph(n,d);break;case"PieGraph":i=buildPieGraph(n,d);break;case"HorizontalBarGraph":case"HorizontalStackBarGraph":i=buildHorizontalBarGraph(n,d);break;default:i=buildStackbarGraph(n,d);break}break;case"ProgressBar":i=buildProgressBar(n,d);break;case"SpeedoMeter":i=buildSpeedoMeter(n,d);break;case"ProgressBarCard":i=buildProgressBarCard(n,d);break;case"RankCard":i=buildRankCard(n,d);break;case"Rank":i=buildRollAndDice(n,d);break;case"Slider":i=buildSlider(n,d);break;case"Timer":i=buildTimer(n,d);break;case"ColumnGroup":i={accessorKey:n.name,header:n.label||n.name,elements:[]};break;case"MultipleSelect":i=buildMultiSelect(n,d);break;case"LeaderBoard":i=buildLeaderBoard(n);break;case"Thought":i=buildThoughtOfTheDay(n,d);break;case"PdfViewer":i=buildPdfViewer(n);break;default:exports.schema={type:"object",properties:{},required:[]},i=buildBasicUiSchema(n)}if(n!=null&&n.elements){if((n==null?void 0:n.type)==="LeaderBoard")return i;if(n.type=="ColumnGroup"){const y={};n.sizeHolder&&n.sizeHolder.map((u,h)=>{y[u.keyName]=u.value}),i.elements=n.elements.map((u,h)=>({accessorKey:u.name,header:u.label||u.name,size:y[u.name]||180,type:u.columnFormat,elements:u.type=="ColumnGroup"?u.elements.map(b=>buildUiSchema(b,s)):[]}))}else if(n.type=="Table"){const y={};n.sizeHolder&&n.sizeHolder.map((u,h)=>{y[u.keyName]=u.value}),i.elements=n.elements.map((u,h)=>u.type?{accessorKey:u.name,header:u.label||u.name,size:y[u.name]||180,type:u.columnFormat,widget:u.type!="ColumnGroup"?buildUiSchema(u,s):void 0,elements:u.type=="ColumnGroup"?u.elements.map(b=>buildUiSchema(b,s)):[],columnFilterModeOptions:u.filteringOptions,enableColumnFilter:u.enableFilter==="Yes",enableSorting:u.enableSorting==="Yes"}:{accessorKey:u.name,type:u.columnFormat,header:u.label||u.name,size:y[u.name]||180,columnFilterModeOptions:u.filteringOptions,enableColumnFilter:u.enableFilter==="Yes",enableSorting:u.enableSorting==="Yes"})}else n.type=="Array"?i.options.detail.elements=n.elements.map((y,u)=>buildUiSchema(y,s)):i.elements=n.elements.map((y,u)=>buildUiSchema(y,s))}return i};exports.buildConfig=buildConfig,exports.buildSchema=buildSchema,exports.buildUiSchema=buildUiSchema,exports.clearFromSessionStorage=clearFromSessionStorage,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
|